diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index 50c61ad3af7..ac957e0661f 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -1,3 +1,3 @@ """DO NOT MODIFY. Auto-generated by build_frontend script.""" -CORE = "7962327e4a29e51d4a6f4ee6cca9acc3" -UI = "570e1b8744a58024fc4e256f5e024424" +CORE = "db0bb387f4d3bcace002d62b94baa348" +UI = "5b306b7e7d36799b7b67f592cbe94703" diff --git a/homeassistant/components/frontend/www_static/core.js b/homeassistant/components/frontend/www_static/core.js index 8bb155ea288..4bc3619c443 100644 --- a/homeassistant/components/frontend/www_static/core.js +++ b/homeassistant/components/frontend/www_static/core.js @@ -1,4 +1,4 @@ !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,e,n){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=25)}({17:function(t,e,n){"use strict";(function(t){function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return e={exports:{}},t(e,e.exports),e.exports}function u(t,e){var n=e.authToken,r=e.host;return Ne({authToken:n,host:r,isValidating:!0,isInvalid:!1,errorMessage:""})}function a(){return Ue.getInitialState()}function s(t,e){var n=e.errorMessage;return t.withMutations(function(t){return t.set("isValidating",!1).set("isInvalid",!0).set("errorMessage",n)})}function c(t,e){var n=e.authToken,r=e.host;return Pe({authToken:n,host:r})}function f(){return xe.getInitialState()}function h(t,e){var n=e.rememberAuth;return n}function l(t){return t.withMutations(function(t){t.set("isStreaming",!0).set("useStreaming",!0).set("hasError",!1)})}function p(t){return t.withMutations(function(t){t.set("isStreaming",!1).set("useStreaming",!1).set("hasError",!1)})}function _(t){return t.withMutations(function(t){t.set("isStreaming",!1).set("hasError",!0)})}function d(){return Be.getInitialState()}function v(t,e){var n=e.model,r=e.result,i=e.params,o=n.entity;if(!r)return t;var u=i.replace?t.set(o,un({})):t,a=Array.isArray(r)?r:[r],s=n.fromJSON||un;return u.withMutations(function(t){return a.forEach(function(e){var n=s(e);t.setIn([o,n.id],n)})})}function y(t,e){var n=e.model,r=e.params;return t.removeIn([n.entity,r.id])}function S(t){var e={};return e.incrementData=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];g(e,t,r,n)},e.replaceData=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];g(e,t,cn({},r,{replace:!0}),n)},e.removeData=function(e,n){I(e,t,{id:n})},t.fetch&&(e.fetch=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(rn.API_FETCH_START,{model:t,params:n,method:"fetch"}),t.fetch(e,n).then(g.bind(null,e,t,n),m.bind(null,e,t,n))}),e.fetchAll=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(rn.API_FETCH_START,{model:t,params:n,method:"fetchAll"}),t.fetchAll(e,n).then(g.bind(null,e,t,cn({},n,{replace:!0})),m.bind(null,e,t,n))},t.save&&(e.save=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(rn.API_SAVE_START,{params:n}),t.save(e,n).then(E.bind(null,e,t,n),b.bind(null,e,t,n))}),t["delete"]&&(e["delete"]=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(rn.API_DELETE_START,{params:n}),t["delete"](e,n).then(I.bind(null,e,t,n),w.bind(null,e,t,n))}),e}function g(t,e,n,r){return t.dispatch(rn.API_FETCH_SUCCESS,{model:e,params:n,result:r}),r}function m(t,e,n,r){return t.dispatch(rn.API_FETCH_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}function E(t,e,n,r){return t.dispatch(rn.API_SAVE_SUCCESS,{model:e,params:n,result:r}),r}function b(t,e,n,r){return t.dispatch(rn.API_SAVE_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}function I(t,e,n,r){return t.dispatch(rn.API_DELETE_SUCCESS,{model:e,params:n,result:r}),r}function w(t,e,n,r){return t.dispatch(rn.API_DELETE_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}function O(t){t.registerStores({restApiCache:an})}function T(t){return[["restApiCache",t.entity],function(t){return!!t}]}function A(t){return[["restApiCache",t.entity],function(t){return t||fn({})}]}function D(t){return function(e){return["restApiCache",t.entity,e]}}function C(t){return new Date(t)}function z(t,e,n){var r=arguments.length<=3||void 0===arguments[3]?null:arguments[3],i=t.evaluate(si.authInfo),o=i.host+"/api/"+n;return new Promise(function(t,n){var u=new XMLHttpRequest;u.open(e,o,!0),u.setRequestHeader("X-HA-access",i.authToken),u.onload=function(){var e=void 0;try{e="application/json"===u.getResponseHeader("content-type")?JSON.parse(u.responseText):u.responseText}catch(r){e=u.responseText}u.status>199&&u.status<300?t(e):n(e)},u.onerror=function(){return n({})},r?u.send(JSON.stringify(r)):u.send()})}function R(t,e){var n=e.message;return t.set(t.size,n)}function M(){return jn.getInitialState()}function j(t,e){t.dispatch(zn.NOTIFICATION_CREATED,{message:e})}function k(t){t.registerStores({notifications:jn})}function L(t,e){if("lock"===t)return!0;if("garage_door"===t)return!0;var n=e.get(t);return!!n&&n.services.has("turn_on")}function N(t,e){return t?"group"===t.domain?"on"===t.state||"off"===t.state:L(t.domain,e):!1}function U(t,e){return[ur(t),function(t){return!!t&&t.services.has(e)}]}function H(t){return[Dn.byId(t),or,N]}function P(t,e){var n=e.component;return t.push(n)}function x(t,e){var n=e.components;return Sr(n)}function V(){return gr.getInitialState()}function q(t,e){var n=e.latitude,r=e.longitude,i=e.location_name,o=e.temperature_unit,u=e.time_zone,a=e.version;return Er({latitude:n,longitude:r,location_name:i,temperature_unit:o,time_zone:u,serverVersion:a})}function F(){return br.getInitialState()}function G(t,e){t.dispatch(vr.SERVER_CONFIG_LOADED,e)}function K(t){dn(t,"GET","config").then(function(e){return G(t,e)})}function Y(t,e){t.dispatch(vr.COMPONENT_LOADED,{component:e})}function B(t){return[["serverComponent"],function(e){return e.contains(t)}]}function J(t){t.registerStores({serverComponent:gr,serverConfig:br})}function W(t){return t.evaluate(_r)}function X(t){W(t)&&(t.hassId in Mr||(Mr[t.hassId]=Qe(Z.bind(null,t),Rr)),Mr[t.hassId]())}function Q(t){var e=Mr[t.hassId];e&&e.cancel()}function Z(t){return t.dispatch(Ze.API_FETCH_ALL_START,{}),dn(t,"GET","bootstrap").then(function(e){t.batch(function(){An.replaceData(t,e.states),cr.replaceData(t,e.services),Xn.replaceData(t,e.events),Dr.configLoaded(t,e.config),t.dispatch(Ze.API_FETCH_ALL_SUCCESS,{})}),X(t)},function(e){return t.dispatch(Ze.API_FETCH_ALL_FAIL,{message:e}),X(t),Promise.reject(e)})}function $(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.skipInitialSync,r=void 0===n?!1:n;t.dispatch(Ze.SYNC_SCHEDULED),r?X(t):Z(t)}function tt(t){t.dispatch(Ze.SYNC_SCHEDULE_CANCELLED),Q(t)}function et(t){t.registerStores({isFetchingData:tn,isSyncScheduled:nn})}function nt(t,e){switch(e.event_type){case"state_changed":e.data.new_state?An.incrementData(t,e.data.new_state):An.removeData(t,e.data.entity_id);break;case"component_loaded":Dr.componentLoaded(t,e.data.component);break;case"service_registered":cr.serviceRegistered(t,e.data.domain,e.data.service)}}function rt(t){var e=Hr[t.hassId];e&&(e.scheduleHealthCheck.cancel(),e.source.close(),Hr[t.hassId]=!1)}function it(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.syncOnInitialConnect,r=void 0===n?!0:n;rt(t);var i=Qe(it.bind(null,t),Ur),o=t.evaluate(si.authToken),u=new EventSource("/api/stream?api_password="+o+"&restrict="+Pr),a=r;Hr[t.hassId]={source:u,scheduleHealthCheck:i},u.addEventListener("open",function(){i(),t.batch(function(){t.dispatch(Fe.STREAM_START),kr.stop(t),a?kr.fetchAll(t):a=!0})},!1),u.addEventListener("message",function(e){i(),"ping"!==e.data&&nt(t,JSON.parse(e.data))},!1),u.addEventListener("error",function(){i(),u.readyState!==EventSource.CLOSED&&t.dispatch(Fe.STREAM_ERROR)},!1)}function ot(t){rt(t),t.batch(function(){t.dispatch(Fe.STREAM_STOP),kr.start(t)})}function ut(t){t.registerStores({streamStatus:Be})}function at(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n.useStreaming,i=void 0===r?t.evaluate(Br.isSupported):r,o=n.rememberAuth,u=void 0===o?!1:o,a=n.host,s=void 0===a?"":a;t.dispatch(ke.VALIDATING_AUTH_TOKEN,{authToken:e,host:s}),kr.fetchAll(t).then(function(){t.dispatch(ke.VALID_AUTH_TOKEN,{authToken:e,host:s,rememberAuth:u}),i?Yr.start(t,{syncOnInitialConnect:!1}):kr.start(t,{skipInitialSync:!0})},function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.message,r=void 0===n?Wr:n;t.dispatch(ke.INVALID_AUTH_TOKEN,{errorMessage:r})})}function st(t){t.dispatch(ke.LOG_OUT,{})}function ct(t){t.registerStores({authAttempt:Ue,authCurrent:xe,rememberAuth:qe})}function ft(t,e){var n=e.pane;return n}function ht(){return li.getInitialState()}function lt(t,e){var n=e.show;return!!n}function pt(){return _i.getInitialState()}function _t(t,e){t.dispatch(fi.SHOW_SIDEBAR,{show:e})}function dt(t,e){t.dispatch(fi.NAVIGATE,{pane:e})}function vt(t){return[vi,function(e){return e===t}]}function yt(t,e){var n=e.entityId;return n}function St(){return Ei.getInitialState()}function gt(t,e){t.dispatch(gi.SELECT_ENTITY,{entityId:e})}function mt(t){t.dispatch(gi.SELECT_ENTITY,{entityId:null})}function Et(t){return!t||(new Date).getTime()-t>6e4}function bt(t){return t.getUTCFullYear()+"-"+(t.getUTCMonth()+1)+"-"+t.getUTCDate()}function It(t,e){var n=e.date;return bt(n)}function wt(){return Oi.getInitialState()}function Ot(t,e){var n=e.date,r=e.stateHistory;return 0===r.length?t.set(n,Ai({})):t.withMutations(function(t){r.forEach(function(e){return t.setIn([n,e[0].entity_id],Ai(e.map(mn.fromJSON)))})})}function Tt(){return Di.getInitialState()}function At(t,e){var n=e.stateHistory;return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,Mi(e.map(mn.fromJSON)))})})}function Dt(){return ji.getInitialState()}function Ct(t,e){var n=e.stateHistory,r=(new Date).getTime();return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,r)}),history.length>1&&t.set(Ni,r)})}function zt(){return Ui.getInitialState()}function Rt(t,e){t.dispatch(Ii.ENTITY_HISTORY_DATE_SELECTED,{date:e})}function Mt(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];t.dispatch(Ii.RECENT_ENTITY_HISTORY_FETCH_START,{});var n="history/period";return null!==e&&(n+="?filter_entity_id="+e),dn(t,"GET",n).then(function(e){return t.dispatch(Ii.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,{stateHistory:e})},function(){return t.dispatch(Ii.RECENT_ENTITY_HISTORY_FETCH_ERROR,{})})}function jt(t,e){return t.dispatch(Ii.ENTITY_HISTORY_FETCH_START,{date:e}),dn(t,"GET","history/period/"+e).then(function(n){return t.dispatch(Ii.ENTITY_HISTORY_FETCH_SUCCESS,{date:e,stateHistory:n})},function(){return t.dispatch(Ii.ENTITY_HISTORY_FETCH_ERROR,{})})}function kt(t){var e=t.evaluate(xi);return jt(t,e)}function Lt(t){t.registerStores({currentEntityHistoryDate:Oi,entityHistory:Di,isLoadingEntityHistory:zi,recentEntityHistory:ji,recentEntityHistoryUpdated:Ui})}function Nt(t){t.registerStores({moreInfoEntityId:Ei})}function Ut(t,e){var n=e.model,r=e.result,i=e.params;if(null===t||"entity"!==n.entity||!i.replace)return t;for(var o=0;onu}function ce(t){t.registerStores({currentLogbookDate:qo,isLoadingLogbookEntries:Go,logbookEntries:Xo,logbookEntriesUpdated:$o})}function fe(t,e){return dn(t,"POST","template",{template:e})}function he(t){return t.set("isListening",!0)}function le(t,e){var n=e.interimTranscript,r=e.finalTranscript;return t.withMutations(function(t){return t.set("isListening",!0).set("isTransmitting",!1).set("interimTranscript",n).set("finalTranscript",r)})}function pe(t,e){var n=e.finalTranscript;return t.withMutations(function(t){return t.set("isListening",!1).set("isTransmitting",!0).set("interimTranscript","").set("finalTranscript",n)})}function _e(){return gu.getInitialState()}function de(){return gu.getInitialState()}function ve(){return gu.getInitialState()}function ye(t){return mu[t.hassId]}function Se(t){var e=ye(t);if(e){var n=e.finalTranscript||e.interimTranscript;t.dispatch(vu.VOICE_TRANSMITTING,{finalTranscript:n}),cr.callService(t,"conversation","process",{text:n}).then(function(){t.dispatch(vu.VOICE_DONE)},function(){t.dispatch(vu.VOICE_ERROR)})}}function ge(t){var e=ye(t);e&&(e.recognition.stop(),mu[t.hassId]=!1)}function me(t){Se(t),ge(t)}function Ee(t){var e=me.bind(null,t);e();var n=new webkitSpeechRecognition;mu[t.hassId]={recognition:n,interimTranscript:"",finalTranscript:""},n.interimResults=!0,n.onstart=function(){return t.dispatch(vu.VOICE_START)},n.onerror=function(){return t.dispatch(vu.VOICE_ERROR)},n.onend=e,n.onresult=function(e){var n=ye(t);if(n){for(var r="",i="",o=e.resultIndex;oi;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){if("number"!=typeof e){var n=+e;if(""+n!==e)return NaN;e=n}return 0>e?o(t)+e:e}function a(){return!0}function s(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return h(t,e,0)}function f(t,e){return h(t,e,e)}function h(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function l(t){return v(t)?t:C(t)}function p(t){return y(t)?t:z(t)}function _(t){return S(t)?t:R(t)}function d(t){return v(t)&&!g(t)?t:M(t)}function v(t){return!(!t||!t[vn])}function y(t){return!(!t||!t[yn])}function S(t){return!(!t||!t[Sn])}function g(t){return y(t)||S(t)}function m(t){return!(!t||!t[gn])}function E(t){this.next=t}function b(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function I(){return{value:void 0,done:!0}}function w(t){return!!A(t)}function O(t){return t&&"function"==typeof t.next}function T(t){var e=A(t);return e&&e.call(t)}function A(t){var e=t&&(In&&t[In]||t[wn]);return"function"==typeof e?e:void 0}function D(t){return t&&"number"==typeof t.length}function C(t){return null===t||void 0===t?H():v(t)?t.toSeq():V(t)}function z(t){return null===t||void 0===t?H().toKeyedSeq():v(t)?y(t)?t.toSeq():t.fromEntrySeq():P(t)}function R(t){return null===t||void 0===t?H():v(t)?y(t)?t.entrySeq():t.toIndexedSeq():x(t)}function M(t){return(null===t||void 0===t?H():v(t)?y(t)?t.entrySeq():t:x(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function k(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function L(t){this._iterable=t,this.size=t.length||t.size}function N(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[Tn])}function H(){return An||(An=new j([]))}function P(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():O(t)?new N(t).fromEntrySeq():w(t)?new L(t).fromEntrySeq():"object"===("undefined"==typeof t?"undefined":De(t))?new k(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function x(t){var e=q(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function V(t){var e=q(t)||"object"===("undefined"==typeof t?"undefined":De(t))&&new k(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function q(t){return D(t)?new j(t):O(t)?new N(t):w(t)?new L(t):void 0}function F(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(e(a[1],r?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,n)}function G(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new E(function(){var t=i[n?o-u:u];return u++>o?I():b(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function K(){throw TypeError("Abstract")}function Y(){}function B(){}function J(){}function W(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function X(t,e){return e?Q(e,t,"",{"":t}):Z(t)}function Q(t,e,n,r){return Array.isArray(e)?t.call(r,n,R(e).map(function(n,r){return Q(t,n,r,e)})):$(e)?t.call(r,n,z(e).map(function(n,r){return Q(t,n,r,e)})):e}function Z(t){return Array.isArray(t)?R(t).map(Z).toList():$(t)?z(t).map(Z).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e="undefined"==typeof t?"undefined":De(t);if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Ln?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Hn[t];return void 0===e&&(e=rt(t),Un===Nn&&(Un=0,Hn={}),Un++,Hn[t]=e),e}function rt(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function lt(t){var e=jt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=kt,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===bn){var r=t.__iterator(e,n);return new E(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===En?mn:En,n)},e}function pt(t,e,n){var r=jt(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,pn);return o===pn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,u){return r(e.call(n,t,i,u),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(bn,i);return new E(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return b(r,a,e.call(n,u[1],a,t),i)})},r}function _t(t,e){var n=jt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=lt(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=kt,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function dt(t,e,n,r){var i=jt(t);return r&&(i.has=function(r){var i=t.get(r,pn);return i!==pn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,pn);return o!==pn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(n,t,o,s)?(a++,i(t,r?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(bn,o),a=0;return new E(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return b(i,r?c:a++,f,o)}})},i}function vt(t,e,n){var r=Ut().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function yt(t,e,n){var r=y(t),i=(m(t)?Ie():Ut()).asMutable();t.__iterate(function(o,u){i.update(e.call(n,o,u,t),function(t){return t=t||[],t.push(r?[u,o]:o),t})});var o=Mt(t);return i.map(function(e){return Ct(t,o(e))})}function St(t,e,n,r){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==n&&(n=0|n),s(e,n,i))return t;var o=c(e,i),a=f(n,i);if(o!==o||a!==a)return St(t.toSeq().cacheResult(),e,n,r);var h,l=a-o;l===l&&(h=0>l?0:l);var p=jt(t);return p.size=0===h?h:t.size&&h||void 0,!r&&U(t)&&h>=0&&(p.get=function(e,n){return e=u(this,e),e>=0&&h>e?t.get(e+o,n):n}),p.__iterateUncached=function(e,n){var i=this;if(0===h)return 0;if(n)return this.cacheResult().__iterate(e,n);var u=0,a=!0,s=0;return t.__iterate(function(t,n){return a&&(a=u++h)return I();var t=i.next();return r||e===En?t:e===mn?b(e,a-1,void 0,t):b(e,a-1,t.value[1],t)})},p}function gt(t,e,n){var r=jt(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var u=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++u&&r(t,i,o)}),u},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var u=t.__iterator(bn,i),a=!0;return new E(function(){if(!a)return I();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===bn?t:b(r,s,c,t):(a=!1,I())})},r}function mt(t,e,n,r){var i=jt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(n,t,o,c))?void 0:(s++,i(t,r?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(bn,o),s=!0,c=0;return new E(function(){var t,o,f;do{if(t=a.next(),t.done)return r||i===En?t:i===mn?b(i,c++,void 0,t):b(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],s&&(s=e.call(n,f,o,u))}while(s);return i===bn?t:b(i,o,f,t)})},i}function Et(t,e){var n=y(t),r=[t].concat(e).map(function(t){return v(t)?n&&(t=p(t)):t=n?P(t):x(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&y(i)||S(t)&&S(i))return i}var o=new j(r);return n?o=o.toKeyedSeq():S(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),o}function bt(t,e,n){var r=jt(t);return r.__iterateUncached=function(r,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&v(t)?o(t,s+1):r(t,n?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),u=[],a=0;return new E(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(r===bn&&(s=s[1]),e&&!(u.length0}function Dt(t,e,n){var r=jt(t); return r.size=new j(n).map(function(t){return t.size}).min(),r.__iterate=function(t,e){for(var n,r=this.__iterator(En,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},r.__iteratorUncached=function(t,r){var i=n.map(function(t){return t=l(t),T(r?t.reverse():t)}),o=0,u=!1;return new E(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?I():b(t,o++,e.apply(null,n.map(function(t){return t.value})))})},r}function Ct(t,e){return U(t)?e:t.constructor(e)}function zt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Rt(t){return at(t.size),o(t)}function Mt(t){return y(t)?p:S(t)?_:d}function jt(t){return Object.create((y(t)?z:S(t)?R:M).prototype)}function kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):C.prototype.cacheResult.call(this)}function Lt(t,e){return t>e?1:e>t?-1:0}function Nt(t){var e=T(t);if(!e){if(!D(t))throw new TypeError("Expected iterable or array-like: "+t);e=T(l(t))}return e}function Ut(t){return null===t||void 0===t?Jt():Ht(t)&&!m(t)?t:Jt().withMutations(function(e){var n=p(t);at(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Ht(t){return!(!t||!t[Pn])}function Pt(t,e){this.ownerID=t,this.entries=e}function xt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function qt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Ft(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Gt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Yt(t._root)}function Kt(t,e){return b(t,e[0],e[1])}function Yt(t,e){return{node:t,index:0,__prev:e}}function Bt(t,e,n,r){var i=Object.create(xn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Jt(){return Vn||(Vn=Bt(0))}function Wt(t,n,r){var i,o;if(t._root){var u=e(_n),a=e(dn);if(i=Xt(t._root,t.__ownerID,0,void 0,n,r,u,a),!a.value)return t;o=t.size+(u.value?r===pn?-1:1:0)}else{if(r===pn)return t;o=1,i=new Pt(t.__ownerID,[[n,r]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Bt(o,i):Jt()}function Xt(t,e,r,i,o,u,a,s){return t?t.update(e,r,i,o,u,a,s):u===pn?t:(n(s),n(a),new Ft(e,i,[o,u]))}function Qt(t){return t.constructor===Ft||t.constructor===qt}function Zt(t,e,n,r,i){if(t.keyHash===r)return new qt(e,r,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&ln,a=(0===n?r:r>>>n)&ln,s=u===a?[Zt(t,e,n+fn,r,i)]:(o=new Ft(e,r,i),a>u?[t,o]:[o,t]);return new xt(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==r&&(i|=s,u[o++]=f)}return new xt(t,i,u)}function ee(t,e,n,r,i){for(var o=0,u=new Array(hn),a=0;0!==n;a++,n>>>=1)u[a]=1&n?e[o++]:void 0;return u[r]=i,new Vt(t,o+1,u)}function ne(t,e,n){for(var r=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,n,r){var o=r?t:i(t);return o[e]=n,o}function se(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=n,u=-1):o[a]=t[a+u];return o}function ce(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,u=0;r>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=de();if(null===t||void 0===t)return e;if(he(t))return t;var n=_(t),r=n.size;return 0===r?e:(at(r),r>0&&hn>r?_e(0,r,fn,null,new le(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function he(t){return!(!t||!t[Kn])}function le(t,e){this.array=t,this.ownerID=e}function pe(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===a?s&&s.array:t&&t.array,i=n>o?0:o-n,c=u-n;return c>hn&&(c=hn),function(){if(i===c)return Jn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var a,s=t&&t.array,c=i>o?0:o-i>>r,f=(u-i>>r)+1;return f>hn&&(f=hn),function(){for(;;){if(a){var t=a();if(t!==Jn)return t;a=null}if(c===f)return Jn;var o=e?--f:c++;a=n(s&&s[o],r-fn,i+(o<=t.size||0>n)return t.withMutations(function(t){0>n?me(t,n).set(0,r):me(t,0,n+1).set(n,r)});n+=t._origin;var i=t._tail,o=t._root,a=e(dn);return n>=be(t._capacity)?i=ye(i,t.__ownerID,0,n,r,a):o=ye(o,t.__ownerID,t._level,n,r,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):_e(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,r,i,o,u){var a=i>>>r&ln,s=t&&a0){var f=t&&t.array[a],h=ye(f,e,r-fn,i,o,u);return h===f?t:(c=Se(t,e),c.array[a]=h,c)}return s&&t.array[a]===o?t:(n(u),c=Se(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function Se(t,e){return e&&t&&e===t.ownerID?t:new le(t?t.array.slice():[],e)}function ge(t,e){if(e>=be(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&ln],r-=fn;return n}}function me(t,e,n){void 0!==e&&(e=0|e),void 0!==n&&(n=0|n);var i=t.__ownerID||new r,o=t._origin,u=t._capacity,a=o+e,s=void 0===n?u:0>n?u+n:o+n;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,h=0;0>a+h;)f=new le(f&&f.array.length?[void 0,f]:[],i),c+=fn,h+=1<=1<p?ge(t,s-1):p>l?new le([],i):_;if(_&&p>l&&u>a&&_.array.length){f=Se(f,i);for(var v=f,y=c;y>fn;y-=fn){var S=l>>>y&ln;v=v.array[S]=Se(v.array[S],i)}v.array[l>>>fn&ln]=_}if(u>s&&(d=d&&d.removeAfter(i,0,s)),a>=p)a-=p,s-=p,c=fn,f=null,d=d&&d.removeBefore(i,0,a);else if(a>o||l>p){for(h=0;f;){var g=a>>>c&ln;if(g!==p>>>c&ln)break;g&&(h+=(1<o&&(f=f.removeBefore(i,c,a-h)),f&&l>p&&(f=f.removeAfter(i,c,p-h)),h&&(a-=h,s-=h)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=d,t.__hash=void 0,t.__altered=!0,t):_e(a,s,c,f,d)}function Ee(t,e,n){for(var r=[],i=0,o=0;oi&&(i=a.size),v(u)||(a=a.map(function(t){return X(t)})),r.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,r)}function be(t){return hn>t?0:t-1>>>fn<=hn&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(n===u.get(a)[1])return t;r=o,i=u.set(a,[e,n])}else r=o.set(e,u.size),i=u.set(u.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Oe(r,i)}function Ce(t){return null===t||void 0===t?Me():ze(t)?t:Me().unshiftAll(t)}function ze(t){return!(!t||!t[Xn])}function Re(t,e,n,r){var i=Object.create(Qn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Me(){return Zn||(Zn=Re(0))}function je(t){return null===t||void 0===t?Ue():ke(t)&&!m(t)?t:Ue().withMutations(function(e){var n=d(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function ke(t){return!(!t||!t[$n])}function Le(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ne(t,e){var n=Object.create(tr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ue(){return er||(er=Ne(Jt()))}function He(t){return null===t||void 0===t?Ve():Pe(t)?t:Ve().withMutations(function(e){var n=d(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function Pe(t){return ke(t)&&m(t)}function xe(t,e){var n=Object.create(nr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ve(){return rr||(rr=xe(Te()))}function qe(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var u=Object.keys(t);Ke(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Ut(o)},i=r.prototype=Object.create(ir);return i.constructor=r,r}function Fe(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Ge(t){return t._name||t.constructor.name||"Record"}function Ke(t,e){try{e.forEach(Ye.bind(void 0,t))}catch(n){}}function Ye(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Be(t,e){if(t===e)return!0;if(!v(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||S(t)!==S(e)||m(t)!==m(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!g(t);if(m(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&W(i[1],t)&&(n||W(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,r){return(n?t.has(e):i?W(e,t.get(r,pn)):W(t.get(r,pn),e))?void 0:(u=!1,!1)});return u&&t.size===a}function Je(t,e,n){if(!(this instanceof Je))return new Je(t,e,n);if(ut(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(or)return or;or=this}}function We(t,e){if(!(this instanceof We))return new We(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(ur)return ur;ur=this}}function Xe(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Qe(t,e){return e}function Ze(t,e){return[e,t]}function $e(t){return function(){return!t.apply(this,arguments)}}function tn(t){return function(){return-t.apply(this,arguments)}}function en(t){return"string"==typeof t?JSON.stringify(t):t}function nn(){return i(arguments)}function rn(t,e){return e>t?1:t>e?-1:0}function on(t){if(t.size===1/0)return 0;var e=m(t),n=y(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+an(et(t),et(e))|0}:function(t,e){r=r+an(et(t),et(e))|0}:e?function(t){r=31*r+et(t)|0}:function(t){r=r+et(t)|0});return un(i,r)}function un(t,e){return e=Cn(e,3432918353),e=Cn(e<<15|e>>>-15,461845907),e=Cn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Cn(e^e>>>16,2246822507),e=Cn(e^e>>>13,3266489909),e=tt(e^e>>>16)}function an(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sn=Array.prototype.slice,cn="delete",fn=5,hn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new E(function(){return i>r?I():b(t,i,n[e?r-i++:i++])})},t(k,z),k.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},k.prototype.has=function(t){return this._object.hasOwnProperty(t)},k.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var u=r[e?i-o:o];if(t(n[u],u,this)===!1)return o+1}return o},k.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new E(function(){var u=r[e?i-o:o];return o++>i?I():b(t,u,n[u])})},k.prototype[gn]=!0,t(L,R),L.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=T(n),i=0;if(O(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},L.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=T(n);if(!O(r))return new E(I);var i=0;return new E(function(){var e=r.next();return e.done?e:b(t,i++,e.value)})},t(N,R),N.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return b(t,i,r[i++])})};var An;t(K,l),t(Y,K),t(B,K),t(J,K),K.Keyed=Y,K.Indexed=B,K.Set=J;var Dn,Cn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},zn=Object.isExtensible,Rn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Mn="function"==typeof WeakMap;Mn&&(Dn=new WeakMap);var jn=0,kn="__immutablehash__";"function"==typeof Symbol&&(kn=Symbol(kn));var Ln=16,Nn=255,Un=0,Hn={};t(st,z),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=_t(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var n=this,r=pt(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},st.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?Rt(this):0,function(i){return t(i,e?--n:n++,r)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(En,e),r=e?Rt(this):0;return new E(function(){var i=n.next();return i.done?i:b(t,e?--r:r++,i.value,i)})},st.prototype[gn]=!0,t(ct,R),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ct.prototype.__iterator=function(t,e){var n=this._iter.__iterator(En,e),r=0;return new E(function(){var e=n.next();return e.done?e:b(t,r++,e.value,e)})},t(ft,M),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},ft.prototype.__iterator=function(t,e){var n=this._iter.__iterator(En,e);return new E(function(){var e=n.next();return e.done?e:b(t,e.value,e.value,e)})},t(ht,z),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){zt(e);var r=v(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ht.prototype.__iterator=function(t,e){var n=this._iter.__iterator(En,e);return new E(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){zt(r);var i=v(r);return b(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=ht.prototype.cacheResult=kt,t(Ut,Y),Ut.prototype.toString=function(){return this.__toString("Map {","}")},Ut.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Ut.prototype.set=function(t,e){return Wt(this,t,e)},Ut.prototype.setIn=function(t,e){return this.updateIn(t,pn,function(){return e})},Ut.prototype.remove=function(t){return Wt(this,t,pn)},Ut.prototype.deleteIn=function(t){return this.updateIn(t,function(){return pn})},Ut.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Ut.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,Nt(t),e,n);return r===pn?void 0:r},Ut.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Jt()},Ut.prototype.merge=function(){return ne(this,void 0,arguments)},Ut.prototype.mergeWith=function(t){var e=sn.call(arguments,1);return ne(this,t,e)},Ut.prototype.mergeIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Jt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Ut.prototype.mergeDeep=function(){return ne(this,re(void 0),arguments)},Ut.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return ne(this,re(t),e)},Ut.prototype.mergeDeepIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Jt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Ut.prototype.sort=function(t){return Ie(Ot(this,t))},Ut.prototype.sortBy=function(t,e){return Ie(Ot(this,e,t))},Ut.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Ut.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},Ut.prototype.asImmutable=function(){return this.__ensureOwner()},Ut.prototype.wasAltered=function(){return this.__altered},Ut.prototype.__iterator=function(t,e){return new Gt(this,t,e)},Ut.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},Ut.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Bt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ut.isMap=Ht;var Pn="@@__IMMUTABLE_MAP__@@",xn=Ut.prototype;xn[Pn]=!0,xn[cn]=xn.remove,xn.removeIn=xn.deleteIn,Pt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(W(n,i[o][0]))return i[o][1];return r},Pt.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===pn,f=this.entries,h=0,l=f.length;l>h&&!W(o,f[h][0]);h++);var p=l>h;if(p?f[h][1]===u:c)return this;if(n(s),(c||!p)&&n(a),!c||1!==f.length){if(!p&&!c&&f.length>=qn)return $t(t,f,o,u);var _=t&&t===this.ownerID,d=_?f:i(f);return p?c?h===l-1?d.pop():d[h]=d.pop():d[h]=[o,u]:d.push([o,u]),_?(this.entries=d,this):new Pt(t,d)}},xt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+fn,e,n,r)},xt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=1<=Fn)return ee(t,l,c,a,_);if(f&&!_&&2===l.length&&Qt(l[1^h]))return l[1^h];if(f&&_&&1===l.length&&Qt(_))return _;var d=t&&t===this.ownerID,v=f?_?c:c^s:c|s,y=f?_?ae(l,h,_,d):ce(l,h,d):se(l,h,_,d);return d?(this.bitmap=v,this.nodes=y,this):new xt(t,v,y)},Vt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&ln,o=this.nodes[i];return o?o.get(t+fn,e,n,r):r},Vt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=i===pn,c=this.nodes,f=c[a];if(s&&!f)return this;var h=Xt(f,t,e+fn,n,r,i,o,u);if(h===f)return this;var l=this.count;if(f){if(!h&&(l--,Gn>l))return te(t,c,l,a)}else l++;var p=t&&t===this.ownerID,_=ae(c,a,h,p);return p?(this.count=l,this.nodes=_,this):new Vt(t,l,_)},qt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(W(n,i[o][0]))return i[o][1];return r},qt.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===pn;if(r!==this.keyHash)return c?this:(n(s),n(a),Zt(this,t,e,r,[o,u]));for(var f=this.entries,h=0,l=f.length;l>h&&!W(o,f[h][0]);h++);var p=l>h;if(p?f[h][1]===u:c)return this;if(n(s),(c||!p)&&n(a),c&&2===l)return new Ft(t,this.keyHash,f[1^h]);var _=t&&t===this.ownerID,d=_?f:i(f);return p?c?h===l-1?d.pop():d[h]=d.pop():d[h]=[o,u]:d.push([o,u]),_?(this.entries=d,this):new qt(t,this.keyHash,d)},Ft.prototype.get=function(t,e,n,r){return W(n,this.entry[0])?this.entry[1]:r},Ft.prototype.update=function(t,e,r,i,o,u,a){var s=o===pn,c=W(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(n(a),s?void n(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Ft(t,this.keyHash,[i,o]):(n(u),Zt(this,t,e,et(i),[i,o])))},Pt.prototype.iterate=qt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},xt.prototype.iterate=Vt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Ft.prototype.iterate=function(t,e){return t(this.entry)},t(Gt,E),Gt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return Kt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return Kt(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Kt(t,o.entry);e=this._stack=Yt(o,e)}continue}e=this._stack=this._stack.__prev}return I()};var Vn,qn=hn/4,Fn=hn/2,Gn=hn/4;t(fe,B),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&ln;if(r>=this.array.length)return new le([],t);var i,o=0===r;if(e>0){var u=this.array[r];if(i=u&&u.removeBefore(t,e-fn,n),i===u&&o)return this}if(o&&!i)return this;var a=Se(this,t);if(!o)for(var s=0;r>s;s++)a.array[s]=void 0;return i&&(a.array[r]=i),a},le.prototype.removeAfter=function(t,e,n){if(n===(e?1<>>e&ln;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-fn,n),i===o&&r===this.array.length-1)return this}var u=Se(this,t);return u.array.splice(r+1),i&&(u.array[r]=i),u};var Bn,Jn={};t(Ie,Ut),Ie.of=function(){return this(arguments)},Ie.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ie.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Te()},Ie.prototype.set=function(t,e){return Ae(this,t,e)},Ie.prototype.remove=function(t){return Ae(this,t,pn)},Ie.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ie.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Ie.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ie.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Oe(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Ie.isOrderedMap=we,Ie.prototype[gn]=!0,Ie.prototype[cn]=Ie.prototype.remove;var Wn;t(Ce,B),Ce.of=function(){return this(arguments)},Ce.prototype.toString=function(){return this.__toString("Stack [","]")},Ce.prototype.get=function(t,e){var n=this._head;for(t=u(this,t);n&&t--;)n=n.next;return n?n.value:e},Ce.prototype.peek=function(){return this._head&&this._head.value},Ce.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Re(t,e)},Ce.prototype.pushAll=function(t){if(t=_(t),0===t.size)return this;at(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Re(e,n)},Ce.prototype.pop=function(){return this.slice(1)},Ce.prototype.unshift=function(){return this.push.apply(this,arguments)},Ce.prototype.unshiftAll=function(t){return this.pushAll(t)},Ce.prototype.shift=function(){return this.pop.apply(this,arguments)},Ce.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Me()},Ce.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var n=c(t,this.size),r=f(e,this.size);if(r!==this.size)return B.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Re(i,o)},Ce.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Re(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ce.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},Ce.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new E(function(){if(r){var e=r.value;return r=r.next,b(t,n++,e)}return I()})},Ce.isStack=ze;var Xn="@@__IMMUTABLE_STACK__@@",Qn=Ce.prototype;Qn[Xn]=!0,Qn.withMutations=xn.withMutations,Qn.asMutable=xn.asMutable,Qn.asImmutable=xn.asImmutable,Qn.wasAltered=xn.wasAltered;var Zn;t(je,J),je.of=function(){return this(arguments)},je.fromKeys=function(t){return this(p(t).keySeq())},je.prototype.toString=function(){return this.__toString("Set {","}")},je.prototype.has=function(t){return this._map.has(t)},je.prototype.add=function(t){return Le(this,this._map.set(t,!0))},je.prototype.remove=function(t){return Le(this,this._map.remove(t))},je.prototype.clear=function(){return Le(this,this._map.clear())},je.prototype.union=function(){var t=sn.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n1?" by "+this._step:"")+" ]"},Je.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Je.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Je(0,0):new Je(this.get(t,this._end),this.get(e,this._end),this._step))},Je.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},Je.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new E(function(){var u=i;return i+=e?-r:r,o>n?I():b(t,o++,u)})},Je.prototype.equals=function(t){return t instanceof Je?this._start===t._start&&this._end===t._end&&this._step===t._step:Be(this,t)};var or;t(We,R),We.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},We.prototype.get=function(t,e){return this.has(t)?this._value:e},We.prototype.includes=function(t){return W(this._value,t)},We.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new We(this._value,f(e,n)-c(t,n))},We.prototype.reverse=function(){return this},We.prototype.indexOf=function(t){return W(this._value,t)?0:-1},We.prototype.lastIndexOf=function(t){return W(this._value,t)?this.size:-1},We.prototype.__iterate=function(t,e){for(var n=0;nt?this.count():this.size);var r=this.slice(0,t);return Ct(this,1===n?r:r.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return Ct(this,bt(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===n(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===n(t)},"function"!=typeof/./&&"object"!==("undefined"==typeof Int8Array?"undefined":De(Int8Array))?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e="undefined"==typeof t?"undefined":De(t);return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var n=1;e>n;n++)for(var r=arguments[n],i=Object.keys(r),o=i.length,u=0;o>u;u++){var a=i[u];t[a]=r[a]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,n){var i,o,u=t?t.length:0,a=-1;if(n&&(o=e,e=function(t,e,r){return o.call(n,t,e,r)}),r(u))for(;++ar;r++)n[r]=arguments[r];return new(i.apply(t,[null].concat(n)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!(0,f.isObject)(t)}function u(t){return i(t)?t.toJS():t}function a(t){return i(t)?t:c["default"].fromJS(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=u,e.toImmutable=a;var s=n(3),c=r(s),f=n(4)},function(t,e,n){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var n=c["default"].Set().withMutations(function(n){n.union(t.observerState.get("any")),e.forEach(function(e){var r=t.observerState.getIn(["stores",e]);r&&n.union(r)})});n.forEach(function(e){var n=t.observerState.getIn(["observersMap",e]);if(n){var r=n.get("getter"),i=n.get("handler"),o=p.evaluate(t.prevReactorState,r),u=p.evaluate(t.reactorState,r);t.prevReactorState=o.reactorState,t.reactorState=u.reactorState;var a=o.result,s=u.result;c["default"].is(a,s)||i.call(null,s)}});var r=p.resetDirtyStores(this.reactorState);this.prevReactorState=r,this.reactorState=r}}}},{key:"batchStart",value:function(){this.__batchDepth++}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=(0,y.toFactory)(g),t.exports=e["default"]},function(t,e,n){function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n={};return(0,o.each)(e,function(e,r){n[r]=t.evaluate(e)}),n}Object.defineProperty(e,"__esModule",{value:!0});var o=n(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],(0,o.each)(this.getDataBindings(),function(n,i){var o=t.observe(n,function(t){e.setState(r({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new M({result:t,reactorState:e})}function o(t,e){return t.withMutations(function(t){(0,R.each)(e,function(e,n){t.getIn(["stores",n])&&console.warn("Store already defined for id = "+n);var r=e.getInitialState();if(void 0===r&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store getInitialState() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,D.isImmutableValue)(r))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(n,e)}).update("state",function(t){return t.set(n,r)}).update("dirtyStores",function(t){return t.add(n)}).update("storeStates",function(t){return I(t,[n])})}),b(t)})}function u(t,e){return t.withMutations(function(t){(0,R.each)(e,function(e,n){t.update("stores",function(t){return t.set(n,e)})})})}function a(t,e,n){if(void 0===e&&f(t,"throwOnUndefinedActionType"))throw new Error("`dispatch` cannot be called with an `undefined` action type.");var r=t.get("state"),i=t.get("dirtyStores"),o=r.withMutations(function(r){A["default"].dispatchStart(t,e,n),t.get("stores").forEach(function(o,u){var a=r.get(u),s=void 0;try{s=o.handle(a,e,n)}catch(c){throw A["default"].dispatchError(t,c.message),c}if(void 0===s&&f(t,"throwOnUndefinedStoreReturnValue")){var h="Store handler must return a value, did you forget a return statement";throw A["default"].dispatchError(t,h),new Error(h)}r.set(u,s),a!==s&&(i=i.add(u))}),A["default"].dispatchEnd(t,r,i)}),u=t.set("state",o).set("dirtyStores",i).update("storeStates",function(t){return I(t,i)});return b(u)}function s(t,e){var n=[],r=(0,D.toImmutable)({}).withMutations(function(r){(0,R.each)(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var u=o.deserialize(e);void 0!==u&&(r.set(i,u),n.push(i))}})}),i=O["default"].Set(n);return t.update("state",function(t){return t.merge(r)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return I(t,n)})}function c(t,e,n){var r=e;(0,z.isKeyPath)(e)&&(e=(0,C.fromKeyPath)(e));var i=t.get("nextId"),o=(0,C.getStoreDeps)(e),u=O["default"].Map({id:i,storeDeps:o,getterKey:r,getter:e,handler:n}),a=void 0;return a=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var n=["stores",e];t.hasIn(n)||t.setIn(n,O["default"].Set()),t.updateIn(["stores",e],function(t){return t.add(i)})})}),a=a.set("nextId",i+1).setIn(["observersMap",i],u),{observerState:a,entry:u}}function f(t,e){var n=t.getIn(["options",e]);if(void 0===n)throw new Error("Invalid option: "+e);return n}function h(t,e,n){var r=t.get("observersMap").filter(function(t){var r=t.get("getterKey"),i=!n||t.get("handler")===n;return i?(0,z.isKeyPath)(e)&&(0,z.isKeyPath)(r)?(0,z.isEqual)(e,r):e===r:!1});return t.withMutations(function(t){r.forEach(function(e){return l(t,e)})})}function l(t,e){return t.withMutations(function(t){var n=e.get("id"),r=e.get("storeDeps");0===r.size?t.update("any",function(t){return t.remove(n)}):r.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(n):t})}),t.removeIn(["observersMap",n])})}function p(t){var e=t.get("state");return t.withMutations(function(t){var n=t.get("stores"),r=n.keySeq().toJS();n.forEach(function(n,r){var i=e.get(r),o=n.handleReset(i);if(void 0===o&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store handleReset() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,D.isImmutableValue)(o))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",r],o)}),t.update("storeStates",function(t){return I(t,r)}),v(t)})}function _(t,e){var n=t.get("state");if((0,z.isKeyPath)(e))return i(n.getIn(e),t);if(!(0,C.isGetter)(e))throw new Error("evaluate must be passed a keyPath or Getter");if(g(t,e))return i(E(t,e),t);var r=(0,C.getDeps)(e).map(function(e){return _(t,e).result}),o=(0,C.getComputeFn)(e).apply(null,r);return i(o,m(t,e,o))}function d(t){var e={};return t.get("stores").forEach(function(n,r){var i=t.getIn(["state",r]),o=n.serialize(i);void 0!==o&&(e[r]=o)}),e}function v(t){return t.set("dirtyStores",O["default"].Set())}function y(t){return t}function S(t,e){var n=y(e);return t.getIn(["cache",n])}function g(t,e){var n=S(t,e);if(!n)return!1;var r=n.get("storeStates");return 0===r.size?!1:r.every(function(e,n){return t.getIn(["storeStates",n])===e})}function m(t,e,n){var r=y(e),i=t.get("dispatchId"),o=(0,C.getStoreDeps)(e),u=(0,D.toImmutable)({}).withMutations(function(e){o.forEach(function(n){var r=t.getIn(["storeStates",n]);e.set(n,r)})});return t.setIn(["cache",r],O["default"].Map({value:n,storeStates:u,dispatchId:i}))}function E(t,e){var n=y(e);return t.getIn(["cache",n,"value"])}function b(t){return t.update("dispatchId",function(t){return t+1})}function I(t,e){return t.withMutations(function(t){e.forEach(function(e){var n=t.has(e)?t.get(e)+1:1;t.set(e,n)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.registerStores=o,e.replaceStores=u,e.dispatch=a,e.loadState=s,e.addObserver=c,e.getOption=f,e.removeObserver=h,e.removeObserverByEntry=l,e.reset=p,e.evaluate=_,e.serialize=d,e.resetDirtyStores=v;var w=n(3),O=r(w),T=n(9),A=r(T),D=n(5),C=n(10),z=n(11),R=n(4),M=O["default"].Record({result:null,reactorState:null})},function(t,e,n){var r=n(8);e.dispatchStart=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.groupCollapsed("Dispatch: %s",e),console.group("payload"),console.debug(n),console.groupEnd())},e.dispatchError=function(t,e){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.debug("Dispatch error: "+e),console.groupEnd())},e.dispatchEnd=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&((0,r.getOption)(t,"logDirtyStores")&&console.log("Stores updated:",n.toList().toJS()),(0,r.getOption)(t,"logAppState")&&console.debug("Dispatch done, new state: ",e.toJS()),console.groupEnd())}},function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,l.isArray)(t)&&(0,l.isFunction)(t[t.length-1])}function o(t){return t[t.length-1]}function u(t){return t.slice(0,t.length-1)}function a(t,e){e||(e=h["default"].Set());var n=h["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");u(t).forEach(function(t){if((0,p.isKeyPath)(t))e.add((0,f.List)(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(a(t))}})});return e.union(n)}function s(t){if(!(0,p.isKeyPath)(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,_]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=a(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var f=n(3),h=r(f),l=n(4),p=n(11),_=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:a,getStoreDeps:c,getDeps:u,fromKeyPath:s},t.exports=e["default"]},function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,s.isArray)(t)&&!(0,s.isFunction)(t[t.length-1])}function o(t,e){var n=a["default"].List(t),r=a["default"].List(e);return a["default"].is(n,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var u=n(3),a=r(u),s=n(4)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=(0,r.Map)({logDispatches:!1,logAppState:!1,logDirtyStores:!1,throwOnUndefinedActionType:!1,throwOnUndefinedStoreReturnValue:!1,throwOnNonImmutableStore:!1,throwOnDispatchInDispatch:!1});e.PROD_OPTIONS=i;var o=(0,r.Map)({logDispatches:!0,logAppState:!0,logDirtyStores:!0,throwOnUndefinedActionType:!0,throwOnUndefinedStoreReturnValue:!0,throwOnNonImmutableStore:!0,throwOnDispatchInDispatch:!0});e.DEBUG_OPTIONS=o;var u=(0,r.Record)({dispatchId:0,state:(0,r.Map)(),stores:(0,r.Map)(),cache:(0,r.Map)(),storeStates:(0,r.Map)(),dirtyStores:(0,r.Set)(),debug:!1,options:i});e.ReactorState=u;var a=(0,r.Record)({any:(0,r.Set)(),stores:(0,r.Map)({}),observersMap:(0,r.Map)({}),nextId:1});e.ObserverState=a}])})}),Re=ze&&"object"===("undefined"==typeof ze?"undefined":De(ze))&&"default"in ze?ze["default"]:ze,Me=o(function(t){var e=function(t){var e,n={};if(!(t instanceof Object)||Array.isArray(t))throw new Error("keyMirror(...): Argument must be an object.");for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=e}),je=Me&&"object"===("undefined"==typeof Me?"undefined":De(Me))&&"default"in Me?Me["default"]:Me,ke=je({VALIDATING_AUTH_TOKEN:null,VALID_AUTH_TOKEN:null,INVALID_AUTH_TOKEN:null,LOG_OUT:null}),Le=Re.Store,Ne=Re.toImmutable,Ue=new Le({getInitialState:function(){return Ne({isValidating:!1,authToken:!1,host:null,isInvalid:!1,errorMessage:""})},initialize:function(){this.on(ke.VALIDATING_AUTH_TOKEN,u),this.on(ke.VALID_AUTH_TOKEN,a),this.on(ke.INVALID_AUTH_TOKEN,s)}}),He=Re.Store,Pe=Re.toImmutable,xe=new He({getInitialState:function(){return Pe({authToken:null,host:""})},initialize:function(){this.on(ke.VALID_AUTH_TOKEN,c),this.on(ke.LOG_OUT,f)}}),Ve=Re.Store,qe=new Ve({getInitialState:function(){return!0},initialize:function(){this.on(ke.VALID_AUTH_TOKEN,h)}}),Fe=je({STREAM_START:null,STREAM_STOP:null,STREAM_ERROR:null}),Ge="object"===("undefined"==typeof window?"undefined":De(window))&&"EventSource"in window,Ke=Re.Store,Ye=Re.toImmutable,Be=new Ke({getInitialState:function(){return Ye({isSupported:Ge,isStreaming:!1,useStreaming:!0,hasError:!1})},initialize:function(){this.on(Fe.STREAM_START,l),this.on(Fe.STREAM_STOP,p),this.on(Fe.STREAM_ERROR,_),this.on(Fe.LOG_OUT,d)}}),Je=o(function(t){function e(){return(new Date).getTime()}t.exports=Date.now||e}),We=Je&&"object"===("undefined"==typeof Je?"undefined":De(Je))&&"default"in Je?Je["default"]:Je,Xe=o(function(t){var e=We;t.exports=function(t,n,r){function i(){var f=e()-s;n>f&&f>0?o=setTimeout(i,n-f):(o=null,r||(c=t.apply(a,u),o||(a=u=null)))}var o,u,a,s,c;return null==n&&(n=100),function(){a=this,u=arguments,s=e();var f=r&&!o;return o||(o=setTimeout(i,n)),f&&(c=t.apply(a,u),a=u=null),c}}}),Qe=Xe&&"object"===("undefined"==typeof Xe?"undefined":De(Xe))&&"default"in Xe?Xe["default"]:Xe,Ze=je({API_FETCH_ALL_START:null,API_FETCH_ALL_SUCCESS:null,API_FETCH_ALL_FAIL:null,SYNC_SCHEDULED:null,SYNC_SCHEDULE_CANCELLED:null}),$e=Re.Store,tn=new $e({getInitialState:function(){return!0},initialize:function(){this.on(Ze.API_FETCH_ALL_START,function(){return!0}),this.on(Ze.API_FETCH_ALL_SUCCESS,function(){return!1}),this.on(Ze.API_FETCH_ALL_FAIL,function(){return!1}),this.on(Ze.LOG_OUT,function(){return!1})}}),en=Re.Store,nn=new en({getInitialState:function(){return!1},initialize:function(){this.on(Ze.SYNC_SCHEDULED,function(){return!0}),this.on(Ze.SYNC_SCHEDULE_CANCELLED,function(){return!1}),this.on(Ze.LOG_OUT,function(){return!1})}}),rn=je({API_FETCH_SUCCESS:null,API_FETCH_START:null,API_FETCH_FAIL:null,API_SAVE_SUCCESS:null,API_SAVE_START:null,API_SAVE_FAIL:null,API_DELETE_SUCCESS:null,API_DELETE_START:null,API_DELETE_FAIL:null,LOG_OUT:null}),on=Re.Store,un=Re.toImmutable,an=new on({getInitialState:function(){return un({})},initialize:function(){var t=this;this.on(rn.API_FETCH_SUCCESS,v),this.on(rn.API_SAVE_SUCCESS,v),this.on(rn.API_DELETE_SUCCESS,y),this.on(rn.LOG_OUT,function(){return t.getInitialState()})}}),sn=o(function(t){function e(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function n(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;10>n;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(o){return!1}}var r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=n()?Object.assign:function(t,n){for(var o,u,a=e(t),s=1;so&&(e=t[o]);o++)e._distributeContent();this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._distributionClean=!0,h.hasInsertionPoint(this.shadyRoot))this._composeTree(),d(this.shadyRoot);else if(this.shadyRoot._hasDistributed){var e=this._composeNode(this);this._updateChildNodes(this,e)}else u.Composed.clearChildNodes(this),this.appendChild(this.shadyRoot);this.shadyRoot._hasDistributed||a(this),this.shadyRoot._hasDistributed=!0}},elementMatches:function(e,t){return t=t||this,h.matchesSelector.call(t,e)},_resetDistribution:function(){for(var e=u.Logical.getChildNodes(this),o=0;os&&(i=n[s]);s++)this._distributeInsertionPoint(i,t),o(i,this)},_distributeInsertionPoint:function(t,o){for(var i,n=!1,s=0,r=o.length;r>s;s++)i=o[s],i&&this._matchesContentSelect(i,t)&&(e(i,t),o[s]=void 0,n=!0);if(!n)for(var d=u.Logical.getChildNodes(t),a=0;ai&&(e=o[i]);i++)t=u.Logical.getParentNode(e),t._useContent||t===this||t===this.shadyRoot||this._updateChildNodes(t,this._composeNode(t))},_composeNode:function(e){for(var t=[],o=u.Logical.getChildNodes(e.shadyRoot||e),s=0;s0?~setTimeout(e,t):(this._twiddle.textContent=this._twiddleContent++,this._callbacks.push(e),this._currVal++)},cancel:function(e){if(0>e)clearTimeout(~e);else{var t=e-this._lastVal;if(t>=0){if(!this._callbacks[t])throw"invalid async handle: "+e;this._callbacks[t]=null}}},_atEndOfMicrotask:function(){for(var e=this._callbacks.length,t=0;e>t;t++){var o=this._callbacks[t];if(o)try{o()}catch(i){throw t++,this._callbacks.splice(0,t),this._lastVal+=t,this._twiddle.textContent=this._twiddleContent++,i}}this._callbacks.splice(0,e),this._lastVal+=e}},new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()}).observe(Polymer.Async._twiddle,{characterData:!0}),Polymer.Debounce=function(){function e(e,t,i){return e?e.stop():e=new o(this),e.go(t,i),e}var t=Polymer.Async,o=function(e){this.context=e;var t=this;this.boundComplete=function(){t.complete()}};return o.prototype={go:function(e,o){var i;this.finish=function(){t.cancel(i)},i=t.run(this.boundComplete,o),this.callback=e},stop:function(){this.finish&&(this.finish(),this.finish=null)},complete:function(){this.finish&&(this.stop(),this.callback.call(this.context))}},e}(),Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(e,t,o){return this._debouncers[e]=Polymer.Debounce.call(this,this._debouncers[e],t,o)},isDebouncerActive:function(e){var t=this._debouncers[e];return!(!t||!t.finish)},flushDebouncer:function(e){var t=this._debouncers[e];t&&t.complete()},cancelDebouncer:function(e){var t=this._debouncers[e];t&&t.stop()}}),Polymer.DomModule=document.createElement("dom-module"),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepTemplate(),this._prepShady(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_initFeatures:function(){this._registerHost(),this._template&&(this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting()),this._marshalHostAttributes(),this._setupDebouncers(),this._marshalBehaviors(),this._tryReady()},_marshalBehavior:function(e){}})- \ No newline at end of file +return this._week.doy}function Kt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function en(e){var t=Oe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function tn(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function nn(e,t){return i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]}function rn(e){return this._weekdaysShort[e.day()]}function an(e){return this._weekdaysMin[e.day()]}function sn(e,t,n){var i,r,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;7>i;++i)a=u([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?(r=mi.call(this._weekdaysParse,s),-1!==r?r:null):"ddd"===t?(r=mi.call(this._shortWeekdaysParse,s),-1!==r?r:null):(r=mi.call(this._minWeekdaysParse,s),-1!==r?r:null):"dddd"===t?(r=mi.call(this._weekdaysParse,s),-1!==r?r:(r=mi.call(this._shortWeekdaysParse,s),-1!==r?r:(r=mi.call(this._minWeekdaysParse,s),-1!==r?r:null))):"ddd"===t?(r=mi.call(this._shortWeekdaysParse,s),-1!==r?r:(r=mi.call(this._weekdaysParse,s),-1!==r?r:(r=mi.call(this._minWeekdaysParse,s),-1!==r?r:null))):(r=mi.call(this._minWeekdaysParse,s),-1!==r?r:(r=mi.call(this._weekdaysParse,s),-1!==r?r:(r=mi.call(this._shortWeekdaysParse,s),-1!==r?r:null)))}function on(e,t,n){var i,r,a;if(this._weekdaysParseExact)return sn.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;7>i;i++){if(r=u([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function un(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=tn(e,this.localeData()),this.add(e-t,"d")):t}function cn(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function ln(e){return this.isValid()?null==e?this.day()||7:this.day(this.day()%7?e:e-7):null!=e?this:NaN}function dn(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||mn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}function hn(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||mn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function fn(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||mn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function mn(){function e(e,t){return t.length-e.length}var t,n,i,r,a,s=[],o=[],c=[],l=[];for(t=0;7>t;t++)n=u([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),a=this.weekdays(n,""),s.push(i),o.push(r),c.push(a),l.push(i),l.push(r),l.push(a);for(s.sort(e),o.sort(e),c.sort(e),l.sort(e),t=0;7>t;t++)o[t]=X(o[t]),c[t]=X(c[t]),l[t]=X(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function pn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function yn(){return this.hours()%12||12}function gn(){return this.hours()||24}function vn(e,t){R(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function _n(e,t){return t._meridiemParse}function bn(e){return"p"===(e+"").toLowerCase().charAt(0)}function wn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Sn(e,t){t[zi]=v(1e3*("0."+e))}function On(){return this._isUTC?"UTC":""}function kn(){return this._isUTC?"Coordinated Universal Time":""}function Dn(e){return He(1e3*e)}function Cn(){return He.apply(null,arguments).parseZone()}function Mn(e,t,n){var i=this._calendar[e];return O(i)?i.call(t,n):i}function jn(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function Tn(){return this._invalidDate}function xn(e){return this._ordinal.replace("%d",e)}function Yn(e){return e}function Pn(e,t,n,i){var r=this._relativeTime[n];return O(r)?r(e,t,n,i):r.replace(/%d/i,e)}function In(e,t){var n=this._relativeTime[e>0?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)}function An(e,t,n,i){var r=A(),a=u().set(i,t);return r[n](a,e)}function Nn(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return An(e,t,n,"month");var i,r=[];for(i=0;12>i;i++)r[i]=An(e,i,n,"month");return r}function Bn(e,t,n,i){"boolean"==typeof e?("number"==typeof t&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,"number"==typeof t&&(n=t,t=void 0),t=t||"");var r=A(),a=e?r._week.dow:0;if(null!=n)return An(t,(n+a)%7,i,"day");var s,o=[];for(s=0;7>s;s++)o[s]=An(t,(s+a)%7,i,"day");return o}function Hn(e,t){return Nn(e,t,"months")}function Ln(e,t){return Nn(e,t,"monthsShort")}function Gn(e,t,n){return Bn(e,t,n,"weekdays")}function En(e,t,n){return Bn(e,t,n,"weekdaysShort")}function Wn(e,t,n){return Bn(e,t,n,"weekdaysMin")}function Vn(){var e=this._data;return this._milliseconds=Gr(this._milliseconds),this._days=Gr(this._days),this._months=Gr(this._months),e.milliseconds=Gr(e.milliseconds),e.seconds=Gr(e.seconds),e.minutes=Gr(e.minutes),e.hours=Gr(e.hours),e.months=Gr(e.months),e.years=Gr(e.years),this}function Fn(e,t,n,i){var r=rt(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Rn(e,t){return Fn(this,e,t,1)}function Un(e,t){return Fn(this,e,t,-1)}function zn(e){return 0>e?Math.floor(e):Math.ceil(e)}function $n(){var e,t,n,i,r,a=this._milliseconds,s=this._days,o=this._months,u=this._data;return a>=0&&s>=0&&o>=0||0>=a&&0>=s&&0>=o||(a+=864e5*zn(Jn(o)+s),s=0,o=0),u.milliseconds=a%1e3,e=g(a/1e3),u.seconds=e%60,t=g(e/60),u.minutes=t%60,n=g(t/60),u.hours=n%24,s+=g(n/24),r=g(Zn(s)),o+=r,s-=zn(Jn(r)),i=g(o/12),o%=12,u.days=s,u.months=o,u.years=i,this}function Zn(e){return 4800*e/146097}function Jn(e){return 146097*e/4800}function qn(e){var t,n,i=this._milliseconds;if(e=H(e),"month"===e||"year"===e)return t=this._days+i/864e5,n=this._months+Zn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Jn(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function Qn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function Xn(e){return function(){return this.as(e)}}function Kn(e){return e=H(e),this[e+"s"]()}function ei(e){return function(){return this._data[e]}}function ti(){return g(this.days()/7)}function ni(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function ii(e,t,n){var i=rt(e).abs(),r=ta(i.as("s")),a=ta(i.as("m")),s=ta(i.as("h")),o=ta(i.as("d")),u=ta(i.as("M")),c=ta(i.as("y")),l=r=a&&["m"]||a=s&&["h"]||s=o&&["d"]||o=u&&["M"]||u=c&&["y"]||["yy",c];return l[2]=t,l[3]=+e>0,l[4]=n,ni.apply(null,l)}function ri(e,t){return void 0===na[e]?!1:void 0===t?na[e]:(na[e]=t,!0)}function ai(e){var t=this.localeData(),n=ii(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function si(){var e,t,n,i=ia(this._milliseconds)/1e3,r=ia(this._days),a=ia(this._months);e=g(i/60),t=g(e/60),i%=60,e%=60,n=g(a/12),a%=12;var s=n,o=a,u=r,c=t,l=e,d=i,h=this.asSeconds();return h?(0>h?"-":"")+"P"+(s?s+"Y":"")+(o?o+"M":"")+(u?u+"D":"")+(c||l||d?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(d?d+"S":""):"P0D"}var oi,ui;ui=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,i=0;n>i;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};var ci=t.momentProperties=[],li=!1,di={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var hi;hi=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var fi,mi,pi={},yi={},gi=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,vi=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,_i={},bi={},wi=/\d/,Si=/\d\d/,Oi=/\d{3}/,ki=/\d{4}/,Di=/[+-]?\d{6}/,Ci=/\d\d?/,Mi=/\d\d\d\d?/,ji=/\d\d\d\d\d\d?/,Ti=/\d{1,3}/,xi=/\d{1,4}/,Yi=/[+-]?\d{1,6}/,Pi=/\d+/,Ii=/[+-]?\d+/,Ai=/Z|[+-]\d\d:?\d\d/gi,Ni=/Z|[+-]\d\d(?::?\d\d)?/gi,Bi=/[+-]?\d+(\.\d{1,3})?/,Hi=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Li={},Gi={},Ei=0,Wi=1,Vi=2,Fi=3,Ri=4,Ui=5,zi=6,$i=7,Zi=8;mi=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=e?""+e:"+"+e}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),B("year","y"),J("Y",Ii),J("YY",Ci,Si),J("YYYY",xi,ki),J("YYYYY",Yi,Di),J("YYYYYY",Yi,Di),K(["YYYYY","YYYYYY"],Ei),K("YYYY",function(e,n){n[Ei]=2===e.length?t.parseTwoDigitYear(e):v(e)}),K("YY",function(e,n){n[Ei]=t.parseTwoDigitYear(e)}),K("Y",function(e,t){t[Ei]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return v(e)+(v(e)>68?1900:2e3)};var sr=G("FullYear",!0);t.ISO_8601=function(){};var or=w("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var e=He.apply(null,arguments);return this.isValid()&&e.isValid()?this>e?this:e:h()}),ur=w("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=He.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:h()}),cr=function(){return Date.now?Date.now():+new Date};Fe("Z",":"),Fe("ZZ",""),J("Z",Ni),J("ZZ",Ni),K(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Re(Ni,e)});var lr=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var dr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,hr=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;rt.fn=We.prototype;var fr=ct(1,"add"),mr=ct(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var pr=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Vt("gggg","weekYear"),Vt("ggggg","weekYear"),Vt("GGGG","isoWeekYear"),Vt("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),J("G",Ii),J("g",Ii),J("GG",Ci,Si),J("gg",Ci,Si),J("GGGG",xi,ki),J("gggg",xi,ki),J("GGGGG",Yi,Di),J("ggggg",Yi,Di),ee(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=v(e)}),ee(["gg","GG"],function(e,n,i,r){n[r]=t.parseTwoDigitYear(e)}),R("Q",0,"Qo","quarter"),B("quarter","Q"),J("Q",wi),K("Q",function(e,t){t[Wi]=3*(v(e)-1)}),R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),J("w",Ci),J("ww",Ci,Si),J("W",Ci),J("WW",Ci,Si),ee(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=v(e)});var yr={dow:0,doy:6};R("D",["DD",2],"Do","date"),B("date","D"),J("D",Ci),J("DD",Ci,Si),J("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),K(["D","DD"],Vi),K("Do",function(e,t){t[Vi]=v(e.match(Ci)[0],10)});var gr=G("Date",!0);R("d",0,"do","day"),R("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),R("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),R("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),J("d",Ci),J("e",Ci),J("E",Ci),J("dd",function(e,t){return t.weekdaysMinRegex(e)}),J("ddd",function(e,t){return t.weekdaysShortRegex(e)}),J("dddd",function(e,t){return t.weekdaysRegex(e)}),ee(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:l(n).invalidWeekday=e}),ee(["d","e","E"],function(e,t,n,i){t[i]=v(e)});var vr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),_r="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),br="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wr=Hi,Sr=Hi,Or=Hi;R("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),J("DDD",Ti),J("DDDD",Oi),K(["DDD","DDDD"],function(e,t,n){n._dayOfYear=v(e)}),R("H",["HH",2],0,"hour"),R("h",["hh",2],0,yn),R("k",["kk",2],0,gn),R("hmm",0,0,function(){return""+yn.apply(this)+F(this.minutes(),2)}),R("hmmss",0,0,function(){return""+yn.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),vn("a",!0),vn("A",!1),B("hour","h"),J("a",_n),J("A",_n),J("H",Ci),J("h",Ci),J("HH",Ci,Si),J("hh",Ci,Si),J("hmm",Mi),J("hmmss",ji),J("Hmm",Mi),J("Hmmss",ji),K(["H","HH"],Fi),K(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),K(["h","hh"],function(e,t,n){t[Fi]=v(e),l(n).bigHour=!0}),K("hmm",function(e,t,n){var i=e.length-2;t[Fi]=v(e.substr(0,i)),t[Ri]=v(e.substr(i)),l(n).bigHour=!0}),K("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[Fi]=v(e.substr(0,i)),t[Ri]=v(e.substr(i,2)),t[Ui]=v(e.substr(r)),l(n).bigHour=!0}),K("Hmm",function(e,t,n){var i=e.length-2;t[Fi]=v(e.substr(0,i)),t[Ri]=v(e.substr(i))}),K("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[Fi]=v(e.substr(0,i)),t[Ri]=v(e.substr(i,2)),t[Ui]=v(e.substr(r))});var kr=/[ap]\.?m?\.?/i,Dr=G("Hours",!0);R("m",["mm",2],0,"minute"),B("minute","m"),J("m",Ci),J("mm",Ci,Si),K(["m","mm"],Ri);var Cr=G("Minutes",!1);R("s",["ss",2],0,"second"),B("second","s"),J("s",Ci),J("ss",Ci,Si),K(["s","ss"],Ui);var Mr=G("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return 10*this.millisecond()}),R(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),R(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),R(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),R(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),R(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),B("millisecond","ms"),J("S",Ti,wi),J("SS",Ti,Si),J("SSS",Ti,Oi);var jr;for(jr="SSSS";jr.length<=9;jr+="S")J(jr,Pi);for(jr="S";jr.length<=9;jr+="S")K(jr,Sn);var Tr=G("Milliseconds",!1);R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var xr=p.prototype;xr.add=fr,xr.calendar=dt,xr.clone=ht,xr.diff=_t,xr.endOf=Yt,xr.format=Ot,xr.from=kt,xr.fromNow=Dt,xr.to=Ct,xr.toNow=Mt,xr.get=V,xr.invalidAt=Et,xr.isAfter=ft,xr.isBefore=mt,xr.isBetween=pt,xr.isSame=yt,xr.isSameOrAfter=gt,xr.isSameOrBefore=vt,xr.isValid=Lt,xr.lang=pr,xr.locale=jt,xr.localeData=Tt,xr.max=ur,xr.min=or,xr.parsingFlags=Gt,xr.set=V,xr.startOf=xt,xr.subtract=mr,xr.toArray=Nt,xr.toObject=Bt,xr.toDate=At,xr.toISOString=St,xr.toJSON=Ht,xr.toString=wt,xr.unix=It,xr.valueOf=Pt,xr.creationData=Wt,xr.year=sr,xr.isLeapYear=be,xr.weekYear=Ft,xr.isoWeekYear=Rt,xr.quarter=xr.quarters=Jt,xr.month=ue,xr.daysInMonth=ce,xr.week=xr.weeks=Kt,xr.isoWeek=xr.isoWeeks=en,xr.weeksInYear=zt,xr.isoWeeksInYear=Ut,xr.date=gr,xr.day=xr.days=un,xr.weekday=cn,xr.isoWeekday=ln,xr.dayOfYear=pn,xr.hour=xr.hours=Dr,xr.minute=xr.minutes=Cr,xr.second=xr.seconds=Mr,xr.millisecond=xr.milliseconds=Tr,xr.utcOffset=$e,xr.utc=Je,xr.local=qe,xr.parseZone=Qe,xr.hasAlignedHourOffset=Xe,xr.isDST=Ke,xr.isDSTShifted=et,xr.isLocal=tt,xr.isUtcOffset=nt,xr.isUtc=it,xr.isUTC=it,xr.zoneAbbr=On,xr.zoneName=kn,xr.dates=w("dates accessor is deprecated. Use date instead.",gr),xr.months=w("months accessor is deprecated. Use month instead",ue),xr.years=w("years accessor is deprecated. Use year instead",sr),xr.zone=w("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ze);var Yr=xr,Pr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ir={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ar="Invalid date",Nr="%d",Br=/\d{1,2}/,Hr={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Lr=M.prototype;Lr._calendar=Pr,Lr.calendar=Mn,Lr._longDateFormat=Ir,Lr.longDateFormat=jn,Lr._invalidDate=Ar,Lr.invalidDate=Tn,Lr._ordinal=Nr,Lr.ordinal=xn,Lr._ordinalParse=Br,Lr.preparse=Yn,Lr.postformat=Yn,Lr._relativeTime=Hr,Lr.relativeTime=Pn,Lr.pastFuture=In,Lr.set=D,Lr.months=ie,Lr._months=qi,Lr.monthsShort=re,Lr._monthsShort=Qi,Lr.monthsParse=se,Lr._monthsRegex=Ki,Lr.monthsRegex=de,Lr._monthsShortRegex=Xi,Lr.monthsShortRegex=le,Lr.week=qt,Lr._week=yr,Lr.firstDayOfYear=Xt,Lr.firstDayOfWeek=Qt,Lr.weekdays=nn,Lr._weekdays=vr,Lr.weekdaysMin=an,Lr._weekdaysMin=br,Lr.weekdaysShort=rn,Lr._weekdaysShort=_r,Lr.weekdaysParse=on,Lr._weekdaysRegex=wr,Lr.weekdaysRegex=dn,Lr._weekdaysShortRegex=Sr,Lr.weekdaysShortRegex=hn,Lr._weekdaysMinRegex=Or,Lr.weekdaysMinRegex=fn,Lr.isPM=bn,Lr._meridiemParse=kr,Lr.meridiem=wn,Y("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===v(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),t.lang=w("moment.lang is deprecated. Use moment.locale instead.",Y),t.langData=w("moment.langData is deprecated. Use moment.localeData instead.",A);var Gr=Math.abs,Er=Xn("ms"),Wr=Xn("s"),Vr=Xn("m"),Fr=Xn("h"),Rr=Xn("d"),Ur=Xn("w"),zr=Xn("M"),$r=Xn("y"),Zr=ei("milliseconds"),Jr=ei("seconds"),qr=ei("minutes"),Qr=ei("hours"),Xr=ei("days"),Kr=ei("months"),ea=ei("years"),ta=Math.round,na={s:45,m:45,h:22,d:26,M:11},ia=Math.abs,ra=We.prototype;ra.abs=Vn,ra.add=Rn,ra.subtract=Un,ra.as=qn,ra.asMilliseconds=Er,ra.asSeconds=Wr,ra.asMinutes=Vr,ra.asHours=Fr,ra.asDays=Rr,ra.asWeeks=Ur,ra.asMonths=zr,ra.asYears=$r,ra.valueOf=Qn,ra._bubble=$n,ra.get=Kn,ra.milliseconds=Zr,ra.seconds=Jr,ra.minutes=qr,ra.hours=Qr,ra.days=Xr,ra.weeks=ti,ra.months=Kr,ra.years=ea,ra.humanize=ai,ra.toISOString=si,ra.toString=si,ra.toJSON=si,ra.locale=jt,ra.localeData=Tt,ra.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",si),ra.lang=pr,R("X",0,0,"unix"),R("x",0,0,"valueOf"),J("x",Ii),J("X",Bi),K("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),K("x",function(e,t,n){n._d=new Date(v(e))}),t.version="2.13.0",n(He),t.fn=Yr,t.min=Ge,t.max=Ee,t.now=cr,t.utc=u,t.unix=Dn,t.months=Hn,t.isDate=r,t.locale=Y,t.invalid=h,t.duration=rt,t.isMoment=y,t.weekdays=Gn,t.parseZone=Cn,t.localeData=A,t.isDuration=Ve,t.monthsShort=Ln,t.weekdaysMin=Wn,t.defineLocale=P,t.updateLocale=I,t.locales=N,t.weekdaysShort=En,t.normalizeUnits=H,t.relativeTimeThreshold=ri,t.prototype=Yr;var aa=t;return aa})}).call(t,n(73)(e))},,,,,,,function(e,t,n){"use strict";var i=n(0);n(35),new i.a({is:"ha-badges-card",properties:{hass:{type:Object},states:{type:Array}}})},function(e,t,n){"use strict";var i=n(0),r=1e4;new i.a({is:"ha-camera-card",properties:{hass:{type:Object},stateObj:{type:Object,observer:"updateCameraFeedSrc"},cameraFeedSrc:{type:String},imageLoaded:{type:Boolean,value:!0},elevation:{type:Number,value:1,reflectToAttribute:!0}},listeners:{tap:"cardTapped"},attached:function(){var e=this;this.timer=setInterval(function(){return e.updateCameraFeedSrc(e.stateObj)},r)},detached:function(){clearInterval(this.timer)},cardTapped:function(){var e=this;this.async(function(){return e.hass.moreInfoActions.selectEntity(e.stateObj.entityId)},1)},updateCameraFeedSrc:function(e){var t=e.attributes,n=(new Date).getTime();this.cameraFeedSrc=t.entity_picture+"&time="+n},imageLoadSuccess:function(){this.imageLoaded=!0},imageLoadFail:function(){this.imageLoaded=!1}})},function(e,t,n){"use strict";var i=n(0),r=n(3);n(27),n(29),n(30),new i.a({is:"ha-card-chooser",properties:{cardData:{type:Object,observer:"cardDataChanged"}},cardDataChanged:function(e){e&&n.i(r.a)(this,"HA-"+e.cardType.toUpperCase()+"-CARD",e)}})},function(e,t,n){"use strict";var i=n(0),r=n(9);n(33),n(4),new i.a({is:"ha-entities-card",properties:{hass:{type:Object},states:{type:Array},groupEntity:{type:Object}},computeTitle:function(e,t){return t?t.entityDisplay:e[0].domain.replace(/_/g," ")},computeTitleClass:function(e){var t="header horizontal layout center ";return e&&(t+="header-more-info"),t},entityTapped:function(e){var t=this;if(!e.target.classList.contains("paper-toggle-button")&&!e.target.classList.contains("paper-icon-button")&&(e.model||this.groupEntity)){e.stopPropagation();var n=void 0;n=e.model?e.model.item.entityId:this.groupEntity.entityId,this.async(function(){return t.hass.moreInfoActions.selectEntity(n)},1)}},showGroupToggle:function(e,t){var i=this;return!e||!t||"on"!==e.state&&"off"!==e.state?!1:t.reduce(function(e,t){return e+n.i(r.a)(i.hass,t.entityId)},0)>1}})},function(e,t,n){"use strict";var i=n(70),r=i&&i.__esModule?function(){return i["default"]}:function(){return i};n.d(r,"a",r);var a=n(0);new a.a({is:"ha-media_player-card",properties:{hass:{type:Object},stateObj:{type:Object},playerObj:{type:Object,computed:"computePlayerObj(stateObj)",observer:"playerObjChanged"},playbackControlIcon:{type:String,computed:"computePlaybackControlIcon(playerObj)"},elevation:{type:Number,value:1,reflectToAttribute:!0}},playerObjChanged:function(e){e.isOff||e.isIdle||(this.$.cover.style.backgroundImage=e.stateObj.attributes.entity_picture?"url("+e.stateObj.attributes.entity_picture+")":"")},computeBannerClasses:function(e){return r()({banner:!0,"is-off":e.isOff||e.isIdle,"no-cover":!e.stateObj.attributes.entity_picture})},computeHidePowerOnButton:function(e){return!e.isOff||!e.supportsTurnOn},computePlayerObj:function(e){return e.domainModel(this.hass)},computePlaybackControlIcon:function(e){return e.isPlaying?e.supportsPause?"mdi:pause":"mdi:stop":e.isPaused||e.isOff?"mdi:play":""},computeShowControls:function(e){return!e.isOff},handleNext:function(e){e.stopPropagation(),this.playerObj.nextTrack()},handleOpenMoreInfo:function(e){var t=this;e.stopPropagation(),this.async(function(){return t.hass.moreInfoActions.selectEntity(t.stateObj.entityId)},1)},handlePlaybackControl:function(e){e.stopPropagation(),this.playerObj.mediaPlayPause()},handlePrevious:function(e){e.stopPropagation(),this.playerObj.previousTrack()},handleTogglePower:function(e){e.stopPropagation(),this.playerObj.togglePower()}})},function(e,t,n){"use strict";var i=n(0),r=n(11);new i.a({is:"display-time",properties:{dateObj:{type:Object}},computeTime:function(e){return e?n.i(r.a)(e):""}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"ha-entity-marker",properties:{hass:{type:Object},entityId:{type:String,value:"",reflectToAttribute:!0},state:{type:Object,computed:"computeState(entityId)"},icon:{type:Object,computed:"computeIcon(state)"},image:{type:Object,computed:"computeImage(state)"},value:{type:String,computed:"computeValue(state)"}},listeners:{tap:"badgeTap"},badgeTap:function(e){var t=this;e.stopPropagation(),this.entityId&&this.async(function(){return window.hass.moreInfoActions.selectEntity(t.entityId)},1)},computeState:function(e){return e&&window.hass.reactor.evaluate(window.hass.entityGetters.byId(e))},computeIcon:function(e){return!e&&"home"},computeImage:function(e){return e&&e.attributes.entity_picture},computeValue:function(e){return e&&e.entityDisplay.split(" ").map(function(e){return e.substr(0,1)}).join("")}})},function(e,t,n){"use strict";var i=n(0),r=n(68);new i.a({is:"ha-entity-toggle",properties:{hass:{type:Object},stateObj:{type:Object},toggleChecked:{type:Boolean,value:!1},isOn:{type:Boolean,computed:"computeIsOn(stateObj)",observer:"isOnChanged"}},listeners:{tap:"onTap"},onTap:function(e){e.stopPropagation()},ready:function(){this.forceStateChange()},toggleChanged:function(e){var t=e.target.checked;t&&!this.isOn?this.callService(!0):!t&&this.isOn&&this.callService(!1)},isOnChanged:function(e){this.toggleChecked=e},forceStateChange:function(){this.toggleChecked===this.isOn&&(this.toggleChecked=!this.toggleChecked),this.toggleChecked=this.isOn},turnOn:function(){this.callService(!0)},turnOff:function(){this.callService(!1)},computeIsOn:function(e){return e&&-1===r.a.indexOf(e.state)},callService:function(e){var t=this,n=void 0,i=void 0;"lock"===this.stateObj.domain?(n="lock",i=e?"lock":"unlock"):"garage_door"===this.stateObj.domain?(n="garage_door",i=e?"open":"close"):(n="homeassistant",i=e?"turn_on":"turn_off");var r=this.hass.serviceActions.callService(n,i,{entity_id:this.stateObj.entityId});this.stateObj.attributes.assumed_state||r.then(function(){return t.forceStateChange()})}})},function(e,t,n){"use strict";var i=n(0),r=n(12);new i.a({is:"ha-state-icon",properties:{stateObj:{type:Object}},computeIcon:function(e){return n.i(r.a)(e)}})},function(e,t,n){"use strict";var i=n(0),r=n(5),a=n(12);new i.a({is:"ha-state-label-badge",properties:{hass:{type:Object},state:{type:Object,observer:"stateChanged"}},listeners:{tap:"badgeTap"},badgeTap:function(e){var t=this;e.stopPropagation(),this.async(function(){return t.hass.moreInfoActions.selectEntity(t.state.entityId)},1)},computeClasses:function(e){switch(e.domain){case"binary_sensor":case"updater":return"blue";default:return""}},computeValue:function(e){switch(e.domain){case"binary_sensor":case"device_tracker":case"updater":case"sun":case"alarm_control_panel":return null;case"sensor":default:return"unknown"===e.state?"-":e.state}},computeIcon:function(e){if("unavailable"===e.state)return null;switch(e.domain){case"alarm_control_panel":return"pending"===e.state?"mdi:clock-fast":"armed_away"===e.state?"mdi:nature":"armed_home"===e.state?"mdi:home-variant":n.i(r.a)(e.domain,e.state);case"binary_sensor":case"device_tracker":case"updater":return n.i(a.a)(e);case"sun":return"above_horizon"===e.state?n.i(r.a)(e.domain):"mdi:brightness-3";default:return null}},computeImage:function(e){return e.attributes.entity_picture||null},computeLabel:function(e){if("unavailable"===e.state)return"unavai";switch(e.domain){case"device_tracker":return"not_home"===e.state?"Away":e.state;case"alarm_control_panel":return"pending"===e.state?"pend":"armed_away"===e.state||"armed_home"===e.state?"armed":"disarm";default:return e.attributes.unit_of_measurement||null}},computeDescription:function(e){return e.entityDisplay},stateChanged:function(){this.updateStyles()}})},function(e,t,n){"use strict";var i=n(0);n(34),new i.a({is:"state-badge",properties:{stateObj:{type:Object,observer:"updateIconColor"}},updateIconColor:function(e){return e.attributes.entity_picture?(this.style.backgroundImage="url("+e.attributes.entity_picture+")",void(this.$.icon.style.display="none")):(this.style.backgroundImage="",this.$.icon.style.display="inline",void("light"===e.domain&&"on"===e.state&&e.attributes.rgb_color&&e.attributes.rgb_color.reduce(function(e,t){return e+t},0)<730?this.$.icon.style.color="rgb("+e.attributes.rgb_color.join(",")+")":this.$.icon.style.color=null))}})},function(e,t,n){"use strict";function i(e){return e in o?o[e]:30}function r(e){return"group"===e.domain?e.attributes.order:e.entityDisplay.toLowerCase()}var a=n(0),s=(n(26),n(28),{camera:4,media_player:3,persistent_notification:0}),o={configurator:-20,persistent_notification:-15,group:-10,a:-1,updater:0,sun:1,device_tracker:2,alarm_control_panel:3,sensor:5,binary_sensor:6};new a.a({is:"ha-cards",properties:{hass:{type:Object},showIntroduction:{type:Boolean,value:!1},columns:{type:Number,value:2},states:{type:Object},cards:{type:Object}},observers:["updateCards(columns, states, showIntroduction)"],updateCards:function(e,t,n){var i=this;this.debounce("updateCards",function(){i.cards=i.computeCards(e,t,n)},0)},computeCards:function(e,t,n){function a(e){return e.filter(function(e){return!(e.entityId in d)})}function o(e){for(var t=0,n=t;n1;var u=o(a);r.length>0&&h.columns[u].push({hass:c,cardType:"entities",states:r,groupEntity:n}),i.forEach(function(e){h.columns[u].push({hass:c,cardType:e.domain,stateObj:e})})}}for(var c=this.hass,l=t.groupBy(function(e){return e.domain}),d={},h={ +demo:!1,badges:[],columns:[]},f=[],m=0;e>m;m++)h.columns.push([]),f.push(0);n&&h.columns[o(5)].push({hass:c,cardType:"introduction",showHideInstruction:t.size>0&&!c.demo});var p=this.hass.util.expandGroup;return l.keySeq().sortBy(function(e){return i(e)}).forEach(function(e){if("a"===e)return void(h.demo=!0);var n=i(e);n>=0&&10>n?h.badges.push.apply(h.badges,a(l.get(e)).sortBy(r).toArray()):"group"===e?l.get(e).sortBy(r).forEach(function(e){var n=p(e,t);n.forEach(function(e){d[e.entityId]=!0}),u(e.entityId,n.toArray(),e)}):u(e,a(l.get(e)).sortBy(r).toArray())}),h.columns=h.columns.filter(function(e){return e.length>0}),h}})},function(e,t,n){"use strict";var i=n(0);n(7),n(31),new i.a({is:"logbook-entry",properties:{hass:{type:Object}},entityClicked:function(e){e.preventDefault(),this.hass.moreInfoActions.selectEntity(this.entryObj.entityId)}})},function(e,t,n){"use strict";var i=n(0);n(7),new i.a({is:"services-list",behaviors:[window.hassBehavior],properties:{hass:{type:Object},serviceDomains:{type:Array,bindNuclear:function(e){return e.serviceGetters.entityMap}}},computeDomains:function(e){return e.valueSeq().map(function(e){return e.domain}).sort().toJS()},computeServices:function(e,t){return e.get(t).get("services").keySeq().toArray()},serviceClicked:function(e){e.preventDefault(),this.fire("service-selected",{domain:e.model.domain,service:e.model.service})}})},function(e,t,n){"use strict";function i(e,t){for(var n=[],i=e;t>i;i++)n.push(i);return n}function r(e){var t=parseFloat(e);return!isNaN(t)&&isFinite(t)?t:null}var a=n(0);new a.a({is:"state-history-chart-line",properties:{data:{type:Object,observer:"dataChanged"},unit:{type:String},isSingleDevice:{type:Boolean,value:!1},isAttached:{type:Boolean,value:!1,observer:"dataChanged"},chartEngine:{type:Object}},created:function(){this.style.display="block"},attached:function(){this.isAttached=!0},dataChanged:function(){this.drawChart()},drawChart:function(){if(this.isAttached){this.chartEngine||(this.chartEngine=new window.google.visualization.LineChart(this));var e=this.unit,t=this.data;if(0!==t.length){var n={legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",vAxes:{0:{title:e}},hAxis:{format:"H:mm"},chartArea:{left:"60",width:"95%"},explorer:{actions:["dragToZoom","rightClickToReset","dragToPan"],keepInBounds:!0,axis:"horizontal",maxZoomIn:.1}};this.isSingleDevice&&(n.legend.position="none",n.vAxes[0].title=null,n.chartArea.left=40,n.chartArea.height="80%",n.chartArea.top=5,n.enableInteractivity=!1);var a=new Date(Math.min.apply(null,t.map(function(e){return e[0].lastChangedAsDate}))),s=new Date(a);s.setDate(s.getDate()+1),s>new Date&&(s=new Date);var o=t.map(function(e){function t(e,t){c&&t&&u.push([e[0]].concat(c.slice(1).map(function(e,n){return t[n]?e:null}))),u.push(e),c=e}var n=e[e.length-1],i=n.domain,a=n.entityDisplay,o=new window.google.visualization.DataTable;o.addColumn({type:"datetime",id:"Time"});var u=[],c=void 0;if("thermostat"===i){var l=e.reduce(function(e,t){return e||t.attributes.target_temp_high!==t.attributes.target_temp_low},!1);o.addColumn("number",a+" current temperature");var d=void 0;l?!function(){o.addColumn("number",a+" target temperature high"),o.addColumn("number",a+" target temperature low");var e=[!1,!0,!0];d=function(n){var i=r(n.attributes.current_temperature),a=r(n.attributes.target_temp_high),s=r(n.attributes.target_temp_low);t([n.lastUpdatedAsDate,i,a,s],e)}}():!function(){o.addColumn("number",a+" target temperature");var e=[!1,!0];d=function(n){var i=r(n.attributes.current_temperature),a=r(n.attributes.temperature);t([n.lastUpdatedAsDate,i,a],e)}}(),e.forEach(d)}else!function(){o.addColumn("number",a);var n="sensor"!==i&&[!0];e.forEach(function(e){var i=r(e.state);t([e.lastChangedAsDate,i],n)})}();return t([s].concat(c.slice(1)),!1),o.addRows(u),o}),u=void 0;u=1===o.length?o[0]:o.slice(1).reduce(function(e,t){return window.google.visualization.data.join(e,t,"full",[[0,0]],i(1,e.getNumberOfColumns()),i(1,t.getNumberOfColumns()))},o[0]),this.chartEngine.draw(u,n)}}}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"state-history-chart-timeline",properties:{data:{type:Object,observer:"dataChanged"},isAttached:{type:Boolean,value:!1,observer:"dataChanged"}},attached:function(){this.isAttached=!0},dataChanged:function(){this.drawChart()},drawChart:function(){function e(e,t,n,i){var r=t.replace(/_/g," ");a.addRow([e,r,n,i])}if(this.isAttached){for(var t=i.a.dom(this),n=this.data;t.node.lastChild;)t.node.removeChild(t.node.lastChild);if(n&&0!==n.length){var r=new window.google.visualization.Timeline(this),a=new window.google.visualization.DataTable;a.addColumn({type:"string",id:"Entity"}),a.addColumn({type:"string",id:"State"}),a.addColumn({type:"date",id:"Start"}),a.addColumn({type:"date",id:"End"});var s=new Date(n.reduce(function(e,t){return Math.min(e,t[0].lastChangedAsDate)},new Date)),o=new Date(s);o.setDate(o.getDate()+1),o>new Date&&(o=new Date);var u=0;n.forEach(function(t){if(0!==t.length){var n=t[0].entityDisplay,i=void 0,r=null,a=null;t.forEach(function(t){null!==r&&t.state!==r?(i=t.lastChangedAsDate,e(n,r,a,i),r=t.state,a=i):null===r&&(r=t.state,a=t.lastChangedAsDate)}),e(n,r,a,o),u++}}),r.draw(a,{height:55+42*u,timeline:{showRowLabels:n.length>1},hAxis:{format:"H:mm"}})}}}})},function(e,t,n){"use strict";var i=n(0);n(36),new i.a({is:"state-info",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"ha-voice-command-dialog",behaviors:[window.hassBehavior],properties:{hass:{type:Object},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},finalTranscript:{type:String,bindNuclear:function(e){return e.voiceGetters.finalTranscript}},interimTranscript:{type:String,bindNuclear:function(e){return e.voiceGetters.extraInterimTranscript}},isTransmitting:{type:Boolean,bindNuclear:function(e){return e.voiceGetters.isTransmitting}},isListening:{type:Boolean,bindNuclear:function(e){return e.voiceGetters.isListening}},showListenInterface:{type:Boolean,computed:"computeShowListenInterface(isListening, isTransmitting)",observer:"showListenInterfaceChanged"}},computeShowListenInterface:function(e,t){return e||t},dialogOpenChanged:function(e){!e&&this.isListening&&this.hass.voiceActions.stop()},showListenInterfaceChanged:function(e){!e&&this.dialogOpen?this.dialogOpen=!1:e&&(this.dialogOpen=!0)}})},function(e,t,n){"use strict";var i=n(0),r=(n(4),n(8),n(58),["camera","configurator","scene"]);new i.a({is:"more-info-dialog",behaviors:[window.hassBehavior],properties:{stateObj:{type:Object,bindNuclear:function(e){return e.moreInfoGetters.currentEntity},observer:"stateObjChanged"},stateHistory:{type:Object,bindNuclear:function(e){return[e.moreInfoGetters.currentEntityHistory,function(e){return e?[e]:!1}]}},isLoadingHistoryData:{type:Boolean,computed:"computeIsLoadingHistoryData(delayedDialogOpen, isLoadingEntityHistoryData)"},isLoadingEntityHistoryData:{type:Boolean,bindNuclear:function(e){return e.entityHistoryGetters.isLoadingEntityHistory}},hasHistoryComponent:{type:Boolean,bindNuclear:function(e){return e.configGetters.isComponentLoaded("history")},observer:"fetchHistoryData"},shouldFetchHistory:{type:Boolean,bindNuclear:function(e){return e.moreInfoGetters.isCurrentEntityHistoryStale},observer:"fetchHistoryData"},showHistoryComponent:{type:Boolean,value:!1,computed:"computeShowHistoryComponent(hasHistoryComponent, stateObj)"},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},delayedDialogOpen:{type:Boolean,value:!1}},ready:function(){this.$.scrollable.dialogElement=this.$.dialog},computeIsLoadingHistoryData:function(e,t){return!e||t},computeShowHistoryComponent:function(e,t){return this.hasHistoryComponent&&t&&-1===r.indexOf(t.domain)},fetchHistoryData:function(){this.stateObj&&this.hasHistoryComponent&&this.shouldFetchHistory&&this.hass.entityHistoryActions.fetchRecent(this.stateObj.entityId)},stateObjChanged:function(e){var t=this;return e?void this.async(function(){t.fetchHistoryData(),t.dialogOpen=!0},10):void(this.dialogOpen=!1)},dialogOpenChanged:function(e){var t=this;e?this.async(function(){t.delayedDialogOpen=!0},10):!e&&this.stateObj&&(this.async(function(){return t.hass.moreInfoActions.deselectEntity()},10),this.delayedDialogOpen=!1)}})},function(e,t,n){"use strict";var i=n(19),r=i&&i.__esModule?function(){return i["default"]}:function(){return i};n.d(r,"a",r),n(18),window.moment=r.a},function(e,t,n){"use strict";var i=n(0);n(1),n(37),new i.a({is:"partial-cards",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},isFetching:{type:Boolean,bindNuclear:function(e){return e.syncGetters.isFetching}},isStreaming:{type:Boolean,bindNuclear:function(e){return e.streamGetters.isStreamingEvents}},canListen:{type:Boolean,bindNuclear:function(e){return[e.voiceGetters.isVoiceSupported,e.configGetters.isComponentLoaded("conversation"),function(e,t){return e&&t}]}},introductionLoaded:{type:Boolean,bindNuclear:function(e){return e.configGetters.isComponentLoaded("introduction")}},locationName:{type:String,bindNuclear:function(e){return e.configGetters.locationName}},showMenu:{type:Boolean,value:!1,observer:"windowChange"},currentView:{type:String,bindNuclear:function(e){return[e.viewGetters.currentView,function(e){return e||""}]}},hasViews:{type:Boolean,bindNuclear:function(e){return[e.viewGetters.views,function(e){return e.size>0}]}},states:{type:Object,bindNuclear:function(e){return e.viewGetters.currentViewEntities}},columns:{type:Number,value:1}},created:function(){var e=this;this.windowChange=this.windowChange.bind(this);for(var t=[],n=0;5>n;n++)t.push(300+300*n);this.mqls=t.map(function(t){var n=window.matchMedia("(min-width: "+t+"px)");return n.addListener(e.windowChange),n})},detached:function(){var e=this;this.mqls.forEach(function(t){return t.removeListener(e.windowChange)})},windowChange:function(){var e=this.mqls.reduce(function(e,t){return e+t.matches},0);this.columns=Math.max(1,e-(!this.narrow&&this.showMenu))},scrollToTop:function(){this.$.panel.scrollToTop(!0)},handleRefresh:function(){this.hass.syncActions.fetchAll()},handleListenClick:function(){this.hass.voiceActions.listen()},contentScroll:function(){var e=this;this.debouncedContentScroll||(this.debouncedContentScroll=this.async(function(){e.checkRaised(),e.debouncedContentScroll=!1},100))},checkRaised:function(){this.toggleClass("raised",this.$.panel.scroller.scrollTop>(this.hasViews?56:0),this.$.panel)},headerScrollAdjust:function(e){this.hasViews&&this.translate3d("0","-"+e.detail.y+"px","0",this.$.menu)},computeHeaderHeight:function(e,t){return e?104:t?56:64},computeCondensedHeaderHeight:function(e,t){return e?48:t?56:64},computeMenuButtonClass:function(e,t){return!e&&t?"menu-icon invisible":"menu-icon"},computeRefreshButtonClass:function(e){return e?"ha-spin":""},computeTitle:function(e,t){return e?"Home Assistant":t},computeShowIntroduction:function(e,t,n){return""===e&&(t||0===n.size)},computeHasViews:function(e){return e.length>0},toggleMenu:function(){this.fire("open-menu")}})},function(e,t,n){"use strict";var i=n(0);n(1),n(39),new i.a({is:"partial-dev-call-service",properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},domain:{type:String,value:""},service:{type:String,value:""},serviceData:{type:String,value:""},description:{type:String,computed:"computeDescription(hass, domain, service)"}},computeDescription:function(e,t,n){return e.reactor.evaluate([e.serviceGetters.entityMap,function(e){return e.has(t)&&e.get(t).get("services").has(n)?JSON.stringify(e.get(t).get("services").get(n).toJS(),null,2):"No description available"}])},serviceSelected:function(e){this.domain=e.detail.domain,this.service=e.detail.service},callService:function(){var e=void 0;try{e=this.serviceData?JSON.parse(this.serviceData):{}}catch(t){return void alert("Error parsing JSON: "+t)}this.hass.serviceActions.callService(this.domain,this.service,e)},computeFormClasses:function(e){return"content fit "+(e?"":"layout horizontal")}})},function(e,t,n){"use strict";var i=n(0);n(1),new i.a({is:"partial-dev-fire-event",properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},eventType:{type:String,value:""},eventData:{type:String,value:""}},eventSelected:function(e){this.eventType=e.detail.eventType},fireEvent:function(){var e=void 0;try{e=this.eventData?JSON.parse(this.eventData):{}}catch(t){return void alert("Error parsing JSON: "+t)}this.hass.eventActions.fireEvent(this.eventType,e)},computeFormClasses:function(e){return"content fit "+(e?"":"layout horizontal")}})},function(e,t,n){"use strict";var i=n(0);n(1),new i.a({is:"partial-dev-info",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},hassVersion:{type:String,bindNuclear:function(e){return e.configGetters.serverVersion}},polymerVersion:{type:String,value:i.a.version},nuclearVersion:{type:String,value:"1.3.0"},errorLog:{type:String,value:""}},attached:function(){this.refreshErrorLog()},refreshErrorLog:function(e){var t=this;e&&e.preventDefault(),this.errorLog="Loading error log…",this.hass.errorLogActions.fetchErrorLog().then(function(e){t.errorLog=e||"No errors have been reported."})}})},function(e,t,n){"use strict";var i=n(0);n(1),new i.a({is:"partial-dev-set-state",properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},entityId:{type:String,value:""},state:{type:String,value:""},stateAttributes:{type:String,value:""}},setStateData:function(e){var t=e?JSON.stringify(e,null," "):"";this.$.inputData.value=t,this.$.inputDataWrapper.update(this.$.inputData)},entitySelected:function(e){var t=this.hass.reactor.evaluate(this.hass.entityGetters.byId(e.detail.entityId));this.entityId=t.entityId,this.state=t.state,this.stateAttributes=JSON.stringify(t.attributes,null," ")},handleSetState:function(){var e=void 0;try{e=this.stateAttributes?JSON.parse(this.stateAttributes):{}}catch(t){return void alert("Error parsing JSON: "+t)}this.hass.entityActions.save({entityId:this.entityId,state:this.state,attributes:e})},computeFormClasses:function(e){return"content fit "+(e?"":"layout horizontal")}})},function(e,t,n){"use strict";var i=n(0);n(1),new i.a({is:"partial-dev-template",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},error:{type:Boolean,value:!1},rendering:{type:Boolean,value:!1},template:{type:String,value:'{%- if is_state("device_tracker.paulus", "home") and \n is_state("device_tracker.anne_therese", "home") -%}\n\n You are both home, you silly\n\n{%- else -%}\n\n Anne Therese is at {{ states("device_tracker.anne_therese") }} and Paulus is at {{ states("device_tracker.paulus") }}\n\n{%- endif %}\n\nFor loop example:\n\n{% for state in states.sensor -%}\n {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}\n {{ state.name | lower }} is {{state.state}} {{- state.attributes.unit_of_measurement}}\n{%- endfor -%}.',observer:"templateChanged"},processed:{type:String,value:""}},computeFormClasses:function(e){return"content fit "+(e?"":"layout horizontal")},computeRenderedClasses:function(e){return e?"error rendered":"rendered"},templateChanged:function(){this.error&&(this.error=!1),this.debounce("render-template",this.renderTemplate,500)},renderTemplate:function(){var e=this;this.rendering=!0,this.hass.templateActions.render(this.template).then(function(t){e.processed=t,e.rendering=!1},function(t){e.processed=t.message,e.error=!0,e.rendering=!1})}})},function(e,t,n){"use strict";var i=n(0);n(1),n(8),new i.a({is:"partial-history",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},isDataLoaded:{type:Boolean,bindNuclear:function(e){return e.entityHistoryGetters.hasDataForCurrentDate},observer:"isDataLoadedChanged"},stateHistory:{type:Object,bindNuclear:function(e){return e.entityHistoryGetters.entityHistoryForCurrentDate}},isLoadingData:{type:Boolean,bindNuclear:function(e){return e.entityHistoryGetters.isLoadingEntityHistory}},selectedDate:{type:String,value:null,bindNuclear:function(e){return e.entityHistoryGetters.currentDate}}},isDataLoadedChanged:function(e){var t=this;e||this.async(function(){return t.hass.entityHistoryActions.fetchSelectedDate()},1)},handleRefreshClick:function(){this.hass.entityHistoryActions.fetchSelectedDate()},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:this.hass.entityHistoryActions.changeCurrentDate})},detached:function(){this.datePicker.destroy()},computeContentClasses:function(e){return"flex content "+(e?"narrow":"wide")}})},function(e,t,n){"use strict";var i=n(0);n(1),n(38),new i.a({is:"partial-logbook",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},selectedDate:{type:String,bindNuclear:function(e){return e.logbookGetters.currentDate}},isLoading:{type:Boolean,bindNuclear:function(e){return e.logbookGetters.isLoadingEntries}},isStale:{type:Boolean,bindNuclear:function(e){return e.logbookGetters.isCurrentStale},observer:"isStaleChanged"},entries:{type:Array,bindNuclear:function(e){return[e.logbookGetters.currentEntries,function(e){return e.reverse().toArray()}]}},datePicker:{type:Object}},isStaleChanged:function(e){var t=this;e&&this.async(function(){return t.hass.logbookActions.fetchDate(t.selectedDate)},1)},handleRefresh:function(){this.hass.logbookActions.fetchDate(this.selectedDate)},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:this.hass.logbookActions.changeCurrentDate})},detached:function(){this.datePicker.destroy()}})},function(e,t,n){"use strict";var i=n(0);n(32),window.L.Icon.Default.imagePath="/static/images/leaflet",new i.a({is:"partial-map",behaviors:[window.hassBehavior],properties:{hass:{type:Object},locationGPS:{type:Number,bindNuclear:function(e){return e.configGetters.locationGPS}},locationName:{type:String,bindNuclear:function(e){return e.configGetters.locationName}},locationEntities:{type:Array,bindNuclear:function(e){return[e.entityGetters.visibleEntityMap,function(e){return e.valueSeq().filter(function(e){return e.attributes.latitude&&"home"!==e.state}).toArray()}]}},zoneEntities:{type:Array,bindNuclear:function(e){return[e.entityGetters.entityMap,function(e){return e.valueSeq().filter(function(e){return"zone"===e.domain&&!e.attributes.passive}).toArray()}]}},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1}},attached:function(){var e=this;(window.L.Browser.mobileWebkit||window.L.Browser.webkit)&&this.async(function(){var t=e.$.map,n=t.style.display;t.style.display="none",e.async(function(){t.style.display=n},1)},1)},computeMenuButtonClass:function(e,t){return!e&&t?"menu-icon invisible":"menu-icon"},toggleMenu:function(){this.fire("open-menu")}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"notification-manager",behaviors:[window.hassBehavior],properties:{hass:{type:Object},neg:{type:Boolean,value:!1},text:{type:String,bindNuclear:function(e){return e.notificationGetters.lastNotificationMessage},observer:"showNotification"}},showNotification:function(e){e&&this.$.toast.show()}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"more-info-alarm_control_panel",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},enteredCode:{type:String,value:""},disarmButtonVisible:{type:Boolean,value:!1},armHomeButtonVisible:{type:Boolean,value:!1},armAwayButtonVisible:{type:Boolean,value:!1},codeInputVisible:{type:Boolean,value:!1},codeInputEnabled:{type:Boolean,value:!1},codeFormat:{type:String,value:""},codeValid:{type:Boolean,computed:"validateCode(enteredCode, codeFormat)"}},validateCode:function(e,t){var n=new RegExp(t);return null===t?!0:n.test(e)},stateObjChanged:function(e){var t=this;e&&(this.codeFormat=e.attributes.code_format,this.codeInputVisible=null!==this.codeFormat,this.codeInputEnabled="armed_home"===e.state||"armed_away"===e.state||"disarmed"===e.state||"pending"===e.state||"triggered"===e.state,this.disarmButtonVisible="armed_home"===e.state||"armed_away"===e.state||"pending"===e.state||"triggered"===e.state,this.armHomeButtonVisible="disarmed"===e.state,this.armAwayButtonVisible="disarmed"===e.state),this.async(function(){return t.fire("iron-resize")},500)},handleDisarmTap:function(){this.callService("alarm_disarm",{code:this.enteredCode})},handleHomeTap:function(){this.callService("alarm_arm_home",{code:this.enteredCode})},handleAwayTap:function(){this.callService("alarm_arm_away",{code:this.enteredCode})},callService:function(e,t){var n=t||{};n.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("alarm_control_panel",e,n)}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"more-info-configurator",behaviors:[window.hassBehavior],properties:{stateObj:{type:Object},action:{type:String,value:"display"},isStreaming:{type:Boolean,bindNuclear:function(e){return e.streamGetters.isStreamingEvents}},isConfigurable:{type:Boolean,computed:"computeIsConfigurable(stateObj)"},isConfiguring:{type:Boolean,value:!1},submitCaption:{type:String,computed:"computeSubmitCaption(stateObj)"},fieldInput:{type:Object,value:{}}},computeIsConfigurable:function(e){return"configure"===e.state},computeSubmitCaption:function(e){return e.attributes.submit_caption||"Set configuration"},fieldChanged:function(e){var t=e.target;this.fieldInput[t.id]=t.value},submitClicked:function(){var e=this;this.isConfiguring=!0;var t={configure_id:this.stateObj.attributes.configure_id,fields:this.fieldInput};this.hass.serviceActions.callService("configurator","configure",t).then(function(){e.isConfiguring=!1,e.isStreaming||e.hass.syncActions.fetchAll()},function(){e.isConfiguring=!1})}})},function(e,t,n){"use strict";var i=n(0),r=n(3),a=n(13);n(59),n(65),n(57),n(66),n(64),n(61),n(63),n(67),n(56),n(62),n(60),new i.a({is:"more-info-content",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"}},stateObjChanged:function(e){e&&n.i(r.a)(this,"MORE-INFO-"+n.i(a.a)(e).toUpperCase(),{hass:this.hass,stateObj:e})}})},function(e,t,n){"use strict";var i=n(0),r=n(3),a=n(13);n(4),new i.a({is:"more-info-group",behaviors:[window.hassBehavior],properties:{hass:{type:Object},stateObj:{type:Object},states:{type:Array,bindNuclear:function(e){return[e.moreInfoGetters.currentEntity,e.entityGetters.entityMap,function(e,t){return e?e.attributes.entity_id.map(t.get.bind(t)):[]}]}}},observers:["statesChanged(stateObj, states)"],statesChanged:function(e,t){var s=!1;if(t&&t.length>0){var o=t[0];s=o.set("entityId",e.entityId).set("attributes",Object.assign({},o.attributes));for(var u=0;ue||e>=this.stateObj.attributes.source_list.length)){var t=this.stateObj.attributes.source_list[e];t!==this.stateObj.attributes.source&&this.callService("select_source",{source:t})}},handleVolumeTap:function(){this.supportsVolumeMute&&this.callService("volume_mute",{is_volume_muted:!this.isMuted})},handleVolumeUp:function(){var e=this.$.volumeUp;this.handleVolumeWorker("volume_up",e,!0)},handleVolumeDown:function(){var e=this.$.volumeDown;this.handleVolumeWorker("volume_down",e,!0)},handleVolumeWorker:function(e,t,n){var i=this;(n||void 0!==t&&t.pointerDown)&&(this.callService(e),this.async(function(){return i.handleVolumeWorker(e,t,!1)},500))},volumeSliderChanged:function(e){var t=parseFloat(e.target.value),n=t>0?t/100:0;this.callService("volume_set",{volume_level:n})},callService:function(e,t){var n=t||{};n.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("media_player",e,n)}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"more-info-script",properties:{stateObj:{type:Object}}})},function(e,t,n){"use strict";var i=n(0),r=n(11);new i.a({is:"more-info-sun",properties:{stateObj:{type:Object},risingDate:{type:Object,computed:"computeRising(stateObj)"},settingDate:{type:Object, +computed:"computeSetting(stateObj)"}},computeRising:function(e){return new Date(e.attributes.next_rising)},computeSetting:function(e){return new Date(e.attributes.next_setting)},computeOrder:function(e,t){return e>t?["set","ris"]:["ris","set"]},itemCaption:function(e){return"ris"===e?"Rising ":"Setting "},itemDate:function(e){return"ris"===e?this.risingDate:this.settingDate},itemValue:function(e){return n.i(r.a)(this.itemDate(e))}})},function(e,t,n){"use strict";var i=n(0),r=n(2),a=["away_mode"];new i.a({is:"more-info-thermostat",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},tempMin:{type:Number},tempMax:{type:Number},targetTemperatureSliderValue:{type:Number},awayToggleChecked:{type:Boolean}},stateObjChanged:function(e){this.targetTemperatureSliderValue=e.attributes.temperature,this.awayToggleChecked="on"===e.attributes.away_mode,this.tempMin=e.attributes.min_temp,this.tempMax=e.attributes.max_temp},computeClassNames:function(e){return n.i(r.a)(e,a)},targetTemperatureSliderChanged:function(e){this.hass.serviceActions.callService("thermostat","set_temperature",{entity_id:this.stateObj.entityId,temperature:e.target.value})},toggleChanged:function(e){var t=e.target.checked;t&&"off"===this.stateObj.attributes.away_mode?this.service_set_away(!0):t||"on"!==this.stateObj.attributes.away_mode||this.service_set_away(!1)},service_set_away:function(e){var t=this;this.hass.serviceActions.callService("thermostat","set_away_mode",{away_mode:e,entity_id:this.stateObj.entityId}).then(function(){return t.stateObjChanged(t.stateObj)})}})},function(e,t,n){"use strict";var i=n(0);new i.a({is:"more-info-updater",properties:{}})},function(e,t,n){"use strict";t.a=["off","closed","unlocked"]},function(e,t,n){"use strict";function i(e,t){return"unavailable"===t.state?"display":-1!==a.indexOf(t.domain)?t.domain:n.i(r.a)(e,t.entityId)?"toggle":"display"}var r=n(9);t.a=i;var a=["configurator","hvac","input_select","input_slider","media_player","rollershutter","scene","script","thermostat","weblink"]},function(e,t,n){var i,r;!function(){"use strict";function n(){for(var e=[],t=0;t \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/frontend.html.gz b/homeassistant/components/frontend/www_static/frontend.html.gz index 58501c46c30..fa2fdc437c5 100644 Binary files a/homeassistant/components/frontend/www_static/frontend.html.gz and b/homeassistant/components/frontend/www_static/frontend.html.gz differ diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer index 168706fdb19..1e1a3a1c845 160000 --- a/homeassistant/components/frontend/www_static/home-assistant-polymer +++ b/homeassistant/components/frontend/www_static/home-assistant-polymer @@ -1 +1 @@ -Subproject commit 168706fdb192219d8074d6709c0ce686180d1c8a +Subproject commit 1e1a3a1c845713508d21d7c1cb87a7ecee6222aa diff --git a/homeassistant/components/frontend/www_static/service_worker.js b/homeassistant/components/frontend/www_static/service_worker.js index 084c6e75595..2756f2fde3c 100644 --- a/homeassistant/components/frontend/www_static/service_worker.js +++ b/homeassistant/components/frontend/www_static/service_worker.js @@ -29,7 +29,7 @@ /* eslint-disable quotes, comma-spacing */ -var PrecacheConfig = [["/","595e12c9755af231fd80191e4cc74d2e"],["/devEvent","595e12c9755af231fd80191e4cc74d2e"],["/devInfo","595e12c9755af231fd80191e4cc74d2e"],["/devService","595e12c9755af231fd80191e4cc74d2e"],["/devState","595e12c9755af231fd80191e4cc74d2e"],["/devTemplate","595e12c9755af231fd80191e4cc74d2e"],["/history","595e12c9755af231fd80191e4cc74d2e"],["/logbook","595e12c9755af231fd80191e4cc74d2e"],["/map","595e12c9755af231fd80191e4cc74d2e"],["/states","595e12c9755af231fd80191e4cc74d2e"],["/static/core-7962327e4a29e51d4a6f4ee6cca9acc3.js","9c07ffb3f81cfb74f8a051b80cc8f9f0"],["/static/frontend-570e1b8744a58024fc4e256f5e024424.html","595e12c9755af231fd80191e4cc74d2e"],["/static/mdi-9ee3d4466a65bef35c2c8974e91b37c0.html","9a6846935116cd29279c91e0ee0a26d0"],["static/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"],["static/webcomponents-lite.min.js","b0f32ad3c7749c40d486603f31c9d8b1"]]; +var PrecacheConfig = [["/","70eeeca780a5f23c7632c2876dd1795a"],["/devEvent","70eeeca780a5f23c7632c2876dd1795a"],["/devInfo","70eeeca780a5f23c7632c2876dd1795a"],["/devService","70eeeca780a5f23c7632c2876dd1795a"],["/devState","70eeeca780a5f23c7632c2876dd1795a"],["/devTemplate","70eeeca780a5f23c7632c2876dd1795a"],["/history","70eeeca780a5f23c7632c2876dd1795a"],["/logbook","70eeeca780a5f23c7632c2876dd1795a"],["/map","70eeeca780a5f23c7632c2876dd1795a"],["/states","70eeeca780a5f23c7632c2876dd1795a"],["/static/core-db0bb387f4d3bcace002d62b94baa348.js","f938163a392465dc87af3a0094376621"],["/static/frontend-5b306b7e7d36799b7b67f592cbe94703.html","70eeeca780a5f23c7632c2876dd1795a"],["/static/mdi-9ee3d4466a65bef35c2c8974e91b37c0.html","9a6846935116cd29279c91e0ee0a26d0"],["static/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"],["static/webcomponents-lite.min.js","b0f32ad3c7749c40d486603f31c9d8b1"]]; /* eslint-enable quotes, comma-spacing */ var CacheNamePrefix = 'sw-precache-v1--' + (self.registration ? self.registration.scope : '') + '-'; diff --git a/homeassistant/components/frontend/www_static/service_worker.js.gz b/homeassistant/components/frontend/www_static/service_worker.js.gz index 21b37fba867..97a7a860214 100644 Binary files a/homeassistant/components/frontend/www_static/service_worker.js.gz and b/homeassistant/components/frontend/www_static/service_worker.js.gz differ