diff --git a/assets/huegasm-02594633d1114c7082201f28b31905db.js b/assets/huegasm-e3b67a968eba396613611d5b476ab1bb.js similarity index 98% rename from assets/huegasm-02594633d1114c7082201f28b31905db.js rename to assets/huegasm-e3b67a968eba396613611d5b476ab1bb.js index 76d008f..d26932e 100644 --- a/assets/huegasm-02594633d1114c7082201f28b31905db.js +++ b/assets/huegasm-e3b67a968eba396613611d5b476ab1bb.js @@ -160,7 +160,7 @@ this.set("strobeOnInervalHandle",setInterval(this.strobeStep.bind(this),500))}el for(var c in t)t.hasOwnProperty(c)&&a(this,r,c,2e3) a(this,this.onColorLoopOnChange,2e3),clearInterval(this.get("strobeOnInervalHandle"))}this.set("pauseLightUpdates",n)}),strobeStep:function(){var e=this.get("nextLightIdx")%this.get("activeLights").length,t=this.get("activeLights")[e],n={on:!0,transitiontime:0,alert:"select"} this.get("colorLoopOn")&&(n.hue=Math.floor(65535*Math.random())),l.ajax(this.get("apiURL")+"/lights/"+t+"/state",{data:JSON.stringify(n),contentType:"application/json",type:"PUT"}),l.ajax(this.get("apiURL")+"/lights/"+t+"/state",{data:JSON.stringify({on:!1,transitiontime:0}),contentType:"application/json",type:"PUT"}),this.set("nextLightIdx",++e)},strobeOnTxt:o("strobeOn",function(){return this.get("strobeOn")?"On":"Off"}),dimmerOnClass:o("dimmerOn",function(){return this.get("dimmerOn")?"dimmerOn":null}),actions:{toggleDimmer:function(){this.sendAction("toggleDimmer")},randomizeHues:function(){var e=this -l(".dice").velocity({scale:1.1},100).velocity({scale:1},100),this.get("activeLights").forEach(function(t){var n={hue:Math.floor(65535*Math.random())} +l(".dice").velocity({scale:1.1},100).velocity({scale:1},100),this.get("activeLights").forEach(function(t){var n={hue:Math.floor(65535*Math.random()),sat:254} !1===e.get("lightsData")[t].state.on&&(n.on=!0),l.ajax(e.get("apiURL")+"/lights/"+t+"/state",{data:JSON.stringify(n),contentType:"application/json",type:"PUT"})}),a(function(){e.onActiveLightsChange()},1e3)}}})}),define("huegasm/pods/components/lights-tab/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"r7PTII4M",block:'{"symbols":["menu","content"],"statements":[[4,"paper-list",null,null,{"statements":[[4,"paper-item",null,null,{"statements":[[0," "],[1,[25,"paper-icon",["power-settings-new"],[["class"],[[20,["dimmerOnClass"]]]]],false],[0,"\\n "],[6,"p"],[9,"data-toggle","tooltip"],[9,"data-placement","top auto"],[9,"class","bootstrap-tooltip lights-control-tooltip"],[9,"data-title","Turn the selected lights on/off"],[7],[0,"Power"],[8],[0,"\\n "],[1,[25,"paper-switch",null,[["value","onChange","disabled","skipProxy","label"],[[20,["lightsOn"]],[25,"action",[[19,0,[]],[25,"mut",[[20,["lightsOn"]]],null]],null],[25,"or",[[20,["trial"]],[20,["playing"]],[20,["lightsOnDisabled"]]],null],[20,["trial"]],[20,["lightsOnTxt"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[4,"paper-item",null,null,{"statements":[[0," "],[1,[25,"paper-icon",["brightness-4"],[["class"],[[20,["dimmerOnClass"]]]]],false],[0,"\\n "],[6,"p"],[9,"data-toggle","tooltip"],[9,"data-placement","top auto"],[9,"class","layout flex-60 bootstrap-tooltip lights-control-tooltip"],[9,"data-title","The brightness level of the selected lights"],[7],[0,"Brightness"],[8],[0,"\\n "],[1,[25,"paper-slider",null,[["class","step","min","max","value","onChange","disabled"],["flex",10,1,254,[20,["lightsBrightness"]],[25,"action",[[19,0,[]],[25,"mut",[[20,["lightsBrightness"]]],null]],null],[20,["brightnessControlDisabled"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[4,"paper-item",null,[["elementId"],["color-row"]],{"statements":[[0," "],[1,[25,"paper-icon",["color-lens"],[["class"],[[20,["dimmerOnClass"]]]]],false],[0,"\\n "],[6,"p"],[9,"data-toggle","tooltip"],[9,"data-placement","top auto"],[9,"class","bootstrap-tooltip lights-control-tooltip"],[9,"data-title","The color of the selected lights"],[7],[0,"Color"],[8],[0,"\\n\\n"],[4,"paper-menu",null,[["offset"],["0 -50"]],{"statements":[[4,"component",[[19,1,["trigger"]]],null,{"statements":[[4,"paper-button",null,[["iconButton"],[false]],{"statements":[[0," "],[1,[25,"paper-button",null,[["raised","class","disabled"],[true,"color",[25,"or",[[20,["trial"]],[20,["playing"]]],null]]]],false],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null],[4,"component",[[19,1,["content"]]],[["class","width"],["color-content",0]],{"statements":[[4,"component",[[19,2,["menu-item"]]],null,{"statements":[[0," "],[1,[25,"lights-tab/color-picker",null,[["lightsData","activeLights","rgb"],[[20,["lightsData"]],[20,["activeLights"]],[20,["rgb"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"parameters":[2]},null]],"parameters":[1]},null]],"parameters":[]},null],[0,"\\n"],[4,"paper-item",null,null,{"statements":[[0," "],[1,[25,"paper-icon",["flare"],[["class"],[[20,["dimmerOnClass"]]]]],false],[0,"\\n "],[6,"p"],[9,"data-toggle","tooltip"],[9,"data-placement","top auto"],[9,"class","bootstrap-tooltip lights-control-tooltip"],[9,"data-title","Selected lights will flash in sequential order"],[7],[0,"Strobe"],[8],[0,"\\n "],[1,[25,"paper-switch",null,[["value","onChange","disabled","skipProxy","label"],[[20,["strobeOn"]],[25,"action",[[19,0,[]],[25,"mut",[[20,["strobeOn"]]],null]],null],[25,"or",[[20,["trial"]],[20,["playing"]]],null],[20,["trial"]],[20,["strobeOnTxt"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[4,"paper-item",null,null,{"statements":[[0," "],[1,[25,"paper-icon",["color-lens"],[["class"],[[20,["dimmerOnClass"]]]]],false],[0," "],[1,[25,"paper-icon",["loop"],[["id","class"],["loop-addition",[20,["dimmerOnClass"]]]]],false],[0,"\\n "],[6,"p"],[9,"data-toggle","tooltip"],[9,"data-placement","top auto"],[9,"class","bootstrap-tooltip lights-control-tooltip"],[9,"data-title","Selected lights will slowly cycle through all the colors"],[7],[0,"Colorloop"],[8],[0,"\\n "],[1,[25,"paper-switch",null,[["value","onChange","disabled","skipProxy","label"],[[20,["colorLoopOn"]],[25,"action",[[19,0,[]],[25,"mut",[[20,["colorLoopOn"]]],null]],null],[25,"or",[[20,["trial"]],[20,["playing"]]],null],[20,["trial"]],[20,["colorloopOnTxt"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[4,"paper-item",null,null,{"statements":[[0," "],[1,[25,"paper-icon",["shuffle"],[["class"],[[20,["dimmerOnClass"]]]]],false],[0,"\\n "],[6,"p"],[9,"data-toggle","tooltip"],[9,"data-placement","top auto"],[9,"class","bootstrap-tooltip lights-control-tooltip"],[9,"data-title","Randomize the hues (colors) of your selected lights."],[7],[0,"Randomize Hues"],[8],[0,"\\n\\n "],[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 512 512"],[9,"class","dice"],[3,"action",[[19,0,[]],"randomizeHues"]],[7],[0,"\\n "],[6,"path"],[9,"d","M0 0h512v512H0z"],[9,"fill","none"],[7],[8],[0,"\\n "],[6,"g"],[9,"transform","translate(0,0)"],[9,"style","touch-action: none;"],[7],[0,"\\n "],[6,"path"],[9,"fill","rgba(82, 67, 67, 0.9)"],[9,"d","M255.76 44.764c-6.176 0-12.353 1.384-17.137 4.152L85.87 137.276c-9.57 5.536-9.57 14.29 0 19.826l152.753 88.36c9.57 5.536 24.703 5.536 34.272 0l152.753-88.36c9.57-5.535 9.57-14.29 0-19.825l-152.753-88.36c-4.785-2.77-10.96-4.153-17.135-4.153zm.926 82.855a31.953 18.96 0 0 1 22.127 32.362 31.953 18.96 0 1 1-45.188-26.812 31.953 18.96 0 0 1 23.06-5.55zM75.67 173.84c-5.753-.155-9.664 4.336-9.664 12.28v157.696c0 11.052 7.57 24.163 17.14 29.69l146.93 84.848c9.57 5.526 17.14 1.156 17.14-9.895V290.76c0-11.052-7.57-24.16-17.14-29.688l-146.93-84.847c-2.69-1.555-5.225-2.327-7.476-2.387zm360.773.002c-2.25.06-4.783.83-7.474 2.385l-146.935 84.847c-9.57 5.527-17.14 18.638-17.14 29.69v157.7c0 11.05 7.57 15.418 17.14 9.89L428.97 373.51c9.57-5.527 17.137-18.636 17.137-29.688v-157.7c0-7.942-3.91-12.432-9.664-12.278zM89.297 195.77a31.236 18.008 58.094 0 1 33.818 41.183 31.236 18.008 58.094 1 1-45-25.98 31.236 18.008 58.094 0 1 11.182-15.203zm221.52 64.664A18.008 31.236 31.906 0 1 322 275.637a18.008 31.236 31.906 0 1-45 25.98 18.008 31.236 31.906 0 1 33.818-41.183zM145.296 289.1a31.236 18.008 58.094 0 1 33.818 41.183 31.236 18.008 58.094 0 1-45-25.98 31.236 18.008 58.094 0 1 11.182-15.203zm277.523 29.38A18.008 31.236 31.906 0 1 434 333.684a18.008 31.236 31.906 0 1-45 25.98 18.008 31.236 31.906 0 1 33.818-41.184zm-221.52 64.663a31.236 18.008 58.094 0 1 33.817 41.183 31.236 18.008 58.094 1 1-45-25.98 31.236 18.008 58.094 0 1 11.182-15.203z"],[7],[8],[0,"\\n "],[8],[0,"\\n "],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"huegasm/pods/components/lights-tab/template.hbs"}})}),define("huegasm/pods/components/music-tab/add-soundcloud-sound-modal/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) var t=Ember.Component,n=Ember.observer,o=Ember.computed,s=Ember.isEmpty,i=Ember.isNone,a=Ember.run.later,r=Ember.$ e.default=t.extend({url:null,onIsShowingModalChange:n("isShowingModal",function(){this.get("isShowingModal")&&(this.set("url",null),a(function(){r("md-input-container input").focus()},500))}),saveDisabled:o("url",function(){return i(this.get("url"))||s(this.get("url").trim())}),didInsertElement:function(){var e=this @@ -178,7 +178,7 @@ a(n)?a(o)||(this.changePlayerControl("threshold",o.threshold),this.set("usingBea t.audio.pause&&t.pause(),e&&this.set("playQueuePointer",-1),this.setProperties({timeElapsed:0,timeTotal:0,playing:!1})},dragOver:function(){var e=this.get("dragLeaveTimeoutHandle") this.set("dragging",!0),e&&clearTimeout(e)},dragLeave:function(){var e=this this.set("dragLeaveTimeoutHandle",setTimeout(function(){e.set("dragging",!1)},500))},simulateKick:function(){var e=this,t=this.get("activeLights"),n=this.get("lightsData"),o=null,s=this.get("flashingTransitions"),i=function(t,o,i,l){var c={bri:o,transitiontime:0} -s||(c.transitiontime=1),a(l)||(c.hue=l),e.get("blackoutMode")?(c.on=i,delete c[o]):!1===n[t].state.on&&(c.on=!0),r.ajax(e.get("apiURL")+"/lights/"+t+"/state",{data:JSON.stringify(c),contentType:"application/json",type:"PUT"})},l=100 +s||(c.transitiontime=1),a(l)||(c.hue=l,c.sat=254),e.get("blackoutMode")?(c.on=i,delete c[o]):!1===n[t].state.on&&(c.on=!0),r.ajax(e.get("apiURL")+"/lights/"+t+"/state",{data:JSON.stringify(c),contentType:"application/json",type:"PUT"})},l=100 if(t.length>0){var p=this.get("lastLightBopIndex"),u=void 0,d=this.get("brightnessRange"),h=void 0 if(u=Math.floor(Math.random()*t.length),t.length>1)for(;u===p;)u=Math.floor(Math.random()*t.length) if(h=t[u],this.set("lastLightBopIndex",u),!this.get("colorLoopOn")){var m=this.get("hueRange") @@ -210,7 +210,7 @@ if(s.audio&&this.clearCurrentAudio(!0),!a(i[e])){var l=new Audio l.src=this.get("playQueue")[e].url,l.crossOrigin="anonymous",l.oncanplay=function(){o.set("timeTotal",Math.floor(l.duration)),o.set("soundCloudFuckUps",0)},l.onerror=function(e){var t=o.get("playQueuePointer"),n=o.get("playQueue")[t] o.get("soundCloudFuckUps")>=o.get("maxSoundCloudFuckUps")?(o.get("notify").alert({html:o.get("tooManySoundCloudFuckUps")}),o.send("play"),o.set("soundCloudFuckUps",0)):(n.local?o.send("removeAudio",t):o.send("next",!0),2===e.target.error.code?o.get("notify").alert({html:o.get("failedToDecodeFileHtml")(n.fileName)}):o.get("notify").alert({html:o.get("failedToPlayFileHtml")(n.fileName)}),o.set("usingBeatPreferences",!1),o.incrementProperty("soundCloudFuckUps"))},l.ontimeupdate=function(){o.set("timeElapsed",Math.floor(l.currentTime))},l.onended=function(){o.send("next")},s.load(l,1),this.set("playQueuePointer",e),this.loadSongBeatPreferences(),t&&this.send("play"),n&&p(this,function(){r("#play-list-area div div:first").scrollTop(62*e)})}},removeAudio:function(e){this.get("playQueue").removeAt(e),r("body .tooltip").remove(),this.get("dancer").audio&&this.clearCurrentAudio(!0)},playerAreaPlay:function(){i(r("#player-controls:hover"))&&-1!==this.get("playQueuePointer")&&(this.send("play"),r("#play-notification").velocity({opacity:.8,scale:1},0).velocity({opacity:0,scale:3},500))},play:function(e){var t=this,n=this.get("dancer"),o=this.get("playQueuePointer"),s=this.get("playing"),i=this.get("lightsData") if(-1!==o){if(s){n.pause() -var a=this.get("preMusicLightsDataCache"),l=function(e){r.ajax(t.get("apiURL")+"/lights/"+e+"/state",{data:JSON.stringify({on:a[e].state.on,hue:a[e].state.hue,bri:a[e].state.bri}),contentType:"application/json",type:"PUT"})} +var a=this.get("preMusicLightsDataCache"),l=function(e){r.ajax(t.get("apiURL")+"/lights/"+e+"/state",{data:JSON.stringify({on:a[e].state.on,hue:a[e].state.hue,sat:a[e].state.sat,bri:a[e].state.bri}),contentType:"application/json",type:"PUT"})} for(var p in i)i.hasOwnProperty(p)&&c(this,l,p,1e3) e||this.set("timeElapsed",Math.floor(n.getTime()))}else{var u=this.get("timeTotal") if(this.get("volumeMuted")?n.setVolume(0):n.setVolume(this.get("volume")/100),this.get("timeElapsed")===u&&0!==u)return void this.send("next",!0) @@ -231,7 +231,7 @@ if(e.picture){for(var s="",i=0;iSoundCloud user URLs are not supported.',tooManySoundCloudFuckUps:'',notStreamableHtml:function(e){return'"},urlNotFoundHtml:function(e){return'"},failedToPlayFileHtml:function(e){return'"},failedToDecodeFileHtml:function(e){return'"},scUrl:o("playQueuePointer","playQueue.[]",function(){var e=null,t=this.get("playQueue")[this.get("playQueuePointer")] +e.default=t.create({classNames:["col-sm-10","col-sm-offset-1","col-xs-12"],classNameBindings:["active::hidden"],elementId:"music-tab",dancer:null,notify:r.service(),beatOptions:{threshold:{range:{min:0,max:.5},step:.01,pips:{mode:"values",values:[0,.5],density:10,format:{to:function(e){return e=0===e?"High":"Low"},from:function(e){return e}}}},hueRange:{range:{min:0,max:65535},step:1,pips:{mode:"values",values:[0,25500,46920,65535],density:10,format:{to:function(e){return e=0===e||65535===e?"Red":25500===e?"Green":"Blue"},from:function(e){return e}}}},brightnessRange:{range:{min:1,max:254},step:1,pips:{mode:"values",values:[1,63,127,190,254],density:10,format:{to:function(e){return 63===e?e=25:127===e?e=50:190===e?e=75:254===e&&(e=100),e},from:function(e){return e}}}}},beatDelay:0,threshold:.2,hueRange:[0,65535],brightnessRange:[1,254],oldThreshold:null,playlistColumns:[100],playQueuePointer:-1,playQueue:c(),timeElapsed:0,timeTotal:0,lastLightBopIndex:0,colorLoopOn:!1,ambienceMode:!1,blackoutMode:!1,playerBottomDisplayed:!0,dragging:!1,draggingOverPlayListArea:!1,dragLeaveTimeoutHandle:null,isShowingAddSoundCloudModal:!1,isShowingUrlModal:!1,flashingTransitions:!1,repeat:0,shuffle:!1,volumeMuted:!1,volume:100,paused:!1,playing:!1,songBeatPreferences:{},usingBeatPreferences:!1,oldBeatPrefCache:null,storage:null,firstVisit:!0,soundCloudFuckUps:0,maxSoundCloudFuckUps:3,shufflePlayed:[],filledConnect:[!0,!1],hueRangeConnect:[!1,!0,!1],SC_CLIENT_ID:"aeec0034f58ecd85c2bd1deaecc41594",scUserNotSupportedHtml:'',tooManySoundCloudFuckUps:'',notStreamableHtml:function(e){return'"},urlNotFoundHtml:function(e){return'"},failedToPlayFileHtml:function(e){return'"},failedToDecodeFileHtml:function(e){return'"},scUrl:o("playQueuePointer","playQueue.[]",function(){var e=null,t=this.get("playQueue")[this.get("playQueuePointer")] return t&&t.scUrl&&(e=t.scUrl),e}),playQueueEmpty:o.empty("playQueue"),playQueueNotEmpty:o.notEmpty("playQueue"),playQueueMultiple:o("playQueue.[]",function(){return this.get("playQueue").length>1}),seekPosition:o("timeElapsed","timeTotal",function(){var e=this.get("timeTotal"),t=this.get("timeElapsed") return 0===e?0:t/e*100}),largeArtworkPic:o("playQueuePointer","currentVisName",function(){var e="",t=this.get("currentVisName"),n=this.get("playQueuePointer"),o=this.get("playQueue") if(-1!==n&&"None"===t){var i=o[n] @@ -291,4 +291,4 @@ e&&e()},supplant:function(e,t,n){return n=n||/\{([^\{\}]*)\}/g,e.replace(n,funct try{for(var i in o)o.hasOwnProperty(i)&&(s=s[o[i]])}catch(t){s=e}return"string"==typeof s||"number"==typeof s?s:e})},nextTick:function(e,t,n,o,s){for(;!s&&n',beyond_ceiling_pendant_table:'',bloom:'',br30:'',br30_slim:'',bridge_v1:'',bridge_v2:'',ceiling_round:'',ceiling_square:'',entity:'',floor:'',go:'',gu10:'',gu10_perfectfit:'',hds:'',impulse:'',iris:'',lightstrip:'',motion_sensor:'',pendant_oval:'',pendant_round:'',pendant_square:'',phoenix_ceiling:'',phoenix_down:'',recessed:'',storylight:'',table:'',tap:'',white_and_color_e27:'',white_e27:''},outline:{aura:'',beyond_ceiling_pendant_table:'',bloom:'',br30:'',br30_slim:'',bridge_v1:'',bridge_v2:'',ceiling_round:'',ceiling_square:'',entity:'',floor:'',go:'',gu10:'',gu10_perfectfit:'',hds:'',impulse:'',iris:'',lightstrip:'',motion_sensor:'',par16:'',pendant_oval:'',pendant_round:'',pendant_square:'',phoenix_ceiling:'',phoenix_ceiling_2:'',phoenix_down:'',phoenix_pendant:'',phoenix_table:'',phoenix_wall:'',recessed:'',storylight:'',table:'',tap:'',white_and_color_e27:'',white_e27:''}}}},"safari-pinned-tab":''}}),define("huegasm/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"sESP0Z+T",block:'{"symbols":[],"statements":[[1,[18,"welcome-page"],false],[0,"\\n"],[0,"\\n"],[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"huegasm/templates/application.hbs"}})}),define("huegasm/templates/components/transition-group",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"Z/BMdkzA",block:'{"symbols":["&default"],"statements":[[11,1],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"huegasm/templates/components/transition-group.hbs"}})}),define("huegasm/utils/clamp",["exports","ember-paper/utils/clamp"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("huegasm/config/environment",[],function(){try{var e="huegasm/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} -return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("huegasm/app").default.create({name:"huegasm",version:"1.0.0+2895d491"}) +return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("huegasm/app").default.create({name:"huegasm",version:"1.0.0+dc035db8"}) diff --git a/index.html b/index.html index 075683b..ec1c6b1 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ - + @@ -63,7 +63,7 @@ - +