PKZS{ appinfo.json{ "targetPlatforms": [ "aplite" ], "projectType": "native", "messageKeys": { "status": 10001, "username": 10003, "JSReady": 10005, "auth": 10000, "server": 10002, "password": 10004 }, "companyName": "ljonget@gmail.com", "enableMultiJS": true, "versionLabel": "1.1", "longName": "DSCam Home-Switch", "shortName": "DSCam Home-Switch", "name": "dscam-h-s", "sdkVersion": "3", "displayName": "DSCam Home-Switch", "uuid": "d701bcb8-1076-4adb-9e38-9c21566efc24", "appKeys": { "status": 10001, "username": 10003, "JSReady": 10005, "auth": 10000, "server": 10002, "password": 10004 }, "capabilities": [ "configurable" ], "watchapp": { "watchface": false }, "resources": { "media": [ { "menuIcon": true, "type": "bitmap", "targetPlatforms": null, "file": "images/icon.png", "name": "IMAGE_MENU_ICON" }, { "targetPlatforms": null, "type": "bitmap", "name": "Q_MARK", "file": "images/q_mark.png" }, { "targetPlatforms": null, "type": "bitmap", "name": "HOME_OFF", "file": "images/home_off.png" }, { "targetPlatforms": null, "type": "bitmap", "name": "HOME_ON", "file": "images/home_on.png" } ] } }PKZS  pebble-js-app.js/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(1); module.exports = __webpack_require__(2); /***/ }), /* 1 */ /***/ (function(module, exports) { (function(p) { if (!p === undefined) { console.error('Pebble object not found!?'); return; } // Aliases: p.on = p.addEventListener; p.off = p.removeEventListener; // For Android (WebView-based) pkjs, print stacktrace for uncaught errors: if (typeof window !== 'undefined' && window.addEventListener) { window.addEventListener('error', function(event) { if (event.error && event.error.stack) { console.error('' + event.error + '\n' + event.error.stack); } }); } })(Pebble); /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { var Clay = __webpack_require__(3); var clayConfig = __webpack_require__(6); var clay = new Clay(clayConfig); var sid; var status; function authenticate() { var response; sid=""; console.log('---- authenticate'); console.log('-- '+clay.getSettings('username')); console.log('-- '+localStorage.getItem('password')); console.log('-- '+localStorage.getItem('server')); if (localStorage.getItem('username') && localStorage.getItem('password') && localStorage.getItem('server') ){ var username=localStorage.getItem('username'); var password=localStorage.getItem('password'); var server=localStorage.getItem('server'); var url = server + "/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=2&account="+username+"&passwd="+password+"&session=SurveillanceStation&format=sid"; var xhr = new XMLHttpRequest(); xhr.open("GET", url,false); xhr.send(); if(xhr.status == 200) { response = JSON.parse(xhr.responseText); if (response.success == true){ sid = response.data.sid; } }else { console.log('------Request returned error code ' + xhr.status.toString()); } if (sid != ""){ auth = ""; message = "Welcome to Syno Cam Switch ! ready & authenticated"; // Build message var dict = { 'auth': message, }; // Send the message Pebble.sendAppMessage(dict, function(e) { console.log('sent'); }, function() { console.log('failed'); }); } }else{ Pebble.showSimpleNotificationOnPebble("DSCam H-S", "You need to set your Synology account and server."); } } function get_status() { var response; if (sid != ""){ status = ""; console.log('---- get_status'); if (localStorage.getItem('username') && localStorage.getItem('password') && localStorage.getItem('server') ){ var username=localStorage.getItem('username'); var password=localStorage.getItem('password'); var server=localStorage.getItem('server'); url = server + "/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=GetInfo&_sid="+sid; var xhr = new XMLHttpRequest(); xhr.open("GET", url,false); xhr.send(); if(xhr.status == 200) { response = JSON.parse(xhr.responseText); if (response.success == true){ status=response.data.on; var message; switch (status) { case true: message = "Your Home mode is ON"; break; case false: message = "Your Home mode is OFF"; break; default: message = "home mode is unknown !"; } // Build message var dict = { 'status': message, }; // Send the message Pebble.sendAppMessage(dict, function(e) { console.log('sent'); }, function() { console.log('failed'); }); } }else { console.log('------Request returned error code ' + xhr.status.toString()); } }else{ Pebble.showSimpleNotificationOnPebble("DSCam H-S", "You need to set your Synology account and server."); } } } function switch_home(bool) { var response; console.log('---- authenticate'); if (sid != ""){ status = ""; console.log('---- get_status'); if (localStorage.getItem('username') && localStorage.getItem('password') && localStorage.getItem('server') ){ var username=localStorage.getItem('username'); var password=localStorage.getItem('password'); var server=localStorage.getItem('server'); var xhr = new XMLHttpRequest(); url = server + "/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=GetInfo&_sid="+sid; xhr.open("GET", url,false); xhr.send(); if(xhr.status == 200) { response = JSON.parse(xhr.responseText); if (response.success == true){ status=response.data.on; console.log('------ status:'+status); var message; var dict; if ( status != bool){ console.log('---- switching home mode to '+ bool); url = server + "/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=Switch&on="+bool+"&_sid="+sid; xhr.open("GET", url,false); xhr.send(); if(xhr.status == 200) { response = JSON.parse(xhr.responseText); if (response.success == true){ status=bool; switch (status) { case true: message = "You just set Home mode ON"; break; case false: message = "You just set Home mode OFF"; break; default: message = "something happened, try again !"; } // Build message dict = { 'status': message, }; // Send the message Pebble.sendAppMessage(dict, function(e) { console.log('sent'); }, function() { console.log('failed'); }); } }else { console.log('------Request returned error code ' + xhr.status.toString()); } }else{ console.log('---- nothign to do, status already '+status); switch (status) { case true: message = "Your Home Mode is already ON"; break; case false: message = "Your Home Mode is already OFF"; break; default: message = "something happened, try again !"; } // Build message dict = { 'status': message, }; // Send the message Pebble.sendAppMessage(dict, function(e) { console.log('sent'); }, function() { console.log('failed'); }); } } }else { console.log('------Request returned error code ' + xhr.status.toString()); } }else{ Pebble.showSimpleNotificationOnPebble("DSCam H-S", "You need to set your Synology account and server."); } } } // Get JS readiness events Pebble.addEventListener('ready',function(e){ console.log('PebbleKit JS is ready'); // Update Watch on this Pebble.sendAppMessage({'JSReady':1}); }); // Get AppMessage events Pebble.addEventListener('appmessage', function(e) { // Get the dictionary from the message var dict = e.payload; console.log(dict[0].toString()); switch (dict[0]) { case 'auth': authenticate(); break; case 'get': get_status(); break; case 'home_on': switch_home(true); break; case 'home_off': switch_home(false); break; default: console.log('Sorry. I don\'t understand your request :'+ dict[0]); } }); /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var require;var require;/* WEBPACK VAR INJECTION */(function(require) {/* Clay - https://github.com/pebble/clay - Version: 0.1.37 - Build Date: 2016-06-15T01:17:40.765Z */ !function(t){if(true)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.clay=t()}}(function(){var t;return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return require(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ae;++e)c[e]=t[e],l[t.charCodeAt(e)]=e;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63}function o(t){var e,n,r,o,i,a,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new u(3*s/4-i),r=i>0?s-4:s;var c=0;for(e=0,n=0;r>e;e+=4,n+=3)o=l[t.charCodeAt(e)]<<18|l[t.charCodeAt(e+1)]<<12|l[t.charCodeAt(e+2)]<<6|l[t.charCodeAt(e+3)],a[c++]=o>>16&255,a[c++]=o>>8&255,a[c++]=255&o;return 2===i?(o=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,a[c++]=255&o):1===i&&(o=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,a[c++]=o>>8&255,a[c++]=255&o),a}function i(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function a(t,e,n){for(var r,o=[],a=e;n>a;a+=3)r=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(i(r));return o.join("")}function s(t){for(var e,n=t.length,r=n%3,o="",i=[],s=16383,l=0,u=n-r;u>l;l+=s)i.push(a(t,l,l+s>u?u:l+s));return 1===r?(e=t[n-1],o+=c[e>>2],o+=c[e<<4&63],o+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],o+=c[e>>10],o+=c[e>>4&63],o+=c[e<<2&63],o+="="),i.push(o),i.join("")}n.toByteArray=o,n.fromByteArray=s;var c=[],l=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array;r()},{}],2:[function(t,e,n){(function(e){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ "use strict";function r(){try{var t=new Uint8Array(1);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(o()=e?i(t,e):void 0!==n?"string"==typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function u(t,e){if(c(e),t=i(t,0>e?0:0|m(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function f(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|b(e,n);return t=i(t,r),t.write(e,n),t}function p(t,e){var n=0|m(e.length);t=i(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function d(t,e,n,r){if(e.byteLength,0>n||e.byteLength=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),a.alloc(+t)}function b(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(r)return V(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,e>>>=0,e>=n)return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,n);case"utf8":case"utf-8":return O(this,e,n);case"ascii":return j(this,e,n);case"binary":return B(this,e,n);case"base64":return R(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function A(t,e,n,r){function o(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}var i=1,a=t.length,s=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,n/=2}for(var c=-1,l=0;a>n+l;l++)if(o(t,n+l)===o(e,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===s)return(n+c)*i}else-1!==c&&(l-=l-c),c=-1;return-1}function w(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=e.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;r>a;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function x(t,e,n,r){return J(V(e,t.length-n),t,n,r)}function k(t,e,n,r){return J(W(e),t,n,r)}function M(t,e,n,r){return k(t,e,n,r)}function T(t,e,n,r){return J(q(e),t,n,r)}function P(t,e,n,r){return J(Z(e,t.length-n),t,n,r)}function R(t,e,n){return 0===e&&n===t.length?H.fromByteArray(t):H.fromByteArray(t.slice(e,n))}function O(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;n>o;){var i=t[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(n>=o+s){var c,l,u,f;switch(s){case 1:128>i&&(a=i);break;case 2:c=t[o+1],128===(192&c)&&(f=(31&i)<<6|63&c,f>127&&(a=f));break;case 3:c=t[o+1],l=t[o+2],128===(192&c)&&128===(192&l)&&(f=(15&i)<<12|(63&c)<<6|63&l,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:c=t[o+1],l=t[o+2],u=t[o+3],128===(192&c)&&128===(192&l)&&128===(192&u)&&(f=(15&i)<<18|(63&c)<<12|(63&l)<<6|63&u,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return E(r)}function E(t){var e=t.length;if(_>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=_));return n}function j(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(127&t[o]);return r}function B(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(t[o]);return r}function D(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=e;n>i;i++)o+=X(t[i]);return o}function N(t,e,n){for(var r=t.slice(e,n),o="",i=0;it)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function Y(t,e,n,r,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||i>e)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function F(t,e,n,r){0>e&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);i>o;o++)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function z(t,e,n,r){0>e&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);i>o;o++)t[n+o]=e>>>8*(r?o:3-o)&255}function L(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function I(t,e,n,r,o){return o||L(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(t,e,n,r,23,4),n+4}function K(t,e,n,r,o){return o||L(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(t,e,n,r,52,8),n+8}function G(t){if(t=C(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function C(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function X(t){return 16>t?"0"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var n,r=t.length,o=null,i=[],a=0;r>a;a++){if(n=t.charCodeAt(a),n>55295&&57344>n){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((e-=1)<0)break;i.push(n)}else if(2048>n){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function W(t){for(var e=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function q(t){return H.toByteArray(G(t))}function J(t,e,n,r){for(var o=0;r>o&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function U(t){return t!==t}var H=t("base64-js"),Q=t("ieee754"),$=t("isarray");n.Buffer=a,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=o(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return s(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return l(null,t,e,n)},a.allocUnsafe=function(t){return u(null,t)},a.allocUnsafeSlow=function(t){return u(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);i>o;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return r>n?-1:n>r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!$(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===e)for(e=0,n=0;ne;e+=2)v(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;t>e;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):y.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},a.prototype.compare=function(t,e,n,r,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),0>e||n>t.length||0>r||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===t)return 0;for(var i=o-r,s=n-e,c=Math.min(i,s),l=this.slice(r,o),u=t.slice(e,n),f=0;c>f;++f)if(l[f]!==u[f]){i=l[f],s=u[f];break}return s>i?-1:i>s?1:0},a.prototype.indexOf=function(t,e,n){if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:A(this,t,e,n);if("number"==typeof t)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):A(this,[t],e,n);throw new TypeError("val must be string, number or Buffer")},a.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},a.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return k(this,t,e,n);case"binary":return M(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;a.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=a.prototype;else{var o=e-t;r=new a(o,void 0);for(var i=0;o>i;i++)r[i]=this[i+t]}return r},a.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||S(t,e,this.length);for(var r=this[t],o=1,i=0;++i0&&(o*=256);)r+=this[t+--e]*o;return r},a.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||S(t,e,this.length);for(var r=this[t],o=1,i=0;++i=o&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||S(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),Q.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),Q.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),Q.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),Q.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e=0|e,n=0|n,!r){var o=Math.pow(2,8*n)-1;Y(this,t,e,n,o,0)}var i=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+i]=t/a&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):z(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);Y(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++it&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},a.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);Y(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)0>t&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):z(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return I(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return I(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return K(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return K(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-en&&r>e)for(o=i-1;o>=0;o--)t[o+e]=this[o+n];else if(1e3>i||!a.TYPED_ARRAY_SUPPORT)for(o=0;i>o;o++)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},a.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);256>o&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t=255&t);if(0>e||this.length=n)return this;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var i;if("number"==typeof t)for(i=e;n>i;i++)this[i]=t;else{var s=a.isBuffer(t)?t:V(new a(t,r).toString()),c=s.length;for(i=0;n-e>i;i++)this[i+e]=s[i%c]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:4,isarray:5}],3:[function(e,n,r){(function(e){/*! * @license deepcopy.js Copyright(c) 2013 sasa+1 * https://github.com/sasaplus1/deepcopy.js * Released under the MIT license. */ !function(e,o){"object"==typeof r&&"object"==typeof n?n.exports=o():"function"==typeof t&&t.amd?t([],o):"object"==typeof r?r.deepcopy=o():e.deepcopy=o()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";t.exports=n(3)},function(t,n){"use strict";function r(t,e){if("[object Array]"!==o.call(t))throw new TypeError("array must be an Array");var n=void 0,r=void 0,i=void 0;for(n=0,r=t.length;r>n;++n)if(i=t[n],i===e||i!==i&&e!==e)return n;return-1}n.__esModule=!0;var o=Object.prototype.toString,i="undefined"!=typeof e?function(t){return e.isBuffer(t)}:function(){return!1},a=Object.keys?function(t){return Object.keys(t)}:function(t){var e=typeof t;if(null===t||"function"!==e||"object"!==e)throw new TypeError("obj must be an Object");var n=[],r=void 0;for(r in t)t.hasOwnProperty(r)&&n.push(r);return n},s="function"==typeof Symbol?function(t){return Object.getOwnPropertySymbols(t)}:function(){return[]};n["default"]={getKeys:a,getSymbols:s,indexOf:r,isBuffer:i},t.exports=n["default"]},function(t,n,r){"use strict";function o(t,e){var n=a(t);return null!==n?a(t):i(t,e)}function i(t,n){if("function"!=typeof n)throw new TypeError("customizer is must be a Function");if("function"==typeof t){var r=String(t);return/^\s*function\s*\S*\([^\)]*\)\s*{\s*\[native code\]\s*}/.test(r)?t:new Function("return "+r)()}var o=c.call(t);if("[object Array]"===o)return[];if("[object Object]"===o&&t.constructor===Object)return{};if("[object Date]"===o)return new Date(+t);if("[object RegExp]"===o){var i=String(t),a=i.lastIndexOf("/");return new RegExp(i.slice(1,a),i.slice(a+1))}if(s.isBuffer(t)){var l=new e(t.length);return t.copy(l),l}var u=n(t);return void 0!==u?u:null}function a(t){var e=typeof t;return null!==t&&"object"!==e&&"function"!==e?t:null}n.__esModule=!0;var s=r(1),c=Object.prototype.toString;n["default"]={copy:o,copyCollection:i,copyValue:a},t.exports=n["default"]},function(t,e,n){"use strict";function r(t){}function o(t){var e=arguments.length<=1||void 0===arguments[1]?r:arguments[1];if(null===t)return null;var n=a.copyValue(t);if(null!==n)return n;var o=a.copyCollection(t,e),s=null!==o?o:t,c=[t],l=[s];return i(t,e,s,c,l)}function i(t,e,n,r,o){if(null===t)return null;var c=a.copyValue(t);if(null!==c)return c;var l=s.getKeys(t).concat(s.getSymbols(t)),u=void 0,f=void 0,p=void 0,d=void 0,h=void 0,m=void 0,g=void 0,b=void 0;for(u=0,f=l.length;f>u;++u)p=l[u],d=t[p],h=s.indexOf(r,d),-1===h?(m=a.copy(d,e),g=null!==m?m:d,null!==d&&/^(?:function|object)$/.test(typeof d)&&(r.push(d),o.push(g))):b=o[h],n[p]=b||i(d,e,g,r,o);return n}e.__esModule=!0;var a=n(2),s=n(1);e["default"]=o,t.exports=e["default"]}])})}).call(this,e("buffer").Buffer)},{buffer:2}],4:[function(t,e,n){n.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,u=-7,f=n?o-1:0,p=n?-1:1,d=t[e+f];for(f+=p,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+t[e+f],f+=p,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+t[e+f],f+=p,u-=8);if(0===i)i=1-l;else{if(i===c)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),i-=l}return(d?-1:1)*a*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var a,s,c,l=8*i-o-1,u=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),e+=a+f>=1?p/c:p*Math.pow(2,1-f),e*c>=2&&(a++,c/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(e*c-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;t[n+d]=255&a,d+=h,a/=256,l-=8);t[n+d-h]|=128*m}},{}],5:[function(t,e,n){var r={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},{}],6:[function(t,e,n){function r(t){return/^[a-z_$][0-9a-z_$]*$/gi.test(t)&&!i.test(t)}function o(t){if(a)return t.toString();var e=t.source.replace(/\//g,function(t,e,n){return 0===e||"\\"!==n[e-1]?"\\/":"/"}),n=(t.global&&"g"||"")+(t.ignoreCase&&"i"||"")+(t.multiline&&"m"||"");return"/"+e+"/"+n}/* toSource by Marcello Bastea-Forte - zlib license */ e.exports=function(t,e,n,i){function a(t,e,n,i,s){function c(t){return n.slice(1)+t.join(","+(n&&"\n")+l)+(n?" ":"")}var l=i+n;switch(t=e?e(t):t,typeof t){case"string":return JSON.stringify(t);case"boolean":case"number":case"undefined":return""+t;case"function":return t.toString()}if(null===t)return"null";if(t instanceof RegExp)return o(t);if(t instanceof Date)return"new Date("+t.getTime()+")";var u=s.indexOf(t)+1;if(u>0)return"{$circularReference:"+u+"}";if(s.push(t),Array.isArray(t))return"["+c(t.map(function(t){return a(t,e,n,l,s.slice())}))+"]";var f=Object.keys(t);return f.length?"{"+c(f.map(function(o){return(r(o)?o:JSON.stringify(o))+":"+a(t[o],e,n,l,s.slice())}))+"}":"{}"}var s=[];return a(t,e,void 0===n?" ":n||"",i||"",s)};var i=/^(abstract|boolean|break|byte|case|catch|char|class|const|continue|debugger|default|delete|do|double|else|enum|export|extends|false|final|finally|float|for|function|goto|if|implements|import|in|instanceof|int|interface|long|native|new|null|package|private|protected|public|return|short|static|super|switch|synchronized|this|throw|throws|transient|true|try|typeof|undefined|var|void|volatile|while|with)$/,a="\\/"===new RegExp("/").source},{}],7:[function(t,e,n){e.exports={name:"pebble-clay",version:"0.1.37",description:"Pebble Config Framework",main:"index.js",scripts:{"test-travis":"./node_modules/.bin/gulp && ./node_modules/.bin/karma start ./test/karma.conf.js --single-run --browsers chromeTravisCI && ./node_modules/.bin/eslint ./","test-debug":"(export DEBUG=true && ./node_modules/.bin/gulp && ./node_modules/.bin/karma start ./test/karma.conf.js --no-single-run)",test:"./node_modules/.bin/gulp && ./node_modules/.bin/karma start ./test/karma.conf.js --single-run",lint:"./node_modules/.bin/eslint ./",build:"gulp",dev:"gulp dev","pebble-clean":"rm -rf tmp src/js/index.js && pebble clean","pebble-publish":"npm run pebble-clean && npm run build && pebble build && pebble package publish && npm run pebble-clean","pebble-build":"npm run build && pebble build"},repository:{type:"git",url:"git+https://github.com/pebble/clay.git"},keywords:["pebble","config","configuration","pebble-package"],author:"Pebble Technology",license:"MIT",bugs:{url:"https://github.com/pebble/clay/issues"},pebble:{projectType:"package",sdkVersion:"3",targetPlatforms:["aplite","basalt","chalk","diorite","emery"],resources:{media:[]}},homepage:"https://github.com/pebble/clay#readme",devDependencies:{autoprefixer:"^6.3.1",bourbon:"^4.2.6",browserify:"^13.0.0","browserify-istanbul":"^0.2.1",chai:"^3.4.1",deamdify:"^0.2.0",deepcopy:"^0.6.1",del:"^2.0.2",eslint:"^1.5.1","eslint-config-pebble":"^1.2.0","eslint-plugin-standard":"^1.3.1",gulp:"^3.9.0","gulp-autoprefixer":"^3.1.0","gulp-htmlmin":"^1.3.0","gulp-inline":"0.0.15","gulp-insert":"^0.5.0","gulp-sass":"^2.1.1","gulp-sourcemaps":"^1.6.0","gulp-uglify":"^1.5.2",joi:"^6.10.1",karma:"^0.13.19","karma-browserify":"^5.0.1","karma-chrome-launcher":"^0.2.2","karma-coverage":"^0.5.3","karma-mocha":"^0.2.1","karma-mocha-reporter":"^1.1.5","karma-source-map-support":"^1.1.0","karma-threshold-reporter":"^0.1.15",mocha:"^2.3.4",postcss:"^5.0.14","require-from-string":"^1.1.0",sassify:"^0.9.1",sinon:"^1.17.3",stringify:"^3.2.0",through:"^2.3.8",tosource:"^1.0.0","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0",watchify:"^3.7.0"},dependencies:{}}},{}],8:[function(t,e,n){"use strict";e.exports={name:"button",template:t("../../templates/components/button.tpl"),style:t("../../styles/clay/components/button.scss"),manipulator:"button",defaults:{primary:!1,attributes:{},description:""}}},{"../../styles/clay/components/button.scss":21,"../../templates/components/button.tpl":30}],9:[function(t,e,n){"use strict";e.exports={name:"checkboxgroup",template:t("../../templates/components/checkboxgroup.tpl"),style:t("../../styles/clay/components/checkboxgroup.scss"),manipulator:"checkboxgroup",defaults:{label:"",options:[],description:"",attributes:{}}}},{"../../styles/clay/components/checkboxgroup.scss":22,"../../templates/components/checkboxgroup.tpl":31}],10:[function(t,e,n){"use strict";e.exports={name:"color",template:t("../../templates/components/color.tpl"),style:t("../../styles/clay/components/color.scss"),manipulator:"color",defaults:{label:"",description:""},initialize:function(t,e){function n(t){if("number"==typeof t)t=t.toString(16);else if(!t)return"transparent";return t=r(t),"#"+(f?p[t]:t)}function r(t){for(t=t.toLowerCase();t.length<6;)t="0"+t;return t}function o(t){switch(typeof t){case"number":return r(t.toString(16));case"string":return t.replace(/^#|^0x/,"");default:return t}}function i(t){return t.reduce(function(t,e){return t.concat(e)},[])}function a(t){t=t.replace(/^#|^0x/,"");var e=parseInt(t.slice(0,2),16)/255,n=parseInt(t.slice(2,4),16)/255,r=parseInt(t.slice(4),16)/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var o=(.4124*e+.3576*n+.1805*r)/.95047,i=(.2126*e+.7152*n+.0722*r)/1,a=(.0193*e+.1192*n+.9505*r)/1.08883;return o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*i-16,500*(o-i),200*(i-a)]}function s(t,e){var n=t[0]-e[0],r=t[1]-e[1],o=t[2]-e[2];return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}function c(){return!e.meta.activeWatchInfo||2===e.meta.activeWatchInfo.firmware.major||"aplite"===e.meta.activeWatchInfo.platform&&!u.config.allowGray?d.BLACK_WHITE:"aplite"===e.meta.activeWatchInfo.platform&&u.config.allowGray?d.GRAY:d.COLOR}var l=t.HTML,u=this;u.roundColorToLayout=function(t){var e=o(t);if(-1===m.indexOf(e)){var n=a(e),r=m.map(function(t){var e=a(o(t));return s(n,e)}),i=Math.min.apply(Math,r),c=r.indexOf(i);e=m[c]}return parseInt(e,16)};var f=u.config.sunlight!==!1,p={"000000":"000000","000055":"001e41","0000aa":"004387","0000ff":"0068ca","005500":"2b4a2c","005555":"27514f","0055aa":"16638d","0055ff":"007dce","00aa00":"5e9860","00aa55":"5c9b72","00aaaa":"57a5a2","00aaff":"4cb4db","00ff00":"8ee391","00ff55":"8ee69e","00ffaa":"8aebc0","00ffff":"84f5f1",550000:"4a161b",550055:"482748","5500aa":"40488a","5500ff":"2f6bcc",555500:"564e36",555555:"545454","5555aa":"4f6790","5555ff":"4180d0","55aa00":"759a64","55aa55":"759d76","55aaaa":"71a6a4","55aaff":"69b5dd","55ff00":"9ee594","55ff55":"9de7a0","55ffaa":"9becc2","55ffff":"95f6f2",aa0000:"99353f",aa0055:"983e5a",aa00aa:"955694",aa00ff:"8f74d2",aa5500:"9d5b4d",aa5555:"9d6064",aa55aa:"9a7099",aa55ff:"9587d5",aaaa00:"afa072",aaaa55:"aea382",aaaaaa:"ababab",ffffff:"ffffff",aaaaff:"a7bae2",aaff00:"c9e89d",aaff55:"c9eaa7",aaffaa:"c7f0c8",aaffff:"c3f9f7",ff0000:"e35462",ff0055:"e25874",ff00aa:"e16aa3",ff00ff:"de83dc",ff5500:"e66e6b",ff5555:"e6727c",ff55aa:"e37fa7",ff55ff:"e194df",ffaa00:"f1aa86",ffaa55:"f1ad93",ffaaaa:"efb5b8",ffaaff:"ecc3eb",ffff00:"ffeeab",ffff55:"fff1b5",ffffaa:"fff6d3"},d={COLOR:[[!1,!1,"55ff00","aaff55",!1,"ffff55","ffffaa",!1,!1],[!1,"aaffaa","55ff55","00ff00","aaff00","ffff00","ffaa55","ffaaaa",!1],["55ffaa","00ff55","00aa00","55aa00","aaaa55","aaaa00","ffaa00","ff5500","ff5555"],["aaffff","00ffaa","00aa55","55aa55","005500","555500","aa5500","ff0000","ff0055"],[!1,"55aaaa","00aaaa","005555","ffffff","000000","aa5555","aa0000",!1],["55ffff","00ffff","00aaff","0055aa","aaaaaa","555555","550000","aa0055","ff55aa"],["55aaff","0055ff","0000ff","0000aa","000055","550055","aa00aa","ff00aa","ffaaff"],[!1,"5555aa","5555ff","5500ff","5500aa","aa00ff","ff00ff","ff55ff",!1],[!1,!1,!1,"aaaaff","aa55ff","aa55aa",!1,!1,!1]],GRAY:[["000000","aaaaaa","ffffff"]],BLACK_WHITE:[["000000","ffffff"]]},h=u.config.layout||c();"string"==typeof h&&(h=d[h]),Array.isArray(h[0])||(h=[h]);var m=i(h).map(function(t){return o(t)}).filter(function(t){return t}),g="",b=h.length,y=0;h.forEach(function(t){y=t.length>y?t.length:y});for(var v=100/y,A=100/b,w=u.$element,x=0;b>x;x++)for(var k=0;y>k;k++){var M=o(h[x][k]),T=M?" selectable":"",P=0===x&&0===k||0===x&&!h[x][k-1]||!h[x][k-1]&&!h[x-1][k]?" rounded-tl":"",R=0===x&&!h[x][k+1]||!h[x][k+1]&&!h[x-1][k]?" rounded-tr ":"",O=x===h.length-1&&0===k||x===h.length-1&&!h[x][k-1]||!h[x][k-1]&&!h[x+1][k]?" rounded-bl":"",E=x===h.length-1&&!h[x][k+1]||!h[x][k+1]&&!h[x+1][k]?" rounded-br":"";g+=''}var j=0;3===y&&(j=5),2===y&&(j=8);var B=j*v/A+"%",D=j+"%";w.select(".color-box-container").add(l(g)).set("$paddingTop",B).set("$paddingRight",D).set("$paddingBottom",B).set("$paddingLeft",D),w.select(".color-box-wrap").set("$paddingBottom",v/A*100+"%");var N=w.select(".value"),S=w.select(".picker-wrap"),Y=u.$manipulatorTarget.get("disabled");w.select("label").on("click",function(){Y||S.set("show")}),u.on("change",function(){var t=u.get();N.set("$background-color",n(t)),w.select(".color-box").set("-selected"),w.select('.color-box[data-value="'+t+'"]').set("+selected")}),w.select(".color-box.selectable").on("click",function(t){u.set(parseInt(t.target.dataset.value,10)),S.set("-show")}),S.on("click",function(){S.set("-show")}),u.on("disabled",function(){Y=!0}),u.on("enabled",function(){Y=!1}),u._layout=h}}},{"../../styles/clay/components/color.scss":23,"../../templates/components/color.tpl":32}],11:[function(t,e,n){"use strict";e.exports={name:"footer",template:t("../../templates/components/footer.tpl"),manipulator:"html"}},{"../../templates/components/footer.tpl":33}],12:[function(t,e,n){"use strict";e.exports={name:"heading",template:t("../../templates/components/heading.tpl"),manipulator:"html",defaults:{size:4}}},{"../../templates/components/heading.tpl":34}],13:[function(t,e,n){"use strict";e.exports={color:t("./color"),footer:t("./footer"),heading:t("./heading"),input:t("./input"),select:t("./select"),submit:t("./submit"),text:t("./text"),toggle:t("./toggle"),radiogroup:t("./radiogroup"),checkboxgroup:t("./checkboxgroup"),button:t("./button"),slider:t("./slider")}},{"./button":8,"./checkboxgroup":9,"./color":10,"./footer":11,"./heading":12,"./input":14,"./radiogroup":15,"./select":16,"./slider":17,"./submit":18,"./text":19,"./toggle":20}],14:[function(t,e,n){"use strict";e.exports={name:"input",template:t("../../templates/components/input.tpl"),style:t("../../styles/clay/components/input.scss"),manipulator:"val",defaults:{label:"",description:"",attributes:{}}}},{"../../styles/clay/components/input.scss":24,"../../templates/components/input.tpl":35}],15:[function(t,e,n){"use strict";e.exports={name:"radiogroup",template:t("../../templates/components/radiogroup.tpl"),style:t("../../styles/clay/components/radiogroup.scss"),manipulator:"radiogroup",defaults:{label:"",options:[],description:"",attributes:{}}}},{"../../styles/clay/components/radiogroup.scss":25,"../../templates/components/radiogroup.tpl":36}],16:[function(t,e,n){"use strict";e.exports={name:"select",template:t("../../templates/components/select.tpl"),style:t("../../styles/clay/components/select.scss"),manipulator:"val",defaults:{label:"",options:[],description:"",attributes:{}},initialize:function(){function t(){var t=e.$manipulatorTarget.get("selectedIndex"),r=e.$manipulatorTarget.select("option"),o=r[t]&&r[t].innerHTML;n.set("innerHTML",o)}var e=this,n=e.$element.select(".value");t(),e.on("change",t)}}},{"../../styles/clay/components/select.scss":26,"../../templates/components/select.tpl":37}],17:[function(t,e,n){"use strict";e.exports={name:"slider",template:t("../../templates/components/slider.tpl"),style:t("../../styles/clay/components/slider.scss"),manipulator:"slider",defaults:{label:"",description:"",min:0,max:100,step:1,attributes:{}},initialize:function(){function t(){var t=e.get().toFixed(e.precision);n.set("value",t),r.set("innerHTML",t)}var e=this,n=e.$element.select(".value"),r=e.$element.select(".value-pad"),o=e.$manipulatorTarget,i=o.get("step");i=i.toString(10).split(".")[1],e.precision=i?i.length:0,e.on("change",t),o.on("|input",t),t(),n.on("|input",function(){r.set("innerHTML",this.get("value"))}),n.on("|change",function(){e.set(this.get("value")),t()})}}},{"../../styles/clay/components/slider.scss":27,"../../templates/components/slider.tpl":38}],18:[function(t,e,n){"use strict";e.exports={name:"submit",template:t("../../templates/components/submit.tpl"),style:t("../../styles/clay/components/submit.scss"),manipulator:"button",defaults:{attributes:{}}}},{"../../styles/clay/components/submit.scss":28,"../../templates/components/submit.tpl":39}],19:[function(t,e,n){"use strict";e.exports={name:"text",template:t("../../templates/components/text.tpl"),manipulator:"html"}},{"../../templates/components/text.tpl":40}],20:[function(t,e,n){"use strict";e.exports={name:"toggle",template:t("../../templates/components/toggle.tpl"),style:t("../../styles/clay/components/toggle.scss"),manipulator:"checked",defaults:{label:"",description:"",attributes:{}}}},{"../../styles/clay/components/toggle.scss":29,"../../templates/components/toggle.tpl":41}],21:[function(t,e,n){e.exports=".component-button { text-align: center; }\n\n.section .component-button { padding-bottom: 0; }\n\n.component-button .description { padding-left: 0; padding-right: 0; }\n"},{}],22:[function(t,e,n){e.exports=".component-checkbox { display: block; }\n\n.section .component-checkbox { padding-right: 0.375rem; }\n\n.component-checkbox > .label { display: block; padding-bottom: 0.35rem; }\n\n.component-checkbox .checkbox-group { padding-bottom: 0.35rem; }\n\n.component-checkbox .checkbox-group label { padding: 0.35rem 0.375rem; }\n\n.component-checkbox .checkbox-group .label { font-size: 0.9em; }\n\n.component-checkbox .checkbox-group input { opacity: 0; position: absolute; }\n\n.component-checkbox .checkbox-group i { display: block; position: relative; border-radius: 0.25rem; width: 1.4rem; height: 1.4rem; border: 0.11765rem solid #767676; -webkit-flex-shrink: 0; flex-shrink: 0; }\n\n.component-checkbox .checkbox-group input:checked + i { border-color: #ff4700; background: #ff4700; }\n\n.component-checkbox .checkbox-group input:checked + i:after { content: ''; box-sizing: border-box; -webkit-transform: rotate(45deg); transform: rotate(45deg); position: absolute; left: 0.35rem; top: -0.05rem; display: block; width: 0.5rem; height: 1rem; border: 0 solid #ffffff; border-right-width: 0.11765rem; border-bottom-width: 0.11765rem; }\n\n.component-checkbox .description { padding-left: 0; padding-right: 0; }\n"},{}],23:[function(t,e,n){e.exports=".section .component-color { padding: 0; }\n\n.component-color .value { width: 2.2652rem; height: 1.4rem; border-radius: 0.7rem; box-shadow: 0 0.1rem 0.1rem #2f2f2f; display: block; background: #000; }\n\n.component-color .picker-wrap { left: 0; top: 0; right: 0; bottom: 0; position: fixed; padding: 0.7rem 0.375rem; background: rgba(0, 0, 0, 0.65); opacity: 0; -webkit-transition: opacity 100ms ease-in 175ms; transition: opacity 100ms ease-in 175ms; pointer-events: none; z-index: 100; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; flex-direction: column; -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; align-items: center; }\n\n.component-color .picker-wrap .picker { padding: 0.7rem 0.75rem; background: #484848; box-shadow: 0 0.17647rem 0.88235rem rgba(0, 0, 0, 0.4); border-radius: 0.25rem; width: 100%; max-width: 26rem; overflow: auto; }\n\n.component-color .picker-wrap.show { -webkit-transition-delay: 0ms; transition-delay: 0ms; pointer-events: auto; opacity: 1; }\n\n.component-color .color-box-wrap { box-sizing: border-box; position: relative; height: 0; width: 100%; padding: 0 0 100% 0; }\n\n.component-color .color-box-wrap .color-box-container { position: absolute; height: 99.97%; width: 100%; left: 0; top: 0; }\n\n.component-color .color-box-wrap .color-box-container .color-box { float: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }\n\n.component-color .color-box-wrap .color-box-container .color-box.rounded-tl { border-top-left-radius: 0.25rem; }\n\n.component-color .color-box-wrap .color-box-container .color-box.rounded-tr { border-top-right-radius: 0.25rem; }\n\n.component-color .color-box-wrap .color-box-container .color-box.rounded-bl { border-bottom-left-radius: 0.25rem; }\n\n.component-color .color-box-wrap .color-box-container .color-box.rounded-br { border-bottom-right-radius: 0.25rem; }\n\n.component-color .color-box-wrap .color-box-container .color-box.selected { -webkit-transform: scale(1.1); transform: scale(1.1); border-radius: 0.25rem; box-shadow: #111 0 0 0.24rem; position: relative; z-index: 100; }\n"},{}],24:[function(t,e,n){e.exports=".section .component-input { padding: 0; }\n\n.component-input label { display: block; }\n\n.component-input .label { padding-bottom: 0.7rem; }\n\n.component-input .input { position: relative; min-width: 100%; margin-top: 0.7rem; margin-left: 0; }\n\n.component-input input { display: block; width: 100%; background: #333333; border-radius: 0.25rem; padding: 0.35rem 0.375rem; border: none; vertical-align: baseline; color: #ffffff; font-size: inherit; -webkit-appearance: none; appearance: none; min-height: 2.1rem; }\n\n.component-input input::-webkit-input-placeholder { color: #858585; }\n\n.component-input input::-moz-placeholder { color: #858585; }\n\n.component-input input:-moz-placeholder { color: #858585; }\n\n.component-input input:-ms-input-placeholder { color: #858585; }\n\n.component-input input:focus { border: none; box-shadow: none; }\n\n.component-input input:focus::-webkit-input-placeholder { color: #666666; }\n\n.component-input input:focus::-moz-placeholder { color: #666666; }\n\n.component-input input:focus:-moz-placeholder { color: #666666; }\n\n.component-input input:focus:-ms-input-placeholder { color: #666666; }\n"},{}],25:[function(t,e,n){e.exports=".component-radio { display: block; }\n\n.section .component-radio { padding-right: 0.375rem; }\n\n.component-radio > .label { display: block; padding-bottom: 0.35rem; }\n\n.component-radio .radio-group { padding-bottom: 0.35rem; }\n\n.component-radio .radio-group label { padding: 0.35rem 0.375rem; }\n\n.component-radio .radio-group .label { font-size: 0.9em; }\n\n.component-radio .radio-group input { opacity: 0; position: absolute; }\n\n.component-radio .radio-group i { display: block; position: relative; border-radius: 1.4rem; width: 1.4rem; height: 1.4rem; border: 2px solid #767676; -webkit-flex-shrink: 0; flex-shrink: 0; }\n\n.component-radio .radio-group input:checked + i { border-color: #ff4700; }\n\n.component-radio .radio-group input:checked + i:after { content: ''; display: block; position: absolute; left: 15%; right: 15%; top: 15%; bottom: 15%; border-radius: 1.4rem; background: #ff4700; }\n\n.component-radio .description { padding-left: 0; padding-right: 0; }\n"},{}],26:[function(t,e,n){e.exports='.section .component-select { padding: 0; }\n\n.component-select label { position: relative; }\n\n.component-select .value { position: relative; padding-right: 1.1rem; display: block; }\n\n.component-select .value:after { content: ""; position: absolute; right: 0; top: 50%; margin-top: -0.1rem; height: 0; width: 0; border-left: 0.425rem solid transparent; border-right: 0.425rem solid transparent; border-top: 0.425rem solid #ff4700; }\n\n.component-select select { opacity: 0; position: absolute; display: block; left: 0; right: 0; top: 0; bottom: 0; width: 100%; border: none; margin: 0; padding: 0; }\n'},{}],27:[function(t,e,n){e.exports=".section .component-slider { padding: 0; }\n\n.component-slider label { display: block; }\n\n.component-slider .label-container { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; width: 100%; padding-bottom: 0.7rem; }\n\n.component-slider .label { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 1rem; display: block; padding-right: 0.75rem; }\n\n.component-slider .value-wrap { display: block; position: relative; }\n\n.component-slider .value, .component-slider .value-pad { display: block; background: #333333; border-radius: 0.25rem; padding: 0.35rem 0.375rem; border: none; vertical-align: baseline; color: #ffffff; text-align: right; margin: 0; min-width: 1rem; }\n\n.component-slider .value-pad { visibility: hidden; }\n\n.component-slider .value-pad:before { content: ' '; display: inline-block; }\n\n.component-slider .value { max-width: 100%; position: absolute; left: 0; top: 0; }\n\n.component-slider .input-wrap { padding: 0 0.75rem 0.7rem; }\n\n.component-slider .input { display: block; position: relative; min-width: 100%; height: 1.4rem; overflow: hidden; margin-left: 0; }\n\n.component-slider .input:before { content: ''; display: block; position: absolute; height: 0.17647rem; background: #666666; width: 100%; top: 0.61176rem; }\n\n.component-slider .input .slider { display: block; width: 100%; -webkit-appearance: none; appearance: none; position: relative; height: 1.4rem; margin: 0; background-color: transparent; }\n\n.component-slider .input .slider:focus { outline: none; }\n\n.component-slider .input .slider::-webkit-slider-runnable-track { border: none; height: 1.4rem; width: 100%; background-color: transparent; }\n\n.component-slider .input .slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; position: relative; height: 1.4rem; width: 1.4rem; background-color: #ff4700; border-radius: 50%; }\n\n.component-slider .input .slider::-webkit-slider-thumb:before { content: \"\"; position: absolute; left: -1000px; top: 0.61176rem; height: 0.17647rem; width: 1001px; background: #ff4700; }\n"},{}],28:[function(t,e,n){e.exports=".component-submit { text-align: center; }\n"},{}],29:[function(t,e,n){e.exports=".section .component-toggle { padding: 0; }\n\n.component-toggle input { display: none; }\n\n.component-toggle .graphic { display: inline-block; position: relative; }\n\n.component-toggle .graphic .slide { display: block; border-radius: 1.05rem; height: 1.05rem; width: 2.2652rem; background: #2f2f2f; -webkit-transition: background-color 150ms linear; transition: background-color 150ms linear; }\n\n.component-toggle .graphic .marker { background: #ececec; width: 1.4rem; height: 1.4rem; border-radius: 1.4rem; position: absolute; left: 0; display: block; top: -0.175rem; -webkit-transition: -webkit-transform 150ms linear; transition: -webkit-transform 150ms linear; transition: transform 150ms linear; transition: transform 150ms linear, -webkit-transform 150ms linear; box-shadow: 0 0.1rem 0.1rem #2f2f2f; }\n\n.component-toggle input:checked + .graphic .slide { background: #993d19; }\n\n.component-toggle input:checked + .graphic .marker { background: #ff4700; -webkit-transform: translateX(0.8652rem); transform: translateX(0.8652rem); }\n"},{}],30:[function(t,e,n){e.exports='
\n \n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n'},{}],31:[function(t,e,n){e.exports='
\n {{{label}}}\n
\n {{each options}}\n \n {{/each}}\n
\n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n'},{}],32:[function(t,e,n){e.exports='
\n \n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n
\n
\n
\n
\n
\n
\n
\n'},{}],33:[function(t,e,n){e.exports='
\n'},{}],34:[function(t,e,n){e.exports='
\n \n
\n'},{}],35:[function(t,e,n){e.exports='
\n \n\n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n'},{}],36:[function(t,e,n){e.exports='
\n {{{label}}}\n
\n {{each options}}\n \n {{/each}}\n
\n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n'},{}],37:[function(t,e,n){e.exports='
\n \n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n'},{}],38:[function(t,e,n){e.exports='
\n \n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n'},{}],39:[function(t,e,n){e.exports='
\n \n
\n'},{}],40:[function(t,e,n){e.exports='
\n

\n
\n'},{}],41:[function(t,e,n){e.exports='
\n \n {{if description}}\n
{{{description}}}
\n {{/if}}\n
\n'},{}],42:[function(t,e,n){e.exports='
'; },{}],"pebble-clay":[function(t,e,n){"use strict";function r(t,e,n){function r(){i.meta={activeWatchInfo:Pebble.getActiveWatchInfo&&Pebble.getActiveWatchInfo(),accountToken:Pebble.getAccountToken(),watchToken:Pebble.getWatchToken(),userData:s(n.userData||{})}}function o(t){Array.isArray(t)?t.forEach(function(t){o(t)}):"section"===t.type?o(t.items):a[t.type]&&i.registerComponent(a[t.type])}var i=this;if(i.version=c,!Array.isArray(t))throw new Error("config must be an Array");if(e&&"function"!=typeof e)throw new Error('customFn must be a function or "null"');n=n||{},i.config=s(t),i.customFn=e||function(){},i.components={},i.meta={activeWatchInfo:null,accountToken:"",watchToken:"",userData:{}},n.autoHandleEvents!==!1&&"undefined"!=typeof Pebble?(Pebble.addEventListener("showConfiguration",function(){r(),Pebble.openURL(i.generateUrl())}),Pebble.addEventListener("webviewclosed",function(t){t&&t.response&&Pebble.sendAppMessage(i.getSettings(t.response),function(){console.log("Sent config data to Pebble")},function(t){console.log("Failed to send config data!"),console.log(JSON.stringify(t))})})):"undefined"!=typeof Pebble&&Pebble.addEventListener("ready",function(){r()}),o(i.config)}var o=t("./tmp/config-page.html"),i=t("tosource"),a=t("./src/scripts/components"),s=t("deepcopy/build/deepcopy.min"),c=t("./package.json").version;r.prototype.registerComponent=function(t){this.components[t.name]=t},r.prototype.generateUrl=function(){var t={},e=!Pebble||"pypkjs"===Pebble.platform,n=e?"$$$RETURN_TO$$$":"pebblejs://close#";try{t=JSON.parse(localStorage.getItem("clay-settings"))||{}}catch(a){console.error(a.toString())}var s=o.replace("$$RETURN_TO$$",n).replace("$$CUSTOM_FN$$",i(this.customFn)).replace("$$CONFIG$$",i(this.config)).replace("$$SETTINGS$$",i(t)).replace("$$COMPONENTS$$",i(this.components)).replace("$$META$$",i(this.meta));return e?r.encodeDataUri(s,"http://clay.pebble.com.s3-website-us-west-2.amazonaws.com/#"):r.encodeDataUri(s)},r.prototype.getSettings=function(t,e){var n={};try{n=JSON.parse(decodeURIComponent(t))}catch(o){throw new Error("The provided response was not valid JSON")}var i={};return Object.keys(n).forEach(function(t){"object"==typeof n[t]&&n[t]?i[t]=n[t].value:i[t]=n[t]}),localStorage.setItem("clay-settings",JSON.stringify(i)),e===!1?n:r.prepareSettingsForAppMessage(n)},r.encodeDataUri=function(t,e){return e="undefined"!=typeof e?e:"data:text/html;charset=utf-8,",e+encodeURIComponent(t)},r.prepareForAppMessage=function(t){function e(t,e){return Math.floor(t*Math.pow(10,e||0))}var n;return Array.isArray(t)?(n=[],t.forEach(function(t){var e=r.prepareForAppMessage(t);n.push(e),"string"==typeof e&&n.push(0)})):n="object"==typeof t&&t?"number"==typeof t.value?e(t.value,t.precision):Array.isArray(t.value)?t.value.map(function(n){return"number"==typeof n?e(n,t.precision):n}):r.prepareForAppMessage(t.value):"boolean"==typeof t?t?1:0:t,n},r.prepareSettingsForAppMessage=function(t){var e={};return Object.keys(t).forEach(function(n){e[n]=r.prepareForAppMessage(t[n])}),e},e.exports=r},{"./package.json":7,"./src/scripts/components":13,"./tmp/config-page.html":42,"deepcopy/build/deepcopy.min":3,tosource:6}]},{},["pebble-clay"])("pebble-clay")}); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { module.exports = function(module) { switch(module) { case "message_keys": return __webpack_require__(5); } throw new Error('Module not found: ' + module); }; /***/ }), /* 5 */ /***/ (function(module, exports) { module.exports = {"JSReady":10005,"auth":10000,"password":10004,"server":10002,"status":10001,"username":10003} /***/ }), /* 6 */ /***/ (function(module, exports) { module.exports = [ { "type": "heading", "defaultValue": "DSCam Home Swtich Configuration" }, { "type": "text", "defaultValue": "Set your Synology account and server." }, { "type": "section", "items": [ { "type": "heading", "defaultValue": "Your synology account" }, { "type": "input", "messageKey": "username", "label": "Your DSM Username", "attributes" : { "maxlength":40 } }, { "type": "input", "messageKey": "password", "label": "Your DSM Password", "attributes" : { "type": "password", "maxlength":40 } }, { "type": "input", "messageKey": "server", "label": "Your DSM Server", "attributes" : { "type": "url", "maxlength":255 } } ] }, { "type": "submit", "defaultValue": "Save Settings" } ]; /***/ }) /******/ ]); //# sourceMappingURL=pebble-js-app.js.mapPKZSc~g~gpebble-js-app.js.map{"version":3,"sources":["webpack/bootstrap 1d28f8059b988b7f12d2","/home/louis/.pebble-sdk/SDKs/4.3/sdk-core/pebble/common/include/_pkjs_shared_additions.js","./src/pkjs/index.js","./~/pebble-clay/dist/js/index.js","/home/louis/.pebble-sdk/SDKs/4.3/sdk-core/pebble/common/include/_message_key_wrapper.js","./build/js/message_keys.json","./src/pkjs/config.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA,EAAC;;;;;;;ACnBD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;;AAEP;;AAEA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,mC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,Y;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX;AACA,YAAW;AACX;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,mC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA,kBAAiB;AACjB;AACA,cAAa;AACb;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,c;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa,E;AACb;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,0BAAyB,YAAY;AACrC,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;yBC1OD;AACA,cAAa,2BAA2E,2DAA2D,KAAK,MAAM,qHAAqH,YAAY,MAAM,yBAAyB,gBAAgB,UAAU,UAAU,0CAA0C,8BAAwB,oBAAoB,8CAA8C,kCAAkC,YAAY,YAAY,mCAAmC,iBAAiB,gBAAgB,sBAAsB,oBAAoB,kDAAkD,WAAW,YAAY,SAAS,EAAE,mBAAmB,aAAa,aAAa,4FAA4F,IAAI,mCAAmC,gDAAgD,cAAc,2BAA2B,2EAA2E,+DAA+D,QAAQ,YAAY,IAAI,uJAAuJ,6LAA6L,cAAc,k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AQ,wKAAwK,GAAG,cAAc,uCAAuC,KAAK,0EAA0E,WAAW,4EAA4E,oFAAoF,OAAO,yCAAyC,gBAAgB,SAAS,+DAA+D,6GAA6G,oCAAoC,sDAAsD,0EAA0E,0CAA0C,aAAa,0EAA0E,EAAE,0EAA0E,IAAI,cAAc,mJAAmJ,0CAA0C,0BAA0B,oCAAoC,QAAQ,iFAAiF,IAAI,wDAAwD,SAAS,4BAA4B,6NAA6N,6GAA6G,uCAAuC,SAAS,IAAI,oCAAoC,SAAS,4DAA4D,SAAS,0CAA0C,sDAAsD,qGAAqG,+BAA+B,iDAAiD,wCAAwC,oCAAoC,gBAAgB,uCAAuC,MAAM,oDAAoD,gCAAgC,wCAAwC,0HAA0H,4CAA4C,gEAAgE,4CAA4C,SAAS,0CAA0C,kCAAkC,IAAI,aAAa,EAAE,wHAAwH,EAAE,GAAG,iCAAiC,E;;;;;;;ACdloG;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA,mBAAkB,6F;;;;;;ACAlB;AACA,I;AACA;AACA;AACA,IAAG;AACH,I;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA","file":"pebble-js-app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1d28f8059b988b7f12d2","(function(p) {\n if (!p === undefined) {\n console.error('Pebble object not found!?');\n return;\n }\n\n // Aliases:\n p.on = p.addEventListener;\n p.off = p.removeEventListener;\n\n // For Android (WebView-based) pkjs, print stacktrace for uncaught errors:\n if (typeof window !== 'undefined' && window.addEventListener) {\n window.addEventListener('error', function(event) {\n if (event.error && event.error.stack) {\n console.error('' + event.error + '\\n' + event.error.stack);\n }\n });\n }\n\n})(Pebble);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/louis/.pebble-sdk/SDKs/4.3/sdk-core/pebble/common/include/_pkjs_shared_additions.js\n// module id = 1\n// module chunks = 0","var Clay = require('pebble-clay');\nvar clayConfig = require('./config');\nvar clay = new Clay(clayConfig);\n\nvar sid;\nvar status;\n\nfunction authenticate() {\n var response;\n sid=\"\";\n console.log('---- authenticate');\n console.log('-- '+clay.getSettings('username'));\n console.log('-- '+localStorage.getItem('password'));\n console.log('-- '+localStorage.getItem('server'));\n if (localStorage.getItem('username') && localStorage.getItem('password') && localStorage.getItem('server') ){\n var username=localStorage.getItem('username');\n var password=localStorage.getItem('password');\n var server=localStorage.getItem('server');\n var url = server + \"/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=2&account=\"+username+\"&passwd=\"+password+\"&session=SurveillanceStation&format=sid\";\n var xhr = new XMLHttpRequest();\n \n xhr.open(\"GET\", url,false);\n xhr.send();\n\n if(xhr.status == 200) {\n response = JSON.parse(xhr.responseText);\n if (response.success == true){\n sid = response.data.sid;\n }\n }else {\n console.log('------Request returned error code ' + xhr.status.toString());\n }\n \n if (sid != \"\"){\n auth = \"\";\n message = \"Welcome to Syno Cam Switch ! ready & authenticated\";\n \n // Build message\n var dict = {\n 'auth': message,\n };\n \n // Send the message\n Pebble.sendAppMessage(dict, function(e) {\n console.log('sent');\n }, function() {\n console.log('failed');\n });\n \n }\n \n }else{\n Pebble.showSimpleNotificationOnPebble(\"DSCam H-S\", \"You need to set your Synology account and server.\");\n }\n}\n\nfunction get_status() {\n var response;\n \n if (sid != \"\"){\n status = \"\";\n console.log('---- get_status');\n if (localStorage.getItem('username') && localStorage.getItem('password') && localStorage.getItem('server') ){\n var username=localStorage.getItem('username');\n var password=localStorage.getItem('password');\n var server=localStorage.getItem('server');\n url = server + \"/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=GetInfo&_sid=\"+sid;\n var xhr = new XMLHttpRequest();\n\n xhr.open(\"GET\", url,false);\n xhr.send();\n\n if(xhr.status == 200) {\n response = JSON.parse(xhr.responseText);\n if (response.success == true){\n status=response.data.on; \n var message;\n switch (status) {\n case true:\n message = \"Your Home mode is ON\";\n break;\n case false:\n message = \"Your Home mode is OFF\";\n break;\n default:\n message = \"home mode is unknown !\";\n } \n // Build message\n var dict = {\n 'status': message,\n };\n \n // Send the message\n Pebble.sendAppMessage(dict, function(e) {\n console.log('sent');\n }, function() {\n console.log('failed');\n });\n }\n }else {\n console.log('------Request returned error code ' + xhr.status.toString());\n }\n }else{\n Pebble.showSimpleNotificationOnPebble(\"DSCam H-S\", \"You need to set your Synology account and server.\");\n }\n }\n \n}\n\n\nfunction switch_home(bool) {\n var response;\n console.log('---- authenticate');\n if (sid != \"\"){\n status = \"\";\n console.log('---- get_status');\n if (localStorage.getItem('username') && localStorage.getItem('password') && localStorage.getItem('server') ){\n var username=localStorage.getItem('username');\n var password=localStorage.getItem('password');\n var server=localStorage.getItem('server');\n var xhr = new XMLHttpRequest();\n \n url = server + \"/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=GetInfo&_sid=\"+sid;\n \n xhr.open(\"GET\", url,false);\n xhr.send();\n \n if(xhr.status == 200) {\n response = JSON.parse(xhr.responseText);\n if (response.success == true){\n status=response.data.on; \n console.log('------ status:'+status);\n var message;\n var dict;\n if ( status != bool){\n console.log('---- switching home mode to '+ bool);\n url = server + \"/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=Switch&on=\"+bool+\"&_sid=\"+sid;\n \n xhr.open(\"GET\", url,false);\n xhr.send();\n \n if(xhr.status == 200) {\n response = JSON.parse(xhr.responseText);\n if (response.success == true){\n status=bool;\n switch (status) {\n case true:\n message = \"You just set Home mode ON\";\n break;\n case false:\n message = \"You just set Home mode OFF\";\n break;\n default:\n message = \"something happened, try again !\";\n } \n // Build message\n dict = {\n 'status': message,\n };\n \n // Send the message\n Pebble.sendAppMessage(dict, function(e) {\n console.log('sent');\n }, function() {\n console.log('failed');\n });\n }\n }else {\n console.log('------Request returned error code ' + xhr.status.toString());\n }\n }else{\n console.log('---- nothign to do, status already '+status);\n switch (status) {\n case true:\n message = \"Your Home Mode is already ON\";\n break;\n case false:\n message = \"Your Home Mode is already OFF\";\n break;\n default:\n message = \"something happened, try again !\";\n } \n // Build message\n dict = {\n 'status': message,\n };\n \n // Send the message\n Pebble.sendAppMessage(dict, function(e) {\n console.log('sent');\n }, function() {\n console.log('failed');\n }); \n }\n }\n }else {\n console.log('------Request returned error code ' + xhr.status.toString());\n }\n }else{\n Pebble.showSimpleNotificationOnPebble(\"DSCam H-S\", \"You need to set your Synology account and server.\");\n }\n }\n\n}\n\n// Get JS readiness events\nPebble.addEventListener('ready',function(e){\n console.log('PebbleKit JS is ready');\n // Update Watch on this\n Pebble.sendAppMessage({'JSReady':1});\n});\n\n// Get AppMessage events\nPebble.addEventListener('appmessage', function(e) {\n // Get the dictionary from the message\n var dict = e.payload;\n console.log(dict[0].toString());\n switch (dict[0]) {\n case 'auth':\n authenticate();\n break;\n case 'get':\n get_status();\n break;\n case 'home_on':\n switch_home(true);\n break;\n case 'home_off':\n switch_home(false);\n break;\n default:\n console.log('Sorry. I don\\'t understand your request :'+ dict[0]);\n }\n \n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/pkjs/index.js\n// module id = 2\n// module chunks = 0","/* Clay - https://github.com/pebble/clay - Version: 0.1.37 - Build Date: 2016-06-15T01:17:40.765Z */\n!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var e;e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this,e.clay=t()}}(function(){var t;return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var c=\"function\"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var l=new Error(\"Cannot find module '\"+a+\"'\");throw l.code=\"MODULE_NOT_FOUND\",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var i=\"function\"==typeof require&&require,a=0;ae;++e)c[e]=t[e],l[t.charCodeAt(e)]=e;l[\"-\".charCodeAt(0)]=62,l[\"_\".charCodeAt(0)]=63}function o(t){var e,n,r,o,i,a,s=t.length;if(s%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");i=\"=\"===t[s-2]?2:\"=\"===t[s-1]?1:0,a=new u(3*s/4-i),r=i>0?s-4:s;var c=0;for(e=0,n=0;r>e;e+=4,n+=3)o=l[t.charCodeAt(e)]<<18|l[t.charCodeAt(e+1)]<<12|l[t.charCodeAt(e+2)]<<6|l[t.charCodeAt(e+3)],a[c++]=o>>16&255,a[c++]=o>>8&255,a[c++]=255&o;return 2===i?(o=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,a[c++]=255&o):1===i&&(o=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,a[c++]=o>>8&255,a[c++]=255&o),a}function i(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function a(t,e,n){for(var r,o=[],a=e;n>a;a+=3)r=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(i(r));return o.join(\"\")}function s(t){for(var e,n=t.length,r=n%3,o=\"\",i=[],s=16383,l=0,u=n-r;u>l;l+=s)i.push(a(t,l,l+s>u?u:l+s));return 1===r?(e=t[n-1],o+=c[e>>2],o+=c[e<<4&63],o+=\"==\"):2===r&&(e=(t[n-2]<<8)+t[n-1],o+=c[e>>10],o+=c[e>>4&63],o+=c[e<<2&63],o+=\"=\"),i.push(o),i.join(\"\")}n.toByteArray=o,n.fromByteArray=s;var c=[],l=[],u=\"undefined\"!=typeof Uint8Array?Uint8Array:Array;r()},{}],2:[function(t,e,n){(function(e){/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\"use strict\";function r(){try{var t=new Uint8Array(1);return t.foo=function(){return 42},42===t.foo()&&\"function\"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(o()=e?i(t,e):void 0!==n?\"string\"==typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function u(t,e){if(c(e),t=i(t,0>e?0:0|m(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function f(t,e,n){if(\"string\"==typeof n&&\"\"!==n||(n=\"utf8\"),!a.isEncoding(n))throw new TypeError('\"encoding\" must be a valid string encoding');var r=0|b(e,n);return t=i(t,r),t.write(e,n),t}function p(t,e){var n=0|m(e.length);t=i(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function d(t,e,n,r){if(e.byteLength,0>n||e.byteLength=o())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+o().toString(16)+\" bytes\");return 0|t}function g(t){return+t!=t&&(t=0),a.alloc(+t)}function b(t,e){if(a.isBuffer(t))return t.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;\"string\"!=typeof t&&(t=\"\"+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case\"ascii\":case\"binary\":case\"raw\":case\"raws\":return n;case\"utf8\":case\"utf-8\":case void 0:return V(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return q(t).length;default:if(r)return V(t).length;e=(\"\"+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return\"\";if(n>>>=0,e>>>=0,e>=n)return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return D(this,e,n);case\"utf8\":case\"utf-8\":return O(this,e,n);case\"ascii\":return j(this,e,n);case\"binary\":return B(this,e,n);case\"base64\":return R(this,e,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return N(this,e,n);default:if(r)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function A(t,e,n,r){function o(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}var i=1,a=t.length,s=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),\"ucs2\"===r||\"ucs-2\"===r||\"utf16le\"===r||\"utf-16le\"===r)){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,n/=2}for(var c=-1,l=0;a>n+l;l++)if(o(t,n+l)===o(e,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===s)return(n+c)*i}else-1!==c&&(l-=l-c),c=-1;return-1}function w(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=e.length;if(i%2!==0)throw new Error(\"Invalid hex string\");r>i/2&&(r=i/2);for(var a=0;r>a;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function x(t,e,n,r){return J(V(e,t.length-n),t,n,r)}function k(t,e,n,r){return J(W(e),t,n,r)}function M(t,e,n,r){return k(t,e,n,r)}function T(t,e,n,r){return J(q(e),t,n,r)}function P(t,e,n,r){return J(Z(e,t.length-n),t,n,r)}function R(t,e,n){return 0===e&&n===t.length?H.fromByteArray(t):H.fromByteArray(t.slice(e,n))}function O(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;n>o;){var i=t[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(n>=o+s){var c,l,u,f;switch(s){case 1:128>i&&(a=i);break;case 2:c=t[o+1],128===(192&c)&&(f=(31&i)<<6|63&c,f>127&&(a=f));break;case 3:c=t[o+1],l=t[o+2],128===(192&c)&&128===(192&l)&&(f=(15&i)<<12|(63&c)<<6|63&l,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:c=t[o+1],l=t[o+2],u=t[o+3],128===(192&c)&&128===(192&l)&&128===(192&u)&&(f=(15&i)<<18|(63&c)<<12|(63&l)<<6|63&u,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return E(r)}function E(t){var e=t.length;if(_>=e)return String.fromCharCode.apply(String,t);for(var n=\"\",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=_));return n}function j(t,e,n){var r=\"\";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(127&t[o]);return r}function B(t,e,n){var r=\"\";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(t[o]);return r}function D(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var o=\"\",i=e;n>i;i++)o+=X(t[i]);return o}function N(t,e,n){for(var r=t.slice(e,n),o=\"\",i=0;it)throw new RangeError(\"offset is not uint\");if(t+e>n)throw new RangeError(\"Trying to access beyond buffer length\")}function Y(t,e,n,r,o,i){if(!a.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>o||i>e)throw new RangeError('\"value\" argument is out of bounds');if(n+r>t.length)throw new RangeError(\"Index out of range\")}function F(t,e,n,r){0>e&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);i>o;o++)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function z(t,e,n,r){0>e&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);i>o;o++)t[n+o]=e>>>8*(r?o:3-o)&255}function L(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError(\"Index out of range\");if(0>n)throw new RangeError(\"Index out of range\")}function I(t,e,n,r,o){return o||L(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(t,e,n,r,23,4),n+4}function K(t,e,n,r,o){return o||L(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(t,e,n,r,52,8),n+8}function G(t){if(t=C(t).replace(tt,\"\"),t.length<2)return\"\";for(;t.length%4!==0;)t+=\"=\";return t}function C(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")}function X(t){return 16>t?\"0\"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var n,r=t.length,o=null,i=[],a=0;r>a;a++){if(n=t.charCodeAt(a),n>55295&&57344>n){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((e-=1)<0)break;i.push(n)}else if(2048>n){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error(\"Invalid code point\");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function W(t){for(var e=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function q(t){return H.toByteArray(G(t))}function J(t,e,n,r){for(var o=0;r>o&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function U(t){return t!==t}var H=t(\"base64-js\"),Q=t(\"ieee754\"),$=t(\"isarray\");n.Buffer=a,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=o(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return s(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return l(null,t,e,n)},a.allocUnsafe=function(t){return u(null,t)},a.allocUnsafeSlow=function(t){return u(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError(\"Arguments must be Buffers\");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);i>o;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return r>n?-1:n>r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"raw\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},a.concat=function(t,e){if(!$(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===e)for(e=0,n=0;ne;e+=2)v(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var e=0;t>e;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?\"\":0===arguments.length?O(this,0,t):y.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t?!0:0===a.compare(this,t)},a.prototype.inspect=function(){var t=\"\",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString(\"hex\",0,e).match(/.{2}/g).join(\" \"),this.length>e&&(t+=\" ... \")),\"\"},a.prototype.compare=function(t,e,n,r,o){if(!a.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),0>e||n>t.length||0>r||o>this.length)throw new RangeError(\"out of range index\");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===t)return 0;for(var i=o-r,s=n-e,c=Math.min(i,s),l=this.slice(r,o),u=t.slice(e,n),f=0;c>f;++f)if(l[f]!==u[f]){i=l[f],s=u[f];break}return s>i?-1:i>s?1:0},a.prototype.indexOf=function(t,e,n){if(\"string\"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),\"string\"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:A(this,t,e,n);if(\"number\"==typeof t)return a.TYPED_ARRAY_SUPPORT&&\"function\"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):A(this,[t],e,n);throw new TypeError(\"val must be string, number or Buffer\")},a.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},a.prototype.write=function(t,e,n,r){if(void 0===e)r=\"utf8\",n=this.length,e=0;else if(void 0===n&&\"string\"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r=\"utf8\")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");r||(r=\"utf8\");for(var i=!1;;)switch(r){case\"hex\":return w(this,t,e,n);case\"utf8\":case\"utf-8\":return x(this,t,e,n);case\"ascii\":return k(this,t,e,n);case\"binary\":return M(this,t,e,n);case\"base64\":return T(this,t,e,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return P(this,t,e,n);default:if(i)throw new TypeError(\"Unknown encoding: \"+r);r=(\"\"+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;a.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=a.prototype;else{var o=e-t;r=new a(o,void 0);for(var i=0;o>i;i++)r[i]=this[i+t]}return r},a.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||S(t,e,this.length);for(var r=this[t],o=1,i=0;++i0&&(o*=256);)r+=this[t+--e]*o;return r},a.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||S(t,e,this.length);for(var r=this[t],o=1,i=0;++i=o&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||S(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),Q.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),Q.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),Q.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),Q.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e=0|e,n=0|n,!r){var o=Math.pow(2,8*n)-1;Y(this,t,e,n,o,0)}var i=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+i]=t/a&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):z(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);Y(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++it&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},a.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);Y(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)0>t&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):z(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||Y(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return I(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return I(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return K(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return K(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError(\"targetStart out of bounds\");if(0>n||n>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(0>r)throw new RangeError(\"sourceEnd out of bounds\");r>this.length&&(r=this.length),t.length-en&&r>e)for(o=i-1;o>=0;o--)t[o+e]=this[o+n];else if(1e3>i||!a.TYPED_ARRAY_SUPPORT)for(o=0;i>o;o++)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},a.prototype.fill=function(t,e,n,r){if(\"string\"==typeof t){if(\"string\"==typeof e?(r=e,e=0,n=this.length):\"string\"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);256>o&&(t=o)}if(void 0!==r&&\"string\"!=typeof r)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof r&&!a.isEncoding(r))throw new TypeError(\"Unknown encoding: \"+r)}else\"number\"==typeof t&&(t=255&t);if(0>e||this.length=n)return this;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var i;if(\"number\"==typeof t)for(i=e;n>i;i++)this[i]=t;else{var s=a.isBuffer(t)?t:V(new a(t,r).toString()),c=s.length;for(i=0;n-e>i;i++)this[i+e]=s[i%c]}return this};var tt=/[^+\\/0-9A-Za-z-_]/g}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"base64-js\":1,ieee754:4,isarray:5}],3:[function(e,n,r){(function(e){/*!\n * @license deepcopy.js Copyright(c) 2013 sasa+1\n * https://github.com/sasaplus1/deepcopy.js\n * Released under the MIT license.\n */\n!function(e,o){\"object\"==typeof r&&\"object\"==typeof n?n.exports=o():\"function\"==typeof t&&t.amd?t([],o):\"object\"==typeof r?r.deepcopy=o():e.deepcopy=o()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p=\"\",e(0)}([function(t,e,n){\"use strict\";t.exports=n(3)},function(t,n){\"use strict\";function r(t,e){if(\"[object Array]\"!==o.call(t))throw new TypeError(\"array must be an Array\");var n=void 0,r=void 0,i=void 0;for(n=0,r=t.length;r>n;++n)if(i=t[n],i===e||i!==i&&e!==e)return n;return-1}n.__esModule=!0;var o=Object.prototype.toString,i=\"undefined\"!=typeof e?function(t){return e.isBuffer(t)}:function(){return!1},a=Object.keys?function(t){return Object.keys(t)}:function(t){var e=typeof t;if(null===t||\"function\"!==e||\"object\"!==e)throw new TypeError(\"obj must be an Object\");var n=[],r=void 0;for(r in t)t.hasOwnProperty(r)&&n.push(r);return n},s=\"function\"==typeof Symbol?function(t){return Object.getOwnPropertySymbols(t)}:function(){return[]};n[\"default\"]={getKeys:a,getSymbols:s,indexOf:r,isBuffer:i},t.exports=n[\"default\"]},function(t,n,r){\"use strict\";function o(t,e){var n=a(t);return null!==n?a(t):i(t,e)}function i(t,n){if(\"function\"!=typeof n)throw new TypeError(\"customizer is must be a Function\");if(\"function\"==typeof t){var r=String(t);return/^\\s*function\\s*\\S*\\([^\\)]*\\)\\s*{\\s*\\[native code\\]\\s*}/.test(r)?t:new Function(\"return \"+r)()}var o=c.call(t);if(\"[object Array]\"===o)return[];if(\"[object Object]\"===o&&t.constructor===Object)return{};if(\"[object Date]\"===o)return new Date(+t);if(\"[object RegExp]\"===o){var i=String(t),a=i.lastIndexOf(\"/\");return new RegExp(i.slice(1,a),i.slice(a+1))}if(s.isBuffer(t)){var l=new e(t.length);return t.copy(l),l}var u=n(t);return void 0!==u?u:null}function a(t){var e=typeof t;return null!==t&&\"object\"!==e&&\"function\"!==e?t:null}n.__esModule=!0;var s=r(1),c=Object.prototype.toString;n[\"default\"]={copy:o,copyCollection:i,copyValue:a},t.exports=n[\"default\"]},function(t,e,n){\"use strict\";function r(t){}function o(t){var e=arguments.length<=1||void 0===arguments[1]?r:arguments[1];if(null===t)return null;var n=a.copyValue(t);if(null!==n)return n;var o=a.copyCollection(t,e),s=null!==o?o:t,c=[t],l=[s];return i(t,e,s,c,l)}function i(t,e,n,r,o){if(null===t)return null;var c=a.copyValue(t);if(null!==c)return c;var l=s.getKeys(t).concat(s.getSymbols(t)),u=void 0,f=void 0,p=void 0,d=void 0,h=void 0,m=void 0,g=void 0,b=void 0;for(u=0,f=l.length;f>u;++u)p=l[u],d=t[p],h=s.indexOf(r,d),-1===h?(m=a.copy(d,e),g=null!==m?m:d,null!==d&&/^(?:function|object)$/.test(typeof d)&&(r.push(d),o.push(g))):b=o[h],n[p]=b||i(d,e,g,r,o);return n}e.__esModule=!0;var a=n(2),s=n(1);e[\"default\"]=o,t.exports=e[\"default\"]}])})}).call(this,e(\"buffer\").Buffer)},{buffer:2}],4:[function(t,e,n){n.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,u=-7,f=n?o-1:0,p=n?-1:1,d=t[e+f];for(f+=p,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+t[e+f],f+=p,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+t[e+f],f+=p,u-=8);if(0===i)i=1-l;else{if(i===c)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),i-=l}return(d?-1:1)*a*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var a,s,c,l=8*i-o-1,u=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),e+=a+f>=1?p/c:p*Math.pow(2,1-f),e*c>=2&&(a++,c/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(e*c-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;t[n+d]=255&a,d+=h,a/=256,l-=8);t[n+d-h]|=128*m}},{}],5:[function(t,e,n){var r={}.toString;e.exports=Array.isArray||function(t){return\"[object Array]\"==r.call(t)}},{}],6:[function(t,e,n){function r(t){return/^[a-z_$][0-9a-z_$]*$/gi.test(t)&&!i.test(t)}function o(t){if(a)return t.toString();var e=t.source.replace(/\\//g,function(t,e,n){return 0===e||\"\\\\\"!==n[e-1]?\"\\\\/\":\"/\"}),n=(t.global&&\"g\"||\"\")+(t.ignoreCase&&\"i\"||\"\")+(t.multiline&&\"m\"||\"\");return\"/\"+e+\"/\"+n}/* toSource by Marcello Bastea-Forte - zlib license */\ne.exports=function(t,e,n,i){function a(t,e,n,i,s){function c(t){return n.slice(1)+t.join(\",\"+(n&&\"\\n\")+l)+(n?\" \":\"\")}var l=i+n;switch(t=e?e(t):t,typeof t){case\"string\":return JSON.stringify(t);case\"boolean\":case\"number\":case\"undefined\":return\"\"+t;case\"function\":return t.toString()}if(null===t)return\"null\";if(t instanceof RegExp)return o(t);if(t instanceof Date)return\"new Date(\"+t.getTime()+\")\";var u=s.indexOf(t)+1;if(u>0)return\"{$circularReference:\"+u+\"}\";if(s.push(t),Array.isArray(t))return\"[\"+c(t.map(function(t){return a(t,e,n,l,s.slice())}))+\"]\";var f=Object.keys(t);return f.length?\"{\"+c(f.map(function(o){return(r(o)?o:JSON.stringify(o))+\":\"+a(t[o],e,n,l,s.slice())}))+\"}\":\"{}\"}var s=[];return a(t,e,void 0===n?\" \":n||\"\",i||\"\",s)};var i=/^(abstract|boolean|break|byte|case|catch|char|class|const|continue|debugger|default|delete|do|double|else|enum|export|extends|false|final|finally|float|for|function|goto|if|implements|import|in|instanceof|int|interface|long|native|new|null|package|private|protected|public|return|short|static|super|switch|synchronized|this|throw|throws|transient|true|try|typeof|undefined|var|void|volatile|while|with)$/,a=\"\\\\/\"===new RegExp(\"/\").source},{}],7:[function(t,e,n){e.exports={name:\"pebble-clay\",version:\"0.1.37\",description:\"Pebble Config Framework\",main:\"index.js\",scripts:{\"test-travis\":\"./node_modules/.bin/gulp && ./node_modules/.bin/karma start ./test/karma.conf.js --single-run --browsers chromeTravisCI && ./node_modules/.bin/eslint ./\",\"test-debug\":\"(export DEBUG=true && ./node_modules/.bin/gulp && ./node_modules/.bin/karma start ./test/karma.conf.js --no-single-run)\",test:\"./node_modules/.bin/gulp && ./node_modules/.bin/karma start ./test/karma.conf.js --single-run\",lint:\"./node_modules/.bin/eslint ./\",build:\"gulp\",dev:\"gulp dev\",\"pebble-clean\":\"rm -rf tmp src/js/index.js && pebble clean\",\"pebble-publish\":\"npm run pebble-clean && npm run build && pebble build && pebble package publish && npm run pebble-clean\",\"pebble-build\":\"npm run build && pebble build\"},repository:{type:\"git\",url:\"git+https://github.com/pebble/clay.git\"},keywords:[\"pebble\",\"config\",\"configuration\",\"pebble-package\"],author:\"Pebble Technology\",license:\"MIT\",bugs:{url:\"https://github.com/pebble/clay/issues\"},pebble:{projectType:\"package\",sdkVersion:\"3\",targetPlatforms:[\"aplite\",\"basalt\",\"chalk\",\"diorite\",\"emery\"],resources:{media:[]}},homepage:\"https://github.com/pebble/clay#readme\",devDependencies:{autoprefixer:\"^6.3.1\",bourbon:\"^4.2.6\",browserify:\"^13.0.0\",\"browserify-istanbul\":\"^0.2.1\",chai:\"^3.4.1\",deamdify:\"^0.2.0\",deepcopy:\"^0.6.1\",del:\"^2.0.2\",eslint:\"^1.5.1\",\"eslint-config-pebble\":\"^1.2.0\",\"eslint-plugin-standard\":\"^1.3.1\",gulp:\"^3.9.0\",\"gulp-autoprefixer\":\"^3.1.0\",\"gulp-htmlmin\":\"^1.3.0\",\"gulp-inline\":\"0.0.15\",\"gulp-insert\":\"^0.5.0\",\"gulp-sass\":\"^2.1.1\",\"gulp-sourcemaps\":\"^1.6.0\",\"gulp-uglify\":\"^1.5.2\",joi:\"^6.10.1\",karma:\"^0.13.19\",\"karma-browserify\":\"^5.0.1\",\"karma-chrome-launcher\":\"^0.2.2\",\"karma-coverage\":\"^0.5.3\",\"karma-mocha\":\"^0.2.1\",\"karma-mocha-reporter\":\"^1.1.5\",\"karma-source-map-support\":\"^1.1.0\",\"karma-threshold-reporter\":\"^0.1.15\",mocha:\"^2.3.4\",postcss:\"^5.0.14\",\"require-from-string\":\"^1.1.0\",sassify:\"^0.9.1\",sinon:\"^1.17.3\",stringify:\"^3.2.0\",through:\"^2.3.8\",tosource:\"^1.0.0\",\"vinyl-buffer\":\"^1.0.0\",\"vinyl-source-stream\":\"^1.1.0\",watchify:\"^3.7.0\"},dependencies:{}}},{}],8:[function(t,e,n){\"use strict\";e.exports={name:\"button\",template:t(\"../../templates/components/button.tpl\"),style:t(\"../../styles/clay/components/button.scss\"),manipulator:\"button\",defaults:{primary:!1,attributes:{},description:\"\"}}},{\"../../styles/clay/components/button.scss\":21,\"../../templates/components/button.tpl\":30}],9:[function(t,e,n){\"use strict\";e.exports={name:\"checkboxgroup\",template:t(\"../../templates/components/checkboxgroup.tpl\"),style:t(\"../../styles/clay/components/checkboxgroup.scss\"),manipulator:\"checkboxgroup\",defaults:{label:\"\",options:[],description:\"\",attributes:{}}}},{\"../../styles/clay/components/checkboxgroup.scss\":22,\"../../templates/components/checkboxgroup.tpl\":31}],10:[function(t,e,n){\"use strict\";e.exports={name:\"color\",template:t(\"../../templates/components/color.tpl\"),style:t(\"../../styles/clay/components/color.scss\"),manipulator:\"color\",defaults:{label:\"\",description:\"\"},initialize:function(t,e){function n(t){if(\"number\"==typeof t)t=t.toString(16);else if(!t)return\"transparent\";return t=r(t),\"#\"+(f?p[t]:t)}function r(t){for(t=t.toLowerCase();t.length<6;)t=\"0\"+t;return t}function o(t){switch(typeof t){case\"number\":return r(t.toString(16));case\"string\":return t.replace(/^#|^0x/,\"\");default:return t}}function i(t){return t.reduce(function(t,e){return t.concat(e)},[])}function a(t){t=t.replace(/^#|^0x/,\"\");var e=parseInt(t.slice(0,2),16)/255,n=parseInt(t.slice(2,4),16)/255,r=parseInt(t.slice(4),16)/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var o=(.4124*e+.3576*n+.1805*r)/.95047,i=(.2126*e+.7152*n+.0722*r)/1,a=(.0193*e+.1192*n+.9505*r)/1.08883;return o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*i-16,500*(o-i),200*(i-a)]}function s(t,e){var n=t[0]-e[0],r=t[1]-e[1],o=t[2]-e[2];return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}function c(){return!e.meta.activeWatchInfo||2===e.meta.activeWatchInfo.firmware.major||\"aplite\"===e.meta.activeWatchInfo.platform&&!u.config.allowGray?d.BLACK_WHITE:\"aplite\"===e.meta.activeWatchInfo.platform&&u.config.allowGray?d.GRAY:d.COLOR}var l=t.HTML,u=this;u.roundColorToLayout=function(t){var e=o(t);if(-1===m.indexOf(e)){var n=a(e),r=m.map(function(t){var e=a(o(t));return s(n,e)}),i=Math.min.apply(Math,r),c=r.indexOf(i);e=m[c]}return parseInt(e,16)};var f=u.config.sunlight!==!1,p={\"000000\":\"000000\",\"000055\":\"001e41\",\"0000aa\":\"004387\",\"0000ff\":\"0068ca\",\"005500\":\"2b4a2c\",\"005555\":\"27514f\",\"0055aa\":\"16638d\",\"0055ff\":\"007dce\",\"00aa00\":\"5e9860\",\"00aa55\":\"5c9b72\",\"00aaaa\":\"57a5a2\",\"00aaff\":\"4cb4db\",\"00ff00\":\"8ee391\",\"00ff55\":\"8ee69e\",\"00ffaa\":\"8aebc0\",\"00ffff\":\"84f5f1\",550000:\"4a161b\",550055:\"482748\",\"5500aa\":\"40488a\",\"5500ff\":\"2f6bcc\",555500:\"564e36\",555555:\"545454\",\"5555aa\":\"4f6790\",\"5555ff\":\"4180d0\",\"55aa00\":\"759a64\",\"55aa55\":\"759d76\",\"55aaaa\":\"71a6a4\",\"55aaff\":\"69b5dd\",\"55ff00\":\"9ee594\",\"55ff55\":\"9de7a0\",\"55ffaa\":\"9becc2\",\"55ffff\":\"95f6f2\",aa0000:\"99353f\",aa0055:\"983e5a\",aa00aa:\"955694\",aa00ff:\"8f74d2\",aa5500:\"9d5b4d\",aa5555:\"9d6064\",aa55aa:\"9a7099\",aa55ff:\"9587d5\",aaaa00:\"afa072\",aaaa55:\"aea382\",aaaaaa:\"ababab\",ffffff:\"ffffff\",aaaaff:\"a7bae2\",aaff00:\"c9e89d\",aaff55:\"c9eaa7\",aaffaa:\"c7f0c8\",aaffff:\"c3f9f7\",ff0000:\"e35462\",ff0055:\"e25874\",ff00aa:\"e16aa3\",ff00ff:\"de83dc\",ff5500:\"e66e6b\",ff5555:\"e6727c\",ff55aa:\"e37fa7\",ff55ff:\"e194df\",ffaa00:\"f1aa86\",ffaa55:\"f1ad93\",ffaaaa:\"efb5b8\",ffaaff:\"ecc3eb\",ffff00:\"ffeeab\",ffff55:\"fff1b5\",ffffaa:\"fff6d3\"},d={COLOR:[[!1,!1,\"55ff00\",\"aaff55\",!1,\"ffff55\",\"ffffaa\",!1,!1],[!1,\"aaffaa\",\"55ff55\",\"00ff00\",\"aaff00\",\"ffff00\",\"ffaa55\",\"ffaaaa\",!1],[\"55ffaa\",\"00ff55\",\"00aa00\",\"55aa00\",\"aaaa55\",\"aaaa00\",\"ffaa00\",\"ff5500\",\"ff5555\"],[\"aaffff\",\"00ffaa\",\"00aa55\",\"55aa55\",\"005500\",\"555500\",\"aa5500\",\"ff0000\",\"ff0055\"],[!1,\"55aaaa\",\"00aaaa\",\"005555\",\"ffffff\",\"000000\",\"aa5555\",\"aa0000\",!1],[\"55ffff\",\"00ffff\",\"00aaff\",\"0055aa\",\"aaaaaa\",\"555555\",\"550000\",\"aa0055\",\"ff55aa\"],[\"55aaff\",\"0055ff\",\"0000ff\",\"0000aa\",\"000055\",\"550055\",\"aa00aa\",\"ff00aa\",\"ffaaff\"],[!1,\"5555aa\",\"5555ff\",\"5500ff\",\"5500aa\",\"aa00ff\",\"ff00ff\",\"ff55ff\",!1],[!1,!1,!1,\"aaaaff\",\"aa55ff\",\"aa55aa\",!1,!1,!1]],GRAY:[[\"000000\",\"aaaaaa\",\"ffffff\"]],BLACK_WHITE:[[\"000000\",\"ffffff\"]]},h=u.config.layout||c();\"string\"==typeof h&&(h=d[h]),Array.isArray(h[0])||(h=[h]);var m=i(h).map(function(t){return o(t)}).filter(function(t){return t}),g=\"\",b=h.length,y=0;h.forEach(function(t){y=t.length>y?t.length:y});for(var v=100/y,A=100/b,w=u.$element,x=0;b>x;x++)for(var k=0;y>k;k++){var M=o(h[x][k]),T=M?\" selectable\":\"\",P=0===x&&0===k||0===x&&!h[x][k-1]||!h[x][k-1]&&!h[x-1][k]?\" rounded-tl\":\"\",R=0===x&&!h[x][k+1]||!h[x][k+1]&&!h[x-1][k]?\" rounded-tr \":\"\",O=x===h.length-1&&0===k||x===h.length-1&&!h[x][k-1]||!h[x][k-1]&&!h[x+1][k]?\" rounded-bl\":\"\",E=x===h.length-1&&!h[x][k+1]||!h[x][k+1]&&!h[x+1][k]?\" rounded-br\":\"\";g+=''}var j=0;3===y&&(j=5),2===y&&(j=8);var B=j*v/A+\"%\",D=j+\"%\";w.select(\".color-box-container\").add(l(g)).set(\"$paddingTop\",B).set(\"$paddingRight\",D).set(\"$paddingBottom\",B).set(\"$paddingLeft\",D),w.select(\".color-box-wrap\").set(\"$paddingBottom\",v/A*100+\"%\");var N=w.select(\".value\"),S=w.select(\".picker-wrap\"),Y=u.$manipulatorTarget.get(\"disabled\");w.select(\"label\").on(\"click\",function(){Y||S.set(\"show\")}),u.on(\"change\",function(){var t=u.get();N.set(\"$background-color\",n(t)),w.select(\".color-box\").set(\"-selected\"),w.select('.color-box[data-value=\"'+t+'\"]').set(\"+selected\")}),w.select(\".color-box.selectable\").on(\"click\",function(t){u.set(parseInt(t.target.dataset.value,10)),S.set(\"-show\")}),S.on(\"click\",function(){S.set(\"-show\")}),u.on(\"disabled\",function(){Y=!0}),u.on(\"enabled\",function(){Y=!1}),u._layout=h}}},{\"../../styles/clay/components/color.scss\":23,\"../../templates/components/color.tpl\":32}],11:[function(t,e,n){\"use strict\";e.exports={name:\"footer\",template:t(\"../../templates/components/footer.tpl\"),manipulator:\"html\"}},{\"../../templates/components/footer.tpl\":33}],12:[function(t,e,n){\"use strict\";e.exports={name:\"heading\",template:t(\"../../templates/components/heading.tpl\"),manipulator:\"html\",defaults:{size:4}}},{\"../../templates/components/heading.tpl\":34}],13:[function(t,e,n){\"use strict\";e.exports={color:t(\"./color\"),footer:t(\"./footer\"),heading:t(\"./heading\"),input:t(\"./input\"),select:t(\"./select\"),submit:t(\"./submit\"),text:t(\"./text\"),toggle:t(\"./toggle\"),radiogroup:t(\"./radiogroup\"),checkboxgroup:t(\"./checkboxgroup\"),button:t(\"./button\"),slider:t(\"./slider\")}},{\"./button\":8,\"./checkboxgroup\":9,\"./color\":10,\"./footer\":11,\"./heading\":12,\"./input\":14,\"./radiogroup\":15,\"./select\":16,\"./slider\":17,\"./submit\":18,\"./text\":19,\"./toggle\":20}],14:[function(t,e,n){\"use strict\";e.exports={name:\"input\",template:t(\"../../templates/components/input.tpl\"),style:t(\"../../styles/clay/components/input.scss\"),manipulator:\"val\",defaults:{label:\"\",description:\"\",attributes:{}}}},{\"../../styles/clay/components/input.scss\":24,\"../../templates/components/input.tpl\":35}],15:[function(t,e,n){\"use strict\";e.exports={name:\"radiogroup\",template:t(\"../../templates/components/radiogroup.tpl\"),style:t(\"../../styles/clay/components/radiogroup.scss\"),manipulator:\"radiogroup\",defaults:{label:\"\",options:[],description:\"\",attributes:{}}}},{\"../../styles/clay/components/radiogroup.scss\":25,\"../../templates/components/radiogroup.tpl\":36}],16:[function(t,e,n){\"use strict\";e.exports={name:\"select\",template:t(\"../../templates/components/select.tpl\"),style:t(\"../../styles/clay/components/select.scss\"),manipulator:\"val\",defaults:{label:\"\",options:[],description:\"\",attributes:{}},initialize:function(){function t(){var t=e.$manipulatorTarget.get(\"selectedIndex\"),r=e.$manipulatorTarget.select(\"option\"),o=r[t]&&r[t].innerHTML;n.set(\"innerHTML\",o)}var e=this,n=e.$element.select(\".value\");t(),e.on(\"change\",t)}}},{\"../../styles/clay/components/select.scss\":26,\"../../templates/components/select.tpl\":37}],17:[function(t,e,n){\"use strict\";e.exports={name:\"slider\",template:t(\"../../templates/components/slider.tpl\"),style:t(\"../../styles/clay/components/slider.scss\"),manipulator:\"slider\",defaults:{label:\"\",description:\"\",min:0,max:100,step:1,attributes:{}},initialize:function(){function t(){var t=e.get().toFixed(e.precision);n.set(\"value\",t),r.set(\"innerHTML\",t)}var e=this,n=e.$element.select(\".value\"),r=e.$element.select(\".value-pad\"),o=e.$manipulatorTarget,i=o.get(\"step\");i=i.toString(10).split(\".\")[1],e.precision=i?i.length:0,e.on(\"change\",t),o.on(\"|input\",t),t(),n.on(\"|input\",function(){r.set(\"innerHTML\",this.get(\"value\"))}),n.on(\"|change\",function(){e.set(this.get(\"value\")),t()})}}},{\"../../styles/clay/components/slider.scss\":27,\"../../templates/components/slider.tpl\":38}],18:[function(t,e,n){\"use strict\";e.exports={name:\"submit\",template:t(\"../../templates/components/submit.tpl\"),style:t(\"../../styles/clay/components/submit.scss\"),manipulator:\"button\",defaults:{attributes:{}}}},{\"../../styles/clay/components/submit.scss\":28,\"../../templates/components/submit.tpl\":39}],19:[function(t,e,n){\"use strict\";e.exports={name:\"text\",template:t(\"../../templates/components/text.tpl\"),manipulator:\"html\"}},{\"../../templates/components/text.tpl\":40}],20:[function(t,e,n){\"use strict\";e.exports={name:\"toggle\",template:t(\"../../templates/components/toggle.tpl\"),style:t(\"../../styles/clay/components/toggle.scss\"),manipulator:\"checked\",defaults:{label:\"\",description:\"\",attributes:{}}}},{\"../../styles/clay/components/toggle.scss\":29,\"../../templates/components/toggle.tpl\":41}],21:[function(t,e,n){e.exports=\".component-button { text-align: center; }\\n\\n.section .component-button { padding-bottom: 0; }\\n\\n.component-button .description { padding-left: 0; padding-right: 0; }\\n\"},{}],22:[function(t,e,n){e.exports=\".component-checkbox { display: block; }\\n\\n.section .component-checkbox { padding-right: 0.375rem; }\\n\\n.component-checkbox > .label { display: block; padding-bottom: 0.35rem; }\\n\\n.component-checkbox .checkbox-group { padding-bottom: 0.35rem; }\\n\\n.component-checkbox .checkbox-group label { padding: 0.35rem 0.375rem; }\\n\\n.component-checkbox .checkbox-group .label { font-size: 0.9em; }\\n\\n.component-checkbox .checkbox-group input { opacity: 0; position: absolute; }\\n\\n.component-checkbox .checkbox-group i { display: block; position: relative; border-radius: 0.25rem; width: 1.4rem; height: 1.4rem; border: 0.11765rem solid #767676; -webkit-flex-shrink: 0; flex-shrink: 0; }\\n\\n.component-checkbox .checkbox-group input:checked + i { border-color: #ff4700; background: #ff4700; }\\n\\n.component-checkbox .checkbox-group input:checked + i:after { content: ''; box-sizing: border-box; -webkit-transform: rotate(45deg); transform: rotate(45deg); position: absolute; left: 0.35rem; top: -0.05rem; display: block; width: 0.5rem; height: 1rem; border: 0 solid #ffffff; border-right-width: 0.11765rem; border-bottom-width: 0.11765rem; }\\n\\n.component-checkbox .description { padding-left: 0; padding-right: 0; }\\n\"},{}],23:[function(t,e,n){e.exports=\".section .component-color { padding: 0; }\\n\\n.component-color .value { width: 2.2652rem; height: 1.4rem; border-radius: 0.7rem; box-shadow: 0 0.1rem 0.1rem #2f2f2f; display: block; background: #000; }\\n\\n.component-color .picker-wrap { left: 0; top: 0; right: 0; bottom: 0; position: fixed; padding: 0.7rem 0.375rem; background: rgba(0, 0, 0, 0.65); opacity: 0; -webkit-transition: opacity 100ms ease-in 175ms; transition: opacity 100ms ease-in 175ms; pointer-events: none; z-index: 100; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; flex-direction: column; -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; align-items: center; }\\n\\n.component-color .picker-wrap .picker { padding: 0.7rem 0.75rem; background: #484848; box-shadow: 0 0.17647rem 0.88235rem rgba(0, 0, 0, 0.4); border-radius: 0.25rem; width: 100%; max-width: 26rem; overflow: auto; }\\n\\n.component-color .picker-wrap.show { -webkit-transition-delay: 0ms; transition-delay: 0ms; pointer-events: auto; opacity: 1; }\\n\\n.component-color .color-box-wrap { box-sizing: border-box; position: relative; height: 0; width: 100%; padding: 0 0 100% 0; }\\n\\n.component-color .color-box-wrap .color-box-container { position: absolute; height: 99.97%; width: 100%; left: 0; top: 0; }\\n\\n.component-color .color-box-wrap .color-box-container .color-box { float: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }\\n\\n.component-color .color-box-wrap .color-box-container .color-box.rounded-tl { border-top-left-radius: 0.25rem; }\\n\\n.component-color .color-box-wrap .color-box-container .color-box.rounded-tr { border-top-right-radius: 0.25rem; }\\n\\n.component-color .color-box-wrap .color-box-container .color-box.rounded-bl { border-bottom-left-radius: 0.25rem; }\\n\\n.component-color .color-box-wrap .color-box-container .color-box.rounded-br { border-bottom-right-radius: 0.25rem; }\\n\\n.component-color .color-box-wrap .color-box-container .color-box.selected { -webkit-transform: scale(1.1); transform: scale(1.1); border-radius: 0.25rem; box-shadow: #111 0 0 0.24rem; position: relative; z-index: 100; }\\n\"},{}],24:[function(t,e,n){e.exports=\".section .component-input { padding: 0; }\\n\\n.component-input label { display: block; }\\n\\n.component-input .label { padding-bottom: 0.7rem; }\\n\\n.component-input .input { position: relative; min-width: 100%; margin-top: 0.7rem; margin-left: 0; }\\n\\n.component-input input { display: block; width: 100%; background: #333333; border-radius: 0.25rem; padding: 0.35rem 0.375rem; border: none; vertical-align: baseline; color: #ffffff; font-size: inherit; -webkit-appearance: none; appearance: none; min-height: 2.1rem; }\\n\\n.component-input input::-webkit-input-placeholder { color: #858585; }\\n\\n.component-input input::-moz-placeholder { color: #858585; }\\n\\n.component-input input:-moz-placeholder { color: #858585; }\\n\\n.component-input input:-ms-input-placeholder { color: #858585; }\\n\\n.component-input input:focus { border: none; box-shadow: none; }\\n\\n.component-input input:focus::-webkit-input-placeholder { color: #666666; }\\n\\n.component-input input:focus::-moz-placeholder { color: #666666; }\\n\\n.component-input input:focus:-moz-placeholder { color: #666666; }\\n\\n.component-input input:focus:-ms-input-placeholder { color: #666666; }\\n\"},{}],25:[function(t,e,n){e.exports=\".component-radio { display: block; }\\n\\n.section .component-radio { padding-right: 0.375rem; }\\n\\n.component-radio > .label { display: block; padding-bottom: 0.35rem; }\\n\\n.component-radio .radio-group { padding-bottom: 0.35rem; }\\n\\n.component-radio .radio-group label { padding: 0.35rem 0.375rem; }\\n\\n.component-radio .radio-group .label { font-size: 0.9em; }\\n\\n.component-radio .radio-group input { opacity: 0; position: absolute; }\\n\\n.component-radio .radio-group i { display: block; position: relative; border-radius: 1.4rem; width: 1.4rem; height: 1.4rem; border: 2px solid #767676; -webkit-flex-shrink: 0; flex-shrink: 0; }\\n\\n.component-radio .radio-group input:checked + i { border-color: #ff4700; }\\n\\n.component-radio .radio-group input:checked + i:after { content: ''; display: block; position: absolute; left: 15%; right: 15%; top: 15%; bottom: 15%; border-radius: 1.4rem; background: #ff4700; }\\n\\n.component-radio .description { padding-left: 0; padding-right: 0; }\\n\"},{}],26:[function(t,e,n){e.exports='.section .component-select { padding: 0; }\\n\\n.component-select label { position: relative; }\\n\\n.component-select .value { position: relative; padding-right: 1.1rem; display: block; }\\n\\n.component-select .value:after { content: \"\"; position: absolute; right: 0; top: 50%; margin-top: -0.1rem; height: 0; width: 0; border-left: 0.425rem solid transparent; border-right: 0.425rem solid transparent; border-top: 0.425rem solid #ff4700; }\\n\\n.component-select select { opacity: 0; position: absolute; display: block; left: 0; right: 0; top: 0; bottom: 0; width: 100%; border: none; margin: 0; padding: 0; }\\n'},{}],27:[function(t,e,n){e.exports=\".section .component-slider { padding: 0; }\\n\\n.component-slider label { display: block; }\\n\\n.component-slider .label-container { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; width: 100%; padding-bottom: 0.7rem; }\\n\\n.component-slider .label { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 1rem; display: block; padding-right: 0.75rem; }\\n\\n.component-slider .value-wrap { display: block; position: relative; }\\n\\n.component-slider .value, .component-slider .value-pad { display: block; background: #333333; border-radius: 0.25rem; padding: 0.35rem 0.375rem; border: none; vertical-align: baseline; color: #ffffff; text-align: right; margin: 0; min-width: 1rem; }\\n\\n.component-slider .value-pad { visibility: hidden; }\\n\\n.component-slider .value-pad:before { content: ' '; display: inline-block; }\\n\\n.component-slider .value { max-width: 100%; position: absolute; left: 0; top: 0; }\\n\\n.component-slider .input-wrap { padding: 0 0.75rem 0.7rem; }\\n\\n.component-slider .input { display: block; position: relative; min-width: 100%; height: 1.4rem; overflow: hidden; margin-left: 0; }\\n\\n.component-slider .input:before { content: ''; display: block; position: absolute; height: 0.17647rem; background: #666666; width: 100%; top: 0.61176rem; }\\n\\n.component-slider .input .slider { display: block; width: 100%; -webkit-appearance: none; appearance: none; position: relative; height: 1.4rem; margin: 0; background-color: transparent; }\\n\\n.component-slider .input .slider:focus { outline: none; }\\n\\n.component-slider .input .slider::-webkit-slider-runnable-track { border: none; height: 1.4rem; width: 100%; background-color: transparent; }\\n\\n.component-slider .input .slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; position: relative; height: 1.4rem; width: 1.4rem; background-color: #ff4700; border-radius: 50%; }\\n\\n.component-slider .input .slider::-webkit-slider-thumb:before { content: \\\"\\\"; position: absolute; left: -1000px; top: 0.61176rem; height: 0.17647rem; width: 1001px; background: #ff4700; }\\n\"},{}],28:[function(t,e,n){e.exports=\".component-submit { text-align: center; }\\n\"},{}],29:[function(t,e,n){e.exports=\".section .component-toggle { padding: 0; }\\n\\n.component-toggle input { display: none; }\\n\\n.component-toggle .graphic { display: inline-block; position: relative; }\\n\\n.component-toggle .graphic .slide { display: block; border-radius: 1.05rem; height: 1.05rem; width: 2.2652rem; background: #2f2f2f; -webkit-transition: background-color 150ms linear; transition: background-color 150ms linear; }\\n\\n.component-toggle .graphic .marker { background: #ececec; width: 1.4rem; height: 1.4rem; border-radius: 1.4rem; position: absolute; left: 0; display: block; top: -0.175rem; -webkit-transition: -webkit-transform 150ms linear; transition: -webkit-transform 150ms linear; transition: transform 150ms linear; transition: transform 150ms linear, -webkit-transform 150ms linear; box-shadow: 0 0.1rem 0.1rem #2f2f2f; }\\n\\n.component-toggle input:checked + .graphic .slide { background: #993d19; }\\n\\n.component-toggle input:checked + .graphic .marker { background: #ff4700; -webkit-transform: translateX(0.8652rem); transform: translateX(0.8652rem); }\\n\"},{}],30:[function(t,e,n){e.exports='
\\n \\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n'},{}],31:[function(t,e,n){e.exports='
\\n {{{label}}}\\n
\\n {{each options}}\\n \\n {{/each}}\\n
\\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n'},{}],32:[function(t,e,n){e.exports='
\\n \\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n'},{}],33:[function(t,e,n){e.exports='
\\n'},{}],34:[function(t,e,n){e.exports='
\\n \\n
\\n'},{}],35:[function(t,e,n){e.exports='
\\n \\n\\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n'},{}],36:[function(t,e,n){e.exports='
\\n {{{label}}}\\n
\\n {{each options}}\\n \\n {{/each}}\\n
\\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n'},{}],37:[function(t,e,n){e.exports='
\\n \\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n'},{}],38:[function(t,e,n){e.exports='
\\n \\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n'},{}],39:[function(t,e,n){e.exports='
\\n \\n
\\n'},{}],40:[function(t,e,n){e.exports='
\\n

\\n
\\n'},{}],41:[function(t,e,n){e.exports='
\\n \\n {{if description}}\\n
{{{description}}}
\\n {{/if}}\\n
\\n'},{}],42:[function(t,e,n){e.exports='
';\n},{}],\"pebble-clay\":[function(t,e,n){\"use strict\";function r(t,e,n){function r(){i.meta={activeWatchInfo:Pebble.getActiveWatchInfo&&Pebble.getActiveWatchInfo(),accountToken:Pebble.getAccountToken(),watchToken:Pebble.getWatchToken(),userData:s(n.userData||{})}}function o(t){Array.isArray(t)?t.forEach(function(t){o(t)}):\"section\"===t.type?o(t.items):a[t.type]&&i.registerComponent(a[t.type])}var i=this;if(i.version=c,!Array.isArray(t))throw new Error(\"config must be an Array\");if(e&&\"function\"!=typeof e)throw new Error('customFn must be a function or \"null\"');n=n||{},i.config=s(t),i.customFn=e||function(){},i.components={},i.meta={activeWatchInfo:null,accountToken:\"\",watchToken:\"\",userData:{}},n.autoHandleEvents!==!1&&\"undefined\"!=typeof Pebble?(Pebble.addEventListener(\"showConfiguration\",function(){r(),Pebble.openURL(i.generateUrl())}),Pebble.addEventListener(\"webviewclosed\",function(t){t&&t.response&&Pebble.sendAppMessage(i.getSettings(t.response),function(){console.log(\"Sent config data to Pebble\")},function(t){console.log(\"Failed to send config data!\"),console.log(JSON.stringify(t))})})):\"undefined\"!=typeof Pebble&&Pebble.addEventListener(\"ready\",function(){r()}),o(i.config)}var o=t(\"./tmp/config-page.html\"),i=t(\"tosource\"),a=t(\"./src/scripts/components\"),s=t(\"deepcopy/build/deepcopy.min\"),c=t(\"./package.json\").version;r.prototype.registerComponent=function(t){this.components[t.name]=t},r.prototype.generateUrl=function(){var t={},e=!Pebble||\"pypkjs\"===Pebble.platform,n=e?\"$$$RETURN_TO$$$\":\"pebblejs://close#\";try{t=JSON.parse(localStorage.getItem(\"clay-settings\"))||{}}catch(a){console.error(a.toString())}var s=o.replace(\"$$RETURN_TO$$\",n).replace(\"$$CUSTOM_FN$$\",i(this.customFn)).replace(\"$$CONFIG$$\",i(this.config)).replace(\"$$SETTINGS$$\",i(t)).replace(\"$$COMPONENTS$$\",i(this.components)).replace(\"$$META$$\",i(this.meta));return e?r.encodeDataUri(s,\"http://clay.pebble.com.s3-website-us-west-2.amazonaws.com/#\"):r.encodeDataUri(s)},r.prototype.getSettings=function(t,e){var n={};try{n=JSON.parse(decodeURIComponent(t))}catch(o){throw new Error(\"The provided response was not valid JSON\")}var i={};return Object.keys(n).forEach(function(t){\"object\"==typeof n[t]&&n[t]?i[t]=n[t].value:i[t]=n[t]}),localStorage.setItem(\"clay-settings\",JSON.stringify(i)),e===!1?n:r.prepareSettingsForAppMessage(n)},r.encodeDataUri=function(t,e){return e=\"undefined\"!=typeof e?e:\"data:text/html;charset=utf-8,\",e+encodeURIComponent(t)},r.prepareForAppMessage=function(t){function e(t,e){return Math.floor(t*Math.pow(10,e||0))}var n;return Array.isArray(t)?(n=[],t.forEach(function(t){var e=r.prepareForAppMessage(t);n.push(e),\"string\"==typeof e&&n.push(0)})):n=\"object\"==typeof t&&t?\"number\"==typeof t.value?e(t.value,t.precision):Array.isArray(t.value)?t.value.map(function(n){return\"number\"==typeof n?e(n,t.precision):n}):r.prepareForAppMessage(t.value):\"boolean\"==typeof t?t?1:0:t,n},r.prepareSettingsForAppMessage=function(t){var e={};return Object.keys(t).forEach(function(n){e[n]=r.prepareForAppMessage(t[n])}),e},e.exports=r},{\"./package.json\":7,\"./src/scripts/components\":13,\"./tmp/config-page.html\":42,\"deepcopy/build/deepcopy.min\":3,tosource:6}]},{},[\"pebble-clay\"])(\"pebble-clay\")});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pebble-clay/dist/js/index.js\n// module id = 3\n// module chunks = 0","module.exports = function(module) {\n switch(module) {\n case \"message_keys\": return require(\"message_keys\");\n }\n throw new Error('Module not found: ' + module);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/louis/.pebble-sdk/SDKs/4.3/sdk-core/pebble/common/include/_message_key_wrapper.js\n// module id = 4\n// module chunks = 0","module.exports = {\"JSReady\":10005,\"auth\":10000,\"password\":10004,\"server\":10002,\"status\":10001,\"username\":10003}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./build/js/message_keys.json\n// module id = 5\n// module chunks = 0","module.exports = [\n { \n \"type\": \"heading\", \n \"defaultValue\": \"DSCam Home Swtich Configuration\" \n }, \n { \n \"type\": \"text\", \n \"defaultValue\": \"Set your Synology account and server.\" \n },\n {\n \"type\": \"section\",\n \"items\": \n [\n {\n \"type\": \"heading\",\n \"defaultValue\": \"Your synology account\"\n },\n {\n \"type\": \"input\",\n \"messageKey\": \"username\",\n \"label\": \"Your DSM Username\",\n \"attributes\" : \n {\n \"maxlength\":40\n }\n },\n {\n \"type\": \"input\",\n \"messageKey\": \"password\",\n \"label\": \"Your DSM Password\",\n \"attributes\" : \n {\n \"type\": \"password\",\n \"maxlength\":40\n }\n },\n {\n \"type\": \"input\",\n \"messageKey\": \"server\",\n \"label\": \"Your DSM Server\",\n \"attributes\" : \n {\n \"type\": \"url\",\n \"maxlength\":255\n }\n }\n ]\n },\n {\n \"type\": \"submit\",\n \"defaultValue\": \"Save Settings\"\n }\n];\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/pkjs/config.js\n// module id = 6\n// module chunks = 0"],"sourceRoot":""}PKZS %| aplite/pebble-app.binPBLAPPN t6DSCam Home-Switchljonget@gmail.comHvJ۞8!Vn$b@p2qxaGNUo'B-hDhF`GKI yD`"{D IKd yD["{D f KIyD V"{D| L 7 C FF JzD JzD L!|D+F F*K!F{Dh>h h  ԿI yD"l I yD^I yDYI yD@R3$F LJ|DzD"`8IKyD "{D#hIKd yD"{DKI{DhyDp I KyD "{DvT t ` @ FйJKzD{D`j8IKyD "{D K I{DhyD0 I KyD "{D6 A l ` FйJKzD{D`.8IKyD t"{D K I{DhyD I KyD z"{DM F h HpF F)F0"; 0"# 0! ` ho?H&hxDF0F hF(F hFhF` h>` hmF!p@FйJKzD{D` 8IKyD "{DKI{DhyDfIKyD "{Dl K I{DhyDP* L +,p IsbNbK~DF1F{D "C F]K^M{D`]K}DX FhGhZK"{DpXK 1FOr{D&UK FXh2FRN("~D10FkPK1F{DhNINK yDOr{DLILK yDOr{DIK FXh FFN("~D10FEDK1F{DhBIBK yDOr{D@I@K yDOr{D=K FXhF:N1~D("0F7I7K yDOr{D4K FXhF1N1~D("0F-I.K yD@){D*K FXhF'L1|D" F$I$K yDOr{D| &   * dTy gPf9-O@ FEHxDHDxDHxDHxDF!F0FN p;vJDzD` 3sKsM{D` +}D!h(`(hh! (h!(hbK  {D`F)FPFOs0(Fd)F FD?(F!F&p FO p FAF FF FDQFCIyDAJzDR;ph(F^8M9I}DyD(`u7H.hxDF0Ff!(hn(hSF F/L|D(h!! h f(KY0`Fe%I yD#I$KyDOr {DME(h K{Dh K{DhL h _="P^Pa|:Iֻ|IлIʻIĻI0ITIII(I8IDIdIhIlII|IvIp<Ij@IdLI^XIX|IRILIFI@I:I4I.I(I"IIII II8I<IDILIPI\Iں`IԺdIκIȺ0Iº4I@I IP main.cMessage send failed. Reason: %dMessage sent. Message dropped. Reason: %d%H:%M%I:%Mhome_offError sending the outbox: %dSending to the outbox: %sSent...Error preparing the outbox: %dhome_ongetRESOURCE_ID_GOTHIC_18_BOLDauthAuthenticating...New message! received jsready message on watch... Auth message received ... not auth message... status message received ... not status message... new username in settings... %snew password in settings... %snew server in settings... %sWelcome to Syno Cam Switch !RESOURCE_ID_GOTHIC_24_BOLDJust pushed a window!'''''' PKWQS4YJJaplite/app_resources.pbpackb@prDUrDVD>VaD>??>~>>|0 0p0000000??0 0pÀ34 120000??PKZSW:jjaplite/manifest.json{"manifestVersion": 2, "generatedBy": "rebble-dev", "generatedAt": 1635283251, "application": {"timestamp": 1635283250, "sdk_version": {"major": 5, "minor": 78}, "crc": 2924482493, "name": "pebble-app.bin", "size": 3576}, "debug": {}, "type": "application", "resources": {"timestamp": 1635283250, "crc": 2818326884, "name": "app_resources.pbpack", "size": 4426}}PKZS{ appinfo.jsonPKZS  pebble-js-app.jsPKZSc~g~gpebble-js-app.js.mapPKZS %| aplite/pebble-app.binPKWQS4YJJaplite/app_resources.pbpackPKZSW:jjwaplite/manifest.jsonPK