Added demo mode
This commit is contained in:
1 parent
b643ef628b
commit
50bb4daeaa
5 files changed
+13
-5
No files matched your search
@@ -1,2 +1,2 @@
|
||||
""" DO NOT MODIFY. Auto-generated by build_frontend script """
|
||||
VERSION = "b45d1c9687dea7c746e8366c65d39d0e"
|
||||
VERSION = "873a4efef163787ea768e761f47354a2"
|
||||
@@ -179,7 +179,7 @@ b.events&&Object.keys(a).length>0&&console.log("[%s] addHostListeners:",this.loc
|
||||
</p><p class="center" hidden?="{{!stateObj.attributes.description_image}}"><img src="{{stateObj.attributes.description_image}}"></p><p class="submit"><paper-button raised="" on-click="{{submitClicked}}" hidden?="{{action !== 'display'}}">
|
||||
{{stateObj.attributes.submit_caption || "Set configuration"}}
|
||||
</paper-button><span hidden?="{{action !== 'configuring'}}"><paper-spinner active="true"></paper-spinner><span>Configuring…</span></span></p></template></div></template><script>Polymer("more-info-configurator",{action:"display",submitClicked:function(){this.action="configuring";var data={configure_id:this.stateObj.attributes.configure_id};window.hass.serviceActions.callService("configurator","configure",data).then(function(){this.action="display";window.hass.syncActions.sync()}.bind(this),function(){this.action="display"}.bind(this))}});</script></polymer-element><polymer-element name="more-info-content" attributes="stateObj" assetpath="polymer/more-infos/"><template><style>:host{display:block}</style><div id="moreInfoContainer" class="{{classNames}}"></div></template><script>Polymer("more-info-content",{classNames:"",observe:{"stateObj.attributes":"stateAttributesChanged"},stateObjChanged:function(oldVal,newVal){var moreInfoContainer=this.$.moreInfoContainer;if(!newVal){if(moreInfoContainer.lastChild){moreInfoContainer.removeChild(moreInfoContainer.lastChild)}return}if(!oldVal||oldVal.moreInfoType!=newVal.moreInfoType){if(moreInfoContainer.lastChild){moreInfoContainer.removeChild(moreInfoContainer.lastChild)}var moreInfo=document.createElement("more-info-"+newVal.moreInfoType);moreInfo.stateObj=newVal;moreInfoContainer.appendChild(moreInfo)}else{moreInfoContainer.lastChild.stateObj=newVal}},stateAttributesChanged:function(oldVal,newVal){this.classNames=Object.keys(newVal).map(function(key){return"has-"+key}).join(" ")}});</script></polymer-element><polymer-element name="more-info-dialog" assetpath="polymer/dialogs/"><template><ha-action-dialog id="dialog"><style>.title-card{margin-bottom:24px}</style><div><state-card-content stateobj="{{stateObj}}" class="title-card"></state-card-content><state-timeline statehistory="{{stateHistory}}"></state-timeline><more-info-content stateobj="{{stateObj}}"></more-info-content></div></ha-action-dialog></template><script>Polymer("more-info-dialog",{stateObj:{},stateHistory:null,observe:{"stateObj.attributes":"reposition"},ready:function(){this.stateHistoryStoreChanged=this.stateHistoryStoreChanged.bind(this);window.hass.stateHistoryStore.addChangeListener(this.stateHistoryStoreChanged)},detached:function(){window.hass.stateHistoryStore.removeChangeListener(this.stateHistoryStoreChanged)},stateHistoryStoreChanged:function(){if(this.stateObj.entityId){this.stateHistory=window.hass.stateHistoryStore.get(this.stateObj.entityId)}else{this.stateHistory=null}},stateObjChanged:function(){if(this.stateObj.entityId&&window.hass.stateHistoryStore.isStale(this.stateObj.entityId)){window.hass.stateHistoryActions.fetch(this.stateObj.entityId)}this.stateHistoryStoreChanged()},reposition:function(oldVal,newVal){if(this.$.dialog.opened){this.job("resizeAfterLayoutChange",function(){this.$.dialog.resizeHandler()}.bind(this),1e3)}},show:function(stateObj){this.stateObj=stateObj;this.job("showDialogAfterRender",function(){this.$.dialog.toggle()}.bind(this))}});</script></polymer-element><script>!function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";var r=e(2);window.hass||(window.hass={callApi:e(4),actions:e(1),dispatcher:r,authActions:e(21),componentActions:e(6),eventActions:e(10),serviceActions:e(11),stateActions:e(7),syncActions:e(12),stateHistoryActions:e(22),authStore:e(13),componentStore:e(23),eventStore:e(24),serviceStore:e(14),stateStore:e(25),syncStore:e(27),stateHistoryStore:e(26),stateModel:e(9),util:e(15)})},function(t,n,e){"use strict";var r=e(3),i=["ACTION_LOG_OUT","ACTION_VALIDATING_AUTH_TOKEN","ACTION_VALID_AUTH_TOKEN","ACTION_INVALID_AUTH_TOKEN","ACTION_FETCH_ALL","ACTION_NEW_LOADED_COMPONENTS","ACTION_NEW_EVENTS","ACTION_NEW_SERVICES","ACTION_NEW_STATES","ACTION_NEW_STATE_HISTORY","ACTION_SHOW_TOAST","ACTION_EVENT_FIRED","ACTION_INITIAL_LOAD_DONE"];t.exports=r.zipObject(i,i)},function(t,n,e){"use strict";var r=e(16).Dispatcher;t.exports=new r},function(t,n,e){var r;(function(t,i){(function(){function u(t,n){if(t!==n){var e=t===t,r=n===n;if(t>n||!e||"undefined"==typeof t&&r)return 1;if(n>t||!r||"undefined"==typeof n&&e)return-1}return 0}function o(t,n,e){if(n!==n)return _(t,e);for(var r=(e||0)-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}function a(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}function s(t){return"string"==typeof t?t:null==t?"":t+""}function c(t){return t.charCodeAt(0)}function f(t,n){for(var e=-1,r=t.length;++e<r&&n.indexOf(t.charAt(e))>-1;);return e}function l(t,n){for(var e=t.length;e--&&n.indexOf(t.charAt(e))>-1;);return e}function h(t,n){return u(t.criteria,n.criteria)||t.index-n.index}function p(t,n){for(var e=-1,r=t.criteria,i=n.criteria,o=r.length;++e<o;){var a=u(r[e],i[e]);if(a)return a}return t.index-n.index}function v(t){return Mn[t]}functionLine truncated
|
||||
}function ro(t){return t=s(t),t&&jn.test(t)?t.replace(kn,"\\$&"):t}function io(t,n,e){t=s(t),n=+n;var r=t.length;if(r>=n||!pa(n))return t;var i=(n-r)/2,u=na(i),o=Qo(i);return e=ar("",o,e),e.slice(0,u)+t+e}function uo(t,n,e){return t=s(t),t&&ar(t,n,e)+t}function oo(t,n,e){return t=s(t),t&&t+ar(t,n,e)}function ao(t,n,e){return e&&wr(t,n,e)&&(n=0),ma(t,n)}function so(t,n){var e="";if(t=s(t),n=+n,1>n||!t||!pa(n))return e;do n%2&&(e+=t),n=na(n/2),t+=t;while(n);return e}function co(t,n,e){return t=s(t),e=null==e?0:da(0>e?0:+e||0,t.length),t.lastIndexOf(n,e)==e}function fo(t,e,r){var i=n.templateSettings;r&&wr(t,e,r)&&(e=r=null),t=s(t),e=le(le({},r||e),i,fe);var u,o,a=le(le({},e.imports),i.imports,fe),c=Ba(a),f=Be(a,c),l=0,h=e.interpolate||Ln,p="__p += '",v=Wo((e.escape||Ln).source+"|"+h.source+"|"+(h===En?In:Ln).source+"|"+(e.evaluate||Ln).source+"|$","g"),g="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Hn+"]")+"\n";t.replace(v,function(n,e,r,i,a,s){return r||(r=i),p+=t.slice(l,s).replace($n,d),e&&(u=!0,p+="' +\n__e("+e+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+n.length,n}),p+="';\n";var _=e.variable;_||(p="with (obj) {\n"+p+"\n}\n"),p=(o?p.replace(dn,""):p).replace(_n,"$1").replace(yn,"$1;"),p="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=yo(function(){return jo(c,g+"return "+p).apply(I,f)});if(y.source=p,yu(y))throw y;return y}function lo(t,n,e){var r=t;return(t=s(t))?(e?wr(r,n,e):null==n)?t.slice(w(t),b(t)+1):(n+="",t.slice(f(t,n),l(t,n)+1)):t}function ho(t,n,e){var r=t;return t=s(t),t?t.slice((e?wr(r,n,e):null==n)?w(t):f(t,n+"")):t}function po(t,n,e){var r=t;return t=s(t),t?(e?wr(r,n,e):null==n)?t.slice(0,b(t)+1):t.slice(0,l(t,n+"")+1):t}function vo(t,n,e){e&&wr(t,n,e)&&(n=null);var r=U,i=W;if(null!=n)if(Tu(n)){var u="separator"in n?n.separator:u;r="length"in n?+n.length||0:r,i="omission"in n?s(n.omission):i}else r=+n||0;if(t=s(t),r>=t.length)return t;var o=r-i.length;if(1>o)return i;var a=t.slice(0,o);if(null==u)return a+i;if(Iu(u)){if(t.slice(o).search(u)){var c,f,l=t.slice(0,o);for(u.global||(u=Wo(u.source,(Nn.exec(u)||"")+"g")),u.lastIndex=0;c=u.exec(l);)f=c.index;a=a.slice(0,null==f?o:f)}}else if(t.indexOf(u,o)!=o){var h=a.lastIndexOf(u);h>-1&&(a=a.slice(0,h))}return a+i}function go(t){return t=s(t),t&&An.test(t)?t.replace(mn,O):t}function _o(t,n,e){return e&&wr(t,n,e)&&(n=null),t=s(t),t.match(n||Un)||[]}function yo(t){try{return t()}catch(n){return yu(n)?n:ko(n)}}function mo(t,n,e){return e&&wr(t,n,e)&&(n=null),y(t)?wo(t):ge(t,n)}function To(t){return function(){return t}}function Ao(t){return t}function wo(t){return $e(de(t,!0))}function bo(t,n,e){if(null==e){var r=Tu(n),i=r&&Ba(n),u=i&&i.length&&De(n,i);(u?u.length:r)||(u=!1,e=n,n=t,t=this)}u||(u=De(n,Ba(n)));var o=!0,a=-1,s=mu(t),c=u.length;e===!1?o=!1:Tu(e)&&"chain"in e&&(o=e.chain);for(;++a<c;){var f=u[a],l=n[f];t[f]=l,s&&(t.prototype[f]=function(n){return function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__);return(r.__actions__=Xn(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}var i=[this.value()];return ra.apply(i,arguments),n.apply(t,i)}}(l))}return t}function Oo(){return t._=Jo,this}function Eo(){}function Io(t){return Fe(t+"")}function No(t){return function(n){return null==t?I:t[n]}}function Co(t,n,e){e&&wr(t,n,e)&&(n=e=null),t=+t||0,e=null==e?1:+e||0,null==n?(n=t,t=0):n=+n||0;for(var r=-1,i=ga(Qo((n-t)/(e||1)),0),u=So(i);++r<i;)u[r]=t,t+=e;return u}function xo(t,n,e){if(t=+t,1>t||!pa(t))return[];var r=-1,i=So(da(t,ba));for(n=Ye(n,e,1);++r<t;)ba>r?i[r]=n(r):n(r);return i}function Do(t){var n=++zo;return s(t)+n}t=t?Qn.defaults(Jn.Object(),t,Qn.pick(Jn,Fn)):Jn;var So=t.Array,Lo=t.Date,ko=t.Error,jo=t.Function,Ro=t.Math,$o=t.Number,Uo=t.Object,Wo=t.RegExp,Fo=t.String,Ho=t.TypeError,Po=So.prototype,Vo=Uo.prototype,Go=(Go=t.window)&&Go.document,Mo=jo.prototype.toString,Ko=Fe("length"),Bo=Vo.hasOwnProperty,zo=0,qo=Vo.toString,Jo=t._,Yo=Wo("^"+ro(qo).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xo=bu(Xo=t.ArrayBuffer)&&Xo,Zo=bu(Zo=Xo&&new Xo(0).slice)&&Zo,Qo=Ro.ceil,ta=t.clearTimeout,na=Ro.floor,ea=bu(ea=Uo.getPrototypeOf)&&ea,ra=Po.push,ia=Vo.propertyIsEnumerable,ua=bu(ua=t.Set)&&ua,oa=t.setTimeout,aa=Po.splice,sa=bu(sa=t.Uint8Array)&&sa,ca=(Po.unshift,bu(ca=t.WeakMap)&&ca),fa=function(){try{var n=bu(n=t.Float64Array)&&n,e=new n(new Xo(10),0,1)&&n}catch(r){}return e}(),la=bu(la=So.isArray)&&la,ha=bu(ha=Uo.create)&&ha,pa=t.isFinite,va=bu(va=Uo.keys)&&va,ga=Ro.max,da=Ro.min,_a=bu(_a=Lo.now)&&_a,ya=bu(ya=$o.isFinite)&&ya,ma=t.parseInt,Ta=Ro.random,Aa=$o.NEGATIVE_INFINITY,wa=$o.POSITIVE_INFINITY,ba=Ro.pow(2,32)-1,Oa=ba-1,Ea=ba>>>1,Ia=fa?fa.BYTES_PER_ELEMENT:0,Na=Ro.pow(2,53)-1,Ca=ca&&new ca,xa=n.support={};!functLine truncated
|
||||
}function ro(t){return t=s(t),t&&jn.test(t)?t.replace(kn,"\\$&"):t}function io(t,n,e){t=s(t),n=+n;var r=t.length;if(r>=n||!pa(n))return t;var i=(n-r)/2,u=na(i),o=Qo(i);return e=ar("",o,e),e.slice(0,u)+t+e}function uo(t,n,e){return t=s(t),t&&ar(t,n,e)+t}function oo(t,n,e){return t=s(t),t&&t+ar(t,n,e)}function ao(t,n,e){return e&&wr(t,n,e)&&(n=0),ma(t,n)}function so(t,n){var e="";if(t=s(t),n=+n,1>n||!t||!pa(n))return e;do n%2&&(e+=t),n=na(n/2),t+=t;while(n);return e}function co(t,n,e){return t=s(t),e=null==e?0:da(0>e?0:+e||0,t.length),t.lastIndexOf(n,e)==e}function fo(t,e,r){var i=n.templateSettings;r&&wr(t,e,r)&&(e=r=null),t=s(t),e=le(le({},r||e),i,fe);var u,o,a=le(le({},e.imports),i.imports,fe),c=Ba(a),f=Be(a,c),l=0,h=e.interpolate||Ln,p="__p += '",v=Wo((e.escape||Ln).source+"|"+h.source+"|"+(h===En?In:Ln).source+"|"+(e.evaluate||Ln).source+"|$","g"),g="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Hn+"]")+"\n";t.replace(v,function(n,e,r,i,a,s){return r||(r=i),p+=t.slice(l,s).replace($n,d),e&&(u=!0,p+="' +\n__e("+e+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+n.length,n}),p+="';\n";var _=e.variable;_||(p="with (obj) {\n"+p+"\n}\n"),p=(o?p.replace(dn,""):p).replace(_n,"$1").replace(yn,"$1;"),p="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=yo(function(){return jo(c,g+"return "+p).apply(I,f)});if(y.source=p,yu(y))throw y;return y}function lo(t,n,e){var r=t;return(t=s(t))?(e?wr(r,n,e):null==n)?t.slice(w(t),b(t)+1):(n+="",t.slice(f(t,n),l(t,n)+1)):t}function ho(t,n,e){var r=t;return t=s(t),t?t.slice((e?wr(r,n,e):null==n)?w(t):f(t,n+"")):t}function po(t,n,e){var r=t;return t=s(t),t?(e?wr(r,n,e):null==n)?t.slice(0,b(t)+1):t.slice(0,l(t,n+"")+1):t}function vo(t,n,e){e&&wr(t,n,e)&&(n=null);var r=U,i=W;if(null!=n)if(Tu(n)){var u="separator"in n?n.separator:u;r="length"in n?+n.length||0:r,i="omission"in n?s(n.omission):i}else r=+n||0;if(t=s(t),r>=t.length)return t;var o=r-i.length;if(1>o)return i;var a=t.slice(0,o);if(null==u)return a+i;if(Iu(u)){if(t.slice(o).search(u)){var c,f,l=t.slice(0,o);for(u.global||(u=Wo(u.source,(Nn.exec(u)||"")+"g")),u.lastIndex=0;c=u.exec(l);)f=c.index;a=a.slice(0,null==f?o:f)}}else if(t.indexOf(u,o)!=o){var h=a.lastIndexOf(u);h>-1&&(a=a.slice(0,h))}return a+i}function go(t){return t=s(t),t&&An.test(t)?t.replace(mn,O):t}function _o(t,n,e){return e&&wr(t,n,e)&&(n=null),t=s(t),t.match(n||Un)||[]}function yo(t){try{return t()}catch(n){return yu(n)?n:ko(n)}}function mo(t,n,e){return e&&wr(t,n,e)&&(n=null),y(t)?wo(t):ge(t,n)}function To(t){return function(){return t}}function Ao(t){return t}function wo(t){return $e(de(t,!0))}function bo(t,n,e){if(null==e){var r=Tu(n),i=r&&Ba(n),u=i&&i.length&&De(n,i);(u?u.length:r)||(u=!1,e=n,n=t,t=this)}u||(u=De(n,Ba(n)));var o=!0,a=-1,s=mu(t),c=u.length;e===!1?o=!1:Tu(e)&&"chain"in e&&(o=e.chain);for(;++a<c;){var f=u[a],l=n[f];t[f]=l,s&&(t.prototype[f]=function(n){return function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__);return(r.__actions__=Xn(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}var i=[this.value()];return ra.apply(i,arguments),n.apply(t,i)}}(l))}return t}function Oo(){return t._=Jo,this}function Eo(){}function Io(t){return Fe(t+"")}function No(t){return function(n){return null==t?I:t[n]}}function Co(t,n,e){e&&wr(t,n,e)&&(n=e=null),t=+t||0,e=null==e?1:+e||0,null==n?(n=t,t=0):n=+n||0;for(var r=-1,i=ga(Qo((n-t)/(e||1)),0),u=So(i);++r<i;)u[r]=t,t+=e;return u}function xo(t,n,e){if(t=+t,1>t||!pa(t))return[];var r=-1,i=So(da(t,ba));for(n=Ye(n,e,1);++r<t;)ba>r?i[r]=n(r):n(r);return i}function Do(t){var n=++zo;return s(t)+n}t=t?Qn.defaults(Jn.Object(),t,Qn.pick(Jn,Fn)):Jn;var So=t.Array,Lo=t.Date,ko=t.Error,jo=t.Function,Ro=t.Math,$o=t.Number,Uo=t.Object,Wo=t.RegExp,Fo=t.String,Ho=t.TypeError,Po=So.prototype,Vo=Uo.prototype,Go=(Go=t.window)&&Go.document,Mo=jo.prototype.toString,Ko=Fe("length"),Bo=Vo.hasOwnProperty,zo=0,qo=Vo.toString,Jo=t._,Yo=Wo("^"+ro(qo).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xo=bu(Xo=t.ArrayBuffer)&&Xo,Zo=bu(Zo=Xo&&new Xo(0).slice)&&Zo,Qo=Ro.ceil,ta=t.clearTimeout,na=Ro.floor,ea=bu(ea=Uo.getPrototypeOf)&&ea,ra=Po.push,ia=Vo.propertyIsEnumerable,ua=bu(ua=t.Set)&&ua,oa=t.setTimeout,aa=Po.splice,sa=bu(sa=t.Uint8Array)&&sa,ca=(Po.unshift,bu(ca=t.WeakMap)&&ca),fa=function(){try{var n=bu(n=t.Float64Array)&&n,e=new n(new Xo(10),0,1)&&n}catch(r){}return e}(),la=bu(la=So.isArray)&&la,ha=bu(ha=Uo.create)&&ha,pa=t.isFinite,va=bu(va=Uo.keys)&&va,ga=Ro.max,da=Ro.min,_a=bu(_a=Lo.now)&&_a,ya=bu(ya=$o.isFinite)&&ya,ma=t.parseInt,Ta=Ro.random,Aa=$o.NEGATIVE_INFINITY,wa=$o.POSITIVE_INFINITY,ba=Ro.pow(2,32)-1,Oa=ba-1,Ea=ba>>>1,Ia=fa?fa.BYTES_PER_ELEMENT:0,Na=Ro.pow(2,53)-1,Ca=ca&&new ca,xa=n.support={};!functLine truncated
|
||||
return pickBy("isBefore",args)};moment.max=function(){var args=[].slice.call(arguments,0);return pickBy("isAfter",args)};moment.utc=function(input,format,locale,strict){var c;if(typeof locale==="boolean"){strict=locale;locale=undefined}c={};c._isAMomentObject=true;c._useUTC=true;c._isUTC=true;c._l=locale;c._i=input;c._f=format;c._strict=strict;c._pf=defaultParsingFlags();return makeMoment(c).utc()};moment.unix=function(input){return moment(input*1e3)};moment.duration=function(input,key){var duration=input,match=null,sign,ret,parseIso,diffRes;if(moment.isDuration(input)){duration={ms:input._milliseconds,d:input._days,M:input._months}}else if(typeof input==="number"){duration={};if(key){duration[key]=input}else{duration.milliseconds=input}}else if(!!(match=aspNetTimeSpanJsonRegex.exec(input))){sign=match[1]==="-"?-1:1;duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(match[MILLISECOND])*sign}}else if(!!(match=isoDurationRegex.exec(input))){sign=match[1]==="-"?-1:1;parseIso=function(inp){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign};duration={y:parseIso(match[2]),M:parseIso(match[3]),d:parseIso(match[4]),h:parseIso(match[5]),m:parseIso(match[6]),s:parseIso(match[7]),w:parseIso(match[8])}}else if(duration==null){duration={}}else if(typeof duration==="object"&&("from"in duration||"to"in duration)){diffRes=momentsDifference(moment(duration.from),moment(duration.to));duration={};duration.ms=diffRes.milliseconds;duration.M=diffRes.months}ret=new Duration(duration);if(moment.isDuration(input)&&hasOwnProp(input,"_locale")){ret._locale=input._locale}return ret};moment.version=VERSION;moment.defaultFormat=isoFormat;moment.ISO_8601=function(){};moment.momentProperties=momentProperties;moment.updateOffset=function(){};moment.relativeTimeThreshold=function(threshold,limit){if(relativeTimeThresholds[threshold]===undefined){return false}if(limit===undefined){return relativeTimeThresholds[threshold]}relativeTimeThresholds[threshold]=limit;return true};moment.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",function(key,value){return moment.locale(key,value)});moment.locale=function(key,values){var data;if(key){if(typeof values!=="undefined"){data=moment.defineLocale(key,values)}else{data=moment.localeData(key)}if(data){moment.duration._locale=moment._locale=data}}return moment._locale._abbr};moment.defineLocale=function(name,values){if(values!==null){values.abbr=name;if(!locales[name]){locales[name]=new Locale}locales[name].set(values);moment.locale(name);return locales[name]}else{delete locales[name];return null}};moment.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",function(key){return moment.localeData(key)});moment.localeData=function(key){var locale;if(key&&key._locale&&key._locale._abbr){key=key._locale._abbr}if(!key){return moment._locale}if(!isArray(key)){locale=loadLocale(key);if(locale){return locale}key=[key]}return chooseLocale(key)};moment.isMoment=function(obj){return obj instanceof Moment||obj!=null&&hasOwnProp(obj,"_isAMomentObject")};moment.isDuration=function(obj){return obj instanceof Duration};for(i=lists.length-1;i>=0;--i){makeList(lists[i])}moment.normalizeUnits=function(units){return normalizeUnits(units)};moment.invalid=function(flags){var m=moment.utc(NaN);if(flags!=null){extend(m._pf,flags)}else{m._pf.userInvalidated=true}return m};moment.parseZone=function(){return moment.apply(null,arguments).parseZone()};moment.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2e3)};moment.isDate=isDate;extend(moment.fn=Moment.prototype,{clone:function(){return moment(this)},valueOf:function(){return+this._d-(this._offset||0)*6e4},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var m=moment(this).utc();if(0<m.year()&&m.year()<=9999){if("function"===typeof Date.prototype.toISOString){return this.toDate().toISOString()}else{return formatMoment(m,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}}else{return formatMoment(m,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}},toArray:function(){var m=this;return[m.year(),m.month(),m.date(),m.hours(),m.minutes(),m.seconds(),m.milliseconds()]},isValid:function(){return isValid(this)},isDSTShifted:function(){if(this._a){return this.isValid()&&compareArrays(this._a,(this._isUTC?moment.utc(this._a):moment(this._a)).toArray())>0}return false},parsingFlags:function(){return extend({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(keepLocalTime){return this.utcOffset(0,keepLocalTime)},local:function(keepLocalTime){if(this._isUTC){this.utcOffset(0,keepLocalTime);this._isUTC=false;if(keepLocalTime){this.subtract(this._dateUtcOffset(),"m")}}return this},format:function(inputString){var output=formatMoment(this,inputSLine truncated
|
||||
<div hidden><polymer-element name="login-form" assetpath="polymer/layouts/"><template><style>paper-input{display:block}.login paper-button{margin-left:242px}.login .interact{height:125px}#validatebox{text-align:center}.validatemessage{margin-top:10px}</style><div layout="" horizontal="" center="" fit="" class="login" id="splash"><div layout="" vertical="" center="" flex=""><img src="/static/favicon-192x192.png"><h1>Home Assistant</h1><a href="polymer/layouts/#" id="hideKeyboardOnFocus"></a><div class="interact" layout="" vertical=""><div id="loginform" hidden?="{{isValidating || isLoggedIn}}"><paper-input-decorator label="Password" id="passwordDecorator"><input is="core-input" type="password" id="passwordInput" value="{{authToken}}" on-keyup="{{passwordKeyup}}"></paper-input-decorator><paper-button on-click="{{validatePassword}}">Log In</paper-button></div><div id="validatebox" hidden?="{{!(isValidating || isLoggedIn)}}"><paper-spinner active="true"></paper-spinner><br><div class="validatemessage">{{spinnerMessage}}</div></div></div></div></div></template><script>Polymer("login-form",{MSG_VALIDATING:"Validating password…",MSG_LOADING_DATA:"Loading data…",authToken:"",isValidating:false,isLoggedIn:false,spinnerMessage:"",ready:function(){this.authStore=window.hass.authStore;this.authChangeListener=this.authChangeListener.bind(this);this.authStore.addChangeListener(this.authChangeListener);this.authChangeListener()},attached:function(){this.focusPassword()},detached:function(){this.authStore.removeChangeListener(this.authChangeListener)},authChangeListener:function(){this.isValidating=this.authStore.isValidating();this.isLoggedIn=this.authStore.isLoggedIn();this.spinnerMessage=this.isValidating?this.MSG_VALIDATING:this.MSG_LOADING_DATA;if(this.authStore.wasLastAttemptInvalid()){this.$.passwordDecorator.error=this.authStore.getLastAttemptMessage();this.$.passwordDecorator.isInvalid=true}if(!(this.isValidating&&this.isLoggedIn)){this.job("focusPasswordBox",this.focusPassword.bind(this))}},focusPassword:function(){this.$.passwordInput.focus()},passwordKeyup:function(ev){if(ev.keyCode===13){this.validatePassword()}else if(this.$.passwordDecorator.isInvalid){this.$.passwordDecorator.isInvalid=false}},validatePassword:function(){this.$.hideKeyboardOnFocus.focus();window.hass.authActions.validate(this.authToken)}});</script></polymer-element></div>
|
||||
<div hidden><polymer-element name="core-selection" attributes="multi" hidden assetpath="polymer/bower_components/core-selection/"><script>Polymer("core-selection",{multi:false,ready:function(){this.clear()},clear:function(){this.selection=[]},getSelection:function(){return this.multi?this.selection:this.selection[0]},isSelected:function(item){return this.selection.indexOf(item)>=0},setItemSelected:function(item,isSelected){if(item!==undefined&&item!==null){if(isSelected){this.selection.push(item)}else{var i=this.selection.indexOf(item);if(i>=0){this.selection.splice(i,1)}}this.fire("core-select",{isSelected:isSelected,item:item})}},select:function(item){if(this.multi){this.toggle(item)}else if(this.getSelection()!==item){this.setItemSelected(this.getSelection(),false);this.setItemSelected(item,true)}},toggle:function(item){this.setItemSelected(item,!this.isSelected(item))}});</script></polymer-element><polymer-element name="core-selector" attributes="selected multi valueattr selectedClass selectedProperty selectedAttribute selectedItem selectedModel selectedIndex notap excludedLocalNames target itemsSelector activateEvent" assetpath="polymer/bower_components/core-selector/"><template><core-selection id="selection" multi="{{multi}}" on-core-select="{{selectionSelect}}"></core-selection><content id="items" select="*"></content></template><script>Polymer("core-selector",{selected:null,multi:false,valueattr:"name",selectedClass:"core-selected",selectedProperty:"",selectedAttribute:"active",selectedItem:null,selectedModel:null,selectedIndex:-1,excludedLocalNames:"",target:null,itemsSelector:"",activateEvent:"tap",notap:false,defaultExcludedLocalNames:"template",observe:{"selected multi":"selectedChanged"},ready:function(){this.activateListener=this.activateHandler.bind(this);this.itemFilter=this.filterItem.bind(this);this.excludedLocalNamesChanged();this.observer=new MutationObserver(this.updateSelected.bind(this));if(!this.target){this.target=this}},get items(){if(!this.target){return[]}var nodes=this.target!==this?this.itemsSelector?this.target.querySelectorAll(this.itemsSelector):this.target.children:this.$.items.getDistributedNodes();return Array.prototype.filter.call(nodes,this.itemFilter)},filterItem:function(node){return!this._excludedNames[node.localName]},excludedLocalNamesChanged:function(){this._excludedNames={};var s=this.defaultExcludedLocalNames;if(this.excludedLocalNames){s+=" "+this.excludedLocalNames}s.split(/\s+/g).forEach(function(n){this._excludedNames[n]=1},this)},targetChanged:function(old){if(old){this.removeListener(old);this.observer.disconnect();this.clearSelection()}if(this.target){this.addListener(this.target);this.observer.observe(this.target,{childList:true});this.updateSelected()}},addListener:function(node){Polymer.addEventListener(node,this.activateEvent,this.activateListener)},removeListener:function(node){Polymer.removeEventListener(node,this.activateEvent,this.activateListener)},get selection(){return this.$.selection.getSelection()},selectedChanged:function(){if(arguments.length===1){this.processSplices(arguments[0])}else{this.updateSelected()}},updateSelected:function(){this.validateSelected();if(this.multi){this.clearSelection(this.selected);this.selected&&this.selected.forEach(function(s){this.setValueSelected(s,true)},this)}else{this.valueToSelection(this.selected)}},validateSelected:function(){if(this.multi&&!Array.isArray(this.selected)&&this.selected!=null){this.selected=[this.selected]}else if(!this.multi&&Array.isArray(this.selected)){var s=this.selected[0];this.clearSelection([s]);this.selected=s}},processSplices:function(splices){for(var i=0,splice;splice=splices[i];i++){for(var j=0;j<splice.removed.length;j++){this.setValueSelected(splice.removed[j],false)}for(var j=0;j<splice.addedCount;j++){this.setValueSelected(this.selected[splice.index+j],true)}}},clearSelection:function(excludes){this.$.selection.selection.slice().forEach(function(item){var v=this.valueForNode(item)||this.items.indexOf(item);if(!excludes||excludes.indexOf(v)<0){this.$.selection.setItemSelected(item,false)}},this)},valueToSelection:function(value){var item=this.valueToItem(value);this.$.selection.select(item)},setValueSelected:function(value,isSelected){var item=this.valueToItem(value);if(isSelected^this.$.selection.isSelected(item)){this.$.selection.setItemSelected(item,isSelected)}},updateSelectedItem:function(){this.selectedItem=this.selection},selectedItemChanged:function(){if(this.selectedItem){var t=this.selectedItem.templateInstance;this.selectedModel=t?t.model:undefined}else{this.selectedModel=null}this.selectedIndex=this.selectedItem?parseInt(this.valueToIndex(this.selected)):-1},valueToItem:function(value){return value===null||value===undefined?null:this.items[this.valueToIndex(value)]},valueToIndex:function(value){for(var i=0,items=this.items,c;c=items[i];i++){if(this.valueForNode(c)==value){return i}}return value},valueForNode:function(node){return node[this.valueattr]||node.getALine truncated
|
||||
|
||||
Reference in new issue
Block a user