6063 lines
No EOL
867 KiB
HTML
6063 lines
No EOL
867 KiB
HTML
<html><head><meta charset="UTF-8"><script>!function(){function e(){document.body.removeAttribute("unresolved")}window.WebComponents?addEventListener("WebComponentsReady",e):"interactive"===document.readyState||"complete"===document.readyState?e():addEventListener("DOMContentLoaded",e)}(),window.Polymer={Settings:function(){for(var e,t=window.Polymer||{},r=location.search.slice(1).split("&"),o=0;o<r.length&&(e=r[o]);o++)e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0);var i="shadow"===t.dom,n=Boolean(Element.prototype.createShadowRoot),a=n&&!window.ShadowDOMPolyfill,s=i&&n,u=Boolean("import"in document.createElement("link")),c=u,h=!window.CustomElements||window.CustomElements.useNative;return{wantShadow:i,hasShadow:n,nativeShadow:a,useShadow:s,useNativeShadow:s&&a,useNativeImports:c,useNativeCustomElements:h}}()},function(){var e=window.Polymer;window.Polymer=function(e){"function"==typeof e&&(e=e.prototype),e||(e={});var r=t(e);e=r.prototype;var o={prototype:e};return e["extends"]&&(o["extends"]=e["extends"]),Polymer.telemetry._registrate(e),document.registerElement(e.is,o),r};var t=function(e){var t=Polymer.Base;return e["extends"]&&(t=Polymer.Base._getExtendedPrototype(e["extends"])),e=Polymer.Base.chainObject(e,t),e.registerCallback(),e.constructor};if(window.Polymer=Polymer,e)for(var r in e)Polymer[r]=e[r];Polymer.Class=t}(),Polymer.telemetry={registrations:[],_regLog:function(e){console.log("["+e.is+"]: registered")},_registrate:function(e){this.registrations.push(e),Polymer.log&&this._regLog(e)},dumpRegistrations:function(){this.registrations.forEach(this._regLog)}},Object.defineProperty(window,"currentImport",{enumerable:!0,configurable:!0,get:function(){return(document._currentScript||document.currentScript).ownerDocument}}),Polymer.RenderStatus={_ready:!1,_callbacks:[],whenReady:function(e){this._ready?e():this._callbacks.push(e)},_makeReady:function(){this._ready=!0;for(var e=0;e<this._callbacks.length;e++)this._callbacks[e]();this._callbacks=[]},_catchFirstRender:function(){requestAnimationFrame(function(){Polymer.RenderStatus._makeReady()})},_afterNextRenderQueue:[],_waitingNextRender:!1,afterNextRender:function(e,t,r){this._watchNextRender(),this._afterNextRenderQueue.push([e,t,r])},_watchNextRender:function(){if(!this._waitingNextRender){this._waitingNextRender=!0;var e=function(){Polymer.RenderStatus._flushNextRender()};this._ready?requestAnimationFrame(e):this.whenReady(e)}},_flushNextRender:function(){var e=this;setTimeout(function(){e._flushRenderCallbacks(e._afterNextRenderQueue),e._afterNextRenderQueue=[],e._waitingNextRender=!1})},_flushRenderCallbacks:function(e){for(var t,r=0;r<e.length;r++)t=e[r],t[1].apply(t[0],t[2]||Polymer.nar)}},window.HTMLImports?HTMLImports.whenReady(function(){Polymer.RenderStatus._catchFirstRender()}):Polymer.RenderStatus._catchFirstRender(),Polymer.ImportStatus=Polymer.RenderStatus,Polymer.ImportStatus.whenLoaded=Polymer.ImportStatus.whenReady,Polymer.Base={__isPolymerInstance__:!0,_addFeature:function(e){this.extend(this,e)},registerCallback:function(){this._desugarBehaviors(),this._doBehavior("beforeRegister"),this._registerFeatures(),this._doBehavior("registered")},createdCallback:function(){Polymer.telemetry.instanceCount++,this.root=this,this._doBehavior("created"),this._initFeatures()},attachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!0,e._doBehavior("attached")})},detachedCallback:function(){this.isAttached=!1,this._doBehavior("detached")},attributeChangedCallback:function(e,t,r){this._attributeChangedImpl(e),this._doBehavior("attributeChanged",[e,t,r])},_attributeChangedImpl:function(e){this._setAttributeToProperty(this,e)},extend:function(e,t){if(e&&t)for(var r,o=Object.getOwnPropertyNames(t),i=0;i<o.length&&(r=o[i]);i++)this.copyOwnProperty(r,t,e);return e||t},mixin:function(e,t){for(var r in t)e[r]=t[r];return e},copyOwnProperty:function(e,t,r){var o=Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(r,e,o)},_log:console.log.apply.bind(console.log,console),_warn:console.warn.apply.bind(console.warn,console),_error:console.error.apply.bind(console.error,console),_logf:function(){return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments,0))}},Polymer.Base._logPrefix=function(){var e=window.chrome||/firefox/i.test(navigator.userAgent);return e?["%c[%s::%s]:","font-weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"]}(),Polymer.Base.chainObject=function(e,t){return e&&t&&e!==t&&(Object.__proto__||(e=Polymer.Base.extend(Object.create(t),e)),e.__proto__=t),e},Polymer.Base=Polymer.Base.chainObject(Polymer.Base,HTMLElement.prototype),window.CustomElements?Polymer["instanceof"]=CustomElements["instanceof"]:Polymer["instanceof"]=function(e,t){return e instanceof t},Polymer.isInstance=function(e){return Boolean(e&&e.__isPolymerInstance__)},Polymer.telemetry.instanceCount=0,function(){function e(){if(n)for(var e,t=document._currentScript||document.currentScript,r=t&&t.ownerDocument||document,o=r.querySelectorAll("dom-module"),i=o.length-1;i>=0&&(e=o[i]);i--){if(e.__upgraded__)return;CustomElements.upgrade(e)}}var t={},r={},o=function(e){return t[e]||r[e.toLowerCase()]},i=function(){return document.createElement("dom-module")};i.prototype=Object.create(HTMLElement.prototype),Polymer.Base.extend(i.prototype,{constructor:i,createdCallback:function(){this.register()},register:function(e){var e=e||this.id||this.getAttribute("name")||this.getAttribute("is");e&&(this.id=e,t[e]=this,r[e.toLowerCase()]=this)},"import":function(t,r){if(t){var i=o(t);return i||(e(),i=o(t)),i&&r&&(i=i.querySelector(r)),i}}});var n=window.CustomElements&&!CustomElements.useNative;document.registerElement("dom-module",i)}(),Polymer.Base._addFeature({_prepIs:function(){if(!this.is){var e=(document._currentScript||document.currentScript).parentNode;if("dom-module"===e.localName){var t=e.id||e.getAttribute("name")||e.getAttribute("is");this.is=t}}this.is&&(this.is=this.is.toLowerCase())}}),Polymer.Base._addFeature({behaviors:[],_desugarBehaviors:function(){this.behaviors.length&&(this.behaviors=this._desugarSomeBehaviors(this.behaviors))},_desugarSomeBehaviors:function(e){e=this._flattenBehaviorsList(e);for(var t=e.length-1;t>=0;t--)this._mixinBehavior(e[t]);return e},_flattenBehaviorsList:function(e){for(var t=[],r=0;r<e.length;r++){var o=e[r];o instanceof Array?t=t.concat(this._flattenBehaviorsList(o)):o?t.push(o):this._warn(this._logf("_flattenBehaviorsList","behavior is null, check for missing or 404 import"))}return t},_mixinBehavior:function(e){for(var t,r=Object.getOwnPropertyNames(e),o=0;o<r.length&&(t=r[o]);o++)Polymer.Base._behaviorProperties[t]||this.hasOwnProperty(t)||this.copyOwnProperty(t,e,this)},_prepBehaviors:function(){this._prepFlattenedBehaviors(this.behaviors)},_prepFlattenedBehaviors:function(e){for(var t=0,r=e.length;r>t;t++)this._prepBehavior(e[t]);this._prepBehavior(this)},_doBehavior:function(e,t){for(var r=0;r<this.behaviors.length;r++)this._invokeBehavior(this.behaviors[r],e,t);this._invokeBehavior(this,e,t)},_invokeBehavior:function(e,t,r){var o=e[t];o&&o.apply(this,r||Polymer.nar)},_marshalBehaviors:function(){for(var e=0;e<this.behaviors.length;e++)this._marshalBehavior(this.behaviors[e]);this._marshalBehavior(this)}}),Polymer.Base._behaviorProperties={hostAttributes:!0,registered:!0,properties:!0,observers:!0,listeners:!0,created:!0,attached:!0,detached:!0,attributeChanged:!0,ready:!0},Polymer.Base._addFeature({_getExtendedPrototype:function(e){return this._getExtendedNativePrototype(e)},_nativePrototypes:{},_getExtendedNativePrototype:function(e){var t=this._nativePrototypes[e];if(!t){var r=this.getNativePrototype(e);t=this.extend(Object.create(r),Polymer.Base),this._nativePrototypes[e]=t}return t},getNativePrototype:function(e){return Object.getPrototypeOf(document.createElement(e))}}),Polymer.Base._addFeature({_prepConstructor:function(){this._factoryArgs=this["extends"]?[this["extends"],this.is]:[this.is];var e=function(){return this._factory(arguments)};this.hasOwnProperty("extends")&&(e["extends"]=this["extends"]),Object.defineProperty(this,"constructor",{value:e,writable:!0,configurable:!0}),e.prototype=this},_factory:function(e){var t=document.createElement.apply(document,this._factoryArgs);return this.factoryImpl&&this.factoryImpl.apply(t,e),t}}),Polymer.nob=Object.create(null),Polymer.Base._addFeature({properties:{},getPropertyInfo:function(e){var t=this._getPropertyInfo(e,this.properties);if(!t)for(var r=0;r<this.behaviors.length;r++)if(t=this._getPropertyInfo(e,this.behaviors[r].properties))return t;return t||Polymer.nob},_getPropertyInfo:function(e,t){var r=t&&t[e];return"function"==typeof r&&(r=t[e]={type:r}),r&&(r.defined=!0),r},_prepPropertyInfo:function(){this._propertyInfo={};for(var e=0;e<this.behaviors.length;e++)this._addPropertyInfo(this._propertyInfo,this.behaviors[e].properties);this._addPropertyInfo(this._propertyInfo,this.properties),this._addPropertyInfo(this._propertyInfo,this._propertyEffects)},_addPropertyInfo:function(e,t){if(t){var r,o;for(var i in t)r=e[i],o=t[i],("_"!==i[0]||o.readOnly)&&(e[i]?(r.type||(r.type=o.type),r.readOnly||(r.readOnly=o.readOnly)):e[i]={type:"function"==typeof o?o:o.type,readOnly:o.readOnly,attribute:Polymer.CaseMap.camelToDashCase(i)})}}}),Polymer.CaseMap={_caseMap:{},dashToCamelCase:function(e){var t=Polymer.CaseMap._caseMap[e];return t?t:e.indexOf("-")<0?Polymer.CaseMap._caseMap[e]=e:Polymer.CaseMap._caseMap[e]=e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},camelToDashCase:function(e){var t=Polymer.CaseMap._caseMap[e];return t?t:Polymer.CaseMap._caseMap[e]=e.replace(/([a-z][A-Z])/g,function(e){return e[0]+"-"+e[1].toLowerCase()})}},Polymer.Base._addFeature({_addHostAttributes:function(e){this._aggregatedAttributes||(this._aggregatedAttributes={}),e&&this.mixin(this._aggregatedAttributes,e)},_marshalHostAttributes:function(){this._aggregatedAttributes&&this._applyAttributes(this,this._aggregatedAttributes)},_applyAttributes:function(e,t){for(var r in t)if(!this.hasAttribute(r)&&"class"!==r){var o=t[r];this.serializeValueToAttribute(o,r,this)}},_marshalAttributes:function(){this._takeAttributesToModel(this)},_takeAttributesToModel:function(e){if(this.hasAttributes())for(var t in this._propertyInfo){var r=this._propertyInfo[t];this.hasAttribute(r.attribute)&&this._setAttributeToProperty(e,r.attribute,t,r)}},_setAttributeToProperty:function(e,t,r,o){if(!this._serializing){var r=r||Polymer.CaseMap.dashToCamelCase(t);if(o=o||this._propertyInfo&&this._propertyInfo[r],o&&!o.readOnly){var i=this.getAttribute(t);e[r]=this.deserialize(i,o.type)}}},_serializing:!1,reflectPropertyToAttribute:function(e,t,r){this._serializing=!0,r=void 0===r?this[e]:r,this.serializeValueToAttribute(r,t||Polymer.CaseMap.camelToDashCase(e)),this._serializing=!1},serializeValueToAttribute:function(e,t,r){var o=this.serialize(e);r=r||this,void 0===o?r.removeAttribute(t):r.setAttribute(t,o)},deserialize:function(e,t){switch(t){case Number:e=Number(e);break;case Boolean:e=null!==e;break;case Object:try{e=JSON.parse(e)}catch(r){}break;case Array:try{e=JSON.parse(e)}catch(r){e=null,console.warn("Polymer::Attributes: couldn`t decode Array as JSON")}break;case Date:e=new Date(e);break;case String:}return e},serialize:function(e){switch(typeof e){case"boolean":return e?"":void 0;case"object":if(e instanceof Date)return e;if(e)try{return JSON.stringify(e)}catch(t){return""}default:return null!=e?e:void 0}}}),Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(e,t,r){return this._debouncers[e]=Polymer.Debounce.call(this,this._debouncers[e],t,r)},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.version="1.2.3",Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_marshalBehavior:function(e){},_initFeatures:function(){this._marshalHostAttributes(),this._setupDebouncers(),this._marshalBehaviors()}});</script><script>Polymer.Base._addFeature({_prepTemplate:function(){void 0===this._template&&(this._template=Polymer.DomModule["import"](this.is,"template")),this._template&&this._template.hasAttribute("is")&&this._warn(this._logf("_prepTemplate","top-level Polymer template must not be a type-extension, found",this._template,"Move inside simple <template>.")),this._template&&!this._template.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(this._template)},_stampTemplate:function(){this._template&&(this.root=this.instanceTemplate(this._template))},instanceTemplate:function(e){var t=document.importNode(e._content||e.content,!0);return t}}),function(){var e=Polymer.Base.attachedCallback;Polymer.Base._addFeature({_hostStack:[],ready:function(){},_registerHost:function(e){this.dataHost=e=e||Polymer.Base._hostStack[Polymer.Base._hostStack.length-1],e&&e._clients&&e._clients.push(this)},_beginHosting:function(){Polymer.Base._hostStack.push(this),this._clients||(this._clients=[])},_endHosting:function(){Polymer.Base._hostStack.pop()},_tryReady:function(){this._canReady()&&this._ready()},_canReady:function(){return!this.dataHost||this.dataHost._clientsReadied},_ready:function(){this._beforeClientsReady(),this._template&&(this._setupRoot(),this._readyClients()),this._clientsReadied=!0,this._clients=null,this._afterClientsReady(),this._readySelf()},_readyClients:function(){this._beginDistribute();var e=this._clients;if(e)for(var t,o=0,n=e.length;n>o&&(t=e[o]);o++)t._ready();this._finishDistribute()},_readySelf:function(){this._doBehavior("ready"),this._readied=!0,this._attachedPending&&(this._attachedPending=!1,this.attachedCallback())},_beforeClientsReady:function(){},_afterClientsReady:function(){},_beforeAttached:function(){},attachedCallback:function(){this._readied?(this._beforeAttached(),e.call(this)):this._attachedPending=!0}})}(),Polymer.ArraySplice=function(){function e(e,t,o){return{index:e,removed:t,addedCount:o}}function t(){}var o=0,n=1,i=2,r=3;return t.prototype={calcEditDistances:function(e,t,o,n,i,r){for(var s=r-i+1,h=o-t+1,d=new Array(s),a=0;s>a;a++)d[a]=new Array(h),d[a][0]=a;for(var l=0;h>l;l++)d[0][l]=l;for(var a=1;s>a;a++)for(var l=1;h>l;l++)if(this.equals(e[t+l-1],n[i+a-1]))d[a][l]=d[a-1][l-1];else{var u=d[a-1][l]+1,c=d[a][l-1]+1;d[a][l]=c>u?u:c}return d},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,s=e[0].length-1,h=e[t][s],d=[];t>0||s>0;)if(0!=t)if(0!=s){var a,l=e[t-1][s-1],u=e[t-1][s],c=e[t][s-1];a=c>u?l>u?u:l:l>c?c:l,a==l?(l==h?d.push(o):(d.push(n),h=l),t--,s--):a==u?(d.push(r),t--,h=u):(d.push(i),s--,h=c)}else d.push(r),t--;else d.push(i),s--;return d.reverse(),d},calcSplices:function(t,s,h,d,a,l){var u=0,c=0,f=Math.min(h-s,l-a);if(0==s&&0==a&&(u=this.sharedPrefix(t,d,f)),h==t.length&&l==d.length&&(c=this.sharedSuffix(t,d,f-u)),s+=u,a+=u,h-=c,l-=c,h-s==0&&l-a==0)return[];if(s==h){for(var _=e(s,[],0);l>a;)_.removed.push(d[a++]);return[_]}if(a==l)return[e(s,[],h-s)];for(var p=this.spliceOperationsFromEditDistances(this.calcEditDistances(t,s,h,d,a,l)),_=void 0,m=[],v=s,y=a,b=0;b<p.length;b++)switch(p[b]){case o:_&&(m.push(_),_=void 0),v++,y++;break;case n:_||(_=e(v,[],0)),_.addedCount++,v++,_.removed.push(d[y]),y++;break;case i:_||(_=e(v,[],0)),_.addedCount++,v++;break;case r:_||(_=e(v,[],0)),_.removed.push(d[y]),y++}return _&&m.push(_),m},sharedPrefix:function(e,t,o){for(var n=0;o>n;n++)if(!this.equals(e[n],t[n]))return n;return o},sharedSuffix:function(e,t,o){for(var n=e.length,i=t.length,r=0;o>r&&this.equals(e[--n],t[--i]);)r++;return r},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},new t}(),Polymer.domInnerHTML=function(){function e(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function t(t){return t.replace(s,e)}function o(t){return t.replace(h,e)}function n(e){for(var t={},o=0;o<e.length;o++)t[e[o]]=!0;return t}function i(e,n,i){switch(e.nodeType){case Node.ELEMENT_NODE:for(var s,h=e.localName,l="<"+h,u=e.attributes,c=0;s=u[c];c++)l+=" "+s.name+'="'+t(s.value)+'"';return l+=">",d[h]?l:l+r(e,i)+"</"+h+">";case Node.TEXT_NODE:var f=e.data;return n&&a[n.localName]?f:o(f);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function r(e,t){e instanceof HTMLTemplateElement&&(e=e.content);var o="",n=Polymer.dom(e).childNodes;n=t?e._composedChildren:n;for(var r,s=0,h=n.length;h>s&&(r=n[s]);s++)o+=i(r,e,t);return o}var s=/[&\u00A0"]/g,h=/[&\u00A0<>]/g,d=n(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),a=n(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);return{getInnerHTML:r}}(),Polymer.DomApi=function(){"use strict";function e(e,t){return e=e||document,e.__domApi||(e.__domApi=new C(e,t)),e.__domApi}function t(e){return Boolean(e.__domApi)}function o(e){var t=e._lightChildren;return t?t:e.childNodes}function n(e){return e._composedChildren||(e._composedChildren=a(e)),e._composedChildren}function i(e,t,o){var i=n(e),r=o?i.indexOf(o):-1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var h=n(t),d=0;d<h.length;d++)s(h[d],e,i,r+d);t._composedChildren=null}else s(t,e,i,r)}function r(e){return e.__patched?e._composedParent:e.parentNode}function s(e,t,o,n){e._composedParent=t,o.splice(n>=0?n:o.length,0,e)}function h(e,t){if(t._composedParent=null,e){var o=n(e),i=o.indexOf(t);i>=0&&o.splice(i,1)}}function d(e){if(!e._lightChildren){for(var t,o=a(e),n=0,i=o.length;i>n&&(t=o[n]);n++)t._lightParent=t._lightParent||e;e._lightChildren=o}}function a(e){for(var t=[],o=0,n=e.firstChild;n;n=n.nextSibling)t[o++]=n;return t}function l(e){for(var t=[],o=0,n=e.firstElementChild;n;n=n.nextElementSibling)t[o++]=n;return t}function u(e){for(var t=e.length,o=new Array(t),n=0;t>n;n++)o[n]=e[n];return o}function c(e){return Boolean(e&&e._insertionPoints.length)}var f=Polymer.Settings,_=Polymer.domInnerHTML.getInnerHTML,p=Element.prototype.insertBefore,m=Element.prototype.removeChild,v=Element.prototype.appendChild,y=Element.prototype.cloneNode,b=Document.prototype.importNode,g=f.hasShadow&&!f.nativeShadow,N=window.wrap?window.wrap:function(e){return e},C=function(e){this.node=g?N(e):e,this.patch&&this.patch()};if(C.prototype={flush:function(){Polymer.dom.flush()},deepContains:function(e){if(this.node.contains(e))return!0;for(var t=e,o=N(document);t&&t!==o&&t!==this.node;)t=Polymer.dom(t).parentNode||t.host;return t===this.node},_lazyDistribute:function(e){e.shadyRoot&&e.shadyRoot._distributionClean&&(e.shadyRoot._distributionClean=!1,Polymer.dom.addDebouncer(e.debounce("_distribute",e._distributeContent)))},appendChild:function(e){return this._addNode(e)},insertBefore:function(e,t){return this._addNode(e,t)},_addNode:function(e,t){this._removeNodeFromParent(e);var o,n=this.getOwnerRoot();if(n&&(o=this._maybeAddInsertionPoint(e,this.node)),this._nodeHasLogicalChildren(this.node)){if(t){var r=this.childNodes,s=r.indexOf(t);if(0>s)throw Error("The ref_node to be inserted before is not a child of this node")}this._addLogicalInfo(e,this.node,s)}if(this._addNodeToHost(e),!this._maybeDistribute(e,this.node)&&!this._tryRemoveUndistributedNode(e)){t&&(t=t.localName===A?this._firstComposedNode(t):t);var h=this.node._isShadyRoot?this.node.host:this.node;i(h,e,t),t?p.call(h,e,t):v.call(h,e)}return o&&this._updateInsertionPoints(n.host),this.notifyObserver(),e},removeChild:function(t){if(e(t).parentNode!==this.node&&console.warn("The node to be removed is not a child of this node",t),this._removeNodeFromHost(t),!this._maybeDistribute(t,this.node)){var o=this.node._isShadyRoot?this.node.host:this.node;o===t.parentNode&&(h(o,t),m.call(o,t))}return this.notifyObserver(),t},replaceChild:function(e,t){return this.insertBefore(e,t),this.removeChild(t),e},_hasCachedOwnerRoot:function(e){return Boolean(void 0!==e._ownerShadyRoot)},getOwnerRoot:function(){return this._ownerShadyRootForNode(this.node)},_ownerShadyRootForNode:function(e){if(e){if(void 0===e._ownerShadyRoot){var t;if(e._isShadyRoot)t=e;else{var o=Polymer.dom(e).parentNode;t=o?o._isShadyRoot?o:this._ownerShadyRootForNode(o):null}e._ownerShadyRoot=t}return e._ownerShadyRoot}},_maybeDistribute:function(e,t){var o=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noContent&&Polymer.dom(e).querySelector(A),n=o&&Polymer.dom(o).parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,i=o||e.localName===A;if(i){var r=this._ownerShadyRootForNode(t);if(r){var s=r.host;this._lazyDistribute(s)}}var h=this._parentNeedsDistribution(t);return h&&this._lazyDistribute(t),h||i&&!n},_maybeAddInsertionPoint:function(t,o){var n;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||t.__noContent)t.localName===A&&(d(o),d(t),n=!0);else for(var i,r,s,h=e(t).querySelectorAll(A),a=0;a<h.length&&(i=h[a]);a++)r=e(i).parentNode,r===t&&(r=o),s=this._maybeAddInsertionPoint(i,r),n=n||s;return n},_tryRemoveUndistributedNode:function(e){if(this.node.shadyRoot){var t=r(e);return t&&m.call(t,e),!0}},_updateInsertionPoints:function(t){for(var o,n=t.shadyRoot._insertionPoints=e(t.shadyRoot).querySelectorAll(A),i=0;i<n.length;i++)o=n[i],d(o),d(e(o).parentNode)},_nodeHasLogicalChildren:function(e){return Boolean(void 0!==e._lightChildren)},_parentNeedsDistribution:function(e){return e&&e.shadyRoot&&c(e.shadyRoot)},_removeNodeFromParent:function(o){var n=o._lightParent||o.parentNode;n&&t(n)&&e(n).notifyObserver(),this._removeNodeFromHost(o,!0)},_removeNodeFromHost:function(t,o){var n,i,s=t._lightParent;s&&(e(t)._distributeParent(),i=this._ownerShadyRootForNode(t),i&&(i.host._elementRemove(t),n=this._removeDistributedChildren(i,t)),this._removeLogicalInfo(t,s)),this._removeOwnerShadyRoot(t),i&&n?(this._updateInsertionPoints(i.host),this._lazyDistribute(i.host)):o&&h(r(t),t)},_removeDistributedChildren:function(t,o){for(var n,i=t._insertionPoints,r=0;r<i.length;r++){var s=i[r];if(this._contains(o,s))for(var d=e(s).getDistributedNodes(),a=0;a<d.length;a++){n=!0;var l=d[a],u=l.parentNode;u&&(h(u,l),m.call(u,l))}}return n},_contains:function(t,o){for(;o;){if(o==t)return!0;o=e(o).parentNode}},_addNodeToHost:function(e){var t=this.getOwnerRoot();t&&t.host._elementAdd(e)},_addLogicalInfo:function(t,o,n){var i=e(o).childNodes;if(n=void 0===n?i.length:n,t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var r,s=a(t),h=0;h<s.length&&(r=s[h]);h++)i.splice(n++,0,r),r._lightParent=o;else i.splice(n,0,t),t._lightParent=o},_removeLogicalInfo:function(t,o){var n=e(o).childNodes,i=n.indexOf(t);if(0>i||o!==t._lightParent)throw Error("The node to be removed is not a child of this node");n.splice(i,1),t._lightParent=null},_removeOwnerShadyRoot:function(t){if(this._hasCachedOwnerRoot(t))for(var o,n=e(t).childNodes,i=0,r=n.length;r>i&&(o=n[i]);i++)this._removeOwnerShadyRoot(o);t._ownerShadyRoot=void 0},_firstComposedNode:function(t){for(var o,n,i=e(t).getDistributedNodes(),r=0,s=i.length;s>r&&(o=i[r]);r++)if(n=e(o).getDestinationInsertionPoints(),n[n.length-1]===t)return o},querySelector:function(e){return this.querySelectorAll(e)[0]},querySelectorAll:function(e){return this._query(function(t){return O.call(t,e)},this.node)},_query:function(t,o){o=o||this.node;var n=[];return this._queryElements(e(o).childNodes,t,n),n},_queryElements:function(e,t,o){for(var n,i=0,r=e.length;r>i&&(n=e[i]);i++)n.nodeType===Node.ELEMENT_NODE&&this._queryElement(n,t,o)},_queryElement:function(t,o,n){o(t)&&n.push(t),this._queryElements(e(t).childNodes,o,n)},getDestinationInsertionPoints:function(){return this.node._destinationInsertionPoints||[]},getDistributedNodes:function(){return this.node._distributedNodes||[]},queryDistributedElements:function(e){for(var t,o=this.getEffectiveChildNodes(),n=[],i=0,r=o.length;r>i&&(t=o[i]);i++)t.nodeType===Node.ELEMENT_NODE&&O.call(t,e)&&n.push(t);return n},getEffectiveChildNodes:function(){for(var t,o=[],n=this.childNodes,i=0,r=n.length;r>i&&(t=n[i]);i++)if(t.localName===A)for(var s=e(t).getDistributedNodes(),h=0;h<s.length;h++)o.push(s[h]);else o.push(t);return o},_clear:function(){for(;this.childNodes.length;)this.removeChild(this.childNodes[0])},setAttribute:function(e,t){this.node.setAttribute(e,t),this._distributeParent()},removeAttribute:function(e){this.node.removeAttribute(e),this._distributeParent()},_distributeParent:function(){this._parentNeedsDistribution(this.parentNode)&&this._lazyDistribute(this.parentNode)},cloneNode:function(t){var o=y.call(this.node,!1);if(t)for(var n,i=this.childNodes,r=e(o),s=0;s<i.length;s++)n=e(i[s]).cloneNode(!0),r.appendChild(n);return o},importNode:function(t,o){var n=this.node instanceof Document?this.node:this.node.ownerDocument,i=b.call(n,t,!1);if(o)for(var r,s=e(t).childNodes,h=e(i),d=0;d<s.length;d++)r=e(n).importNode(s[d],!0),h.appendChild(r);return i},observeNodes:function(e){return e?(this.observer||(this.observer=this.node.localName===A?new C.DistributedNodesObserver(this):new C.EffectiveNodesObserver(this)),this.observer.addListener(e)):void 0},unobserveNodes:function(e){this.observer&&this.observer.removeListener(e)},notifyObserver:function(){this.observer&&this.observer.notify()}},f.useShadow){var P=function(e){for(var t=0;t<e.length;t++)E(e[t])},E=function(e){C.prototype[e]=function(){return this.node[e].apply(this.node,arguments)}};P(["cloneNode","appendChild","insertBefore","removeChild","replaceChild"]),C.prototype.querySelectorAll=function(e){return u(this.node.querySelectorAll(e))},C.prototype.getOwnerRoot=function(){for(var e=this.node;e;){if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host)return e;e=e.parentNode}},C.prototype.importNode=function(e,t){var o=this.node instanceof Document?this.node:this.node.ownerDocument;return o.importNode(e,t)},C.prototype.getDestinationInsertionPoints=function(){var e=this.node.getDestinationInsertionPoints&&this.node.getDestinationInsertionPoints();return e?u(e):[]},C.prototype.getDistributedNodes=function(){var e=this.node.getDistributedNodes&&this.node.getDistributedNodes();return e?u(e):[]},C.prototype._distributeParent=function(){},Object.defineProperties(C.prototype,{childNodes:{get:function(){return a(this.node)},configurable:!0},children:{get:function(){return l(this.node)},configurable:!0},textContent:{get:function(){return this.node.textContent},set:function(e){return this.node.textContent=e},configurable:!0},innerHTML:{get:function(){return this.node.innerHTML},set:function(e){return this.node.innerHTML=e},configurable:!0}});var D=function(e){for(var t=0;t<e.length;t++)R(e[t])},R=function(e){Object.defineProperty(C.prototype,e,{get:function(){return this.node[e]},configurable:!0})};D(["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"])}else Object.defineProperties(C.prototype,{childNodes:{get:function(){var e=o(this.node);return Array.isArray(e)?e:a(this.node)},configurable:!0},children:{get:function(){return Array.prototype.filter.call(this.childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE})},configurable:!0},parentNode:{get:function(){return this.node._lightParent||r(this.node)},configurable:!0},firstChild:{get:function(){return this.childNodes[0]},configurable:!0},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]},configurable:!0},nextSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).childNodes;return t?t[Array.prototype.indexOf.call(t,this.node)+1]:void 0},configurable:!0},previousSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).childNodes;return t?t[Array.prototype.indexOf.call(t,this.node)-1]:void 0},configurable:!0},firstElementChild:{get:function(){return this.children[0]},configurable:!0},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]},configurable:!0},nextElementSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).children;return t?t[Array.prototype.indexOf.call(t,this.node)+1]:void 0},configurable:!0},previousElementSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).children;return t?t[Array.prototype.indexOf.call(t,this.node)-1]:void 0},configurable:!0},textContent:{get:function(){var e=this.node.nodeType;if(e===Node.TEXT_NODE||e===Node.COMMENT_NODE)return this.node.textContent;for(var t,o=[],n=0,i=this.childNodes;t=i[n];n++)t.nodeType!==Node.COMMENT_NODE&&o.push(t.textContent);return o.join("")},set:function(e){var t=this.node.nodeType;t===Node.TEXT_NODE||t===Node.COMMENT_NODE?this.node.textContent=e:(this._clear(),e&&this.appendChild(document.createTextNode(e)))},configurable:!0},innerHTML:{get:function(){var e=this.node.nodeType;return e===Node.TEXT_NODE||e===Node.COMMENT_NODE?null:_(this.node)},set:function(e){var t=this.node.nodeType;if(t!==Node.TEXT_NODE||t!==Node.COMMENT_NODE){this._clear();var o=document.createElement("div");o.innerHTML=e;for(var n=a(o),i=0;i<n.length;i++)this.appendChild(n[i])}},configurable:!0}}),C.prototype._getComposedInnerHTML=function(){return _(this.node,!0)};var A="content";Polymer.dom=function(t,o){return t instanceof Event?Polymer.EventApi.factory(t):e(t,o)};var S=Element.prototype,O=S.matches||S.matchesSelector||S.mozMatchesSelector||S.msMatchesSelector||S.oMatchesSelector||S.webkitMatchesSelector;return{getLightChildren:o,getComposedParent:r,getComposedChildren:n,removeFromComposedParent:h,saveLightChildrenIfNeeded:d,matchesSelector:O,hasInsertionPoint:c,ctor:C,factory:e,hasDomApi:t,arrayCopy:u,arrayCopyChildNodes:a,arrayCopyChildren:l,wrap:N}}(),Polymer.Base.extend(Polymer.dom,{_flushGuard:0,_FLUSH_MAX:100,_needsTakeRecords:!Polymer.Settings.useNativeCustomElements,_debouncers:[],_staticFlushList:[],_finishDebouncer:null,flush:function(){for(this._flushGuard=0,this._prepareFlush();this._debouncers.length&&this._flushGuard<this._FLUSH_MAX;){for(var e=0;e<this._debouncers.length;e++)this._debouncers[e].complete();this._finishDebouncer&&this._finishDebouncer.complete(),this._prepareFlush(),this._flushGuard++}this._flushGuard>=this._FLUSH_MAX&&console.warn("Polymer.dom.flush aborted. Flush may not be complete.")},_prepareFlush:function(){this._needsTakeRecords&&CustomElements.takeRecords();for(var e=0;e<this._staticFlushList.length;e++)this._staticFlushList[e]()},addStaticFlush:function(e){this._staticFlushList.push(e)},removeStaticFlush:function(e){var t=this._staticFlushList.indexOf(e);t>=0&&this._staticFlushList.splice(t,1)},addDebouncer:function(e){this._debouncers.push(e),this._finishDebouncer=Polymer.Debounce(this._finishDebouncer,this._finishFlush)},_finishFlush:function(){Polymer.dom._debouncers=[]}}),Polymer.EventApi=function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.Event=function(e){this.event=e},t.useShadow?e.Event.prototype={get rootTarget(){return this.event.path[0]},get localTarget(){return this.event.target},get path(){return this.event.path}}:e.Event.prototype={get rootTarget(){return this.event.target},get localTarget(){for(var e=this.event.currentTarget,t=e&&Polymer.dom(e).getOwnerRoot(),o=this.path,n=0;n<o.length;n++)if(Polymer.dom(o[n]).getOwnerRoot()===t)return o[n]},get path(){if(!this.event._path){for(var e=[],t=this.rootTarget;t;)e.push(t),t=Polymer.dom(t).parentNode||t.host;e.push(window),this.event._path=e}return this.event._path}};var o=function(t){return t.__eventApi||(t.__eventApi=new e.Event(t)),t.__eventApi};return{factory:o}}(),function(){"use strict";var e=Polymer.DomApi.ctor;Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList||(this._classList=new e.ClassList(this)),this._classList},configurable:!0}),e.ClassList=function(e){this.domApi=e,this.node=e.node},e.ClassList.prototype={add:function(){this.node.classList.add.apply(this.node.classList,arguments),this.domApi._distributeParent()},remove:function(){this.node.classList.remove.apply(this.node.classList,arguments),this.domApi._distributeParent()},toggle:function(){this.node.classList.toggle.apply(this.node.classList,arguments),this.domApi._distributeParent()},contains:function(){return this.node.classList.contains.apply(this.node.classList,arguments)}}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;Polymer.DomApi.hasDomApi;if(e.EffectiveNodesObserver=function(e){this.domApi=e,this.node=this.domApi.node,this._listeners=[]},e.EffectiveNodesObserver.prototype={addListener:function(e){this._isSetup||(this._setup(),this._isSetup=!0);var t={fn:e,_nodes:[]};return this._listeners.push(t),this._scheduleNotify(),t},removeListener:function(e){var t=this._listeners.indexOf(e);t>=0&&(this._listeners.splice(t,1),e._nodes=[]),this._hasListeners()||(this._cleanup(),this._isSetup=!1)},_setup:function(){this._observeContentElements(this.domApi.childNodes)},_cleanup:function(){this._unobserveContentElements(this.domApi.childNodes)},_hasListeners:function(){return Boolean(this._listeners.length)},_scheduleNotify:function(){this._debouncer&&this._debouncer.stop(),this._debouncer=Polymer.Debounce(this._debouncer,this._notify),this._debouncer.context=this,Polymer.dom.addDebouncer(this._debouncer)},notify:function(){this._hasListeners()&&this._scheduleNotify()},_notify:function(e){this._beforeCallListeners(),this._callListeners()},_beforeCallListeners:function(){this._updateContentElements()},_updateContentElements:function(){this._observeContentElements(this.domApi.childNodes)},_observeContentElements:function(e){for(var t,o=0;o<e.length&&(t=e[o]);o++)this._isContent(t)&&(t.__observeNodesMap=t.__observeNodesMap||new WeakMap,t.__observeNodesMap.has(this)||t.__observeNodesMap.set(this,this._observeContent(t)))},_observeContent:function(e){var t=this,o=Polymer.dom(e).observeNodes(function(){t._scheduleNotify()});return o._avoidChangeCalculation=!0,o},_unobserveContentElements:function(e){for(var t,o,n=0;n<e.length&&(t=e[n]);n++)this._isContent(t)&&(o=t.__observeNodesMap.get(this),o&&(Polymer.dom(t).unobserveNodes(o),t.__observeNodesMap["delete"](this)))},_isContent:function(e){return"content"===e.localName},_callListeners:function(){for(var e,t=this._listeners,o=this._getEffectiveNodes(),n=0;n<t.length&&(e=t[n]);n++){var i=this._generateListenerInfo(e,o);(i||e._alwaysNotify)&&this._callListener(e,i)}},_getEffectiveNodes:function(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:function(e,t){if(e._avoidChangeCalculation)return!0;for(var o,n=e._nodes,i={target:this.node,addedNodes:[],removedNodes:[]},r=Polymer.ArraySplice.calculateSplices(t,n),s=0;s<r.length&&(o=r[s]);s++)for(var h,d=0;d<o.removed.length&&(h=o.removed[d]);d++)i.removedNodes.push(h);for(var o,s=0;s<r.length&&(o=r[s]);s++)for(var d=o.index;d<o.index+o.addedCount;d++)i.addedNodes.push(t[d]);return e._nodes=t,i.addedNodes.length||i.removedNodes.length?i:void 0},_callListener:function(e,t){return e.fn.call(this.node,t)},enableShadowAttributeTracking:function(){}},t.useShadow){var o=e.EffectiveNodesObserver.prototype._setup,n=e.EffectiveNodesObserver.prototype._cleanup;e.EffectiveNodesObserver.prototype._beforeCallListeners;Polymer.Base.extend(e.EffectiveNodesObserver.prototype,{_setup:function(){if(!this._observer){var e=this;this._mutationHandler=function(t){t&&t.length&&e._scheduleNotify()},this._observer=new MutationObserver(this._mutationHandler),this._boundFlush=function(){e._flush()},Polymer.dom.addStaticFlush(this._boundFlush),this._observer.observe(this.node,{childList:!0})}o.call(this)},_cleanup:function(){this._observer.disconnect(),this._observer=null,this._mutationHandler=null,Polymer.dom.removeStaticFlush(this._boundFlush),n.call(this)},_flush:function(){this._observer&&this._mutationHandler(this._observer.takeRecords())},enableShadowAttributeTracking:function(){if(this._observer){this._makeContentListenersAlwaysNotify(),this._observer.disconnect(),this._observer.observe(this.node,{childList:!0,attributes:!0,subtree:!0});var e=this.domApi.getOwnerRoot(),t=e&&e.host;t&&Polymer.dom(t).observer&&Polymer.dom(t).observer.enableShadowAttributeTracking()}},_makeContentListenersAlwaysNotify:function(){for(var e,t=0;t<this._listeners.length;t++)e=this._listeners[t],e._alwaysNotify=e._isContentListener}})}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.DistributedNodesObserver=function(t){e.EffectiveNodesObserver.call(this,t)},e.DistributedNodesObserver.prototype=Object.create(e.EffectiveNodesObserver.prototype),Polymer.Base.extend(e.DistributedNodesObserver.prototype,{_setup:function(){},_cleanup:function(){},_beforeCallListeners:function(){},_getEffectiveNodes:function(){return this.domApi.getDistributedNodes()}}),t.useShadow&&Polymer.Base.extend(e.DistributedNodesObserver.prototype,{_setup:function(){if(!this._observer){var e=this.domApi.getOwnerRoot(),t=e&&e.host;if(t){var o=this;this._observer=Polymer.dom(t).observeNodes(function(){o._scheduleNotify()}),this._observer._isContentListener=!0,this._hasAttrSelect()&&Polymer.dom(t).observer.enableShadowAttributeTracking()}}},_hasAttrSelect:function(){var e=this.node.getAttribute("select");return e&&e.match(/[[.]+/)},_cleanup:function(){var e=this.domApi.getOwnerRoot(),t=e&&e.host;t&&Polymer.dom(t).unobserveNodes(this._observer),this._observer=null}})}(),function(){function e(e,t){t._distributedNodes.push(e);var o=e._destinationInsertionPoints;o?o.push(t):e._destinationInsertionPoints=[t]}function t(e){var t=e._distributedNodes;if(t)for(var o=0;o<t.length;o++){var n=t[o]._destinationInsertionPoints;n&&n.splice(n.indexOf(e)+1,n.length)}}function o(e,t){var o=e._lightParent;o&&o.shadyRoot&&v(o.shadyRoot)&&o.shadyRoot._distributionClean&&(o.shadyRoot._distributionClean=!1,t.shadyRoot._dirtyRoots.push(o))}function n(e,t){var o=t._destinationInsertionPoints;return o&&o[o.length-1]===e}function i(e){return"content"==e.localName}function r(e,t,o){var n=b(t);n!==e&&g(n,t),s(t),N.call(e,t,o||null),t._composedParent=e}function s(e){var t=b(e);t&&(e._composedParent=null,C.call(t,e))}function h(e,t){for(var o=0;o<t.length;o++)t[o]._composedParent=e}function d(e){for(;e&&a(e);)e=e.domHost;return e}function a(e){for(var t,o=Polymer.dom(e).children,n=0;n<o.length;n++)if(t=o[n],"content"===t.localName)return e.domHost}function l(e){for(var t,o=0;o<e._insertionPoints.length;o++)t=e._insertionPoints[o],f(t)&&Polymer.dom(t).notifyObserver()}function u(e){f(e)&&Polymer.dom(e).notifyObserver()}function c(e){if(P&&e)for(var t=0;t<e.length;t++)CustomElements.upgrade(e[t])}var f=Polymer.DomApi.hasDomApi;Polymer.Base._addFeature({_prepShady:function(){this._useContent=this._useContent||Boolean(this._template)},_poolContent:function(){this._useContent&&_(this)},_setupRoot:function(){this._useContent&&(this._createLocalRoot(),this.dataHost||c(this._lightChildren))},_createLocalRoot:function(){this.shadyRoot=this.root,this.shadyRoot._distributionClean=!1,this.shadyRoot._hasDistributed=!1,this.shadyRoot._isShadyRoot=!0,this.shadyRoot._dirtyRoots=[];var e=this.shadyRoot._insertionPoints=!this._notes||this._notes._hasContent?this.shadyRoot.querySelectorAll("content"):[];_(this.shadyRoot);for(var t,o=0;o<e.length;o++)t=e[o],_(t),_(t.parentNode);this.shadyRoot.host=this},get domHost(){var e=Polymer.dom(this).getOwnerRoot();return e&&e.host},distributeContent:function(e){if(this.shadyRoot){var t=Polymer.dom(this);e&&t._updateInsertionPoints(this);var o=d(this);t._lazyDistribute(o)}},_distributeContent:function(){this._useContent&&!this.shadyRoot._distributionClean&&(this._beginDistribute(),this._distributeDirtyRoots(),this._finishDistribute())},_beginDistribute:function(){this._useContent&&v(this.shadyRoot)&&(this._resetDistribution(),this._distributePool(this.shadyRoot,this._collectPool()))},_distributeDirtyRoots:function(){for(var e,t=this.shadyRoot._dirtyRoots,o=0,n=t.length;n>o&&(e=t[o]);o++)e._distributeContent();this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._distributionClean=!0,v(this.shadyRoot))this._composeTree(),l(this.shadyRoot);else if(this.shadyRoot._hasDistributed){var e=this._composeNode(this);this._updateChildNodes(this,e)}else this.textContent="",this._composedChildren=null,this.appendChild(this.shadyRoot);this.shadyRoot._hasDistributed||u(this),this.shadyRoot._hasDistributed=!0}},elementMatches:function(e,t){return t=t||this,m.call(t,e)},_resetDistribution:function(){for(var e=p(this),o=0;o<e.length;o++){var n=e[o];n._destinationInsertionPoints&&(n._destinationInsertionPoints=void 0),i(n)&&t(n)}for(var r=this.shadyRoot,s=r._insertionPoints,h=0;h<s.length;h++)s[h]._distributedNodes=[]},_collectPool:function(){for(var e=[],t=p(this),o=0;o<t.length;o++){var n=t[o];i(n)?e.push.apply(e,n._distributedNodes):e.push(n)}return e},_distributePool:function(e,t){for(var n,i=e._insertionPoints,r=0,s=i.length;s>r&&(n=i[r]);r++)this._distributeInsertionPoint(n,t),o(n,this)},_distributeInsertionPoint:function(t,o){for(var n,i=!1,r=0,s=o.length;s>r;r++)n=o[r],n&&this._matchesContentSelect(n,t)&&(e(n,t),o[r]=void 0,i=!0);if(!i)for(var h=p(t),d=0;d<h.length;d++)e(h[d],t)},_composeTree:function(){this._updateChildNodes(this,this._composeNode(this));for(var e,t,o=this.shadyRoot._insertionPoints,n=0,i=o.length;i>n&&(e=o[n]);n++)t=e._lightParent||e.parentNode,t._useContent||t===this||t===this.shadyRoot||this._updateChildNodes(t,this._composeNode(t))},_composeNode:function(e){for(var t=[],o=p(e.shadyRoot||e),r=0;r<o.length;r++){var s=o[r];if(i(s))for(var h=s._distributedNodes,d=0;d<h.length;d++){var a=h[d];n(s,a)&&t.push(a)}else t.push(s)}return t},_updateChildNodes:function(e,t){for(var o,n=y(e),i=Polymer.ArraySplice.calculateSplices(t,n),d=0,a=0;d<i.length&&(o=i[d]);d++){for(var l,u=0;u<o.removed.length&&(l=o.removed[u]);u++)b(l)===e&&s(l),n.splice(o.index+a,1);a-=o.addedCount}for(var o,c,d=0;d<i.length&&(o=i[d]);d++){c=n[o.index];for(var l,u=o.index;u<o.index+o.addedCount;u++)l=t[u],r(e,l,c),n.splice(u,0,l)}h(e,t)},_matchesContentSelect:function(e,t){var o=t.getAttribute("select");if(!o)return!0;if(o=o.trim(),!o)return!0;if(!(e instanceof Element))return!1;var n=/^(:not\()?[*.#[a-zA-Z_|]/;return n.test(o)?this.elementMatches(o,e):!1},_elementAdd:function(){},_elementRemove:function(){}});var _=Polymer.DomApi.saveLightChildrenIfNeeded,p=Polymer.DomApi.getLightChildren,m=Polymer.DomApi.matchesSelector,v=Polymer.DomApi.hasInsertionPoint,y=Polymer.DomApi.getComposedChildren,b=Polymer.DomApi.getComposedParent,g=Polymer.DomApi.removeFromComposedParent,N=Element.prototype.insertBefore,C=Element.prototype.removeChild,P=window.CustomElements&&!CustomElements.useNative}(),Polymer.Settings.useShadow&&Polymer.Base._addFeature({_poolContent:function(){},_beginDistribute:function(){},distributeContent:function(){},_distributeContent:function(){},_finishDistribute:function(){},_createLocalRoot:function(){this.createShadowRoot(),this.shadowRoot.appendChild(this.root),this.root=this.shadowRoot}}),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){}});</script><script>Polymer.nar=[],Polymer.Annotations={parseAnnotations:function(t){var e=[],n=t._content||t.content;return this._parseNodeAnnotations(n,e,t.hasAttribute("strip-whitespace")),e},_parseNodeAnnotations:function(t,e,n){return t.nodeType===Node.TEXT_NODE?this._parseTextNodeAnnotation(t,e):this._parseElementAnnotations(t,e,n)},_bindingRegex:/([^{[]*)(\{\{|\[\[)(?!\}\}|\]\])(.+?)(?:\]\]|\}\})/g,_parseBindings:function(t){for(var e,n,r=this._bindingRegex,s=[];null!==(e=r.exec(t));){e[1]&&s.push({literal:e[1]});var i=e[2][0],o=e[3].trim(),a=!1;"!"==o[0]&&(a=!0,o=o.substring(1).trim());var l,h,c;"{"==i&&(c=o.indexOf("::"))>0&&(h=o.substring(c+2),o=o.substring(0,c),l=!0),s.push({compoundIndex:s.length,value:o,mode:i,negate:a,event:h,customEvent:l}),n=r.lastIndex}if(n&&n<t.length){var u=t.substring(n);u&&s.push({literal:u})}return s.length?s:void 0},_literalFromParts:function(t){for(var e="",n=0;n<t.length;n++){var r=t[n].literal;e+=r||""}return e},_parseTextNodeAnnotation:function(t,e){var n=this._parseBindings(t.textContent);if(n){t.textContent=this._literalFromParts(n)||" ";var r={bindings:[{kind:"text",name:"textContent",parts:n,isCompound:1!==n.length}]};return e.push(r),r}},_parseElementAnnotations:function(t,e,n){var r={bindings:[],events:[]};return"content"===t.localName&&(e._hasContent=!0),this._parseChildNodesAnnotations(t,r,e,n),t.attributes&&(this._parseNodeAttributeAnnotations(t,r,e),this.prepElement&&this.prepElement(t)),(r.bindings.length||r.events.length||r.id)&&e.push(r),r},_parseChildNodesAnnotations:function(t,e,n,r){if(t.firstChild)for(var s=t.firstChild,i=0;s;){var o=s.nextSibling;if("template"!==s.localName||s.hasAttribute("preserve-content")||this._parseTemplate(s,i,n,e),s.nodeType===Node.TEXT_NODE){for(var a=o;a&&a.nodeType===Node.TEXT_NODE;)s.textContent+=a.textContent,o=a.nextSibling,t.removeChild(a),a=o;r&&!s.textContent.trim()&&(t.removeChild(s),i--)}if(s.parentNode){var l=this._parseNodeAnnotations(s,n,r);l&&(l.parent=e,l.index=i)}s=o,i++}},_parseTemplate:function(t,e,n,r){var s=document.createDocumentFragment();s._notes=this.parseAnnotations(t),s.appendChild(t.content),n.push({bindings:Polymer.nar,events:Polymer.nar,templateContent:s,parent:r,index:e})},_parseNodeAttributeAnnotations:function(t,e){for(var n,r=Array.prototype.slice.call(t.attributes),s=r.length-1;n=r[s];s--){var i,o=n.name,a=n.value;"on-"===o.slice(0,3)?(t.removeAttribute(o),e.events.push({name:o.slice(3),value:a})):(i=this._parseNodeAttributeAnnotation(t,o,a))?e.bindings.push(i):"id"===o&&(e.id=a)}},_parseNodeAttributeAnnotation:function(t,e,n){var r=this._parseBindings(n);if(r){var s=e,i="property";"$"==e[e.length-1]&&(e=e.slice(0,-1),i="attribute");var o=this._literalFromParts(r);return o&&"attribute"==i&&t.setAttribute(e,o),"input"==t.localName&&"value"==e&&t.setAttribute(s,""),t.removeAttribute(s),"property"===i&&(e=Polymer.CaseMap.dashToCamelCase(e)),{kind:i,name:e,parts:r,literal:o,isCompound:1!==r.length}}},_localSubTree:function(t,e){return t===e?t.childNodes:t._lightChildren||t.childNodes},findAnnotatedNode:function(t,e){var n=e.parent&&Polymer.Annotations.findAnnotatedNode(t,e.parent);return n?Polymer.Annotations._localSubTree(n,t)[e.index]:t}},function(){function t(t,e){return t.replace(a,function(t,r,s,i){return r+"'"+n(s.replace(/["']/g,""),e)+"'"+i})}function e(e,r){for(var s in l)for(var i,o,a,c=l[s],u=0,f=c.length;f>u&&(i=c[u]);u++)("*"===s||e.localName===s)&&(o=e.attributes[i],a=o&&o.value,a&&a.search(h)<0&&(o.value="style"===i?t(a,r):n(a,r)))}function n(t,e){if(t&&"#"===t[0])return t;var n=s(e);return n.href=t,n.href||t}function r(t,e){return i||(i=document.implementation.createHTMLDocument("temp"),o=i.createElement("base"),i.head.appendChild(o)),o.href=e,n(t,i)}function s(t){return t.__urlResolver||(t.__urlResolver=t.createElement("a"))}var i,o,a=/(url\()([^)]*)(\))/g,l={"*":["href","src","style","url"],form:["action"]},h=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:t,resolveAttrs:e,resolveUrl:r}}(),Polymer.Base._addFeature({_prepAnnotations:function(){if(this._template){var t=this;Polymer.Annotations.prepElement=function(e){t._prepElement(e)},this._template._content&&this._template._content._notes?this._notes=this._template._content._notes:this._notes=Polymer.Annotations.parseAnnotations(this._template),this._processAnnotations(this._notes),Polymer.Annotations.prepElement=null}else this._notes=[]},_processAnnotations:function(t){for(var e=0;e<t.length;e++){for(var n=t[e],r=0;r<n.bindings.length;r++)for(var s=n.bindings[r],i=0;i<s.parts.length;i++){var o=s.parts[i];o.literal||(o.signature=this._parseMethod(o.value),o.signature||(o.model=this._modelForPath(o.value)))}if(n.templateContent){this._processAnnotations(n.templateContent._notes);var a=n.templateContent._parentProps=this._discoverTemplateParentProps(n.templateContent._notes),l=[];for(var h in a)l.push({index:n.index,kind:"property",name:"_parent_"+h,parts:[{mode:"{",model:h,value:h}]});n.bindings=n.bindings.concat(l)}}},_discoverTemplateParentProps:function(t){for(var e,n={},r=0;r<t.length&&(e=t[r]);r++){for(var s,i=0,o=e.bindings;i<o.length&&(s=o[i]);i++)for(var a,l=0,h=s.parts;l<h.length&&(a=h[l]);l++)if(a.signature)for(var c=a.signature.args,u=0;u<c.length;u++)n[c[u].model]=!0;else n[a.model]=!0;if(e.templateContent){var f=e.templateContent._parentProps;Polymer.Base.mixin(n,f)}}return n},_prepElement:function(t){Polymer.ResolveUrl.resolveAttrs(t,this._template.ownerDocument)},_findAnnotatedNode:Polymer.Annotations.findAnnotatedNode,_marshalAnnotationReferences:function(){this._template&&(this._marshalIdNodes(),this._marshalAnnotatedNodes(),this._marshalAnnotatedListeners())},_configureAnnotationReferences:function(t){for(var e=this._notes,n=this._nodes,r=0;r<e.length;r++){var s=e[r],i=n[r];this._configureTemplateContent(s,i),this._configureCompoundBindings(s,i)}},_configureTemplateContent:function(t,e){t.templateContent&&(e._content=t.templateContent)},_configureCompoundBindings:function(t,e){for(var n=t.bindings,r=0;r<n.length;r++){var s=n[r];if(s.isCompound){for(var i=e.__compoundStorage__||(e.__compoundStorage__={}),o=s.parts,a=new Array(o.length),l=0;l<o.length;l++)a[l]=o[l].literal;var h=s.name;i[h]=a,s.literal&&"property"==s.kind&&(e._configValue?e._configValue(h,s.literal):e[h]=s.literal)}}},_marshalIdNodes:function(){this.$={};for(var t,e=0,n=this._notes.length;n>e&&(t=this._notes[e]);e++)t.id&&(this.$[t.id]=this._findAnnotatedNode(this.root,t))},_marshalAnnotatedNodes:function(){if(this._notes&&this._notes.length){for(var t=new Array(this._notes.length),e=0;e<this._notes.length;e++)t[e]=this._findAnnotatedNode(this.root,this._notes[e]);this._nodes=t}},_marshalAnnotatedListeners:function(){for(var t,e=0,n=this._notes.length;n>e&&(t=this._notes[e]);e++)if(t.events&&t.events.length)for(var r,s=this._findAnnotatedNode(this.root,t),i=0,o=t.events;i<o.length&&(r=o[i]);i++)this.listen(s,r.name,r.value)}}),Polymer.Base._addFeature({listeners:{},_listenListeners:function(t){var e,n,r;for(r in t)r.indexOf(".")<0?(e=this,n=r):(n=r.split("."),e=this.$[n[0]],n=n[1]),this.listen(e,n,t[r])},listen:function(t,e,n){var r=this._recallEventHandler(this,e,t,n);r||(r=this._createEventHandler(t,e,n)),r._listening||(this._listen(t,e,r),r._listening=!0)},_boundListenerKey:function(t,e){return t+":"+e},_recordEventHandler:function(t,e,n,r,s){var i=t.__boundListeners;i||(i=t.__boundListeners=new WeakMap);var o=i.get(n);o||(o={},i.set(n,o));var a=this._boundListenerKey(e,r);o[a]=s},_recallEventHandler:function(t,e,n,r){var s=t.__boundListeners;if(s){var i=s.get(n);if(i){var o=this._boundListenerKey(e,r);return i[o]}}},_createEventHandler:function(t,e,n){var r=this,s=function(t){r[n]?r[n](t,t.detail):r._warn(r._logf("_createEventHandler","listener method `"+n+"` not defined"))};return s._listening=!1,this._recordEventHandler(r,e,t,n,s),s},unlisten:function(t,e,n){var r=this._recallEventHandler(this,e,t,n);r&&(this._unlisten(t,e,r),r._listening=!1)},_listen:function(t,e,n){t.addEventListener(e,n)},_unlisten:function(t,e,n){t.removeEventListener(e,n)}}),function(){"use strict";function t(t){for(var e,n=0;n<m.length;n++)e=m[n],t?document.addEventListener(e,P,!0):document.removeEventListener(e,P,!0)}function e(){if(!g){E.mouse.mouseIgnoreJob||t(!0);var e=function(){t(),E.mouse.target=null,E.mouse.mouseIgnoreJob=null};E.mouse.mouseIgnoreJob=Polymer.Debounce(E.mouse.mouseIgnoreJob,e,d)}}function n(t){var e=t.type;if(-1===m.indexOf(e))return!1;if("mousemove"===e){var n=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!v&&(n=y[t.which]||0),Boolean(1&n)}var r=void 0===t.button?0:t.button;return 0===r}function r(t){if("click"===t.type){if(0===t.detail)return!0;var e=C.findOriginalTarget(t),n=e.getBoundingClientRect(),r=t.pageX,s=t.pageY;return!(r>=n.left&&r<=n.right&&s>=n.top&&s<=n.bottom)}return!1}function s(t){for(var e,n=Polymer.dom(t).path,r="auto",s=0;s<n.length;s++)if(e=n[s],e[u]){r=e[u];break}return r}function i(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function o(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn)}var a=Polymer.DomApi.wrap,l="string"==typeof document.head.style.touchAction,h="__polymerGestures",c="__polymerGesturesHandled",u="__polymerGesturesTouchAction",f=25,p=5,_=2,d=2500,m=["mousedown","mousemove","mouseup","click"],y=[0,1,4,2],v=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}(),g=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),P=function(t){if(t[c]={skip:!0},"click"===t.type){for(var e=Polymer.dom(t).path,n=0;n<e.length;n++)if(e[n]===E.mouse.target)return;t.preventDefault(),t.stopPropagation()}},E={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}},C={gestures:{},recognizers:[],deepTargetFind:function(t,e){for(var n=document.elementFromPoint(t,e),r=n;r&&r.shadowRoot;)r=r.shadowRoot.elementFromPoint(t,e),r&&(n=r);return n},findOriginalTarget:function(t){return t.path?t.path[0]:t.target},handleNative:function(t){var n,r=t.type,s=a(t.currentTarget),i=s[h];if(i){var o=i[r];if(o){if(!t[c]&&(t[c]={},"touch"===r.slice(0,5))){var u=t.changedTouches[0];if("touchstart"===r&&1===t.touches.length&&(E.touch.id=u.identifier),E.touch.id!==u.identifier)return;l||("touchstart"===r||"touchmove"===r)&&C.handleTouchAction(t),"touchend"===r&&(E.mouse.target=Polymer.dom(t).rootTarget,e(!0))}if(n=t[c],!n.skip){for(var f,p=C.recognizers,_=0;_<p.length;_++)f=p[_],o[f.name]&&!n[f.name]&&f.flow&&f.flow.start.indexOf(t.type)>-1&&f.reset&&f.reset();for(var f,_=0;_<p.length;_++)f=p[_],o[f.name]&&!n[f.name]&&(n[f.name]=!0,f[r](t))}}}},handleTouchAction:function(t){var e=t.changedTouches[0],n=t.type;if("touchstart"===n)E.touch.x=e.clientX,E.touch.y=e.clientY,E.touch.scrollDecided=!1;else if("touchmove"===n){if(E.touch.scrollDecided)return;E.touch.scrollDecided=!0;var r=s(t),i=!1,o=Math.abs(E.touch.x-e.clientX),a=Math.abs(E.touch.y-e.clientY);t.cancelable&&("none"===r?i=!0:"pan-x"===r?i=a>o:"pan-y"===r&&(i=o>a)),i?t.preventDefault():C.prevent("track")}},add:function(t,e,n){t=a(t);var r=this.gestures[e],s=r.deps,i=r.name,o=t[h];o||(t[h]=o={});for(var l,c,u=0;u<s.length;u++)l=s[u],g&&m.indexOf(l)>-1||(c=o[l],c||(o[l]=c={_count:0}),0===c._count&&t.addEventListener(l,this.handleNative),c[i]=(c[i]||0)+1,c._count=(c._count||0)+1);t.addEventListener(e,n),r.touchAction&&this.setTouchAction(t,r.touchAction)},remove:function(t,e,n){t=a(t);var r=this.gestures[e],s=r.deps,i=r.name,o=t[h];if(o)for(var l,c,u=0;u<s.length;u++)l=s[u],c=o[l],c&&c[i]&&(c[i]=(c[i]||1)-1,c._count=(c._count||1)-1,0===c._count&&t.removeEventListener(l,this.handleNative));t.removeEventListener(e,n)},register:function(t){this.recognizers.push(t);for(var e=0;e<t.emits.length;e++)this.gestures[t.emits[e]]=t},findRecognizerByEvent:function(t){for(var e,n=0;n<this.recognizers.length;n++){e=this.recognizers[n];for(var r,s=0;s<e.emits.length;s++)if(r=e.emits[s],r===t)return e}return null},setTouchAction:function(t,e){l&&(t.style.touchAction=e),t[u]=e},fire:function(t,e,n){var r=Polymer.Base.fire(e,n,{node:t,bubbles:!0,cancelable:!0});if(r.defaultPrevented){var s=n.sourceEvent;s&&s.preventDefault&&s.preventDefault()}},prevent:function(t){var e=this.findRecognizerByEvent(t);e.info&&(e.info.prevent=!0)}};C.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:function(){},upfn:function(){}},reset:function(){o(this.info)},mousedown:function(t){if(n(t)){var e=C.findOriginalTarget(t),r=this,s=function(t){n(t)||(r.fire("up",e,t),o(r.info))},a=function(t){n(t)&&r.fire("up",e,t),o(r.info)};i(this.info,s,a),this.fire("down",e,t)}},touchstart:function(t){this.fire("down",C.findOriginalTarget(t),t.changedTouches[0])},touchend:function(t){this.fire("up",C.findOriginalTarget(t),t.changedTouches[0])},fire:function(t,e,n){C.fire(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,prevent:function(t){return C.prevent(t)}})}}),C.register({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>_&&this.moves.shift(),this.moves.push(t)},movefn:function(){},upfn:function(){},prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,o(this.info)},hasMovedEnough:function(t,e){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-t),r=Math.abs(this.info.y-e);return n>=p||r>=p},mousedown:function(t){if(n(t)){var e=C.findOriginalTarget(t),r=this,s=function(t){var s=t.clientX,i=t.clientY;r.hasMovedEnough(s,i)&&(r.info.state=r.info.started?"mouseup"===t.type?"end":"track":"start",r.info.addMove({x:s,y:i}),n(t)||(r.info.state="end",o(r.info)),r.fire(e,t),r.info.started=!0)},a=function(t){r.info.started&&(C.prevent("tap"),s(t)),o(r.info)};i(this.info,s,a),this.info.x=t.clientX,this.info.y=t.clientY}},touchstart:function(t){var e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){var e=C.findOriginalTarget(t),n=t.changedTouches[0],r=n.clientX,s=n.clientY;this.hasMovedEnough(r,s)&&(this.info.addMove({x:r,y:s}),this.fire(e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){var e=C.findOriginalTarget(t),n=t.changedTouches[0];this.info.started&&(C.prevent("tap"),this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this.fire(e,n))},fire:function(t,e){var n,r=this.info.moves[this.info.moves.length-2],s=this.info.moves[this.info.moves.length-1],i=s.x-this.info.x,o=s.y-this.info.y,a=0;return r&&(n=s.x-r.x,a=s.y-r.y),C.fire(t,"track",{state:this.info.state,x:e.clientX,y:e.clientY,dx:i,dy:o,ddx:n,ddy:a,sourceEvent:e,hover:function(){return C.deepTargetFind(e.clientX,e.clientY)}})}}),C.register({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(t){this.info.x=t.clientX,this.info.y=t.clientY},mousedown:function(t){n(t)&&this.save(t)},click:function(t){n(t)&&this.forward(t)},touchstart:function(t){this.save(t.changedTouches[0])},touchend:function(t){this.forward(t.changedTouches[0])},forward:function(t){var e=Math.abs(t.clientX-this.info.x),n=Math.abs(t.clientY-this.info.y),s=C.findOriginalTarget(t);(isNaN(e)||isNaN(n)||f>=e&&f>=n||r(t))&&(this.info.prevent||C.fire(s,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t}))}});var S={x:"pan-x",y:"pan-y",none:"none",all:"auto"};Polymer.Base._addFeature({_listen:function(t,e,n){C.gestures[e]?C.add(t,e,n):t.addEventListener(e,n)},_unlisten:function(t,e,n){C.gestures[e]?C.remove(t,e,n):t.removeEventListener(e,n)},setScrollDirection:function(t,e){e=e||this,C.setTouchAction(e,S[t]||"auto")}}),Polymer.Gestures=C}(),Polymer.Async={_currVal:0,_lastVal:0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:function(t,e){return e>0?~setTimeout(t,e):(this._twiddle.textContent=this._twiddleContent++,this._callbacks.push(t),this._currVal++)},cancel:function(t){if(0>t)clearTimeout(~t);else{var e=t-this._lastVal;if(e>=0){if(!this._callbacks[e])throw"invalid async handle: "+t;this._callbacks[e]=null}}},_atEndOfMicrotask:function(){for(var t=this._callbacks.length,e=0;t>e;e++){var n=this._callbacks[e];if(n)try{n()}catch(r){throw e++,this._callbacks.splice(0,e),this._lastVal+=e,this._twiddle.textContent=this._twiddleContent++,r}}this._callbacks.splice(0,t),this._lastVal+=t}},new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()}).observe(Polymer.Async._twiddle,{characterData:!0}),Polymer.Debounce=function(){function t(t,e,r){return t?t.stop():t=new n(this),t.go(e,r),t}var e=Polymer.Async,n=function(t){this.context=t;var e=this;this.boundComplete=function(){e.complete()}};return n.prototype={go:function(t,n){var r;this.finish=function(){e.cancel(r)},r=e.run(this.boundComplete,n),this.callback=t},stop:function(){this.finish&&(this.finish(),this.finish=null)},complete:function(){this.finish&&(this.stop(),this.callback.call(this.context))}},t}(),Polymer.Base._addFeature({$$:function(t){return Polymer.dom(this.root).querySelector(t)},toggleClass:function(t,e,n){n=n||this,1==arguments.length&&(e=!n.classList.contains(t)),e?Polymer.dom(n).classList.add(t):Polymer.dom(n).classList.remove(t)},toggleAttribute:function(t,e,n){n=n||this,1==arguments.length&&(e=!n.hasAttribute(t)),e?Polymer.dom(n).setAttribute(t,""):Polymer.dom(n).removeAttribute(t)},classFollows:function(t,e,n){n&&Polymer.dom(n).classList.remove(t),e&&Polymer.dom(e).classList.add(t)},attributeFollows:function(t,e,n){n&&Polymer.dom(n).removeAttribute(t),e&&Polymer.dom(e).setAttribute(t,"")},getEffectiveChildNodes:function(){return Polymer.dom(this).getEffectiveChildNodes()},getEffectiveChildren:function(){var t=Polymer.dom(this).getEffectiveChildNodes();return t.filter(function(t){return t.nodeType===Node.ELEMENT_NODE})},getEffectiveTextContent:function(){for(var t,e=this.getEffectiveChildNodes(),n=[],r=0;t=e[r];r++)t.nodeType!==Node.COMMENT_NODE&&n.push(Polymer.dom(t).textContent);return n.join("")},queryEffectiveChildren:function(t){var e=Polymer.dom(this).queryDistributedElements(t);return e&&e[0]},queryAllEffectiveChildren:function(t){return Polymer.dom(this).queryDistributedElements(t)},getContentChildNodes:function(t){var e=Polymer.dom(this.root).querySelector(t||"content");return e?Polymer.dom(e).getDistributedNodes():[]},getContentChildren:function(t){return this.getContentChildNodes(t).filter(function(t){return t.nodeType===Node.ELEMENT_NODE})},fire:function(t,e,n){n=n||Polymer.nob;var r=n.node||this,e=null===e||void 0===e?{}:e,s=void 0===n.bubbles?!0:n.bubbles,i=Boolean(n.cancelable),o=n._useCache,a=this._getEvent(t,s,i,o);return a.detail=e,o&&(this.__eventCache[t]=null),r.dispatchEvent(a),o&&(this.__eventCache[t]=a),a},__eventCache:{},_getEvent:function(t,e,n,r){var s=r&&this.__eventCache[t];return s&&s.bubbles==e&&s.cancelable==n||(s=new Event(t,{bubbles:Boolean(e),cancelable:n})),s},async:function(t,e){var n=this;return Polymer.Async.run(function(){t.call(n)},e)},cancelAsync:function(t){Polymer.Async.cancel(t)},arrayDelete:function(t,e){var n;if(Array.isArray(t)){if(n=t.indexOf(e),n>=0)return t.splice(n,1)}else{var r=this._get(t);if(n=r.indexOf(e),n>=0)return this.splice(t,n,1)}},transform:function(t,e){e=e||this,e.style.webkitTransform=t,e.style.transform=t},translate3d:function(t,e,n,r){r=r||this,this.transform("translate3d("+t+","+e+","+n+")",r)},importHref:function(t,e,n){var r=document.createElement("link");r.rel="import",r.href=t;var s=this;return e&&(r.onload=function(t){return e.call(s,t)}),n&&(r.onerror=function(t){return n.call(s,t)}),document.head.appendChild(r),r},create:function(t,e){var n=document.createElement(t);if(e)for(var r in e)n[r]=e[r];return n},isLightDescendant:function(t){return this!==t&&this.contains(t)&&Polymer.dom(this).getOwnerRoot()===Polymer.dom(t).getOwnerRoot()},isLocalDescendant:function(t){return this.root===Polymer.dom(t).getOwnerRoot()}}),Polymer.Bind={_dataEventCache:{},prepareModel:function(t){Polymer.Base.mixin(t,this._modelApi)},_modelApi:{_notifyChange:function(t,e,n){n=void 0===n?this[t]:n,e=e||Polymer.CaseMap.camelToDashCase(t)+"-changed",this.fire(e,{value:n},{bubbles:!1,cancelable:!1,_useCache:!0})},_propertySetter:function(t,e,n,r){var s=this.__data__[t];return s===e||s!==s&&e!==e||(this.__data__[t]=e,"object"==typeof e&&this._clearPath(t),this._propertyChanged&&this._propertyChanged(t,e,s),n&&this._effectEffects(t,e,n,s,r)),s},__setProperty:function(t,e,n,r){r=r||this;var s=r._propertyEffects&&r._propertyEffects[t];s?r._propertySetter(t,e,s,n):r[t]=e},_effectEffects:function(t,e,n,r,s){for(var i,o=0,a=n.length;a>o&&(i=n[o]);o++)i.fn.call(this,t,e,i.effect,r,s)},_clearPath:function(t){for(var e in this.__data__)0===e.indexOf(t+".")&&(this.__data__[e]=void 0)}},ensurePropertyEffects:function(t,e){t._propertyEffects||(t._propertyEffects={});var n=t._propertyEffects[e];return n||(n=t._propertyEffects[e]=[]),n},addPropertyEffect:function(t,e,n,r){var s=this.ensurePropertyEffects(t,e),i={kind:n,effect:r,fn:Polymer.Bind["_"+n+"Effect"]};return s.push(i),i},createBindings:function(t){var e=t._propertyEffects;if(e)for(var n in e){var r=e[n];r.sort(this._sortPropertyEffects),this._createAccessors(t,n,r)}},_sortPropertyEffects:function(){var t={compute:0,annotation:1,computedAnnotation:2,reflect:3,notify:4,observer:5,complexObserver:6,"function":7};return function(e,n){return t[e.kind]-t[n.kind]}}(),_createAccessors:function(t,e,n){var r={get:function(){return this.__data__[e]}},s=function(t){this._propertySetter(e,t,n)},i=t.getPropertyInfo&&t.getPropertyInfo(e);i&&i.readOnly?i.computed||(t["_set"+this.upper(e)]=s):r.set=s,Object.defineProperty(t,e,r)},upper:function(t){return t[0].toUpperCase()+t.substring(1)},_addAnnotatedListener:function(t,e,n,r,s){t._bindListeners||(t._bindListeners=[]);var i=this._notedListenerFactory(n,r,this._isStructured(r)),o=s||Polymer.CaseMap.camelToDashCase(n)+"-changed";t._bindListeners.push({index:e,property:n,path:r,changedFn:i,event:o})},_isStructured:function(t){return t.indexOf(".")>0},_isEventBogus:function(t,e){return t.path&&t.path[0]!==e},_notedListenerFactory:function(t,e,n){return function(r,s,i){i?this._notifyPath(this._fixPath(e,t,i),s):(s=r[t],n?this.__data__[e]!=s&&this.set(e,s):this[e]=s)}},prepareInstance:function(t){t.__data__=Object.create(null)},setupBindListeners:function(t){for(var e,n=t._bindListeners,r=0,s=n.length;s>r&&(e=n[r]);r++){var i=t._nodes[e.index];this._addNotifyListener(i,t,e.event,e.changedFn)}},_addNotifyListener:function(t,e,n,r){t.addEventListener(n,function(t){return e._notifyListener(r,t)})}},Polymer.Base.extend(Polymer.Bind,{_shouldAddListener:function(t){return t.name&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode&&!t.parts[0].negate},_annotationEffect:function(t,e,n){t!=n.value&&(e=this._get(n.value),this.__data__[n.value]=e);var r=n.negate?!e:e;return n.customEvent&&this._nodes[n.index][n.name]===r?void 0:this._applyEffectValue(n,r)},_reflectEffect:function(t,e,n){this.reflectPropertyToAttribute(t,n.attribute,e)},_notifyEffect:function(t,e,n,r,s){s||this._notifyChange(t,n.event,e)},_functionEffect:function(t,e,n,r,s){n.call(this,t,e,r,s)},_observerEffect:function(t,e,n,r){var s=this[n.method];s?s.call(this,e,r):this._warn(this._logf("_observerEffect","observer method `"+n.method+"` not defined"))},_complexObserverEffect:function(t,e,n){var r=this[n.method];if(r){var s=Polymer.Bind._marshalArgs(this.__data__,n,t,e);s&&r.apply(this,s)}else this._warn(this._logf("_complexObserverEffect","observer method `"+n.method+"` not defined"))},_computeEffect:function(t,e,n){var r=Polymer.Bind._marshalArgs(this.__data__,n,t,e);if(r){var s=this[n.method];s?this.__setProperty(n.name,s.apply(this,r)):this._warn(this._logf("_computeEffect","compute method `"+n.method+"` not defined"))}},_annotatedComputationEffect:function(t,e,n){var r=this._rootDataHost||this,s=r[n.method];if(s){var i=Polymer.Bind._marshalArgs(this.__data__,n,t,e);if(i){var o=s.apply(r,i);n.negate&&(o=!o),this._applyEffectValue(n,o)}}else r._warn(r._logf("_annotatedComputationEffect","compute method `"+n.method+"` not defined"))},_marshalArgs:function(t,e,n,r){for(var s=[],i=e.args,o=0,a=i.length;a>o;o++){var l,h=i[o],c=h.name;if(l=h.literal?h.value:h.structured?Polymer.Base._get(c,t):t[c],i.length>1&&void 0===l)return;if(h.wildcard){var u=0===c.indexOf(n+"."),f=0===e.trigger.name.indexOf(c)&&!u;s[o]={path:f?n:c,value:f?r:l,base:l}}else s[o]=l}return s}}),Polymer.Base._addFeature({_addPropertyEffect:function(t,e,n){var r=Polymer.Bind.addPropertyEffect(this,t,e,n);r.pathFn=this["_"+r.kind+"PathEffect"]},_prepEffects:function(){Polymer.Bind.prepareModel(this),this._addAnnotationEffects(this._notes)},_prepBindings:function(){Polymer.Bind.createBindings(this)},_addPropertyEffects:function(t){if(t)for(var e in t){var n=t[e];n.observer&&this._addObserverEffect(e,n.observer),n.computed&&(n.readOnly=!0,this._addComputedEffect(e,n.computed)),n.notify&&this._addPropertyEffect(e,"notify",{event:Polymer.CaseMap.camelToDashCase(e)+"-changed"}),n.reflectToAttribute&&this._addPropertyEffect(e,"reflect",{attribute:Polymer.CaseMap.camelToDashCase(e)}),n.readOnly&&Polymer.Bind.ensurePropertyEffects(this,e)}},_addComputedEffect:function(t,e){for(var n,r=this._parseMethod(e),s=0;s<r.args.length&&(n=r.args[s]);s++)this._addPropertyEffect(n.model,"compute",{method:r.method,args:r.args,trigger:n,name:t})},_addObserverEffect:function(t,e){this._addPropertyEffect(t,"observer",{method:e,property:t})},_addComplexObserverEffects:function(t){if(t)for(var e,n=0;n<t.length&&(e=t[n]);n++)this._addComplexObserverEffect(e)},_addComplexObserverEffect:function(t){for(var e,n=this._parseMethod(t),r=0;r<n.args.length&&(e=n.args[r]);r++)this._addPropertyEffect(e.model,"complexObserver",{method:n.method,args:n.args,trigger:e})},_addAnnotationEffects:function(t){for(var e,n=0;n<t.length&&(e=t[n]);n++)for(var r,s=e.bindings,i=0;i<s.length&&(r=s[i]);i++)this._addAnnotationEffect(r,n)},_addAnnotationEffect:function(t,e){Polymer.Bind._shouldAddListener(t)&&Polymer.Bind._addAnnotatedListener(this,e,t.name,t.parts[0].value,t.parts[0].event);for(var n=0;n<t.parts.length;n++){var r=t.parts[n];r.signature?this._addAnnotatedComputationEffect(t,r,e):r.literal||this._addPropertyEffect(r.model,"annotation",{kind:t.kind,index:e,name:t.name,value:r.value,isCompound:t.isCompound,compoundIndex:r.compoundIndex,event:r.event,customEvent:r.customEvent,negate:r.negate})}},_addAnnotatedComputationEffect:function(t,e,n){var r=e.signature;if(r["static"])this.__addAnnotatedComputationEffect("__static__",n,t,e,null);else for(var s,i=0;i<r.args.length&&(s=r.args[i]);i++)s.literal||this.__addAnnotatedComputationEffect(s.model,n,t,e,s)},__addAnnotatedComputationEffect:function(t,e,n,r,s){this._addPropertyEffect(t,"annotatedComputation",{index:e,isCompound:n.isCompound,compoundIndex:r.compoundIndex,kind:n.kind,name:n.name,negate:r.negate,method:r.signature.method,args:r.signature.args,trigger:s})},_parseMethod:function(t){var e=t.match(/([^\s]+)\((.*)\)/);if(e){var n={method:e[1],"static":!0};if(e[2].trim()){var r=e[2].replace(/\\,/g,",").split(",");return this._parseArgs(r,n)}return n.args=Polymer.nar,n}},_parseArgs:function(t,e){return e.args=t.map(function(t){var n=this._parseArg(t);return n.literal||(e["static"]=!1),n},this),e},_parseArg:function(t){var e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),n={name:e,model:this._modelForPath(e)},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&"9">=r&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.structured=e.indexOf(".")>0,n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n},_marshalInstanceEffects:function(){Polymer.Bind.prepareInstance(this),this._bindListeners&&Polymer.Bind.setupBindListeners(this)},_applyEffectValue:function(t,e){var n=this._nodes[t.index],r=t.name;if(t.isCompound){var s=n.__compoundStorage__[r];s[t.compoundIndex]=e,e=s.join("")}if("attribute"==t.kind)this.serializeValueToAttribute(e,r,n);else{"className"===r&&(e=this._scopeElementClass(n,e)),("textContent"===r||"input"==n.localName&&"value"==r)&&(e=void 0==e?"":e);var i;n._propertyInfo&&(i=n._propertyInfo[r])&&i.readOnly||this.__setProperty(r,e,!0,n)}},_executeStaticEffects:function(){this._propertyEffects&&this._propertyEffects.__static__&&this._effectEffects("__static__",null,this._propertyEffects.__static__)}}),Polymer.Base._addFeature({_setupConfigure:function(t){if(this._config={},this._handlers=[],t)for(var e in t)void 0!==t[e]&&(this._config[e]=t[e])},_marshalAttributes:function(){this._takeAttributesToModel(this._config)},_attributeChangedImpl:function(t){var e=this._clientsReadied?this:this._config;this._setAttributeToProperty(e,t)},_configValue:function(t,e){var n=this._propertyInfo[t];n&&n.readOnly||(this._config[t]=e)},_beforeClientsReady:function(){this._configure()},_configure:function(){this._configureAnnotationReferences(),this._aboveConfig=this.mixin({},this._config);for(var t={},e=0;e<this.behaviors.length;e++)this._configureProperties(this.behaviors[e].properties,t);this._configureProperties(this.properties,t),this.mixin(t,this._aboveConfig),this._config=t,this._clients&&this._clients.length&&this._distributeConfig(this._config)},_configureProperties:function(t,e){for(var n in t){var r=t[n];if(void 0!==r.value){var s=r.value;"function"==typeof s&&(s=s.call(this,this._config)),e[n]=s}}},_distributeConfig:function(t){var e=this._propertyEffects;if(e)for(var n in t){var r=e[n];if(r)for(var s,i=0,o=r.length;o>i&&(s=r[i]);i++)if("annotation"===s.kind&&!s.isCompound){var a=this._nodes[s.effect.index];if(a._configValue){var l=n===s.effect.value?t[n]:this._get(s.effect.value,t);a._configValue(s.effect.name,l)}}}},_afterClientsReady:function(){this._executeStaticEffects(),this._applyConfig(this._config,this._aboveConfig),this._flushHandlers()},_applyConfig:function(t,e){for(var n in t)void 0===this[n]&&this.__setProperty(n,t[n],n in e)},_notifyListener:function(t,e){if(!Polymer.Bind._isEventBogus(e,e.target)){var n,r;if(e.detail&&(n=e.detail.value,r=e.detail.path),this._clientsReadied)return t.call(this,e.target,n,r);this._queueHandler([t,e.target,n,r])}},_queueHandler:function(t){this._handlers.push(t)},_flushHandlers:function(){for(var t,e=this._handlers,n=0,r=e.length;r>n&&(t=e[n]);n++)t[0].call(this,t[1],t[2],t[3]);this._handlers=[]}}),function(){"use strict";Polymer.Base._addFeature({notifyPath:function(t,e,n){var r={};this._get(t,this,r),this._notifyPath(r.path,e,n)},_notifyPath:function(t,e,n){var r=this._propertySetter(t,e);return r===e||r!==r&&e!==e?void 0:(this._pathEffector(t,e),n||this._notifyPathUp(t,e),!0)},_getPathParts:function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)for(var r=t[n].toString().split("."),s=0;s<r.length;s++)e.push(r[s]);return e}return t.toString().split(".")},set:function(t,e,n){var r,s=n||this,i=this._getPathParts(t),o=i[i.length-1];if(i.length>1){for(var a=0;a<i.length-1;a++){var l=i[a];if(r&&"#"==l[0]?s=Polymer.Collection.get(r).getItem(l):(s=s[l],r&&parseInt(l,10)==l&&(i[a]=Polymer.Collection.get(r).getKey(s))),!s)return;r=Array.isArray(s)?s:null}if(r){var h=Polymer.Collection.get(r);if("#"==o[0]){var c=o,u=h.getItem(c);o=r.indexOf(u),h.setItem(c,e)}else if(parseInt(o,10)==o){var u=s[o],c=h.getKey(u);i[a]=c,h.setItem(c,e)}}s[o]=e,n||this._notifyPath(i.join("."),e)}else s[t]=e},get:function(t,e){return this._get(t,e)},_get:function(t,e,n){for(var r,s=e||this,i=this._getPathParts(t),o=0;o<i.length;o++){if(!s)return;
|
||
var a=i[o];r&&"#"==a[0]?s=Polymer.Collection.get(r).getItem(a):(s=s[a],n&&r&&parseInt(a,10)==a&&(i[o]=Polymer.Collection.get(r).getKey(s))),r=Array.isArray(s)?s:null}return n&&(n.path=i.join(".")),s},_pathEffector:function(t,e){var n=this._modelForPath(t),r=this._propertyEffects&&this._propertyEffects[n];if(r)for(var s,i=0;i<r.length&&(s=r[i]);i++){var o=s.pathFn;o&&o.call(this,t,e,s.effect)}this._boundPaths&&this._notifyBoundPaths(t,e)},_annotationPathEffect:function(t,e,n){if(n.value===t||0===n.value.indexOf(t+"."))Polymer.Bind._annotationEffect.call(this,t,e,n);else if(0===t.indexOf(n.value+".")&&!n.negate){var r=this._nodes[n.index];if(r&&r._notifyPath){var s=this._fixPath(n.name,n.value,t);r._notifyPath(s,e,!0)}}},_complexObserverPathEffect:function(t,e,n){this._pathMatchesEffect(t,n)&&Polymer.Bind._complexObserverEffect.call(this,t,e,n)},_computePathEffect:function(t,e,n){this._pathMatchesEffect(t,n)&&Polymer.Bind._computeEffect.call(this,t,e,n)},_annotatedComputationPathEffect:function(t,e,n){this._pathMatchesEffect(t,n)&&Polymer.Bind._annotatedComputationEffect.call(this,t,e,n)},_pathMatchesEffect:function(t,e){var n=e.trigger.name;return n==t||0===n.indexOf(t+".")||e.trigger.wildcard&&0===t.indexOf(n)},linkPaths:function(t,e){this._boundPaths=this._boundPaths||{},e?this._boundPaths[t]=e:this.unlinkPaths(t)},unlinkPaths:function(t){this._boundPaths&&delete this._boundPaths[t]},_notifyBoundPaths:function(t,e){for(var n in this._boundPaths){var r=this._boundPaths[n];0==t.indexOf(n+".")?this._notifyPath(this._fixPath(r,n,t),e):0==t.indexOf(r+".")&&this._notifyPath(this._fixPath(n,r,t),e)}},_fixPath:function(t,e,n){return t+n.slice(e.length)},_notifyPathUp:function(t,e){var n=this._modelForPath(t),r=Polymer.CaseMap.camelToDashCase(n),s=r+this._EVENT_CHANGED;this.fire(s,{path:t,value:e},{bubbles:!1,_useCache:!0})},_modelForPath:function(t){var e=t.indexOf(".");return 0>e?t:t.slice(0,e)},_EVENT_CHANGED:"-changed",notifySplices:function(t,e){var n={},r=this._get(t,this,n);this._notifySplices(r,n.path,e)},_notifySplices:function(t,e,n){var r={keySplices:Polymer.Collection.applySplices(t,n),indexSplices:n};t.hasOwnProperty("splices")||Object.defineProperty(t,"splices",{configurable:!0,writable:!0}),t.splices=r,this._notifyPath(e+".splices",r),this._notifyPath(e+".length",t.length),r.keySplices=null,r.indexSplices=null},_notifySplice:function(t,e,n,r,s){this._notifySplices(t,e,[{index:n,addedCount:r,removed:s,object:t,type:"splice"}])},push:function(t){var e={},n=this._get(t,this,e),r=Array.prototype.slice.call(arguments,1),s=n.length,i=n.push.apply(n,r);return r.length&&this._notifySplice(n,e.path,s,r.length,[]),i},pop:function(t){var e={},n=this._get(t,this,e),r=Boolean(n.length),s=Array.prototype.slice.call(arguments,1),i=n.pop.apply(n,s);return r&&this._notifySplice(n,e.path,n.length,0,[i]),i},splice:function(t,e,n){var r={},s=this._get(t,this,r);e=0>e?s.length-Math.floor(-e):Math.floor(e),e||(e=0);var i=Array.prototype.slice.call(arguments,1),o=s.splice.apply(s,i),a=Math.max(i.length-2,0);return(a||o.length)&&this._notifySplice(s,r.path,e,a,o),o},shift:function(t){var e={},n=this._get(t,this,e),r=Boolean(n.length),s=Array.prototype.slice.call(arguments,1),i=n.shift.apply(n,s);return r&&this._notifySplice(n,e.path,0,0,[i]),i},unshift:function(t){var e={},n=this._get(t,this,e),r=Array.prototype.slice.call(arguments,1),s=n.unshift.apply(n,r);return r.length&&this._notifySplice(n,e.path,0,r.length,[]),s},prepareModelNotifyPath:function(t){this.mixin(t,{fire:Polymer.Base.fire,_getEvent:Polymer.Base._getEvent,__eventCache:Polymer.Base.__eventCache,notifyPath:Polymer.Base.notifyPath,_get:Polymer.Base._get,_EVENT_CHANGED:Polymer.Base._EVENT_CHANGED,_notifyPath:Polymer.Base._notifyPath,_notifyPathUp:Polymer.Base._notifyPathUp,_pathEffector:Polymer.Base._pathEffector,_annotationPathEffect:Polymer.Base._annotationPathEffect,_complexObserverPathEffect:Polymer.Base._complexObserverPathEffect,_annotatedComputationPathEffect:Polymer.Base._annotatedComputationPathEffect,_computePathEffect:Polymer.Base._computePathEffect,_modelForPath:Polymer.Base._modelForPath,_pathMatchesEffect:Polymer.Base._pathMatchesEffect,_notifyBoundPaths:Polymer.Base._notifyBoundPaths,_getPathParts:Polymer.Base._getPathParts})}})}(),Polymer.Base._addFeature({resolveUrl:function(t){var e=Polymer.DomModule["import"](this.is),n="";if(e){var r=e.getAttribute("assetpath")||"";n=Polymer.ResolveUrl.resolveUrl(r,e.ownerDocument.baseURI)}return Polymer.ResolveUrl.resolveUrl(t,n)}}),Polymer.CssParse=function(){var t={parse:function(t){return t=this._clean(t),this._parseCss(this._lex(t),t)},_clean:function(t){return t.replace(this._rx.comments,"").replace(this._rx.port,"")},_lex:function(t){for(var e={start:0,end:t.length},n=e,r=0,s=t.length;s>r;r++)switch(t[r]){case this.OPEN_BRACE:n.rules||(n.rules=[]);var i=n,o=i.rules[i.rules.length-1];n={start:r+1,parent:i,previous:o},i.rules.push(n);break;case this.CLOSE_BRACE:n.end=r+1,n=n.parent||e}return e},_parseCss:function(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent){var r=t.previous?t.previous.end:t.parent.start;n=e.substring(r,t.start-1),n=this._expandUnicodeEscapes(n),n=n.replace(this._rx.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);var s=t.parsedSelector=t.selector=n.trim();t.atRule=0===s.indexOf(this.AT_START),t.atRule?0===s.indexOf(this.MEDIA_START)?t.type=this.types.MEDIA_RULE:s.match(this._rx.keyframesRule)&&(t.type=this.types.KEYFRAMES_RULE):0===s.indexOf(this.VAR_START)?t.type=this.types.MIXIN_RULE:t.type=this.types.STYLE_RULE}var i=t.rules;if(i)for(var o,a=0,l=i.length;l>a&&(o=i[a]);a++)this._parseCss(o,e);return t},_expandUnicodeEscapes:function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var t=arguments[1],e=6-t.length;e--;)t="0"+t;return"\\"+t})},stringify:function(t,e,n){n=n||"";var r="";if(t.cssText||t.rules){var s=t.rules;if(!s||!e&&this._hasMixinRules(s))r=e?t.cssText:this.removeCustomProps(t.cssText),r=r.trim(),r&&(r=" "+r+"\n");else for(var i,o=0,a=s.length;a>o&&(i=s[o]);o++)r=this.stringify(i,e,r)}return r&&(t.selector&&(n+=t.selector+" "+this.OPEN_BRACE+"\n"),n+=r,t.selector&&(n+=this.CLOSE_BRACE+"\n\n")),n},_hasMixinRules:function(t){return 0===t[0].selector.indexOf(this.VAR_START)},removeCustomProps:function(t){return t=this.removeCustomPropAssignment(t),this.removeCustomPropApply(t)},removeCustomPropAssignment:function(t){return t.replace(this._rx.customProp,"").replace(this._rx.mixinProp,"")},removeCustomPropApply:function(t){return t.replace(this._rx.mixinApply,"").replace(this._rx.varApply,"")},types:{STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE:"{",CLOSE_BRACE:"}",_rx:{comments:/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^|[\s;])?--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START:"--",MEDIA_START:"@media",AT_START:"@"};return t}(),Polymer.StyleUtil=function(){return{MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(t,e,n){return"string"==typeof t&&(t=this.parser.parse(t)),e&&this.forEachStyleRule(t,e),this.parser.stringify(t,n)},forRulesInStyles:function(t,e){if(t)for(var n,r=0,s=t.length;s>r&&(n=t[r]);r++)this.forEachStyleRule(this.rulesForStyle(n),e)},rulesForStyle:function(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=this.parser.parse(t.textContent)),t.__cssRules},clearStyleRules:function(t){t.__cssRules=null},forEachStyleRule:function(t,e){if(t){var n=(t.parsedSelector,!1);t.type===this.ruleTypes.STYLE_RULE?e(t):(t.type===this.ruleTypes.KEYFRAMES_RULE||t.type===this.ruleTypes.MIXIN_RULE)&&(n=!0);var r=t.rules;if(r&&!n)for(var s,i=0,o=r.length;o>i&&(s=r[i]);i++)this.forEachStyleRule(s,e)}},applyCss:function(t,e,n,r){var s=document.createElement("style");if(e&&s.setAttribute("scope",e),s.textContent=t,n=n||document.head,!r){var i=n.querySelectorAll("style[scope]");r=i[i.length-1]}return n.insertBefore(s,r&&r.nextSibling||n.firstChild),s},cssFromModules:function(t,e){for(var n=t.trim().split(" "),r="",s=0;s<n.length;s++)r+=this.cssFromModule(n[s],e);return r},cssFromModule:function(t,e){var n=Polymer.DomModule["import"](t);return n&&!n._cssText&&(n._cssText=this.cssFromElement(n)),!n&&e&&console.warn("Could not find style data in module named",t),n&&n._cssText||""},cssFromElement:function(t){for(var e,n="",r=t.content||t,s=Polymer.DomApi.arrayCopy(r.querySelectorAll(this.MODULE_STYLES_SELECTOR)),i=0;i<s.length;i++)if(e=s[i],"template"===e.localName)n+=this.cssFromElement(e);else if("style"===e.localName){var o=e.getAttribute(this.INCLUDE_ATTR);o&&(n+=this.cssFromModules(o,!0)),e=e.__appliedElement||e,e.parentNode.removeChild(e),n+=this.resolveCss(e.textContent,t.ownerDocument)}else e["import"]&&e["import"].body&&(n+=this.resolveCss(e["import"].body.textContent,e["import"]));return n},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}(),Polymer.StyleTransformer=function(){var t=Polymer.Settings.useNativeShadow,e=Polymer.StyleUtil,n={dom:function(t,e,n,r){this._transformDom(t,e||"",n,r)},_transformDom:function(t,e,n,r){t.setAttribute&&this.element(t,e,n,r);for(var s=Polymer.dom(t).childNodes,i=0;i<s.length;i++)this._transformDom(s[i],e,n,r)},element:function(t,e,n,s){if(n)s?t.removeAttribute(r):t.setAttribute(r,e);else if(e)if(t.classList)s?(t.classList.remove(r),t.classList.remove(e)):(t.classList.add(r),t.classList.add(e));else if(t.getAttribute){var i=t.getAttribute(v);s?i&&t.setAttribute(v,i.replace(r,"").replace(e,"")):t.setAttribute(v,i+(i?" ":"")+r+" "+e)}},elementStyles:function(n,r){for(var s,i=n._styles,o="",a=0,l=i.length;l>a&&(s=i[a]);a++){var h=e.rulesForStyle(s);o+=t?e.toCssText(h,r):this.css(h,n.is,n["extends"],r,n._scopeCssViaAttr)+"\n\n"}return o.trim()},css:function(t,n,r,s,i){var o=this._calcHostScope(n,r);n=this._calcElementScope(n,i);var a=this;return e.toCssText(t,function(t){t.isScoped||(a.rule(t,n,o),t.isScoped=!0),s&&s(t,n,o)})},_calcElementScope:function(t,e){return t?e?d+t+m:_+t:""},_calcHostScope:function(t,e){return e?"[is="+t+"]":t},rule:function(t,e,n){this._transformRule(t,this._transformComplexSelector,e,n)},_transformRule:function(t,e,n,r){for(var s,o=t.selector.split(i),a=0,l=o.length;l>a&&(s=o[a]);a++)o[a]=e.call(this,s,n,r);t.selector=t.transformedSelector=o.join(i)},_transformComplexSelector:function(t,e,n){var r=!1,s=!1,a=this;return t=t.replace(o,function(t,i,o){if(r)o=o.replace(p," ");else{var l=a._transformCompoundSelector(o,i,e,n);r=r||l.stop,s=s||l.hostContext,i=l.combinator,o=l.value}return i+o}),s&&(t=t.replace(u,function(t,e,r,s){return e+r+" "+n+s+i+" "+e+n+r+s})),t},_transformCompoundSelector:function(t,e,n,r){var s=t.search(p),i=!1;t.indexOf(c)>=0?i=!0:t.indexOf(a)>=0?(t=t.replace(h,function(t,e,n){return r+n}),t=t.replace(a,r)):0!==s&&(t=n?this._transformSimpleSelector(t,n):t),t.indexOf(f)>=0&&(e="");var o;return s>=0&&(t=t.replace(p," "),o=!0),{value:t,combinator:e,stop:o,hostContext:i}},_transformSimpleSelector:function(t,e){var n=t.split(y);return n[0]+=e,n.join(y)},documentRule:function(e){e.selector=e.parsedSelector,this.normalizeRootSelector(e),t||this._transformRule(e,this._transformDocumentSelector)},normalizeRootSelector:function(t){t.selector===l&&(t.selector="body")},_transformDocumentSelector:function(t){return t.match(p)?this._transformComplexSelector(t,s):this._transformSimpleSelector(t.trim(),s)},SCOPE_NAME:"style-scope"},r=n.SCOPE_NAME,s=":not(["+r+"]):not(."+r+")",i=",",o=/(^|[\s>+~]+)([^\s>+~]+)/g,a=":host",l=":root",h=/(\:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g,c=":host-context",u=/(.*)(?:\:host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/,f="::content",p=/\:\:content|\:\:shadow|\/deep\//,_=".",d="["+r+"~=",m="]",y=":",v="class";return n}(),Polymer.StyleExtends=function(){var t=Polymer.StyleUtil;return{hasExtends:function(t){return Boolean(t.match(this.rx.EXTEND))},transform:function(e){var n=t.rulesForStyle(e),r=this;return t.forEachStyleRule(n,function(t){r._mapRule(t);if(t.parent)for(var e;e=r.rx.EXTEND.exec(t.cssText);){var n=e[1],s=r._findExtendor(n,t);s&&r._extendRule(t,s)}t.cssText=t.cssText.replace(r.rx.EXTEND,"")}),t.toCssText(n,function(t){t.selector.match(r.rx.STRIP)&&(t.cssText="")},!0)},_mapRule:function(t){if(t.parent){for(var e,n=t.parent.map||(t.parent.map={}),r=t.selector.split(","),s=0;s<r.length;s++)e=r[s],n[e.trim()]=t;return n}},_findExtendor:function(t,e){return e.parent&&e.parent.map&&e.parent.map[t]||this._findExtendor(t,e.parent)},_extendRule:function(t,e){t.parent!==e.parent&&this._cloneAndAddRuleToParent(e,t.parent),t["extends"]=t["extends"]||[],t["extends"].push(e),e.selector=e.selector.replace(this.rx.STRIP,""),e.selector=(e.selector&&e.selector+",\n")+t.selector,e["extends"]&&e["extends"].forEach(function(e){this._extendRule(t,e)},this)},_cloneAndAddRuleToParent:function(t,e){t=Object.create(t),t.parent=e,t["extends"]&&(t["extends"]=t["extends"].slice()),e.rules.push(t)},rx:{EXTEND:/@extends\(([^)]*)\)\s*?;/gim,STRIP:/%[^,]*$/}}}(),function(){var t=Polymer.Base._prepElement,e=Polymer.Settings.useNativeShadow,n=Polymer.StyleUtil,r=Polymer.StyleTransformer,s=Polymer.StyleExtends;Polymer.Base._addFeature({_prepElement:function(e){this._encapsulateStyle&&r.element(e,this.is,this._scopeCssViaAttr),t.call(this,e)},_prepStyles:function(){if(void 0===this._encapsulateStyle&&(this._encapsulateStyle=!e&&Boolean(this._template)),this._template){this._styles=this._collectStyles();var t=r.elementStyles(this);if(t){var s=n.applyCss(t,this.is,e?this._template.content:null);e||(this._scopeStyle=s)}}else this._styles=[]},_collectStyles:function(){var t=[],e="",r=this.styleModules;if(r)for(var i,o=0,a=r.length;a>o&&(i=r[o]);o++)e+=n.cssFromModule(i);e+=n.cssFromModule(this.is);var l=this._template&&this._template.parentNode;if(!this._template||l&&l.id.toLowerCase()===this.is||(e+=n.cssFromElement(this._template)),e){var h=document.createElement("style");h.textContent=e,s.hasExtends(h.textContent)&&(e=s.transform(h)),t.push(h)}return t},_elementAdd:function(t){this._encapsulateStyle&&(t.__styleScoped?t.__styleScoped=!1:r.dom(t,this.is,this._scopeCssViaAttr))},_elementRemove:function(t){this._encapsulateStyle&&r.dom(t,this.is,this._scopeCssViaAttr,!0)},scopeSubtree:function(t,n){if(!e){var r=this,s=function(t){if(t.nodeType===Node.ELEMENT_NODE){t.className=r._scopeElementClass(t,t.className);for(var e,n=t.querySelectorAll("*"),s=0;s<n.length&&(e=n[s]);s++)e.className=r._scopeElementClass(e,e.className)}};if(s(t),n){var i=new MutationObserver(function(t){for(var e,n=0;n<t.length&&(e=t[n]);n++)if(e.addedNodes)for(var r=0;r<e.addedNodes.length;r++)s(e.addedNodes[r])});return i.observe(t,{childList:!0,subtree:!0}),i}}}})}(),Polymer.StyleProperties=function(){"use strict";function t(t,e){var n=parseInt(t/32),r=1<<t%32;e[n]=(e[n]||0)|r}var e=Polymer.Settings.useNativeShadow,n=Polymer.DomApi.matchesSelector,r=Polymer.StyleUtil,s=Polymer.StyleTransformer;return{decorateStyles:function(t){var e=this,n={};r.forRulesInStyles(t,function(t){e.decorateRule(t),e.collectPropertiesInCssText(t.propertyInfo.cssText,n)});var s=[];for(var i in n)s.push(i);return s},decorateRule:function(t){if(t.propertyInfo)return t.propertyInfo;var e={},n={},r=this.collectProperties(t,n);return r&&(e.properties=n,t.rules=null),e.cssText=this.collectCssText(t),t.propertyInfo=e,e},collectProperties:function(t,e){var n=t.propertyInfo;if(!n){for(var r,s,i=this.rx.VAR_ASSIGN,o=t.parsedCssText;r=i.exec(o);)e[r[1]]=(r[2]||r[3]).trim(),s=!0;return s}return n.properties?(Polymer.Base.mixin(e,n.properties),!0):void 0},collectCssText:function(t){var e="",n=t.parsedCssText;n=n.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"");for(var r,s=n.split(";"),i=0;i<s.length;i++)r=s[i],(r.match(this.rx.MIXIN_MATCH)||r.match(this.rx.VAR_MATCH))&&(e+=r+";\n");return e},collectPropertiesInCssText:function(t,e){for(var n;n=this.rx.VAR_CAPTURE.exec(t);){e[n[1]]=!0;var r=n[2];r&&r.match(this.rx.IS_VAR)&&(e[r]=!0)}},reify:function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)e=n[r],t[e]=this.valueForProperty(t[e],t)},valueForProperty:function(t,e){if(t)if(t.indexOf(";")>=0)t=this.valueForProperties(t,e);else{var n=this,r=function(t,r,s,i){var o=n.valueForProperty(e[s],e)||(e[i]?n.valueForProperty(e[i],e):i);return r+(o||"")};t=t.replace(this.rx.VAR_MATCH,r)}return t&&t.trim()||""},valueForProperties:function(t,e){for(var n,r,s=t.split(";"),i=0;i<s.length;i++)if(n=s[i]){if(r=n.match(this.rx.MIXIN_MATCH))n=this.valueForProperty(e[r[1]],e);else{var o=n.split(":");o[1]&&(o[1]=o[1].trim(),o[1]=this.valueForProperty(o[1],e)||o[1]),n=o.join(":")}s[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return s.filter(function(t){return t}).join(";")},applyProperties:function(t,e){var n="";t.propertyInfo||this.decorateRule(t),t.propertyInfo.cssText&&(n=this.valueForProperties(t.propertyInfo.cssText,e)),t.cssText=n},propertyDataFromStyles:function(e,s){var i={},o=this,a=[],l=0;return r.forRulesInStyles(e,function(e){e.propertyInfo||o.decorateRule(e),s&&e.propertyInfo.properties&&n.call(s,e.transformedSelector||e.parsedSelector)&&(o.collectProperties(e,i),t(l,a)),l++}),{properties:i,key:a}},scopePropertiesFromStyles:function(t){return t._scopeStyleProperties||(t._scopeStyleProperties=this.selectedPropertiesFromStyles(t,this.SCOPE_SELECTORS)),t._scopeStyleProperties},hostPropertiesFromStyles:function(t){return t._hostStyleProperties||(t._hostStyleProperties=this.selectedPropertiesFromStyles(t,this.HOST_SELECTORS)),t._hostStyleProperties},selectedPropertiesFromStyles:function(t,e){var n={},s=this;return r.forRulesInStyles(t,function(t){t.propertyInfo||s.decorateRule(t);for(var r=0;r<e.length;r++)if(t.parsedSelector===e[r])return void s.collectProperties(t,n)}),n},transformStyles:function(t,n,r){var i=this,o=s._calcHostScope(t.is,t["extends"]),a=t["extends"]?"\\"+o.slice(0,-1)+"\\]":o,l=new RegExp(this.rx.HOST_PREFIX+a+this.rx.HOST_SUFFIX);return s.elementStyles(t,function(s){i.applyProperties(s,n),s.cssText&&!e&&i._scopeSelector(s,l,o,t._scopeCssViaAttr,r)})},_scopeSelector:function(t,e,n,r,i){t.transformedSelector=t.transformedSelector||t.selector;for(var o,a=t.transformedSelector,l=r?"["+s.SCOPE_NAME+"~="+i+"]":"."+i,h=a.split(","),c=0,u=h.length;u>c&&(o=h[c]);c++)h[c]=o.match(e)?o.replace(n,n+l):l+" "+o;t.selector=h.join(",")},applyElementScopeSelector:function(t,e,n,r){var i=r?t.getAttribute(s.SCOPE_NAME):t.className,o=n?i.replace(n,e):(i?i+" ":"")+this.XSCOPE_NAME+" "+e;i!==o&&(r?t.setAttribute(s.SCOPE_NAME,o):t.className=o)},applyElementStyle:function(t,n,s,i){var o=i?i.textContent||"":this.transformStyles(t,n,s),a=t._customStyle;return a&&!e&&a!==i&&(a._useCount--,a._useCount<=0&&a.parentNode&&a.parentNode.removeChild(a)),!e&&i&&i.parentNode||(e&&t._customStyle?(t._customStyle.textContent=o,i=t._customStyle):o&&(i=r.applyCss(o,s,e?t.root:null,t._scopeStyle))),i&&(i._useCount=i._useCount||0,t._customStyle!=i&&i._useCount++,t._customStyle=i),i},mixinCustomStyle:function(t,e){var n;for(var r in e)n=e[r],(n||0===n)&&(t[r]=n)},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply[\s]*\(([^)]*)\)/i,VAR_MATCH:/(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,)]*)|(?:[^;]*\([^;)]*\)))[\s]*?\)/gi,VAR_CAPTURE:/\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},HOST_SELECTORS:[":host"],SCOPE_SELECTORS:[":root"],XSCOPE_NAME:"x-scope"}}(),function(){Polymer.StyleCache=function(){this.cache={}},Polymer.StyleCache.prototype={MAX:100,store:function(t,e,n,r){e.keyValues=n,e.styles=r;var s=this.cache[t]=this.cache[t]||[];s.push(e),s.length>this.MAX&&s.shift()},retrieve:function(t,e,n){var r=this.cache[t];if(r)for(var s,i=r.length-1;i>=0;i--)if(s=r[i],n===s.styles&&this._objectsEqual(e,s.keyValues))return s},clear:function(){this.cache={}},_objectsEqual:function(t,e){var n,r;for(var s in t)if(n=t[s],r=e[s],!("object"==typeof n&&n?this._objectsStrictlyEqual(n,r):n===r))return!1;return Array.isArray(t)?t.length===e.length:!0},_objectsStrictlyEqual:function(t,e){return this._objectsEqual(t,e)&&this._objectsEqual(e,t)}}}(),Polymer.StyleDefaults=function(){var t=Polymer.StyleProperties,e=(Polymer.StyleUtil,Polymer.StyleCache),n={_styles:[],_properties:null,customStyle:{},_styleCache:new e,addStyle:function(t){this._styles.push(t),this._properties=null},get _styleProperties(){return this._properties||(t.decorateStyles(this._styles),this._styles._scopeStyleProperties=null,this._properties=t.scopePropertiesFromStyles(this._styles),t.mixinCustomStyle(this._properties,this.customStyle),t.reify(this._properties)),this._properties},_needsStyleProperties:function(){},_computeStyleProperties:function(){return this._styleProperties},updateStyles:function(t){this._properties=null,t&&Polymer.Base.mixin(this.customStyle,t),this._styleCache.clear();for(var e,n=0;n<this._styles.length;n++)e=this._styles[n],e=e.__importElement||e,e._apply()}};return n}(),function(){"use strict";var t=Polymer.Base.serializeValueToAttribute,e=Polymer.StyleProperties,n=Polymer.StyleTransformer,r=(Polymer.StyleUtil,Polymer.StyleDefaults),s=Polymer.Settings.useNativeShadow;Polymer.Base._addFeature({_prepStyleProperties:function(){this._ownStylePropertyNames=this._styles?e.decorateStyles(this._styles):null},customStyle:null,getComputedStyleValue:function(t){return this._styleProperties&&this._styleProperties[t]||getComputedStyle(this).getPropertyValue(t)},_setupStyleProperties:function(){this.customStyle={}},_needsStyleProperties:function(){return Boolean(this._ownStylePropertyNames&&this._ownStylePropertyNames.length)},_beforeAttached:function(){!this._scopeSelector&&this._needsStyleProperties()&&this._updateStyleProperties()},_findStyleHost:function(){for(var t,e=this;t=Polymer.dom(e).getOwnerRoot();){if(Polymer.isInstance(t.host))return t.host;e=t.host}return r},_updateStyleProperties:function(){var t,n=this._findStyleHost();n._styleCache||(n._styleCache=new Polymer.StyleCache);var r=e.propertyDataFromStyles(n._styles,this);r.key.customStyle=this.customStyle,t=n._styleCache.retrieve(this.is,r.key,this._styles);var o=Boolean(t);o?this._styleProperties=t._styleProperties:this._computeStyleProperties(r.properties),this._computeOwnStyleProperties(),o||(t=i.retrieve(this.is,this._ownStyleProperties,this._styles));var a=Boolean(t)&&!o,l=this._applyStyleProperties(t);o||(l=l&&s?l.cloneNode(!0):l,t={style:l,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties},r.key.customStyle={},this.mixin(r.key.customStyle,this.customStyle),n._styleCache.store(this.is,t,r.key,this._styles),a||i.store(this.is,Object.create(t),this._ownStyleProperties,this._styles))},_computeStyleProperties:function(t){var n=this._findStyleHost();n._styleProperties||n._computeStyleProperties();var r=Object.create(n._styleProperties);this.mixin(r,e.hostPropertiesFromStyles(this._styles)),t=t||e.propertyDataFromStyles(n._styles,this).properties,this.mixin(r,t),this.mixin(r,e.scopePropertiesFromStyles(this._styles)),e.mixinCustomStyle(r,this.customStyle),e.reify(r),this._styleProperties=r},_computeOwnStyleProperties:function(){for(var t,e={},n=0;n<this._ownStylePropertyNames.length;n++)t=this._ownStylePropertyNames[n],e[t]=this._styleProperties[t];this._ownStyleProperties=e},_scopeCount:0,_applyStyleProperties:function(t){var n=this._scopeSelector;this._scopeSelector=t?t._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var r=e.applyElementStyle(this,this._styleProperties,this._scopeSelector,t&&t.style);return s||e.applyElementScopeSelector(this,this._scopeSelector,n,this._scopeCssViaAttr),r},serializeValueToAttribute:function(e,n,r){if(r=r||this,"class"===n&&!s){var i=r===this?this.domHost||this.dataHost:this;i&&(e=i._scopeElementClass(r,e))}r=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(r):r,t.call(this,e,n,r)},_scopeElementClass:function(t,e){return s||this._scopeCssViaAttr||(e+=(e?" ":"")+o+" "+this.is+(t._scopeSelector?" "+a+" "+t._scopeSelector:"")),e},updateStyles:function(t){this.isAttached&&(t&&this.mixin(this.customStyle,t),this._needsStyleProperties()?this._updateStyleProperties():this._styleProperties=null,this._styleCache&&this._styleCache.clear(),this._updateRootStyles())},_updateRootStyles:function(t){t=t||this.root;for(var e,n=Polymer.dom(t)._query(function(t){return t.shadyRoot||t.shadowRoot}),r=0,s=n.length;s>r&&(e=n[r]);r++)e.updateStyles&&e.updateStyles()}}),Polymer.updateStyles=function(t){r.updateStyles(t),Polymer.Base._updateRootStyles(document)};var i=new Polymer.StyleCache;Polymer.customStyleCache=i;var o=n.SCOPE_NAME,a=e.XSCOPE_NAME}(),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepConstructor(),this._prepTemplate(),this._prepStyles(),this._prepStyleProperties(),this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepPropertyInfo(),this._prepBindings(),this._prepShady()},_prepBehavior:function(t){this._addPropertyEffects(t.properties),this._addComplexObserverEffects(t.observers),this._addHostAttributes(t.hostAttributes)},_initFeatures:function(){this._setupConfigure(),this._setupStyleProperties(),this._setupDebouncers(),this._registerHost(),this._template&&(this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting(),this._marshalAnnotationReferences()),this._marshalInstanceEffects(),this._marshalBehaviors(),this._marshalHostAttributes(),this._marshalAttributes(),this._tryReady()},_marshalBehavior:function(t){t.listeners&&this._listenListeners(t.listeners)}}),function(){var t=(Polymer.Settings.useNativeShadow,Polymer.StyleProperties),e=Polymer.StyleUtil,n=Polymer.CssParse,r=Polymer.StyleDefaults,s=Polymer.StyleTransformer;Polymer({is:"custom-style","extends":"style",_template:null,properties:{include:String},ready:function(){this._tryApply()},attached:function(){this._tryApply()},_tryApply:function(){if(!this._appliesToDocument&&this.parentNode&&"dom-module"!==this.parentNode.localName){this._appliesToDocument=!0;var t=this.__appliedElement||this;if(r.addStyle(t),t.textContent||this.include)this._apply(!0);else{var e=this,n=new MutationObserver(function(){n.disconnect(),e._apply(!0)});n.observe(t,{childList:!0})}}},_apply:function(t){function n(){i._applyCustomProperties(r)}var r=this.__appliedElement||this;if(this.include&&(r.textContent=e.cssFromModules(this.include,!0)+r.textContent),r.textContent){e.forEachStyleRule(e.rulesForStyle(r),function(t){s.documentRule(t)});var i=this;this._pendingApplyProperties&&(cancelAnimationFrame(this._pendingApplyProperties),this._pendingApplyProperties=null),t?this._pendingApplyProperties=requestAnimationFrame(n):n()}},_applyCustomProperties:function(r){this._computeStyleProperties();var s=this._styleProperties,i=e.rulesForStyle(r);r.textContent=e.toCssText(i,function(e){var r=e.cssText=e.parsedCssText;e.propertyInfo&&e.propertyInfo.cssText&&(r=n.removeCustomPropAssignment(r),e.cssText=t.valueForProperties(r,s))})}})}(),Polymer.Templatizer={properties:{__hideTemplateChildren__:{observer:"_showHideChildren"}},_instanceProps:Polymer.nob,_parentPropPrefix:"_parent_",templatize:function(t){if(this._templatized=t,t._content||(t._content=t.content),t._content._ctor)return this.ctor=t._content._ctor,void this._prepParentProperties(this.ctor.prototype,t);var e=Object.create(Polymer.Base);this._customPrepAnnotations(e,t),this._prepParentProperties(e,t),e._prepEffects(),this._customPrepEffects(e),e._prepBehaviors(),e._prepPropertyInfo(),e._prepBindings(),e._notifyPathUp=this._notifyPathUpImpl,e._scopeElementClass=this._scopeElementClassImpl,e.listen=this._listenImpl,e._showHideChildren=this._showHideChildrenImpl;var n=this._constructorImpl,r=function(t,e){n.call(this,t,e)};r.prototype=e,e.constructor=r,t._content._ctor=r,this.ctor=r},_getRootDataHost:function(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideChildrenImpl:function(t){for(var e=this._children,n=0;n<e.length;n++){var r=e[n];Boolean(t)!=Boolean(r.__hideTemplateChildren__)&&(r.nodeType===Node.TEXT_NODE?t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__:r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__)),r.__hideTemplateChildren__=t}},_debounceTemplate:function(t){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",t))},_flushTemplates:function(t){Polymer.dom.flush()},_customPrepEffects:function(t){var e=t._parentProps;for(var n in e)t._addPropertyEffect(n,"function",this._createHostPropEffector(n));for(var n in this._instanceProps)t._addPropertyEffect(n,"function",this._createInstancePropEffector(n))},_customPrepAnnotations:function(t,e){t._template=e;var n=e._content;if(!n._notes){var r=t._rootDataHost;r&&(Polymer.Annotations.prepElement=function(){r._prepElement()}),n._notes=Polymer.Annotations.parseAnnotations(e),Polymer.Annotations.prepElement=null,this._processAnnotations(n._notes)}t._notes=n._notes,t._parentProps=n._parentProps},_prepParentProperties:function(t,e){var n=this._parentProps=t._parentProps;if(this._forwardParentProp&&n){var r,s=t._parentPropProto;if(!s){for(r in this._instanceProps)delete n[r];s=t._parentPropProto=Object.create(null),e!=this&&(Polymer.Bind.prepareModel(s),Polymer.Base.prepareModelNotifyPath(s));for(r in n){var i=this._parentPropPrefix+r,o=[{kind:"function",effect:this._createForwardPropEffector(r),fn:Polymer.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{event:Polymer.CaseMap.camelToDashCase(i)+"-changed"}}];Polymer.Bind._createAccessors(s,i,o)}}var a=this;e!=this&&(Polymer.Bind.prepareInstance(e),e._forwardParentProp=function(t,e){a._forwardParentProp(t,e)}),this._extendTemplate(e,s),e._pathEffector=function(t,e,n){return a._pathEffectorImpl(t,e,n)}}},_createForwardPropEffector:function(t){return function(e,n){this._forwardParentProp(t,n)}},_createHostPropEffector:function(t){var e=this._parentPropPrefix;return function(n,r){this.dataHost._templatized[e+t]=r}},_createInstancePropEffector:function(t){return function(e,n,r,s){s||this.dataHost._forwardInstanceProp(this,t,n)}},_extendTemplate:function(t,e){for(var n,r=Object.getOwnPropertyNames(e),s=0;s<r.length&&(n=r[s]);s++){var i=t[n],o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o),void 0!==i&&t._propertySetter(n,i)}},_showHideChildren:function(t){},_forwardInstancePath:function(t,e,n){},_forwardInstanceProp:function(t,e,n){},_notifyPathUpImpl:function(t,e){var n=this.dataHost,r=t.indexOf("."),s=0>r?t:t.slice(0,r);n._forwardInstancePath.call(n,this,t,e),s in n._parentProps&&n._templatized.notifyPath(n._parentPropPrefix+t,e)},_pathEffectorImpl:function(t,e,n){if(this._forwardParentPath&&0===t.indexOf(this._parentPropPrefix)){var r=t.substring(this._parentPropPrefix.length),s=this._modelForPath(r);s in this._parentProps&&this._forwardParentPath(r,e)}Polymer.Base._pathEffector.call(this._templatized,t,e,n)},_constructorImpl:function(t,e){this._rootDataHost=e._getRootDataHost(),this._setupConfigure(t),this._registerHost(e),this._beginHosting(),this.root=this.instanceTemplate(this._template),this.root.__noContent=!this._notes._hasContent,this.root.__styleScoped=!0,this._endHosting(),this._marshalAnnotatedNodes(),this._marshalInstanceEffects(),this._marshalAnnotatedListeners();for(var n=[],r=this.root.firstChild;r;r=r.nextSibling)n.push(r),r._templateInstance=this;this._children=n,e.__hideTemplateChildren__&&this._showHideChildren(!0),this._tryReady()},_listenImpl:function(t,e,n){var r=this,s=this._rootDataHost,i=s._createEventHandler(t,e,n),o=function(t){t.model=r,i(t)};s._listen(t,e,o)},_scopeElementClassImpl:function(t,e){
|
||
var n=this._rootDataHost;return n?n._scopeElementClass(t,e):void 0},stamp:function(t){if(t=t||{},this._parentProps){var e=this._templatized;for(var n in this._parentProps)t[n]=e[this._parentPropPrefix+n]}return new this.ctor(t,this)},modelForElement:function(t){for(var e;t;)if(e=t._templateInstance){if(e.dataHost==this)return e;t=e.dataHost}else t=t.parentNode}},Polymer({is:"dom-template","extends":"template",_template:null,behaviors:[Polymer.Templatizer],ready:function(){this.templatize(this)}}),Polymer._collections=new WeakMap,Polymer.Collection=function(t){Polymer._collections.set(t,this),this.userArray=t,this.store=t.slice(),this.initMap()},Polymer.Collection.prototype={constructor:Polymer.Collection,initMap:function(){for(var t=this.omap=new WeakMap,e=this.pmap={},n=this.store,r=0;r<n.length;r++){var s=n[r];s&&"object"==typeof s?t.set(s,r):e[s]=r}},add:function(t){var e=this.store.push(t)-1;return t&&"object"==typeof t?this.omap.set(t,e):this.pmap[t]=e,"#"+e},removeKey:function(t){t=this._parseKey(t),this._removeFromMap(this.store[t]),delete this.store[t]},_removeFromMap:function(t){t&&"object"==typeof t?this.omap["delete"](t):delete this.pmap[t]},remove:function(t){var e=this.getKey(t);return this.removeKey(e),e},getKey:function(t){var e;return e=t&&"object"==typeof t?this.omap.get(t):this.pmap[t],void 0!=e?"#"+e:void 0},getKeys:function(){return Object.keys(this.store).map(function(t){return"#"+t})},_parseKey:function(t){if("#"==t[0])return t.slice(1);throw new Error("unexpected key "+t)},setItem:function(t,e){t=this._parseKey(t);var n=this.store[t];n&&this._removeFromMap(n),e&&"object"==typeof e?this.omap.set(e,t):this.pmap[e]=t,this.store[t]=e},getItem:function(t){return t=this._parseKey(t),this.store[t]},getItems:function(){var t=[],e=this.store;for(var n in e)t.push(e[n]);return t},_applySplices:function(t){for(var e,n,r={},s=0;s<t.length&&(n=t[s]);s++){n.addedKeys=[];for(var i=0;i<n.removed.length;i++)e=this.getKey(n.removed[i]),r[e]=r[e]?null:-1;for(var i=0;i<n.addedCount;i++){var o=this.userArray[n.index+i];e=this.getKey(o),e=void 0===e?this.add(o):e,r[e]=r[e]?null:1,n.addedKeys.push(e)}}var a=[],l=[];for(var e in r)r[e]<0&&(this.removeKey(e),a.push(e)),r[e]>0&&l.push(e);return[{removed:a,added:l}]}},Polymer.Collection.get=function(t){return Polymer._collections.get(t)||new Polymer.Collection(t)},Polymer.Collection.applySplices=function(t,e){var n=Polymer._collections.get(t);return n?n._applySplices(e):null},Polymer({is:"dom-repeat","extends":"template",_template:null,properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},sort:{type:Function,observer:"_sortChanged"},filter:{type:Function,observer:"_filterChanged"},observe:{type:String,observer:"_observeChanged"},delay:Number,initialCount:{type:Number,observer:"_initializeChunking"},targetFramerate:{type:Number,value:20},_targetFrameTime:{computed:"_computeFrameTime(targetFramerate)"}},behaviors:[Polymer.Templatizer],observers:["_itemsChanged(items.*)"],created:function(){this._instances=[],this._pool=[],this._limit=1/0;var t=this;this._boundRenderChunk=function(){t._renderChunk()}},detached:function(){for(var t=0;t<this._instances.length;t++)this._detachInstance(t)},attached:function(){for(var t=Polymer.dom(Polymer.dom(this).parentNode),e=0;e<this._instances.length;e++)this._attachInstance(e,t)},ready:function(){this._instanceProps={__key__:!0},this._instanceProps[this.as]=!0,this._instanceProps[this.indexAs]=!0,this.ctor||this.templatize(this)},_sortChanged:function(t){var e=this._getRootDataHost();this._sortFn=t&&("function"==typeof t?t:function(){return e[t].apply(e,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_filterChanged:function(t){var e=this._getRootDataHost();this._filterFn=t&&("function"==typeof t?t:function(){return e[t].apply(e,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_computeFrameTime:function(t){return Math.ceil(1e3/t)},_initializeChunking:function(){this.initialCount&&(this._limit=this.initialCount,this._chunkCount=this.initialCount,this._lastChunkTime=performance.now())},_tryRenderChunk:function(){this.items&&this._limit<this.items.length&&this.debounce("renderChunk",this._requestRenderChunk)},_requestRenderChunk:function(){requestAnimationFrame(this._boundRenderChunk)},_renderChunk:function(){var t=performance.now(),e=this._targetFrameTime/(t-this._lastChunkTime);this._chunkCount=Math.round(this._chunkCount*e)||1,this._limit+=this._chunkCount,this._lastChunkTime=t,this._debounceTemplate(this._render)},_observeChanged:function(){this._observePaths=this.observe&&this.observe.replace(".*",".").split(" ")},_itemsChanged:function(t){if("items"==t.path)Array.isArray(this.items)?this.collection=Polymer.Collection.get(this.items):this.items?this._error(this._logf("dom-repeat","expected array for `items`, found",this.items)):this.collection=null,this._keySplices=[],this._indexSplices=[],this._needFullRefresh=!0,this._initializeChunking(),this._debounceTemplate(this._render);else if("items.splices"==t.path)this._keySplices=this._keySplices.concat(t.value.keySplices),this._indexSplices=this._indexSplices.concat(t.value.indexSplices),this._debounceTemplate(this._render);else{var e=t.path.slice(6);this._forwardItemPath(e,t.value),this._checkObservedPaths(e)}},_checkObservedPaths:function(t){if(this._observePaths){t=t.substring(t.indexOf(".")+1);for(var e=this._observePaths,n=0;n<e.length;n++)if(0===t.indexOf(e[n]))return this._needFullRefresh=!0,void(this.delay?this.debounce("render",this._render,this.delay):this._debounceTemplate(this._render))}},render:function(){this._needFullRefresh=!0,this._debounceTemplate(this._render),this._flushTemplates()},_render:function(){this.collection;this._needFullRefresh?(this._applyFullRefresh(),this._needFullRefresh=!1):this._keySplices.length&&(this._sortFn?this._applySplicesUserSort(this._keySplices):this._filterFn?this._applyFullRefresh():this._applySplicesArrayOrder(this._indexSplices)),this._keySplices=[],this._indexSplices=[];for(var t=this._keyToInstIdx={},e=this._instances.length-1;e>=0;e--){var n=this._instances[e];n.isPlaceholder&&e<this._limit?n=this._insertInstance(e,n.__key__):!n.isPlaceholder&&e>=this._limit&&(n=this._downgradeInstance(e,n.__key__)),t[n.__key__]=e,n.isPlaceholder||n.__setProperty(this.indexAs,e,!0)}this._pool.length=0,this.fire("dom-change"),this._tryRenderChunk()},_applyFullRefresh:function(){var t,e=this.collection;if(this._sortFn)t=e?e.getKeys():[];else{t=[];var n=this.items;if(n)for(var r=0;r<n.length;r++)t.push(e.getKey(n[r]))}var s=this;this._filterFn&&(t=t.filter(function(t){return s._filterFn(e.getItem(t))})),this._sortFn&&t.sort(function(t,n){return s._sortFn(e.getItem(t),e.getItem(n))});for(var r=0;r<t.length;r++){var i=t[r],o=this._instances[r];o?(o.__key__=i,!o.isPlaceholder&&r<this._limit&&o.__setProperty(this.as,e.getItem(i),!0)):r<this._limit?this._insertInstance(r,i):this._insertPlaceholder(r,i)}for(var a=this._instances.length-1;a>=r;a--)this._detachAndRemoveInstance(a)},_numericSort:function(t,e){return t-e},_applySplicesUserSort:function(t){for(var e,n=this.collection,r=(this._instances,{}),s=0;s<t.length&&(e=t[s]);s++){for(var i=0;i<e.removed.length;i++){var o=e.removed[i];r[o]=r[o]?null:-1}for(var i=0;i<e.added.length;i++){var o=e.added[i];r[o]=r[o]?null:1}}var a=[],l=[];for(var o in r)-1===r[o]&&a.push(this._keyToInstIdx[o]),1===r[o]&&l.push(o);if(a.length){a.sort(this._numericSort);for(var s=a.length-1;s>=0;s--){var h=a[s];void 0!==h&&this._detachAndRemoveInstance(h)}}var c=this;if(l.length){this._filterFn&&(l=l.filter(function(t){return c._filterFn(n.getItem(t))})),l.sort(function(t,e){return c._sortFn(n.getItem(t),n.getItem(e))});for(var u=0,s=0;s<l.length;s++)u=this._insertRowUserSort(u,l[s])}},_insertRowUserSort:function(t,e){for(var n=this.collection,r=n.getItem(e),s=this._instances.length-1,i=-1;s>=t;){var o=t+s>>1,a=this._instances[o].__key__,l=this._sortFn(n.getItem(a),r);if(0>l)t=o+1;else{if(!(l>0)){i=o;break}s=o-1}}return 0>i&&(i=s+1),this._insertPlaceholder(i,e),i},_applySplicesArrayOrder:function(t){for(var e,n=(this.collection,0);n<t.length&&(e=t[n]);n++){for(var r=0;r<e.removed.length;r++)this._detachAndRemoveInstance(e.index);for(var r=0;r<e.addedKeys.length;r++)this._insertPlaceholder(e.index+r,e.addedKeys[r])}},_detachInstance:function(t){var e=this._instances[t];if(!e.isPlaceholder){for(var n=0;n<e._children.length;n++){var r=e._children[n];Polymer.dom(e.root).appendChild(r)}return e}},_attachInstance:function(t,e){var n=this._instances[t];n.isPlaceholder||e.insertBefore(n.root,this)},_detachAndRemoveInstance:function(t){var e=this._detachInstance(t);e&&this._pool.push(e),this._instances.splice(t,1)},_insertPlaceholder:function(t,e){this._instances.splice(t,0,{isPlaceholder:!0,__key__:e})},_stampInstance:function(t,e){var n={__key__:e};return n[this.as]=this.collection.getItem(e),n[this.indexAs]=t,this.stamp(n)},_insertInstance:function(t,e){var n=this._pool.pop();n?(n.__setProperty(this.as,this.collection.getItem(e),!0),n.__setProperty("__key__",e,!0)):n=this._stampInstance(t,e);var r=this._instances[t+1],s=r&&!r.isPlaceholder?r._children[0]:this,i=Polymer.dom(this).parentNode;return Polymer.dom(i).insertBefore(n.root,s),this._instances[t]=n,n},_downgradeInstance:function(t,e){var n=this._detachInstance(t);return n&&this._pool.push(n),n={isPlaceholder:!0,__key__:e},this._instances[t]=n,n},_showHideChildren:function(t){for(var e=0;e<this._instances.length;e++)this._instances[e]._showHideChildren(t)},_forwardInstanceProp:function(t,e,n){if(e==this.as){var r;r=this._sortFn||this._filterFn?this.items.indexOf(this.collection.getItem(t.__key__)):t[this.indexAs],this.set("items."+r,n)}},_forwardInstancePath:function(t,e,n){0===e.indexOf(this.as+".")&&this._notifyPath("items."+t.__key__+"."+e.slice(this.as.length+1),n)},_forwardParentProp:function(t,e){for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]);s++)n.isPlaceholder||n.__setProperty(t,e,!0)},_forwardParentPath:function(t,e){for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]);s++)n.isPlaceholder||n._notifyPath(t,e,!0)},_forwardItemPath:function(t,e){if(this._keyToInstIdx){var n=t.indexOf("."),r=t.substring(0,0>n?t.length:n),s=this._keyToInstIdx[r],i=this._instances[s];i&&!i.isPlaceholder&&(n>=0?(t=this.as+"."+t.substring(n+1),i._notifyPath(t,e,!0)):i.__setProperty(this.as,e,!0))}},itemForElement:function(t){var e=this.modelForElement(t);return e&&e[this.as]},keyForElement:function(t){var e=this.modelForElement(t);return e&&e.__key__},indexForElement:function(t){var e=this.modelForElement(t);return e&&e[this.indexAs]}}),Polymer({is:"array-selector",_template:null,properties:{items:{type:Array,observer:"clearSelection"},multi:{type:Boolean,value:!1,observer:"clearSelection"},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}},clearSelection:function(){if(Array.isArray(this.selected))for(var t=0;t<this.selected.length;t++)this.unlinkPaths("selected."+t);else this.unlinkPaths("selected"),this.unlinkPaths("selectedItem");this.multi?(!this.selected||this.selected.length)&&(this.selected=[],this._selectedColl=Polymer.Collection.get(this.selected)):(this.selected=null,this._selectedColl=null),this.selectedItem=null},isSelected:function(t){return this.multi?void 0!==this._selectedColl.getKey(t):this.selected==t},deselect:function(t){if(this.multi){if(this.isSelected(t)){var e=this._selectedColl.getKey(t);this.arrayDelete("selected",t),this.unlinkPaths("selected."+e)}}else this.selected=null,this.selectedItem=null,this.unlinkPaths("selected"),this.unlinkPaths("selectedItem")},select:function(t){var e=Polymer.Collection.get(this.items),n=e.getKey(t);if(this.multi)if(this.isSelected(t))this.toggle&&this.deselect(t);else{this.push("selected",t);var r=this._selectedColl.getKey(t);this.linkPaths("selected."+r,"items."+n)}else this.toggle&&t==this.selected?this.deselect():(this.selected=t,this.selectedItem=t,this.linkPaths("selected","items."+n),this.linkPaths("selectedItem","items."+n))}}),Polymer({is:"dom-if","extends":"template",_template:null,properties:{"if":{type:Boolean,value:!1,observer:"_queueRender"},restamp:{type:Boolean,value:!1,observer:"_queueRender"}},behaviors:[Polymer.Templatizer],_queueRender:function(){this._debounceTemplate(this._render)},detached:function(){this._teardownInstance()},attached:function(){this["if"]&&this.ctor&&this.async(this._ensureInstance)},render:function(){this._flushTemplates()},_render:function(){this["if"]?(this.ctor||this.templatize(this),this._ensureInstance(),this._showHideChildren()):this.restamp&&this._teardownInstance(),!this.restamp&&this._instance&&this._showHideChildren(),this["if"]!=this._lastIf&&(this.fire("dom-change"),this._lastIf=this["if"])},_ensureInstance:function(){if(!this._instance){var t=Polymer.dom(this).parentNode;if(t){var e=Polymer.dom(t);this._instance=this.stamp();var n=this._instance.root;e.insertBefore(n,this)}}},_teardownInstance:function(){if(this._instance){var t=this._instance._children;if(t)for(var e,n=Polymer.dom(Polymer.dom(t[0]).parentNode),r=0;r<t.length&&(e=t[r]);r++)n.removeChild(e);this._instance=null}},_showHideChildren:function(){var t=this.__hideTemplateChildren__||!this["if"];this._instance&&this._instance._showHideChildren(t)},_forwardParentProp:function(t,e){this._instance&&(this._instance[t]=e)},_forwardParentPath:function(t,e){this._instance&&this._instance._notifyPath(t,e,!0)}}),Polymer({is:"dom-bind","extends":"template",_template:null,created:function(){var t=this;Polymer.RenderStatus.whenReady(function(){t._markImportsReady()})},_ensureReady:function(){this._readied||this._readySelf()},_markImportsReady:function(){this._importsReady=!0,this._ensureReady()},_registerFeatures:function(){this._prepConstructor()},_insertChildren:function(){var t=Polymer.dom(Polymer.dom(this).parentNode);t.insertBefore(this.root,this)},_removeChildren:function(){if(this._children)for(var t=0;t<this._children.length;t++)this.root.appendChild(this._children[t])},_initFeatures:function(){},_scopeElementClass:function(t,e){return this.dataHost?this.dataHost._scopeElementClass(t,e):e},_prepConfigure:function(){var t={};for(var e in this._propertyEffects)t[e]=this[e];var n=this._setupConfigure;this._setupConfigure=function(){n.call(this,t)}},attached:function(){this._importsReady&&this.render()},detached:function(){this._removeChildren()},render:function(){this._ensureReady(),this._children||(this._template=this,this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepConfigure(),this._prepBindings(),this._prepPropertyInfo(),Polymer.Base._initFeatures.call(this),this._children=Polymer.DomApi.arrayCopyChildNodes(this.root)),this._insertChildren(),this.fire("dom-change")}});</script><style>/*******************************
|
||
Flex Layout
|
||
*******************************/
|
||
|
||
html /deep/ .layout.horizontal,
|
||
html /deep/ .layout.horizontal-reverse,
|
||
html /deep/ .layout.vertical,
|
||
html /deep/ .layout.vertical-reverse {
|
||
display: -ms-flexbox;
|
||
display: -webkit-flex;
|
||
display: flex;
|
||
}
|
||
|
||
html /deep/ .layout.inline {
|
||
display: -ms-inline-flexbox;
|
||
display: -webkit-inline-flex;
|
||
display: inline-flex;
|
||
}
|
||
|
||
html /deep/ .layout.horizontal {
|
||
-ms-flex-direction: row;
|
||
-webkit-flex-direction: row;
|
||
flex-direction: row;
|
||
}
|
||
|
||
html /deep/ .layout.horizontal-reverse {
|
||
-ms-flex-direction: row-reverse;
|
||
-webkit-flex-direction: row-reverse;
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
html /deep/ .layout.vertical {
|
||
-ms-flex-direction: column;
|
||
-webkit-flex-direction: column;
|
||
flex-direction: column;
|
||
}
|
||
|
||
html /deep/ .layout.vertical-reverse {
|
||
-ms-flex-direction: column-reverse;
|
||
-webkit-flex-direction: column-reverse;
|
||
flex-direction: column-reverse;
|
||
}
|
||
|
||
html /deep/ .layout.wrap {
|
||
-ms-flex-wrap: wrap;
|
||
-webkit-flex-wrap: wrap;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
html /deep/ .layout.wrap-reverse {
|
||
-ms-flex-wrap: wrap-reverse;
|
||
-webkit-flex-wrap: wrap-reverse;
|
||
flex-wrap: wrap-reverse;
|
||
}
|
||
|
||
html /deep/ .flex-auto {
|
||
-ms-flex: 1 1 auto;
|
||
-webkit-flex: 1 1 auto;
|
||
flex: 1 1 auto;
|
||
}
|
||
|
||
html /deep/ .flex-none {
|
||
-ms-flex: none;
|
||
-webkit-flex: none;
|
||
flex: none;
|
||
}
|
||
|
||
html /deep/ .flex,
|
||
html /deep/ .flex-1 {
|
||
-ms-flex: 1;
|
||
-webkit-flex: 1;
|
||
flex: 1;
|
||
}
|
||
|
||
html /deep/ .flex-2 {
|
||
-ms-flex: 2;
|
||
-webkit-flex: 2;
|
||
flex: 2;
|
||
}
|
||
|
||
html /deep/ .flex-3 {
|
||
-ms-flex: 3;
|
||
-webkit-flex: 3;
|
||
flex: 3;
|
||
}
|
||
|
||
html /deep/ .flex-4 {
|
||
-ms-flex: 4;
|
||
-webkit-flex: 4;
|
||
flex: 4;
|
||
}
|
||
|
||
html /deep/ .flex-5 {
|
||
-ms-flex: 5;
|
||
-webkit-flex: 5;
|
||
flex: 5;
|
||
}
|
||
|
||
html /deep/ .flex-6 {
|
||
-ms-flex: 6;
|
||
-webkit-flex: 6;
|
||
flex: 6;
|
||
}
|
||
|
||
html /deep/ .flex-7 {
|
||
-ms-flex: 7;
|
||
-webkit-flex: 7;
|
||
flex: 7;
|
||
}
|
||
|
||
html /deep/ .flex-8 {
|
||
-ms-flex: 8;
|
||
-webkit-flex: 8;
|
||
flex: 8;
|
||
}
|
||
|
||
html /deep/ .flex-9 {
|
||
-ms-flex: 9;
|
||
-webkit-flex: 9;
|
||
flex: 9;
|
||
}
|
||
|
||
html /deep/ .flex-10 {
|
||
-ms-flex: 10;
|
||
-webkit-flex: 10;
|
||
flex: 10;
|
||
}
|
||
|
||
html /deep/ .flex-11 {
|
||
-ms-flex: 11;
|
||
-webkit-flex: 11;
|
||
flex: 11;
|
||
}
|
||
|
||
html /deep/ .flex-12 {
|
||
-ms-flex: 12;
|
||
-webkit-flex: 12;
|
||
flex: 12;
|
||
}
|
||
|
||
/* alignment in cross axis */
|
||
|
||
html /deep/ .layout.start {
|
||
-ms-flex-align: start;
|
||
-webkit-align-items: flex-start;
|
||
align-items: flex-start;
|
||
}
|
||
|
||
html /deep/ .layout.center,
|
||
html /deep/ .layout.center-center {
|
||
-ms-flex-align: center;
|
||
-webkit-align-items: center;
|
||
align-items: center;
|
||
}
|
||
|
||
html /deep/ .layout.end {
|
||
-ms-flex-align: end;
|
||
-webkit-align-items: flex-end;
|
||
align-items: flex-end;
|
||
}
|
||
|
||
/* alignment in main axis */
|
||
|
||
html /deep/ .layout.start-justified {
|
||
-ms-flex-pack: start;
|
||
-webkit-justify-content: flex-start;
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
html /deep/ .layout.center-justified,
|
||
html /deep/ .layout.center-center {
|
||
-ms-flex-pack: center;
|
||
-webkit-justify-content: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
html /deep/ .layout.end-justified {
|
||
-ms-flex-pack: end;
|
||
-webkit-justify-content: flex-end;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
html /deep/ .layout.around-justified {
|
||
-ms-flex-pack: around;
|
||
-webkit-justify-content: space-around;
|
||
justify-content: space-around;
|
||
}
|
||
|
||
html /deep/ .layout.justified {
|
||
-ms-flex-pack: justify;
|
||
-webkit-justify-content: space-between;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
/* self alignment */
|
||
|
||
html /deep/ .self-start {
|
||
-ms-align-self: flex-start;
|
||
-webkit-align-self: flex-start;
|
||
align-self: flex-start;
|
||
}
|
||
|
||
html /deep/ .self-center {
|
||
-ms-align-self: center;
|
||
-webkit-align-self: center;
|
||
align-self: center;
|
||
}
|
||
|
||
html /deep/ .self-end {
|
||
-ms-align-self: flex-end;
|
||
-webkit-align-self: flex-end;
|
||
align-self: flex-end;
|
||
}
|
||
|
||
html /deep/ .self-stretch {
|
||
-ms-align-self: stretch;
|
||
-webkit-align-self: stretch;
|
||
align-self: stretch;
|
||
}
|
||
|
||
/*******************************
|
||
Other Layout
|
||
*******************************/
|
||
|
||
html /deep/ .block {
|
||
display: block;
|
||
}
|
||
|
||
/* IE 10 support for HTML5 hidden attr */
|
||
html /deep/ [hidden] {
|
||
display: none !important;
|
||
}
|
||
|
||
html /deep/ .invisible {
|
||
visibility: hidden !important;
|
||
}
|
||
|
||
html /deep/ .relative {
|
||
position: relative;
|
||
}
|
||
|
||
html /deep/ .fit {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
body.fullbleed {
|
||
margin: 0;
|
||
height: 100vh;
|
||
}
|
||
|
||
html /deep/ .scroll {
|
||
-webkit-overflow-scrolling: touch;
|
||
overflow: auto;
|
||
}
|
||
|
||
.fixed-bottom,
|
||
.fixed-left,
|
||
.fixed-right,
|
||
.fixed-top {
|
||
position: fixed;
|
||
}
|
||
|
||
html /deep/ .fixed-top {
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
}
|
||
|
||
html /deep/ .fixed-right {
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
}
|
||
|
||
html /deep/ .fixed-bottom {
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
html /deep/ .fixed-left {
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}</style><style>/*******************************
|
||
Flex Layout
|
||
*******************************/
|
||
|
||
.layout.horizontal,
|
||
.layout.horizontal-reverse,
|
||
.layout.vertical,
|
||
.layout.vertical-reverse {
|
||
display: -ms-flexbox;
|
||
display: -webkit-flex;
|
||
display: flex;
|
||
}
|
||
|
||
.layout.inline {
|
||
display: -ms-inline-flexbox;
|
||
display: -webkit-inline-flex;
|
||
display: inline-flex;
|
||
}
|
||
|
||
.layout.horizontal {
|
||
-ms-flex-direction: row;
|
||
-webkit-flex-direction: row;
|
||
flex-direction: row;
|
||
}
|
||
|
||
.layout.horizontal-reverse {
|
||
-ms-flex-direction: row-reverse;
|
||
-webkit-flex-direction: row-reverse;
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.layout.vertical {
|
||
-ms-flex-direction: column;
|
||
-webkit-flex-direction: column;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.layout.vertical-reverse {
|
||
-ms-flex-direction: column-reverse;
|
||
-webkit-flex-direction: column-reverse;
|
||
flex-direction: column-reverse;
|
||
}
|
||
|
||
.layout.wrap {
|
||
-ms-flex-wrap: wrap;
|
||
-webkit-flex-wrap: wrap;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.layout.wrap-reverse {
|
||
-ms-flex-wrap: wrap-reverse;
|
||
-webkit-flex-wrap: wrap-reverse;
|
||
flex-wrap: wrap-reverse;
|
||
}
|
||
|
||
.flex-auto {
|
||
-ms-flex: 1 1 auto;
|
||
-webkit-flex: 1 1 auto;
|
||
flex: 1 1 auto;
|
||
}
|
||
|
||
.flex-none {
|
||
-ms-flex: none;
|
||
-webkit-flex: none;
|
||
flex: none;
|
||
}
|
||
|
||
.flex,
|
||
.flex-1 {
|
||
-ms-flex: 1;
|
||
-webkit-flex: 1;
|
||
flex: 1;
|
||
}
|
||
|
||
.flex-2 {
|
||
-ms-flex: 2;
|
||
-webkit-flex: 2;
|
||
flex: 2;
|
||
}
|
||
|
||
.flex-3 {
|
||
-ms-flex: 3;
|
||
-webkit-flex: 3;
|
||
flex: 3;
|
||
}
|
||
|
||
.flex-4 {
|
||
-ms-flex: 4;
|
||
-webkit-flex: 4;
|
||
flex: 4;
|
||
}
|
||
|
||
.flex-5 {
|
||
-ms-flex: 5;
|
||
-webkit-flex: 5;
|
||
flex: 5;
|
||
}
|
||
|
||
.flex-6 {
|
||
-ms-flex: 6;
|
||
-webkit-flex: 6;
|
||
flex: 6;
|
||
}
|
||
|
||
.flex-7 {
|
||
-ms-flex: 7;
|
||
-webkit-flex: 7;
|
||
flex: 7;
|
||
}
|
||
|
||
.flex-8 {
|
||
-ms-flex: 8;
|
||
-webkit-flex: 8;
|
||
flex: 8;
|
||
}
|
||
|
||
.flex-9 {
|
||
-ms-flex: 9;
|
||
-webkit-flex: 9;
|
||
flex: 9;
|
||
}
|
||
|
||
.flex-10 {
|
||
-ms-flex: 10;
|
||
-webkit-flex: 10;
|
||
flex: 10;
|
||
}
|
||
|
||
.flex-11 {
|
||
-ms-flex: 11;
|
||
-webkit-flex: 11;
|
||
flex: 11;
|
||
}
|
||
|
||
.flex-12 {
|
||
-ms-flex: 12;
|
||
-webkit-flex: 12;
|
||
flex: 12;
|
||
}
|
||
|
||
/* alignment in cross axis */
|
||
|
||
.layout.start {
|
||
-ms-flex-align: start;
|
||
-webkit-align-items: flex-start;
|
||
align-items: flex-start;
|
||
}
|
||
|
||
.layout.center,
|
||
.layout.center-center {
|
||
-ms-flex-align: center;
|
||
-webkit-align-items: center;
|
||
align-items: center;
|
||
}
|
||
|
||
.layout.end {
|
||
-ms-flex-align: end;
|
||
-webkit-align-items: flex-end;
|
||
align-items: flex-end;
|
||
}
|
||
|
||
/* alignment in main axis */
|
||
|
||
.layout.start-justified {
|
||
-ms-flex-pack: start;
|
||
-webkit-justify-content: flex-start;
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
.layout.center-justified,
|
||
.layout.center-center {
|
||
-ms-flex-pack: center;
|
||
-webkit-justify-content: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.layout.end-justified {
|
||
-ms-flex-pack: end;
|
||
-webkit-justify-content: flex-end;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.layout.around-justified {
|
||
-ms-flex-pack: around;
|
||
-webkit-justify-content: space-around;
|
||
justify-content: space-around;
|
||
}
|
||
|
||
.layout.justified {
|
||
-ms-flex-pack: justify;
|
||
-webkit-justify-content: space-between;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
/* self alignment */
|
||
|
||
.self-start {
|
||
-ms-align-self: flex-start;
|
||
-webkit-align-self: flex-start;
|
||
align-self: flex-start;
|
||
}
|
||
|
||
.self-center {
|
||
-ms-align-self: center;
|
||
-webkit-align-self: center;
|
||
align-self: center;
|
||
}
|
||
|
||
.self-end {
|
||
-ms-align-self: flex-end;
|
||
-webkit-align-self: flex-end;
|
||
align-self: flex-end;
|
||
}
|
||
|
||
.self-stretch {
|
||
-ms-align-self: stretch;
|
||
-webkit-align-self: stretch;
|
||
align-self: stretch;
|
||
}
|
||
|
||
/*******************************
|
||
Other Layout
|
||
*******************************/
|
||
|
||
.block {
|
||
display: block;
|
||
}
|
||
|
||
/* IE 10 support for HTML5 hidden attr */
|
||
[hidden] {
|
||
display: none !important;
|
||
}
|
||
|
||
.invisible {
|
||
visibility: hidden !important;
|
||
}
|
||
|
||
.relative {
|
||
position: relative;
|
||
}
|
||
|
||
.fit {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
body.fullbleed {
|
||
margin: 0;
|
||
height: 100vh;
|
||
}
|
||
|
||
.scroll {
|
||
-webkit-overflow-scrolling: touch;
|
||
overflow: auto;
|
||
}
|
||
|
||
/* fixed position */
|
||
|
||
.fixed-bottom,
|
||
.fixed-left,
|
||
.fixed-right,
|
||
.fixed-top {
|
||
position: fixed;
|
||
}
|
||
|
||
.fixed-top {
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
}
|
||
|
||
.fixed-right {
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
}
|
||
|
||
.fixed-bottom {
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
.fixed-left {
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}</style><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700"><style is="custom-style">:root {
|
||
|
||
/* Shared Styles */
|
||
|
||
/*
|
||
Unfortunately, we can't use nested rules
|
||
See https://github.com/Polymer/polymer/issues/1399
|
||
*/
|
||
--paper-font-common-base: {
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
};
|
||
|
||
--paper-font-common-code: {
|
||
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
|
||
-webkit-font-smoothing: antialiased;
|
||
};
|
||
|
||
--paper-font-common-expensive-kerning: {
|
||
text-rendering: optimizeLegibility;
|
||
};
|
||
|
||
--paper-font-common-nowrap: {
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
};
|
||
|
||
/* Material Font Styles */
|
||
|
||
--paper-font-display4: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
/* @apply(--paper-font-common-nowrap); */
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
font-size: 112px;
|
||
font-weight: 300;
|
||
letter-spacing: -.044em;
|
||
line-height: 120px;
|
||
};
|
||
|
||
--paper-font-display3: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
/* @apply(--paper-font-common-nowrap); */
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
font-size: 56px;
|
||
font-weight: 400;
|
||
letter-spacing: -.026em;
|
||
line-height: 60px;
|
||
};
|
||
|
||
--paper-font-display2: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
|
||
font-size: 45px;
|
||
font-weight: 400;
|
||
letter-spacing: -.018em;
|
||
line-height: 48px;
|
||
};
|
||
|
||
--paper-font-display1: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
|
||
font-size: 34px;
|
||
font-weight: 400;
|
||
letter-spacing: -.01em;
|
||
line-height: 40px;
|
||
};
|
||
|
||
--paper-font-headline: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
|
||
font-size: 24px;
|
||
font-weight: 400;
|
||
letter-spacing: -.012em;
|
||
line-height: 32px;
|
||
};
|
||
|
||
--paper-font-title: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
/* @apply(--paper-font-common-nowrap); */
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
font-size: 20px;
|
||
font-weight: 500;
|
||
line-height: 28px;
|
||
};
|
||
|
||
--paper-font-subhead: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
|
||
font-size: 16px;
|
||
font-weight: 400;
|
||
line-height: 24px;
|
||
};
|
||
|
||
--paper-font-body2: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
line-height: 24px;
|
||
};
|
||
|
||
--paper-font-body1: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
line-height: 20px;
|
||
};
|
||
|
||
--paper-font-caption: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
/* @apply(--paper-font-common-nowrap); */
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
font-size: 12px;
|
||
font-weight: 400;
|
||
letter-spacing: 0.011em;
|
||
line-height: 20px;
|
||
};
|
||
|
||
--paper-font-menu: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
/* @apply(--paper-font-common-nowrap); */
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
line-height: 24px;
|
||
};
|
||
|
||
--paper-font-button: {
|
||
/* @apply(--paper-font-common-base) */
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
/* @apply(--paper-font-common-nowrap); */
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
letter-spacing: 0.018em;
|
||
line-height: 24px;
|
||
text-transform: uppercase;
|
||
};
|
||
|
||
--paper-font-code2: {
|
||
/* @apply(--paper-font-common-code); */
|
||
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
line-height: 20px;
|
||
};
|
||
|
||
--paper-font-code1: {
|
||
/* @apply(--paper-font-common-code); */
|
||
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
|
||
-webkit-font-smoothing: antialiased;
|
||
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
line-height: 20px;
|
||
};
|
||
|
||
}</style><script>!function(){var e={},t={},i=null;Polymer.IronMeta=Polymer({is:"iron-meta",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,observer:"_valueChanged"},self:{type:Boolean,observer:"_selfChanged"},list:{type:Array,notify:!0}},hostAttributes:{hidden:!0},factoryImpl:function(e){if(e)for(var t in e)switch(t){case"type":case"key":case"value":this[t]=e[t]}},created:function(){this._metaDatas=e,this._metaArrays=t},_keyChanged:function(e,t){this._resetRegistration(t)},_valueChanged:function(e){this._resetRegistration(this.key)},_selfChanged:function(e){e&&(this.value=this)},_typeChanged:function(i){this._unregisterKey(this.key),e[i]||(e[i]={}),this._metaData=e[i],t[i]||(t[i]=[]),this.list=t[i],this._registerKeyValue(this.key,this.value)},byKey:function(e){return this._metaData&&this._metaData[e]},_resetRegistration:function(e){this._unregisterKey(e),this._registerKeyValue(this.key,this.value)},_unregisterKey:function(e){this._unregister(e,this._metaData,this.list)},_registerKeyValue:function(e,t){this._register(e,t,this._metaData,this.list)},_register:function(e,t,i,a){e&&i&&void 0!==t&&(i[e]=t,a.push(t))},_unregister:function(e,t,i){if(e&&t&&e in t){var a=t[e];delete t[e],this.arrayDelete(i,a)}}}),Polymer.IronMeta.getIronMeta=function(){return null===i&&(i=new Polymer.IronMeta),i},Polymer.IronMetaQuery=Polymer({is:"iron-meta-query",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,readOnly:!0},list:{type:Array,notify:!0}},factoryImpl:function(e){if(e)for(var t in e)switch(t){case"type":case"key":this[t]=e[t]}},created:function(){this._metaDatas=e,this._metaArrays=t},_keyChanged:function(e){this._setValue(this._metaData&&this._metaData[e])},_typeChanged:function(i){this._metaData=e[i],this.list=t[i],this.key&&this._keyChanged(this.key)},byKey:function(e){return this._metaData&&this._metaData[e]}})}();</script><script>Polymer({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24}},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(e){return this.name+":"+e},this)},applyIcon:function(e,t){e=e.root||e,this.removeIcon(e);var n=this._cloneIcon(t);if(n){var o=Polymer.dom(e);return o.insertBefore(n,o.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e._svgIcon&&(Polymer.dom(e).removeChild(e._svgIcon),e._svgIcon=null)},_nameChanged:function(){new Polymer.IronMeta({type:"iconset",key:this.name,value:this}),this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var e=Object.create(null);return Polymer.dom(this).querySelectorAll("[id]").forEach(function(t){e[t.id]=t}),e},_cloneIcon:function(e){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size)},_prepareSvgClone:function(e,t){if(e){var n=e.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=n.getAttribute("viewBox")||"0 0 "+t+" "+t;return o.setAttribute("viewBox",i),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.style.cssText="pointer-events: none; display: block; width: 100%; height: 100%;",o.appendChild(n).removeAttribute("id"),o}return null}});</script><script>!function(){"use strict";function e(e){var n="";if(e){var t=e.toLowerCase();n=" "===t||c.test(t)?"space":1==t.length?t:h.test(t)?t.replace("arrow",""):"multiply"==t?"*":t}return n}function n(e){var n="";return e&&(e in o?n=o[e]:u.test(e)?(e=parseInt(e.replace("U+","0x"),16),n=String.fromCharCode(e).toLowerCase()):n=e.toLowerCase()),n}function t(e){var n="";return Number(e)&&(n=e>=65&&90>=e?String.fromCharCode(32+e):e>=112&&123>=e?"f"+(e-112):e>=48&&57>=e?String(48-e):e>=96&&105>=e?String(96-e):d[e]),n}function i(i){return e(i.key)||n(i.keyIdentifier)||t(i.keyCode)||e(i.detail.key)||""}function r(e,n,t){return t===e.key&&(!e.hasModifiers||!!n.shiftKey==!!e.shiftKey&&!!n.ctrlKey==!!e.ctrlKey&&!!n.altKey==!!e.altKey&&!!n.metaKey==!!e.metaKey)}function s(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,n){var t=n.split(":"),i=t[0],r=t[1];return i in y?(e[y[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=r||"keydown"),e},{combo:e.split(":").shift()})}function a(e){return e.trim().split(" ").map(function(e){return s(e)})}var o={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},d={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},y={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},u=/U\+/,h=/^arrow/,c=/^space(bar)?/;Polymer.IronA11yKeysBehavior={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,n){this._imperativeKeyBindings[e]=n,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,n){for(var t=a(n),s=i(e),o=0;o<t.length;++o)if(r(t[o],e,s))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(e){return e.keyBindings});return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){this._keyBindings={},this._collectKeyBindings().forEach(function(e){for(var n in e)this._addKeyBinding(n,e[n])},this);for(var e in this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var n in this._keyBindings)this._keyBindings[n].sort(function(e,n){var t=e[0].hasModifiers,i=n[0].hasModifiers;return t===i?0:t?-1:1})},_addKeyBinding:function(e,n){a(e).forEach(function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,n])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){Object.keys(this._keyBindings).forEach(function(e){var n=this._keyBindings[e],t=this._onKeyBindingEvent.bind(this,n);this._boundKeyHandlers.push([this.keyEventTarget,e,t]),this.keyEventTarget.addEventListener(e,t)},this)},_unlistenKeyEventListeners:function(){for(var e,n,t,i;this._boundKeyHandlers.length;)e=this._boundKeyHandlers.pop(),n=e[0],t=e[1],i=e[2],n.removeEventListener(t,i)},_onKeyBindingEvent:function(e,n){if(this.stopKeyboardEventPropagation&&n.stopPropagation(),!n.defaultPrevented)for(var t=i(n),s=0;s<e.length;s++){var a=e[s][0],o=e[s][1];if(r(a,n,t)&&(this._triggerKeyHandler(a,o,n),n.defaultPrevented))return}},_triggerKeyHandler:function(e,n,t){var i=Object.create(e);i.keyboardEvent=t;var r=new CustomEvent(e.event,{detail:i,cancelable:!0});this[n].call(this,r),r.defaultPrevented&&t.preventDefault()}}}();</script><style is="custom-style">:root {
|
||
|
||
--dark-primary-color: #303f9f;
|
||
|
||
--default-primary-color: #3f51b5;
|
||
|
||
--light-primary-color: #c5cae9;
|
||
|
||
--text-primary-color: #ffffff;
|
||
|
||
--accent-color: #ff4081;
|
||
|
||
--primary-background-color: #ffffff;
|
||
|
||
--primary-text-color: #212121;
|
||
|
||
--secondary-text-color: #757575;
|
||
|
||
--disabled-text-color: #bdbdbd;
|
||
|
||
--divider-color: #e0e0e0;
|
||
|
||
}</style><style is="custom-style">:root {
|
||
|
||
/* Material Design color palette for Google products */
|
||
|
||
--google-red-100: #f4c7c3;
|
||
--google-red-300: #e67c73;
|
||
--google-red-500: #db4437;
|
||
--google-red-700: #c53929;
|
||
|
||
--google-blue-100: #c6dafc;
|
||
--google-blue-300: #7baaf7;
|
||
--google-blue-500: #4285f4;
|
||
--google-blue-700: #3367d6;
|
||
|
||
--google-green-100: #b7e1cd;
|
||
--google-green-300: #57bb8a;
|
||
--google-green-500: #0f9d58;
|
||
--google-green-700: #0b8043;
|
||
|
||
--google-yellow-100: #fce8b2;
|
||
--google-yellow-300: #f7cb4d;
|
||
--google-yellow-500: #f4b400;
|
||
--google-yellow-700: #f09300;
|
||
|
||
--google-grey-100: #f5f5f5;
|
||
--google-grey-300: #e0e0e0;
|
||
--google-grey-500: #9e9e9e;
|
||
--google-grey-700: #616161;
|
||
|
||
/* Material Design color palette from online spec document */
|
||
|
||
--paper-red-50: #ffebee;
|
||
--paper-red-100: #ffcdd2;
|
||
--paper-red-200: #ef9a9a;
|
||
--paper-red-300: #e57373;
|
||
--paper-red-400: #ef5350;
|
||
--paper-red-500: #f44336;
|
||
--paper-red-600: #e53935;
|
||
--paper-red-700: #d32f2f;
|
||
--paper-red-800: #c62828;
|
||
--paper-red-900: #b71c1c;
|
||
--paper-red-a100: #ff8a80;
|
||
--paper-red-a200: #ff5252;
|
||
--paper-red-a400: #ff1744;
|
||
--paper-red-a700: #d50000;
|
||
|
||
--paper-pink-50: #fce4ec;
|
||
--paper-pink-100: #f8bbd0;
|
||
--paper-pink-200: #f48fb1;
|
||
--paper-pink-300: #f06292;
|
||
--paper-pink-400: #ec407a;
|
||
--paper-pink-500: #e91e63;
|
||
--paper-pink-600: #d81b60;
|
||
--paper-pink-700: #c2185b;
|
||
--paper-pink-800: #ad1457;
|
||
--paper-pink-900: #880e4f;
|
||
--paper-pink-a100: #ff80ab;
|
||
--paper-pink-a200: #ff4081;
|
||
--paper-pink-a400: #f50057;
|
||
--paper-pink-a700: #c51162;
|
||
|
||
--paper-purple-50: #f3e5f5;
|
||
--paper-purple-100: #e1bee7;
|
||
--paper-purple-200: #ce93d8;
|
||
--paper-purple-300: #ba68c8;
|
||
--paper-purple-400: #ab47bc;
|
||
--paper-purple-500: #9c27b0;
|
||
--paper-purple-600: #8e24aa;
|
||
--paper-purple-700: #7b1fa2;
|
||
--paper-purple-800: #6a1b9a;
|
||
--paper-purple-900: #4a148c;
|
||
--paper-purple-a100: #ea80fc;
|
||
--paper-purple-a200: #e040fb;
|
||
--paper-purple-a400: #d500f9;
|
||
--paper-purple-a700: #aa00ff;
|
||
|
||
--paper-deep-purple-50: #ede7f6;
|
||
--paper-deep-purple-100: #d1c4e9;
|
||
--paper-deep-purple-200: #b39ddb;
|
||
--paper-deep-purple-300: #9575cd;
|
||
--paper-deep-purple-400: #7e57c2;
|
||
--paper-deep-purple-500: #673ab7;
|
||
--paper-deep-purple-600: #5e35b1;
|
||
--paper-deep-purple-700: #512da8;
|
||
--paper-deep-purple-800: #4527a0;
|
||
--paper-deep-purple-900: #311b92;
|
||
--paper-deep-purple-a100: #b388ff;
|
||
--paper-deep-purple-a200: #7c4dff;
|
||
--paper-deep-purple-a400: #651fff;
|
||
--paper-deep-purple-a700: #6200ea;
|
||
|
||
--paper-indigo-50: #e8eaf6;
|
||
--paper-indigo-100: #c5cae9;
|
||
--paper-indigo-200: #9fa8da;
|
||
--paper-indigo-300: #7986cb;
|
||
--paper-indigo-400: #5c6bc0;
|
||
--paper-indigo-500: #3f51b5;
|
||
--paper-indigo-600: #3949ab;
|
||
--paper-indigo-700: #303f9f;
|
||
--paper-indigo-800: #283593;
|
||
--paper-indigo-900: #1a237e;
|
||
--paper-indigo-a100: #8c9eff;
|
||
--paper-indigo-a200: #536dfe;
|
||
--paper-indigo-a400: #3d5afe;
|
||
--paper-indigo-a700: #304ffe;
|
||
|
||
--paper-blue-50: #e3f2fd;
|
||
--paper-blue-100: #bbdefb;
|
||
--paper-blue-200: #90caf9;
|
||
--paper-blue-300: #64b5f6;
|
||
--paper-blue-400: #42a5f5;
|
||
--paper-blue-500: #2196f3;
|
||
--paper-blue-600: #1e88e5;
|
||
--paper-blue-700: #1976d2;
|
||
--paper-blue-800: #1565c0;
|
||
--paper-blue-900: #0d47a1;
|
||
--paper-blue-a100: #82b1ff;
|
||
--paper-blue-a200: #448aff;
|
||
--paper-blue-a400: #2979ff;
|
||
--paper-blue-a700: #2962ff;
|
||
|
||
--paper-light-blue-50: #e1f5fe;
|
||
--paper-light-blue-100: #b3e5fc;
|
||
--paper-light-blue-200: #81d4fa;
|
||
--paper-light-blue-300: #4fc3f7;
|
||
--paper-light-blue-400: #29b6f6;
|
||
--paper-light-blue-500: #03a9f4;
|
||
--paper-light-blue-600: #039be5;
|
||
--paper-light-blue-700: #0288d1;
|
||
--paper-light-blue-800: #0277bd;
|
||
--paper-light-blue-900: #01579b;
|
||
--paper-light-blue-a100: #80d8ff;
|
||
--paper-light-blue-a200: #40c4ff;
|
||
--paper-light-blue-a400: #00b0ff;
|
||
--paper-light-blue-a700: #0091ea;
|
||
|
||
--paper-cyan-50: #e0f7fa;
|
||
--paper-cyan-100: #b2ebf2;
|
||
--paper-cyan-200: #80deea;
|
||
--paper-cyan-300: #4dd0e1;
|
||
--paper-cyan-400: #26c6da;
|
||
--paper-cyan-500: #00bcd4;
|
||
--paper-cyan-600: #00acc1;
|
||
--paper-cyan-700: #0097a7;
|
||
--paper-cyan-800: #00838f;
|
||
--paper-cyan-900: #006064;
|
||
--paper-cyan-a100: #84ffff;
|
||
--paper-cyan-a200: #18ffff;
|
||
--paper-cyan-a400: #00e5ff;
|
||
--paper-cyan-a700: #00b8d4;
|
||
|
||
--paper-teal-50: #e0f2f1;
|
||
--paper-teal-100: #b2dfdb;
|
||
--paper-teal-200: #80cbc4;
|
||
--paper-teal-300: #4db6ac;
|
||
--paper-teal-400: #26a69a;
|
||
--paper-teal-500: #009688;
|
||
--paper-teal-600: #00897b;
|
||
--paper-teal-700: #00796b;
|
||
--paper-teal-800: #00695c;
|
||
--paper-teal-900: #004d40;
|
||
--paper-teal-a100: #a7ffeb;
|
||
--paper-teal-a200: #64ffda;
|
||
--paper-teal-a400: #1de9b6;
|
||
--paper-teal-a700: #00bfa5;
|
||
|
||
--paper-green-50: #e8f5e9;
|
||
--paper-green-100: #c8e6c9;
|
||
--paper-green-200: #a5d6a7;
|
||
--paper-green-300: #81c784;
|
||
--paper-green-400: #66bb6a;
|
||
--paper-green-500: #4caf50;
|
||
--paper-green-600: #43a047;
|
||
--paper-green-700: #388e3c;
|
||
--paper-green-800: #2e7d32;
|
||
--paper-green-900: #1b5e20;
|
||
--paper-green-a100: #b9f6ca;
|
||
--paper-green-a200: #69f0ae;
|
||
--paper-green-a400: #00e676;
|
||
--paper-green-a700: #00c853;
|
||
|
||
--paper-light-green-50: #f1f8e9;
|
||
--paper-light-green-100: #dcedc8;
|
||
--paper-light-green-200: #c5e1a5;
|
||
--paper-light-green-300: #aed581;
|
||
--paper-light-green-400: #9ccc65;
|
||
--paper-light-green-500: #8bc34a;
|
||
--paper-light-green-600: #7cb342;
|
||
--paper-light-green-700: #689f38;
|
||
--paper-light-green-800: #558b2f;
|
||
--paper-light-green-900: #33691e;
|
||
--paper-light-green-a100: #ccff90;
|
||
--paper-light-green-a200: #b2ff59;
|
||
--paper-light-green-a400: #76ff03;
|
||
--paper-light-green-a700: #64dd17;
|
||
|
||
--paper-lime-50: #f9fbe7;
|
||
--paper-lime-100: #f0f4c3;
|
||
--paper-lime-200: #e6ee9c;
|
||
--paper-lime-300: #dce775;
|
||
--paper-lime-400: #d4e157;
|
||
--paper-lime-500: #cddc39;
|
||
--paper-lime-600: #c0ca33;
|
||
--paper-lime-700: #afb42b;
|
||
--paper-lime-800: #9e9d24;
|
||
--paper-lime-900: #827717;
|
||
--paper-lime-a100: #f4ff81;
|
||
--paper-lime-a200: #eeff41;
|
||
--paper-lime-a400: #c6ff00;
|
||
--paper-lime-a700: #aeea00;
|
||
|
||
--paper-yellow-50: #fffde7;
|
||
--paper-yellow-100: #fff9c4;
|
||
--paper-yellow-200: #fff59d;
|
||
--paper-yellow-300: #fff176;
|
||
--paper-yellow-400: #ffee58;
|
||
--paper-yellow-500: #ffeb3b;
|
||
--paper-yellow-600: #fdd835;
|
||
--paper-yellow-700: #fbc02d;
|
||
--paper-yellow-800: #f9a825;
|
||
--paper-yellow-900: #f57f17;
|
||
--paper-yellow-a100: #ffff8d;
|
||
--paper-yellow-a200: #ffff00;
|
||
--paper-yellow-a400: #ffea00;
|
||
--paper-yellow-a700: #ffd600;
|
||
|
||
--paper-amber-50: #fff8e1;
|
||
--paper-amber-100: #ffecb3;
|
||
--paper-amber-200: #ffe082;
|
||
--paper-amber-300: #ffd54f;
|
||
--paper-amber-400: #ffca28;
|
||
--paper-amber-500: #ffc107;
|
||
--paper-amber-600: #ffb300;
|
||
--paper-amber-700: #ffa000;
|
||
--paper-amber-800: #ff8f00;
|
||
--paper-amber-900: #ff6f00;
|
||
--paper-amber-a100: #ffe57f;
|
||
--paper-amber-a200: #ffd740;
|
||
--paper-amber-a400: #ffc400;
|
||
--paper-amber-a700: #ffab00;
|
||
|
||
--paper-orange-50: #fff3e0;
|
||
--paper-orange-100: #ffe0b2;
|
||
--paper-orange-200: #ffcc80;
|
||
--paper-orange-300: #ffb74d;
|
||
--paper-orange-400: #ffa726;
|
||
--paper-orange-500: #ff9800;
|
||
--paper-orange-600: #fb8c00;
|
||
--paper-orange-700: #f57c00;
|
||
--paper-orange-800: #ef6c00;
|
||
--paper-orange-900: #e65100;
|
||
--paper-orange-a100: #ffd180;
|
||
--paper-orange-a200: #ffab40;
|
||
--paper-orange-a400: #ff9100;
|
||
--paper-orange-a700: #ff6500;
|
||
|
||
--paper-deep-orange-50: #fbe9e7;
|
||
--paper-deep-orange-100: #ffccbc;
|
||
--paper-deep-orange-200: #ffab91;
|
||
--paper-deep-orange-300: #ff8a65;
|
||
--paper-deep-orange-400: #ff7043;
|
||
--paper-deep-orange-500: #ff5722;
|
||
--paper-deep-orange-600: #f4511e;
|
||
--paper-deep-orange-700: #e64a19;
|
||
--paper-deep-orange-800: #d84315;
|
||
--paper-deep-orange-900: #bf360c;
|
||
--paper-deep-orange-a100: #ff9e80;
|
||
--paper-deep-orange-a200: #ff6e40;
|
||
--paper-deep-orange-a400: #ff3d00;
|
||
--paper-deep-orange-a700: #dd2c00;
|
||
|
||
--paper-brown-50: #efebe9;
|
||
--paper-brown-100: #d7ccc8;
|
||
--paper-brown-200: #bcaaa4;
|
||
--paper-brown-300: #a1887f;
|
||
--paper-brown-400: #8d6e63;
|
||
--paper-brown-500: #795548;
|
||
--paper-brown-600: #6d4c41;
|
||
--paper-brown-700: #5d4037;
|
||
--paper-brown-800: #4e342e;
|
||
--paper-brown-900: #3e2723;
|
||
|
||
--paper-grey-50: #fafafa;
|
||
--paper-grey-100: #f5f5f5;
|
||
--paper-grey-200: #eeeeee;
|
||
--paper-grey-300: #e0e0e0;
|
||
--paper-grey-400: #bdbdbd;
|
||
--paper-grey-500: #9e9e9e;
|
||
--paper-grey-600: #757575;
|
||
--paper-grey-700: #616161;
|
||
--paper-grey-800: #424242;
|
||
--paper-grey-900: #212121;
|
||
|
||
--paper-blue-grey-50: #eceff1;
|
||
--paper-blue-grey-100: #cfd8dc;
|
||
--paper-blue-grey-200: #b0bec5;
|
||
--paper-blue-grey-300: #90a4ae;
|
||
--paper-blue-grey-400: #78909c;
|
||
--paper-blue-grey-500: #607d8b;
|
||
--paper-blue-grey-600: #546e7a;
|
||
--paper-blue-grey-700: #455a64;
|
||
--paper-blue-grey-800: #37474f;
|
||
--paper-blue-grey-900: #263238;
|
||
|
||
/* opacity for dark text on a light background */
|
||
--dark-divider-opacity: 0.12;
|
||
--dark-disabled-opacity: 0.38; /* or hint text or icon */
|
||
--dark-secondary-opacity: 0.54;
|
||
--dark-primary-opacity: 0.87;
|
||
|
||
/* opacity for light text on a dark background */
|
||
--light-divider-opacity: 0.12;
|
||
--light-disabled-opacity: 0.3; /* or hint text or icon */
|
||
--light-secondary-opacity: 0.7;
|
||
--light-primary-opacity: 1.0;
|
||
|
||
}</style><script>Polymer.IronValidatableBehavior={properties:{validatorType:{type:String,value:"validator"},validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1},_validatorMeta:{type:Object}},observers:["_invalidChanged(invalid)"],get _validator(){return this._validatorMeta&&this._validatorMeta.byKey(this.validator)},ready:function(){this._validatorMeta=new Polymer.IronMeta({type:this.validatorType})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},hasValidator:function(){return null!=this._validator},validate:function(t){return this.invalid=!this._getValidity(t),!this.invalid},_getValidity:function(t){return this.hasValidator()?this._validator.validate(t):!0}};</script><script>Polymer.IronFormElementBehavior={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1},_parentForm:{type:Object}},attached:function(){this.fire("iron-form-element-register")},detached:function(){this._parentForm&&this._parentForm.fire("iron-form-element-unregister",{target:this})}};</script><script>Polymer.IronCheckedElementBehaviorImpl={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.required&&this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){(void 0===this.value||null===this.value)&&(this.value="on")}},Polymer.IronCheckedElementBehavior=[Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior,Polymer.IronCheckedElementBehaviorImpl];</script><script>Polymer.IronControlState={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:Number},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){e.target===this?this._setFocused("focus"===e.type):this.shadowRoot||this.isLightDescendant(e.target)||this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.tabIndex,this.focused=!1,this.tabIndex=-1):void 0!==this._oldTabIndex&&(this.tabIndex=this._oldTabIndex)},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}};</script><script>Polymer.IronButtonStateImpl={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_detectKeyboardFocus(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,i=Polymer.dom(t).localTarget;this.isLightDescendant(i)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,i=Polymer.dom(t).localTarget;this.isLightDescendant(i)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Polymer.IronButtonState=[Polymer.IronA11yKeysBehavior,Polymer.IronButtonStateImpl];</script><script>Polymer.PaperRippleBehavior={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Polymer.IronButtonStateImpl._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var i=this._rippleContainer||this.root;if(i&&Polymer.dom(i).appendChild(this._ripple),e){var n=Polymer.dom(this._rippleContainer||this),t=Polymer.dom(e).rootTarget;n.deepContains(t)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}};</script><script>Polymer.PaperInkyFocusBehaviorImpl={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=Polymer.PaperRippleBehavior._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},Polymer.PaperInkyFocusBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperInkyFocusBehaviorImpl];</script><script>Polymer.PaperCheckedElementBehaviorImpl={_checkedChanged:function(){Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){Polymer.PaperRippleBehavior._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}},Polymer.PaperCheckedElementBehavior=[Polymer.PaperInkyFocusBehavior,Polymer.IronCheckedElementBehavior,Polymer.PaperCheckedElementBehaviorImpl];</script><style is="custom-style">:root {
|
||
|
||
--shadow-transition: {
|
||
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||
};
|
||
|
||
--shadow-none: {
|
||
box-shadow: none;
|
||
};
|
||
|
||
/* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
|
||
|
||
--shadow-elevation-2dp: {
|
||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
||
0 1px 5px 0 rgba(0, 0, 0, 0.12),
|
||
0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
||
};
|
||
|
||
--shadow-elevation-3dp: {
|
||
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
|
||
0 1px 8px 0 rgba(0, 0, 0, 0.12),
|
||
0 3px 3px -2px rgba(0, 0, 0, 0.4);
|
||
};
|
||
|
||
--shadow-elevation-4dp: {
|
||
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
||
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
||
0 2px 4px -1px rgba(0, 0, 0, 0.4);
|
||
};
|
||
|
||
--shadow-elevation-6dp: {
|
||
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
|
||
0 1px 18px 0 rgba(0, 0, 0, 0.12),
|
||
0 3px 5px -1px rgba(0, 0, 0, 0.4);
|
||
};
|
||
|
||
--shadow-elevation-8dp: {
|
||
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
||
0 3px 14px 2px rgba(0, 0, 0, 0.12),
|
||
0 5px 5px -3px rgba(0, 0, 0, 0.4);
|
||
};
|
||
|
||
--shadow-elevation-16dp: {
|
||
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
|
||
0 6px 30px 5px rgba(0, 0, 0, 0.12),
|
||
0 8px 10px -5px rgba(0, 0, 0, 0.4);
|
||
};
|
||
|
||
}</style><script>Polymer.PaperButtonBehaviorImpl={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.classList.toggle("keyboard-focus",e)},_spaceKeyDownHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},Polymer.PaperButtonBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperButtonBehaviorImpl];</script><style>/* IE 10 support for HTML5 hidden attr */
|
||
[hidden] {
|
||
display: none !important;
|
||
}</style><style is="custom-style">:root {
|
||
|
||
--layout: {
|
||
display: -ms-flexbox;
|
||
display: -webkit-flex;
|
||
display: flex;
|
||
};
|
||
|
||
--layout-inline: {
|
||
display: -ms-inline-flexbox;
|
||
display: -webkit-inline-flex;
|
||
display: inline-flex;
|
||
};
|
||
|
||
--layout-horizontal: {
|
||
/* @apply(--layout); */
|
||
display: -ms-flexbox;
|
||
display: -webkit-flex;
|
||
display: flex;
|
||
|
||
-ms-flex-direction: row;
|
||
-webkit-flex-direction: row;
|
||
flex-direction: row;
|
||
};
|
||
|
||
--layout-horizontal-reverse: {
|
||
-ms-flex-direction: row-reverse;
|
||
-webkit-flex-direction: row-reverse;
|
||
flex-direction: row-reverse;
|
||
};
|
||
|
||
--layout-vertical: {
|
||
/* @apply(--layout); */
|
||
display: -ms-flexbox;
|
||
display: -webkit-flex;
|
||
display: flex;
|
||
|
||
-ms-flex-direction: column;
|
||
-webkit-flex-direction: column;
|
||
flex-direction: column;
|
||
};
|
||
|
||
--layout-vertical-reverse: {
|
||
-ms-flex-direction: column-reverse;
|
||
-webkit-flex-direction: column-reverse;
|
||
flex-direction: column-reverse;
|
||
};
|
||
|
||
--layout-wrap: {
|
||
-ms-flex-wrap: wrap;
|
||
-webkit-flex-wrap: wrap;
|
||
flex-wrap: wrap;
|
||
};
|
||
|
||
--layout-wrap-reverse: {
|
||
-ms-flex-wrap: wrap-reverse;
|
||
-webkit-flex-wrap: wrap-reverse;
|
||
flex-wrap: wrap-reverse;
|
||
};
|
||
|
||
--layout-flex-auto: {
|
||
-ms-flex: 1 1 auto;
|
||
-webkit-flex: 1 1 auto;
|
||
flex: 1 1 auto;
|
||
};
|
||
|
||
--layout-flex-none: {
|
||
-ms-flex: none;
|
||
-webkit-flex: none;
|
||
flex: none;
|
||
};
|
||
|
||
--layout-flex: {
|
||
-ms-flex: 1 1 0.000000001px;
|
||
-webkit-flex: 1;
|
||
flex: 1;
|
||
-webkit-flex-basis: 0.000000001px;
|
||
flex-basis: 0.000000001px;
|
||
};
|
||
|
||
--layout-flex-2: {
|
||
-ms-flex: 2;
|
||
-webkit-flex: 2;
|
||
flex: 2;
|
||
};
|
||
|
||
--layout-flex-3: {
|
||
-ms-flex: 3;
|
||
-webkit-flex: 3;
|
||
flex: 3;
|
||
};
|
||
|
||
--layout-flex-4: {
|
||
-ms-flex: 4;
|
||
-webkit-flex: 4;
|
||
flex: 4;
|
||
};
|
||
|
||
--layout-flex-5: {
|
||
-ms-flex: 5;
|
||
-webkit-flex: 5;
|
||
flex: 5;
|
||
};
|
||
|
||
--layout-flex-6: {
|
||
-ms-flex: 6;
|
||
-webkit-flex: 6;
|
||
flex: 6;
|
||
};
|
||
|
||
--layout-flex-7: {
|
||
-ms-flex: 7;
|
||
-webkit-flex: 7;
|
||
flex: 7;
|
||
};
|
||
|
||
--layout-flex-8: {
|
||
-ms-flex: 8;
|
||
-webkit-flex: 8;
|
||
flex: 8;
|
||
};
|
||
|
||
--layout-flex-9: {
|
||
-ms-flex: 9;
|
||
-webkit-flex: 9;
|
||
flex: 9;
|
||
};
|
||
|
||
--layout-flex-10: {
|
||
-ms-flex: 10;
|
||
-webkit-flex: 10;
|
||
flex: 10;
|
||
};
|
||
|
||
--layout-flex-11: {
|
||
-ms-flex: 11;
|
||
-webkit-flex: 11;
|
||
flex: 11;
|
||
};
|
||
|
||
--layout-flex-12: {
|
||
-ms-flex: 12;
|
||
-webkit-flex: 12;
|
||
flex: 12;
|
||
};
|
||
|
||
/* alignment in cross axis */
|
||
|
||
--layout-start: {
|
||
-ms-flex-align: start;
|
||
-webkit-align-items: flex-start;
|
||
align-items: flex-start;
|
||
};
|
||
|
||
--layout-center: {
|
||
-ms-flex-align: center;
|
||
-webkit-align-items: center;
|
||
align-items: center;
|
||
};
|
||
|
||
--layout-end: {
|
||
-ms-flex-align: end;
|
||
-webkit-align-items: flex-end;
|
||
align-items: flex-end;
|
||
};
|
||
|
||
/* alignment in main axis */
|
||
|
||
--layout-start-justified: {
|
||
-ms-flex-pack: start;
|
||
-webkit-justify-content: flex-start;
|
||
justify-content: flex-start;
|
||
};
|
||
|
||
--layout-center-justified: {
|
||
-ms-flex-pack: center;
|
||
-webkit-justify-content: center;
|
||
justify-content: center;
|
||
};
|
||
|
||
--layout-end-justified: {
|
||
-ms-flex-pack: end;
|
||
-webkit-justify-content: flex-end;
|
||
justify-content: flex-end;
|
||
};
|
||
|
||
--layout-around-justified: {
|
||
-ms-flex-pack: around;
|
||
-webkit-justify-content: space-around;
|
||
justify-content: space-around;
|
||
};
|
||
|
||
--layout-justified: {
|
||
-ms-flex-pack: justify;
|
||
-webkit-justify-content: space-between;
|
||
justify-content: space-between;
|
||
};
|
||
|
||
--layout-center-center: {
|
||
/* @apply(--layout-center --layout-center-justified); */
|
||
-ms-flex-align: center;
|
||
-webkit-align-items: center;
|
||
align-items: center;
|
||
-ms-flex-pack: center;
|
||
-webkit-justify-content: center;
|
||
justify-content: center;
|
||
};
|
||
|
||
/* self alignment */
|
||
|
||
--layout-self-start: {
|
||
-ms-align-self: flex-start;
|
||
-webkit-align-self: flex-start;
|
||
align-self: flex-start;
|
||
};
|
||
|
||
--layout-self-center: {
|
||
-ms-align-self: center;
|
||
-webkit-align-self: center;
|
||
align-self: center;
|
||
};
|
||
|
||
--layout-self-end: {
|
||
-ms-align-self: flex-end;
|
||
-webkit-align-self: flex-end;
|
||
align-self: flex-end;
|
||
};
|
||
|
||
--layout-self-stretch: {
|
||
-ms-align-self: stretch;
|
||
-webkit-align-self: stretch;
|
||
align-self: stretch;
|
||
};
|
||
|
||
/*******************************
|
||
Other Layout
|
||
*******************************/
|
||
|
||
--layout-block: {
|
||
display: block;
|
||
};
|
||
|
||
--layout-invisible: {
|
||
visibility: hidden !important;
|
||
};
|
||
|
||
--layout-relative: {
|
||
position: relative;
|
||
};
|
||
|
||
--layout-fit: {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
};
|
||
|
||
--layout-scroll: {
|
||
-webkit-overflow-scrolling: touch;
|
||
overflow: auto;
|
||
};
|
||
|
||
--layout-fullbleed: {
|
||
margin: 0;
|
||
height: 100vh;
|
||
};
|
||
|
||
/* fixed position */
|
||
|
||
--layout-fixed-top: {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
};
|
||
|
||
--layout-fixed-right: {
|
||
position: fixed;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
};
|
||
|
||
--layout-fixed-bottom: {
|
||
position: fixed;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
};
|
||
|
||
--layout-fixed-left: {
|
||
position: fixed;
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
};
|
||
|
||
}</style><script>Polymer.PaperInputAddonBehavior={hostAttributes:{"add-on":""},attached:function(){this.fire("addon-attached")},update:function(t){}};</script><script>Polymer({is:"iron-input","extends":"input",behaviors:[Polymer.IronValidatableBehavior],properties:{bindValue:{observer:"_bindValueChanged",type:String},preventInvalidInput:{type:Boolean},allowedPattern:{type:String,observer:"_allowedPatternChanged"},_previousValidInput:{type:String,value:""},_patternAlreadyChecked:{type:Boolean,value:!1}},listeners:{input:"_onInput",keypress:"_onKeypress"},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else if(this.pattern)e=new RegExp(this.pattern);else switch(this.type){case"number":e=/[0-9.,e-]/}return e},ready:function(){this.bindValue=this.value},_bindValueChanged:function(){this.value!==this.bindValue&&(this.value=this.bindValue||0===this.bindValue?this.bindValue:""),this.fire("bind-value-changed",{value:this.bindValue})},_allowedPatternChanged:function(){this.preventInvalidInput=this.allowedPattern?!0:!1},_onInput:function(){if(this.preventInvalidInput&&!this._patternAlreadyChecked){var e=this._checkPatternValidity();e||(this.value=this._previousValidInput)}this.bindValue=this.value,this._previousValidInput=this.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=8==e.keyCode||9==e.keyCode||13==e.keyCode||27==e.keyCode,i=19==e.keyCode||20==e.keyCode||45==e.keyCode||46==e.keyCode||144==e.keyCode||145==e.keyCode||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!(t||0==e.charCode&&i)},_onKeypress:function(e){if(this.preventInvalidInput||"number"===this.type){var t=this._patternRegExp;if(t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var i=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(i)&&e.preventDefault()}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t<this.value.length;t++)if(!e.test(this.value[t]))return!1;return!0},validate:function(){if(!this.required&&""==this.value)return this.invalid=!1,!0;var e;return this.hasValidator()?e=Polymer.IronValidatableBehavior.validate.call(this,this.value):(this.invalid=!this.validity.valid,e=this.validity.valid),this.fire("iron-input-validate"),e}});</script><script>Polymer({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}});</script><script>Polymer.IronSelection=function(e){this.selection=[],this.selectCallback=e},Polymer.IronSelection.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(e){this.selection.slice().forEach(function(t){(!e||e.indexOf(t)<0)&&this.setItemSelected(t,!1)},this)},isSelected:function(e){return this.selection.indexOf(e)>=0},setItemSelected:function(e,t){if(null!=e){if(t)this.selection.push(e);else{var i=this.selection.indexOf(e);i>=0&&this.selection.splice(i,1)}this.selectCallback&&this.selectCallback(e,t)}},select:function(e){this.multi?this.toggle(e):this.get()!==e&&(this.setItemSelected(this.get(),!1),this.setItemSelected(e,!0))},toggle:function(e){this.setItemSelected(e,!this.isSelected(e))}};</script><script>Polymer.IronSelectableBehavior={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},items:{type:Array,readOnly:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1}}}},observers:["_updateSelected(attrForSelected, selected)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Polymer.IronSelection(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._updateItems(),this._shouldUpdateSelection||this._updateSelected(this.attrForSelected,this.selected),this._addListener(this.activateEvent)},detached:function(){this._observer&&Polymer.dom(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items.indexOf(e)},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=(Number(this._valueToIndex(this.selected))-1+e)%e;this.selected=this._indexToValue(t)},selectNext:function(){var e=(Number(this._valueToIndex(this.selected))+1)%this.items.length;this.selected=this._indexToValue(e)},get _shouldUpdateSelection(){return null!=this.selected},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=Polymer.dom(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){this._selection.select(this._valueToItem(this.selected))},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return null==e?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(!this.attrForSelected)return Number(e);for(var t,i=0;t=this.items[i];i++)if(this._valueForItem(t)==e)return i},_indexToValue:function(e){if(!this.attrForSelected)return e;var t=this.items[e];return t?this._valueForItem(t):void 0},_valueForItem:function(e){return e[this.attrForSelected]||e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return Polymer.dom(e).observeNodes(function(e){this.fire("iron-items-changed",e,{bubbles:!1,cancelable:!1}),this._updateItems(),this._shouldUpdateSelection&&this._updateSelected()})},_activateHandler:function(e){for(var t=e.target,i=this.items;t&&t!=this;){var s=i.indexOf(t);if(s>=0){var n=this._indexToValue(s);return void this._itemActivate(n,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}};</script><script>Polymer.IronMultiSelectableBehaviorImpl={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0},selectedItems:{type:Array,readOnly:!0,notify:!0}},observers:["_updateSelected(attrForSelected, selectedValues)"],select:function(e){this.multi?this.selectedValues?this._toggleSelected(e):this.selectedValues=[e]:this.selected=e},multiChanged:function(e){this._selection.multi=e},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){if(this._selection.clear(),e)for(var t=0;t<e.length;t++)this._selection.setItemSelected(this._valueToItem(e[t]),!0)},_selectionChange:function(){var e=this._selection.get();this.multi?this._setSelectedItems(e):(this._setSelectedItems([e]),this._setSelectedItem(e))},_toggleSelected:function(e){var t=this.selectedValues.indexOf(e),l=0>t;l?this.push("selectedValues",e):this.splice("selectedValues",t,1),this._selection.setItemSelected(this._valueToItem(e),l)}},Polymer.IronMultiSelectableBehavior=[Polymer.IronSelectableBehavior,Polymer.IronMultiSelectableBehaviorImpl];</script><script>Polymer({is:"iron-selector",behaviors:[Polymer.IronMultiSelectableBehavior]});</script><script>Polymer.IronResizableBehavior={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this)},attached:function(){this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable||(window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):window.removeEventListener("resize",this._boundNotifyResize),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable=e},stopResizeNotificationsFor:function(e){var i=this._interestedResizables.indexOf(e);i>-1&&(this._interestedResizables.splice(i,1),this.unlisten(e,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){return this._notifyingDescendant?void e.stopPropagation():void(Polymer.Settings.useShadow||this._fireResize())},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var i=e.path?e.path[0]:e.target;i!==this&&(-1===this._interestedResizables.indexOf(i)&&(this._interestedResizables.push(i),this.listen(i,"iron-resize","_onDescendantIronResize")),i.assignParentResizable(this),this._notifyDescendant(i),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)}};</script><script>Polymer.PaperInputBehaviorImpl={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},preventInvalidInput:{type:Boolean},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},observers:["_focusedControlStateChanged(focused)"],get inputElement(){return this.$.input},attached:function(){this._updateAriaLabelledBy()},_appendStringWithSpace:function(e,t){return e=e?e+" "+t:t},_onAddonAttached:function(e){var t=e.path?e.path[0]:e.target;if(t.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,t.id);else{var a="paper-input-add-on-"+Math.floor(1e5*Math.random());t.id=a,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,a)}},validate:function(){return this.inputElement.validate()},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(e){try{var t=this.inputElement.selectionStart;this.value=e,this.inputElement.selectionStart=t,this.inputElement.selectionEnd=t}catch(a){this.value=e}},_computeAlwaysFloatLabel:function(e,t){return t||e},_focusedControlStateChanged:function(e){(this.$.container||(this.$.container=Polymer.dom(this.root).querySelector("paper-input-container"),this.$.container))&&(e?this.$.container._onFocus():this.$.container._onBlur())},_updateAriaLabelledBy:function(){var e=Polymer.dom(this.root).querySelector("label");if(!e)return void(this._ariaLabelledBy="");var t;e.id?t=e.id:(t="paper-input-label-"+(new Date).getUTCMilliseconds(),e.id=t),this._ariaLabelledBy=t},_onChange:function(e){this.shadowRoot&&this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})}},Polymer.PaperInputBehavior=[Polymer.IronControlState,Polymer.PaperInputBehaviorImpl];</script><script>!function(t,e){"use strict";var n;if("object"==typeof exports){try{n=require("moment")}catch(i){}module.exports=e(n)}else"function"==typeof define&&define.amd?define(function(t){var i="moment";try{n=t(i)}catch(a){}return e(n)}):t.Pikaday=e(t.moment)}(this,function(t){"use strict";var e="function"==typeof t,n=!!window.addEventListener,i=window.document,a=window.setTimeout,o=function(t,e,i,a){n?t.addEventListener(e,i,!!a):t.attachEvent("on"+e,i)},s=function(t,e,i,a){n?t.removeEventListener(e,i,!!a):t.detachEvent("on"+e,i)},r=function(t,e,n){var a;i.createEvent?(a=i.createEvent("HTMLEvents"),a.initEvent(e,!0,!1),a=D(a,n),t.dispatchEvent(a)):i.createEventObject&&(a=i.createEventObject(),a=D(a,n),t.fireEvent("on"+e,a))},h=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},l=function(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")},d=function(t,e){l(t,e)||(t.className=""===t.className?e:t.className+" "+e)},u=function(t,e){t.className=h((" "+t.className+" ").replace(" "+e+" "," "))},c=function(t){return/Array/.test(Object.prototype.toString.call(t))},f=function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())},g=function(t){var e=t.getDay();return 0===e||6===e},m=function(t){return t%4===0&&t%100!==0||t%400===0},p=function(t,e){return[31,m(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},y=function(t){f(t)&&t.setHours(0,0,0,0)},_=function(t,e){return t.getTime()===e.getTime()},D=function(t,e,n){var i,a;for(i in e)a=void 0!==t[i],a&&"object"==typeof e[i]&&null!==e[i]&&void 0===e[i].nodeName?f(e[i])?n&&(t[i]=new Date(e[i].getTime())):c(e[i])?n&&(t[i]=e[i].slice(0)):t[i]=D({},e[i],n):(n||!a)&&(t[i]=e[i]);return t},v=function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t},b={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},w=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},M=function(t){if(t.isEmpty)return'<td class="is-empty"></td>';var e=[];return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&e.push("is-selected"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'"><button class="pika-button pika-day" type="button" data-pika-year="'+t.year+'" data-pika-month="'+t.month+'" data-pika-day="'+t.day+'">'+t.day+"</button></td>"},k=function(t,e,n){var i=new Date(n,0,1),a=Math.ceil(((new Date(n,e,t)-i)/864e5+i.getDay()+1)/7);return'<td class="pika-week">'+a+"</td>"},R=function(t,e){return"<tr>"+(e?t.reverse():t).join("")+"</tr>"},x=function(t){return"<tbody>"+t.join("")+"</tbody>"},N=function(t){var e,n=[];for(t.showWeekNumber&&n.push("<th></th>"),e=0;7>e;e++)n.push('<th scope="col"><abbr title="'+w(t,e)+'">'+w(t,e,!0)+"</abbr></th>");return"<thead>"+(t.isRTL?n.reverse():n).join("")+"</thead>"},C=function(t,e,n,i,a){var o,s,r,h,l,d=t._o,u=n===d.minYear,f=n===d.maxYear,g='<div class="pika-title">',m=!0,p=!0;for(r=[],o=0;12>o;o++)r.push('<option value="'+(n===a?o-e:12+o-e)+'"'+(o===i?" selected":"")+(u&&o<d.minMonth||f&&o>d.maxMonth?"disabled":"")+">"+d.i18n.months[o]+"</option>");for(h='<div class="pika-label">'+d.i18n.months[i]+'<select class="pika-select pika-select-month" tabindex="-1">'+r.join("")+"</select></div>",c(d.yearRange)?(o=d.yearRange[0],s=d.yearRange[1]+1):(o=n-d.yearRange,s=1+n+d.yearRange),r=[];s>o&&o<=d.maxYear;o++)o>=d.minYear&&r.push('<option value="'+o+'"'+(o===n?" selected":"")+">"+o+"</option>");return l='<div class="pika-label">'+n+d.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+r.join("")+"</select></div>",g+=d.showMonthAfterYear?l+h:h+l,u&&(0===i||d.minMonth>=i)&&(m=!1),f&&(11===i||d.maxMonth<=i)&&(p=!1),0===e&&(g+='<button class="pika-prev'+(m?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),e===t._o.numberOfMonths-1&&(g+='<button class="pika-next'+(p?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),g+="</div>"},T=function(t,e){return'<table cellpadding="0" cellspacing="0" class="pika-table">'+N(t)+x(e)+"</table>"},E=function(s){var r=this,h=r.config(s);r._onMouseDown=function(t){if(r._v){t=t||window.event;var e=t.target||t.srcElement;if(e)if(l(e,"is-disabled")||(l(e,"pika-button")&&!l(e,"is-empty")?(r.setDate(new Date(e.getAttribute("data-pika-year"),e.getAttribute("data-pika-month"),e.getAttribute("data-pika-day"))),h.bound&&a(function(){r.hide(),h.field&&h.field.blur()},100)):l(e,"pika-prev")?r.prevMonth():l(e,"pika-next")&&r.nextMonth()),l(e,"pika-select"))r._c=!0;else{if(!t.preventDefault)return t.returnValue=!1,!1;t.preventDefault()}}},r._onChange=function(t){t=t||window.event;var e=t.target||t.srcElement;e&&(l(e,"pika-select-month")?r.gotoMonth(e.value):l(e,"pika-select-year")&&r.gotoYear(e.value))},r._onInputChange=function(n){var i;n.firedBy!==r&&(e?(i=t(h.field.value,h.format),i=i&&i.isValid()?i.toDate():null):i=new Date(Date.parse(h.field.value)),f(i)&&r.setDate(i),r._v||r.show())},r._onInputFocus=function(){r.show()},r._onInputClick=function(){r.show()},r._onInputBlur=function(){var t=i.activeElement;do if(l(t,"pika-single"))return;while(t=t.parentNode);r._c||(r._b=a(function(){r.hide()},50)),r._c=!1},r._onClick=function(t){t=t||window.event;var e=t.target||t.srcElement,i=e;if(e){!n&&l(e,"pika-select")&&(e.onchange||(e.setAttribute("onchange","return;"),o(e,"change",r._onChange)));do if(l(i,"pika-single")||i===h.trigger)return;while(i=i.parentNode);r._v&&e!==h.trigger&&i!==h.trigger&&r.hide()}},r.el=i.createElement("div"),r.el.className="pika-single"+(h.isRTL?" is-rtl":"")+(h.theme?" "+h.theme:""),o(r.el,"mousedown",r._onMouseDown,!0),o(r.el,"touchend",r._onMouseDown,!0),o(r.el,"change",r._onChange),h.field&&(h.container?h.container.appendChild(r.el):h.bound?i.body.appendChild(r.el):h.field.parentNode.insertBefore(r.el,h.field.nextSibling),o(h.field,"change",r._onInputChange),h.defaultDate||(e&&h.field.value?h.defaultDate=t(h.field.value,h.format).toDate():h.defaultDate=new Date(Date.parse(h.field.value)),h.setDefaultDate=!0));var d=h.defaultDate;f(d)?h.setDefaultDate?r.setDate(d,!0):r.gotoDate(d):r.gotoDate(new Date),h.bound?(this.hide(),r.el.className+=" is-bound",o(h.trigger,"click",r._onInputClick),o(h.trigger,"focus",r._onInputFocus),o(h.trigger,"blur",r._onInputBlur)):this.show()};return E.prototype={config:function(t){this._o||(this._o=D({},b,!0));var e=D(this._o,t,!0);e.isRTL=!!e.isRTL,e.field=e.field&&e.field.nodeName?e.field:null,e.theme="string"==typeof e.theme&&e.theme?e.theme:null,e.bound=!!(void 0!==e.bound?e.field&&e.bound:e.field),e.trigger=e.trigger&&e.trigger.nodeName?e.trigger:e.field,e.disableWeekends=!!e.disableWeekends,e.disableDayFn="function"==typeof e.disableDayFn?e.disableDayFn:null;var n=parseInt(e.numberOfMonths,10)||1;if(e.numberOfMonths=n>4?4:n,f(e.minDate)||(e.minDate=!1),f(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate<e.minDate&&(e.maxDate=e.minDate=!1),e.minDate&&this.setMinDate(e.minDate),e.maxDate&&this.setMaxDate(e.maxDate),c(e.yearRange)){var i=(new Date).getFullYear()-10;e.yearRange[0]=parseInt(e.yearRange[0],10)||i,e.yearRange[1]=parseInt(e.yearRange[1],10)||i}else e.yearRange=Math.abs(parseInt(e.yearRange,10))||b.yearRange,e.yearRange>100&&(e.yearRange=100);return e},toString:function(n){return f(this._d)?e?t(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return e?t(this._d):null},setMoment:function(n,i){e&&t.isMoment(n)&&this.setDate(n.toDate(),i)},getDate:function(){return f(this._d)?new Date(this._d.getTime()):null},setDate:function(t,e){if(!t)return this._d=null,this._o.field&&(this._o.field.value="",r(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),f(t)){var n=this._o.minDate,i=this._o.maxDate;f(n)&&n>t?t=n:f(i)&&t>i&&(t=i),this._d=new Date(t.getTime()),y(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),r(this._o.field,"change",{firedBy:this})),e||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(t){var e=!0;if(f(t)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),i=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=t.getTime();i.setMonth(i.getMonth()+1),i.setDate(i.getDate()-1),e=a<n.getTime()||i.getTime()<a}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustCalendars:function(){this.calendars[0]=v(this.calendars[0]);for(var t=1;t<this._o.numberOfMonths;t++)this.calendars[t]=v({month:this.calendars[0].month+t,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())},setMinDate:function(t){y(t),this._o.minDate=t,this._o.minYear=t.getFullYear(),this._o.minMonth=t.getMonth(),this.draw()},setMaxDate:function(t){y(t),this._o.maxDate=t,this._o.maxYear=t.getFullYear(),this._o.maxMonth=t.getMonth(),this.draw()},setStartRange:function(t){this._o.startRange=t},setEndRange:function(t){this._o.endRange=t},draw:function(t){if(this._v||t){var e=this._o,n=e.minYear,i=e.maxYear,o=e.minMonth,s=e.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s));for(var h=0;h<e.numberOfMonths;h++)r+='<div class="pika-lendar">'+C(this,h,this.calendars[h].year,this.calendars[h].month,this.calendars[0].year)+this.render(this.calendars[h].year,this.calendars[h].month)+"</div>";if(this.el.innerHTML=r,e.bound&&"hidden"!==e.field.type&&a(function(){e.trigger.focus()},1),"function"==typeof this._o.onDraw){var l=this;a(function(){l._o.onDraw.call(l)},0)}}},adjustPosition:function(){var t,e,n,a,o,s,r,h,l,d;if(!this._o.container){if(this.el.style.position="absolute",t=this._o.trigger,e=t,n=this.el.offsetWidth,a=this.el.offsetHeight,o=window.innerWidth||i.documentElement.clientWidth,s=window.innerHeight||i.documentElement.clientHeight,r=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,"function"==typeof t.getBoundingClientRect)d=t.getBoundingClientRect(),h=d.left+window.pageXOffset,l=d.bottom+window.pageYOffset;else for(h=e.offsetLeft,l=e.offsetTop+e.offsetHeight;e=e.offsetParent;)h+=e.offsetLeft,l+=e.offsetTop;(this._o.reposition&&h+n>o||this._o.position.indexOf("right")>-1&&h-n+t.offsetWidth>0)&&(h=h-n+t.offsetWidth),(this._o.reposition&&l+a>s+r||this._o.position.indexOf("top")>-1&&l-a-t.offsetHeight>0)&&(l=l-a-t.offsetHeight),this.el.style.left=h+"px",this.el.style.top=l+"px"}},render:function(t,e){var n=this._o,i=new Date,a=p(t,e),o=new Date(t,e,1).getDay(),s=[],r=[];y(i),n.firstDay>0&&(o-=n.firstDay,0>o&&(o+=7));for(var h=a+o,l=h;l>7;)l-=7;h+=7-l;for(var d=0,u=0;h>d;d++){var c=new Date(t,e,1+(d-o)),m=f(this._d)?_(c,this._d):!1,D=_(c,i),v=o>d||d>=a+o,b=n.startRange&&_(n.startRange,c),w=n.endRange&&_(n.endRange,c),x=n.startRange&&n.endRange&&n.startRange<c&&c<n.endRange,N=n.minDate&&c<n.minDate||n.maxDate&&c>n.maxDate||n.disableWeekends&&g(c)||n.disableDayFn&&n.disableDayFn(c),C={day:1+(d-o),month:e,year:t,isSelected:m,isToday:D,isDisabled:N,isEmpty:v,isStartRange:b,isEndRange:w,isInRange:x};r.push(M(C)),7===++u&&(n.showWeekNumber&&r.unshift(k(d-o,e,t)),s.push(R(r,n.isRTL)),r=[],u=0)}return T(n,s)},isVisible:function(){return this._v},show:function(){this._v||(u(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(o(i,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var t=this._v;t!==!1&&(this._o.bound&&s(i,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",d(this.el,"is-hidden"),this._v=!1,void 0!==t&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"touchend",this._onMouseDown,!0),s(this.el,"change",this._onChange),this._o.field&&(s(this._o.field,"change",this._onInputChange),this._o.bound&&(s(this._o.trigger,"click",this._onInputClick),s(this._o.trigger,"focus",this._onInputFocus),s(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},E});</script><style>@media all {@charset "UTF-8";
|
||
|
||
/*!
|
||
* Pikaday
|
||
* Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/
|
||
*/
|
||
|
||
.pika-single {
|
||
z-index: 9999;
|
||
display: block;
|
||
position: relative;
|
||
color: #333;
|
||
background: #fff;
|
||
border: 1px solid #ccc;
|
||
border-bottom-color: #bbb;
|
||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||
}
|
||
|
||
/*
|
||
clear child float (pika-lendar), using the famous micro clearfix hack
|
||
http://nicolasgallagher.com/micro-clearfix-hack/
|
||
*/
|
||
.pika-single:before,
|
||
.pika-single:after {
|
||
content: " ";
|
||
display: table;
|
||
}
|
||
.pika-single:after { clear: both }
|
||
.pika-single { *zoom: 1 }
|
||
|
||
.pika-single.is-hidden {
|
||
display: none;
|
||
}
|
||
|
||
.pika-single.is-bound {
|
||
position: absolute;
|
||
box-shadow: 0 5px 15px -5px rgba(0,0,0,.5);
|
||
}
|
||
|
||
.pika-lendar {
|
||
float: left;
|
||
width: 240px;
|
||
margin: 8px;
|
||
}
|
||
|
||
.pika-title {
|
||
position: relative;
|
||
text-align: center;
|
||
}
|
||
|
||
.pika-label {
|
||
display: inline-block;
|
||
*display: inline;
|
||
position: relative;
|
||
z-index: 9999;
|
||
overflow: hidden;
|
||
margin: 0;
|
||
padding: 5px 3px;
|
||
font-size: 14px;
|
||
line-height: 20px;
|
||
font-weight: bold;
|
||
background-color: #fff;
|
||
}
|
||
.pika-title select {
|
||
cursor: pointer;
|
||
position: absolute;
|
||
z-index: 9998;
|
||
margin: 0;
|
||
left: 0;
|
||
top: 5px;
|
||
filter: alpha(opacity=0);
|
||
opacity: 0;
|
||
}
|
||
|
||
.pika-prev,
|
||
.pika-next {
|
||
display: block;
|
||
cursor: pointer;
|
||
position: relative;
|
||
outline: none;
|
||
border: 0;
|
||
padding: 0;
|
||
width: 20px;
|
||
height: 30px;
|
||
/* hide text using text-indent trick, using width value (it's enough) */
|
||
text-indent: 20px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
background-color: transparent;
|
||
background-position: center center;
|
||
background-repeat: no-repeat;
|
||
background-size: 75% 75%;
|
||
opacity: .5;
|
||
*position: absolute;
|
||
*top: 0;
|
||
}
|
||
|
||
.pika-prev:hover,
|
||
.pika-next:hover {
|
||
opacity: 1;
|
||
}
|
||
|
||
.pika-prev,
|
||
.is-rtl .pika-next {
|
||
float: left;
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==");
|
||
*left: 0;
|
||
}
|
||
|
||
.pika-next,
|
||
.is-rtl .pika-prev {
|
||
float: right;
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=");
|
||
*right: 0;
|
||
}
|
||
|
||
.pika-prev.is-disabled,
|
||
.pika-next.is-disabled {
|
||
cursor: default;
|
||
opacity: .2;
|
||
}
|
||
|
||
.pika-select {
|
||
display: inline-block;
|
||
*display: inline;
|
||
}
|
||
|
||
.pika-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
border: 0;
|
||
}
|
||
|
||
.pika-table th,
|
||
.pika-table td {
|
||
width: 14.285714285714286%;
|
||
padding: 0;
|
||
}
|
||
|
||
.pika-table th {
|
||
color: #999;
|
||
font-size: 12px;
|
||
line-height: 25px;
|
||
font-weight: bold;
|
||
text-align: center;
|
||
}
|
||
|
||
.pika-button {
|
||
cursor: pointer;
|
||
display: block;
|
||
box-sizing: border-box;
|
||
-moz-box-sizing: border-box;
|
||
outline: none;
|
||
border: 0;
|
||
margin: 0;
|
||
width: 100%;
|
||
padding: 5px;
|
||
color: #666;
|
||
font-size: 12px;
|
||
line-height: 15px;
|
||
text-align: right;
|
||
background: #f5f5f5;
|
||
}
|
||
|
||
.pika-week {
|
||
font-size: 11px;
|
||
color: #999;
|
||
}
|
||
|
||
.is-today .pika-button {
|
||
color: #33aaff;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.is-selected .pika-button {
|
||
color: #fff;
|
||
font-weight: bold;
|
||
background: #33aaff;
|
||
box-shadow: inset 0 1px 3px #178fe5;
|
||
border-radius: 3px;
|
||
}
|
||
|
||
.is-inrange .pika-button {
|
||
background: #D5E9F7;
|
||
}
|
||
|
||
.is-startrange .pika-button {
|
||
color: #fff;
|
||
background: #6CB31D;
|
||
box-shadow: none;
|
||
border-radius: 3px;
|
||
}
|
||
|
||
.is-endrange .pika-button {
|
||
color: #fff;
|
||
background: #33aaff;
|
||
box-shadow: none;
|
||
border-radius: 3px;
|
||
}
|
||
|
||
.is-disabled .pika-button {
|
||
pointer-events: none;
|
||
cursor: default;
|
||
color: #999;
|
||
opacity: .3;
|
||
}
|
||
|
||
.pika-button:hover {
|
||
color: #fff;
|
||
background: #ff8000;
|
||
box-shadow: none;
|
||
border-radius: 3px;
|
||
}
|
||
|
||
/* styling for abbr */
|
||
.pika-table abbr {
|
||
border-bottom: none;
|
||
cursor: help;
|
||
}
|
||
|
||
}</style><script>!function(){"use strict";Polymer.IronJsonpLibraryBehavior={properties:{libraryLoaded:{type:Boolean,value:!1,notify:!0,readOnly:!0},libraryErrorMessage:{type:String,value:null,notify:!0,readOnly:!0}},observers:["_libraryUrlChanged(libraryUrl)"],_libraryUrlChanged:function(r){this._isReady&&this.libraryUrl&&this._loadLibrary()},_libraryLoadCallback:function(r,i){r?(console.warn("Library load failed:",r.message),this._setLibraryErrorMessage(r.message)):(this._setLibraryErrorMessage(null),this._setLibraryLoaded(!0),this.notifyEvent&&this.fire(this.notifyEvent,i))},_loadLibrary:function(){r.require(this.libraryUrl,this._libraryLoadCallback.bind(this),this.callbackName)},ready:function(){this._isReady=!0,this.libraryUrl&&this._loadLibrary()}};var r={apiMap:{},require:function(r,t,e){var a=this.nameFromUrl(r);this.apiMap[a]||(this.apiMap[a]=new i(a,r,e)),this.apiMap[a].requestNotify(t)},nameFromUrl:function(r){return r.replace(/[\:\/\%\?\&\.\=\-\,]/g,"_")+"_api"}},i=function(r,i,t){if(this.notifiers=[],!t){if(!(i.indexOf(this.callbackMacro)>=0))return void(this.error=new Error("IronJsonpLibraryBehavior a %%callback%% parameter is required in libraryUrl"));t=r+"_loaded",i=i.replace(this.callbackMacro,t)}this.callbackName=t,window[this.callbackName]=this.success.bind(this),this.addScript(i)};i.prototype={callbackMacro:"%%callback%%",loaded:!1,addScript:function(r){var i=document.createElement("script");i.src=r,i.onerror=this.handleError.bind(this);var t=document.querySelector("script")||document.body;t.parentNode.insertBefore(i,t),this.script=i},removeScript:function(){this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.script=null},handleError:function(r){this.error=new Error("Library failed to load"),this.notifyAll(),this.cleanup()},success:function(){this.loaded=!0,this.result=Array.prototype.slice.call(arguments),this.notifyAll(),this.cleanup()},cleanup:function(){delete window[this.callbackName]},notifyAll:function(){this.notifiers.forEach(function(r){r(this.error,this.result)}.bind(this)),this.notifiers=[]},requestNotify:function(r){this.loaded||this.error?r(this.error,this.result):this.notifiers.push(r)}}}();</script><script>Polymer({is:"iron-jsonp-library",behaviors:[Polymer.IronJsonpLibraryBehavior],properties:{libraryUrl:String,callbackName:String,notifyEvent:String}});</script><script>Polymer({is:"google-legacy-loader",behaviors:[Polymer.IronJsonpLibraryBehavior],properties:{libraryUrl:{type:String,value:"https://www.google.com/jsapi?callback=%%callback%%"},notifyEvent:{type:String,value:"api-load"}},get api(){return google}});</script><script>!function(t,e,i){var n=t.L,o={};o.version="0.7.7","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?void e():s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in e)o.extend(o.DomUtil,{disableTextSelection:function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)}});else{var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(i){var t=e.documentElement.style;this._userSelect=t[i],t[i]="none"}},enableTextSelection:function(){i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}o.extend(o.DomUtil,{disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e,n){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,n!==i&&(this.alt=parseFloat(n))},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){if(!t)return!1;t=o.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=o.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n);while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,
|
||
transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-(1/0));for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=this._getTileSize(),o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;e.detectRetina&&o.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return n.html!==!1?i.innerHTML=n.html:i.innerHTML="",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="×",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.disableScrollPropagation(this._contentNode),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),"off"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this._map&&this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),
|
||
this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||"evenodd")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l,u=this.options.weight/2;for(o.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,s=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],"function"==typeof n?s[a]=n.bind(h):s[a]=n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);
|
||
case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0;break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],n(t)};if(t[a+"touchstart"+s]=h,t.addEventListener(this.POINTER_DOWN,h,!1),!this._pointerDocumentListener){var l=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i<this.options.minZoom)&&this._clearBgBuffer(),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document);</script><script>"use strict";var leafletMap=leafletMap||{};leafletMap.LeafletPopupContent={attached:function(){MutationObserver&&!this.observer_&&(this.observer_=new MutationObserver(this.updatePopupContent.bind(this)),this.observer_.observe(this,{childList:!0,characterData:!0,attributes:!0,subtree:!0}))},updatePopupContent:function(){if(this.feature){this.feature.unbindPopup();var e=Polymer.dom(this).innerHTML.replace(/<\/?leaflet-point[^>]*>/g,"").trim();e&&this.feature.bindPopup(e)}},detached:function(){this.observer_&&this.observer_.disconnect()}};</script><script>"use strict";var leafletMap=leafletMap||{};window.leafletMap.LeafletPath={properties:{noStroke:{type:Boolean,value:!1},color:{type:String,value:"#03f"},weight:{type:Number,value:5},opacity:{type:Number,value:.5},fill:{type:Boolean,value:null},fillColor:{type:String,value:null},fillOpacity:{type:Number,value:.2},dashArray:{type:String,value:null},lineCap:{type:String,value:null},lineJoin:{type:String,value:null},noClickable:{type:Boolean,value:!1},pointerEvents:{type:String,value:null},className:{type:String,value:""}},getPathOptions:function(){return{stroke:!this.noStroke,color:this.color,weight:this.weight,opacity:this.opacity,fill:this.fill,fillColor:this.fillColor,fillOpacity:this.fillOpacity,dashArray:this.dashArray,lineCap:this.lineCap,lineJoin:this.lineJoin,clickable:!this.noClickable,pointerEvents:this.pointerEvents,className:this.className}}},window.leafletMap.LeafletPointContent={attached:function(){MutationObserver&&!this.observer_&&(this.observer_=new MutationObserver(this.updatePointContent.bind(this)),this.observer_.observe(this,{childList:!0,characterData:!0,attributes:!0,subtree:!0}))},updatePointContent:function(){if(this.feature){var t,e=[],i=this.children;for(t=0;t<i.length;t++)"leaflet-point"==i[t].localName&&e.push(L.latLng(i[t].getAttribute("latitude"),i[t].getAttribute("longitude")));this.feature.setLatLngs(e)}},detached:function(){this.observer_&&this.observer_.disconnect()}};</script><script>"use strict";var leafletMap=leafletMap||{};window.leafletMap.LeafletILayer={isLayer:function(){return!0}},window.leafletMap.LeafletTileLayer={properties:{minZoom:{type:Number,value:0},maxZoom:{type:Number,value:18},maxNativeZoom:{type:Number,value:null},tileSize:{type:Number,value:256},subdomains:{type:String,value:"abc"},errorTileUrl:{type:String,value:""},attribution:{type:String,value:""},tms:{type:Number,value:!1},continuousWorld:{type:Boolean,value:!1},noWrap:{type:Boolean,value:!1},zoomOffset:{type:Number,value:0},zoomReverse:{type:Boolean,value:!1},opacity:{type:Number,value:1,observer:"_opacityChanged"},zIndex:{type:Number,value:null,observer:"_zIndexChanged"},detectRetina:{type:Boolean,value:!1},reuseTiles:{type:Boolean,value:!1}},_opacityChanged:function(){this.layer&&this.layer.setOpacity(this.opacity)},_zIndexChanged:function(){this.layer&&this.layer.setZIndex(this.zIndex)},detached:function(){this.container&&this.layer&&this.container.removeLayer(this.layer)}};</script><style>/* required styles */
|
||
|
||
.leaflet-map-pane,
|
||
.leaflet-tile,
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow,
|
||
.leaflet-tile-pane,
|
||
.leaflet-tile-container,
|
||
.leaflet-overlay-pane,
|
||
.leaflet-shadow-pane,
|
||
.leaflet-marker-pane,
|
||
.leaflet-popup-pane,
|
||
.leaflet-overlay-pane svg,
|
||
.leaflet-zoom-box,
|
||
.leaflet-image-layer,
|
||
.leaflet-layer {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
}
|
||
.leaflet-container {
|
||
overflow: hidden;
|
||
-ms-touch-action: none;
|
||
touch-action: none;
|
||
}
|
||
.leaflet-tile,
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow {
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
user-select: none;
|
||
-webkit-user-drag: none;
|
||
}
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow {
|
||
display: block;
|
||
}
|
||
/* map is broken in FF if you have max-width: 100% on tiles */
|
||
.leaflet-container img {
|
||
max-width: none !important;
|
||
}
|
||
/* stupid Android 2 doesn't understand "max-width: none" properly */
|
||
.leaflet-container img.leaflet-image-layer {
|
||
max-width: 15000px !important;
|
||
}
|
||
.leaflet-tile {
|
||
filter: inherit;
|
||
visibility: hidden;
|
||
}
|
||
.leaflet-tile-loaded {
|
||
visibility: inherit;
|
||
}
|
||
.leaflet-zoom-box {
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||
.leaflet-overlay-pane svg {
|
||
-moz-user-select: none;
|
||
}
|
||
|
||
.leaflet-tile-pane { z-index: 2; }
|
||
.leaflet-objects-pane { z-index: 3; }
|
||
.leaflet-overlay-pane { z-index: 4; }
|
||
.leaflet-shadow-pane { z-index: 5; }
|
||
.leaflet-marker-pane { z-index: 6; }
|
||
.leaflet-popup-pane { z-index: 7; }
|
||
|
||
.leaflet-vml-shape {
|
||
width: 1px;
|
||
height: 1px;
|
||
}
|
||
.lvml {
|
||
behavior: url("#default#VML");
|
||
display: inline-block;
|
||
position: absolute;
|
||
}
|
||
|
||
|
||
/* control positioning */
|
||
|
||
.leaflet-control {
|
||
position: relative;
|
||
z-index: 7;
|
||
pointer-events: auto;
|
||
}
|
||
.leaflet-top,
|
||
.leaflet-bottom {
|
||
position: absolute;
|
||
z-index: 1000;
|
||
pointer-events: none;
|
||
}
|
||
.leaflet-top {
|
||
top: 0;
|
||
}
|
||
.leaflet-right {
|
||
right: 0;
|
||
}
|
||
.leaflet-bottom {
|
||
bottom: 0;
|
||
}
|
||
.leaflet-left {
|
||
left: 0;
|
||
}
|
||
.leaflet-control {
|
||
float: left;
|
||
clear: both;
|
||
}
|
||
.leaflet-right .leaflet-control {
|
||
float: right;
|
||
}
|
||
.leaflet-top .leaflet-control {
|
||
margin-top: 10px;
|
||
}
|
||
.leaflet-bottom .leaflet-control {
|
||
margin-bottom: 10px;
|
||
}
|
||
.leaflet-left .leaflet-control {
|
||
margin-left: 10px;
|
||
}
|
||
.leaflet-right .leaflet-control {
|
||
margin-right: 10px;
|
||
}
|
||
|
||
|
||
/* zoom and fade animations */
|
||
|
||
.leaflet-fade-anim .leaflet-tile,
|
||
.leaflet-fade-anim .leaflet-popup {
|
||
opacity: 0;
|
||
-webkit-transition: opacity 0.2s linear;
|
||
-moz-transition: opacity 0.2s linear;
|
||
-o-transition: opacity 0.2s linear;
|
||
transition: opacity 0.2s linear;
|
||
}
|
||
.leaflet-fade-anim .leaflet-tile-loaded,
|
||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||
opacity: 1;
|
||
}
|
||
|
||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
}
|
||
.leaflet-zoom-anim .leaflet-tile,
|
||
.leaflet-pan-anim .leaflet-tile,
|
||
.leaflet-touching .leaflet-zoom-animated {
|
||
-webkit-transition: none;
|
||
-moz-transition: none;
|
||
-o-transition: none;
|
||
transition: none;
|
||
}
|
||
|
||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||
visibility: hidden;
|
||
}
|
||
|
||
|
||
/* cursors */
|
||
|
||
.leaflet-clickable {
|
||
cursor: pointer;
|
||
}
|
||
.leaflet-container {
|
||
cursor: -webkit-grab;
|
||
cursor: -moz-grab;
|
||
}
|
||
.leaflet-popup-pane,
|
||
.leaflet-control {
|
||
cursor: auto;
|
||
}
|
||
.leaflet-dragging .leaflet-container,
|
||
.leaflet-dragging .leaflet-clickable {
|
||
cursor: move;
|
||
cursor: -webkit-grabbing;
|
||
cursor: -moz-grabbing;
|
||
}
|
||
|
||
|
||
/* visual tweaks */
|
||
|
||
.leaflet-container {
|
||
background: #ddd;
|
||
outline: 0;
|
||
}
|
||
.leaflet-container a {
|
||
color: #0078A8;
|
||
}
|
||
.leaflet-container a.leaflet-active {
|
||
outline: 2px solid orange;
|
||
}
|
||
.leaflet-zoom-box {
|
||
border: 2px dotted #38f;
|
||
background: rgba(255,255,255,0.5);
|
||
}
|
||
|
||
|
||
/* general typography */
|
||
.leaflet-container {
|
||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||
}
|
||
|
||
|
||
/* general toolbar styles */
|
||
|
||
.leaflet-bar {
|
||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||
border-radius: 4px;
|
||
}
|
||
.leaflet-bar a,
|
||
.leaflet-bar a:hover {
|
||
background-color: #fff;
|
||
border-bottom: 1px solid #ccc;
|
||
width: 26px;
|
||
height: 26px;
|
||
line-height: 26px;
|
||
display: block;
|
||
text-align: center;
|
||
text-decoration: none;
|
||
color: black;
|
||
}
|
||
.leaflet-bar a,
|
||
.leaflet-control-layers-toggle {
|
||
background-position: 50% 50%;
|
||
background-repeat: no-repeat;
|
||
display: block;
|
||
}
|
||
.leaflet-bar a:hover {
|
||
background-color: #f4f4f4;
|
||
}
|
||
.leaflet-bar a:first-child {
|
||
border-top-left-radius: 4px;
|
||
border-top-right-radius: 4px;
|
||
}
|
||
.leaflet-bar a:last-child {
|
||
border-bottom-left-radius: 4px;
|
||
border-bottom-right-radius: 4px;
|
||
border-bottom: none;
|
||
}
|
||
.leaflet-bar a.leaflet-disabled {
|
||
cursor: default;
|
||
background-color: #f4f4f4;
|
||
color: #bbb;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-bar a {
|
||
width: 30px;
|
||
height: 30px;
|
||
line-height: 30px;
|
||
}
|
||
|
||
|
||
/* zoom control */
|
||
|
||
.leaflet-control-zoom-in,
|
||
.leaflet-control-zoom-out {
|
||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
||
text-indent: 1px;
|
||
}
|
||
.leaflet-control-zoom-out {
|
||
font-size: 20px;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-control-zoom-in {
|
||
font-size: 22px;
|
||
}
|
||
.leaflet-touch .leaflet-control-zoom-out {
|
||
font-size: 24px;
|
||
}
|
||
|
||
|
||
/* layers control */
|
||
|
||
.leaflet-control-layers {
|
||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
||
background: #fff;
|
||
border-radius: 5px;
|
||
}
|
||
.leaflet-control-layers-toggle {
|
||
background-image: url("../bower_components/leaflet/dist/images/layers.png");
|
||
width: 36px;
|
||
height: 36px;
|
||
}
|
||
.leaflet-retina .leaflet-control-layers-toggle {
|
||
background-image: url("../bower_components/leaflet/dist/images/layers-2x.png");
|
||
background-size: 26px 26px;
|
||
}
|
||
.leaflet-touch .leaflet-control-layers-toggle {
|
||
width: 44px;
|
||
height: 44px;
|
||
}
|
||
.leaflet-control-layers .leaflet-control-layers-list,
|
||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||
display: none;
|
||
}
|
||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||
display: block;
|
||
position: relative;
|
||
}
|
||
.leaflet-control-layers-expanded {
|
||
padding: 6px 10px 6px 6px;
|
||
color: #333;
|
||
background: #fff;
|
||
}
|
||
.leaflet-control-layers-selector {
|
||
margin-top: 2px;
|
||
position: relative;
|
||
top: 1px;
|
||
}
|
||
.leaflet-control-layers label {
|
||
display: block;
|
||
}
|
||
.leaflet-control-layers-separator {
|
||
height: 0;
|
||
border-top: 1px solid #ddd;
|
||
margin: 5px -10px 5px -6px;
|
||
}
|
||
|
||
|
||
/* attribution and scale controls */
|
||
|
||
.leaflet-container .leaflet-control-attribution {
|
||
background: #fff;
|
||
background: rgba(255, 255, 255, 0.7);
|
||
margin: 0;
|
||
}
|
||
.leaflet-control-attribution,
|
||
.leaflet-control-scale-line {
|
||
padding: 0 5px;
|
||
color: #333;
|
||
}
|
||
.leaflet-control-attribution a {
|
||
text-decoration: none;
|
||
}
|
||
.leaflet-control-attribution a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
.leaflet-container .leaflet-control-attribution,
|
||
.leaflet-container .leaflet-control-scale {
|
||
font-size: 11px;
|
||
}
|
||
.leaflet-left .leaflet-control-scale {
|
||
margin-left: 5px;
|
||
}
|
||
.leaflet-bottom .leaflet-control-scale {
|
||
margin-bottom: 5px;
|
||
}
|
||
.leaflet-control-scale-line {
|
||
border: 2px solid #777;
|
||
border-top: none;
|
||
line-height: 1.1;
|
||
padding: 2px 5px 1px;
|
||
font-size: 11px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
-moz-box-sizing: content-box;
|
||
box-sizing: content-box;
|
||
|
||
background: #fff;
|
||
background: rgba(255, 255, 255, 0.5);
|
||
}
|
||
.leaflet-control-scale-line:not(:first-child) {
|
||
border-top: 2px solid #777;
|
||
border-bottom: none;
|
||
margin-top: -2px;
|
||
}
|
||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||
border-bottom: 2px solid #777;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-control-attribution,
|
||
.leaflet-touch .leaflet-control-layers,
|
||
.leaflet-touch .leaflet-bar {
|
||
box-shadow: none;
|
||
}
|
||
.leaflet-touch .leaflet-control-layers,
|
||
.leaflet-touch .leaflet-bar {
|
||
border: 2px solid rgba(0,0,0,0.2);
|
||
background-clip: padding-box;
|
||
}
|
||
|
||
|
||
/* popup */
|
||
|
||
.leaflet-popup {
|
||
position: absolute;
|
||
text-align: center;
|
||
}
|
||
.leaflet-popup-content-wrapper {
|
||
padding: 1px;
|
||
text-align: left;
|
||
border-radius: 12px;
|
||
}
|
||
.leaflet-popup-content {
|
||
margin: 13px 19px;
|
||
line-height: 1.4;
|
||
}
|
||
.leaflet-popup-content p {
|
||
margin: 18px 0;
|
||
}
|
||
.leaflet-popup-tip-container {
|
||
margin: 0 auto;
|
||
width: 40px;
|
||
height: 20px;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
.leaflet-popup-tip {
|
||
width: 17px;
|
||
height: 17px;
|
||
padding: 1px;
|
||
|
||
margin: -10px auto 0;
|
||
|
||
-webkit-transform: rotate(45deg);
|
||
-moz-transform: rotate(45deg);
|
||
-ms-transform: rotate(45deg);
|
||
-o-transform: rotate(45deg);
|
||
transform: rotate(45deg);
|
||
}
|
||
.leaflet-popup-content-wrapper,
|
||
.leaflet-popup-tip {
|
||
background: white;
|
||
|
||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||
}
|
||
.leaflet-container a.leaflet-popup-close-button {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
padding: 4px 4px 0 0;
|
||
text-align: center;
|
||
width: 18px;
|
||
height: 14px;
|
||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||
color: #c3c3c3;
|
||
text-decoration: none;
|
||
font-weight: bold;
|
||
background: transparent;
|
||
}
|
||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||
color: #999;
|
||
}
|
||
.leaflet-popup-scrolled {
|
||
overflow: auto;
|
||
border-bottom: 1px solid #ddd;
|
||
border-top: 1px solid #ddd;
|
||
}
|
||
|
||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||
zoom: 1;
|
||
}
|
||
.leaflet-oldie .leaflet-popup-tip {
|
||
width: 24px;
|
||
margin: 0 auto;
|
||
|
||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||
}
|
||
.leaflet-oldie .leaflet-popup-tip-container {
|
||
margin-top: -1px;
|
||
}
|
||
|
||
.leaflet-oldie .leaflet-control-zoom,
|
||
.leaflet-oldie .leaflet-control-layers,
|
||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
||
.leaflet-oldie .leaflet-popup-tip {
|
||
border: 1px solid #999;
|
||
}
|
||
|
||
|
||
/* div icon */
|
||
|
||
.leaflet-div-icon {
|
||
background: #fff;
|
||
border: 1px solid #666;
|
||
}</style><style>/* Otherwise they go through overlays. */
|
||
.leaflet-top, .leaflet-bottom {
|
||
z-index: 0;
|
||
}</style><script>Polymer.IronMenuBehaviorImpl={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String}},hostAttributes:{role:"menu",tabindex:"0"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(e){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._setFocusedItem(t),Polymer.IronMultiSelectableBehaviorImpl.select.apply(this,arguments))},_resetTabindices:function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(t){t.setAttribute("tabindex",t===e?"0":"-1")},this)},_updateMultiselectable:function(e){e?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(e){for(var t,s=0;t=this.items[s];s++){var i=this.attrForItemTitle||"textContent",o=t[i]||t.getAttribute(i);if(o&&o.trim().charAt(0).toLowerCase()===String.fromCharCode(e.keyCode).toLowerCase()){this._setFocusedItem(t);break}}},_focusPrevious:function(){var e=this.items.length,t=(Number(this.indexOf(this.focusedItem))-1+e)%e;this._setFocusedItem(this.items[t])},_focusNext:function(){var e=(Number(this.indexOf(this.focusedItem))+1)%this.items.length;this._setFocusedItem(this.items[e])},_applySelection:function(e,t){t?e.setAttribute("aria-selected","true"):e.removeAttribute("aria-selected"),Polymer.IronSelectableBehavior._applySelection.apply(this,arguments)},_focusedItemChanged:function(e,t){t&&t.setAttribute("tabindex","-1"),e&&(e.setAttribute("tabindex","0"),e.focus())},_onIronItemsChanged:function(e){var t,s,i=e.detail;for(s=0;s<i.length;++s)if(t=i[s],t.addedNodes.length){this._resetTabindices();break}},_onShiftTabDown:function(e){var t;Polymer.IronMenuBehaviorImpl._shiftTabPressed=!0,t=this.getAttribute("tabindex"),this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1},1)},_onFocus:function(e){Polymer.IronMenuBehaviorImpl._shiftTabPressed||(this.blur(),this._setFocusedItem(null),this._defaultFocusAsync=this.async(function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;e?this._setFocusedItem(e):this._setFocusedItem(this.items[0])},100))},_onUpKey:function(e){this._focusPrevious()},_onDownKey:function(e){this._focusNext()},_onEscKey:function(e){this.focusedItem.blur()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down esc")||this._focusWithKeyboardEvent(e)}},Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1,Polymer.IronMenuBehavior=[Polymer.IronMultiSelectableBehavior,Polymer.IronA11yKeysBehavior,Polymer.IronMenuBehaviorImpl];</script><script>Polymer.IronFitBehavior={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){var t;return t=this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){var t;return t=this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){var t;return t=this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){var t;return t=this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},attached:function(){this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):this.fit())},fit:function(){this._discoverInfo(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var t=window.getComputedStyle(this),i=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||""},positionedBy:{vertically:"auto"!==t.top?"top":"auto"!==t.bottom?"bottom":null,horizontally:"auto"!==t.left?"left":"auto"!==t.right?"right":null,css:t.position},sizedBy:{height:"none"!==i.maxHeight,width:"none"!==i.maxWidth},margin:{top:parseInt(t.marginTop,10)||0,right:parseInt(t.marginRight,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0}}}},resetFit:function(){this._fitInfo&&this._fitInfo.sizedBy.height||(this.sizingTarget.style.maxHeight="",this.style.top=this._fitInfo?this._fitInfo.inlineStyle.top:""),this._fitInfo&&this._fitInfo.sizedBy.width||(this.sizingTarget.style.maxWidth="",this.style.left=this._fitInfo?this._fitInfo.inlineStyle.left:""),this._fitInfo&&(this.style.position=this._fitInfo.positionedBy.css),this._fitInfo=null},refit:function(){this.resetFit(),this.fit()},constrain:function(){var t=this._fitInfo;this._fitInfo.positionedBy.vertically||(this.style.top="0px"),this._fitInfo.positionedBy.horizontally||(this.style.left="0px"),this._fitInfo.positionedBy.vertically&&this._fitInfo.positionedBy.horizontally||(this.style.position="fixed"),this.sizingTarget.style.boxSizing="border-box";var i=this.getBoundingClientRect();t.sizedBy.height||this._sizeDimension(i,t.positionedBy.vertically,"top","bottom","Height"),t.sizedBy.width||this._sizeDimension(i,t.positionedBy.horizontally,"left","right","Width")},_sizeDimension:function(t,i,n,o,e){var s=this._fitInfo,h="Width"===e?this._fitWidth:this._fitHeight,f=i===o,l=f?h-t[o]:t[n],r=s.margin[f?n:o],a="offset"+e,g=this[a]-this.sizingTarget[a];this.sizingTarget.style["max"+e]=h-r-l-g+"px"},center:function(){if(this._fitInfo.positionedBy.vertically&&this._fitInfo.positionedBy.horizontally||(this.style.position="fixed"),!this._fitInfo.positionedBy.vertically){var t=(this._fitHeight-this.offsetHeight)/2+this._fitTop;t-=this._fitInfo.margin.top,this.style.top=t+"px"}if(!this._fitInfo.positionedBy.horizontally){var i=(this._fitWidth-this.offsetWidth)/2+this._fitLeft;i-=this._fitInfo.margin.left,this.style.left=i+"px"}}};</script><script>Polymer.IronOverlayManager=function(){function n(n){var r=o();f.push(n);var t=o();r>=t&&e(n,r)}function r(n){var r=f.indexOf(n);r>=0&&(f.splice(r,1),t(n,""))}function e(n,r){t(n,r+2)}function t(n,r){n.style.zIndex=r}function a(){for(var n=f.length-1;f[n]&&!f[n].opened;)--n;return f[n]}function o(){var n,r=a();if(r){var e=window.getComputedStyle(r).zIndex;isNaN(e)||(n=Number(e))}return n||v}function u(){var n=a();n&&!n.transitioning&&n._applyFocus()}function i(n){if(n.opened)l.push(n);else{var r=l.indexOf(n);r>=0&&l.splice(r,1)}}function c(){return l}var f=[],v=10,l=[];return{addOverlay:n,removeOverlay:r,currentOverlay:a,currentOverlayZ:o,focusOverlay:u,trackBackdrop:i,getBackdrops:c}}();</script><script>Polymer.IronOverlayBehaviorImpl={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{type:Boolean,value:!1},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},_manager:{type:Object,value:Polymer.IronOverlayManager},_boundOnCaptureClick:{type:Function,value:function(){return this._onCaptureClick.bind(this)}},_boundOnCaptureKeydown:{type:Function,value:function(){return this._onCaptureKeydown.bind(this)}}},listeners:{tap:"_onClick","iron-resize":"_onIronResize"},get backdropElement(){return this._backdrop},get _focusNode(){return Polymer.dom(this).querySelector("[autofocus]")||this},registered:function(){this._backdrop=document.createElement("iron-overlay-backdrop")},ready:function(){this._ensureSetup(),this._callOpenedWhenReady&&this._openedChanged()},detached:function(){this.opened=!1,this._completeBackdrop(),this._manager.removeOverlay(this)},toggle:function(){this.opened=!this.opened},open:function(){this.opened=!0,this.closingReason={canceled:!1}},close:function(){this.opened=!1,this._setCanceled(!1)},cancel:function(){var e=this.fire("iron-overlay-canceled",void 0,{cancelable:!0});e.defaultPrevented||(this.opened=!1,this._setCanceled(!0))},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(){return this.opened?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this._overlaySetup?(this._openChangedAsync&&this.cancelAsync(this._openChangedAsync),this._toggleListeners(),this.opened&&this._prepareRenderOpened(),void(this._openChangedAsync=this.async(function(){this.style.display="",this.offsetWidth,this.opened?this._renderOpened():this._renderClosed(),this._openChangedAsync=null}))):void(this._callOpenedWhenReady=this.opened)},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_toggleListener:function(e,t,n,i,s){e?("tap"===n&&Polymer.Gestures.add(document,"tap",null),t.addEventListener(n,i,s)):("tap"===n&&Polymer.Gestures.remove(document,"tap",null),t.removeEventListener(n,i,s))},_toggleListeners:function(){this._toggleListenersAsync&&this.cancelAsync(this._toggleListenersAsync),this._toggleListenersAsync=this.async(function(){this._toggleListener(this.opened,document,"tap",this._boundOnCaptureClick,!0),this._toggleListener(this.opened,document,"keydown",this._boundOnCaptureKeydown,!0),this._toggleListenersAsync=null},1)},_prepareRenderOpened:function(){this._manager.addOverlay(this),this.withBackdrop&&(this.backdropElement.prepare(),this._manager.trackBackdrop(this)),this._preparePositioning(),this.fit(),this._finishPositioning()},_renderOpened:function(){this.withBackdrop&&this.backdropElement.open(),this._finishRenderOpened()},_renderClosed:function(){this.withBackdrop&&this.backdropElement.close(),this._finishRenderClosed()},_onTransitionend:function(e){e&&e.target!==this||(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_finishRenderOpened:function(){this.noAutoFocus||this._focusNode.focus(),this.fire("iron-overlay-opened"),this._squelchNextResize=!0,this.async(this.notifyResize)},_finishRenderClosed:function(){this.resetFit(),this.style.display="none",this._completeBackdrop(),this._manager.removeOverlay(this),this._focusNode.blur(),this._manager.focusOverlay(),this.fire("iron-overlay-closed",this.closingReason),this._squelchNextResize=!0,this.async(this.notifyResize)},_completeBackdrop:function(){this.withBackdrop&&(this._manager.trackBackdrop(this),this.backdropElement.complete())},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.style.transform=this.style.webkitTransform="",this.offsetWidth,this.style.transition=this.style.webkitTransition=""},_applyFocus:function(){this.opened?this.noAutoFocus||this._focusNode.focus():(this._focusNode.blur(),this._manager.focusOverlay())},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this._manager.currentOverlay()!=this||(this._cancelJob=this.async(function(){this.cancel()},10))},_onClick:function(e){this._cancelJob&&(this.cancelAsync(this._cancelJob),this._cancelJob=null)},_onCaptureKeydown:function(e){var t=27;this.noCancelOnEscKey||e.keyCode!==t||(this.cancel(),e.stopPropagation())},_onIronResize:function(){return this._squelchNextResize?void(this._squelchNextResize=!1):void(this.opened&&this.refit())}},Polymer.IronOverlayBehavior=[Polymer.IronFitBehavior,Polymer.IronResizableBehavior,Polymer.IronOverlayBehaviorImpl];</script><script>Polymer.NeonAnimationBehavior={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},registered:function(){new Polymer.IronMeta({type:"animation",key:this.is,value:this.constructor})},timingFromConfig:function(i){if(i.timing)for(var n in i.timing)this.animationTiming[n]=i.timing[n];return this.animationTiming},setPrefixedProperty:function(i,n,t){for(var r,e={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]},o=e[n],a=0;r=o[a];a++)i.style[r]=t;i.style[n]=t},complete:function(){}};</script><script>!function(a,b){b["true"]=a;var c={},d={},e={},f=null;!function(t){function e(t){if("number"==typeof t)return t;var e={};for(var i in t)e[i]=t[i];return e}function i(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear"}function n(e,n){var r=new i;return n&&(r.fill="both",r.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.getOwnPropertyNames(e).forEach(function(i){if("auto"!=e[i]){if(("number"==typeof r[i]||"duration"==i)&&("number"!=typeof e[i]||isNaN(e[i])))return;if("fill"==i&&-1==b.indexOf(e[i]))return;if("direction"==i&&-1==v.indexOf(e[i]))return;if("playbackRate"==i&&1!==e[i]&&t.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;r[i]=e[i]}}):r.duration=e,r}function r(t){return"number"==typeof t&&(t=isNaN(t)?{duration:0}:{duration:t}),t}function o(e,i){e=t.numericTimingToObject(e);var r=n(e,i);return r._easing=u(r.easing),r}function a(t,e,i,n){return 0>t||t>1||0>i||i>1?R:function(r){function o(t,e,i){return 3*t*(1-i)*(1-i)*i+3*e*(1-i)*i*i+i*i*i}if(0==r||1==r)return r;for(var a=0,s=1;;){var u=(a+s)/2,c=o(t,i,u);if(Math.abs(r-c)<.001)return o(e,n,u);r>c?a=u:s=u}}}function s(t,e){return function(i){if(i>=1)return 1;var n=1/t;return i+=e*n,i-i%n}}function u(t){var e=P.exec(t);if(e)return a.apply(this,e.slice(1).map(Number));var i=A.exec(t);if(i)return s(Number(i[1]),{start:y,middle:T,end:w}[i[2]]);var n=x[t];return n?n:R}function c(t){return Math.abs(f(t)/t.playbackRate)}function f(t){return t.duration*t.iterations}function l(t,e,i){return null==e?j:e<i.delay?N:e>=i.delay+t?k:O}function h(t,e,i,n,r){switch(n){case N:return"backwards"==e||"both"==e?0:null;case O:return i-r;case k:return"forwards"==e||"both"==e?t:null;case j:return null}}function m(t,e,i,n){return(n.playbackRate<0?e-t:e)*n.playbackRate+i}function d(t,e,i,n,r){return 1/0===i||i===-1/0||i-n==e&&r.iterations&&(r.iterations+r.iterationStart)%1==0?t:i%t}function p(t,e,i,n){return 0===i?0:e==t?n.iterationStart+n.iterations-1:Math.floor(i/t)}function _(t,e,i,n){var r=t%2>=1,o="normal"==n.direction||n.direction==(r?"alternate-reverse":"alternate"),a=o?i:e-i,s=a/e;return e*n.easing(s)}function g(t,e,i){var n=l(t,e,i),r=h(t,i.fill,e,n,i.delay);if(null===r)return null;if(0===t)return n===N?0:1;var o=i.iterationStart*i.duration,a=m(t,r,o,i),s=d(i.duration,f(i),a,o,i),u=p(i.duration,s,a,i);return _(u,i.duration,s,i)/i.duration}var b="backwards|forwards|both|none".split("|"),v="reverse|alternate|alternate-reverse".split("|");i.prototype={_setMember:function(e,i){this["_"+e]=i,this._effect&&(this._effect._timingInput[e]=i,this._effect._timing=t.normalizeTimingInput(t.normalizeTimingInput(this._effect._timingInput)),this._effect.activeDuration=t.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(t){this._setMember("delay",t)},get delay(){return this._delay},set endDelay(t){this._setMember("endDelay",t)},get endDelay(){return this._endDelay},set fill(t){this._setMember("fill",t)},get fill(){return this._fill},set iterationStart(t){this._setMember("iterationStart",t)},get iterationStart(){return this._iterationStart},set duration(t){this._setMember("duration",t)},get duration(){return this._duration},set direction(t){this._setMember("direction",t)},get direction(){return this._direction},set easing(t){this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){this._setMember("iterations",t)},get iterations(){return this._iterations}};var y=1,T=.5,w=0,x={ease:a(.25,.1,.25,1),"ease-in":a(.42,0,1,1),"ease-out":a(0,0,.58,1),"ease-in-out":a(.42,0,.58,1),"step-start":s(1,y),"step-middle":s(1,T),"step-end":s(1,w)},E="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",P=new RegExp("cubic-bezier\\("+E+","+E+","+E+","+E+"\\)"),A=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,R=function(t){return t},j=0,N=1,k=2,O=3;t.cloneTimingInput=e,t.makeTiming=n,t.numericTimingToObject=r,t.normalizeTimingInput=o,t.calculateActiveDuration=c,t.calculateTimeFraction=g,t.calculatePhase=l,t.toTimingFunction=u}(c,f),function(t){function e(t,e){return t in s?s[t][e]||e:e}function i(t,i,n){var a=r[t];if(a){o.style[t]=i;for(var s in a){var u=a[s],c=o.style[u];n[u]=e(u,c)}}else n[t]=e(t,i)}function n(e){function n(){var t=r.length;null==r[t-1].offset&&(r[t-1].offset=1),t>1&&null==r[0].offset&&(r[0].offset=0);for(var e=0,i=r[0].offset,n=1;t>n;n++){var o=r[n].offset;if(null!=o){for(var a=1;n-e>a;a++)r[e+a].offset=i+(o-i)*a/(n-e);e=n,i=o}}}if(!Array.isArray(e)&&null!==e)throw new TypeError("Keyframes must be null or an array of keyframes");if(null==e)return[];for(var r=e.map(function(e){var n={};for(var r in e){var o=e[r];if("offset"==r){if(null!=o&&(o=Number(o),!isFinite(o)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==r)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};o="easing"==r?t.toTimingFunction(o):""+o}i(r,o,n)}return void 0==n.offset&&(n.offset=null),void 0==n.easing&&(n.easing=t.toTimingFunction("linear")),n}),o=!0,a=-1/0,s=0;s<r.length;s++){var u=r[s].offset;if(null!=u){if(a>u)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};a=u}else o=!1}return r=r.filter(function(t){return t.offset>=0&&t.offset<=1}),o||n(),r}var r={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),a={thin:"1px",medium:"3px",thick:"5px"},s={borderBottomWidth:a,borderLeftWidth:a,borderRightWidth:a,borderTopWidth:a,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:a,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};t.normalizeKeyframes=n}(c,f),function(t){var e={};t.isDeprecated=function(t,i,n,r){var o=r?"are":"is",a=new Date,s=new Date(i);return s.setMonth(s.getMonth()+3),s>a?(t in e||console.warn("Web Animations: "+t+" "+o+" deprecated and will stop working on "+s.toDateString()+". "+n),e[t]=!0,!1):!0},t.deprecated=function(e,i,n,r){var o=r?"are":"is";if(t.isDeprecated(e,i,n,r))throw new Error(e+" "+o+" no longer supported. "+n)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(t){void 0===a[t]&&(b=!0)})),!b)return}!function(t,e){function i(t){for(var e={},i=0;i<t.length;i++)for(var n in t[i])if("offset"!=n&&"easing"!=n&&"composite"!=n){var r={offset:t[i].offset,easing:t[i].easing,value:t[i][n]};e[n]=e[n]||[],e[n].push(r)}for(var o in e){var a=e[o];if(0!=a[0].offset||1!=a[a.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return e}function n(t){var i=[];for(var n in t)for(var r=t[n],o=0;o<r.length-1;o++){var a=r[o].offset,s=r[o+1].offset,u=r[o].value,c=r[o+1].value;a==s&&(1==s?u=c:c=u),i.push({startTime:a,endTime:s,easing:r[o].easing,property:n,interpolation:e.propertyInterpolation(n,u,c)})}return i.sort(function(t,e){return t.startTime-e.startTime}),i}e.convertEffectInput=function(r){var o=t.normalizeKeyframes(r),a=i(o),s=n(a);return function(t,i){if(null!=i)s.filter(function(t){return 0>=i&&0==t.startTime||i>=1&&1==t.endTime||i>=t.startTime&&i<=t.endTime}).forEach(function(n){var r=i-n.startTime,o=n.endTime-n.startTime,a=0==o?0:n.easing(r/o);e.apply(t,n.property,n.interpolation(a))});else for(var n in a)"offset"!=n&&"easing"!=n&&"composite"!=n&&e.clear(t,n)}}}(c,d,f),function(t){function e(t,e,i){r[i]=r[i]||[],r[i].push([t,e])}function i(t,i,n){for(var r=0;r<n.length;r++){var o=n[r];e(t,i,o),/-/.test(o)&&e(t,i,o.replace(/-(.)/g,function(t,e){return e.toUpperCase()}))}}function n(e,i,n){if("initial"==i||"initial"==n){var a=e.replace(/-(.)/g,function(t,e){return e.toUpperCase()});"initial"==i&&(i=o[a]),"initial"==n&&(n=o[a])}for(var s=i==n?[]:r[e],u=0;s&&u<s.length;u++){var c=s[u][0](i),f=s[u][0](n);if(void 0!==c&&void 0!==f){var l=s[u][1](c,f);if(l){var h=t.Interpolation.apply(null,l);return function(t){return 0==t?i:1==t?n:h(t)}}}}return t.Interpolation(!1,!0,function(t){return t?n:i})}var r={};t.addPropertiesHandler=i;var o={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};t.propertyInterpolation=n}(d,f),function(t,e){function i(e){var i=t.calculateActiveDuration(e),n=function(n){return t.calculateTimeFraction(i,n,e)};return n._totalDuration=e.delay+i+e.endDelay,n._isCurrent=function(n){var r=t.calculatePhase(i,n,e);return r===PhaseActive||r===PhaseBefore},n}e.KeyframeEffect=function(n,r,o){var a,s=i(t.normalizeTimingInput(o)),u=e.convertEffectInput(r),c=function(){u(n,a)};return c._update=function(t){return a=s(t),null!==a},c._clear=function(){u(n,null)},c._hasSameTarget=function(t){return n===t},c._isCurrent=s._isCurrent,c._totalDuration=s._totalDuration,c},e.NullEffect=function(t){var e=function(){t&&(t(),t=null)};return e._update=function(){return null},e._totalDuration=0,e._isCurrent=function(){return!1},e._hasSameTarget=function(){return!1},e}}(c,d,f),function(t){t.apply=function(e,i,n){e.style[t.propertyName(i)]=n},t.clear=function(e,i){e.style[t.propertyName(i)]=""}}(d,f),function(t){window.Element.prototype.animate=function(e,i){return t.timeline._play(t.KeyframeEffect(this,e,i))}}(d),function(t){function e(t,i,n){if("number"==typeof t&&"number"==typeof i)return t*(1-n)+i*n;if("boolean"==typeof t&&"boolean"==typeof i)return.5>n?t:i;if(t.length==i.length){for(var r=[],o=0;o<t.length;o++)r.push(e(t[o],i[o],n));return r}throw"Mismatched interpolation arguments "+t+":"+i}t.Interpolation=function(t,i,n){return function(r){return n(e(t,i,r))}}}(d,f),function(t,e){t.sequenceNumber=0;var i=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};e.Animation=function(e){this._sequenceNumber=t.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!1,this.onfinish=null,this._finishHandlers=[],this._effect=e,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},e.Animation.prototype={_ensureAlive:function(){this._inEffect=this._effect._update(this.playbackRate<0&&0===this.currentTime?-1:this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,e.timeline._animations.push(this))},_tickCurrentTime:function(t,e){t!=this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(t){t=+t,isNaN(t)||(e.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-t/this._playbackRate),this._currentTimePending=!1,this._currentTime!=t&&(this._tickCurrentTime(t,!0),e.invalidateEffects()))},get startTime(){return this._startTime},set startTime(t){t=+t,isNaN(t)||this._paused||this._idle||(this._startTime=t,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),e.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(t){if(t!=this._playbackRate){var e=this.currentTime;this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=e&&(this.currentTime=e)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null,e.invalidateEffects()),this._finishedFlag=!1,e.restart(),this._idle=!1,this._ensureAlive()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1)},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),e.invalidateEffects(),e.restart())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(t,e){"function"==typeof e&&"finish"==t&&this._finishHandlers.push(e)},removeEventListener:function(t,e){if("finish"==t){var i=this._finishHandlers.indexOf(e);i>=0&&this._finishHandlers.splice(i,1)}},_fireEvents:function(t){var e=this._isFinished;if((e||this._idle)&&!this._finishedFlag){var n=new i(this,this._currentTime,t),r=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){r.forEach(function(t){t.call(n.target,n)})},0)}this._finishedFlag=e},_tick:function(t){return this._idle||this._paused||(null==this._startTime?this.startTime=t-this._currentTime/this.playbackRate:this._isFinished||this._tickCurrentTime((t-this._startTime)*this.playbackRate)),this._currentTimePending=!1,this._fireEvents(t),!this._idle&&(this._inEffect||!this._finishedFlag)}}}(c,d,f),function(t,e){function i(t){var e=u;u=[],t<b.currentTime&&(t=b.currentTime),a(t),e.forEach(function(e){e[1](t)}),d&&a(t),o(),l=void 0}function n(t,e){return t._sequenceNumber-e._sequenceNumber}function r(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function o(){p.forEach(function(t){t()}),p.length=0}function a(t){m=!1;var i=e.timeline;i.currentTime=t,i._animations.sort(n),h=!1;var r=i._animations;i._animations=[];var o=[],a=[];r=r.filter(function(e){return e._inTimeline=e._tick(t),e._inEffect?a.push(e._effect):o.push(e._effect),e._isFinished||e._paused||e._idle||(h=!0),e._inTimeline}),p.push.apply(p,o),p.push.apply(p,a),i._animations.push.apply(i._animations,r),d=!1,h&&requestAnimationFrame(function(){})}var s=window.requestAnimationFrame,u=[],c=0;window.requestAnimationFrame=function(t){var e=c++;return 0==u.length&&s(i),u.push([e,t]),e},window.cancelAnimationFrame=function(t){u.forEach(function(e){e[0]==t&&(e[1]=function(){})})},r.prototype={_play:function(i){i._timing=t.normalizeTimingInput(i.timing);var n=new e.Animation(i);return n._idle=!1,n._timeline=this,this._animations.push(n),e.restart(),e.invalidateEffects(),n}};var f,l=void 0,f=function(){return void 0==l&&(l=performance.now()),l},h=!1,m=!1;e.restart=function(){return h||(h=!0,requestAnimationFrame(function(){}),m=!0),m};var d=!1;e.invalidateEffects=function(){d=!0};var p=[],_=1e3/60,g=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){if(d){var t=f();t-b.currentTime>0&&(b.currentTime+=_*(Math.floor((t-b.currentTime)/_)+1)),a(b.currentTime)}return o(),g.apply(this,arguments)}});var b=new r;e.timeline=b}(c,d,f),function(t){function e(t,e){var i=t.exec(e);return i?(i=t.ignoreCase?i[0].toLowerCase():i[0],[i,e.substr(i.length)]):void 0}function i(t,e){e=e.replace(/^\s*/,"");var i=t(e);return i?[i[0],i[1].replace(/^\s*/,"")]:void 0}function n(t,n,r){t=i.bind(null,t);for(var o=[];;){var a=t(r);if(!a)return[o,r];if(o.push(a[0]),r=a[1],a=e(n,r),!a||""==a[1])return[o,r];r=a[1]}}function r(t,e){for(var i=0,n=0;n<e.length&&(!/\s|,/.test(e[n])||0!=i);n++)if("("==e[n])i++;else if(")"==e[n]&&(i--,0==i&&n++,0>=i))break;var r=t(e.substr(0,n));return void 0==r?void 0:[r,e.substr(n)]}function o(t,e){for(var i=t,n=e;i&&n;)i>n?i%=n:n%=i;return i=t*e/(i+n)}function a(t){return function(e){var i=t(e);return i&&(i[0]=void 0),i}}function s(t,e){return function(i){var n=t(i);return n?n:[e,i]}}function u(e,i){for(var n=[],r=0;r<e.length;r++){var o=t.consumeTrimmed(e[r],i);if(!o||""==o[0])return;void 0!==o[0]&&n.push(o[0]),i=o[1]}return""==i?n:void 0}function c(t,e,i,n,r){for(var a=[],s=[],u=[],c=o(n.length,r.length),f=0;c>f;f++){var l=e(n[f%n.length],r[f%r.length]);if(!l)return;a.push(l[0]),s.push(l[1]),u.push(l[2])}return[a,s,function(e){var n=e.map(function(t,e){return u[e](t)}).join(i);return t?t(n):n}]}function f(t,e,i){for(var n=[],r=[],o=[],a=0,s=0;s<i.length;s++)if("function"==typeof i[s]){var u=i[s](t[a],e[a++]);n.push(u[0]),r.push(u[1]),o.push(u[2])}else!function(t){n.push(!1),r.push(!1),o.push(function(){return i[t]})}(s);return[n,r,function(t){for(var e="",i=0;i<t.length;i++)e+=o[i](t[i]);return e}]}t.consumeToken=e,t.consumeTrimmed=i,t.consumeRepeated=n,t.consumeParenthesised=r,t.ignore=a,t.optional=s,t.consumeList=u,t.mergeNestedRepeated=c.bind(null,null),t.mergeWrappedNestedRepeated=c,t.mergeList=f}(d),function(t){function e(e){function i(e){var i=t.consumeToken(/^inset/i,e);if(i)return n.inset=!0,i;var i=t.consumeLengthOrPercent(e);if(i)return n.lengths.push(i[0]),i;var i=t.consumeColor(e);return i?(n.color=i[0],i):void 0}var n={inset:!1,lengths:[],color:null},r=t.consumeRepeated(i,/^/,e);return r&&r[0].length?[n,r[1]]:void 0}function i(i){var n=t.consumeRepeated(e,/^,/,i);return n&&""==n[1]?n[0]:void 0}function n(e,i){for(;e.lengths.length<Math.max(e.lengths.length,i.lengths.length);)e.lengths.push({px:0});for(;i.lengths.length<Math.max(e.lengths.length,i.lengths.length);)i.lengths.push({px:0});if(e.inset==i.inset&&!!e.color==!!i.color){for(var n,r=[],o=[[],0],a=[[],0],s=0;s<e.lengths.length;s++){var u=t.mergeDimensions(e.lengths[s],i.lengths[s],2==s);o[0].push(u[0]),a[0].push(u[1]),r.push(u[2])}if(e.color&&i.color){var c=t.mergeColors(e.color,i.color);o[1]=c[0],a[1]=c[1],n=c[2]}return[o,a,function(t){for(var i=e.inset?"inset ":" ",o=0;o<r.length;o++)i+=r[o](t[0][o])+" ";return n&&(i+=n(t[1])),i}]}}function r(e,i,n,r){function o(t){return{inset:t,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var a=[],s=[],u=0;u<n.length||u<r.length;u++){var c=n[u]||o(r[u].inset),f=r[u]||o(n[u].inset);a.push(c),s.push(f)}return t.mergeNestedRepeated(e,i,a,s)}var o=r.bind(null,n,", ");t.addPropertiesHandler(i,o,["box-shadow","text-shadow"])}(d),function(t){function e(t){return t.toFixed(3).replace(".000","")}function i(t,e,i){return Math.min(e,Math.max(t,i))}function n(t){return/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Number(t):void 0}function r(t,i){return[t,i,e]}function o(t,e){return 0!=t?s(0,1/0)(t,e):void 0}function a(t,e){return[t,e,function(t){return Math.round(i(1,1/0,t))}]}function s(t,n){return function(r,o){return[r,o,function(r){return e(i(t,n,r))}]}}function u(t,e){return[t,e,Math.round]}t.clamp=i,t.addPropertiesHandler(n,s(0,1/0),["border-image-width","line-height"]),t.addPropertiesHandler(n,s(0,1),["opacity","shape-image-threshold"]),t.addPropertiesHandler(n,o,["flex-grow","flex-shrink"]),t.addPropertiesHandler(n,a,["orphans","widows"]),t.addPropertiesHandler(n,u,["z-index"]),t.parseNumber=n,t.mergeNumbers=r,t.numberToString=e}(d,f),function(t){function e(t,e){return"visible"==t||"visible"==e?[0,1,function(i){return 0>=i?t:i>=1?e:"visible"}]:void 0}t.addPropertiesHandler(String,e,["visibility"])}(d),function(t){function e(t){t=t.trim(),r.fillStyle="#000",r.fillStyle=t;var e=r.fillStyle;if(r.fillStyle="#fff",r.fillStyle=t,e==r.fillStyle){r.fillRect(0,0,1,1);var i=r.getImageData(0,0,1,1).data;r.clearRect(0,0,1,1);var n=i[3]/255;return[i[0]*n,i[1]*n,i[2]*n,n]}}function i(e,i){return[e,i,function(e){function i(t){return Math.max(0,Math.min(255,t))}if(e[3])for(var n=0;3>n;n++)e[n]=Math.round(i(e[n]/e[3]));return e[3]=t.numberToString(t.clamp(0,1,e[3])),"rgba("+e.join(",")+")"}]}var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=n.height=1;var r=n.getContext("2d");t.addPropertiesHandler(e,i,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),t.consumeColor=t.consumeParenthesised.bind(null,e),t.mergeColors=i}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(t){return c[t]=null,"U"+t});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g<f.length;)f[g].test(e)?(e=e.replace(f[g],"$1"),g=0):g++;if("D"==e){for(var h in c){var i=eval(b.replace(new RegExp("U"+h,"g"),"").replace(new RegExp(d,"g"),"*0"));if(!isFinite(i))return;c[h]=i}return c}}}function d(t,i){return e(t,i,!0)}function e(t,e,i){var n,r=[];for(n in t)r.push(n);for(n in e)r.indexOf(n)<0&&r.push(n);return t=r.map(function(e){return t[e]||0}),e=r.map(function(t){return e[t]||0}),[t,e,function(t){var e=t.map(function(e,n){return 1==t.length&&i&&(e=Math.max(e,0)),a.numberToString(e)+r[n]}).join(" + ");return t.length>1?"calc("+e+")":e}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(t){var e=l(t);return e&&""==e[1]?e[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(t){function e(e){return t.consumeLengthOrPercent(e)||t.consumeToken(/^auto/,e)}function i(i){var n=t.consumeList([t.ignore(t.consumeToken.bind(null,/^rect/)),t.ignore(t.consumeToken.bind(null,/^\(/)),t.consumeRepeated.bind(null,e,/^,/),t.ignore(t.consumeToken.bind(null,/^\)/))],i);return n&&4==n[0].length?n[0]:void 0}function n(e,i){return"auto"==e||"auto"==i?[!0,!1,function(n){var r=n?e:i;if("auto"==r)return"auto";var o=t.mergeDimensions(r,r);return o[2](o[0])}]:t.mergeDimensions(e,i)}function r(t){return"rect("+t+")"}var o=t.mergeWrappedNestedRepeated.bind(null,r,n,", ");t.parseBox=i,t.mergeBoxes=o,t.addPropertiesHandler(i,o,["clip"])}(d,f),function(t){function e(t){return function(e){var i=0;return t.map(function(t){return t===c?e[i++]:t})}}function i(t){return t}function n(e){if(e=e.toLowerCase().trim(),"none"==e)return[];for(var i,n=/\s*(\w+)\(([^)]*)\)/g,r=[],o=0;i=n.exec(e);){if(i.index!=o)return;o=i.index+i[0].length;var a=i[1],s=h[a];if(!s)return;var u=i[2].split(","),c=s[0];if(c.length<u.length)return;for(var m=[],d=0;d<c.length;d++){var p,_=u[d],g=c[d];if(p=_?{A:function(e){return"0"==e.trim()?l:t.parseAngle(e)},N:t.parseNumber,T:t.parseLengthOrPercent,L:t.parseLength}[g.toUpperCase()](_):{a:l,n:m[0],t:f}[g],void 0===p)return;m.push(p)}if(r.push({t:a,d:m}),n.lastIndex==e.length)return r}}function r(t){return t.toFixed(6).replace(".000000","")}function o(e,i){if(e.decompositionPair!==i){e.decompositionPair=i;var n=t.makeMatrixDecomposition(e)}if(i.decompositionPair!==e){i.decompositionPair=e;var o=t.makeMatrixDecomposition(i)}return null==n[0]||null==o[0]?[[!1],[!0],function(t){return t?i[0].d:e[0].d}]:(n[0].push(0),o[0].push(1),[n,o,function(e){var i=t.quat(n[0][3],o[0][3],e[5]),a=t.composeMatrix(e[0],e[1],e[2],i,e[4]),s=a.map(r).join(",");return s}])}function a(t){return t.replace(/[xy]/,"")}function s(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function u(e,i){var n=t.makeMatrixDecomposition&&!0,r=!1;if(!e.length||!i.length){e.length||(r=!0,e=i,i=[]);for(var u=0;u<e.length;u++){var c=e[u].t,f=e[u].d,l="scale"==c.substr(0,5)?1:0;i.push({t:c,d:f.map(function(t){if("number"==typeof t)return l;var e={};for(var i in t)e[i]=l;return e})})}}var m=function(t,e){return"perspective"==t&&"perspective"==e||("matrix"==t||"matrix3d"==t)&&("matrix"==e||"matrix3d"==e)},d=[],p=[],_=[];if(e.length!=i.length){if(!n)return;var g=o(e,i);d=[g[0]],p=[g[1]],_=[["matrix",[g[2]]]]}else for(var u=0;u<e.length;u++){var c,b=e[u].t,v=i[u].t,y=e[u].d,T=i[u].d,w=h[b],x=h[v];if(m(b,v)){if(!n)return;var g=o([e[u]],[i[u]]);d.push(g[0]),p.push(g[1]),_.push(["matrix",[g[2]]])}else{if(b==v)c=b;else if(w[2]&&x[2]&&a(b)==a(v))c=a(b),y=w[2](y),T=x[2](T);else{if(!w[1]||!x[1]||s(b)!=s(v)){if(!n)return;var g=o(e,i);d=[g[0]],p=[g[1]],_=[["matrix",[g[2]]]];break}c=s(b),y=w[1](y),T=x[1](T)}for(var E=[],P=[],A=[],R=0;R<y.length;R++){var j="number"==typeof y[R]?t.mergeNumbers:t.mergeDimensions,g=j(y[R],T[R]);E[R]=g[0],P[R]=g[1],A.push(g[2])}d.push(E),p.push(P),_.push([c,A])}}if(r){var N=d;d=p,p=N}return[d,p,function(t){return t.map(function(t,e){var i=t.map(function(t,i){return _[e][1][i](t)}).join(",");return"matrix"==_[e][0]&&16==i.split(",").length&&(_[e][0]="matrix3d"),_[e][0]+"("+i+")"}).join(" ")}]}var c=null,f={px:0},l={deg:0},h={matrix:["NNNNNN",[c,c,0,0,c,c,0,0,0,0,1,0,c,c,0,1],i],matrix3d:["NNNNNNNNNNNNNNNN",i],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",e([c,c,1]),i],scalex:["N",e([c,1,1]),e([c,1])],scaley:["N",e([1,c,1]),e([1,c])],scalez:["N",e([1,1,c])],scale3d:["NNN",i],skew:["Aa",null,i],skewx:["A",null,e([c,l])],skewy:["A",null,e([l,c])],translate:["Tt",e([c,c,f]),i],translatex:["T",e([c,f,f]),e([c,f])],translatey:["T",e([f,c,f]),e([f,c])],translatez:["L",e([f,f,c])],translate3d:["TTL",i]};t.addPropertiesHandler(n,u,["transform"])}(d,f),function(t){function e(t,e){e.concat([t]).forEach(function(e){e in document.documentElement.style&&(i[t]=e)})}var i={};e("transform",["webkitTransform","msTransform"]),e("transformOrigin",["webkitTransformOrigin"]),e("perspective",["webkitPerspective"]),e("perspectiveOrigin",["webkitPerspectiveOrigin"]),t.propertyName=function(t){return i[t]||t}}(d,f)}(),!function(t,e){function i(t){var e=window.document.timeline;e.currentTime=t,e._discardAnimations(),0==e._animations.length?r=!1:requestAnimationFrame(i)}var n=window.requestAnimationFrame;window.requestAnimationFrame=function(t){return n(function(e){window.document.timeline._updateAnimationsPromises(),t(e),window.document.timeline._updateAnimationsPromises()})},e.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},e.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){e.animationsWithPromises=e.animationsWithPromises.filter(function(t){return t._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(t){return"finished"!=t.playState&&"idle"!=t.playState})},_play:function(t){var i=new e.Animation(t,this);return this._animations.push(i),e.restartWebAnimationsNextTick(),i._updatePromises(),i._animation.play(),i._updatePromises(),i},play:function(t){return t&&t.remove(),this._play(t)}};var r=!1;e.restartWebAnimationsNextTick=function(){r||(r=!0,requestAnimationFrame(i))};var o=new e.AnimationTimeline;e.timeline=o;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return o}})}catch(a){}try{window.document.timeline=o}catch(a){}}(c,e,f),function(t,e){e.animationsWithPromises=[],e.Animation=function(e,i){if(this.effect=e,e&&(e._animation=this),!i)throw new Error("Animation with null timeline is not supported");this._timeline=i,this._sequenceNumber=t.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},e.Animation.prototype={_updatePromises:function(){var t=this._oldPlayState,e=this.playState;return this._readyPromise&&e!==t&&("idle"==e?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==t?this._resolveReadyPromise():"pending"==e&&(this._readyPromise=void 0)),this._finishedPromise&&e!==t&&("idle"==e?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==e?this._resolveFinishedPromise():"finished"==t&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var t,i,n,r,o=this._animation?!0:!1;o&&(t=this.playbackRate,i=this._paused,n=this.startTime,r=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=e.newUnderlyingAnimationForKeyframeEffect(this.effect),e.bindAnimationForKeyframeEffect(this)),
|
||
(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=e.newUnderlyingAnimationForGroup(this.effect),e.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&e.bindAnimationForCustomEffect(this),o&&(1!=t&&(this.playbackRate=t),null!==n?this.startTime=n:null!==r?this.currentTime=r:null!==this._holdTime&&(this.currentTime=this._holdTime),i&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var t=this.effect._timing.delay;this._childAnimations.forEach(function(i){this._arrangeChildren(i,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i.effect))}.bind(this))}},_setExternalAnimation:function(t){if(this.effect&&this._isGroup)for(var e=0;e<this.effect.children.length;e++)this.effect.children[e]._animation=t,this._childAnimations[e]._setExternalAnimation(t)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var t=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(i){var n=window.document.timeline._play(i);this._childAnimations.push(n),n.playbackRate=this.playbackRate,this._paused&&n.pause(),i._animation=this.effect._animation,this._arrangeChildren(n,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i))}.bind(this))}},_arrangeChildren:function(t,e){null===this.startTime?t.currentTime=this.currentTime-e/this.playbackRate:t.startTime!==this.startTime+e/this.playbackRate&&(t.startTime=this.startTime+e/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(-1==e.animationsWithPromises.indexOf(this)&&e.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(t,e){this._resolveFinishedPromise=function(){t(this)},this._rejectFinishedPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(-1==e.animationsWithPromises.indexOf(this)&&e.animationsWithPromises.push(this),this._readyPromise=new Promise(function(t,e){this._resolveReadyPromise=function(){t(this)},this._rejectReadyPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._onfinish},set onfinish(t){"function"==typeof t?(this._onfinish=t,this._animation.onfinish=function(e){e.target=this,t.call(this,e)}.bind(this)):(this._animation.onfinish=t,this.onfinish=this._animation.onfinish)},get currentTime(){this._updatePromises();var t=this._animation.currentTime;return this._updatePromises(),t},set currentTime(t){this._updatePromises(),this._animation.currentTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.currentTime=t-i}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(t){this._updatePromises(),this._animation.startTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.startTime=t+i}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(t){this._updatePromises();var e=this.currentTime;this._animation.playbackRate=t,this._forEachChild(function(e){e.playbackRate=t}),"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!==e&&(this.currentTime=e),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),-1==this._timeline._animations.indexOf(this)&&this._timeline._animations.push(this),this._register(),e.awaitStartTime(this),this._forEachChild(function(t){var e=t.currentTime;t.play(),t.currentTime=e}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(t){t.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var t=this.currentTime;this._animation.reverse(),this._forEachChild(function(t){t.reverse()}),null!==t&&(this.currentTime=t),this._updatePromises()},addEventListener:function(t,e){var i=e;"function"==typeof e&&(i=function(t){t.target=this,e.call(this,t)}.bind(this),e._wrapper=i),this._animation.addEventListener(t,i)},removeEventListener:function(t,e){this._animation.removeEventListener(t,e&&e._wrapper||e)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(e){var i=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(t){e.call(this,t,i),this.effect instanceof window.SequenceEffect&&(i+=t.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var n=this.effect._timing,r=this.currentTime;null!==r&&(r=t.calculateTimeFraction(t.calculateActiveDuration(n),r,n)),(null==r||isNaN(r))&&this._removeChildAnimations()}}},window.Animation=e.Animation}(c,e,f),function(t,e){function i(e){this._frames=t.normalizeKeyframes(e)}function n(){for(var t=!1;s.length;){var e=s.shift();e._updateChildren(),t=!0}return t}var r=function(t){if(t._animation=void 0,t instanceof window.SequenceEffect||t instanceof window.GroupEffect)for(var e=0;e<t.children.length;e++)r(t.children[e])};e.removeMulti=function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];n._parent?(-1==e.indexOf(n._parent)&&e.push(n._parent),n._parent.children.splice(n._parent.children.indexOf(n),1),n._parent=null,r(n)):n._animation&&n._animation.effect==n&&(n._animation.cancel(),n._animation.effect=new KeyframeEffect(null,[]),n._animation._callback&&(n._animation._callback._animation=null),n._animation._rebuildUnderlyingAnimation(),r(n))}for(i=0;i<e.length;i++)e[i]._rebuild()},e.KeyframeEffect=function(e,n,r){return this.target=e,this._parent=null,r=t.numericTimingToObject(r),this._timingInput=t.cloneTimingInput(r),this._timing=t.normalizeTimingInput(r),this.timing=t.makeTiming(r,!1,this),this.timing._effect=this,"function"==typeof n?(t.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=n):this._normalizedKeyframes=new i(n),this._keyframes=n,this.activeDuration=t.calculateActiveDuration(this._timing),this},e.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(t){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=t,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var e=new KeyframeEffect(this.target,[],t.cloneTimingInput(this._timingInput));return e._normalizedKeyframes=this._normalizedKeyframes,e._keyframes=this._keyframes,e},remove:function(){e.removeMulti([this])}};var o=Element.prototype.animate;Element.prototype.animate=function(t,i){return e.timeline._play(new e.KeyframeEffect(this,t,i))};var a=document.createElementNS("http://www.w3.org/1999/xhtml","div");e.newUnderlyingAnimationForKeyframeEffect=function(t){if(t){var e=t.target||a,i=t._keyframes;"function"==typeof i&&(i=[]);var n=t._timingInput}else var e=a,i=[],n=0;return o.apply(e,[i,n])},e.bindAnimationForKeyframeEffect=function(t){t.effect&&"function"==typeof t.effect._normalizedKeyframes&&e.bindAnimationForCustomEffect(t)};var s=[];e.awaitStartTime=function(t){null===t.startTime&&t._isGroup&&(0==s.length&&requestAnimationFrame(n),s.push(t))};var u=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){window.document.timeline._updateAnimationsPromises();var t=u.apply(this,arguments);return n()&&(t=u.apply(this,arguments)),window.document.timeline._updateAnimationsPromises(),t}}),window.KeyframeEffect=e.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(t){return null!==t.effect&&t.effect.target==this}.bind(this))}}(c,e,f),function(t,e){function i(t){t._registered||(t._registered=!0,o.push(t),a||(a=!0,requestAnimationFrame(n)))}function n(){var t=o;o=[],t.sort(function(t,e){return t._sequenceNumber-e._sequenceNumber}),t=t.filter(function(t){t();var e=t._animation?t._animation.playState:"idle";return"running"!=e&&"pending"!=e&&(t._registered=!1),t._registered}),o.push.apply(o,t),o.length?(a=!0,requestAnimationFrame(n)):a=!1}var r=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);e.bindAnimationForCustomEffect=function(e){var n,o=e.effect.target,a="function"==typeof e.effect.getFrames();n=a?e.effect.getFrames():e.effect._onsample;var s=e.effect.timing,u=null;s=t.normalizeTimingInput(s);var c=function(){var i=c._animation?c._animation.currentTime:null;null!==i&&(i=t.calculateTimeFraction(t.calculateActiveDuration(s),i,s),isNaN(i)&&(i=null)),i!==u&&(a?n(i,o,e.effect):n(i,e.effect,e.effect._animation)),u=i};c._animation=e,c._registered=!1,c._sequenceNumber=r++,e._callback=c,i(c)};var o=[],a=!1;e.Animation.prototype._register=function(){this._callback&&i(this._callback)}}(c,e,f),function(t,e){function i(t){return t._timing.delay+t.activeDuration+t._timing.endDelay}function n(e,i){this._parent=null,this.children=e||[],this._reparent(this.children),i=t.numericTimingToObject(i),this._timingInput=t.cloneTimingInput(i),this._timing=t.normalizeTimingInput(i,!0),this.timing=t.makeTiming(i,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){n.apply(this,arguments)},window.GroupEffect=function(){n.apply(this,arguments)},n.prototype={_isAncestor:function(t){for(var e=this;null!==e;){if(e==t)return!0;e=e._parent}return!1},_rebuild:function(){for(var t=this;t;)"auto"===t.timing.duration&&(t._timing.duration=t.activeDuration),t=t._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(t){e.removeMulti(t);for(var i=0;i<t.length;i++)t[i]._parent=this},_putChild:function(t,e){for(var i=e?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",n=0;n<t.length;n++)if(this._isAncestor(t[n]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:i};for(var n=0;n<t.length;n++)e?this.children.push(t[n]):this.children.unshift(t[n]);this._reparent(t),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var e=t.cloneTimingInput(this._timingInput),i=[],n=0;n<this.children.length;n++)i.push(this.children[n].clone());return this instanceof GroupEffect?new GroupEffect(i,e):new SequenceEffect(i,e)},remove:function(){e.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(n.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t+=i(e)}),Math.max(t,0)}}),window.GroupEffect.prototype=Object.create(n.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t=Math.max(t,i(e))}),t}}),e.newUnderlyingAnimationForGroup=function(i){var n,r=null,o=function(e){var i=n._wrapper;return i&&"pending"!=i.playState&&i.effect?null==e?void i._removeChildAnimations():0==e&&i.playbackRate<0&&(r||(r=t.normalizeTimingInput(i.effect.timing)),e=t.calculateTimeFraction(t.calculateActiveDuration(r),-1,r),isNaN(e)||null==e)?(i._forEachChild(function(t){t.currentTime=-1}),void i._removeChildAnimations()):void 0:void 0},a=new KeyframeEffect(null,[],i._timing);return a.onsample=o,n=e.timeline._play(a)},e.bindAnimationForGroup=function(t){t._animation._wrapper=t,t._isGroup=!0,e.awaitStartTime(t),t._constructChildAnimations(),t._setExternalAnimation(t)},e.groupChildDuration=i}(c,e,f)}({},function(){return this}());</script><script>Polymer({is:"opaque-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node;return i.style.opacity="0",this._effect=new KeyframeEffect(i,[{opacity:"1"},{opacity:"1"}],this.timingFromConfig(e)),this._effect},complete:function(e){e.node.style.opacity=""}});</script><script>Polymer.NeonAnimatableBehavior={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},"fade-in-animation"!==this.entryAnimation?this.animationConfig.entry=[{name:"opaque-animation",node:this},{name:this.entryAnimation,node:this}]:this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(i,n){for(var t in n)i[t]=n[t]},_cloneConfig:function(i){var n={isClone:!0};return this._copyProperties(n,i),n},_getAnimationConfigRecursive:function(i,n,t){if(this.animationConfig){var o;if(o=i?this.animationConfig[i]:this.animationConfig,Array.isArray(o)||(o=[o]),o)for(var e,a=0;e=o[a];a++)if(e.animatable)e.animatable._getAnimationConfigRecursive(e.type||i,n,t);else if(e.id){var r=n[e.id];r?(r.isClone||(n[e.id]=this._cloneConfig(r),r=n[e.id]),this._copyProperties(r,e)):n[e.id]=e}else t.push(e)}},getAnimationConfig:function(i){var n=[],t=[];this._getAnimationConfigRecursive(i,n,t);for(var o in n)t.push(n[o]);return t}};</script><script>Polymer.NeonAnimationRunnerBehaviorImpl={properties:{_animationMeta:{type:Object,value:function(){return new Polymer.IronMeta({type:"animation"})}},_player:{type:Object}},_configureAnimationEffects:function(n){var i=[];if(n.length>0)for(var e,t=0;e=n[t];t++){var o=this._animationMeta.byKey(e.name);if(o){var a=o&&new o,r=a.configure(e);r&&i.push({animation:a,config:e,effect:r})}else console.warn(this.is+":",e.name,"not found!")}return i},_runAnimationEffects:function(n){return document.timeline.play(new GroupEffect(n))},_completeAnimations:function(n){for(var i,e=0;i=n[e];e++)i.animation.complete(i.config)},playAnimation:function(n,i){var e=this.getAnimationConfig(n);if(e){var t=this._configureAnimationEffects(e),o=t.map(function(n){return n.effect});o.length>0?(this._player=this._runAnimationEffects(o),this._player.onfinish=function(){this._completeAnimations(t),this._player&&(this._player.cancel(),this._player=null),this.fire("neon-animation-finish",i,{bubbles:!1})}.bind(this)):this.fire("neon-animation-finish",i,{bubbles:!1})}},cancelAnimation:function(){this._player&&this._player.cancel()}},Polymer.NeonAnimationRunnerBehavior=[Polymer.NeonAnimatableBehavior,Polymer.NeonAnimationRunnerBehaviorImpl];</script><script>Polymer.PaperDialogBehaviorImpl={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{observer:"_modalChanged",type:Boolean,value:!1},_lastFocusedElement:{type:Object},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBackdropClick:{type:Function,value:function(){return this._onBackdropClick.bind(this)}}},listeners:{tap:"_onDialogClick","iron-overlay-opened":"_onIronOverlayOpened","iron-overlay-closed":"_onIronOverlayClosed"},attached:function(){this._observer=this._observe(this),this._updateAriaLabelledBy()},detached:function(){this._observer&&this._observer.disconnect()},_observe:function(e){var t=new MutationObserver(function(){this._updateAriaLabelledBy()}.bind(this));return t.observe(e,{childList:!0,subtree:!0}),t},_modalChanged:function(){this.modal?this.setAttribute("aria-modal","true"):this.setAttribute("aria-modal","false"),this.modal&&(this.noCancelOnOutsideClick=!0,this.withBackdrop=!0)},_updateAriaLabelledBy:function(){var e=Polymer.dom(this).querySelector("h2");if(!e)return void this.removeAttribute("aria-labelledby");var t=e.getAttribute("id");if(!t||this.getAttribute("aria-labelledby")!==t){var o;t?o=t:(o="paper-dialog-header-"+(new Date).getUTCMilliseconds(),e.setAttribute("id",o)),this.setAttribute("aria-labelledby",o)}},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=e.target;t&&t!==this;){if(t.hasAttribute){if(t.hasAttribute("dialog-dismiss")){this._updateClosingReasonConfirmed(!1),this.close();break}if(t.hasAttribute("dialog-confirm")){this._updateClosingReasonConfirmed(!0),this.close();break}}t=t.parentNode}},_onIronOverlayOpened:function(){this.modal&&(document.body.addEventListener("focus",this._boundOnFocus,!0),this.backdropElement.addEventListener("click",this._boundOnBackdropClick))},_onIronOverlayClosed:function(){document.body.removeEventListener("focus",this._boundOnFocus,!0),this.backdropElement.removeEventListener("click",this._boundOnBackdropClick)},_onFocus:function(e){if(this.modal){for(var t=e.target;t&&t!==this&&t!==document.body;)t=t.parentNode;t&&(t===document.body?this._lastFocusedElement?this._lastFocusedElement.focus():this._focusNode.focus():this._lastFocusedElement=e.target)}},_onBackdropClick:function(){this.modal&&(this._lastFocusedElement?this._lastFocusedElement.focus():this._focusNode.focus())}},Polymer.PaperDialogBehavior=[Polymer.IronOverlayBehavior,Polymer.PaperDialogBehaviorImpl];</script><script>Polymer.IronRangeBehavior={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(t){return(this._clampValue(t)-this.min)/(this.max-this.min)},_clampValue:function(t){return Math.min(this.max,Math.max(this.min,this._calcStep(t)))},_calcStep:function(t){return t=parseFloat(t),this.step?(Math.round((t+this.min)/this.step)-this.min/this.step)/(1/this.step):t},_validateValue:function(){var t=this._clampValue(this.value);return this.value=this.oldValue=isNaN(t)?this.oldValue:t,this.value!==t},_update:function(){this._validateValue(),this._setRatio(100*this._calcRatio(this.value))}};</script><script>Polymer.PaperItemBehaviorImpl={hostAttributes:{role:"option",tabindex:"0"}},Polymer.PaperItemBehavior=[Polymer.IronControlState,Polymer.IronButtonState,Polymer.PaperItemBehaviorImpl];</script><style is="custom-style">:root {
|
||
--dark-primary-color: #0288D1;
|
||
--default-primary-color: #03A9F4;
|
||
--light-primary-color: #B3E5FC;
|
||
--text-primary-color: #ffffff;
|
||
--accent-color: #FF9800;
|
||
--primary-background-color: #ffffff;
|
||
--primary-text-color: #212121;
|
||
--secondary-text-color: #727272;
|
||
--disabled-text-color: #bdbdbd;
|
||
--divider-color: #B6B6B6;
|
||
|
||
--paper-toggle-button-checked-ink-color: #039be5;
|
||
--paper-toggle-button-checked-button-color: #039be5;
|
||
--paper-toggle-button-checked-bar-color: #039be5;
|
||
|
||
--paper-toolbar-background: #03A9F4;
|
||
|
||
font-size: 14px;
|
||
}
|
||
|
||
@-webkit-keyframes ha-spin {
|
||
0% {
|
||
-webkit-transform: rotate(0deg);
|
||
transform: rotate(0deg);
|
||
}
|
||
100% {
|
||
-webkit-transform: rotate(359deg);
|
||
transform: rotate(359deg);
|
||
}
|
||
}
|
||
@keyframes ha-spin {
|
||
0% {
|
||
-webkit-transform: rotate(0deg);
|
||
transform: rotate(0deg);
|
||
}
|
||
100% {
|
||
-webkit-transform: rotate(359deg);
|
||
transform: rotate(359deg);
|
||
}
|
||
}
|
||
|
||
.ha-spin {
|
||
-webkit-animation: ha-spin 2s infinite linear;
|
||
animation: ha-spin 2s infinite linear;
|
||
}</style></head><body><div hidden="" by-vulcanize=""><dom-module id="paper-ripple" assetpath="../bower_components/paper-ripple/"><template><style>:host {
|
||
display: block;
|
||
position: absolute;
|
||
border-radius: inherit;
|
||
overflow: hidden;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
|
||
/* See PolymerElements/paper-behaviors/issues/34. On non-Chrome browsers,
|
||
* creating a node (with a position:absolute) in the middle of an event
|
||
* handler "interrupts" that event handler (which happens when the
|
||
* ripple is created on demand) */
|
||
pointer-events: none;
|
||
}
|
||
|
||
:host([animating]) {
|
||
/* This resolves a rendering issue in Chrome (as of 40) where the
|
||
ripple is not properly clipped by its parent (which may have
|
||
rounded corners). See: http://jsbin.com/temexa/4
|
||
|
||
Note: We only apply this style conditionally. Otherwise, the browser
|
||
will create a new compositing layer for every ripple element on the
|
||
page, and that would be bad. */
|
||
-webkit-transform: translate(0, 0);
|
||
transform: translate3d(0, 0, 0);
|
||
}
|
||
|
||
#background,
|
||
#waves,
|
||
.wave-container,
|
||
.wave {
|
||
pointer-events: none;
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
#background,
|
||
.wave {
|
||
opacity: 0;
|
||
}
|
||
|
||
#waves,
|
||
.wave {
|
||
overflow: hidden;
|
||
}
|
||
|
||
.wave-container,
|
||
.wave {
|
||
border-radius: 50%;
|
||
}
|
||
|
||
:host(.circle) #background,
|
||
:host(.circle) #waves {
|
||
border-radius: 50%;
|
||
}
|
||
|
||
:host(.circle) .wave-container {
|
||
overflow: hidden;
|
||
}</style><div id="background"></div><div id="waves"></div></template></dom-module><script>!function(){function t(t){this.element=t,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function i(t){this.element=t,this.color=window.getComputedStyle(t).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Polymer.dom(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}var e={distance:function(t,i,e,n){var s=t-e,o=i-n;return Math.sqrt(s*s+o*o)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(t,i){var n=e.distance(t,i,0,0),s=e.distance(t,i,this.width,0),o=e.distance(t,i,0,this.height),a=e.distance(t,i,this.width,this.height);return Math.max(n,s,o,a)}},i.MAX_RADIUS=300,i.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var t;return this.mouseDownStart?(t=e.now()-this.mouseDownStart,this.mouseUpStart&&(t-=this.mouseUpElapsed),t):0},get mouseUpElapsed(){return this.mouseUpStart?e.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var t=this.containerMetrics.width*this.containerMetrics.width,e=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(t+e),i.MAX_RADIUS)+5,s=1.1-.2*(n/i.MAX_RADIUS),o=this.mouseInteractionSeconds/s,a=n*(1-Math.pow(80,-o));return Math.abs(a)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var t=.3*this.mouseUpElapsedSeconds,i=this.opacity;return Math.max(0,Math.min(t,i))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,i.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,i.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new t(this.element)},draw:function(){var t,i,e;this.wave.style.opacity=this.opacity,t=this.radius/(this.containerMetrics.size/2),i=this.xNow-this.containerMetrics.width/2,e=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+i+"px, "+e+"px)",this.waveContainer.style.transform="translate3d("+i+"px, "+e+"px, 0)",this.wave.style.webkitTransform="scale("+t+","+t+")",this.wave.style.transform="scale3d("+t+","+t+",1)"},downAction:function(t){var i=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=e.now(),this.center?(this.xStart=i,this.yStart=n,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=t?t.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=t?t.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=i,this.yEnd=n,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(t){this.isMouseDown&&(this.mouseUpStart=e.now())},remove:function(){Polymer.dom(this.waveContainer.parentNode).removeChild(this.waveContainer)}},Polymer({is:"paper-ripple",behaviors:[Polymer.IronA11yKeysBehavior],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){var t,i=Polymer.dom(this).getOwnerRoot();return t=11==this.parentNode.nodeType?i.host:this.parentNode},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){this.keyEventTarget=this.target,this.listen(this.target,"up","uiUpAction"),this.listen(this.target,"down","uiDownAction")},detached:function(){this.unlisten(this.target,"up","uiUpAction"),this.unlisten(this.target,"down","uiDownAction")},get shouldKeepAnimating(){for(var t=0;t<this.ripples.length;++t)if(!this.ripples[t].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(t){this.noink||this.downAction(t)},downAction:function(t){if(!(this.holdDown&&this.ripples.length>0)){var i=this.addRipple();i.downAction(t),this._animating||this.animate()}},uiUpAction:function(t){this.noink||this.upAction(t)},upAction:function(t){this.holdDown||(this.ripples.forEach(function(i){i.upAction(t)}),this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var t=new i(this);return Polymer.dom(this.$.waves).appendChild(t.waveContainer),this.$.background.style.backgroundColor=t.color,this.ripples.push(t),this._setAnimating(!0),t},removeRipple:function(t){var i=this.ripples.indexOf(t);0>i||(this.ripples.splice(i,1),t.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){var t,i;for(this._animating=!0,t=0;t<this.ripples.length;++t)i=this.ripples[t],i.draw(),this.$.background.style.opacity=i.outerOpacity,i.isOpacityFullyDecayed&&!i.isRestingAtMaxRadius&&this.removeRipple(i);this.shouldKeepAnimating||0!==this.ripples.length?window.requestAnimationFrame(this._boundAnimate):this.onAnimationComplete()},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(t,i){void 0!==i&&(t?this.downAction():this.upAction())}})}();</script><dom-module id="paper-checkbox" assetpath="../bower_components/paper-checkbox/"><template strip-whitespace=""><style>:host {
|
||
display: inline-block;
|
||
white-space: nowrap;
|
||
cursor: pointer;
|
||
}
|
||
|
||
:host(:focus) {
|
||
outline: none;
|
||
}
|
||
|
||
.hidden {
|
||
display: none;
|
||
}
|
||
|
||
#checkboxContainer {
|
||
display: inline-block;
|
||
position: relative;
|
||
width: 18px;
|
||
height: 18px;
|
||
min-width: 18px;
|
||
vertical-align: middle;
|
||
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
|
||
}
|
||
|
||
#ink {
|
||
position: absolute;
|
||
top: -15px;
|
||
left: -15px;
|
||
width: 48px;
|
||
height: 48px;
|
||
color: var(--paper-checkbox-unchecked-ink-color, --primary-text-color);
|
||
opacity: 0.6;
|
||
pointer-events: none;
|
||
}
|
||
|
||
:host-context([dir="rtl"]) #ink {
|
||
right: -15px;
|
||
left: auto;
|
||
}
|
||
|
||
#ink[checked] {
|
||
color: var(--paper-checkbox-checked-ink-color, --default-primary-color);
|
||
}
|
||
|
||
#checkbox {
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
height: 100%;
|
||
border: solid 2px;
|
||
border-color: var(--paper-checkbox-unchecked-color, --primary-text-color);
|
||
border-radius: 2px;
|
||
pointer-events: none;
|
||
-webkit-transition: background-color 140ms, border-color 140ms;
|
||
transition: background-color 140ms, border-color 140ms;
|
||
}
|
||
|
||
/* checkbox checked animations */
|
||
#checkbox.checked #checkmark {
|
||
-webkit-animation: checkmark-expand 140ms ease-out forwards;
|
||
animation: checkmark-expand 140ms ease-out forwards;
|
||
}
|
||
|
||
@-webkit-keyframes checkmark-expand {
|
||
0% {
|
||
-webkit-transform: scale(0, 0) rotate(45deg);
|
||
}
|
||
100% {
|
||
-webkit-transform: scale(1, 1) rotate(45deg);
|
||
}
|
||
}
|
||
|
||
@keyframes checkmark-expand {
|
||
0% {
|
||
transform: scale(0, 0) rotate(45deg);
|
||
}
|
||
100% {
|
||
transform: scale(1, 1) rotate(45deg);
|
||
}
|
||
}
|
||
|
||
#checkbox.checked {
|
||
background-color: var(--paper-checkbox-checked-color, --default-primary-color);
|
||
border-color: var(--paper-checkbox-checked-color, --default-primary-color);
|
||
}
|
||
|
||
#checkmark {
|
||
position: absolute;
|
||
width: 5px;
|
||
height: 10px;
|
||
border-style: solid;
|
||
border-top: none;
|
||
border-left: none;
|
||
border-right-width: 2px;
|
||
border-bottom-width: 2px;
|
||
border-color: var(--paper-checkbox-checkmark-color, white);
|
||
transform-origin: 97% 86%;
|
||
-webkit-transform-origin: 97% 86%;
|
||
}
|
||
|
||
/* label */
|
||
#checkboxLabel {
|
||
position: relative;
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
padding-left: var(--paper-checkbox-label-spacing, 8px);
|
||
white-space: normal;
|
||
pointer-events: none;
|
||
color: var(--paper-checkbox-label-color, --primary-text-color);
|
||
}
|
||
|
||
:host-context([dir="rtl"]) #checkboxLabel {
|
||
padding-right: var(--paper-checkbox-label-spacing, 8px);
|
||
padding-left: 0;
|
||
}
|
||
|
||
#checkboxLabel[hidden] {
|
||
display: none;
|
||
}
|
||
|
||
/* disabled state */
|
||
:host([disabled]) {
|
||
pointer-events: none;
|
||
}
|
||
|
||
:host([disabled]) #checkbox {
|
||
opacity: 0.5;
|
||
border-color: var(--paper-checkbox-unchecked-color, --primary-text-color);
|
||
}
|
||
|
||
:host([disabled][checked]) #checkbox {
|
||
background-color: var(--paper-checkbox-unchecked-color, --primary-text-color);
|
||
opacity: 0.5;
|
||
}
|
||
|
||
:host([disabled]) #checkboxLabel {
|
||
opacity: 0.65;
|
||
}
|
||
|
||
/* invalid state */
|
||
#checkbox.invalid:not(.checked) {
|
||
border-color: var(--paper-checkbox-error-color, --google-red-500);
|
||
}</style><div id="checkboxContainer"><div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]"><div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div></div></div><div id="checkboxLabel"><content></content></div></template><script>Polymer({is:"paper-checkbox",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},_computeCheckboxClass:function(e,r){var t="";return e&&(t+="checked "),r&&(t+="invalid"),t},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)}});</script></dom-module><dom-module id="paper-material" assetpath="../bower_components/paper-material/"><template><style>:host {
|
||
display: block;
|
||
position: relative;
|
||
}
|
||
|
||
:host([animated]) {
|
||
@apply(--shadow-transition);
|
||
}
|
||
|
||
:host([elevation="1"]) {
|
||
@apply(--shadow-elevation-2dp);
|
||
}
|
||
|
||
:host([elevation="2"]) {
|
||
@apply(--shadow-elevation-4dp);
|
||
}
|
||
|
||
:host([elevation="3"]) {
|
||
@apply(--shadow-elevation-6dp);
|
||
}
|
||
|
||
:host([elevation="4"]) {
|
||
@apply(--shadow-elevation-8dp);
|
||
}
|
||
|
||
:host([elevation="5"]) {
|
||
@apply(--shadow-elevation-16dp);
|
||
}</style><content></content></template></dom-module><script>Polymer({is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});</script><dom-module id="paper-button" assetpath="../bower_components/paper-button/"><template strip-whitespace=""><style include="paper-material">:host {
|
||
display: inline-block;
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
min-width: 5.14em;
|
||
margin: 0 0.29em;
|
||
background: transparent;
|
||
text-align: center;
|
||
font: inherit;
|
||
text-transform: uppercase;
|
||
outline-width: 0;
|
||
border-radius: 3px;
|
||
-moz-user-select: none;
|
||
-ms-user-select: none;
|
||
-webkit-user-select: none;
|
||
user-select: none;
|
||
cursor: pointer;
|
||
z-index: 0;
|
||
padding: 0.7em 0.57em;
|
||
|
||
@apply(--paper-button);
|
||
}
|
||
|
||
:host([raised].keyboard-focus) {
|
||
font-weight: bold;
|
||
@apply(--paper-button-raised-keyboard-focus);
|
||
}
|
||
|
||
:host(:not([raised]).keyboard-focus) {
|
||
font-weight: bold;
|
||
@apply(--paper-button-flat-keyboard-focus);
|
||
}
|
||
|
||
:host([disabled]) {
|
||
background: #eaeaea;
|
||
color: #a8a8a8;
|
||
cursor: auto;
|
||
pointer-events: none;
|
||
|
||
@apply(--paper-button-disabled);
|
||
}
|
||
|
||
paper-ripple {
|
||
color: var(--paper-button-ink-color);
|
||
}
|
||
|
||
:host > ::content * {
|
||
text-transform: inherit;
|
||
}</style><content></content></template></dom-module><script>Polymer({is:"paper-button",behaviors:[Polymer.PaperButtonBehavior],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this):this.elevation=0}});</script><dom-module id="paper-input-container" assetpath="../bower_components/paper-input/"><template><style>:host {
|
||
display: block;
|
||
padding: 8px 0;
|
||
|
||
@apply(--paper-input-container);
|
||
}
|
||
|
||
:host[inline] {
|
||
display: inline-block;
|
||
}
|
||
|
||
:host([disabled]) {
|
||
pointer-events: none;
|
||
opacity: 0.33;
|
||
|
||
@apply(--paper-input-container-disabled);
|
||
}
|
||
|
||
.floated-label-placeholder {
|
||
@apply(--paper-font-caption);
|
||
}
|
||
|
||
.underline {
|
||
position: relative;
|
||
}
|
||
|
||
.focused-line {
|
||
height: 2px;
|
||
@apply(--layout-fit);
|
||
|
||
-webkit-transform-origin: center center;
|
||
transform-origin: center center;
|
||
-webkit-transform: scale3d(0,1,1);
|
||
transform: scale3d(0,1,1);
|
||
|
||
background: var(--paper-input-container-focus-color, --default-primary-color);
|
||
|
||
@apply(--paper-input-container-underline-focus);
|
||
}
|
||
|
||
.underline.is-highlighted .focused-line {
|
||
-webkit-transform: none;
|
||
transform: none;
|
||
-webkit-transition: -webkit-transform 0.25s;
|
||
transition: transform 0.25s;
|
||
|
||
@apply(--paper-transition-easing);
|
||
}
|
||
|
||
.underline.is-invalid .focused-line {
|
||
background: var(--paper-input-container-invalid-color, --google-red-500);
|
||
|
||
-webkit-transform: none;
|
||
transform: none;
|
||
-webkit-transition: -webkit-transform 0.25s;
|
||
transition: transform 0.25s;
|
||
|
||
@apply(--paper-transition-easing);
|
||
}
|
||
|
||
.unfocused-line {
|
||
height: 1px;
|
||
@apply(--layout-fit);
|
||
background: var(--paper-input-container-color, --secondary-text-color);
|
||
|
||
@apply(--paper-input-container-underline);
|
||
}
|
||
|
||
:host([disabled]) .unfocused-line {
|
||
border-bottom: 1px dashed;
|
||
border-color: var(--paper-input-container-color, --secondary-text-color);
|
||
background: transparent;
|
||
|
||
@apply(--paper-input-container-underline-disabled);
|
||
}
|
||
|
||
.label-and-input-container {
|
||
@apply(--layout-flex);
|
||
@apply(--layout-relative);
|
||
}
|
||
|
||
.input-content {
|
||
position: relative;
|
||
@apply(--layout-horizontal);
|
||
@apply(--layout-end);
|
||
}
|
||
|
||
.input-content ::content label,
|
||
.input-content ::content .paper-input-label {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
left: 0;
|
||
font: inherit;
|
||
color: var(--paper-input-container-color, --secondary-text-color);
|
||
|
||
@apply(--paper-font-common-nowrap);
|
||
@apply(--paper-font-subhead);
|
||
@apply(--paper-input-container-label);
|
||
}
|
||
|
||
.input-content.label-is-floating ::content label,
|
||
.input-content.label-is-floating ::content .paper-input-label {
|
||
-webkit-transform: translateY(-75%) scale(0.75);
|
||
transform: translateY(-75%) scale(0.75);
|
||
-webkit-transition: -webkit-transform 0.25s;
|
||
transition: transform 0.25s;
|
||
|
||
-webkit-transform-origin: left top;
|
||
transform-origin: left top;
|
||
|
||
/* Since we scale to 75/100 of the size, we actually have 100/75 of the
|
||
original space now available */
|
||
width: 133%;
|
||
|
||
@apply(--paper-transition-easing);
|
||
}
|
||
|
||
:host-context([dir="rtl"]) .input-content.label-is-floating ::content label,
|
||
:host-context([dir="rtl"]) .input-content.label-is-floating ::content .paper-input-label {
|
||
/* TODO(noms): Figure out why leaving the width at 133% before the animation
|
||
* actually makes
|
||
* it wider on the right side, not left side, as you would expect in RTL */
|
||
width: 100%;
|
||
-webkit-transform-origin: right top;
|
||
transform-origin: right top;
|
||
}
|
||
|
||
.input-content.label-is-highlighted ::content label,
|
||
.input-content.label-is-highlighted ::content .paper-input-label {
|
||
color: var(--paper-input-container-focus-color, --default-primary-color);
|
||
|
||
@apply(--paper-input-container-label-focus);
|
||
}
|
||
|
||
.input-content.is-invalid ::content label,
|
||
.input-content.is-invalid ::content .paper-input-label {
|
||
color: var(--paper-input-container-invalid-color, --google-red-500);
|
||
}
|
||
|
||
.input-content.label-is-hidden ::content label,
|
||
.input-content.label-is-hidden ::content .paper-input-label {
|
||
visibility: hidden;
|
||
}
|
||
|
||
.input-content ::content input,
|
||
.input-content ::content textarea,
|
||
.input-content ::content iron-autogrow-textarea,
|
||
.input-content ::content .paper-input-input {
|
||
position: relative; /* to make a stacking context */
|
||
outline: none;
|
||
box-shadow: none;
|
||
padding: 0;
|
||
width: 100%;
|
||
background: transparent;
|
||
border: none;
|
||
color: var(--paper-input-container-input-color, --primary-text-color);
|
||
-webkit-appearance: none;
|
||
text-align: inherit;
|
||
|
||
@apply(--paper-font-subhead);
|
||
@apply(--paper-input-container-input);
|
||
}
|
||
|
||
::content [prefix] {
|
||
@apply(--paper-font-subhead);
|
||
@apply(--paper-input-prefix);
|
||
}
|
||
|
||
::content [suffix] {
|
||
@apply(--paper-font-subhead);
|
||
@apply(--paper-input-suffix);
|
||
}
|
||
|
||
/* Firefox sets a min-width on the input, which can cause layout issues */
|
||
.input-content ::content input {
|
||
min-width: 0;
|
||
}
|
||
|
||
.input-content ::content textarea {
|
||
resize: none;
|
||
}
|
||
|
||
.add-on-content {
|
||
position: relative;
|
||
}
|
||
|
||
.add-on-content.is-invalid ::content * {
|
||
color: var(--paper-input-container-invalid-color, --google-red-500);
|
||
}
|
||
|
||
.add-on-content.is-highlighted ::content * {
|
||
color: var(--paper-input-container-focus-color, --default-primary-color);
|
||
}</style><template is="dom-if" if="[[!noLabelFloat]]"><div class="floated-label-placeholder"> </div></template><div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]"><content select="[prefix]" id="prefix"></content><div class="label-and-input-container" id="labelAndInputContainer"><content select=":not([add-on]):not([prefix]):not([suffix])"></content></div><content select="[suffix]"></content></div><div class$="[[_computeUnderlineClass(focused,invalid)]]"><div class="unfocused-line"></div><div class="focused-line"></div></div><div class$="[[_computeAddOnContentClass(focused,invalid)]]"><content id="addOnContent" select="[add-on]"></content></div></template></dom-module><script>Polymer({is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return Polymer.CaseMap.dashToCamelCase(this.attrForValue)},get _inputElement(){return Polymer.dom(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0),this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput)},attached:function(){""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(t){this._addons||(this._addons=[]);var n=t.target;-1===this._addons.indexOf(n)&&(this._addons.push(n),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(t){this._handleValueAndAutoValidate(t.target)},_onValueChanged:function(t){this._handleValueAndAutoValidate(t.target)},_handleValue:function(t){var n=this._inputElementValue;n||0===n||"number"===t.type&&!t.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:t,value:n,invalid:this.invalid})},_handleValueAndAutoValidate:function(t){if(this.autoValidate){var n;n=t.validate?t.validate(this._inputElementValue):t.checkValidity(),this.invalid=!n}this._handleValue(t)},_onIronInputValidate:function(t){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(t){for(var n,e=0;n=this._addons[e];e++)n.update(t)},_computeInputContentClass:function(t,n,e,i,a){var u="input-content";if(t)a&&(u+=" label-is-hidden");else{var o=this.querySelector("label");n||a?(u+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",i?u+=" is-invalid":e&&(u+=" label-is-highlighted")):o&&(this.$.labelAndInputContainer.style.position="relative")}return u},_computeUnderlineClass:function(t,n){var e="underline";return n?e+=" is-invalid":t&&(e+=" is-highlighted"),e},_computeAddOnContentClass:function(t,n){var e="add-on-content";return n?e+=" is-invalid":t&&(e+=" is-highlighted"),e}});</script><dom-module id="paper-input-error" assetpath="../bower_components/paper-input/"><template><style>:host {
|
||
display: inline-block;
|
||
visibility: hidden;
|
||
|
||
color: var(--paper-input-container-invalid-color, --google-red-500);
|
||
|
||
@apply(--paper-font-caption);
|
||
@apply(--paper-input-error);
|
||
position: absolute;
|
||
left:0;
|
||
right:0;
|
||
}
|
||
|
||
:host([invalid]) {
|
||
visibility: visible;
|
||
};</style><content></content></template></dom-module><script>Polymer({is:"paper-input-error",behaviors:[Polymer.PaperInputAddonBehavior],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}});</script><dom-module id="paper-spinner-styles" assetpath="../bower_components/paper-spinner/"><template><style>/*
|
||
/**************************/
|
||
/* STYLES FOR THE SPINNER */
|
||
/**************************/
|
||
|
||
/*
|
||
* Constants:
|
||
* STROKEWIDTH = 3px
|
||
* ARCSIZE = 270 degrees (amount of circle the arc takes up)
|
||
* ARCTIME = 1333ms (time it takes to expand and contract arc)
|
||
* ARCSTARTROT = 216 degrees (how much the start location of the arc
|
||
* should rotate each time, 216 gives us a
|
||
* 5 pointed star shape (it's 360/5 * 3).
|
||
* For a 7 pointed star, we might do
|
||
* 360/7 * 3 = 154.286)
|
||
* CONTAINERWIDTH = 28px
|
||
* SHRINK_TIME = 400ms
|
||
*/
|
||
|
||
:host {
|
||
display: inline-block;
|
||
position: relative;
|
||
width: 28px; /* CONTAINERWIDTH */
|
||
height: 28px; /* CONTAINERWIDTH */
|
||
}
|
||
|
||
#spinnerContainer {
|
||
width: 100%;
|
||
height: 100%;
|
||
|
||
/* The spinner does not have any contents that would have to be
|
||
* flipped if the direction changes. Always use ltr so that the
|
||
* style works out correctly in both cases. */
|
||
direction: ltr;
|
||
}
|
||
|
||
#spinnerContainer.active {
|
||
/* duration: 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */
|
||
-webkit-animation: container-rotate 1568ms linear infinite;
|
||
animation: container-rotate 1568ms linear infinite;
|
||
}
|
||
|
||
@-webkit-keyframes container-rotate {
|
||
to { -webkit-transform: rotate(360deg) }
|
||
}
|
||
|
||
@keyframes container-rotate {
|
||
to { transform: rotate(360deg) }
|
||
}
|
||
|
||
.spinner-layer {
|
||
position: absolute;
|
||
width: 100%;
|
||
height: 100%;
|
||
opacity: 0;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.layer-1 {
|
||
border-color: var(--paper-spinner-layer-1-color, --google-blue-500);
|
||
}
|
||
|
||
.layer-2 {
|
||
border-color: var(--paper-spinner-layer-2-color, --google-red-500);
|
||
}
|
||
|
||
.layer-3 {
|
||
border-color: var(--paper-spinner-layer-3-color, --google-yellow-500);
|
||
}
|
||
|
||
.layer-4 {
|
||
border-color: var(--paper-spinner-layer-4-color, --google-green-500);
|
||
}
|
||
|
||
/**
|
||
* IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee):
|
||
*
|
||
* iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't
|
||
* guarantee that the animation will start _exactly_ after that value. So we avoid using
|
||
* animation-delay and instead set custom keyframes for each color (as layer-2undant as it
|
||
* seems).
|
||
*
|
||
* We write out each animation in full (instead of separating animation-name,
|
||
* animation-duration, etc.) because under the polyfill, Safari does not recognize those
|
||
* specific properties properly, treats them as -webkit-animation, and overrides the
|
||
* other animation rules. See https://github.com/Polymer/platform/issues/53.
|
||
*/
|
||
.active .spinner-layer.layer-1 {
|
||
/* durations: 4 * ARCTIME */
|
||
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-1-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-1-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
}
|
||
|
||
.active .spinner-layer.layer-2 {
|
||
/* durations: 4 * ARCTIME */
|
||
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-2-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-2-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
}
|
||
|
||
.active .spinner-layer.layer-3 {
|
||
/* durations: 4 * ARCTIME */
|
||
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-3-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-3-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
}
|
||
|
||
.active .spinner-layer.layer-4 {
|
||
/* durations: 4 * ARCTIME */
|
||
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-4-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-4-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
}
|
||
|
||
@-webkit-keyframes fill-unfill-rotate {
|
||
12.5% { -webkit-transform: rotate(135deg); } /* 0.5 * ARCSIZE */
|
||
25% { -webkit-transform: rotate(270deg); } /* 1 * ARCSIZE */
|
||
37.5% { -webkit-transform: rotate(405deg); } /* 1.5 * ARCSIZE */
|
||
50% { -webkit-transform: rotate(540deg); } /* 2 * ARCSIZE */
|
||
62.5% { -webkit-transform: rotate(675deg); } /* 2.5 * ARCSIZE */
|
||
75% { -webkit-transform: rotate(810deg); } /* 3 * ARCSIZE */
|
||
87.5% { -webkit-transform: rotate(945deg); } /* 3.5 * ARCSIZE */
|
||
to { -webkit-transform: rotate(1080deg); } /* 4 * ARCSIZE */
|
||
}
|
||
|
||
@keyframes fill-unfill-rotate {
|
||
12.5% { transform: rotate(135deg); } /* 0.5 * ARCSIZE */
|
||
25% { transform: rotate(270deg); } /* 1 * ARCSIZE */
|
||
37.5% { transform: rotate(405deg); } /* 1.5 * ARCSIZE */
|
||
50% { transform: rotate(540deg); } /* 2 * ARCSIZE */
|
||
62.5% { transform: rotate(675deg); } /* 2.5 * ARCSIZE */
|
||
75% { transform: rotate(810deg); } /* 3 * ARCSIZE */
|
||
87.5% { transform: rotate(945deg); } /* 3.5 * ARCSIZE */
|
||
to { transform: rotate(1080deg); } /* 4 * ARCSIZE */
|
||
}
|
||
|
||
/**
|
||
* HACK: Even though the intention is to have the current .spinner-layer at
|
||
* `opacity: 1`, we set it to `opacity: 0.99` instead since this forces Chrome
|
||
* to do proper subpixel rendering for the elements being animated. This is
|
||
* especially visible in Chrome 39 on Ubuntu 14.04. See:
|
||
*
|
||
* - https://github.com/Polymer/paper-spinner/issues/9
|
||
* - https://code.google.com/p/chromium/issues/detail?id=436255
|
||
*/
|
||
@-webkit-keyframes layer-1-fade-in-out {
|
||
from { opacity: 0.99; }
|
||
25% { opacity: 0.99; }
|
||
26% { opacity: 0; }
|
||
89% { opacity: 0; }
|
||
90% { opacity: 0.99; }
|
||
100% { opacity: 0.99; }
|
||
}
|
||
|
||
@keyframes layer-1-fade-in-out {
|
||
from { opacity: 0.99; }
|
||
25% { opacity: 0.99; }
|
||
26% { opacity: 0; }
|
||
89% { opacity: 0; }
|
||
90% { opacity: 0.99; }
|
||
100% { opacity: 0.99; }
|
||
}
|
||
|
||
@-webkit-keyframes layer-2-fade-in-out {
|
||
from { opacity: 0; }
|
||
15% { opacity: 0; }
|
||
25% { opacity: 0.99; }
|
||
50% { opacity: 0.99; }
|
||
51% { opacity: 0; }
|
||
}
|
||
|
||
@keyframes layer-2-fade-in-out {
|
||
from { opacity: 0; }
|
||
15% { opacity: 0; }
|
||
25% { opacity: 0.99; }
|
||
50% { opacity: 0.99; }
|
||
51% { opacity: 0; }
|
||
}
|
||
|
||
@-webkit-keyframes layer-3-fade-in-out {
|
||
from { opacity: 0; }
|
||
40% { opacity: 0; }
|
||
50% { opacity: 0.99; }
|
||
75% { opacity: 0.99; }
|
||
76% { opacity: 0; }
|
||
}
|
||
|
||
@keyframes layer-3-fade-in-out {
|
||
from { opacity: 0; }
|
||
40% { opacity: 0; }
|
||
50% { opacity: 0.99; }
|
||
75% { opacity: 0.99; }
|
||
76% { opacity: 0; }
|
||
}
|
||
|
||
@-webkit-keyframes layer-4-fade-in-out {
|
||
from { opacity: 0; }
|
||
65% { opacity: 0; }
|
||
75% { opacity: 0.99; }
|
||
90% { opacity: 0.99; }
|
||
100% { opacity: 0; }
|
||
}
|
||
|
||
@keyframes layer-4-fade-in-out {
|
||
from { opacity: 0; }
|
||
65% { opacity: 0; }
|
||
75% { opacity: 0.99; }
|
||
90% { opacity: 0.99; }
|
||
100% { opacity: 0; }
|
||
}
|
||
|
||
/**
|
||
* Patch the gap that appear between the two adjacent div.circle-clipper while the
|
||
* spinner is rotating (appears on Chrome 38, Safari 7.1, and IE 11).
|
||
*
|
||
* Update: the gap no longer appears on Chrome when .spinner-layer's opacity is 0.99,
|
||
* but still does on Safari and IE.
|
||
*/
|
||
.gap-patch {
|
||
position: absolute;
|
||
box-sizing: border-box;
|
||
top: 0;
|
||
left: 45%;
|
||
width: 10%;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
border-color: inherit;
|
||
}
|
||
|
||
.gap-patch .circle {
|
||
width: 1000%;
|
||
left: -450%;
|
||
}
|
||
|
||
.circle-clipper {
|
||
display: inline-block;
|
||
position: relative;
|
||
width: 50%;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
border-color: inherit;
|
||
}
|
||
|
||
.circle-clipper .circle {
|
||
width: 200%;
|
||
}
|
||
|
||
.circle {
|
||
box-sizing: border-box;
|
||
height: 100%;
|
||
border-width: 3px; /* STROKEWIDTH */
|
||
border-style: solid;
|
||
border-color: inherit;
|
||
border-bottom-color: transparent !important;
|
||
border-radius: 50%;
|
||
-webkit-animation: none;
|
||
animation: none;
|
||
|
||
@apply(--layout-fit);
|
||
}
|
||
|
||
.circle-clipper.left .circle {
|
||
border-right-color: transparent !important;
|
||
-webkit-transform: rotate(129deg);
|
||
transform: rotate(129deg);
|
||
}
|
||
|
||
.circle-clipper.right .circle {
|
||
left: -100%;
|
||
border-left-color: transparent !important;
|
||
-webkit-transform: rotate(-129deg);
|
||
transform: rotate(-129deg);
|
||
}
|
||
|
||
.active .circle-clipper.left .circle {
|
||
/* duration: ARCTIME */
|
||
-webkit-animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
}
|
||
|
||
.active .circle-clipper.right .circle {
|
||
/* duration: ARCTIME */
|
||
-webkit-animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
|
||
}
|
||
|
||
@-webkit-keyframes left-spin {
|
||
from { -webkit-transform: rotate(130deg); }
|
||
50% { -webkit-transform: rotate(-5deg); }
|
||
to { -webkit-transform: rotate(130deg); }
|
||
}
|
||
|
||
@keyframes left-spin {
|
||
from { transform: rotate(130deg); }
|
||
50% { transform: rotate(-5deg); }
|
||
to { transform: rotate(130deg); }
|
||
}
|
||
|
||
@-webkit-keyframes right-spin {
|
||
from { -webkit-transform: rotate(-130deg); }
|
||
50% { -webkit-transform: rotate(5deg); }
|
||
to { -webkit-transform: rotate(-130deg); }
|
||
}
|
||
|
||
@keyframes right-spin {
|
||
from { transform: rotate(-130deg); }
|
||
50% { transform: rotate(5deg); }
|
||
to { transform: rotate(-130deg); }
|
||
}
|
||
|
||
#spinnerContainer.cooldown {
|
||
/* duration: SHRINK_TIME */
|
||
-webkit-animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
|
||
animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
|
||
}
|
||
|
||
@-webkit-keyframes fade-out {
|
||
from { opacity: 0.99; }
|
||
to { opacity: 0; }
|
||
}
|
||
|
||
@keyframes fade-out {
|
||
from { opacity: 0.99; }
|
||
to { opacity: 0; }
|
||
}</style></template></dom-module><dom-module id="paper-spinner" assetpath="../bower_components/paper-spinner/"><template><style include="paper-spinner-styles"></style><div id="spinnerContainer" class-name="[[_spinnerContainerClassName]]"><div class="spinner-layer layer-1"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer layer-2"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer layer-3"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer layer-4"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div></div></template><script>Polymer({is:"paper-spinner",listeners:{animationend:"reset",webkitAnimationEnd:"reset"},properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_activeChanged"},alt:{type:String,value:"loading",observer:"_altChanged"},_coolingDown:{type:Boolean,value:!1},_spinnerContainerClassName:{type:String,computed:"_computeSpinnerContainerClassName(active, _coolingDown)"}},_computeSpinnerContainerClassName:function(e,t){return[e||t?"active":"",t?"cooldown":""].join(" ")},_activeChanged:function(e,t){this._setAriaHidden(!e),this._coolingDown=!e&&t},_altChanged:function(e){e===this.getPropertyInfo("alt").value?this.alt=this.getAttribute("aria-label")||e:(this._setAriaHidden(""===e),this.setAttribute("aria-label",e))},_setAriaHidden:function(e){var t="aria-hidden";e?this.setAttribute(t,"true"):this.removeAttribute(t)},reset:function(){this.active=!1,this._coolingDown=!1}});</script></dom-module><dom-module id="login-form" assetpath="layouts/"><style>:host {
|
||
white-space: nowrap;
|
||
}
|
||
|
||
#passwordDecorator {
|
||
display: block;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
paper-checkbox {
|
||
margin-right: 8px;
|
||
}
|
||
|
||
paper-checkbox::shadow #checkbox.checked {
|
||
background-color: #03a9f4;
|
||
border-color: #03a9f4;
|
||
}
|
||
|
||
paper-checkbox::shadow #ink[checked] {
|
||
color: #03a9f4;
|
||
}
|
||
|
||
paper-button {
|
||
margin-left: 72px;
|
||
}
|
||
|
||
.interact {
|
||
height: 125px;
|
||
}
|
||
|
||
#validatebox {
|
||
margin-top: 16px;
|
||
text-align: center;
|
||
}
|
||
|
||
.validatemessage {
|
||
margin-top: 10px;
|
||
}</style><template><div class="layout vertical center center-center fit"><img src="/static/favicon-192x192.png" height="192"> <a href="#" id="hideKeyboardOnFocus"></a><div class="interact"><div id="loginform" hidden$="[[showLoading]]"><paper-input-container id="passwordDecorator" invalid="[[isInvalid]]"><label>Password</label><input is="iron-input" type="password" id="passwordInput"><paper-input-error invalid="[[isInvalid]]">[[errorMessage]]</paper-input-error></paper-input-container><div class="layout horizontal center"><paper-checkbox for="" id="rememberLogin">Remember</paper-checkbox><paper-button id="loginButton">Log In</paper-button></div></div><div id="validatebox" hidden$="[[!showLoading]]"><paper-spinner active="true"></paper-spinner><br><div class="validatemessage">Loading data</div></div></div></div></template></dom-module><dom-module id="paper-drawer-panel" assetpath="../bower_components/paper-drawer-panel/"><template><style>:host {
|
||
display: block;
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
}
|
||
|
||
iron-selector > #drawer {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
height: 100%;
|
||
background-color: white;
|
||
|
||
-moz-box-sizing: border-box;
|
||
box-sizing: border-box;
|
||
|
||
@apply(--paper-drawer-panel-drawer-container);
|
||
}
|
||
|
||
.transition > #drawer {
|
||
transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s;
|
||
transition: transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s;
|
||
}
|
||
|
||
.left-drawer > #drawer {
|
||
@apply(--paper-drawer-panel-left-drawer-container);
|
||
}
|
||
|
||
.right-drawer > #drawer {
|
||
left: auto;
|
||
right: 0;
|
||
|
||
@apply(--paper-drawer-panel-right-drawer-container);
|
||
}
|
||
|
||
iron-selector > #main {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
|
||
@apply(--paper-drawer-panel-main-container);
|
||
}
|
||
|
||
.transition > #main {
|
||
transition: left ease-in-out 0.3s, padding ease-in-out 0.3s;
|
||
}
|
||
|
||
.right-drawer > #main {
|
||
left: 0;
|
||
}
|
||
|
||
.right-drawer.transition > #main {
|
||
transition: right ease-in-out 0.3s, padding ease-in-out 0.3s;
|
||
}
|
||
|
||
#main > ::content > [main] {
|
||
height: 100%;
|
||
}
|
||
|
||
#drawer > ::content > [drawer] {
|
||
height: 100%;
|
||
}
|
||
|
||
#scrim {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
visibility: hidden;
|
||
opacity: 0;
|
||
transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;
|
||
background-color: rgba(0, 0, 0, 0.3);
|
||
|
||
@apply(--paper-drawer-panel-scrim);
|
||
}
|
||
|
||
.narrow-layout > #drawer {
|
||
will-change: transform;
|
||
}
|
||
|
||
.narrow-layout > #drawer.iron-selected {
|
||
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
|
||
}
|
||
|
||
.right-drawer.narrow-layout > #drawer.iron-selected {
|
||
box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
|
||
}
|
||
|
||
.narrow-layout > #drawer > ::content > [drawer] {
|
||
border: 0;
|
||
}
|
||
|
||
.left-drawer.narrow-layout > #drawer:not(.iron-selected) {
|
||
-webkit-transform: translateX(-100%);
|
||
transform: translateX(-100%);
|
||
}
|
||
|
||
.right-drawer.narrow-layout > #drawer:not(.iron-selected) {
|
||
left: auto;
|
||
visibility: hidden;
|
||
|
||
-webkit-transform: translateX(100%);
|
||
transform: translateX(100%);
|
||
}
|
||
|
||
.right-drawer.narrow-layout.dragging > #drawer:not(.iron-selected),
|
||
.right-drawer.narrow-layout.peeking > #drawer:not(.iron-selected) {
|
||
visibility: visible;
|
||
}
|
||
|
||
.narrow-layout > #main {
|
||
padding: 0;
|
||
}
|
||
|
||
.right-drawer.narrow-layout > #main {
|
||
left: 0;
|
||
right: 0;
|
||
}
|
||
|
||
.narrow-layout > #main:not(.iron-selected) > #scrim,
|
||
.dragging > #main > #scrim {
|
||
visibility: visible;
|
||
opacity: var(--paper-drawer-panel-scrim-opacity, 1);
|
||
}
|
||
|
||
.narrow-layout > #main > * {
|
||
margin: 0;
|
||
min-height: 100%;
|
||
left: 0;
|
||
right: 0;
|
||
|
||
-moz-box-sizing: border-box;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||
display: none;
|
||
}</style><iron-media-query id="mq" on-query-matches-changed="_onQueryMatchesChanged" query="[[_computeMediaQuery(forceNarrow, responsiveWidth)]]"></iron-media-query><iron-selector attr-for-selected="id" class$="[[_computeIronSelectorClass(narrow, _transition, dragging, rightDrawer, peeking)]]" activate-event="" selected="[[selected]]"><div id="main" style$="[[_computeMainStyle(narrow, rightDrawer, drawerWidth)]]" on-transitionend="_onMainTransitionEnd"><content select="[main]"></content><div id="scrim" on-tap="closeDrawer"></div></div><div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]"><content select="[drawer]"></content></div></iron-selector></template><script>!function(){"use strict";function e(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&e[i]&&t.push(i);return t.join(" ")}var t=null;Polymer({is:"paper-drawer-panel",behaviors:[Polymer.IronResizableBehavior],properties:{defaultSelected:{type:String,value:"main"},disableEdgeSwipe:{type:Boolean,value:!1},disableSwipe:{type:Boolean,value:!1},dragging:{type:Boolean,value:!1,readOnly:!0,notify:!0},drawerWidth:{type:String,value:"256px"},edgeSwipeSensitivity:{type:Number,value:30},forceNarrow:{type:Boolean,value:!1},hasTransform:{type:Boolean,value:function(){return"transform"in this.style}},hasWillChange:{type:Boolean,value:function(){return"willChange"in this.style}},narrow:{reflectToAttribute:!0,type:Boolean,value:!1,readOnly:!0,notify:!0},peeking:{type:Boolean,value:!1,readOnly:!0,notify:!0},responsiveWidth:{type:String,value:"600px"},rightDrawer:{type:Boolean,value:!1},selected:{reflectToAttribute:!0,notify:!0,type:String,value:null},drawerToggleAttribute:{type:String,value:"paper-drawer-toggle"},_transition:{type:Boolean,value:!1}},listeners:{tap:"_onTap",track:"_onTrack",down:"_downHandler",up:"_upHandler"},observers:["_forceNarrowChanged(forceNarrow, defaultSelected)"],togglePanel:function(){this._isMainSelected()?this.openDrawer():this.closeDrawer()},openDrawer:function(){this.selected="drawer"},closeDrawer:function(){this.selected="main"},ready:function(){this._transition=!0},_onMainTransitionEnd:function(e){e.currentTarget!==this.$.main||"left"!==e.propertyName&&"right"!==e.propertyName||this.notifyResize()},_computeIronSelectorClass:function(t,i,r,n,a){return e({dragging:r,"narrow-layout":t,"right-drawer":n,"left-drawer":!n,transition:i,peeking:a})},_computeDrawerStyle:function(e){return"width:"+e+";"},_computeMainStyle:function(e,t,i){var r="";return r+="left:"+(e||t?"0":i)+";",t&&(r+="right:"+(e?"":i)+";"),r},_computeMediaQuery:function(e,t){return e?"":"(max-width: "+t+")"},_computeSwipeOverlayHidden:function(e,t){return!e||t},_onTrack:function(e){if(!t||this===t)switch(e.detail.state){case"start":this._trackStart(e);break;case"track":this._trackX(e);break;case"end":this._trackEnd(e)}},_responsiveChange:function(e){this._setNarrow(e),this.narrow&&(this.selected=this.defaultSelected),this.setScrollDirection(this._swipeAllowed()?"y":"all"),this.fire("paper-responsive-change",{narrow:this.narrow})},_onQueryMatchesChanged:function(e){this._responsiveChange(e.detail.value)},_forceNarrowChanged:function(){this._responsiveChange(this.forceNarrow||this.$.mq.queryMatches)},_swipeAllowed:function(){return this.narrow&&!this.disableSwipe},_isMainSelected:function(){return"main"===this.selected},_startEdgePeek:function(){this.width=this.$.drawer.offsetWidth,this._moveDrawer(this._translateXForDeltaX(this.rightDrawer?-this.edgeSwipeSensitivity:this.edgeSwipeSensitivity)),this._setPeeking(!0)},_stopEdgePeek:function(){this.peeking&&(this._setPeeking(!1),this._moveDrawer(null))},_downHandler:function(e){!this.dragging&&this._isMainSelected()&&this._isEdgeTouch(e)&&!t&&(this._startEdgePeek(),e.preventDefault(),t=this)},_upHandler:function(){this._stopEdgePeek(),t=null},_onTap:function(e){var t=Polymer.dom(e).localTarget,i=t&&this.drawerToggleAttribute&&t.hasAttribute(this.drawerToggleAttribute);i&&this.togglePanel()},_isEdgeTouch:function(e){var t=e.detail.x;return!this.disableEdgeSwipe&&this._swipeAllowed()&&(this.rightDrawer?t>=this.offsetWidth-this.edgeSwipeSensitivity:t<=this.edgeSwipeSensitivity)},_trackStart:function(e){this._swipeAllowed()&&(t=this,this._setDragging(!0),this._isMainSelected()&&this._setDragging(this.peeking||this._isEdgeTouch(e)),this.dragging&&(this.width=this.$.drawer.offsetWidth,this._transition=!1))},_translateXForDeltaX:function(e){var t=this._isMainSelected();return this.rightDrawer?Math.max(0,t?this.width+e:e):Math.min(0,t?e-this.width:e)},_trackX:function(e){if(this.dragging){var t=e.detail.dx;if(this.peeking){if(Math.abs(t)<=this.edgeSwipeSensitivity)return;this._setPeeking(!1)}this._moveDrawer(this._translateXForDeltaX(t))}},_trackEnd:function(e){if(this.dragging){var i=e.detail.dx>0;this._setDragging(!1),this._transition=!0,t=null,this._moveDrawer(null),this.rightDrawer?this[i?"closeDrawer":"openDrawer"]():this[i?"openDrawer":"closeDrawer"]()}},_transformForTranslateX:function(e){return null===e?"":this.hasWillChange?"translateX("+e+"px)":"translate3d("+e+"px, 0, 0)"},_moveDrawer:function(e){this.transform(this._transformForTranslateX(e),this.$.drawer)}})}();</script></dom-module><dom-module id="paper-header-panel" assetpath="../bower_components/paper-header-panel/"><template><style>:host {
|
||
--paper-header-panel-shadow: {
|
||
height: 6px;
|
||
bottom: -6px;
|
||
box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);
|
||
};
|
||
|
||
@apply(--layout-vertical);
|
||
|
||
position: relative;
|
||
height: 100%;
|
||
}
|
||
|
||
#mainContainer {
|
||
@apply(--layout-flex);
|
||
|
||
position: relative;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
-webkit-overflow-scrolling: touch;
|
||
}
|
||
|
||
#mainPanel {
|
||
@apply(--layout-vertical);
|
||
@apply(--layout-flex);
|
||
|
||
position: relative;
|
||
min-height: 0;
|
||
}
|
||
|
||
/*
|
||
* mode: scroll
|
||
*/
|
||
:host([mode=scroll]) #mainContainer {
|
||
@apply(--paper-header-panel-scroll-container);
|
||
|
||
overflow: visible;
|
||
}
|
||
|
||
:host([mode=scroll]) {
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
-webkit-overflow-scrolling: touch;
|
||
}
|
||
|
||
/*
|
||
* mode: cover
|
||
*/
|
||
:host([mode=cover]) #mainContainer {
|
||
@apply(--paper-header-panel-cover-container);
|
||
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
:host([mode=cover]) #mainPanel {
|
||
position: static;
|
||
}
|
||
|
||
/*
|
||
* mode: standard
|
||
*/
|
||
:host([mode=standard]) #mainContainer {
|
||
@apply(--paper-header-panel-standard-container);
|
||
}
|
||
|
||
/*
|
||
* mode: seamed
|
||
*/
|
||
:host([mode=seamed]) #mainContainer {
|
||
@apply(--paper-header-panel-seamed-container);
|
||
}
|
||
|
||
|
||
/*
|
||
* mode: waterfall
|
||
*/
|
||
:host([mode=waterfall]) #mainContainer {
|
||
@apply(--paper-header-panel-waterfall-container);
|
||
}
|
||
|
||
/*
|
||
* mode: waterfall-tall
|
||
*/
|
||
:host([mode=waterfall-tall]) #mainContainer {
|
||
@apply(--paper-header-panel-waterfall-tall-container);
|
||
}
|
||
|
||
#dropShadow {
|
||
@apply(--paper-header-panel-shadow);
|
||
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 6px;
|
||
pointer-events: none;
|
||
|
||
-webkit-transition: opacity 0.5s;
|
||
transition: opacity 0.5s;
|
||
|
||
opacity: 0;
|
||
}
|
||
|
||
#dropShadow.has-shadow {
|
||
opacity: 1;
|
||
}</style><content id="headerContent" select="paper-toolbar, .paper-header"></content><div id="mainPanel"><div id="mainContainer" class$="[[_computeMainContainerClass(mode)]]"><content id="mainContent" select="*"></content></div><div id="dropShadow"></div></div></template><script>!function(){"use strict";var t=1,e=2,s={outerScroll:{scroll:!0},shadowMode:{standard:e,waterfall:t,"waterfall-tall":t},tallMode:{"waterfall-tall":!0}};Polymer({is:"paper-header-panel",properties:{mode:{type:String,value:"standard",observer:"_modeChanged",reflectToAttribute:!0},shadow:{type:Boolean,value:!1},tallClass:{type:String,value:"tall"},atTop:{type:Boolean,value:!0,readOnly:!0}},observers:["_computeDropShadowHidden(atTop, mode, shadow)"],ready:function(){this.scrollHandler=this._scroll.bind(this)},attached:function(){this._addListener(),this._keepScrollingState()},detached:function(){this._removeListener()},get header(){return Polymer.dom(this.$.headerContent).getDistributedNodes()[0]},get scroller(){return this._getScrollerForMode(this.mode)},get visibleShadow(){return this.$.dropShadow.classList.contains("has-shadow")},_computeDropShadowHidden:function(o,l,a){var r=s.shadowMode[l];this.shadow?this.toggleClass("has-shadow",!0,this.$.dropShadow):r===e?this.toggleClass("has-shadow",!0,this.$.dropShadow):r!==t||o?this.toggleClass("has-shadow",!1,this.$.dropShadow):this.toggleClass("has-shadow",!0,this.$.dropShadow)},_computeMainContainerClass:function(t){var e={};return e.flex="cover"!==t,Object.keys(e).filter(function(t){return e[t]}).join(" ")},_addListener:function(){this.scroller.addEventListener("scroll",this.scrollHandler,!1)},_removeListener:function(){this.scroller.removeEventListener("scroll",this.scrollHandler)},_modeChanged:function(t,e){var o=s,l=this.header,a=200;l&&(o.tallMode[e]&&!o.tallMode[t]?(l.classList.remove(this.tallClass),this.async(function(){l.classList.remove("animate")},a)):l.classList.toggle("animate",o.tallMode[t])),this._keepScrollingState()},_keepScrollingState:function(){var t=this.scroller,e=this.header;this._setAtTop(0===t.scrollTop),e&&this.tallClass&&s.tallMode[this.mode]&&this.toggleClass(this.tallClass,this.atTop||e.classList.contains(this.tallClass)&&t.scrollHeight<this.offsetHeight,e)},_scroll:function(){this._keepScrollingState(),this.fire("content-scroll",{target:this.scroller},{bubbles:!1})},_getScrollerForMode:function(t){return s.outerScroll[t]?this:this.$.mainContainer}})}();</script></dom-module><dom-module id="iron-icon" assetpath="../bower_components/iron-icon/"><style>:host {
|
||
@apply(--layout-inline);
|
||
@apply(--layout-center-center);
|
||
position: relative;
|
||
|
||
vertical-align: middle;
|
||
|
||
fill: var(--iron-icon-fill-color, currentcolor);
|
||
stroke: var(--iron-icon-stroke-color, none);
|
||
|
||
width: var(--iron-icon-width, 24px);
|
||
height: var(--iron-icon-height, 24px);
|
||
}</style><template></template><script>Polymer({is:"iron-icon",properties:{icon:{type:String,observer:"_iconChanged"},theme:{type:String,observer:"_updateIcon"},src:{type:String,observer:"_srcChanged"},_meta:{value:Polymer.Base.create("iron-meta",{type:"iconset"})}},_DEFAULT_ICONSET:"icons",_iconChanged:function(t){var i=(t||"").split(":");this._iconName=i.pop(),this._iconsetName=i.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(t){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?this._iconsetName&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon")):(this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,Polymer.dom(this.root).appendChild(this._img))}});</script></dom-module><dom-module id="paper-icon-button" assetpath="../bower_components/paper-icon-button/"><template strip-whitespace=""><style>:host {
|
||
display: inline-block;
|
||
position: relative;
|
||
padding: 8px;
|
||
outline: none;
|
||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
-ms-user-select: none;
|
||
user-select: none;
|
||
cursor: pointer;
|
||
z-index: 0;
|
||
line-height: 1;
|
||
|
||
width: 40px;
|
||
height: 40px;
|
||
|
||
/* Because of polymer/2558, this style has lower specificity than * */
|
||
box-sizing: border-box !important;
|
||
@apply(--paper-icon-button);
|
||
}
|
||
|
||
:host #ink {
|
||
color: var(--paper-icon-button-ink-color, --primary-text-color);
|
||
opacity: 0.6;
|
||
}
|
||
|
||
:host([disabled]) {
|
||
color: var(--paper-icon-button-disabled-text, --disabled-text-color);
|
||
pointer-events: none;
|
||
cursor: auto;
|
||
@apply(--paper-icon-button-disabled);
|
||
}
|
||
|
||
iron-icon {
|
||
--iron-icon-width: 100%;
|
||
--iron-icon-height: 100%;
|
||
}</style><iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon></template><script>Polymer({is:"paper-icon-button",hostAttributes:{role:"button",tabindex:"0"},behaviors:[Polymer.PaperInkyFocusBehavior],properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(t,e){var r=this.getAttribute("aria-label");r&&e!=r||this.setAttribute("aria-label",t)}});</script></dom-module><dom-module id="iron-image" assetpath="../bower_components/iron-image/"><style>:host {
|
||
display: inline-block;
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
|
||
#img {
|
||
display: block;
|
||
width: var(--iron-image-width, auto);
|
||
height: var(--iron-image-height, auto);
|
||
}
|
||
|
||
:host([sizing]) #img {
|
||
display: none;
|
||
}
|
||
|
||
#placeholder {
|
||
background-color: inherit;
|
||
opacity: 1;
|
||
@apply(--layout-fit);
|
||
@apply(--iron-image-placeholder);
|
||
}
|
||
|
||
#placeholder.faded-out {
|
||
transition: opacity 0.5s linear;
|
||
opacity: 0;
|
||
}</style><template><img id="img" role="none" hidden$="[[_computeImageVisibility(sizing)]]"><div id="placeholder" hidden$="[[_computePlaceholderVisibility(fade,loaded,preload)]]" class$="[[_computePlaceholderClassName(fade,loaded,preload)]]"></div><content></content></template></dom-module><script>Polymer({is:"iron-image",properties:{src:{observer:"_srcChanged",type:String,value:""},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null},fade:{type:Boolean,value:!1},loaded:{notify:!0,type:Boolean,value:!1},loading:{notify:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null},_placeholderBackgroundUrl:{type:String,computed:"_computePlaceholderBackgroundUrl(preload,placeholder)",observer:"_placeholderBackgroundUrlChanged"},requiresPreload:{type:Boolean,computed:"_computeRequiresPreload(preload,loaded)"},canLoad:{type:Boolean,computed:"_computeCanLoad(preventLoad, src)"}},observers:["_transformChanged(sizing, position)","_loadBehaviorChanged(canLoad, preload, loaded)","_loadStateChanged(src, preload, loaded)"],ready:function(){this.hasAttribute("role")||this.setAttribute("role","img")},_computeImageVisibility:function(){return!!this.sizing},_computePlaceholderVisibility:function(){return!this.preload||this.loaded&&!this.fade},_computePlaceholderClassName:function(){return this.preload&&this.loaded&&this.fade?"faded-out":""},_computePlaceholderBackgroundUrl:function(){return this.preload&&this.placeholder?"url("+this.placeholder+")":null},_computeRequiresPreload:function(){return this.preload&&!this.loaded},_computeCanLoad:function(){return Boolean(!this.preventLoad&&this.src)},_widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"},_heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"},_srcChanged:function(e,t){e!==t&&(this.loaded=!1)},_placeholderBackgroundUrlChanged:function(){this.$.placeholder.style.backgroundImage=this._placeholderBackgroundUrl},_transformChanged:function(){var e=this.$.placeholder.style;this.style.backgroundSize=e.backgroundSize=this.sizing,this.style.backgroundPosition=e.backgroundPosition=this.sizing?this.position:"",this.style.backgroundRepeat=e.backgroundRepeat=this.sizing?"no-repeat":""},_loadBehaviorChanged:function(){var e;this.canLoad&&(this.requiresPreload?(e=new Image,e.src=this.src,this.loading=!0,e.onload=function(){this.loading=!1,this.loaded=!0}.bind(this)):this.loaded=!0)},_loadStateChanged:function(){this.requiresPreload||(this.sizing?this.style.backgroundImage=this.src?"url("+this.src+")":"":this.$.img.src=this.src||"")}});</script><dom-module id="ha-label-badge" assetpath="components/"><style>.badge-container {
|
||
display: inline-block;
|
||
text-align: center;
|
||
vertical-align: top;
|
||
margin-bottom: 16px;
|
||
}
|
||
.label-badge {
|
||
position: relative;
|
||
display: block;
|
||
margin: 0 auto;
|
||
width: 2.5em;
|
||
text-align: center;
|
||
height: 2.5em;
|
||
line-height: 2.5em;
|
||
font-size: 1.5em;
|
||
border-radius: 50%;
|
||
border: 0.1em solid var(--ha-label-badge-color, --default-primary-color);
|
||
color: rgb(76, 76, 76);
|
||
|
||
white-space: nowrap;
|
||
background-color: white;
|
||
transition: border .3s ease-in-out;
|
||
}
|
||
.label-badge .value {
|
||
font-size: 90%;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.label-badge .value.big {
|
||
font-size: 70%;
|
||
}
|
||
.label-badge .label {
|
||
position: absolute;
|
||
bottom: -1em;
|
||
left: 0;
|
||
right: 0;
|
||
line-height: 1em;
|
||
|
||
font-size: 0.5em;
|
||
}
|
||
.label-badge .label span {
|
||
max-width: 80%;
|
||
display: inline-block;
|
||
background-color: var(--ha-label-badge-color, --default-primary-color);
|
||
color: white;
|
||
border-radius: 1em;
|
||
padding: 4px 8px;
|
||
font-weight: 500;
|
||
text-transform: uppercase;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
transition: background-color .3s ease-in-out;
|
||
}
|
||
.badge-container .title {
|
||
margin-top: 1em;
|
||
font-size: .9em;
|
||
width: 5em;
|
||
font-weight: 300;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
iron-image {
|
||
border-radius: 50%;
|
||
}</style><template><div class="badge-container"><div class="label-badge" id="badge"><div class$="[[computeClasses(value)]]"><template is="dom-if" if="[[icon]]"><iron-icon icon="[[icon]]"></iron-icon></template><template is="dom-if" if="[[value]]">[[value]]</template><template is="dom-if" if="[[image]]"><iron-image sizing="cover" class="fit" src="[[image]]"></iron-image></template></div><template is="dom-if" if="[[label]]"><div class="label"><span>[[label]]</span></div></template></div><div class="title">[[description]]</div></div></template></dom-module><dom-module id="ha-demo-badge" assetpath="components/"><style>:host {
|
||
--ha-label-badge-color: #dac90d;
|
||
}</style><template><ha-label-badge icon="mdi:emoticon" label="Demo" description=""></ha-label-badge></template></dom-module><dom-module id="ha-state-label-badge" assetpath="components/entity/"><style>:host {
|
||
cursor: pointer;
|
||
}
|
||
|
||
ha-label-badge {
|
||
--ha-label-badge-color: rgb(223, 76, 30);
|
||
}
|
||
|
||
.blue {
|
||
--ha-label-badge-color: #039be5;
|
||
}
|
||
|
||
.green {
|
||
--ha-label-badge-color: #0DA035;
|
||
}
|
||
|
||
.grey {
|
||
--ha-label-badge-color: var(--paper-grey-500);
|
||
}</style><template><ha-label-badge class$="[[computeClasses(state)]]" value="[[computeValue(state)]]" icon="[[computeIcon(state)]]" image="[[computeImage(state)]]" label="[[computeLabel(state)]]" description="[[computeDescription(state)]]"></ha-label-badge></template></dom-module><dom-module id="ha-badges-card" assetpath="cards/"><style></style><template><template is="dom-repeat" items="[[states]]"><ha-state-label-badge state="[[item]]"></ha-state-label-badge></template></template></dom-module><dom-module id="ha-card" assetpath="components/"><style include="paper-material">:host {
|
||
display: block;
|
||
border-radius: 2px;
|
||
transition: all 0.30s ease-out;
|
||
|
||
background-color: white;
|
||
}
|
||
.header {
|
||
font-size: 24px;
|
||
padding: 24px 16px 16px;
|
||
text-transform: capitalize;
|
||
}</style><template><template is="dom-if" if="[[header]]"><div class="header">[[header]]</div></template><content></content></template></dom-module><dom-module id="paper-toggle-button" assetpath="../bower_components/paper-toggle-button/"><template strip-whitespace=""><style>:host {
|
||
display: inline-block;
|
||
}
|
||
|
||
:host([disabled]) {
|
||
pointer-events: none;
|
||
}
|
||
|
||
:host(:focus) {
|
||
outline:none;
|
||
}
|
||
|
||
.toggle-bar {
|
||
position: absolute;
|
||
height: 100%;
|
||
width: 100%;
|
||
border-radius: 8px;
|
||
pointer-events: none;
|
||
opacity: 0.4;
|
||
transition: background-color linear .08s;
|
||
background-color: var(--paper-toggle-button-unchecked-bar-color, #000000);
|
||
@apply(--paper-toggle-button-unchecked-bar);
|
||
}
|
||
|
||
.toggle-button {
|
||
position: absolute;
|
||
top: -3px;
|
||
height: 20px;
|
||
width: 20px;
|
||
border-radius: 50%;
|
||
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);
|
||
transition: -webkit-transform linear .08s, background-color linear .08s;
|
||
transition: transform linear .08s, background-color linear .08s;
|
||
will-change: transform;
|
||
background-color: var(--paper-toggle-button-unchecked-button-color, --paper-grey-50);
|
||
@apply(--paper-toggle-button-unchecked-button);
|
||
}
|
||
|
||
.toggle-button.dragging {
|
||
-webkit-transition: none;
|
||
transition: none;
|
||
}
|
||
|
||
:host([checked]:not([disabled])) .toggle-bar {
|
||
opacity: 0.5;
|
||
background-color: var(--paper-toggle-button-checked-bar-color, --default-primary-color);
|
||
@apply(--paper-toggle-button-checked-bar);
|
||
}
|
||
|
||
:host([disabled]) .toggle-bar {
|
||
background-color: #000;
|
||
opacity: 0.12;
|
||
}
|
||
|
||
:host([checked]) .toggle-button {
|
||
-webkit-transform: translate(16px, 0);
|
||
transform: translate(16px, 0);
|
||
}
|
||
|
||
:host([checked]:not([disabled])) .toggle-button {
|
||
background-color: var(--paper-toggle-button-checked-button-color, --default-primary-color);
|
||
@apply(--paper-toggle-button-checked-button);
|
||
}
|
||
|
||
:host([disabled]) .toggle-button {
|
||
background-color: #bdbdbd;
|
||
opacity: 1;
|
||
}
|
||
|
||
.toggle-ink {
|
||
position: absolute;
|
||
top: -14px;
|
||
left: -14px;
|
||
width: 48px;
|
||
height: 48px;
|
||
opacity: 0.5;
|
||
pointer-events: none;
|
||
color: var(--paper-toggle-button-unchecked-ink-color, --primary-text-color);
|
||
}
|
||
|
||
:host([checked]) .toggle-ink {
|
||
color: var(--paper-toggle-button-checked-ink-color, --default-primary-color);
|
||
}
|
||
|
||
.toggle-container {
|
||
display: inline-block;
|
||
position: relative;
|
||
width: 36px;
|
||
height: 14px;
|
||
}
|
||
|
||
.toggle-label {
|
||
position: relative;
|
||
top: -2px;
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
margin-left: 10px;
|
||
white-space: normal;
|
||
pointer-events: none;
|
||
color: var(--paper-toggle-button-label-color, --primary-text-color);
|
||
}</style><div class="toggle-container"><div id="toggleBar" class="toggle-bar"></div><div id="toggleButton" class="toggle-button"></div></div><div class="toggle-label"><content></content></div></template><script>Polymer({is:"paper-toggle-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},_ontrack:function(t){var e=t.detail;"start"===e.state?this._trackStart(e):"track"===e.state?this._trackMove(e):"end"===e.state&&this._trackEnd(e)},_trackStart:function(t){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(t){var e=t.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+e:e)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(t){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var t=Polymer.PaperRippleBehavior._createRipple();return t.id="ink",t.setAttribute("recenters",""),t.classList.add("circle","toggle-ink"),t}});</script></dom-module><dom-module id="ha-entity-toggle" assetpath="components/entity/"><style>paper-toggle-button {
|
||
cursor: pointer;
|
||
margin-right: -14px;
|
||
}</style><template><paper-toggle-button class="self-center" checked="[[toggleChecked]]" on-change="toggleChanged"></paper-toggle-button></template></dom-module><dom-module id="ha-state-icon" assetpath="components/entity/"><template><iron-icon icon="[[computeIcon(stateObj)]]"></iron-icon></template></dom-module><dom-module id="state-badge" assetpath="components/entity/"><style>:host {
|
||
position: relative;
|
||
display: inline-block;
|
||
width: 40px;
|
||
/*background-color: #4fc3f7;*/
|
||
color: #44739E;
|
||
border-radius: 50%;
|
||
}
|
||
|
||
.badge {
|
||
height: 40px;
|
||
text-align: center;
|
||
}
|
||
|
||
iron-image {
|
||
border-radius: 50%;
|
||
}
|
||
|
||
ha-state-icon {
|
||
margin: 0 auto;
|
||
transition: color .3s ease-in-out;
|
||
}
|
||
|
||
/* Color the icon if light or sun is on */
|
||
ha-state-icon[data-domain=light][data-state=on],
|
||
ha-state-icon[data-domain=switch][data-state=on],
|
||
ha-state-icon[data-domain=sun][data-state=above_horizon] {
|
||
color: #DCC91F;
|
||
}</style><template><div class="layout horizontal center badge"><ha-state-icon id="icon" state-obj="[[stateObj]]" data-domain$="[[stateObj.domain]]" data-state$="[[stateObj.state]]"></ha-state-icon><template is="dom-if" if="[[stateObj.attributes.entity_picture]]"><iron-image sizing="cover" class="fit" src$="[[stateObj.attributes.entity_picture]]"></iron-image></template></div></template></dom-module><dom-module id="relative-ha-datetime" assetpath="components/"><template><span>[[relativeTime]]</span></template></dom-module><dom-module id="state-info" assetpath="components/"><style>:host {
|
||
line-height: 1.5;
|
||
min-width: 150px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
state-badge {
|
||
float: left;
|
||
}
|
||
|
||
.info {
|
||
margin-left: 56px;
|
||
}
|
||
|
||
.name {
|
||
text-transform: capitalize;
|
||
font-weight: 400;
|
||
text-overflow: ellipsis;
|
||
overflow-x: hidden;
|
||
}
|
||
|
||
.time-ago {
|
||
color: var(--secondary-text-color);
|
||
margin-top: -2px;
|
||
text-overflow: ellipsis;
|
||
overflow-x: hidden;
|
||
}</style><template><div><state-badge state-obj="[[stateObj]]"></state-badge><div class="info"><div class="name">[[stateObj.entityDisplay]]</div><div class="time-ago"><relative-ha-datetime datetime-obj="[[stateObj.lastChangedAsDate]]"></relative-ha-datetime></div></div></div></template></dom-module><dom-module id="state-card-display" assetpath="state-summary/"><style>.state {
|
||
margin-left: 16px;
|
||
text-transform: capitalize;
|
||
font-weight: 400;
|
||
text-align: right;
|
||
line-height: 1.5;
|
||
}</style><template><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]"></state-info><div class="state">[[stateObj.stateDisplay]]</div></div></template></dom-module><dom-module id="state-card-toggle" assetpath="state-summary/"><style>ha-entity-toggle {
|
||
margin-left: 16px;
|
||
}</style><template><div class="horizontal justified layout center"><state-info state-obj="[[stateObj]]"></state-info><ha-entity-toggle state-obj="[[stateObj]]"></ha-entity-toggle></div></template></dom-module><dom-module id="state-card-thermostat" assetpath="state-summary/"><style>:host {
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.state {
|
||
margin-left: 16px;
|
||
text-align: right;
|
||
}
|
||
|
||
.target {
|
||
text-transform: capitalize;
|
||
font-weight: 400;
|
||
}
|
||
|
||
.current {
|
||
color: var(--secondary-text-color);
|
||
}</style><template><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]"></state-info><div class="state"><div class="target">[[computeTargetTemperature(stateObj)]]</div><div class="current"><span>Currently:</span> <span>[[stateObj.attributes.current_temperature]]</span> <span></span> <span>[[stateObj.attributes.unit_of_measurement]]</span></div></div></div></template></dom-module><dom-module id="state-card-configurator" assetpath="state-summary/"><template><state-card-display state-obj="[[stateObj]]"></state-card-display><template is="dom-if" if="[[stateObj.attributes.description_image]]"><img hidden="" src="[[stateObj.attributes.description_image]]"></template></template></dom-module><dom-module id="state-card-scene" assetpath="state-summary/"><style>paper-icon-button {
|
||
border: 1px solid;
|
||
border-radius: 50%;
|
||
color: var(--default-primary-color);
|
||
line-height: 24px;
|
||
}</style><template><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]"></state-info><paper-icon-button on-tap="activateScene" icon="mdi:play"></paper-icon-button></div></template></dom-module><dom-module id="state-card-media_player" assetpath="state-summary/"><style>:host {
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.state {
|
||
margin-left: 16px;
|
||
text-align: right;
|
||
overflow-x: hidden;
|
||
}
|
||
|
||
.main-text {
|
||
white-space: nowrap;
|
||
overflow-x: hidden;
|
||
text-overflow: ellipsis;
|
||
text-transform: capitalize;
|
||
font-weight: 400;
|
||
}
|
||
|
||
.secondary-text {
|
||
color: var(--secondary-text-color);
|
||
}</style><template><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]"></state-info><div class="state"><div class="main-text">[[computePrimaryText(stateObj, isPlaying)]]</div><div class="secondary-text">[[computeSecondaryText(stateObj)]]</div></div></div></template></dom-module><dom-module id="ha-domain-card" assetpath="cards/"><style>.states {
|
||
padding-bottom: 16px;
|
||
}
|
||
.state {
|
||
padding: 8px 16px;
|
||
cursor: pointer;
|
||
}
|
||
.header {
|
||
font-size: 24px;
|
||
padding: 24px 16px 16px;
|
||
text-transform: capitalize;
|
||
}
|
||
.header .name {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
ha-entity-toggle {
|
||
margin-left: 16px;
|
||
}</style><template><ha-card><div class="header horizontal layout center"><div class="flex name">[[computeDomainTitle(domain)]]</div><template is="dom-if" if="[[showGroupToggle(groupEntity, states)]]"><ha-entity-toggle state-obj="[[groupEntity]]"></ha-entity-toggle></template></div><div class="states"><template is="dom-repeat" items="[[states]]"><div class="state" on-click="entityTapped"><state-card-content class="state-card" state-obj="[[item]]"></state-card-content></div></template></div></ha-card></template></dom-module><dom-module id="ha-introduction-card" assetpath="cards/"><style>:host {
|
||
font-size: 14px;
|
||
}
|
||
a {
|
||
color: var(--dark-primary-color);
|
||
}
|
||
ul {
|
||
margin: 8px;
|
||
padding-left: 16px;
|
||
}
|
||
li {
|
||
margin-bottom: 8px;
|
||
}
|
||
.content {
|
||
padding: 0 16px 16px;
|
||
}
|
||
.install {
|
||
display: block;
|
||
line-height: 1.5em;
|
||
margin-top: 8px;
|
||
margin-bottom: 16px;
|
||
}</style><template><ha-card header="Welcome Home!"><div class="content"><template is="dom-if" if="[[showInstallInstruction]]">To install Home Assistant, run:<br><code class="install">pip3 install homeassistant<br>hass --open-ui</code></template>Here are some resources to get started.<ul><template is="dom-if" if="[[showInstallInstruction]]"><li><a href="https://home-assistant.io/getting-started/">Installation instructions per platform</a></li><li><a href="https://home-assistant.io/getting-started/troubleshooting/">Troubleshooting your installation</a></li></template><li><a href="https://home-assistant.io/getting-started/configuration/" target="_blank">Configuring Home Assistant</a></li><li><a href="https://home-assistant.io/components/" target="_blank">Available components</a></li><li><a href="https://home-assistant.io/getting-started/troubleshooting-configuration/" target="_blank">Troubleshooting your configuration</a></li><li><a href="https://home-assistant.io/help/" target="_blank">Getting help</a></li></ul><template is="dom-if" if="[[showHideInstruction]]">To remove this card, edit your config in <code>configuration.yaml</code> and disable the <code>introduction</code> component.</template></div></ha-card></template></dom-module><dom-module id="ha-zone-cards" assetpath="components/"><style>:host {
|
||
display: block;
|
||
padding-right: 8px;
|
||
}
|
||
|
||
.no-badges {
|
||
height: 8px;
|
||
}
|
||
|
||
.badges {
|
||
margin-top: 16px;
|
||
margin-left: 8px;
|
||
font-size: 85%;
|
||
text-align: center;
|
||
}
|
||
|
||
.column {
|
||
max-width: 500px;
|
||
}
|
||
|
||
.zone-card {
|
||
margin-left: 8px;
|
||
margin-bottom: 8px;
|
||
}</style><template><div class="main"><template is="dom-if" if="[[cards._badges.length]]"><div class="badges"><template is="dom-if" if="[[cards._demo]]"><ha-demo-badge></ha-demo-badge></template><ha-badges-card states="[[cards._badges]]"></ha-badges-card></div></template><template is="dom-if" if="[[!cards._badges.length]]"><div class="no-badges"></div></template><div class="horizontal layout"><template is="dom-repeat" items="[[cards._columns]]" as="column"><template is="dom-if" if="[[computeShouldRenderColumn(index, column)]]"><div class="column flex-1"><template is="dom-if" if="[[computeShowIntroduction(index, showIntroduction, cards)]]"><div class="zone-card"><ha-introduction-card show-hide-instruction="[[computeShowHideInstruction(states, cards)]]"></ha-introduction-card></div></template><template is="dom-repeat" items="[[column]]" as="domain"><div class="zone-card"><ha-domain-card domain="[[domain]]" states="[[computeStatesOfCard(cards, domain)]]" group-entity="[[computeGroupEntityOfCard(cards, domain)]]"></ha-domain-card></div></template></div></template></template></div></div></template></dom-module><dom-module id="partial-zone" assetpath="layouts/"><style>:host {
|
||
display: block;
|
||
background-color: #E5E5E5;
|
||
-ms-user-select: none;
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
}</style><template><paper-header-panel mode="waterfall"><paper-toolbar><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button><div class="title">[[locationName]]</div><paper-icon-button icon="mdi:refresh" class$="[[computeRefreshButtonClass(isFetching)]]" on-click="handleRefresh" hidden$="[[isStreaming]]"></paper-icon-button><paper-icon-button icon="mdi:microphone" hidden$="[[!canListen]]" on-click="handleListenClick"></paper-icon-button></paper-toolbar><div class="content fit"><ha-zone-cards show-introduction="[[computeShowIntroduction(introductionLoaded, states)]]" states="[[states]]" columns="[[columns]]"></ha-zone-cards></div></paper-header-panel></template></dom-module><dom-module id="paper-input-char-counter" assetpath="../bower_components/paper-input/"><template><style>:host {
|
||
display: inline-block;
|
||
float: right;
|
||
|
||
@apply(--paper-font-caption);
|
||
@apply(--paper-input-char-counter);
|
||
}
|
||
|
||
:host-context([dir="rtl"]) {
|
||
float: left;
|
||
}</style><span>[[_charCounterStr]]</span></template></dom-module><script>Polymer({is:"paper-input-char-counter",behaviors:[Polymer.PaperInputAddonBehavior],properties:{_charCounterStr:{type:String,value:"0"}},update:function(e){if(e.inputElement){e.value=e.value||"";var t=e.value.replace(/(\r\n|\n|\r)/g,"--").length;e.inputElement.hasAttribute("maxlength")&&(t+="/"+e.inputElement.getAttribute("maxlength")),this._charCounterStr=t}}});</script><dom-module id="paper-input" assetpath="../bower_components/paper-input/"><template><style>:host {
|
||
display: block;
|
||
}
|
||
|
||
input::-webkit-input-placeholder {
|
||
color: var(--paper-input-container-color, --secondary-text-color);
|
||
}
|
||
|
||
input:-moz-placeholder {
|
||
color: var(--paper-input-container-color, --secondary-text-color);
|
||
}
|
||
|
||
input::-moz-placeholder {
|
||
color: var(--paper-input-container-color, --secondary-text-color);
|
||
}
|
||
|
||
input:-ms-input-placeholder {
|
||
color: var(--paper-input-container-color, --secondary-text-color);
|
||
}</style><paper-input-container no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"><content select="[prefix]"></content><label hidden$="[[!label]]">[[label]]</label><input is="iron-input" id="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" allowed-pattern="[[allowedPattern]]" validator="[[validator]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]"><content select="[suffix]"></content><template is="dom-if" if="[[errorMessage]]"><paper-input-error>[[errorMessage]]</paper-input-error></template><template is="dom-if" if="[[charCounter]]"><paper-input-char-counter></paper-input-char-counter></template></paper-input-container></template></dom-module><script>Polymer({is:"paper-input",behaviors:[Polymer.IronFormElementBehavior,Polymer.PaperInputBehavior,Polymer.IronControlState]});</script><dom-module id="paper-scroll-header-panel" assetpath="../bower_components/paper-scroll-header-panel/"><style>:host {
|
||
display: block;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
|
||
#mainContainer {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
|
||
-moz-box-sizing: border-box;
|
||
box-sizing: border-box;
|
||
-webkit-overflow-scrolling: touch;
|
||
|
||
overflow-x: hidden;
|
||
overflow-y: auto;
|
||
|
||
@apply(--paper-scroll-header-container);
|
||
}
|
||
|
||
#headerContainer {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
left: 0;
|
||
}
|
||
|
||
.bg-container {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
}
|
||
|
||
#headerBg {
|
||
@apply(--paper-scroll-header-panel-full-header);
|
||
}
|
||
|
||
#condensedHeaderBg {
|
||
@apply(--paper-scroll-header-panel-condensed-header);
|
||
}
|
||
|
||
#headerBg, #condensedHeaderBg {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background-repeat: no-repeat;
|
||
background-size: cover;
|
||
background-position: center center;
|
||
}
|
||
|
||
#condensedHeaderBg {
|
||
opacity: 0;
|
||
}</style><template><div id="mainContainer"><content id="mainContent" select=":not(paper-toolbar):not(.paper-header)"></content></div><div id="headerContainer"><div class="bg-container"><div id="condensedHeaderBg"></div><div id="headerBg"></div></div><content id="headerContent" select="paper-toolbar, .paper-header"></content></div></template></dom-module><script>!function(){"use strict";Polymer.PaperScrollHeaderPanel=Polymer({is:"paper-scroll-header-panel",behaviors:[Polymer.IronResizableBehavior],properties:{condenses:{type:Boolean,value:!1},noDissolve:{type:Boolean,value:!1},noReveal:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},keepCondensedHeader:{type:Boolean,value:!1},headerHeight:{type:Number,value:0},condensedHeaderHeight:{type:Number,value:0},scrollAwayTopbar:{type:Boolean,value:!1},headerState:{type:Number,readOnly:!0,notify:!0,value:0},_prevScrollTop:{type:Number,value:0},_y:{type:Number,value:0},_defaultCondsensedHeaderHeight:{type:Number,value:0}},observers:["_setup(headerHeight, condensedHeaderHeight, fixed)","_condensedHeaderHeightChanged(condensedHeaderHeight)","_headerHeightChanged(headerHeight, condensedHeaderHeight)","_condensesChanged(condenses)"],listeners:{"iron-resize":"measureHeaderHeight"},ready:function(){this.async(this.measureHeaderHeight,5),this._scrollHandler=this._scroll.bind(this),this.scroller.addEventListener("scroll",this._scrollHandler)},get header(){return Polymer.dom(this.$.headerContent).getDistributedNodes()[0]},get content(){return Polymer.dom(this.$.mainContent).getDistributedNodes()[0]},get scroller(){return this.$.mainContainer},get _headerMaxDelta(){return this.keepCondensedHeader?this._headerMargin:this.headerHeight},get _headerMargin(){return this.headerHeight-this.condensedHeaderHeight},_y:0,_prevScrollTop:0,measureHeaderHeight:function(){var e=this.header;e&&e.offsetHeight&&(this.headerHeight=e.offsetHeight)},scroll:function(e,t){if(t){var r=function(e,t,r,s){return e/=s,-r*e*(e-2)+t},s=Math.random(),a=200,i=Date.now(),n=this.scroller.scrollTop,h=e-n;this._currentAnimationId=s,function o(){var t=Date.now(),l=t-i;l>a?(this.scroller.scrollTop=e,this._updateScrollState(e)):this._currentAnimationId===s&&(this.scroller.scrollTop=r(l,n,h,a),requestAnimationFrame(o.bind(this)))}.call(this)}else this.scroller.scrollTop=e,this._updateScrollState(e)},condense:function(e){var t=Polymer.PaperScrollHeaderPanel;if(this.condenses&&!this.fixed&&!this.noReveal)switch(this.headerState){case t.HEADER_STATE_HIDDEN:this.scroll(this.scroller.scrollTop-(this._headerMaxDelta-this._headerMargin),e);break;case t.HEADER_STATE_EXPANDED:case t.HEADER_STATE_INTERPOLATED:this.scroll(this._headerMargin,e)}},scrollToTop:function(e){this.scroll(0,e)},_headerHeightChanged:function(e){null!==this._defaultCondsensedHeaderHeight&&(this._defaultCondsensedHeaderHeight=Math.round(1*e/3),this.condensedHeaderHeight=this._defaultCondsensedHeaderHeight)},_condensedHeaderHeightChanged:function(e){e&&this._defaultCondsensedHeaderHeight!=e&&(this._defaultCondsensedHeaderHeight=null)},_condensesChanged:function(){this._updateScrollState(this.scroller.scrollTop),this._condenseHeader(null)},_setup:function(){var e=this.scroller.style;if(e.paddingTop=this.fixed?"":this.headerHeight+"px",e.top=this.fixed?this.headerHeight+"px":"",this.fixed)this._setHeaderState(this.HEADER_STATE_EXPANDED),this._transformHeader(null);else switch(this.headerState){case this.HEADER_STATE_HIDDEN:this._transformHeader(this._headerMaxDelta);break;case this.HEADER_STATE_CONDENSED:this._transformHeader(this._headerMargin)}},_transformHeader:function(e){this._translateY(this.$.headerContainer,-e),this.condenses&&this._condenseHeader(e),this.fire("paper-header-transform",{y:e,height:this.headerHeight,condensedHeight:this.condensedHeaderHeight})},_condenseHeader:function(e){var t=null===e;!this.scrollAwayTopbar&&this.header&&this.header.$&&this.header.$.topBar&&this._translateY(this.header.$.topBar,t?null:Math.min(e,this._headerMargin)),this.noDissolve||(this.$.headerBg.style.opacity=t?"":(this._headerMargin-e)/this._headerMargin),this._translateY(this.$.headerBg,t?null:e/2),this.noDissolve||(this.$.condensedHeaderBg.style.opacity=t?"":e/this._headerMargin,this._translateY(this.$.condensedHeaderBg,t?null:e/2))},_translateY:function(e,t){this.transform(null===t?"":"translate3d(0, "+t+"px, 0)",e)},_scroll:function(e){this.header&&(this._updateScrollState(this.scroller.scrollTop),this.fire("content-scroll",{target:this.scroller},{cancelable:!1}))},_updateScrollState:function(e){var t=Polymer.PaperScrollHeaderPanel,r=e-this._prevScrollTop,s=Math.max(0,this.noReveal?e:this._y+r);s>this._headerMaxDelta?(s=this._headerMaxDelta,this._setHeaderState(t.HEADER_STATE_HIDDEN)):this.condenses&&this._prevScrollTop>=e&&e>=this._headerMargin?(s=Math.max(s,this._headerMargin),this._setHeaderState(t.HEADER_STATE_CONDENSED)):0===s?this._setHeaderState(t.HEADER_STATE_EXPANDED):this._setHeaderState(t.HEADER_STATE_INTERPOLATED),this.fixed||s===this._y||this._transformHeader(s),this._prevScrollTop=Math.max(e,0),this._y=s}}),Polymer.PaperScrollHeaderPanel.HEADER_STATE_EXPANDED=0,Polymer.PaperScrollHeaderPanel.HEADER_STATE_HIDDEN=1,Polymer.PaperScrollHeaderPanel.HEADER_STATE_CONDENSED=2,Polymer.PaperScrollHeaderPanel.HEADER_STATE_INTERPOLATED=3}();</script><dom-module id="paper-toolbar" assetpath="../bower_components/paper-toolbar/"><template><style>:host {
|
||
/* technical */
|
||
display: block;
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
-moz-box-sizing: border-box;
|
||
|
||
/* size */
|
||
height: var(--paper-toolbar-height, 64px);
|
||
|
||
background: var(--paper-toolbar-background, --default-primary-color);
|
||
color: var(--paper-toolbar-color, --text-primary-color);
|
||
|
||
@apply(--paper-toolbar);
|
||
}
|
||
|
||
:host(.animate) {
|
||
/* transition */
|
||
transition: height 0.18s ease-in;
|
||
}
|
||
|
||
:host(.medium-tall) {
|
||
height: calc(var(--paper-toolbar-height, 64px) * 2);
|
||
@apply(--paper-toolbar-medium);
|
||
}
|
||
|
||
:host(.tall) {
|
||
height: calc(var(--paper-toolbar-height, 64px) * 3);
|
||
@apply(--paper-toolbar-tall);
|
||
}
|
||
|
||
.toolbar-tools {
|
||
position: relative;
|
||
height: var(--paper-toolbar-height, 64px);
|
||
padding: 0 16px;
|
||
pointer-events: none;
|
||
@apply(--layout-horizontal);
|
||
@apply(--layout-center);
|
||
}
|
||
|
||
/*
|
||
* TODO: Where should media query breakpoints live so they can be shared between elements?
|
||
*/
|
||
|
||
@media (max-width: 639px) {
|
||
:host {
|
||
height: var(--paper-toolbar-sm-height, 56px);
|
||
}
|
||
|
||
:host(.medium-tall) {
|
||
height: calc(var(--paper-toolbar-sm-height, 56px) * 2);
|
||
}
|
||
|
||
:host(.tall) {
|
||
height: calc(var(--paper-toolbar-sm-height, 56px) * 3);
|
||
}
|
||
|
||
.toolbar-tools {
|
||
height: var(--paper-toolbar-sm-height, 56px);
|
||
}
|
||
}
|
||
|
||
#topBar {
|
||
position: relative;
|
||
}
|
||
|
||
/* middle bar */
|
||
#middleBar {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
left: 0;
|
||
}
|
||
|
||
:host(.tall) #middleBar,
|
||
:host(.medium-tall) #middleBar {
|
||
-webkit-transform: translateY(100%);
|
||
transform: translateY(100%);
|
||
}
|
||
|
||
/* bottom bar */
|
||
#bottomBar {
|
||
position: absolute;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
/*
|
||
* make elements (e.g. buttons) respond to mouse/touch events
|
||
*
|
||
* `.toolbar-tools` disables touch events so multiple toolbars can stack and not
|
||
* absorb events. All children must have pointer events re-enabled to work as
|
||
* expected.
|
||
*/
|
||
.toolbar-tools > ::content > *:not([disabled]) {
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.toolbar-tools > ::content .title {
|
||
@apply(--paper-font-common-base);
|
||
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
font-size: 20px;
|
||
font-weight: 400;
|
||
line-height: 1;
|
||
pointer-events: none;
|
||
|
||
@apply(--layout-flex);
|
||
@apply(--paper-toolbar-title);
|
||
}
|
||
|
||
/**
|
||
* TODO: Refactor these selectors
|
||
* Work in progress.
|
||
*/
|
||
.toolbar-tools > ::content paper-icon-button[icon=menu] {
|
||
margin-right: 24px;
|
||
}
|
||
|
||
.toolbar-tools > ::content > .title,
|
||
.toolbar-tools > ::content[select=".middle"] > .title,
|
||
.toolbar-tools > ::content[select=".bottom"] > .title {
|
||
margin-left: 56px;
|
||
}
|
||
|
||
.toolbar-tools > ::content > paper-icon-button + .title,
|
||
.toolbar-tools > ::content[select=".middle"] paper-icon-button + .title,
|
||
.toolbar-tools > ::content[select=".bottom"] paper-icon-button + .title {
|
||
margin-left: 0;
|
||
}
|
||
|
||
.toolbar-tools > ::content > .fit {
|
||
position: absolute;
|
||
top: auto;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
width: auto;
|
||
margin: 0;
|
||
}
|
||
|
||
/* TODO(noms): Until we have a better solution for classes that don't use
|
||
* /deep/ create our own.
|
||
*/
|
||
.start-justified {
|
||
@apply(--layout-start-justified);
|
||
}
|
||
|
||
.center-justified {
|
||
@apply(--layout-center-justified);
|
||
}
|
||
|
||
.end-justified {
|
||
@apply(--layout-end-justified);
|
||
}
|
||
|
||
.around-justified {
|
||
@apply(--layout-around-justified);
|
||
}
|
||
|
||
.justified {
|
||
@apply(--layout-justified);
|
||
}</style><div id="topBar" class$="toolbar-tools [[_computeBarExtraClasses(justify)]]"><content select=":not(.middle):not(.bottom)"></content></div><div id="middleBar" class$="toolbar-tools [[_computeBarExtraClasses(middleJustify)]]"><content select=".middle"></content></div><div id="bottomBar" class$="toolbar-tools [[_computeBarExtraClasses(bottomJustify)]]"><content select=".bottom"></content></div></template><script>Polymer({is:"paper-toolbar",hostAttributes:{role:"toolbar"},properties:{bottomJustify:{type:String,value:""},justify:{type:String,value:""},middleJustify:{type:String,value:""}},attached:function(){this._observer=this._observe(this),this._updateAriaLabelledBy()},detached:function(){this._observer&&this._observer.disconnect()},_observe:function(t){var e=new MutationObserver(function(){this._updateAriaLabelledBy()}.bind(this));return e.observe(t,{childList:!0,subtree:!0}),e},_updateAriaLabelledBy:function(){for(var t,e=[],i=Polymer.dom(this.root).querySelectorAll("content"),r=0;t=i[r];r++)for(var s,o=Polymer.dom(t).getDistributedNodes(),a=0;s=o[a];a++)if(s.classList&&s.classList.contains("title"))if(s.id)e.push(s.id);else{var l="paper-toolbar-label-"+Math.floor(1e4*Math.random());s.id=l,e.push(l)}e.length>0&&this.setAttribute("aria-labelledby",e.join(" "))},_computeBarExtraClasses:function(t){return t?t+("justified"===t?"":"-justified"):""}});</script></dom-module><dom-module id="partial-base" assetpath="layouts/"><style>:host {
|
||
-ms-user-select: none;
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
}</style><template><paper-scroll-header-panel class="fit"><paper-toolbar><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button><div class="title"><content select="[header-title]"></content></div><content select="[header-buttons]"></content></paper-toolbar><content></content></paper-scroll-header-panel></template></dom-module><dom-module id="domain-icon" assetpath="components/"><template><iron-icon icon="[[computeIcon(domain, state)]]"></iron-icon></template></dom-module><dom-module id="display-time" assetpath="components/"><template>[[computeTime(dateObj)]]</template></dom-module><dom-module id="logbook-entry" assetpath="components/"><style>:host {
|
||
display: block;
|
||
line-height: 2em;
|
||
}
|
||
|
||
display-time {
|
||
width: 55px;
|
||
font-size: .8em;
|
||
color: var(--secondary-text-color);
|
||
}
|
||
|
||
domain-icon {
|
||
margin: 0 8px 0 16px;
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
.name {
|
||
text-transform: capitalize;
|
||
}
|
||
|
||
.message {
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
a {
|
||
color: var(--accent-color);
|
||
}</style><template><div class="horizontal layout"><display-time date-obj="[[entryObj.when]]"></display-time><domain-icon domain="[[entryObj.domain]]" class="icon"></domain-icon><div class="message" flex=""><template is="dom-if" if="[[!entryObj.entityId]]"><span class="name">[[entryObj.name]]</span></template><template is="dom-if" if="[[entryObj.entityId]]"><a href="#" on-click="entityClicked" class="name">[[entryObj.name]]</a></template><span></span> <span>[[entryObj.message]]</span></div></div></template></dom-module><dom-module id="ha-logbook" assetpath="components/"><style>:host {
|
||
display: block;
|
||
padding: 16px;
|
||
}</style><template><template is="dom-if" if="[[noEntries(entries)]]">No logbook entries found.</template><template is="dom-repeat" items="[[entries]]"><logbook-entry entry-obj="[[item]]"></logbook-entry></template></template></dom-module><dom-module id="loading-box" assetpath="components/"><style>.text {
|
||
display: inline-block;
|
||
line-height: 28px;
|
||
vertical-align: top;
|
||
margin-left: 8px;
|
||
}</style><template><div layout="horizontal"><paper-spinner active="true"></paper-spinner><div class="text"><content></content>…</div></div></template></dom-module><dom-module id="partial-logbook" assetpath="layouts/"><style>.selected-date-container {
|
||
padding: 0 16px;
|
||
}
|
||
|
||
paper-input {
|
||
max-width: 200px;
|
||
}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">Logbook</span><paper-icon-button icon="mdi:refresh" header-buttons="" on-click="handleRefresh"></paper-icon-button><div><div class="selected-date-container"><paper-input label="Showing entries for" id="datePicker" value="[[selectedDate]]" on-focus="datepickerFocus"></paper-input><loading-box hidden$="[[!isLoading]]">Loading logbook entries</loading-box></div><ha-logbook entries="[[entries]]" hidden$="[[isLoading]]"></ha-logbook></div></partial-base></template></dom-module><dom-module is="state-history-chart-timeline"><style>:host {
|
||
display: block;
|
||
}</style><template></template></dom-module><dom-module id="state-history-charts" assetpath="components/"><style>:host {
|
||
display: block;
|
||
}
|
||
|
||
.loading-container {
|
||
text-align: center;
|
||
padding: 8px;
|
||
}
|
||
|
||
.loading {
|
||
height: 0px;
|
||
overflow: hidden;
|
||
}</style><template><google-legacy-loader on-api-load="googleApiLoaded"></google-legacy-loader><div hidden$="{{!isLoading}}" class="loading-container"><loading-box>Updating history data</loading-box></div><div class$="[[computeContentClasses(isLoading)]]"><template is="dom-if" if="[[computeIsEmpty(stateHistory)]]">No state history found.</template><state-history-chart-timeline data="[[groupedStateHistory.timeline]]" is-single-device="[[isSingleDevice]]"></state-history-chart-timeline><template is="dom-repeat" items="[[groupedStateHistory.line]]"><state-history-chart-line unit="[[extractUnit(item)]]" data="[[extractData(item)]]" is-single-device="[[isSingleDevice]]"></state-history-chart-line></template></div></template></dom-module><dom-module id="partial-history" assetpath="layouts/"><style>.content {
|
||
background-color: white;
|
||
}
|
||
|
||
.content.wide {
|
||
padding: 8px;
|
||
}
|
||
|
||
paper-input {
|
||
max-width: 200px;
|
||
}
|
||
|
||
.narrow paper-input {
|
||
margin-left: 8px;
|
||
}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">History</span><paper-icon-button icon="mdi:refresh" header-buttons="" on-click="handleRefreshClick"></paper-icon-button><div class$="[[computeContentClasses(narrow)]]"><paper-input label="Showing entries for" id="datePicker" value="[[selectedDate]]"></paper-input><state-history-charts state-history="[[stateHistory]]" is-loading-data="[[isLoadingData]]"></state-history-charts></div></partial-base></template></dom-module><dom-module id="leaflet-map" assetpath="../bower_components/leaflet-map/"><style>:host { display: block; }
|
||
:host #map {height:100%; width:100%}</style><style>/* required styles */
|
||
|
||
.leaflet-map-pane,
|
||
.leaflet-tile,
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow,
|
||
.leaflet-tile-pane,
|
||
.leaflet-tile-container,
|
||
.leaflet-overlay-pane,
|
||
.leaflet-shadow-pane,
|
||
.leaflet-marker-pane,
|
||
.leaflet-popup-pane,
|
||
.leaflet-overlay-pane svg,
|
||
.leaflet-zoom-box,
|
||
.leaflet-image-layer,
|
||
.leaflet-layer {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
}
|
||
.leaflet-container {
|
||
overflow: hidden;
|
||
-ms-touch-action: none;
|
||
touch-action: none;
|
||
}
|
||
.leaflet-tile,
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow {
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
user-select: none;
|
||
-webkit-user-drag: none;
|
||
}
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow {
|
||
display: block;
|
||
}
|
||
/* map is broken in FF if you have max-width: 100% on tiles */
|
||
.leaflet-container img {
|
||
max-width: none !important;
|
||
}
|
||
/* stupid Android 2 doesn't understand "max-width: none" properly */
|
||
.leaflet-container img.leaflet-image-layer {
|
||
max-width: 15000px !important;
|
||
}
|
||
.leaflet-tile {
|
||
filter: inherit;
|
||
visibility: hidden;
|
||
}
|
||
.leaflet-tile-loaded {
|
||
visibility: inherit;
|
||
}
|
||
.leaflet-zoom-box {
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||
.leaflet-overlay-pane svg {
|
||
-moz-user-select: none;
|
||
}
|
||
|
||
.leaflet-tile-pane { z-index: 2; }
|
||
.leaflet-objects-pane { z-index: 3; }
|
||
.leaflet-overlay-pane { z-index: 4; }
|
||
.leaflet-shadow-pane { z-index: 5; }
|
||
.leaflet-marker-pane { z-index: 6; }
|
||
.leaflet-popup-pane { z-index: 7; }
|
||
|
||
.leaflet-vml-shape {
|
||
width: 1px;
|
||
height: 1px;
|
||
}
|
||
.lvml {
|
||
behavior: url("#default#VML");
|
||
display: inline-block;
|
||
position: absolute;
|
||
}
|
||
|
||
|
||
/* control positioning */
|
||
|
||
.leaflet-control {
|
||
position: relative;
|
||
z-index: 7;
|
||
pointer-events: auto;
|
||
}
|
||
.leaflet-top,
|
||
.leaflet-bottom {
|
||
position: absolute;
|
||
z-index: 1000;
|
||
pointer-events: none;
|
||
}
|
||
.leaflet-top {
|
||
top: 0;
|
||
}
|
||
.leaflet-right {
|
||
right: 0;
|
||
}
|
||
.leaflet-bottom {
|
||
bottom: 0;
|
||
}
|
||
.leaflet-left {
|
||
left: 0;
|
||
}
|
||
.leaflet-control {
|
||
float: left;
|
||
clear: both;
|
||
}
|
||
.leaflet-right .leaflet-control {
|
||
float: right;
|
||
}
|
||
.leaflet-top .leaflet-control {
|
||
margin-top: 10px;
|
||
}
|
||
.leaflet-bottom .leaflet-control {
|
||
margin-bottom: 10px;
|
||
}
|
||
.leaflet-left .leaflet-control {
|
||
margin-left: 10px;
|
||
}
|
||
.leaflet-right .leaflet-control {
|
||
margin-right: 10px;
|
||
}
|
||
|
||
|
||
/* zoom and fade animations */
|
||
|
||
.leaflet-fade-anim .leaflet-tile,
|
||
.leaflet-fade-anim .leaflet-popup {
|
||
opacity: 0;
|
||
-webkit-transition: opacity 0.2s linear;
|
||
-moz-transition: opacity 0.2s linear;
|
||
-o-transition: opacity 0.2s linear;
|
||
transition: opacity 0.2s linear;
|
||
}
|
||
.leaflet-fade-anim .leaflet-tile-loaded,
|
||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||
opacity: 1;
|
||
}
|
||
|
||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
}
|
||
.leaflet-zoom-anim .leaflet-tile,
|
||
.leaflet-pan-anim .leaflet-tile,
|
||
.leaflet-touching .leaflet-zoom-animated {
|
||
-webkit-transition: none;
|
||
-moz-transition: none;
|
||
-o-transition: none;
|
||
transition: none;
|
||
}
|
||
|
||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||
visibility: hidden;
|
||
}
|
||
|
||
|
||
/* cursors */
|
||
|
||
.leaflet-clickable {
|
||
cursor: pointer;
|
||
}
|
||
.leaflet-container {
|
||
cursor: -webkit-grab;
|
||
cursor: -moz-grab;
|
||
}
|
||
.leaflet-popup-pane,
|
||
.leaflet-control {
|
||
cursor: auto;
|
||
}
|
||
.leaflet-dragging .leaflet-container,
|
||
.leaflet-dragging .leaflet-clickable {
|
||
cursor: move;
|
||
cursor: -webkit-grabbing;
|
||
cursor: -moz-grabbing;
|
||
}
|
||
|
||
|
||
/* visual tweaks */
|
||
|
||
.leaflet-container {
|
||
background: #ddd;
|
||
outline: 0;
|
||
}
|
||
.leaflet-container a {
|
||
color: #0078A8;
|
||
}
|
||
.leaflet-container a.leaflet-active {
|
||
outline: 2px solid orange;
|
||
}
|
||
.leaflet-zoom-box {
|
||
border: 2px dotted #38f;
|
||
background: rgba(255,255,255,0.5);
|
||
}
|
||
|
||
|
||
/* general typography */
|
||
.leaflet-container {
|
||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||
}
|
||
|
||
|
||
/* general toolbar styles */
|
||
|
||
.leaflet-bar {
|
||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||
border-radius: 4px;
|
||
}
|
||
.leaflet-bar a,
|
||
.leaflet-bar a:hover {
|
||
background-color: #fff;
|
||
border-bottom: 1px solid #ccc;
|
||
width: 26px;
|
||
height: 26px;
|
||
line-height: 26px;
|
||
display: block;
|
||
text-align: center;
|
||
text-decoration: none;
|
||
color: black;
|
||
}
|
||
.leaflet-bar a,
|
||
.leaflet-control-layers-toggle {
|
||
background-position: 50% 50%;
|
||
background-repeat: no-repeat;
|
||
display: block;
|
||
}
|
||
.leaflet-bar a:hover {
|
||
background-color: #f4f4f4;
|
||
}
|
||
.leaflet-bar a:first-child {
|
||
border-top-left-radius: 4px;
|
||
border-top-right-radius: 4px;
|
||
}
|
||
.leaflet-bar a:last-child {
|
||
border-bottom-left-radius: 4px;
|
||
border-bottom-right-radius: 4px;
|
||
border-bottom: none;
|
||
}
|
||
.leaflet-bar a.leaflet-disabled {
|
||
cursor: default;
|
||
background-color: #f4f4f4;
|
||
color: #bbb;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-bar a {
|
||
width: 30px;
|
||
height: 30px;
|
||
line-height: 30px;
|
||
}
|
||
|
||
|
||
/* zoom control */
|
||
|
||
.leaflet-control-zoom-in,
|
||
.leaflet-control-zoom-out {
|
||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
||
text-indent: 1px;
|
||
}
|
||
.leaflet-control-zoom-out {
|
||
font-size: 20px;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-control-zoom-in {
|
||
font-size: 22px;
|
||
}
|
||
.leaflet-touch .leaflet-control-zoom-out {
|
||
font-size: 24px;
|
||
}
|
||
|
||
|
||
/* layers control */
|
||
|
||
.leaflet-control-layers {
|
||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
||
background: #fff;
|
||
border-radius: 5px;
|
||
}
|
||
.leaflet-control-layers-toggle {
|
||
background-image: url("../bower_components/leaflet/dist/images/layers.png");
|
||
width: 36px;
|
||
height: 36px;
|
||
}
|
||
.leaflet-retina .leaflet-control-layers-toggle {
|
||
background-image: url("../bower_components/leaflet/dist/images/layers-2x.png");
|
||
background-size: 26px 26px;
|
||
}
|
||
.leaflet-touch .leaflet-control-layers-toggle {
|
||
width: 44px;
|
||
height: 44px;
|
||
}
|
||
.leaflet-control-layers .leaflet-control-layers-list,
|
||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||
display: none;
|
||
}
|
||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||
display: block;
|
||
position: relative;
|
||
}
|
||
.leaflet-control-layers-expanded {
|
||
padding: 6px 10px 6px 6px;
|
||
color: #333;
|
||
background: #fff;
|
||
}
|
||
.leaflet-control-layers-selector {
|
||
margin-top: 2px;
|
||
position: relative;
|
||
top: 1px;
|
||
}
|
||
.leaflet-control-layers label {
|
||
display: block;
|
||
}
|
||
.leaflet-control-layers-separator {
|
||
height: 0;
|
||
border-top: 1px solid #ddd;
|
||
margin: 5px -10px 5px -6px;
|
||
}
|
||
|
||
|
||
/* attribution and scale controls */
|
||
|
||
.leaflet-container .leaflet-control-attribution {
|
||
background: #fff;
|
||
background: rgba(255, 255, 255, 0.7);
|
||
margin: 0;
|
||
}
|
||
.leaflet-control-attribution,
|
||
.leaflet-control-scale-line {
|
||
padding: 0 5px;
|
||
color: #333;
|
||
}
|
||
.leaflet-control-attribution a {
|
||
text-decoration: none;
|
||
}
|
||
.leaflet-control-attribution a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
.leaflet-container .leaflet-control-attribution,
|
||
.leaflet-container .leaflet-control-scale {
|
||
font-size: 11px;
|
||
}
|
||
.leaflet-left .leaflet-control-scale {
|
||
margin-left: 5px;
|
||
}
|
||
.leaflet-bottom .leaflet-control-scale {
|
||
margin-bottom: 5px;
|
||
}
|
||
.leaflet-control-scale-line {
|
||
border: 2px solid #777;
|
||
border-top: none;
|
||
line-height: 1.1;
|
||
padding: 2px 5px 1px;
|
||
font-size: 11px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
-moz-box-sizing: content-box;
|
||
box-sizing: content-box;
|
||
|
||
background: #fff;
|
||
background: rgba(255, 255, 255, 0.5);
|
||
}
|
||
.leaflet-control-scale-line:not(:first-child) {
|
||
border-top: 2px solid #777;
|
||
border-bottom: none;
|
||
margin-top: -2px;
|
||
}
|
||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||
border-bottom: 2px solid #777;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-control-attribution,
|
||
.leaflet-touch .leaflet-control-layers,
|
||
.leaflet-touch .leaflet-bar {
|
||
box-shadow: none;
|
||
}
|
||
.leaflet-touch .leaflet-control-layers,
|
||
.leaflet-touch .leaflet-bar {
|
||
border: 2px solid rgba(0,0,0,0.2);
|
||
background-clip: padding-box;
|
||
}
|
||
|
||
|
||
/* popup */
|
||
|
||
.leaflet-popup {
|
||
position: absolute;
|
||
text-align: center;
|
||
}
|
||
.leaflet-popup-content-wrapper {
|
||
padding: 1px;
|
||
text-align: left;
|
||
border-radius: 12px;
|
||
}
|
||
.leaflet-popup-content {
|
||
margin: 13px 19px;
|
||
line-height: 1.4;
|
||
}
|
||
.leaflet-popup-content p {
|
||
margin: 18px 0;
|
||
}
|
||
.leaflet-popup-tip-container {
|
||
margin: 0 auto;
|
||
width: 40px;
|
||
height: 20px;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
.leaflet-popup-tip {
|
||
width: 17px;
|
||
height: 17px;
|
||
padding: 1px;
|
||
|
||
margin: -10px auto 0;
|
||
|
||
-webkit-transform: rotate(45deg);
|
||
-moz-transform: rotate(45deg);
|
||
-ms-transform: rotate(45deg);
|
||
-o-transform: rotate(45deg);
|
||
transform: rotate(45deg);
|
||
}
|
||
.leaflet-popup-content-wrapper,
|
||
.leaflet-popup-tip {
|
||
background: white;
|
||
|
||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||
}
|
||
.leaflet-container a.leaflet-popup-close-button {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
padding: 4px 4px 0 0;
|
||
text-align: center;
|
||
width: 18px;
|
||
height: 14px;
|
||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||
color: #c3c3c3;
|
||
text-decoration: none;
|
||
font-weight: bold;
|
||
background: transparent;
|
||
}
|
||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||
color: #999;
|
||
}
|
||
.leaflet-popup-scrolled {
|
||
overflow: auto;
|
||
border-bottom: 1px solid #ddd;
|
||
border-top: 1px solid #ddd;
|
||
}
|
||
|
||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||
zoom: 1;
|
||
}
|
||
.leaflet-oldie .leaflet-popup-tip {
|
||
width: 24px;
|
||
margin: 0 auto;
|
||
|
||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||
}
|
||
.leaflet-oldie .leaflet-popup-tip-container {
|
||
margin-top: -1px;
|
||
}
|
||
|
||
.leaflet-oldie .leaflet-control-zoom,
|
||
.leaflet-oldie .leaflet-control-layers,
|
||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
||
.leaflet-oldie .leaflet-popup-tip {
|
||
border: 1px solid #999;
|
||
}
|
||
|
||
|
||
/* div icon */
|
||
|
||
.leaflet-div-icon {
|
||
background: #fff;
|
||
border: 1px solid #666;
|
||
}</style><style>/* required styles */
|
||
|
||
.leaflet-map-pane,
|
||
.leaflet-tile,
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow,
|
||
.leaflet-tile-pane,
|
||
.leaflet-tile-container,
|
||
.leaflet-overlay-pane,
|
||
.leaflet-shadow-pane,
|
||
.leaflet-marker-pane,
|
||
.leaflet-popup-pane,
|
||
.leaflet-overlay-pane svg,
|
||
.leaflet-zoom-box,
|
||
.leaflet-image-layer,
|
||
.leaflet-layer {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
}
|
||
.leaflet-container {
|
||
overflow: hidden;
|
||
-ms-touch-action: none;
|
||
touch-action: none;
|
||
}
|
||
.leaflet-tile,
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow {
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
user-select: none;
|
||
-webkit-user-drag: none;
|
||
}
|
||
.leaflet-marker-icon,
|
||
.leaflet-marker-shadow {
|
||
display: block;
|
||
}
|
||
/* map is broken in FF if you have max-width: 100% on tiles */
|
||
.leaflet-container img {
|
||
max-width: none !important;
|
||
}
|
||
/* stupid Android 2 doesn't understand "max-width: none" properly */
|
||
.leaflet-container img.leaflet-image-layer {
|
||
max-width: 15000px !important;
|
||
}
|
||
.leaflet-tile {
|
||
filter: inherit;
|
||
visibility: hidden;
|
||
}
|
||
.leaflet-tile-loaded {
|
||
visibility: inherit;
|
||
}
|
||
.leaflet-zoom-box {
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||
.leaflet-overlay-pane svg {
|
||
-moz-user-select: none;
|
||
}
|
||
|
||
.leaflet-tile-pane { z-index: 2; }
|
||
.leaflet-objects-pane { z-index: 3; }
|
||
.leaflet-overlay-pane { z-index: 4; }
|
||
.leaflet-shadow-pane { z-index: 5; }
|
||
.leaflet-marker-pane { z-index: 6; }
|
||
.leaflet-popup-pane { z-index: 7; }
|
||
|
||
.leaflet-vml-shape {
|
||
width: 1px;
|
||
height: 1px;
|
||
}
|
||
.lvml {
|
||
behavior: url("#default#VML");
|
||
display: inline-block;
|
||
position: absolute;
|
||
}
|
||
|
||
|
||
/* control positioning */
|
||
|
||
.leaflet-control {
|
||
position: relative;
|
||
z-index: 7;
|
||
pointer-events: auto;
|
||
}
|
||
.leaflet-top,
|
||
.leaflet-bottom {
|
||
position: absolute;
|
||
z-index: 1000;
|
||
pointer-events: none;
|
||
}
|
||
.leaflet-top {
|
||
top: 0;
|
||
}
|
||
.leaflet-right {
|
||
right: 0;
|
||
}
|
||
.leaflet-bottom {
|
||
bottom: 0;
|
||
}
|
||
.leaflet-left {
|
||
left: 0;
|
||
}
|
||
.leaflet-control {
|
||
float: left;
|
||
clear: both;
|
||
}
|
||
.leaflet-right .leaflet-control {
|
||
float: right;
|
||
}
|
||
.leaflet-top .leaflet-control {
|
||
margin-top: 10px;
|
||
}
|
||
.leaflet-bottom .leaflet-control {
|
||
margin-bottom: 10px;
|
||
}
|
||
.leaflet-left .leaflet-control {
|
||
margin-left: 10px;
|
||
}
|
||
.leaflet-right .leaflet-control {
|
||
margin-right: 10px;
|
||
}
|
||
|
||
|
||
/* zoom and fade animations */
|
||
|
||
.leaflet-fade-anim .leaflet-tile,
|
||
.leaflet-fade-anim .leaflet-popup {
|
||
opacity: 0;
|
||
-webkit-transition: opacity 0.2s linear;
|
||
-moz-transition: opacity 0.2s linear;
|
||
-o-transition: opacity 0.2s linear;
|
||
transition: opacity 0.2s linear;
|
||
}
|
||
.leaflet-fade-anim .leaflet-tile-loaded,
|
||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||
opacity: 1;
|
||
}
|
||
|
||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||
}
|
||
.leaflet-zoom-anim .leaflet-tile,
|
||
.leaflet-pan-anim .leaflet-tile,
|
||
.leaflet-touching .leaflet-zoom-animated {
|
||
-webkit-transition: none;
|
||
-moz-transition: none;
|
||
-o-transition: none;
|
||
transition: none;
|
||
}
|
||
|
||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||
visibility: hidden;
|
||
}
|
||
|
||
|
||
/* cursors */
|
||
|
||
.leaflet-clickable {
|
||
cursor: pointer;
|
||
}
|
||
.leaflet-container {
|
||
cursor: -webkit-grab;
|
||
cursor: -moz-grab;
|
||
}
|
||
.leaflet-popup-pane,
|
||
.leaflet-control {
|
||
cursor: auto;
|
||
}
|
||
.leaflet-dragging .leaflet-container,
|
||
.leaflet-dragging .leaflet-clickable {
|
||
cursor: move;
|
||
cursor: -webkit-grabbing;
|
||
cursor: -moz-grabbing;
|
||
}
|
||
|
||
|
||
/* visual tweaks */
|
||
|
||
.leaflet-container {
|
||
background: #ddd;
|
||
outline: 0;
|
||
}
|
||
.leaflet-container a {
|
||
color: #0078A8;
|
||
}
|
||
.leaflet-container a.leaflet-active {
|
||
outline: 2px solid orange;
|
||
}
|
||
.leaflet-zoom-box {
|
||
border: 2px dotted #38f;
|
||
background: rgba(255,255,255,0.5);
|
||
}
|
||
|
||
|
||
/* general typography */
|
||
.leaflet-container {
|
||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||
}
|
||
|
||
|
||
/* general toolbar styles */
|
||
|
||
.leaflet-bar {
|
||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||
border-radius: 4px;
|
||
}
|
||
.leaflet-bar a,
|
||
.leaflet-bar a:hover {
|
||
background-color: #fff;
|
||
border-bottom: 1px solid #ccc;
|
||
width: 26px;
|
||
height: 26px;
|
||
line-height: 26px;
|
||
display: block;
|
||
text-align: center;
|
||
text-decoration: none;
|
||
color: black;
|
||
}
|
||
.leaflet-bar a,
|
||
.leaflet-control-layers-toggle {
|
||
background-position: 50% 50%;
|
||
background-repeat: no-repeat;
|
||
display: block;
|
||
}
|
||
.leaflet-bar a:hover {
|
||
background-color: #f4f4f4;
|
||
}
|
||
.leaflet-bar a:first-child {
|
||
border-top-left-radius: 4px;
|
||
border-top-right-radius: 4px;
|
||
}
|
||
.leaflet-bar a:last-child {
|
||
border-bottom-left-radius: 4px;
|
||
border-bottom-right-radius: 4px;
|
||
border-bottom: none;
|
||
}
|
||
.leaflet-bar a.leaflet-disabled {
|
||
cursor: default;
|
||
background-color: #f4f4f4;
|
||
color: #bbb;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-bar a {
|
||
width: 30px;
|
||
height: 30px;
|
||
line-height: 30px;
|
||
}
|
||
|
||
|
||
/* zoom control */
|
||
|
||
.leaflet-control-zoom-in,
|
||
.leaflet-control-zoom-out {
|
||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
||
text-indent: 1px;
|
||
}
|
||
.leaflet-control-zoom-out {
|
||
font-size: 20px;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-control-zoom-in {
|
||
font-size: 22px;
|
||
}
|
||
.leaflet-touch .leaflet-control-zoom-out {
|
||
font-size: 24px;
|
||
}
|
||
|
||
|
||
/* layers control */
|
||
|
||
.leaflet-control-layers {
|
||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
||
background: #fff;
|
||
border-radius: 5px;
|
||
}
|
||
.leaflet-control-layers-toggle {
|
||
background-image: url("../bower_components/leaflet/dist/images/layers.png");
|
||
width: 36px;
|
||
height: 36px;
|
||
}
|
||
.leaflet-retina .leaflet-control-layers-toggle {
|
||
background-image: url("../bower_components/leaflet/dist/images/layers-2x.png");
|
||
background-size: 26px 26px;
|
||
}
|
||
.leaflet-touch .leaflet-control-layers-toggle {
|
||
width: 44px;
|
||
height: 44px;
|
||
}
|
||
.leaflet-control-layers .leaflet-control-layers-list,
|
||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||
display: none;
|
||
}
|
||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||
display: block;
|
||
position: relative;
|
||
}
|
||
.leaflet-control-layers-expanded {
|
||
padding: 6px 10px 6px 6px;
|
||
color: #333;
|
||
background: #fff;
|
||
}
|
||
.leaflet-control-layers-selector {
|
||
margin-top: 2px;
|
||
position: relative;
|
||
top: 1px;
|
||
}
|
||
.leaflet-control-layers label {
|
||
display: block;
|
||
}
|
||
.leaflet-control-layers-separator {
|
||
height: 0;
|
||
border-top: 1px solid #ddd;
|
||
margin: 5px -10px 5px -6px;
|
||
}
|
||
|
||
|
||
/* attribution and scale controls */
|
||
|
||
.leaflet-container .leaflet-control-attribution {
|
||
background: #fff;
|
||
background: rgba(255, 255, 255, 0.7);
|
||
margin: 0;
|
||
}
|
||
.leaflet-control-attribution,
|
||
.leaflet-control-scale-line {
|
||
padding: 0 5px;
|
||
color: #333;
|
||
}
|
||
.leaflet-control-attribution a {
|
||
text-decoration: none;
|
||
}
|
||
.leaflet-control-attribution a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
.leaflet-container .leaflet-control-attribution,
|
||
.leaflet-container .leaflet-control-scale {
|
||
font-size: 11px;
|
||
}
|
||
.leaflet-left .leaflet-control-scale {
|
||
margin-left: 5px;
|
||
}
|
||
.leaflet-bottom .leaflet-control-scale {
|
||
margin-bottom: 5px;
|
||
}
|
||
.leaflet-control-scale-line {
|
||
border: 2px solid #777;
|
||
border-top: none;
|
||
line-height: 1.1;
|
||
padding: 2px 5px 1px;
|
||
font-size: 11px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
-moz-box-sizing: content-box;
|
||
box-sizing: content-box;
|
||
|
||
background: #fff;
|
||
background: rgba(255, 255, 255, 0.5);
|
||
}
|
||
.leaflet-control-scale-line:not(:first-child) {
|
||
border-top: 2px solid #777;
|
||
border-bottom: none;
|
||
margin-top: -2px;
|
||
}
|
||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||
border-bottom: 2px solid #777;
|
||
}
|
||
|
||
.leaflet-touch .leaflet-control-attribution,
|
||
.leaflet-touch .leaflet-control-layers,
|
||
.leaflet-touch .leaflet-bar {
|
||
box-shadow: none;
|
||
}
|
||
.leaflet-touch .leaflet-control-layers,
|
||
.leaflet-touch .leaflet-bar {
|
||
border: 2px solid rgba(0,0,0,0.2);
|
||
background-clip: padding-box;
|
||
}
|
||
|
||
|
||
/* popup */
|
||
|
||
.leaflet-popup {
|
||
position: absolute;
|
||
text-align: center;
|
||
}
|
||
.leaflet-popup-content-wrapper {
|
||
padding: 1px;
|
||
text-align: left;
|
||
border-radius: 12px;
|
||
}
|
||
.leaflet-popup-content {
|
||
margin: 13px 19px;
|
||
line-height: 1.4;
|
||
}
|
||
.leaflet-popup-content p {
|
||
margin: 18px 0;
|
||
}
|
||
.leaflet-popup-tip-container {
|
||
margin: 0 auto;
|
||
width: 40px;
|
||
height: 20px;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
.leaflet-popup-tip {
|
||
width: 17px;
|
||
height: 17px;
|
||
padding: 1px;
|
||
|
||
margin: -10px auto 0;
|
||
|
||
-webkit-transform: rotate(45deg);
|
||
-moz-transform: rotate(45deg);
|
||
-ms-transform: rotate(45deg);
|
||
-o-transform: rotate(45deg);
|
||
transform: rotate(45deg);
|
||
}
|
||
.leaflet-popup-content-wrapper,
|
||
.leaflet-popup-tip {
|
||
background: white;
|
||
|
||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||
}
|
||
.leaflet-container a.leaflet-popup-close-button {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
padding: 4px 4px 0 0;
|
||
text-align: center;
|
||
width: 18px;
|
||
height: 14px;
|
||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||
color: #c3c3c3;
|
||
text-decoration: none;
|
||
font-weight: bold;
|
||
background: transparent;
|
||
}
|
||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||
color: #999;
|
||
}
|
||
.leaflet-popup-scrolled {
|
||
overflow: auto;
|
||
border-bottom: 1px solid #ddd;
|
||
border-top: 1px solid #ddd;
|
||
}
|
||
|
||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||
zoom: 1;
|
||
}
|
||
.leaflet-oldie .leaflet-popup-tip {
|
||
width: 24px;
|
||
margin: 0 auto;
|
||
|
||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||
}
|
||
.leaflet-oldie .leaflet-popup-tip-container {
|
||
margin-top: -1px;
|
||
}
|
||
|
||
.leaflet-oldie .leaflet-control-zoom,
|
||
.leaflet-oldie .leaflet-control-layers,
|
||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
||
.leaflet-oldie .leaflet-popup-tip {
|
||
border: 1px solid #999;
|
||
}
|
||
|
||
|
||
/* div icon */
|
||
|
||
.leaflet-div-icon {
|
||
background: #fff;
|
||
border: 1px solid #666;
|
||
}</style><template><div id="map"></div><content id="markers" select="*"></content></template></dom-module><script>"use strict";Polymer({is:"leaflet-map",properties:{latitude:{type:Number,value:51,reflectToAttribute:!0,notify:!0,observer:"_viewChanged"},longitude:{type:Number,value:0,reflectToAttribute:!0,notify:!0,observer:"_viewChanged"},zoom:{type:Number,value:-1,reflectToAttribute:!0,notify:!0,observer:"_viewChanged"},minZoom:{type:Number,value:0},maxZoom:{type:Number,value:9007199254740992},noDragging:{type:Boolean,value:!1},noTouchZoom:{type:Boolean,value:!1},noScrollWheelZoom:{type:Boolean,value:!1},noDoubleClickZoom:{type:Boolean,value:!1},noBoxZoom:{type:Boolean,value:!1},noTap:{type:Boolean,value:!1},tapTolerance:{type:Number,value:15},noTrackResize:{type:Boolean,value:!1},worldCopyJump:{type:Boolean,value:!1},noClosePopupOnClick:{type:Boolean,value:!1},noBounceAtZoomLimits:{type:Boolean,value:!1},noKeyboard:{type:Boolean,value:!1},keyboardPanOffset:{type:Number,value:80},keyboardZoomOffset:{type:Number,value:1},noInertia:{type:Boolean,value:!1},inertiaDeceleration:3e3,inertiaMaxSpeed:{type:Number,value:1500},noZoomControl:{type:Boolean,value:!1},noAttributionControl:{type:Boolean,value:!1},zoomAnimationThreshold:{type:Number,value:4},fitToMarkers:{type:Boolean,value:!1,observer:"_fitToMarkers"}},map:void 0,ready:function(){var e=this;setTimeout(function(){e.domReady()},1)},guessLeafletImagePath:function(){if(!L.Icon.Default.imagePath){var e,o,t,i,a,n=document.getElementsByTagName("link"),r=/[\/^]leaflet-map.html$/;for(e=0,o=n.length;o>e;e++)t=n[e].href,i=t.match(r),i&&(a=t.split(r)[0],L.Icon.Default.imagePath=(a?a+"/":"")+"../leaflet/dist/images")}},domReady:function(){this.guessLeafletImagePath();var e=L.map(this.$.map,{center:[this.latitude,this.longitude],zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom,dragging:!this.noDragging,touchZoom:!this.noTouchZoom,scrollWheelZoom:!this.noScrollWheelZoom,doubleClickZoom:!this.noDoubleClickZoom,boxZoom:!this.noBoxZoom,tap:!this.noTap,tapTolerance:this.tapTolerance,trackResize:!this.noTrackResize,worldCopyJump:this.worldCopyJump,closePopupOnClick:!this.noClosePopupOnClick,bounceAtZoomLimits:!this.noBounceAtZoomLimits,keyboard:!this.noKeyboard,keyboardPanOffset:this.keyboardPanOffset,keyboardZoomOffset:this.keyboardZoomOffset,inertia:!this.noInertia,inertiaDeceleration:this.inertiaDeceleration,inertiaMaxSpeed:this.inertiaMaxSpeed,zoomControl:!this.noZoomControl,attributionControl:!this.noAttributionControl,zoomAnimationThreshold:this.zoomAnimationThreshold});this.map=e,e.on("click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu focus blur preclick load unload viewreset movestart move moveend dragstart drag dragend zoomstart zoomend zoomlevelschange resize autopanstart layeradd layerremove baselayerchange overlayadd overlayremove locationfound locationerror popupopen popupclose",function(e){this.fire(e.type,e)},this),e.on("moveend",function(o){this._ignoreViewChange=!0,this.longitude=e.getCenter().lng,this.latitude=e.getCenter().lat,this._ignoreViewChange=!1},this),e.on("zoomend",function(o){this.zoom=e.getZoom()},this),-1==this.zoom&&this.map.fitWorld();for(var o=!0,t=0;t<this.children.length;t++){var i=this.children[t];i.isLayer&&i.isLayer()&&(o=!1)}o&&L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',maxZoom:18}).addTo(this.map),this.registerMapOnChildren(),this._mutationObserver=new MutationObserver(this.registerMapOnChildren.bind(this)),this._mutationObserver.observe(this,{childList:!0})},detached:function(){this._mutationObserver.disconnect()},_viewChanged:function(e,o){this.map&&!this._ignoreViewChange&&setTimeout(function(){this.map.setView(L.latLng(this.latitude,this.longitude),this.zoom)}.bind(this),1)},registerMapOnChildren:function(){for(var e=0;e<this.children.length;e++)this.children[e].container=this.map;this._fitToMarkers()},_fitToMarkers:function(){if(this.map&&this.fitToMarkers){for(var e,o=[],t=0;e=this.children[t];t++)e.latitude&&e.longitude&&o.push([e.latitude,e.longitude]);o.length>0&&(this.map.fitBounds(o),this.map.invalidateSize())}},toGeoJSON:function(){for(var e,o={type:"FeatureCollection",features:[]},t=0;e=this.features[t];t++)o.features.push(e.feature.toGeoJSON());return o}});</script><dom-module id="leaflet-circle" assetpath="../bower_components/leaflet-map/"><style>:host{ display: none; }</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-circle",feature:null,behaviors:[leafletMap.LeafletPath,leafletMap.LeafletPopupContent],properties:{longitude:{type:Number,observer:"_updatePosition"},latitude:{type:Number,observer:"_updatePosition"},radius:{type:Number,value:100,observer:"_updateRadius"},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){this.latitude&&this.longitude&&this.container&&(this.feature=L.circle([this.latitude,this.longitude],this.radius,this.getPathOptions()),this.feature.addTo(this.container),this.updatePopupContent(),this.feature.on("click dblclick mousedown mouseover mouseout contextmenu add remove popupopen popupclose",function(t){this.fire(t.type,t)},this))},_updatePosition:function(){this.feature&&null!=this.latitude&&null!=this.longitude&&this.feature.setLatLng(L.latLng(this.latitude,this.longitude))},_updateRadius:function(){this.feature&&null!=this.radius&&this.feature.setRadius(this.radius)},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}});</script><dom-module id="leaflet-polyline" assetpath="../bower_components/leaflet-map/"><style>:host{ display: none; }</style><template><content id="points" select="leaflet-point"></content></template></dom-module><script>"use strict";Polymer({is:"leaflet-polyline",behaviors:[leafletMap.LeafletPath,leafletMap.LeafletPointContent,leafletMap.LeafletPopupContent],feature:null,properties:{container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){this.container&&(this.feature=L.polyline([],this.getPathOptions()),this.feature.addTo(this.container),this.updatePointContent(),this.updatePopupContent(),this.feature.on("click dblclick mousedown mouseover mouseout contextmenu add remove popupopen popupclose",function(e){this.fire(e.type,e)},this))},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}});</script><dom-module id="leaflet-polygon" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template><content id="points" select="leaflet-point"></content></template></dom-module><script>"use strict";Polymer({is:"leaflet-polygon",behaviors:[leafletMap.LeafletPath,leafletMap.LeafletPointContent,leafletMap.LeafletPopupContent],properties:{container:{type:Object,observer:"_containerChanged"}},feature:null,_containerChanged:function(){if(this.container){var e=this.getPathOptions();("undefined"==typeof e.fill||null===e.fill)&&(e.fill=!0),this.feature=L.polygon([],e),this.feature.addTo(this.container),this.updatePointContent(),this.updatePopupContent(),this.feature.on("click dblclick mousedown mouseover mouseout contextmenu add remove popupopen popupclose",function(e){this.fire(e.type,e)},this)}},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}});</script><dom-module id="leaflet-scale-control" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template></template><script>"use strict";Polymer({is:"leaflet-scale-control",properties:{position:{type:String,value:"bottomleft"},maxWidth:{type:Number,value:100},metric:{type:Boolean,value:!1},imperial:{type:Boolean,value:!1},updateWhenIdle:{type:Boolean,value:!1},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){if(this.container){var t=L.control.scale({position:this.position,maxWidth:this.maxWidth,metric:this.metric||!this.imperial,imperial:this.imperial||!this.metric,updateWhenIdle:this.updateWhenIdle});this.control=t,this.control.addTo(this.container)}},detached:function(){this.container&&this.control&&this.container.removeControl(this.control)}});</script></dom-module><dom-module id="leaflet-tilelayer" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-tilelayer",behaviors:[leafletMap.LeafletILayer,leafletMap.LeafletTileLayer],properties:{url:{type:String,value:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",observer:"_urlChanged"},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){if(this.container){var e=this.url.replace(new RegExp("%7B([sxyz])%7D","g"),"{$1}"),t=L.tileLayer(e,{attribution:Polymer.dom(this).innerHTML+this.attribution,minZoom:this.minZoom,maxZoom:this.maxZoom,maxNativeZoom:this.maxNativeZoom,tileSize:this.tileSize,subdomains:this.subdomains,errorTileUrl:this.errorTileUrl,tms:this.tms,continuousWorld:this.continuousWorld,noWrap:this.noWrap,zoomOffset:this.zoomOffset,zoomReverse:this.zoomReverse,opacity:this.opacity,zIndex:this.zIndex,detectRetina:this.detectRetina,reuseTiles:this.reuseTiles});this.layer=t,t.on("loading load tileloadstart tileload tileunload",function(e){this.fire(e.type,e)},this),this.layer.addTo(this.container)}},_urlChanged:function(){if(this.layer){var e=this.url.replace(new RegExp("%7B([sxyz])%7D","g"),"{$1}");this.layer.setUrl(e)}}});</script><dom-module id="leaflet-tilelayer-wms" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-tilelayer-wms",behaviors:[leafletMap.LeafletILayer,leafletMap.LeafletTileLayer],properties:{url:{type:String,observer:"_urlChanged"},layers:{type:String,value:""},styles:{type:String,value:""},format:{type:String,value:"image/jpeg"},transparent:{type:Boolean,value:!1},version:{type:String,value:"1.1.1"},crs:Object,container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){if(this.container){var e=L.tileLayer.wms(this.url,{attribution:Polymer.dom(this).innerHTML+this.attribution,minZoom:this.minZoom,maxZoom:this.maxZoom,maxNativeZoom:this.maxNativeZoom,tileSize:this.tileSize,subdomains:this.subdomains,errorTileUrl:this.errorTileUrl,tms:this.tms,continuousWorld:this.continuousWorld,noWrap:this.noWrap,zoomOffset:this.zoomOffset,zoomReverse:this.zoomReverse,opacity:this.opacity,zIndex:this.zIndex,detectRetina:this.detectRetina,reuseTiles:this.reuseTiles,layers:this.layers,styles:this.styles,format:this.format,transparent:this.transparent,version:this.version,crs:this.crs});this.layer=e,e.on("loading load tileloadstart tileload tileunload",function(e){this.fire(e.type,e)},this),this.layer.addTo(this.container)}},_urlChanged:function(){this.layer&&this.layer.setUrl(this.url)}});</script>-<dom-module id="leaflet-layer-group" assetpath="../bower_components/leaflet-map/"><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-layer-group",properties:{container:{type:Object,observer:"_containerChanged"}},ready:function(){this._mutationObserver=new MutationObserver(this.registerContainerOnChildren.bind(this)),this._mutationObserver.observe(this,{childList:!0})},_containerChanged:function(){if(this.container){var e=L.layerGroup();this.feature=e,this.feature.addTo(this.container),this.registerContaierOnChildren()}},registerContaierOnChildren:function(){for(var e=0;e<this.children.length;e++)this.children[e].container=this.feature},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature),this._mutationObserver.disconnect()}});</script><dom-element name="leaflet-geojson"><template><style>:host { display: none; }</style></template></dom-element><script>"use strict";Polymer({is:"leaflet-geojson",behaviors:[leafletMap.LeafletILayer],properties:{data:{type:Object,observer:"_dataChanged"},container:{type:Object,observer:"_containerChanged"},color:{type:String,value:"#03f"},weight:{type:Number,value:5},opacity:{type:Number,value:.5},fill:{type:Boolean,value:null},fillColor:{type:String,value:null},fillOpacity:{type:Number,value:.2},dashArray:{type:String,value:null},lineCap:{type:String,value:null},lineJoin:{type:String,value:null}},_containerChanged:function(){this.container&&this.data&&this._dataChanged()},_dataChanged:function(){this.container&&this.data&&(this.feature&&this.container.removeLayer(this.feature),this.feature=L.geoJson(this.data),this.feature.addTo(this.container).setStyle({color:this.color,weight:this.weight,opacity:this.opacity,fill:this.fill,fillColor:this.fillColor,fillOpacity:this.fillOpacity,dashArray:this.dashArray,lineCap:this.lineCap,lineJoin:this.lineJoin}))},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}});</script><dom-module id="leaflet-icon" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template></template><script>"use strict";Polymer({is:"leaflet-icon",properties:{iconUrl:{type:String,observer:"_attributeChanged"},iconRetinaUrl:{type:String,observer:"_attributeChanged"},iconWidth:{type:Number,observer:"_attributeChanged"},iconHeight:{type:Number,observer:"_attributeChanged"},iconAnchorX:{type:Number,observer:"_attributeChanged"},iconAnchorY:{type:Number,observer:"_attributeChanged"},shadowUrl:{type:String,observer:"_attributeChanged"},shadowRetinaUrl:{type:String,observer:"_attributeChanged"},shadowWidth:{type:Number,observer:"_attributeChanged"},shadowHeight:{type:Number,observer:"_attributeChanged"},shadowAnchorX:{type:Number,observer:"_attributeChanged"},shadowAnchorY:{type:Number,observer:"_attributeChanged"},popupAnchorX:{type:Number,observer:"_attributeChanged"},popupAnchorY:{type:Number,observer:"_attributeChanged"},className:{type:String,value:"",observer:"_attributeChanged"}},icon_:null,getIcon:function(){if(this.icon_)return this.icon_;var t={iconUrl:this.iconUrl,iconRetinaUrl:this.iconRetinaUrl,shadowUrl:this.shadowUrl,shadowRetinaUrl:this.shadowRetinaUrl,className:this.className};return this.iconWidth&&this.iconHeight&&(t.iconSize=L.point(this.iconWidth,this.iconHeight)),this.iconAnchorX&&this.iconAnchorY&&(t.iconAnchor=L.point(this.iconAnchorX,this.iconAnchorY)),this.shadowWidth&&this.shadowHeight&&(t.shadowSize=L.point(this.shadowWidth,this.shadowHeight)),this.shadowAnchorX&&this.shadowAnchorY&&(t.shadowAnchor=L.point(this.shadowAnchorX,this.shadowAnchorY)),this.popupAnchorX&&this.popupAnchorY&&(t.popupAnchor=L.point(this.popupAnchorX,this.popupAnchorY)),this.icon_=L.icon(t),this.icon_},_attributeChanged:function(){this.icon_=null}});</script></dom-module><dom-module id="leaflet-divicon" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template></template><script>"use strict";Polymer({is:"leaflet-divicon",properties:{iconWidth:{type:Number,observer:"_attributeChanged"},iconHeight:{type:Number,observer:"_attributeChanged"},iconAnchorX:{type:Number,observer:"_attributeChanged"},iconAnchorY:{type:Number,observer:"_attributeChanged"},className:{type:String,value:"",observer:"_attributeChanged"}},icon_:null,getIcon:function(){if(this.icon_)return this.icon_;var i={className:this.className,html:Polymer.dom(this).innerHTML};return this.iconWidth&&this.iconHeight&&(i.iconSize=L.point(this.iconWidth,this.iconHeight)),this.iconAnchorX&&this.iconAnchorY&&(i.iconAnchor=L.point(this.iconAnchorX,this.iconAnchorY)),this.icon_=L.divIcon(i),this.icon_},_attributeChanged:function(){this.icon_=null}});</script></dom-module><dom-module id="leaflet-marker" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template></template><script>"use strict";Polymer({is:"leaflet-marker",behaviors:[leafletMap.LeafletPopupContent],properties:{latitude:{type:Number,value:null,reflectToAttribute:!0,notify:!0,observer:"_positionChanged"},longitude:{type:Number,value:null,reflectToAttribute:!0,notify:!0,observer:"_positionChanged"},icon:{type:Object,observer:"_iconChanged"},noClickable:{type:Boolean,value:!1},draggable:{type:Boolean,value:!1},noKeyboard:{type:Boolean,value:!1},title:{type:String,value:""},alt:{type:String,value:""},zIndexOffset:{type:Number,value:0,observer:"_zIndexOffsetChanged"},opacity:{type:Number,value:1,observer:"_opacityChanged"},riseOnHover:{type:Boolean,value:!1},riseoffset:{type:Number,value:250},container:{type:Object,observer:"_containerChanged"}},feature:void 0,observer_:void 0,_containerChanged:function(){if(this.container){var e=L.marker([this.latitude,this.longitude],{clickable:!this.noClickable,draggable:this.draggable,keyboard:!this.noKeyboard,title:this.title,alt:this.alt,zIndexOffset:this.zIndexOffset,opacity:this.opacity,riseOnHover:this.riseOnHover,riseOffset:this.riseOffset});this.feature=e,this._iconChanged(),e.on("click dblclick mousedown mouseover mouseout contextmenu dragstart drag dragend move add remove popupopen popupclose",function(e){this.fire(e.type,e)},this),this.updatePopupContent(),this.feature.addTo(this.container)}},_iconChanged:function(){var e;if(this.icon){if("string"==typeof this.icon){var t=document.getElementById(this.icon);if(null!=t)t.getIcon&&(e=t.getIcon());else try{e=L.icon(JSON.parse(this.icon))}catch(i){e=new L.Icon.Default}}"object"==typeof this.icon&&(e=this.icon.options?this.icon:L.icon(this.icon))}e||(e=new L.Icon.Default),this.feature&&this.feature.setIcon(e)},_positionChanged:function(){this.feature&&this.feature.setLatLng(L.latLng(this.latitude,this.longitude))},_zIndexOffsetChanged:function(){this.feature&&this.feature.setZIndexOffset(this.zIndexOffset)},_opacityChanged:function(){this.feature&&this.feature.setOpacity(this.opacity)},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}});</script></dom-module><dom-module id="leaflet-geolocation" assetpath="../bower_components/leaflet-map/"><style>:host {display: none;}</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-geolocation",properties:{watch:{type:Boolean,value:!1},setView:{type:Boolean,value:!1},maxZoom:{type:Number,value:1/0},timeout:{type:Number,value:1e4},maximumAge:{type:Number,value:0},enableHighAccuracy:{type:Boolean,value:!1},latitude:{type:Number,value:null,notify:!0},longitude:{type:Number,value:null,notify:!0},bounds:{type:Number,value:null,notify:!0},accuracy:{type:Number,value:null,notify:!0},altitude:{type:Number,value:null,notify:!0},altitudeAccuracy:{type:Number,value:null,notify:!0},heading:{type:Number,value:null,notify:!0},speed:{type:Number,value:null,notify:!0},timestamp:{type:Number,value:null,notify:!0},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){this.container&&(this.container.on("locationfound locationerror",function(e){this.fire(e.type,e)},this),this.container.on("locationfound",function(e){this.latitude=e.latlng.lat,this.longitude=e.latlng.lng,this.bounds=e.bounds,this.accuracy=e.accuracy,this.altitude=e.altitude,this.altitudeAccuracy=e.altitudeAccuracy,this.heading=e.heading,this.speed=e.speed,this.timestamp=e.timestamp},this),this.container.locate({watch:this.watch,setView:this.setView,maxZoom:this.maxZoom,timeout:this.timeout,maximumAge:this.maximumAge,enableHighAccuracy:this.enableHighAccuracy}))}});</script><dom-module id="ha-entity-marker" assetpath="components/entity/"><style>.marker {
|
||
display: inline-block;
|
||
text-align: center;
|
||
vertical-align: top;
|
||
position: relative;
|
||
display: block;
|
||
margin: 0 auto;
|
||
width: 2.5em;
|
||
text-align: center;
|
||
height: 2.5em;
|
||
line-height: 2.5em;
|
||
font-size: 1.5em;
|
||
border-radius: 50%;
|
||
border: 0.1em solid var(--ha-marker-color, --default-primary-color);
|
||
color: rgb(76, 76, 76);
|
||
background-color: white;
|
||
}
|
||
iron-image {
|
||
border-radius: 50%;
|
||
}</style><template><div class="marker"><template is="dom-if" if="[[icon]]"><iron-icon icon="[[icon]]"></iron-icon></template><template is="dom-if" if="[[value]]">[[value]]</template><template is="dom-if" if="[[image]]"><iron-image sizing="cover" class="fit" src="[[image]]"></iron-image></template></div></template></dom-module><dom-module id="partial-map" assetpath="layouts/"><style>.map {
|
||
position: relative;
|
||
}</style><template><div class="layout vertical fit"><paper-toolbar><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button><div class="title">Map</div></paper-toolbar><div class="flex map"><leaflet-map class="fit" fit-to-markers="" id="map" max-zoom="17"><leaflet-tilelayer detect-retina="" max-zoom="18" url="http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png">© <a href="/copyright">OpenStreetMap contributors</a>. Tiles courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png"></leaflet-tilelayer><template is="dom-repeat" items="[[zoneEntities]]"><leaflet-divicon id="[[item.entityId]]" icon-width="24" icon-height="24"><template is="dom-if" if="[[item.attributes.icon]]"><iron-icon icon$="[[item.attributes.icon]]"></iron-icon></template><template is="dom-if" if="[[!item.attributes.icon]]">[[item.entityDisplay]]</template></leaflet-divicon><leaflet-marker latitude="[[item.attributes.latitude]]" icon="[[item.entityId]]" longitude="[[item.attributes.longitude]]" title="[[item.entityDisplay]]" no-clickable=""></leaflet-marker><leaflet-circle latitude="[[item.attributes.latitude]]" longitude="[[item.attributes.longitude]]" no-clickable="" radius="[[item.attributes.radius]]" fill="" color="#FF9800"></leaflet-circle></template><template is="dom-repeat" items="[[locationEntities]]"><leaflet-divicon id="[[item.entityId]]" icon-height="45" icon-width="45"><ha-entity-marker entity-id$="[[item.entityId]]"></ha-entity-marker></leaflet-divicon><leaflet-marker latitude="[[item.attributes.latitude]]" icon="[[item.entityId]]" longitude="[[item.attributes.longitude]]" title="[[item.entityDisplay]]"></leaflet-marker><template is="dom-if" if="[[item.attributes.gps_accuracy]]"><leaflet-circle latitude="[[item.attributes.latitude]]" longitude="[[item.attributes.longitude]]" no-clickable="" radius="[[item.attributes.gps_accuracy]]" fill="" color="#0288D1"></leaflet-circle></template></template></leaflet-map></div></div></template></dom-module><dom-module id="iron-autogrow-textarea" assetpath="../bower_components/iron-autogrow-textarea/"><style>:host {
|
||
display: inline-block;
|
||
position: relative;
|
||
width: 400px;
|
||
border: 1px solid;
|
||
padding: 2px;
|
||
-moz-appearance: textarea;
|
||
-webkit-appearance: textarea;
|
||
}
|
||
|
||
.mirror-text {
|
||
visibility: hidden;
|
||
word-wrap: break-word;
|
||
}
|
||
|
||
.fit {
|
||
@apply(--layout-fit);
|
||
}
|
||
|
||
textarea {
|
||
position: relative;
|
||
outline: none;
|
||
border: none;
|
||
resize: none;
|
||
background: inherit;
|
||
color: inherit;
|
||
/* see comments in template */
|
||
width: 100%;
|
||
height: 100%;
|
||
font-size: inherit;
|
||
font-family: inherit;
|
||
line-height: inherit;
|
||
text-align: inherit;
|
||
@apply(--iron-autogrow-textarea);
|
||
}
|
||
|
||
::content textarea:invalid {
|
||
box-shadow: none;
|
||
}</style><template><div id="mirror" class="mirror-text" aria-hidden="true"> </div><div class="textarea-container fit"><textarea id="textarea" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" maxlength$="[[maxlength]]"></textarea></div></template></dom-module><script>Polymer({is:"iron-autogrow-textarea",behaviors:[Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior,Polymer.IronControlState],properties:{bindValue:{observer:"_bindValueChanged",type:String},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},name:{type:String},value:{notify:!0,type:String,computed:"_computeValue(bindValue)"},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},maxlength:{type:Number}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},validate:function(){if(!this.required&&""==this.value)return this.invalid=!1,!0;var e;return this.hasValidator()?e=Polymer.IronValidatableBehavior.validate.call(this,this.value):(e=this.$.textarea.validity.valid,this.invalid=!e),this.fire("iron-input-validate"),e},_bindValueChanged:function(){var e=this.textarea;e&&(e.value!==this.bindValue&&(e.value=this.bindValue||0===this.bindValue?this.bindValue:""),this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){this.bindValue=e.path?e.path[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+" "},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&").replace(/"/gm,""").replace(/'/gm,"'").replace(/</gm,"<").replace(/>/gm,">").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)},_computeValue:function(){return this.bindValue}});</script><dom-module id="paper-textarea" assetpath="../bower_components/paper-input/"><template><style>:host {
|
||
display: block;
|
||
}</style><paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"><label hidden$="[[!label]]">[[label]]</label><iron-autogrow-textarea id="input" class="paper-input-input" bind-value="{{value}}" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea><template is="dom-if" if="[[errorMessage]]"><paper-input-error>[[errorMessage]]</paper-input-error></template><template is="dom-if" if="[[charCounter]]"><paper-input-char-counter></paper-input-char-counter></template></paper-input-container></template></dom-module><script>Polymer({is:"paper-textarea",behaviors:[Polymer.PaperInputBehavior],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},_ariaLabelledByChanged:function(e){this.$.input.textarea.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this.$.input.textarea.setAttribute("aria-describedby",e)}});</script><dom-module id="paper-menu-shared-styles" assetpath="../bower_components/paper-menu/"><template><style>/* need a wrapper element to make this higher specificity than the :host rule in paper-item */
|
||
.selectable-content > ::content > .iron-selected {
|
||
font-weight: bold;
|
||
|
||
@apply(--paper-menu-selected-item);
|
||
}
|
||
|
||
.selectable-content > ::content > [disabled] {
|
||
color: var(--paper-menu-disabled-color, --disabled-text-color);
|
||
}
|
||
|
||
.selectable-content > ::content > *:focus {
|
||
position: relative;
|
||
outline: 0;
|
||
|
||
@apply(--paper-menu-focused-item);
|
||
}
|
||
|
||
.selectable-content > ::content > *:focus:after {
|
||
@apply(--layout-fit);
|
||
background: currentColor;
|
||
opacity: var(--dark-divider-opacity);
|
||
content: '';
|
||
|
||
@apply(--paper-menu-focused-item-after);
|
||
}
|
||
|
||
.selectable-content > ::content > *[colored]:focus:after {
|
||
opacity: 0.26;
|
||
}</style></template></dom-module><dom-module id="paper-menu" assetpath="../bower_components/paper-menu/"><template><style include="paper-menu-shared-styles"></style><style>:host {
|
||
display: block;
|
||
padding: 8px 0;
|
||
|
||
background: var(--paper-menu-background-color, --primary-background-color);
|
||
color: var(--paper-menu-color, --primary-text-color);
|
||
|
||
@apply(--paper-menu);
|
||
}</style><div class="selectable-content"><content></content></div></template><script>!function(){Polymer({is:"paper-menu",behaviors:[Polymer.IronMenuBehavior]})}();</script></dom-module><dom-module id="services-list" assetpath="components/"><style>ul {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
li {
|
||
list-style: none;
|
||
line-height: 2em;
|
||
}
|
||
|
||
a {
|
||
color: var(--accent-color);
|
||
}</style><template><ul><template is="dom-repeat" items="[[computeDomains(serviceDomains)]]" as="domain"><template is="dom-repeat" items="[[computeServices(serviceDomains, domain)]]" as="service"><li><a href="#" on-click="serviceClicked"><span>[[domain]]</span>/<span>[[service]]</span></a></li></template></template></ul></template></dom-module><dom-module id="partial-dev-call-service" assetpath="layouts/"><style>.form {
|
||
padding: 24px;
|
||
background-color: white;
|
||
margin-top: 64px;
|
||
}
|
||
|
||
.ha-form {
|
||
margin-right: 16px;
|
||
}
|
||
|
||
.description {
|
||
margin-top: 24px;
|
||
white-space: pre-wrap;
|
||
}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">Call Service</span><div class="form fit"><p>Call a service from a component.</p><div class$="[[computeFormClasses(narrow)]]"><div class="layout vertical flex"><div class="ha-form"><paper-input label="Domain" autofocus="" value="{{domain}}"></paper-input><paper-input label="Service" value="{{service}}"></paper-input><paper-textarea label="Service Data (JSON, optional)" value="{{serviceData}}"></paper-textarea><paper-button on-click="callService" raised="">Call Service</paper-button></div><div class="description">[[description]]</div></div><div><h4>Available services:</h4><services-list on-service-selected="serviceSelected"></services-list></div></div></div></partial-base></template></dom-module><dom-module id="events-list" assetpath="components/"><style>ul {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
li {
|
||
list-style: none;
|
||
line-height: 2em;
|
||
}
|
||
|
||
a {
|
||
color: var(--accent-color);
|
||
}</style><template><ul><template is="dom-repeat" items="[[events]]" as="event"><li><a href="#" on-click="eventSelected">{{event.event}}</a> <span>(</span><span>{{event.listener_count}}</span><span>listeners)</span></li></template></ul></template></dom-module><dom-module id="partial-dev-fire-event" assetpath="layouts/"><style>.form {
|
||
padding: 24px;
|
||
background-color: white;
|
||
margin-top: 64px;
|
||
}
|
||
|
||
.ha-form {
|
||
margin-right: 16px;
|
||
}</style><template><partial-base narrow="{{narrow}}" show-menu="[[showMenu]]"><span header-title="">Fire Event</span><div class="form fit"><p>Fire an event on the event bus.</p><div class$="[[computeFormClasses(narrow)]]"><div class="ha-form flex"><paper-input label="Event Type" autofocus="" required="" value="{{eventType}}"></paper-input><paper-textarea label="Event Data (JSON, optional)" value="{{eventData}}"></paper-textarea><paper-button on-click="fireEvent" raised="">Fire Event</paper-button></div><div><h4>Available events:</h4><events-list on-event-selected="eventSelected"></events-list></div></div></div></partial-base></template></dom-module><dom-module id="entity-list" assetpath="components/"><style>ul {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
li {
|
||
list-style: none;
|
||
line-height: 2em;
|
||
}
|
||
|
||
a {
|
||
color: var(--accent-color);
|
||
}</style><template><ul><template is="dom-repeat" items="[[entities]]" as="entity"><li><a href="#" on-click="entitySelected">[[entity.entityId]]</a></li></template></ul></template></dom-module><dom-module id="partial-dev-set-state" assetpath="layouts/"><style>.form {
|
||
padding: 24px;
|
||
background-color: white;
|
||
margin-top: 64px;
|
||
}
|
||
|
||
.ha-form {
|
||
margin-right: 16px;
|
||
}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">Set State</span><div class="form fit"><div>Set the representation of a device within Home Assistant.<br>This will not communicate with the actual device.</div><div class$="[[computeFormClasses(narrow)]]"><div class="ha-form flex"><paper-input label="Entity ID" autofocus="" required="" value="{{entityId}}"></paper-input><paper-input label="State" required="" value="{{state}}"></paper-input><paper-textarea label="State attributes (JSON, optional)" value="{{stateAttributes}}"></paper-textarea><paper-button on-click="handleSetState" raised="">Set State</paper-button></div><div class="sidebar"><h4>Current entities:</h4><entity-list on-entity-selected="entitySelected"></entity-list></div></div></div></partial-base></template></dom-module><dom-module id="partial-dev-info" assetpath="layouts/"><style>.content {
|
||
margin-top: 64px;
|
||
padding: 24px;
|
||
background-color: white;
|
||
-ms-user-select: initial;
|
||
-webkit-user-select: initial;
|
||
-moz-user-select: initial;
|
||
}
|
||
|
||
.about {
|
||
text-align: center;
|
||
line-height: 2em;
|
||
}
|
||
|
||
.version {
|
||
font-size: 24px;
|
||
}
|
||
|
||
.develop {
|
||
font-size: 18px;
|
||
}
|
||
|
||
.about a {
|
||
color: var(--dark-primary-color);
|
||
}
|
||
|
||
.error-log-intro {
|
||
margin-top: 16px;
|
||
border-top: 1px solid var(--light-primary-color);
|
||
padding-top: 16px;
|
||
}
|
||
|
||
paper-icon-button {
|
||
float: right;
|
||
}
|
||
|
||
.error-log {
|
||
clear: both;
|
||
white-space: pre-wrap;
|
||
}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">About</span><div class="content fit"><div class="about"><p class="version"><a href="https://home-assistant.io"><img src="/static/favicon-192x192.png" height="192"></a><br>Home Assistant<br>[[hassVersion]]</p><p class="develop"><a href="https://home-assistant.io/developers/credits/" target="_blank">Developed by a bunch of awesome people.</a></p><p>Published under the MIT license<br>Source: <a href="https://github.com/balloob/home-assistant" target="_blank">server</a> — <a href="https://github.com/balloob/home-assistant-polymer" target="_blank">frontend-ui</a> — <a href="https://github.com/balloob/home-assistant-js" target="_blank">frontend-core</a></p><p>Built using <a href="https://www.python.org">Python 3</a>, <a href="https://www.polymer-project.org" target="_blank">Polymer [[polymerVersion]]</a>, <a href="https://optimizely.github.io/nuclear-js/" target="_blank">NuclearJS [[nuclearVersion]]</a><br>Icons by <a href="https://www.google.com/design/icons/" target="_blank">Google</a> and <a href="https://MaterialDesignIcons.com" target="_blank">MaterialDesignIcons.com</a>.</p></div><p class="error-log-intro">The following errors have been logged this session:<paper-icon-button icon="mdi:refresh" on-tap="refreshErrorLog"></paper-icon-button></p><pre class="error-log">[[errorLog]]</pre></div></partial-base></template></dom-module><dom-module id="iron-a11y-announcer" assetpath="../bower_components/iron-a11y-announcer/"><style>:host {
|
||
display: inline-block;
|
||
position: fixed;
|
||
clip: rect(0px,0px,0px,0px);
|
||
}</style><template><div aria-live$="[[mode]]">[[_text]]</div></template><script>!function(){"use strict";Polymer.IronA11yAnnouncer=Polymer({is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(n){this._text="",this.async(function(){this._text=n},100)},_onIronAnnounce:function(n){n.detail&&n.detail.text&&this.announce(n.detail.text)}}),Polymer.IronA11yAnnouncer.instance=null,Polymer.IronA11yAnnouncer.requestAvailability=function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(Polymer.IronA11yAnnouncer.instance)}}();</script></dom-module><dom-module id="iron-overlay-backdrop" assetpath="../bower_components/iron-overlay-behavior/"><style>:host {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
background-color: var(--iron-overlay-backdrop-background-color, #000);
|
||
opacity: 0;
|
||
transition: opacity 0.2s;
|
||
|
||
@apply(--iron-overlay-backdrop);
|
||
}
|
||
|
||
:host([opened]) {
|
||
opacity: var(--iron-overlay-backdrop-opacity, 0.6);
|
||
|
||
@apply(--iron-overlay-backdrop-opened);
|
||
}</style><template><content></content></template></dom-module><script>!function(){Polymer({is:"iron-overlay-backdrop",properties:{opened:{readOnly:!0,reflectToAttribute:!0,type:Boolean,value:!1},_manager:{type:Object,value:Polymer.IronOverlayManager}},prepare:function(){this.parentNode||(Polymer.dom(document.body).appendChild(this),this.style.zIndex=this._manager.currentOverlayZ()-1)},open:function(){this._manager.getBackdrops().length<2&&this._setOpened(!0)},close:function(){this._manager.getBackdrops().length<2&&this._setOpened(!1)},complete:function(){0===this._manager.getBackdrops().length&&this.parentNode&&Polymer.dom(this.parentNode).removeChild(this)}})}();</script><dom-module id="paper-toast" assetpath="../bower_components/paper-toast/"><template><style>:host {
|
||
display: block;
|
||
position: fixed;
|
||
|
||
background: #323232;
|
||
color: #f1f1f1;
|
||
min-height: 48px;
|
||
min-width: 288px;
|
||
padding: 16px 24px 12px;
|
||
box-sizing: border-box;
|
||
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
|
||
border-radius: 2px;
|
||
left: 0;
|
||
margin: 12px;
|
||
font-size: 14px;
|
||
cursor: default;
|
||
-webkit-transition: visibility 0.3s, -webkit-transform 0.3s, opacity 0.3s;
|
||
transition: visibility 0.3s, transform 0.3s, opacity 0.3s;
|
||
|
||
visibility: hidden;
|
||
bottom: -100px;
|
||
opacity: 0;
|
||
-webkit-transform: translateY(0px);
|
||
transform: translateY(0px);
|
||
}
|
||
|
||
:host(.capsule) {
|
||
border-radius: 24px;
|
||
}
|
||
|
||
:host(.fit-bottom) {
|
||
width: 100%;
|
||
min-width: 0;
|
||
border-radius: 0;
|
||
margin: 0;
|
||
}
|
||
|
||
:host(.paper-toast-open) {
|
||
visibility: visible;
|
||
opacity: 1;
|
||
-webkit-transform: translateY(-100px);
|
||
transform: translateY(-100px);
|
||
}</style><span id="label">{{text}}</span><content></content></template><script>!function(){var e=Polymer({is:"paper-toast",behaviors:[Polymer.IronOverlayBehavior],properties:{duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0}},get visible(){return console.warn("`visible` is deprecated, use `opened` instead"),this.opened},created:function(){Polymer.IronA11yAnnouncer.requestAvailability()},show:function(){this.open()},hide:function(){this.close()},_openedChanged:function(){this.opened?(e.currentToast&&e.currentToast!==this&&e.currentToast.close(),e.currentToast=this,this.fire("iron-announce",{text:this.text}),this.duration>0&&this.duration!==1/0&&this.debounce("close",this.close,this.duration)):e.currentToast===this&&(e.currentToast=null),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("paper-toast-open")},_renderClosed:function(){this.classList.remove("paper-toast-open")},_onIronResize:function(){Polymer.IronOverlayBehaviorImpl._onIronResize.apply(this,arguments),this.opened&&(this.style.position="")}})}();</script></dom-module><dom-module id="notification-manager" assetpath="managers/"><style>paper-toast {
|
||
z-index: 1;
|
||
}</style><template><paper-toast id="toast" text="{{text}}"></paper-toast></template></dom-module><dom-module id="paper-dialog-shared-styles" assetpath="../bower_components/paper-dialog-behavior/"><template><style>:host {
|
||
display: block;
|
||
margin: 24px 40px;
|
||
-webkit-overflow-scrolling: touch;
|
||
|
||
background: var(--paper-dialog-background-color, --primary-background-color);
|
||
color: var(--paper-dialog-color, --primary-text-color);
|
||
|
||
@apply(--paper-font-body1);
|
||
@apply(--shadow-elevation-16dp);
|
||
@apply(--paper-dialog);
|
||
}
|
||
|
||
:host > ::content > * {
|
||
margin-top: 20px;
|
||
padding: 0 24px;
|
||
}
|
||
|
||
:host > ::content > .no-padding {
|
||
padding: 0;
|
||
}
|
||
|
||
:host > ::content > *:first-child {
|
||
margin-top: 24px;
|
||
}
|
||
|
||
:host > ::content > *:last-child {
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
:host > ::content h2 {
|
||
position: relative;
|
||
margin: 0;
|
||
@apply(--paper-font-title);
|
||
|
||
@apply(--paper-dialog-title);
|
||
}
|
||
|
||
:host > ::content .buttons {
|
||
position: relative;
|
||
padding: 8px 8px 8px 24px;
|
||
margin: 0;
|
||
|
||
color: var(--paper-dialog-button-color, --default-primary-color);
|
||
|
||
@apply(--layout-horizontal);
|
||
@apply(--layout-end-justified);
|
||
}</style></template></dom-module><dom-module id="paper-dialog" assetpath="../bower_components/paper-dialog/"><template><style include="paper-dialog-shared-styles"></style><content></content></template></dom-module><script>!function(){Polymer({is:"paper-dialog",behaviors:[Polymer.PaperDialogBehavior,Polymer.NeonAnimationRunnerBehavior],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.withBackdrop&&this.backdropElement.open(),this.playAnimation("entry")},_renderClosed:function(){this.withBackdrop&&this.backdropElement.close(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})}();</script><dom-module id="paper-dialog-scrollable" assetpath="../bower_components/paper-dialog-scrollable/"><style>:host {
|
||
display: block;
|
||
position: relative;
|
||
}
|
||
|
||
:host(.is-scrolled:not(:first-child))::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 1px;
|
||
background: var(--divider-color);
|
||
}
|
||
|
||
:host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {
|
||
content: '';
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 1px;
|
||
background: var(--divider-color);
|
||
}
|
||
|
||
.scrollable {
|
||
padding: 0 24px;
|
||
|
||
@apply(--layout-scroll);
|
||
@apply(--paper-dialog-scrollable);
|
||
}
|
||
|
||
.fit {
|
||
@apply(--layout-fit);
|
||
}</style><template><div id="scrollable" class="scrollable"><content></content></div></template></dom-module><script>!function(){Polymer({is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object,value:function(){return this.parentNode}}},listeners:{"scrollable.scroll":"_onScroll","iron-resize":"_onIronResize"},get scrollTarget(){return this.$.scrollable},attached:function(){this.classList.add("no-padding"),this.dialogElement.sizingTarget=this.scrollTarget,requestAnimationFrame(function(){this.offsetHeight>0&&this.$.scrollable.classList.add("fit"),this._scroll()}.bind(this))},_scroll:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_onScroll:function(){this._scroll()}})}();</script><dom-module id="more-info-default" assetpath="more-infos/"><style>.data-entry .value {
|
||
max-width: 200px;
|
||
}</style><template><div class="layout vertical"><template is="dom-repeat" items="[[computeDisplayAttributes(stateObj)]]" as="attribute"><div class="data-entry layout justified horizontal"><div class="key">[[attribute]]</div><div class="value">[[getAttributeValue(stateObj, attribute)]]</div></div></template></div></template></dom-module><dom-module id="more-info-group" assetpath="more-infos/"><style>.child-card {
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.child-card:last-child {
|
||
margin-bottom: 0;
|
||
}</style><template><template is="dom-repeat" items="[[states]]" as="state"><div class="child-card"><state-card-content state-obj="[[state]]"></state-card-content></div></template></template></dom-module><dom-module id="more-info-sun" assetpath="more-infos/"><template><template is="dom-repeat" items="[[computeOrder(risingDate, settingDate)]]"><div class="data-entry layout justified horizontal"><div class="key"><span>[[itemCaption(item)]]</span><relative-ha-datetime datetime-obj="[[itemDate(item)]]"></relative-ha-datetime></div><div class="value">[[itemValue(item)]]</div></div></template></template></dom-module><dom-module id="more-info-configurator" assetpath="more-infos/"><style>p {
|
||
margin: 8px 0;
|
||
}
|
||
|
||
p > img {
|
||
max-width: 100%;
|
||
}
|
||
|
||
p.center {
|
||
text-align: center;
|
||
}
|
||
|
||
p.error {
|
||
color: #C62828;
|
||
}
|
||
|
||
p.submit {
|
||
text-align: center;
|
||
height: 41px;
|
||
}</style><template><div class="layout vertical"><template is="dom-if" if="[[isConfigurable]]"><p hidden$="[[!stateObj.attributes.description]]">[[stateObj.attributes.description]]</p><p class="error" hidden$="[[!stateObj.attributes.errors]]">[[stateObj.attributes.errors]]</p><p class="center" hidden$="[[!stateObj.attributes.description_image]]"><img src="[[stateObj.attributes.description_image]]"></p><template is="dom-repeat" items="[[stateObj.attributes.fields]]"><paper-input-container id="paper-input-fields-{{item.id}}"><label>{{item.name}}</label><input is="iron-input" type="{{item.type}}" id="{{item.id}}" on-change="fieldChanged"></paper-input-container></template><p class="submit"><paper-button raised="" on-click="submitClicked" hidden$="[[isConfiguring]]">[[submitCaption]]</paper-button><loading-box hidden$="[[!isConfiguring]]">Configuring</loading-box></p></template></div></template></dom-module><dom-module id="paper-progress" assetpath="../bower_components/paper-progress/"><style>:host {
|
||
display: block;
|
||
width: 200px;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
|
||
#progressContainer {
|
||
position: relative;
|
||
}
|
||
|
||
#progressContainer,
|
||
/* the stripe for the indeterminate animation*/
|
||
.indeterminate:after {
|
||
height: var(--paper-progress-height, 4px);
|
||
}
|
||
|
||
#primaryProgress,
|
||
#secondaryProgress,
|
||
.indeterminate:after {
|
||
@apply(--layout-fit);
|
||
}
|
||
|
||
#progressContainer,
|
||
.indeterminate:after {
|
||
background-color: var(--paper-progress-container-color, --google-grey-300);
|
||
}
|
||
|
||
:host(.transiting) #primaryProgress,
|
||
:host(.transiting) #secondaryProgress {
|
||
-webkit-transition-property: -webkit-transform;
|
||
transition-property: transform;
|
||
|
||
/* Duration */
|
||
-webkit-transition-duration: var(--paper-progress-transition-duration, 0.08s);
|
||
transition-duration: var(--paper-progress-transition-duration, 0.08s);
|
||
|
||
/* Timing function */
|
||
-webkit-transition-timing-function: var(--paper-progress-transition-timing-function, ease);
|
||
transition-timing-function: var(--paper-progress-transition-timing-function, ease);
|
||
|
||
/* Delay */
|
||
-webkit-transition-delay: var(--paper-progress-transition-delay, 0s);
|
||
transition-delay: var(--paper-progress-transition-delay, 0s);
|
||
}
|
||
|
||
#primaryProgress,
|
||
#secondaryProgress {
|
||
@apply(--layout-fit);
|
||
-webkit-transform-origin: left center;
|
||
transform-origin: left center;
|
||
-webkit-transform: scaleX(0);
|
||
transform: scaleX(0);
|
||
will-change: transform;
|
||
}
|
||
|
||
#primaryProgress {
|
||
background-color: var(--paper-progress-active-color, --google-green-500);
|
||
}
|
||
|
||
#secondaryProgress {
|
||
position: relative;
|
||
background-color: var(--paper-progress-secondary-color, --google-green-100);
|
||
}
|
||
|
||
:host([disabled]) #primaryProgress {
|
||
background-color: var(--paper-progress-disabled-active-color, --google-grey-500);
|
||
}
|
||
|
||
:host([disabled]) #secondaryProgress {
|
||
background-color: var(--paper-progress-disabled-active-color, --google-grey-300);
|
||
}
|
||
|
||
:host(:not([disabled])) #primaryProgress.indeterminate {
|
||
-webkit-transform-origin: right center;
|
||
transform-origin: right center;
|
||
-webkit-animation: indeterminate-bar 2s linear infinite;
|
||
animation: indeterminate-bar 2s linear infinite;
|
||
}
|
||
|
||
:host(:not([disabled])) #primaryProgress.indeterminate:after {
|
||
content: "";
|
||
-webkit-transform-origin: center center;
|
||
transform-origin: center center;
|
||
|
||
-webkit-animation: indeterminate-splitter 2s linear infinite;
|
||
animation: indeterminate-splitter 2s linear infinite;
|
||
}
|
||
|
||
@-webkit-keyframes indeterminate-bar {
|
||
0% {
|
||
-webkit-transform: scaleX(1) translateX(-100%);
|
||
}
|
||
50% {
|
||
-webkit-transform: scaleX(1) translateX(0%);
|
||
}
|
||
75% {
|
||
-webkit-transform: scaleX(1) translateX(0%);
|
||
-webkit-animation-timing-function: cubic-bezier(.28,.62,.37,.91);
|
||
}
|
||
100% {
|
||
-webkit-transform: scaleX(0) translateX(0%);
|
||
}
|
||
}
|
||
|
||
@-webkit-keyframes indeterminate-splitter {
|
||
0% {
|
||
-webkit-transform: scaleX(.75) translateX(-125%);
|
||
}
|
||
30% {
|
||
-webkit-transform: scaleX(.75) translateX(-125%);
|
||
-webkit-animation-timing-function: cubic-bezier(.42,0,.6,.8);
|
||
}
|
||
90% {
|
||
-webkit-transform: scaleX(.75) translateX(125%);
|
||
}
|
||
100% {
|
||
-webkit-transform: scaleX(.75) translateX(125%);
|
||
}
|
||
}
|
||
|
||
@keyframes indeterminate-bar {
|
||
0% {
|
||
transform: scaleX(1) translateX(-100%);
|
||
}
|
||
50% {
|
||
transform: scaleX(1) translateX(0%);
|
||
}
|
||
75% {
|
||
transform: scaleX(1) translateX(0%);
|
||
animation-timing-function: cubic-bezier(.28,.62,.37,.91);
|
||
}
|
||
100% {
|
||
transform: scaleX(0) translateX(0%);
|
||
}
|
||
}
|
||
|
||
@keyframes indeterminate-splitter {
|
||
0% {
|
||
transform: scaleX(.75) translateX(-125%);
|
||
}
|
||
30% {
|
||
transform: scaleX(.75) translateX(-125%);
|
||
animation-timing-function: cubic-bezier(.42,0,.6,.8);
|
||
}
|
||
90% {
|
||
transform: scaleX(.75) translateX(125%);
|
||
}
|
||
100% {
|
||
transform: scaleX(.75) translateX(125%);
|
||
}
|
||
}</style><template><div id="progressContainer"><div id="secondaryProgress" hidden$="[[_hideSecondaryProgress(secondaryRatio)]]"></div><div id="primaryProgress"></div></div></template></dom-module><script>Polymer({is:"paper-progress",behaviors:[Polymer.IronRangeBehavior],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(e){this.toggleClass("indeterminate",e,this.$.primaryProgress)},_transformProgress:function(e,r){var s="scaleX("+r/100+")";e.style.transform=e.style.webkitTransform=s},_mainRatioChanged:function(e){this._transformProgress(this.$.primaryProgress,e)},_progressChanged:function(e,r,s,t){e=this._clampValue(e),r=this._clampValue(r);var a=100*this._calcRatio(e),i=100*this._calcRatio(r);this._setSecondaryRatio(a),this._transformProgress(this.$.secondaryProgress,a),this._transformProgress(this.$.primaryProgress,i),this.secondaryProgress=e,this.setAttribute("aria-valuenow",r),this.setAttribute("aria-valuemin",s),this.setAttribute("aria-valuemax",t)},_disabledChanged:function(e){this.setAttribute("aria-disabled",e?"true":"false")},_hideSecondaryProgress:function(e){return 0===e}});</script><dom-module id="paper-slider" assetpath="../bower_components/paper-slider/"><template strip-whitespace=""><style>:host {
|
||
@apply(--layout);
|
||
@apply(--layout-justified);
|
||
@apply(--layout-center);
|
||
width: 200px;
|
||
cursor: default;
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
-ms-user-select: none;
|
||
user-select: none;
|
||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||
--paper-progress-active-color: var(--paper-slider-active-color, --google-blue-700);
|
||
--paper-progress-secondary-color: var(--paper-slider-secondary-color, --google-blue-300);
|
||
--paper-progress-disabled-active-color: var(--paper-slider-disabled-active-color, --google-grey-500);
|
||
--paper-progress-disabled-secondary-color: var(--paper-slider-disabled-secondary-color, --google-grey-300);
|
||
}
|
||
|
||
/* focus shows the ripple */
|
||
:host(:focus) {
|
||
outline: none;
|
||
}
|
||
|
||
#sliderContainer {
|
||
position: relative;
|
||
width: 100%;
|
||
height: calc(30px + var(--paper-slider-height, 2px));
|
||
margin-left: calc(15px + var(--paper-slider-height, 2px)/2);
|
||
margin-right: calc(15px + var(--paper-slider-height, 2px)/2);
|
||
}
|
||
|
||
#sliderContainer:focus {
|
||
outline: 0;
|
||
}
|
||
|
||
#sliderContainer.editable {
|
||
margin-top: 12px;
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
.bar-container {
|
||
position: absolute;
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.ring > .bar-container {
|
||
left: calc(5px + var(--paper-slider-height, 2px)/2);
|
||
transition: left 0.18s ease, width 0.18s ease;
|
||
}
|
||
|
||
.ring.expand.dragging > .bar-container {
|
||
transition: none;
|
||
}
|
||
|
||
.ring.expand:not(.pin) > .bar-container {
|
||
left: calc(15px + var(--paper-slider-height, 2px)/2);
|
||
}
|
||
|
||
#sliderBar {
|
||
padding: 15px 0;
|
||
width: 100%;
|
||
background-color: var(--paper-slider-bar-color, transparent);
|
||
--paper-progress-height: var(--paper-slider-height, 2px);
|
||
}
|
||
|
||
.ring #sliderBar {
|
||
margin-left: calc(-5px - var(--paper-slider-height, 2px)/2);
|
||
width: calc(100% + 5px + var(--paper-slider-height, 2px)/2);
|
||
}
|
||
.ring.expand:not(.pin) #sliderBar {
|
||
margin-left: calc(-15px - var(--paper-slider-height, 2px)/2);
|
||
width: calc(100% + 15px + var(--paper-slider-height, 2px)/2);
|
||
}
|
||
|
||
.slider-markers {
|
||
position: absolute;
|
||
top: calc(14px + var(--paper-slider-height,2px)/2);
|
||
height: var(--paper-slider-height, 2px);
|
||
left: 0;
|
||
right: -1px;
|
||
box-sizing: border-box;
|
||
pointer-events: none;
|
||
@apply(--layout-horizontal);
|
||
}
|
||
|
||
.slider-marker {
|
||
@apply(--layout-flex);
|
||
}
|
||
.slider-markers::after,
|
||
.slider-marker::after {
|
||
content: "";
|
||
display: block;
|
||
margin-left: -1px;
|
||
width: 2px;
|
||
height: 2px;
|
||
border-radius: 50%;
|
||
background-color: black;
|
||
}
|
||
|
||
#sliderKnob {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
margin-left: calc(-15px - var(--paper-slider-height, 2px)/2);
|
||
width: calc(30px + var(--paper-slider-height, 2px));
|
||
height: calc(30px + var(--paper-slider-height, 2px));
|
||
}
|
||
|
||
.transiting > #sliderKnob {
|
||
transition: left 0.08s ease;
|
||
}
|
||
|
||
#sliderKnob:focus {
|
||
outline: none;
|
||
}
|
||
|
||
#sliderKnob.dragging {
|
||
transition: none;
|
||
}
|
||
|
||
.snaps > #sliderKnob.dragging {
|
||
transition: -webkit-transform 0.08s ease;
|
||
transition: transform 0.08s ease;
|
||
}
|
||
|
||
#sliderKnobInner {
|
||
margin: 10px;
|
||
width: calc(100% - 20px);
|
||
height: calc(100% - 20px);
|
||
border-radius: 50%;
|
||
background-color: var(--paper-slider-knob-color, --google-blue-700);
|
||
|
||
-moz-box-sizing: border-box;
|
||
box-sizing: border-box;
|
||
|
||
transition-property: margin, height, width, background-color, border;
|
||
transition-duration: 0.1s;
|
||
transition-timing-function: ease;
|
||
}
|
||
|
||
.expand:not(.pin) > #sliderKnob > #sliderKnobInner {
|
||
margin: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
|
||
-webkit-transform: translateZ(0);
|
||
transform: translateZ(0);
|
||
}
|
||
|
||
.ring > #sliderKnob > #sliderKnobInner {
|
||
background-color: var(--paper-slider-knob-start-color, transparent);
|
||
border: 2px solid var(--paper-slider-knob-start-border-color, #c8c8c8);
|
||
}
|
||
|
||
#sliderKnobInner::before {
|
||
background-color: var(--paper-slider-pin-color, --google-blue-700);
|
||
}
|
||
|
||
.pin > #sliderKnob > #sliderKnobInner::before {
|
||
content: "";
|
||
position: absolute;
|
||
top: 0;
|
||
left: 50%;
|
||
margin-left: -13px;
|
||
width: 26px;
|
||
height: 26px;
|
||
border-radius: 50% 50% 50% 0;
|
||
|
||
-webkit-transform: rotate(-45deg) scale(0) translate(0);
|
||
transform: rotate(-45deg) scale(0) translate(0);
|
||
}
|
||
|
||
#sliderKnobInner::before,
|
||
#sliderKnobInner::after {
|
||
transition: -webkit-transform .2s ease, background-color .18s ease;
|
||
transition: transform .2s ease, background-color .18s ease;
|
||
}
|
||
|
||
.pin.ring > #sliderKnob > #sliderKnobInner::before {
|
||
background-color: var(--paper-slider-pin-start-color, #c8c8c8);
|
||
}
|
||
|
||
.pin.expand > #sliderKnob > #sliderKnobInner::before {
|
||
-webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px);
|
||
transform: rotate(-45deg) scale(1) translate(17px, -17px);
|
||
}
|
||
|
||
.pin > #sliderKnob > #sliderKnobInner::after {
|
||
content: attr(value);
|
||
position: absolute;
|
||
top: 0;
|
||
left: 50%;
|
||
margin-left: -16px;
|
||
width: 32px;
|
||
height: 26px;
|
||
text-align: center;
|
||
color: var(--paper-slider-font-color, #fff);
|
||
font-size: 10px;
|
||
|
||
-webkit-transform: scale(0) translate(0);
|
||
transform: scale(0) translate(0);
|
||
}
|
||
|
||
.pin.expand > #sliderKnob > #sliderKnobInner::after {
|
||
-webkit-transform: scale(1) translate(0, -17px);
|
||
transform: scale(1) translate(0, -17px);
|
||
}
|
||
|
||
/* paper-input */
|
||
.slider-input {
|
||
width: 50px;
|
||
overflow: hidden;
|
||
--paper-input-container-input: {
|
||
text-align: center;
|
||
};
|
||
}
|
||
|
||
/* disabled state */
|
||
#sliderContainer.disabled {
|
||
pointer-events: none;
|
||
}
|
||
|
||
.disabled > #sliderKnob {
|
||
top: 2px;
|
||
margin-left: calc(-13px - var(--paper-slider-height, 2px)/2);
|
||
width: calc(26px + var(--paper-slider-height, 2px));
|
||
height: calc(26px + var(--paper-slider-height, 2px));
|
||
}
|
||
|
||
.disabled > #sliderKnob > #sliderKnobInner {
|
||
background-color: var(--paper-slider-disabled-knob-color, --google-grey-500);
|
||
}
|
||
|
||
.disabled.ring > #sliderKnob > #sliderKnobInner {
|
||
background-color: transparent;
|
||
}
|
||
|
||
paper-ripple {
|
||
color: var(--paper-slider-knob-color, --google-blue-700);
|
||
}</style><div id="sliderContainer" class$="[[_getClassNames(disabled, pin, snaps, immediateValue, min, expand, dragging, transiting, editable)]]"><div class="bar-container"><paper-progress disabled$="[[disabled]]" id="sliderBar" aria-hidden="true" min="[[min]]" max="[[max]]" step="[[step]]" value="[[immediateValue]]" secondary-progress="[[secondaryProgress]]" on-down="_bardown" on-up="_resetKnob" on-track="_onTrack"></paper-progress></div><template is="dom-if" if="[[snaps]]"><div class="slider-markers"><template is="dom-repeat" items="[[markers]]"><div class="slider-marker"></div></template></div></template><div id="sliderKnob" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd"><div id="sliderKnobInner" value$="[[immediateValue]]"></div></div></div><template is="dom-if" if="[[editable]]"><paper-input id="input" type="number" step="[[step]]" min="[[min]]" max="[[max]]" class="slider-input" disabled$="[[disabled]]" value="[[immediateValue]]" on-change="_changeValue" on-keydown="_inputKeyDown" no-label-float=""></paper-input></template></template></dom-module><script>Polymer({is:"paper-slider",behaviors:[Polymer.IronFormElementBehavior,Polymer.PaperInkyFocusBehavior,Polymer.IronRangeBehavior],properties:{snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0,observer:"_maxMarkersChanged"},expand:{type:Boolean,value:!1,readOnly:!0},dragging:{type:Boolean,value:!1,readOnly:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:[]}},observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{"left down pagedown home":"_decrementKey","right up pageup end":"_incrementKey"},ready:function(){this.async(function(){this._updateKnob(this.value)},1)},increment:function(){this.value=this._clampValue(this.value+this.step)},decrement:function(){this.value=this._clampValue(this.value-this.step)},_updateKnob:function(t,e,i,s,a){this.setAttribute("aria-valuemin",e),this.setAttribute("aria-valuemax",i),this.setAttribute("aria-valuenow",t),this._positionKnob(this._calcRatio(t))},_valueChanged:function(){this.fire("value-change")},_immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change"):this.value=this.immediateValue},_secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)},_expandKnob:function(){this._setExpand(!0)},_resetKnob:function(){this.cancelDebouncer("expandKnob"),this._setExpand(!1)},_positionKnob:function(t){this._setImmediateValue(this._calcStep(this._calcKnobPosition(t))),this._setRatio(this._calcRatio(this.immediateValue)),this.$.sliderKnob.style.left=100*this.ratio+"%"},_calcKnobPosition:function(t){return(this.max-this.min)*t+this.min},_onTrack:function(t){switch(t.stopPropagation(),t.detail.state){case"start":this._trackStart(t);break;case"track":this._trackX(t);break;case"end":this._trackEnd()}},_trackStart:function(t){this._w=this.$.sliderBar.offsetWidth,this._x=this.ratio*this._w,this._startx=this._x||0,this._minx=-this._startx,this._maxx=this._w-this._startx,this.$.sliderKnob.classList.add("dragging"),this._setDragging(!0)},_trackX:function(t){this.dragging||this._trackStart(t);var e=Math.min(this._maxx,Math.max(this._minx,t.detail.dx));this._x=this._startx+e;var i=this._calcStep(this._calcKnobPosition(this._x/this._w));this._setImmediateValue(i);var s=this._calcRatio(i)*this._w-this._startx;this.translate3d(s+"px",0,0,this.$.sliderKnob)},_trackEnd:function(){var t=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging"),this._setDragging(!1),this._resetKnob(),this.value=this.immediateValue,t.transform=t.webkitTransform="",this.fire("change")},_knobdown:function(t){this._expandKnob(),t.preventDefault(),this.focus()},_bardown:function(t){this._w=this.$.sliderBar.offsetWidth;var e=this.$.sliderBar.getBoundingClientRect(),i=(t.detail.x-e.left)/this._w,s=this.ratio;this._setTransiting(!0),this._positionKnob(i),this.debounce("expandKnob",this._expandKnob,60),s===this.ratio&&this._setTransiting(!1),this.async(function(){this.fire("change")}),t.preventDefault()},_knobTransitionEnd:function(t){t.target===this.$.sliderKnob&&this._setTransiting(!1)},_maxMarkersChanged:function(t){this.snaps||this._setMarkers([]);var e=Math.floor((this.max-this.min)/this.step);e>t&&(e=t),this._setMarkers(new Array(e))},_mergeClasses:function(t){return Object.keys(t).filter(function(e){return t[e]}).join(" ")},_getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})},_incrementKey:function(t){this.disabled||("end"===t.detail.key?this.value=this.max:this.increment(),this.fire("change"))},_decrementKey:function(t){this.disabled||("home"===t.detail.key?this.value=this.min:this.decrement(),this.fire("change"))},_changeValue:function(t){this.value=t.target.value,this.fire("change")},_inputKeyDown:function(t){t.stopPropagation()},_createRipple:function(){return this._rippleContainer=this.$.sliderKnob,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)},_focusedChanged:function(t){t&&this.ensureRipple(),this.hasRipple()&&(t?this._ripple.removeAttribute("hidden"):this._ripple.setAttribute("hidden",""),this._ripple.holdDown=t)}});</script><dom-module id="more-info-thermostat" assetpath="more-infos/"><style>paper-slider {
|
||
width: 100%;
|
||
}
|
||
|
||
.away-mode-toggle {
|
||
display: none;
|
||
margin-top: 16px;
|
||
}
|
||
|
||
.has-away_mode .away-mode-toggle {
|
||
display: block;
|
||
}</style><template><div class$="[[computeClassNames(stateObj)]]"><div><div>Target Temperature</div><paper-slider min="[[tempMin]]" max="[[tempMax]]" step="0.5" value="[[targetTemperatureSliderValue]]" pin="" on-change="targetTemperatureSliderChanged"></paper-slider></div><div class="away-mode-toggle"><div class="center horizontal layout"><div class="flex">Away Mode</div><paper-toggle-button checked="[[awayToggleChecked]]" on-change="toggleChanged"></paper-toggle-button></div></div></div></template></dom-module><dom-module id="more-info-script" assetpath="more-infos/"><template><div class="layout vertical"><div class="data-entry layout justified horizontal"><div class="key">Last Action</div><div class="value">[[stateObj.attributes.last_action]]</div></div></div></template></dom-module><dom-module id="ha-color-picker" assetpath="components/"><style>canvas {
|
||
cursor: crosshair;
|
||
}</style><template><canvas width="[[width]]" height="[[height]]"></canvas></template></dom-module><dom-module id="more-info-light" assetpath="more-infos/"><style>.brightness, .color_temp {
|
||
margin-bottom: 8px;
|
||
|
||
max-height: 0px;
|
||
overflow: hidden;
|
||
transition: max-height .5s ease-in;
|
||
}
|
||
|
||
ha-color-picker {
|
||
display: block;
|
||
width: 350px;
|
||
margin: 0 auto;
|
||
|
||
max-height: 0px;
|
||
overflow: hidden;
|
||
transition: max-height .5s ease-in;
|
||
}
|
||
|
||
.has-brightness .brightness {
|
||
max-height: 40px;
|
||
}
|
||
|
||
.has-color_temp .color_temp {
|
||
max-height: 40px;
|
||
}
|
||
|
||
.has-rgb_color ha-color-picker {
|
||
max-height: 500px;
|
||
}</style><template><div class$="[[computeClassNames(stateObj)]]"><div class="brightness center horizontal layout"><div>Brightness</div><paper-slider max="255" id="brightness" value="{{brightnessSliderValue}}" on-change="brightnessSliderChanged" class="flex"></paper-slider></div><div class="color_temp center horizontal layout"><div>Color temperature</div><paper-slider min="154" max="500" id="color_temp" value="{{ctSliderValue}}" on-change="ctSliderChanged" class="flex"></paper-slider></div><ha-color-picker on-colorselected="colorPicked" width="350" height="200"></ha-color-picker></div></template></dom-module><dom-module id="more-info-media_player" assetpath="more-infos/"><style>.media-state {
|
||
text-transform: capitalize;
|
||
}
|
||
|
||
paper-icon-button[highlight] {
|
||
color: var(--accent-color);
|
||
}
|
||
|
||
.volume {
|
||
margin-bottom: 8px;
|
||
|
||
max-height: 0px;
|
||
overflow: hidden;
|
||
transition: max-height .5s ease-in;
|
||
}
|
||
|
||
.has-volume_level .volume {
|
||
max-height: 40px;
|
||
}</style><template><div class$="[[computeClassNames(stateObj)]]"><div class="layout horizontal"><div class="flex"><paper-icon-button icon="mdi:power" highlight$="[[isOff]]" on-tap="handleTogglePower" hidden$="[[computeHidePowerButton(isOff, supportsTurnOn, supportsTurnOff)]]"></paper-icon-button></div><div><template is="dom-if" if="[[!isOff]]"><paper-icon-button icon="mdi:skip-previous" on-tap="handlePrevious" hidden$="[[!supportsPreviousTrack]]"></paper-icon-button><paper-icon-button icon="[[computePlaybackControlIcon(stateObj)]]" on-tap="handlePlaybackControl" highlight=""></paper-icon-button><paper-icon-button icon="mdi:skip-next" on-tap="handleNext" hidden$="[[!supportsNextTrack]]"></paper-icon-button></template></div></div><div class="volume center horizontal layout" hidden$="[[!supportsVolumeSet]]"><paper-icon-button on-tap="handleVolumeTap" icon="[[computeMuteVolumeIcon(isMuted)]]"></paper-icon-button><paper-slider disabled$="[[isMuted]]" min="0" max="100" value="[[volumeSliderValue]]" on-change="volumeSliderChanged" class="flex"></paper-slider></div></div></template></dom-module><dom-module id="more-info-camera" assetpath="more-infos/"><style>:host {
|
||
max-width:640px;
|
||
}
|
||
|
||
.camera-image {
|
||
width: 100%;
|
||
}</style><template><img class="camera-image" src="[[computeCameraImageUrl(dialogOpen)]]" on-load="imageLoaded"></template></dom-module><dom-module id="more-info-updater" assetpath="more-infos/"><style>.link {
|
||
color: #03A9F4;
|
||
}</style><template><div class="layout vertical"><a class="link" href="https://home-assistant.io/getting-started/" target="_blank">Update Instructions</a></div></template></dom-module><dom-module id="more-info-alarm_control_panel" assetpath="more-infos/"><template><div class="layout horizontal"><paper-input label="code" value="{{enteredCode}}" pattern="[[codeFormat]]" type="password" hidden="[[!codeInputVisible]]" disabled="[[!codeInputEnabled]]"></paper-input></div><div class="layout horizontal"><paper-button on-tap="handleDisarmTap" hidden="[[!disarmButtonVisible]]" disabled="[[!codeValid]]">Disarm</paper-button><paper-button on-tap="handleHomeTap" hidden="[[!armHomeButtonVisible]]" disabled="[[!codeValid]]">Arm Home</paper-button><paper-button on-tap="handleAwayTap" hidden="[[!armAwayButtonVisible]]" disabled="[[!codeValid]]">Arm Away</paper-button></div></template></dom-module><dom-module id="more-info-content" assetpath="more-infos/"><style>:host {
|
||
display: block;
|
||
}</style></dom-module><dom-module id="more-info-dialog" assetpath="dialogs/"><style>paper-dialog {
|
||
font-size: 14px;
|
||
}
|
||
|
||
state-card-content {
|
||
margin-bottom: 24px;
|
||
font-size: 14px;
|
||
}
|
||
|
||
@media all and (max-width: 450px) {
|
||
paper-dialog {
|
||
margin: 0;
|
||
width: 100%;
|
||
max-height: calc(100% - 64px);
|
||
|
||
position: fixed !important;
|
||
bottom: 0px;
|
||
left: 0px;
|
||
right: 0px;
|
||
overflow: scroll;
|
||
}
|
||
}</style><template><paper-dialog id="dialog" with-backdrop="" opened="{{dialogOpen}}"><h2><state-card-content state-obj="[[stateObj]]"></state-card-content></h2><div><template is="dom-if" if="[[showHistoryComponent]]"><state-history-charts state-history="[[stateHistory]]" is-loading-data="[[isLoadingHistoryData]]"></state-history-charts></template><paper-dialog-scrollable><more-info-content state-obj="[[stateObj]]" dialog-open="[[dialogOpen]]"></more-info-content></paper-dialog-scrollable></div></paper-dialog></template></dom-module><dom-module id="ha-voice-command-dialog" assetpath="dialogs/"><style>iron-icon {
|
||
margin-right: 8px;
|
||
}
|
||
|
||
.content {
|
||
width: 300px;
|
||
min-height: 80px;
|
||
font-size: 18px;
|
||
}
|
||
|
||
.icon {
|
||
float: left;
|
||
}
|
||
|
||
.text {
|
||
margin-left: 48px;
|
||
margin-right: 24px;
|
||
}
|
||
|
||
.interimTranscript {
|
||
color: darkgrey;
|
||
}
|
||
|
||
@media all and (max-width: 450px) {
|
||
paper-dialog {
|
||
margin: 0;
|
||
width: 100%;
|
||
max-height: calc(100% - 64px);
|
||
|
||
position: fixed !important;
|
||
bottom: 0px;
|
||
left: 0px;
|
||
right: 0px;
|
||
overflow: scroll;
|
||
}
|
||
}</style><template><paper-dialog id="dialog" with-backdrop="" opened="{{dialogOpen}}"><div class="content"><div class="icon"><iron-icon icon="mdi:text-to-speech" hidden$="[[isTransmitting]]"></iron-icon><paper-spinner active$="[[isTransmitting]]" hidden$="[[!isTransmitting]]"></paper-spinner></div><div class="text"><span>{{finalTranscript}}</span> <span class="interimTranscript">[[interimTranscript]]</span> …</div></div></paper-dialog></template></dom-module><dom-module id="paper-item-shared-styles" assetpath="../bower_components/paper-item/"><template><style>:host {
|
||
display: block;
|
||
min-height: var(--paper-item-min-height, 48px);
|
||
padding: 0px 16px;
|
||
}
|
||
|
||
:host(.iron-selected) {
|
||
font-weight: var(--paper-item-selected-weight, bold);
|
||
@apply(--paper-item-selected);
|
||
}
|
||
|
||
:host([disabled]) {
|
||
color: var(--paper-item-disabled-color, --disabled-text-color);
|
||
@apply(--paper-item-disabled);
|
||
}
|
||
|
||
:host(:focus) {
|
||
position: relative;
|
||
outline: 0;
|
||
@apply(--paper-item-focused);
|
||
}
|
||
|
||
:host(:focus):before {
|
||
@apply(--layout-fit);
|
||
content: '';
|
||
background: currentColor;
|
||
opacity: var(--dark-divider-opacity);
|
||
pointer-events: none;
|
||
|
||
@apply(--paper-item-focused-before);
|
||
}</style></template></dom-module><dom-module id="paper-item" assetpath="../bower_components/paper-item/"><template><style include="paper-item-shared-styles"></style><style>:host {
|
||
@apply(--layout-horizontal);
|
||
@apply(--layout-center);
|
||
@apply(--paper-font-subhead);
|
||
|
||
@apply(--paper-item);
|
||
}</style><content></content></template><script>Polymer({is:"paper-item",behaviors:[Polymer.PaperItemBehavior]});</script></dom-module><dom-module id="paper-icon-item" assetpath="../bower_components/paper-item/"><template><style include="paper-item-shared-styles"></style><style>:host {
|
||
@apply(--layout-horizontal);
|
||
@apply(--layout-center);
|
||
@apply(--paper-font-subhead);
|
||
|
||
@apply(--paper-item);
|
||
@apply(--paper-icon-item);
|
||
}
|
||
|
||
.content-icon {
|
||
width: var(--paper-item-icon-width, 56px);
|
||
@apply(--layout-horizontal);
|
||
@apply(--layout-center);
|
||
}</style><div id="contentIcon" class="content-icon"><content select="[item-icon]"></content></div><content></content></template><script>Polymer({is:"paper-icon-item",behaviors:[Polymer.PaperItemBehavior]});</script></dom-module><iron-iconset-svg name="notification" size="24"><svg><defs><g id="adb"><path d="M5 16c0 3.87 3.13 7 7 7s7-3.13 7-7v-4H5v4zM16.12 4.37l2.1-2.1-.82-.83-2.3 2.31C14.16 3.28 13.12 3 12 3s-2.16.28-3.09.75L6.6 1.44l-.82.83 2.1 2.1C6.14 5.64 5 7.68 5 10v1h14v-1c0-2.32-1.14-4.36-2.88-5.63zM9 9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"></path></g><g id="airline-seat-flat"><path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.14 3.08.04 4.24 1.19 1.16 3.08 1.14 4.24-.04z"></path></g><g id="airline-seat-flat-angled"><path d="M22.25 14.29l-.69 1.89L9.2 11.71l2.08-5.66 8.56 3.09c2.1.76 3.18 3.06 2.41 5.15zM1.5 12.14L8 14.48V19h8v-1.63L20.52 19l.69-1.89-19.02-6.86-.69 1.89zm5.8-1.94c1.49-.72 2.12-2.51 1.41-4C7.99 4.71 6.2 4.08 4.7 4.8c-1.49.71-2.12 2.5-1.4 4 .71 1.49 2.5 2.12 4 1.4z"></path></g><g id="airline-seat-individual-suite"><path d="M7 13c1.65 0 3-1.35 3-3S8.65 7 7 7s-3 1.35-3 3 1.35 3 3 3zm12-6h-8v7H3V7H1v10h22v-6c0-2.21-1.79-4-4-4z"></path></g><g id="airline-seat-legroom-extra"><path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1.12-1.79-1.12L11 9V3H5v8c0 1.66 1.34 3 3 3h7l3.41 7 3.72-1.7c.77-.36 1.1-1.3.7-2.06z"></path></g><g id="airline-seat-legroom-normal"><path d="M5 12V3H3v9c0 2.76 2.24 5 5 5h6v-2H8c-1.66 0-3-1.34-3-3zm15.5 6H19v-7c0-1.1-.9-2-2-2h-5V3H6v8c0 1.65 1.35 3 3 3h7v7h4.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5z"></path></g><g id="airline-seat-legroom-reduced"><path d="M19.97 19.2c.18.96-.55 1.8-1.47 1.8H14v-3l1-4H9c-1.65 0-3-1.35-3-3V3h6v6h5c1.1 0 2 .9 2 2l-2 7h1.44c.73 0 1.39.49 1.53 1.2zM5 12V3H3v9c0 2.76 2.24 5 5 5h4v-2H8c-1.66 0-3-1.34-3-3z"></path></g><g id="airline-seat-recline-extra"><path d="M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49zM16 19H8.93c-1.48 0-2.74-1.08-2.96-2.54L4 7H2l1.99 9.76C4.37 19.2 6.47 21 8.94 21H16v-2zm.23-4h-4.88l-1.03-4.1c1.58.89 3.28 1.54 5.15 1.22V9.99c-1.63.31-3.44-.27-4.69-1.25L9.14 7.47c-.23-.18-.49-.3-.76-.38-.32-.09-.66-.12-.99-.06h-.02c-1.23.22-2.05 1.39-1.84 2.61l1.35 5.92C7.16 16.98 8.39 18 9.83 18h6.85l3.82 3 1.5-1.5-5.77-4.5z"></path></g><g id="airline-seat-recline-normal"><path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5 5 5h6v-2H9c-1.66 0-3-1.34-3-3zm14 4.07L14.93 15H11.5v-3.68c1.4 1.15 3.6 2.16 5.5 2.16v-2.16c-1.66.02-3.61-.87-4.67-2.04l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C8.01 7 7 8.01 7 9.25V15c0 1.66 1.34 3 3 3h5.07l3.5 3.5L20 20.07z"></path></g><g id="bluetooth-audio"><path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3.36 1.54-5.31-.01-1.89-.55-3.67-1.48-5.19zm-3.82 1L10 2H9v7.59L4.41 5 3 6.41 8.59 12 3 17.59 4.41 19 9 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM11 5.83l1.88 1.88L11 9.59V5.83zm1.88 10.46L11 18.17v-3.76l1.88 1.88z"></path></g><g id="confirmation-number"><defs><path id="a" d="M0 0h24v24H0z"></path></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"></use></clipPath><path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2s.9-2 2-2zm-9 7.5h-2v-2h2v2zm0-4.5h-2v-2h2v2zm0-4.5h-2v-2h2v2z" clip-path="url(#b)"></path></g><g id="disc-full"><path d="M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g><g id="do-not-disturb"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"></path></g><g id="do-not-disturb-alt"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM4 12c0-4.4 3.6-8 8-8 1.8 0 3.5.6 4.9 1.7L5.7 16.9C4.6 15.5 4 13.8 4 12zm8 8c-1.8 0-3.5-.6-4.9-1.7L18.3 7.1C19.4 8.5 20 10.2 20 12c0 4.4-3.6 8-8 8z"></path></g><g id="drive-eta"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"></path></g><g id="event-available"><path d="M16.53 11.06L15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17l5.94-5.94zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"></path></g><g id="event-busy"><path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"></path></g><g id="event-note"><path d="M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"></path></g><g id="folder-special"><path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6.42 12L10 15.9 6.42 18l.95-4.07-3.16-2.74 4.16-.36L10 7l1.63 3.84 4.16.36-3.16 2.74.95 4.06z"></path></g><g id="live-tv"><path d="M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"></path></g><g id="mms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 14l3.5-4.5 2.5 3.01L14.5 8l4.5 6H5z"></path></g><g id="more"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g><g id="network-locked"><path d="M19.5 10c.17 0 .33.03.5.05V1L1 20h13v-3c0-.89.39-1.68 1-2.23v-.27c0-2.48 2.02-4.5 4.5-4.5zm2.5 6v-1.5c0-1.38-1.12-2.5-2.5-2.5S17 13.12 17 14.5V16c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1zm-1 0h-3v-1.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V16z"></path></g><g id="ondemand-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-6l-7 4V7z"></path></g><g id="personal-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"></path></g><g id="phone-bluetooth-speaker"><path d="M14.71 9.5L17 7.21V11h.5l2.85-2.85L18.21 6l2.15-2.15L17.5 1H17v3.79L14.71 2.5l-.71.71L16.79 6 14 8.79l.71.71zM18 2.91l.94.94-.94.94V2.91zm0 4.3l.94.94-.94.94V7.21zm2 8.29c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"></path></g><g id="phone-forwarded"><path d="M18 11l5-5-5-5v3h-4v4h4v3zm2 4.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"></path></g><g id="phone-in-talk"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 12h2c0-4.97-4.03-9-9-9v2c3.87 0 7 3.13 7 7zm-4 0h2c0-2.76-2.24-5-5-5v2c1.66 0 3 1.34 3 3z"></path></g><g id="phone-locked"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM20 4v-.5C20 2.12 18.88 1 17.5 1S15 2.12 15 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4z"></path></g><g id="phone-missed"><path d="M6.5 5.5L12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5V5.5zm17.21 11.17C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71s.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73 1.6 0 3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.67 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.12-.52-.3-.7z"></path></g><g id="phone-paused"><path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 3v7h2V3h-2z"></path></g><g id="power"><path d="M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"></path></g><g id="sd-card"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"></path></g><g id="sim-card-alert"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 15h-2v-2h2v2zm0-4h-2V8h2v5z"></path></g><g id="sms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"></path></g><g id="sms-failed"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"></path></g><g id="sync"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"></path></g><g id="sync-disabled"><path d="M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33zm-7.14-.94l2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14 2.86 5.41zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64L20 4z"></path></g><g id="sync-problem"><path d="M3 12c0 2.21.91 4.2 2.36 5.64L3 20h6v-6l-2.24 2.24C5.68 15.15 5 13.66 5 12c0-2.61 1.67-4.83 4-5.65V4.26C5.55 5.15 3 8.27 3 12zm8 5h2v-2h-2v2zM21 4h-6v6l2.24-2.24C18.32 8.85 19 10.34 19 12c0 2.61-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74 0-2.21-.91-4.2-2.36-5.64L21 4zm-10 9h2V7h-2v6z"></path></g><g id="system-update"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14zm-1-6h-3V8h-2v5H8l4 4 4-4z"></path></g><g id="tap-and-play"><path d="M2 16v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0 4v3h3c0-1.66-1.34-3-3-3zm0-8v2c4.97 0 9 4.03 9 9h2c0-6.08-4.92-11-11-11zM17 1.01L7 1c-1.1 0-2 .9-2 2v7.37c.69.16 1.36.37 2 .64V5h10v13h-3.03c.52 1.25.84 2.59.95 4H17c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"></path></g><g id="time-to-leave"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"></path></g><g id="vibration"><path d="M0 15h2V9H0v6zm3 2h2V7H3v10zm19-8v6h2V9h-2zm-3 8h2V7h-2v10zM16.5 3h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5zM16 19H8V5h8v14z"></path></g><g id="voice-chat"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12l-4-3.2V14H6V6h8v3.2L18 6v8z"></path></g><g id="vpn-lock"><path d="M22 4v-.5C22 2.12 20.88 1 19.5 1S17 2.12 17 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4zm-2.28 8c.04.33.08.66.08 1 0 2.08-.8 3.97-2.1 5.39-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H7v-2h2c.55 0 1-.45 1-1V8h2c1.1 0 2-.9 2-2V3.46c-.95-.3-1.95-.46-3-.46C5.48 3 1 7.48 1 13s4.48 10 10 10 10-4.48 10-10c0-.34-.02-.67-.05-1h-2.03zM10 20.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L8 16v1c0 1.1.9 2 2 2v1.93z"></path></g><g id="wc"><path d="M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"></path></g><g id="wifi"><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"></path></g></defs></svg></iron-iconset-svg><dom-module id="stream-status" assetpath="components/"><style>:host {
|
||
display: inline-block;
|
||
height: 24px;
|
||
}
|
||
|
||
paper-toggle-button {
|
||
vertical-align: middle;
|
||
}</style><template><iron-icon icon="mdi:alert" hidden$="[[!hasError]]"></iron-icon><paper-toggle-button id="toggle" on-change="toggleChanged" checked$="[[isStreaming]]" hidden$="[[hasError]]"></paper-toggle-button></template></dom-module><dom-module id="ha-sidebar" assetpath="components/"><style>.sidenav {
|
||
-ms-user-select: none;
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
}
|
||
|
||
paper-toolbar {
|
||
--paper-toolbar-background: #fff;
|
||
--paper-toolbar-color: #000;
|
||
}
|
||
|
||
div.title {
|
||
text-align: left;
|
||
margin-left: 24px !important;
|
||
}
|
||
|
||
div.menu {
|
||
color: var(--secondary-text-color);
|
||
margin-top: 8px;
|
||
}
|
||
|
||
paper-icon-item {
|
||
padding-left: 24px;
|
||
cursor: pointer;
|
||
font-weight: 500;
|
||
}
|
||
|
||
paper-icon-item.selected {
|
||
color: var(--default-primary-color);
|
||
background-color: #f0f0f0;
|
||
}
|
||
|
||
paper-icon-item.logout {
|
||
margin-top: 16px;
|
||
}
|
||
|
||
.divider {
|
||
border-top: 1px solid #e0e0e0;
|
||
}
|
||
|
||
.text {
|
||
padding: 16px;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.dev-tools {
|
||
padding: 0 8px;
|
||
}</style><template><paper-header-panel mode="scroll" class="sidenav fit"><paper-toolbar><paper-icon-button icon="mdi:menu" hidden$="[[!narrow]]" on-tap="toggleMenu"></paper-icon-button><div class="title">Home Assistant</div></paper-toolbar><div class="menu"><paper-icon-item on-click="menuClicked" data-panel="states"><iron-icon item-icon="" icon="mdi:apps"></iron-icon>States</paper-icon-item><paper-icon-item on-click="menuClicked" data-panel="map"><iron-icon item-icon="" icon="mdi:account-location"></iron-icon>Map</paper-icon-item><template is="dom-if" if="[[hasHistoryComponent]]"><paper-icon-item on-click="menuClicked" data-panel="history"><iron-icon item-icon="" icon="mdi:poll-box"></iron-icon>History</paper-icon-item></template><template is="dom-if" if="[[hasLogbookComponent]]"><paper-icon-item on-click="menuClicked" data-panel="logbook"><iron-icon item-icon="" icon="mdi:format-list-bulleted-type"></iron-icon>Logbook</paper-icon-item></template><paper-icon-item on-click="menuClicked" data-panel="logout" class="logout"><iron-icon item-icon="" icon="mdi:exit-to-app"></iron-icon>Log Out</paper-icon-item><paper-item class="divider horizontal layout justified"><div>Streaming updates</div><stream-status></stream-status></paper-item><div class="text label divider">Developer Tools</div><div class="dev-tools layout horizontal justified"><paper-icon-button icon="mdi:remote" data-panel="devService" on-click="handleDevClick"></paper-icon-button><paper-icon-button icon="mdi:code-tags" data-panel="devState" on-click="handleDevClick"></paper-icon-button><paper-icon-button icon="mdi:nfc" data-panel="devEvent" on-click="handleDevClick"></paper-icon-button><paper-icon-button icon="mdi:information-outline" data-panel="devInfo" on-click="handleDevClick"></paper-icon-button></div></div></paper-header-panel></template></dom-module><dom-module id="home-assistant-main" assetpath="layouts/"><template><notification-manager></notification-manager><more-info-dialog></more-info-dialog><ha-voice-command-dialog></ha-voice-command-dialog><iron-media-query query="(max-width: 870px)" query-matches="{{narrow}}"></iron-media-query><paper-drawer-panel id="drawer" force-narrow="[[computeForceNarrow(narrow, showSidebar)]]" responsive-width="0" disable-swipe="[[isSelectedMap]]" disable-edge-swipe="[[isSelectedMap]]"><ha-sidebar drawer=""></ha-sidebar><template is="dom-if" if="[[isSelectedStates]]"><partial-zone main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-zone></template><template is="dom-if" if="[[isSelectedLogbook]]"><partial-logbook main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-logbook></template><template is="dom-if" if="[[isSelectedHistory]]"><partial-history main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-history></template><template is="dom-if" if="[[isSelectedMap]]"><partial-map main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-map></template><template is="dom-if" if="[[isSelectedDevService]]"><partial-dev-call-service main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-call-service></template><template is="dom-if" if="[[isSelectedDevEvent]]"><partial-dev-fire-event main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-fire-event></template><template is="dom-if" if="[[isSelectedDevState]]"><partial-dev-set-state main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-set-state></template><template is="dom-if" if="[[isSelectedDevInfo]]"><partial-dev-info main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-info></template></paper-drawer-panel></template></dom-module></div><dom-module id="home-assistant"><style>:host {
|
||
font-family: 'Roboto', 'Noto', sans-serif;
|
||
font-weight: 300;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizeLegibility;
|
||
}</style><template><template is="dom-if" if="[[!loaded]]"><login-form force-show-loading="[[computeForceShowLoading(dataLoaded, iconsLoaded)]]"></login-form></template><template is="dom-if" if="[[loaded]]"><home-assistant-main></home-assistant-main></template></template></dom-module><script>!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2),a=n(4),s=r(a),c=n(42),l=r(c);n(97),n(96),e["default"]=new o["default"]({is:"home-assistant",hostAttributes:{auth:null,icons:null},behaviors:[s["default"]],properties:{auth:{type:String},icons:{type:String},dataLoaded:{type:Boolean,bindNuclear:u.syncGetters.isDataLoaded},iconsLoaded:{type:Boolean,value:!1},loaded:{type:Boolean,computed:"computeLoaded(dataLoaded, iconsLoaded)"}},computeLoaded:function(t,e){return t&&e},computeForceShowLoading:function(t,e){return t&&!e},loadIcons:function(){var t=this,e=function(){return t.iconsLoaded=!0};this.importHref("/static/mdi-"+this.icons+".html",e,function(){return t.importHref("/static/mdi.html",e,e)})},ready:function(){var t=this;u.reactor.batch(function(){t.auth?(0,l["default"])(t.auth,!1):u.localStoragePreferences.authToken&&(0,l["default"])(u.localStoragePreferences.authToken,!0),u.navigationActions.showSidebar(u.localStoragePreferences.showSidebar)}),(0,u.startLocalStoragePreferencesSync)(),this.loadIcons()}}),t.exports=e["default"]},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=window.Polymer,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(64),o=r(i);e["default"]=new o["default"],t.exports=e["default"]},function(t,e,n){"use strict";!function(e,n){t.exports=n()}(void 0,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),n(1);var i=n(2),o=r(i),u=n(6),a=r(u),s=n(3),c=r(s),l=n(5),f=n(11),d=n(10),p=n(7),h=r(p);e["default"]={Reactor:a["default"],Store:o["default"],Immutable:c["default"],isKeyPath:f.isKeyPath,isGetter:d.isGetter,toJS:l.toJS,toImmutable:l.toImmutable,isImmutable:l.isImmutable,createReactMixin:h["default"]},t.exports=e["default"]},function(t,e){try{window.console&&console.log||(console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){}})}catch(n){}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return t instanceof c}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.isStore=i;var u=n(3),a=n(4),s=n(5),c=function(){function t(e){r(this,t),this.__handlers=(0,u.Map)({}),e&&(0,a.extend)(this,e),this.initialize()}return o(t,[{key:"initialize",value:function(){}},{key:"getInitialState",value:function(){return(0,u.Map)()}},{key:"handle",value:function(t,e,n){var r=this.__handlers.get(e);return"function"==typeof r?r.call(this,t,n,e):t}},{key:"handleReset",value:function(t){return this.getInitialState()}},{key:"on",value:function(t,e){this.__handlers=this.__handlers.set(t,e)}},{key:"serialize",value:function(t){return(0,s.toJS)(t)}},{key:"deserialize",value:function(t){return(0,s.toImmutable)(t)}}]),t}();e["default"]=(0,a.toFactory)(c)},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function n(t){t&&(t.value=!0)}function r(){}function i(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;n>i;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 f(t,e,0)}function l(t,e){return f(t,e,e)}function f(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function d(t){return _(t)?t:P(t)}function p(t){return y(t)?t:D(t)}function h(t){return m(t)?t:C(t)}function v(t){return _(t)&&!g(t)?t:A(t)}function _(t){return!(!t||!t[vn])}function y(t){return!(!t||!t[_n])}function m(t){return!(!t||!t[yn])}function g(t){return y(t)||m(t)}function b(t){return!(!t||!t[mn])}function O(t){this.next=t}function S(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 w(){return{value:void 0,done:!0}}function M(t){return!!I(t)}function T(t){return t&&"function"==typeof t.next}function E(t){var e=I(t);return e&&e.call(t)}function I(t){var e=t&&(Sn&&t[Sn]||t[wn]);return"function"==typeof e?e:void 0}function j(t){return t&&"number"==typeof t.length}function P(t){return null===t||void 0===t?z():_(t)?t.toSeq():G(t)}function D(t){return null===t||void 0===t?z().toKeyedSeq():_(t)?y(t)?t.toSeq():t.fromEntrySeq():H(t)}function C(t){return null===t||void 0===t?z():_(t)?y(t)?t.entrySeq():t.toIndexedSeq():Y(t)}function A(t){return(null===t||void 0===t?z():_(t)?y(t)?t.entrySeq():t:Y(t)).toSetSeq()}function k(t){this._array=t,this.size=t.length}function x(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 R(t){return!(!t||!t[Tn])}function z(){return En||(En=new k([]))}function H(t){var e=Array.isArray(t)?new k(t).fromEntrySeq():T(t)?new N(t).fromEntrySeq():M(t)?new L(t).fromEntrySeq():"object"==typeof t?new x(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function Y(t){var e=F(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function G(t){var e=F(t)||"object"==typeof t&&new x(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function F(t){return j(t)?new k(t):T(t)?new N(t):M(t)?new L(t):void 0}function U(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 B(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new O(function(){var t=i[n?o-u:u];return u++>o?w():S(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function V(){throw TypeError("Abstract")}function q(){}function W(){}function K(){}function J(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)?!0:!1}function $(t,e){return e?Z(e,t,"",{"":t}):X(t)}function Z(t,e,n,r){return Array.isArray(e)?t.call(r,n,C(e).map(function(n,r){return Z(t,n,r,e)})):Q(e)?t.call(r,n,D(e).map(function(n,r){return Z(t,n,r,e)})):e}function X(t){return Array.isArray(t)?C(t).map(X).toList():Q(t)?D(t).map(X).toMap():t}function Q(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=typeof 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>xn?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Rn[t];return void 0===e&&(e=rt(t),Nn===Ln&&(Nn=0,Rn={}),Nn++,Rn[t]=e),e}function rt(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return tt(e)}function it(t){var e;if(Cn&&(e=In.get(t),void 0!==e))return e;if(e=t[kn],void 0!==e)return e;if(!Dn){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[kn],void 0!==e)return e;if(e=ot(t),void 0!==e)return e}if(e=++An,1073741824&An&&(An=0),Cn)In.set(t,e);else{if(void 0!==Pn&&Pn(t)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(Dn)Object.defineProperty(t,kn,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[kn]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[kn]=e}}return e}function ot(t){if(t&&t.nodeType>0)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 lt(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function dt(t){var e=kt(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=xt,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===On){var r=t.__iterator(e,n);return new O(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===bn?gn:bn,n)},e}function pt(t,e,n){var r=kt(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,dn);return o===dn?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(On,i);return new O(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return S(r,a,e.call(n,u[1],a,t),i)})},r}function ht(t,e){var n=kt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=dt(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=xt,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 vt(t,e,n,r){var i=kt(t);return r&&(i.has=function(r){var i=t.get(r,dn);return i!==dn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,dn);return o!==dn&&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(On,o),a=0;return new O(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],l=s[1];if(e.call(n,l,c,t))return S(i,r?c:a++,l,o)}})},i}function _t(t,e,n){var r=Rt().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=(b(t)?we():Rt()).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=At(t);return i.map(function(e){return Pt(t,o(e))})}function mt(t,e,n,r){for(var i=!0;i;){var o=t,a=e,f=n,d=r;i=!1;var p=o.size;if(void 0!==a&&(a=0|a),void 0!==f&&(f=0|f),s(a,f,p))return o;var h=c(a,p),v=l(f,p);if(h===h&&v===v){var _,y=v-h;y===y&&(_=0>y?0:y);var m=kt(o);return m.size=0===_?_:o.size&&_||void 0,!d&&R(o)&&_>=0&&(m.get=function(t,e){return t=u(this,t),t>=0&&_>t?o.get(t+h,e):e}),m.__iterateUncached=function(t,e){var n=this;if(0===_)return 0;if(e)return this.cacheResult().__iterate(t,e);var r=0,i=!0,u=0;return o.__iterate(function(e,o){return i&&(i=r++<h)?void 0:(u++,t(e,d?o:u-1,n)!==!1&&u!==_)}),u},m.__iteratorUncached=function(t,e){if(0!==_&&e)return this.cacheResult().__iterator(t,e);var n=0!==_&&o.__iterator(t,e),r=0,i=0;return new O(function(){for(;r++<h;)n.next();if(++i>_)return w();var e=n.next();return d||t===bn?e:t===gn?S(t,i-1,void 0,e):S(t,i-1,e.value[1],e)})},m}t=o.toSeq().cacheResult(),e=a,n=f,r=d,i=!0,p=h=v=void 0}}function gt(t,e,n){var r=kt(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(On,i),a=!0;return new O(function(){if(!a)return w();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===On?t:S(r,s,c,t):(a=!1,w())})},r}function bt(t,e,n,r){var i=kt(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(On,o),s=!0,c=0;return new O(function(){var t,o,l;do{if(t=a.next(),t.done)return r||i===bn?t:i===gn?S(i,c++,void 0,t):S(i,c++,t.value[1],t);var f=t.value;o=f[0],l=f[1],s&&(s=e.call(n,l,o,u))}while(s);return i===On?t:S(i,o,l,t)})},i}function Ot(t,e){var n=y(t),r=[t].concat(e).map(function(t){return _(t)?n&&(t=p(t)):t=n?H(t):Y(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)||m(t)&&m(i))return i}var o=new k(r);return n?o=o.toKeyedSeq():m(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 St(t,e,n){var r=kt(t);return r.__iterateUncached=function(r,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&_(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 O(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(r===On&&(s=s[1]),e&&!(u.length<e)||!_(s))return n?t:S(r,a++,s,t);u.push(o),o=s.__iterator(r,i)}else o=u.pop()}return w()})},r}function wt(t,e,n){var r=At(t);return t.toSeq().map(function(i,o){return r(e.call(n,i,o,t))}).flatten(!0)}function Mt(t,e){var n=kt(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate(function(t,r){return(!o||n(e,o++,i)!==!1)&&n(t,o++,i)!==!1},r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(bn,r),u=0;return new O(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?S(n,u++,e):S(n,u++,i.value,i)})},n}function Tt(t,e,n){e||(e=Lt);var r=y(t),i=0,o=t.toSeq().map(function(e,r){return[r,e,i++,n?n(e,r,t):e]}).toArray();return o.sort(function(t,n){return e(t[3],n[3])||t[2]-n[2]}).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?D(o):m(t)?C(o):A(o)}function Et(t,e,n){if(e||(e=Lt),n){var r=t.toSeq().map(function(e,r){return[e,n(e,r,t)]}).reduce(function(t,n){return It(e,t[1],n[1])?n:t});return r&&r[0]}return t.reduce(function(t,n){return It(e,t,n)?n:t})}function It(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(void 0===n||null===n||n!==n)||r>0}function jt(t,e,n){var r=kt(t);return r.size=new k(n).map(function(t){return t.size}).min(),r.__iterate=function(t,e){for(var n,r=this.__iterator(bn,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=d(t),E(r?t.reverse():t)}),o=0,u=!1;return new O(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?w():S(t,o++,e.apply(null,n.map(function(t){return t.value})))})},r}function Pt(t,e){return R(t)?e:t.constructor(e)}function Dt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ct(t){return at(t.size),o(t)}function At(t){return y(t)?p:m(t)?h:v}function kt(t){return Object.create((y(t)?D:m(t)?C:A).prototype)}function xt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):P.prototype.cacheResult.call(this)}function Lt(t,e){return t>e?1:e>t?-1:0}function Nt(t){var e=E(t);if(!e){if(!j(t))throw new TypeError("Expected iterable or array-like: "+t);e=E(d(t))}return e}function Rt(t){return null===t||void 0===t?Kt():zt(t)&&!b(t)?t:Kt().withMutations(function(e){var n=p(t);at(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function zt(t){return!(!t||!t[zn])}function Ht(t,e){this.ownerID=t,this.entries=e}function Yt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Gt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function Ft(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Ut(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Bt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&qt(t._root)}function Vt(t,e){return S(t,e[0],e[1])}function qt(t,e){return{node:t,index:0,__prev:e}}function Wt(t,e,n,r){var i=Object.create(Hn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Kt(){return Yn||(Yn=Wt(0))}function Jt(t,n,r){var i,o;if(t._root){var u=e(pn),a=e(hn);if(i=$t(t._root,t.__ownerID,0,void 0,n,r,u,a),!a.value)return t;o=t.size+(u.value?r===dn?-1:1:0)}else{if(r===dn)return t;o=1,i=new Ht(t.__ownerID,[[n,r]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Wt(o,i):Kt()}function $t(t,e,r,i,o,u,a,s){return t?t.update(e,r,i,o,u,a,s):u===dn?t:(n(s),n(a),new Ut(e,i,[o,u]))}function Zt(t){return t.constructor===Ut||t.constructor===Ft}function Xt(t,e,n,r,i){if(t.keyHash===r)return new Ft(e,r,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&fn,a=(0===n?r:r>>>n)&fn,s=u===a?[Xt(t,e,n+cn,r,i)]:(o=new Ut(e,r,i),a>u?[t,o]:[o,t]);return new Yt(e,1<<u|1<<a,s)}function Qt(t,e,n,i){t||(t=new r);for(var o=new Ut(t,et(n),[n,i]),u=0;u<e.length;u++){var a=e[u];o=o.update(t,0,void 0,a[0],a[1])}return o}function te(t,e,n,r){for(var i=0,o=0,u=new Array(n),a=0,s=1,c=e.length;c>a;a++,s<<=1){var l=e[a];void 0!==l&&a!==r&&(i|=s,u[o++]=l)}return new Yt(t,i,u)}function ee(t,e,n,r,i){for(var o=0,u=new Array(ln),a=0;0!==n;a++,n>>>=1)u[a]=1&n?e[o++]:void 0;return u[r]=i,new Gt(t,o+1,u)}function ne(t,e,n){for(var r=[],i=0;i<n.length;i++){var o=n[i],u=p(o);_(o)||(u=u.map(function(t){return $(t)})),r.push(u)}return ie(t,e,r)}function re(t){return function(e,n,r){return e&&e.mergeDeepWith&&_(n)?e.mergeDeepWith(t,n):t?t(e,n,r):n}}function ie(t,e,n){return n=n.filter(function(t){return 0!==t.size}),0===n.length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var r=e?function(n,r){t.update(r,dn,function(t){return t===dn?n:e(t,n,r)})}:function(e,n){t.set(n,e)},i=0;i<n.length;i++)n[i].forEach(r)}):t.constructor(n[0])}function oe(t,e,n,r){var i=t===dn,o=e.next();if(o.done){var u=i?n:t,a=r(u);return a===u?t:a}ut(i||t&&t.set,"invalid keyPath");var s=o.value,c=i?dn:t.get(s,dn),l=oe(c,e,n,r);return l===c?t:l===dn?t.remove(s):(i?Kt():t).set(s,l)}function ue(t){return t-=t>>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 le(t){var e=ve();if(null===t||void 0===t)return e;if(fe(t))return t;var n=h(t),r=n.size;return 0===r?e:(at(r),r>0&&ln>r?he(0,r,cn,null,new de(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function fe(t){return!(!t||!t[Bn])}function de(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>ln&&(c=ln),function(){if(i===c)return Wn;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,l=(u-i>>r)+1;return l>ln&&(l=ln),function(){for(;;){if(a){var t=a();if(t!==Wn)return t;a=null}if(c===l)return Wn;var o=e?--l:c++;a=n(s&&s[o],r-cn,i+(o<<r))}}}var o=t._origin,u=t._capacity,a=Se(u),s=t._tail;return n(t._root,t._level,0)}function he(t,e,n,r,i,o,u){var a=Object.create(Vn);return a.size=e-t,a._origin=t,a._capacity=e,a._level=n,a._root=r,a._tail=i,a.__ownerID=o,a.__hash=u,a.__altered=!1,a}function ve(){return qn||(qn=he(0,0,cn))}function _e(t,n,r){if(n=u(t,n),n!==n)return t;if(n>=t.size||0>n)return t.withMutations(function(t){0>n?be(t,n).set(0,r):be(t,0,n+1).set(n,r)});n+=t._origin;var i=t._tail,o=t._root,a=e(hn);return n>=Se(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):he(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,r,i,o,u){var a=i>>>r&fn,s=t&&a<t.array.length;if(!s&&void 0===o)return t;var c;if(r>0){var l=t&&t.array[a],f=ye(l,e,r-cn,i,o,u);return f===l?t:(c=me(t,e),c.array[a]=f,c)}return s&&t.array[a]===o?t:(n(u),c=me(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function me(t,e){return e&&t&&e===t.ownerID?t:new de(t?t.array.slice():[],e)}function ge(t,e){if(e>=Se(t._capacity))return t._tail;if(e<1<<t._level+cn){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&fn],r-=cn;return n}}function be(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,l=t._root,f=0;0>a+f;)l=new de(l&&l.array.length?[void 0,l]:[],i),c+=cn,f+=1<<c;f&&(a+=f,o+=f,s+=f,u+=f);for(var d=Se(u),p=Se(s);p>=1<<c+cn;)l=new de(l&&l.array.length?[l]:[],i),c+=cn;var h=t._tail,v=d>p?ge(t,s-1):p>d?new de([],i):h;if(h&&p>d&&u>a&&h.array.length){l=me(l,i);for(var _=l,y=c;y>cn;y-=cn){var m=d>>>y&fn;_=_.array[m]=me(_.array[m],i)}_.array[d>>>cn&fn]=h}if(u>s&&(v=v&&v.removeAfter(i,0,s)),a>=p)a-=p,s-=p,c=cn,l=null,v=v&&v.removeBefore(i,0,a);else if(a>o||d>p){for(f=0;l;){var g=a>>>c&fn;if(g!==p>>>c&fn)break;g&&(f+=(1<<c)*g),c-=cn,l=l.array[g]}l&&a>o&&(l=l.removeBefore(i,c,a-f)),l&&d>p&&(l=l.removeAfter(i,c,p-f)),f&&(a-=f,s-=f)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=l,t._tail=v,t.__hash=void 0,t.__altered=!0,t):he(a,s,c,l,v)}function Oe(t,e,n){for(var r=[],i=0,o=0;o<n.length;o++){var u=n[o],a=h(u);a.size>i&&(i=a.size),_(u)||(a=a.map(function(t){return $(t)})),r.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,r)}function Se(t){return ln>t?0:t-1>>>cn<<cn}function we(t){return null===t||void 0===t?Ee():Me(t)?t:Ee().withMutations(function(e){var n=p(t);at(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Me(t){return zt(t)&&b(t)}function Te(t,e,n,r){var i=Object.create(we.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function Ee(){return Kn||(Kn=Te(Kt(),ve()))}function Ie(t,e,n){var r,i,o=t._map,u=t._list,a=o.get(e),s=void 0!==a;if(n===dn){if(!s)return t;u.size>=ln&&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):Te(r,i)}function je(t){return null===t||void 0===t?Ce():Pe(t)?t:Ce().unshiftAll(t)}function Pe(t){return!(!t||!t[Jn])}function De(t,e,n,r){var i=Object.create($n);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ce(){return Zn||(Zn=De(0))}function Ae(t){return null===t||void 0===t?Ne():ke(t)&&!b(t)?t:Ne().withMutations(function(e){var n=v(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function ke(t){return!(!t||!t[Xn])}function xe(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 Le(t,e){var n=Object.create(Qn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ne(){return tr||(tr=Le(Kt()))}function Re(t){return null===t||void 0===t?Ye():ze(t)?t:Ye().withMutations(function(e){var n=v(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function ze(t){return ke(t)&&b(t)}function He(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ye(){return nr||(nr=He(Ee()))}function Ge(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);Be(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Rt(o)},i=r.prototype=Object.create(rr);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 Ue(t){return t._name||t.constructor.name||"Record"}function Be(t,e){try{e.forEach(Ve.bind(void 0,t))}catch(n){}}function Ve(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 qe(t,e){if(t===e)return!0;if(!_(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)||m(t)!==m(e)||b(t)!==b(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!g(t);if(b(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&J(i[1],t)&&(n||J(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?J(e,t.get(r,dn)):J(t.get(r,dn),e))?void 0:(u=!1,!1)});return u&&t.size===a}function We(t,e,n){if(!(this instanceof We))return new We(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(ir)return ir;ir=this}}function Ke(t,e){if(!(this instanceof Ke))return new Ke(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(or)return or;or=this}}function Je(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 $e(t,e){return e}function Ze(t,e){return[e,t]}function Xe(t){return function(){return!t.apply(this,arguments)}}function Qe(t){return function(){return-t.apply(this,arguments)}}function tn(t){return"string"==typeof t?JSON.stringify(t):t}function en(){return i(arguments)}function nn(t,e){return e>t?1:t>e?-1:0}function rn(t){if(t.size===1/0)return 0;var e=b(t),n=y(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+un(et(t),et(e))|0}:function(t,e){r=r+un(et(t),et(e))|0}:e?function(t){r=31*r+et(t)|0}:function(t){r=r+et(t)|0});return on(i,r)}function on(t,e){return e=jn(e,3432918353),e=jn(e<<15|e>>>-15,461845907),e=jn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=jn(e^e>>>16,2246822507),e=jn(e^e>>>13,3266489909),e=tt(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var an=Array.prototype.slice,sn="delete",cn=5,ln=1<<cn,fn=ln-1,dn={},pn={value:!1},hn={value:!1};t(p,d),t(h,d),t(v,d),d.isIterable=_,d.isKeyed=y,d.isIndexed=m,d.isAssociative=g,d.isOrdered=b,d.Keyed=p,d.Indexed=h,d.Set=v;var vn="@@__IMMUTABLE_ITERABLE__@@",_n="@@__IMMUTABLE_KEYED__@@",yn="@@__IMMUTABLE_INDEXED__@@",mn="@@__IMMUTABLE_ORDERED__@@",gn=0,bn=1,On=2,Sn="function"==typeof Symbol&&Symbol.iterator,wn="@@iterator",Mn=Sn||wn;O.prototype.toString=function(){return"[Iterator]"},O.KEYS=gn,O.VALUES=bn,O.ENTRIES=On,O.prototype.inspect=O.prototype.toSource=function(){return this.toString()},O.prototype[Mn]=function(){return this},t(P,d),P.of=function(){return P(arguments)},P.prototype.toSeq=function(){return this},P.prototype.toString=function(){return this.__toString("Seq {","}")},P.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},P.prototype.__iterate=function(t,e){return U(this,t,e,!0)},P.prototype.__iterator=function(t,e){return B(this,t,e,!0)},t(D,P),D.prototype.toKeyedSeq=function(){return this},t(C,P),C.of=function(){return C(arguments)},C.prototype.toIndexedSeq=function(){return this},C.prototype.toString=function(){return this.__toString("Seq [","]")},C.prototype.__iterate=function(t,e){return U(this,t,e,!1)},C.prototype.__iterator=function(t,e){return B(this,t,e,!1)},t(A,P),A.of=function(){return A(arguments)},A.prototype.toSetSeq=function(){return this},P.isSeq=R,P.Keyed=D,P.Set=A,P.Indexed=C;var Tn="@@__IMMUTABLE_SEQ__@@";P.prototype[Tn]=!0,t(k,C),k.prototype.get=function(t,e){return this.has(t)?this._array[u(this,t)]:e},k.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;r>=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},k.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new O(function(){return i>r?w():S(t,i,n[e?r-i++:i++])})},t(x,D),x.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},x.prototype.has=function(t){return this._object.hasOwnProperty(t)},x.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},x.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new O(function(){var u=r[e?i-o:o];return o++>i?w():S(t,u,n[u])})},x.prototype[mn]=!0,t(L,C),L.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=E(n),i=0;if(T(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=E(n);if(!T(r))return new O(w);var i=0;return new O(function(){var e=r.next();return e.done?e:S(t,i++,e.value)})},t(N,C),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;)if(t(r[i],i++,this)===!1)return i;for(var o;!(o=n.next()).done;){var u=o.value;if(r[i]=u,t(u,i++,this)===!1)break}return i},N.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,i=0;return new O(function(){if(i>=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return S(t,i,r[i++])})};var En;t(V,d),t(q,V),t(W,V),t(K,V),V.Keyed=q,V.Indexed=W,V.Set=K;var In,jn="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},Pn=Object.isExtensible,Dn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Cn="function"==typeof WeakMap;Cn&&(In=new WeakMap);var An=0,kn="__immutablehash__";"function"==typeof Symbol&&(kn=Symbol(kn));var xn=16,Ln=255,Nn=0,Rn={};t(st,D),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=ht(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?Ct(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(bn,e),r=e?Ct(this):0;return new O(function(){var i=n.next();return i.done?i:S(t,e?--r:r++,i.value,i)})},st.prototype[mn]=!0,t(ct,C),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(bn,e),r=0;return new O(function(){var e=n.next();return e.done?e:S(t,r++,e.value,e)})},t(lt,A),lt.prototype.has=function(t){return this._iter.includes(t)},lt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},lt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new O(function(){var e=n.next();return e.done?e:S(t,e.value,e.value,e)})},t(ft,D),ft.prototype.entrySeq=function(){return this._iter.toSeq()},ft.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Dt(e);var r=_(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ft.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new O(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Dt(r);var i=_(r);return S(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=lt.prototype.cacheResult=ft.prototype.cacheResult=xt,t(Rt,q),Rt.prototype.toString=function(){return this.__toString("Map {","}")},Rt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Rt.prototype.set=function(t,e){return Jt(this,t,e)},Rt.prototype.setIn=function(t,e){return this.updateIn(t,dn,function(){return e})},Rt.prototype.remove=function(t){return Jt(this,t,dn)},Rt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return dn})},Rt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Rt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,Nt(t),e,n);return r===dn?void 0:r},Rt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Kt()},Rt.prototype.merge=function(){return ne(this,void 0,arguments)},Rt.prototype.mergeWith=function(t){var e=an.call(arguments,1);return ne(this,t,e)},Rt.prototype.mergeIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Kt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Rt.prototype.mergeDeep=function(){return ne(this,re(void 0),arguments)},Rt.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return ne(this,re(t),e)},Rt.prototype.mergeDeepIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Kt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Rt.prototype.sort=function(t){return we(Tt(this,t))},Rt.prototype.sortBy=function(t,e){return we(Tt(this,e,t))},Rt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Rt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},Rt.prototype.asImmutable=function(){return this.__ensureOwner()},Rt.prototype.wasAltered=function(){return this.__altered},Rt.prototype.__iterator=function(t,e){return new Bt(this,t,e)},Rt.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},Rt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Rt.isMap=zt;var zn="@@__IMMUTABLE_MAP__@@",Hn=Rt.prototype;Hn[zn]=!0,Hn[sn]=Hn.remove,Hn.removeIn=Hn.deleteIn,Ht.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},Ht.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===dn,l=this.entries,f=0,d=l.length;d>f&&!J(o,l[f][0]);f++);var p=d>f;if(p?l[f][1]===u:c)return this;if(n(s),(c||!p)&&n(a),!c||1!==l.length){if(!p&&!c&&l.length>=Gn)return Qt(t,l,o,u);var h=t&&t===this.ownerID,v=h?l:i(l);return p?c?f===d-1?v.pop():v[f]=v.pop():v[f]=[o,u]:v.push([o,u]),h?(this.entries=v,this):new Ht(t,v)}},Yt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&fn),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+cn,e,n,r)},Yt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&fn,s=1<<a,c=this.bitmap,l=0!==(c&s);if(!l&&i===dn)return this;var f=ue(c&s-1),d=this.nodes,p=l?d[f]:void 0,h=$t(p,t,e+cn,n,r,i,o,u);if(h===p)return this;if(!l&&h&&d.length>=Fn)return ee(t,d,c,a,h);if(l&&!h&&2===d.length&&Zt(d[1^f]))return d[1^f];if(l&&h&&1===d.length&&Zt(h))return h;var v=t&&t===this.ownerID,_=l?h?c:c^s:c|s,y=l?h?ae(d,f,h,v):ce(d,f,v):se(d,f,h,v);return v?(this.bitmap=_,this.nodes=y,this):new Yt(t,_,y)},Gt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&fn,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Gt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&fn,s=i===dn,c=this.nodes,l=c[a];if(s&&!l)return this;var f=$t(l,t,e+cn,n,r,i,o,u);if(f===l)return this;var d=this.count;if(l){if(!f&&(d--,Un>d))return te(t,c,d,a)}else d++;var p=t&&t===this.ownerID,h=ae(c,a,f,p);return p?(this.count=d,this.nodes=h,this):new Gt(t,d,h)},Ft.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},Ft.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===dn;if(r!==this.keyHash)return c?this:(n(s),n(a),Xt(this,t,e,r,[o,u]));for(var l=this.entries,f=0,d=l.length;d>f&&!J(o,l[f][0]);f++);var p=d>f;if(p?l[f][1]===u:c)return this;if(n(s),(c||!p)&&n(a),c&&2===d)return new Ut(t,this.keyHash,l[1^f]);var h=t&&t===this.ownerID,v=h?l:i(l);return p?c?f===d-1?v.pop():v[f]=v.pop():v[f]=[o,u]:v.push([o,u]),h?(this.entries=v,this):new Ft(t,this.keyHash,v)},Ut.prototype.get=function(t,e,n,r){return J(n,this.entry[0])?this.entry[1]:r},Ut.prototype.update=function(t,e,r,i,o,u,a){var s=o===dn,c=J(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 Ut(t,this.keyHash,[i,o]):(n(u),Xt(this,t,e,et(i),[i,o])))},Ht.prototype.iterate=Ft.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},Yt.prototype.iterate=Gt.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}},Ut.prototype.iterate=function(t,e){return t(this.entry)},t(Bt,O),Bt.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 Vt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return Vt(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 Vt(t,o.entry);e=this._stack=qt(o,e)}continue}e=this._stack=this._stack.__prev}return w()};var Yn,Gn=ln/4,Fn=ln/2,Un=ln/4;t(le,W),le.of=function(){return this(arguments)},le.prototype.toString=function(){return this.__toString("List [","]")},le.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t<this.size){t+=this._origin;var n=ge(this,t);return n&&n.array[t&fn]}return e},le.prototype.set=function(t,e){return _e(this,t,e)},le.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},le.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=cn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ve()},le.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){be(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])})},le.prototype.pop=function(){return be(this,0,-1)},le.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){be(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])})},le.prototype.shift=function(){return be(this,1)},le.prototype.merge=function(){return Oe(this,void 0,arguments)},le.prototype.mergeWith=function(t){var e=an.call(arguments,1);return Oe(this,t,e)},le.prototype.mergeDeep=function(){return Oe(this,re(void 0),arguments)},le.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return Oe(this,re(t),e)},le.prototype.setSize=function(t){return be(this,0,t)},le.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:be(this,c(t,n),l(e,n))},le.prototype.__iterator=function(t,e){var n=0,r=pe(this,e);return new O(function(){var e=r();return e===Wn?w():S(t,n++,e)})},le.prototype.__iterate=function(t,e){for(var n,r=0,i=pe(this,e);(n=i())!==Wn&&t(n,r++,this)!==!1;);return r},le.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?he(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},le.isList=fe;var Bn="@@__IMMUTABLE_LIST__@@",Vn=le.prototype;Vn[Bn]=!0,Vn[sn]=Vn.remove,Vn.setIn=Hn.setIn,Vn.deleteIn=Vn.removeIn=Hn.removeIn,Vn.update=Hn.update,Vn.updateIn=Hn.updateIn,Vn.mergeIn=Hn.mergeIn,Vn.mergeDeepIn=Hn.mergeDeepIn,Vn.withMutations=Hn.withMutations,Vn.asMutable=Hn.asMutable,Vn.asImmutable=Hn.asImmutable,Vn.wasAltered=Hn.wasAltered,de.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&fn;if(r>=this.array.length)return new de([],t);var i,o=0===r;if(e>0){var u=this.array[r];if(i=u&&u.removeBefore(t,e-cn,n),i===u&&o)return this}if(o&&!i)return this;var a=me(this,t);if(!o)for(var s=0;r>s;s++)a.array[s]=void 0;return i&&(a.array[r]=i),a},de.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r=n-1>>>e&fn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-cn,n),i===o&&r===this.array.length-1)return this}var u=me(this,t);return u.array.splice(r+1),i&&(u.array[r]=i),u};var qn,Wn={};t(we,Rt),we.of=function(){return this(arguments)},we.prototype.toString=function(){return this.__toString("OrderedMap {","}")},we.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},we.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ee()},we.prototype.set=function(t,e){return Ie(this,t,e)},we.prototype.remove=function(t){return Ie(this,t,dn)},we.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},we.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},we.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},we.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},we.isOrderedMap=Me,we.prototype[mn]=!0,we.prototype[sn]=we.prototype.remove;var Kn;t(je,W),je.of=function(){return this(arguments)},je.prototype.toString=function(){return this.__toString("Stack [","]")},je.prototype.get=function(t,e){var n=this._head;for(t=u(this,t);n&&t--;)n=n.next;return n?n.value:e},je.prototype.peek=function(){return this._head&&this._head.value},je.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):De(t,e)},je.prototype.pushAll=function(t){if(t=h(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):De(e,n)},je.prototype.pop=function(){return this.slice(1)},je.prototype.unshift=function(){return this.push.apply(this,arguments)},je.prototype.unshiftAll=function(t){return this.pushAll(t)},je.prototype.shift=function(){return this.pop.apply(this,arguments)},je.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):Ce()},je.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var n=c(t,this.size),r=l(e,this.size);if(r!==this.size)return W.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):De(i,o)},je.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},je.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},je.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new O(function(){if(r){var e=r.value;return r=r.next,S(t,n++,e)}return w()})},je.isStack=Pe;var Jn="@@__IMMUTABLE_STACK__@@",$n=je.prototype;$n[Jn]=!0,$n.withMutations=Hn.withMutations,$n.asMutable=Hn.asMutable,$n.asImmutable=Hn.asImmutable,$n.wasAltered=Hn.wasAltered;var Zn;t(Ae,K),Ae.of=function(){return this(arguments)},Ae.fromKeys=function(t){return this(p(t).keySeq())},Ae.prototype.toString=function(){return this.__toString("Set {","}")},Ae.prototype.has=function(t){return this._map.has(t)},Ae.prototype.add=function(t){return xe(this,this._map.set(t,!0))},Ae.prototype.remove=function(t){return xe(this,this._map.remove(t))},Ae.prototype.clear=function(){return xe(this,this._map.clear())},Ae.prototype.union=function(){var t=an.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;n<t.length;n++)v(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Ae.prototype.intersect=function(){var t=an.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return v(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.every(function(t){return t.includes(e)})||n.remove(e)})})},Ae.prototype.subtract=function(){var t=an.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return v(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&n.remove(e)})})},Ae.prototype.merge=function(){return this.union.apply(this,arguments)},Ae.prototype.mergeWith=function(t){var e=an.call(arguments,1);return this.union.apply(this,e)},Ae.prototype.sort=function(t){return Re(Tt(this,t))},Ae.prototype.sortBy=function(t,e){return Re(Tt(this,e,t))},Ae.prototype.wasAltered=function(){return this._map.wasAltered()},Ae.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate(function(e,r){return t(r,r,n)},e)},Ae.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Ae.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Ae.isSet=ke;var Xn="@@__IMMUTABLE_SET__@@",Qn=Ae.prototype;Qn[Xn]=!0,Qn[sn]=Qn.remove,Qn.mergeDeep=Qn.merge,Qn.mergeDeepWith=Qn.mergeWith,Qn.withMutations=Hn.withMutations,Qn.asMutable=Hn.asMutable,Qn.asImmutable=Hn.asImmutable,Qn.__empty=Ne,Qn.__make=Le;var tr;t(Re,Ae),Re.of=function(){return this(arguments)},Re.fromKeys=function(t){return this(p(t).keySeq())},Re.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Re.isOrderedSet=ze;var er=Re.prototype;er[mn]=!0,er.__empty=Ye,er.__make=He;var nr;t(Ge,q),Ge.prototype.toString=function(){return this.__toString(Ue(this)+" {","}")},Ge.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Ge.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},Ge.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Fe(this,Kt()))},Ge.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Ue(this));var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Fe(this,n)},Ge.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Fe(this,e)},Ge.prototype.wasAltered=function(){return this._map.wasAltered()},Ge.prototype.__iterator=function(t,e){var n=this;return p(this._defaultValues).map(function(t,e){return n.get(e)}).__iterator(t,e)},Ge.prototype.__iterate=function(t,e){var n=this;return p(this._defaultValues).map(function(t,e){return n.get(e)}).__iterate(t,e)},Ge.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Fe(this,e,t):(this.__ownerID=t,this._map=e,this)};var rr=Ge.prototype;rr[sn]=rr.remove,rr.deleteIn=rr.removeIn=Hn.removeIn,rr.merge=Hn.merge,rr.mergeWith=Hn.mergeWith,rr.mergeIn=Hn.mergeIn,rr.mergeDeep=Hn.mergeDeep,rr.mergeDeepWith=Hn.mergeDeepWith,rr.mergeDeepIn=Hn.mergeDeepIn,rr.setIn=Hn.setIn,rr.update=Hn.update,rr.updateIn=Hn.updateIn,rr.withMutations=Hn.withMutations,rr.asMutable=Hn.asMutable,rr.asImmutable=Hn.asImmutable,t(We,C),We.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},We.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},We.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},We.prototype.slice=function(t,e){return s(t,e,this.size)?this:(t=c(t,this.size),e=l(e,this.size),t>=e?new We(0,0):new We(this.get(t,this._end),this.get(e,this._end),this._step))},We.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},We.prototype.lastIndexOf=function(t){return this.indexOf(t)},We.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;n>=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},We.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 O(function(){var u=i;return i+=e?-r:r,o>n?w():S(t,o++,u)})},We.prototype.equals=function(t){return t instanceof We?this._start===t._start&&this._end===t._end&&this._step===t._step:qe(this,t)};var ir;t(Ke,C),Ke.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ke.prototype.get=function(t,e){return this.has(t)?this._value:e},Ke.prototype.includes=function(t){return J(this._value,t)},Ke.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new Ke(this._value,l(e,n)-c(t,n))},Ke.prototype.reverse=function(){return this},Ke.prototype.indexOf=function(t){return J(this._value,t)?0:-1},Ke.prototype.lastIndexOf=function(t){return J(this._value,t)?this.size:-1},Ke.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(t(this._value,n,this)===!1)return n+1;return n},Ke.prototype.__iterator=function(t,e){var n=this,r=0;return new O(function(){return r<n.size?S(t,r++,n._value):w()})},Ke.prototype.equals=function(t){return t instanceof Ke?J(this._value,t._value):qe(t)};var or;d.Iterator=O,Je(d,{toArray:function(){at(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ct(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new st(this,!0)},toMap:function(){return Rt(this.toKeyedSeq())},toObject:function(){at(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return we(this.toKeyedSeq())},toOrderedSet:function(){return Re(y(this)?this.valueSeq():this)},toSet:function(){return Ae(y(this)?this.valueSeq():this)},toSetSeq:function(){return new lt(this)},toSeq:function(){return m(this)?this.toIndexedSeq():y(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return je(y(this)?this.valueSeq():this)},toList:function(){return le(y(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=an.call(arguments,0);return Pt(this,Ot(this,t))},includes:function(t){return this.some(function(e){return J(e,t)})},entries:function(){return this.__iterator(On)},every:function(t,e){at(this.size);var n=!0;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?void 0:(n=!1,!1)}),n},filter:function(t,e){return Pt(this,vt(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},findEntry:function(t,e){var n;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?(n=[i,r],!1):void 0}),n},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return at(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){at(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(gn)},map:function(t,e){return Pt(this,pt(this,t,e))},reduce:function(t,e,n){at(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,u){i?(i=!1,r=e):r=t.call(n,r,e,o,u)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Pt(this,ht(this,!0))},slice:function(t,e){return Pt(this,mt(this,t,e,!0))},some:function(t,e){return!this.every(Xe(t),e)},sort:function(t){return Pt(this,Tt(this,t))},values:function(){return this.__iterator(bn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return o(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return _t(this,t,e)},equals:function(t){return qe(this,t)},entrySeq:function(){var t=this;if(t._cache)return new k(t._cache);var e=t.toSeq().map(Ze).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Xe(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(a)},flatMap:function(t,e){return Pt(this,wt(this,t,e))},flatten:function(t){return Pt(this,St(this,t,!0))},fromEntrySeq:function(){return new ft(this)},get:function(t,e){return this.find(function(e,n){return J(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Nt(t);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,dn):dn,r===dn)return e}return r},groupBy:function(t,e){return yt(this,t,e)},has:function(t){return this.get(t,dn)!==dn},hasIn:function(t){return this.getIn(t,dn)!==dn},isSubset:function(t){return t="function"==typeof t.includes?t:d(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:d(t),t.isSubset(this)},keySeq:function(){return this.toSeq().map($e).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Et(this,t)},maxBy:function(t,e){return Et(this,e,t)},min:function(t){return Et(this,t?Qe(t):nn)},minBy:function(t,e){return Et(this,e?Qe(e):nn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Pt(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Pt(this,bt(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Xe(t),e)},sortBy:function(t,e){return Pt(this,Tt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Pt(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Pt(this,gt(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Xe(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=rn(this))}});var ur=d.prototype;ur[vn]=!0,ur[Mn]=ur.values,ur.__toJS=ur.toArray,ur.__toStringMapper=tn,ur.inspect=ur.toSource=function(){return this.toString()},ur.chain=ur.flatMap,ur.contains=ur.includes,function(){try{Object.defineProperty(ur,"length",{get:function(){if(!d.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Je(p,{flip:function(){return Pt(this,dt(this))},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return J(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return J(e,t)})},mapEntries:function(t,e){var n=this,r=0;return Pt(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Pt(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var ar=p.prototype;ar[_n]=!0,ar[Mn]=ur.entries,ar.__toJS=ur.toObject,ar.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+tn(t)},Je(h,{toKeyedSeq:function(){return new st(this,!1)},filter:function(t,e){return Pt(this,vt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){return this.toSeq().reverse().indexOf(t)},reverse:function(){return Pt(this,ht(this,!1))},slice:function(t,e){return Pt(this,mt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=c(t,0>t?this.count():this.size);var r=this.slice(0,t);return Pt(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 Pt(this,St(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<this.size:-1!==this.indexOf(t))},interpose:function(t){return Pt(this,Mt(this,t))},interleave:function(){var t=[this].concat(i(arguments)),e=jt(this.toSeq(),C.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),Pt(this,n)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Pt(this,bt(this,t,e,!1))},zip:function(){var t=[this].concat(i(arguments));return Pt(this,jt(this,en,t))},zipWith:function(t){var e=i(arguments);return e[0]=this,Pt(this,jt(this,t,e))}}),h.prototype[yn]=!0,h.prototype[mn]=!0,Je(v,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),v.prototype.has=ur.includes,Je(D,p.prototype),Je(C,h.prototype),Je(A,v.prototype),Je(q,p.prototype),Je(W,h.prototype),Je(K,v.prototype);var sr={Iterable:d,Seq:P,Collection:V,Map:Rt,OrderedMap:we,List:le,Stack:je,Set:Ae,OrderedSet:Re,Record:Ge,Range:We,Repeat:Ke,is:J,fromJS:$};return sr})},function(t,e){function n(t){return t&&"object"==typeof t&&toString.call(t)}function r(t){return"number"==typeof t&&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"!=typeof 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=typeof 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(;++a<u&&e(t[a],a,t)!==!1;);else for(i=Object.keys(t),u=i.length;++a<u&&e(t[i[a]],i[a],t)!==!1;);return t},e.partial=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);return function(){return t.apply(this,n.concat(e.call(arguments)))}},e.toFactory=function(t){var e=function(){for(var e=arguments.length,n=Array(e),r=0;e>r;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,l.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),l=n(4)},function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(3),s=r(a),c=n(7),l=r(c),f=n(8),d=r(f),p=n(11),h=n(10),v=n(5),_=n(4),y=n(12),m=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];o(this,t);var n=new y.ReactorState({debug:e.debug});this.prevReactorState=n,this.reactorState=n,this.observerState=new y.ObserverState,this.ReactMixin=(0,l["default"])(this),this.__batchDepth=0,this.__isDispatching=!1}return u(t,[{key:"evaluate",value:function(t){var e=d["default"].evaluate(this.reactorState,t),n=e.result,r=e.reactorState;return this.reactorState=r,n}},{key:"evaluateToJS",value:function(t){return(0,v.toJS)(this.evaluate(t))}},{key:"observe",value:function(t,e){var n=this;1===arguments.length&&(e=t,t=[]);var r=d["default"].addObserver(this.observerState,t,e),i=r.observerState,o=r.entry;return this.observerState=i,function(){n.observerState=d["default"].removeObserverByEntry(n.observerState,o)}}},{key:"unobserve",value:function(t,e){if(0===arguments.length)throw new Error("Must call unobserve with a Getter");if(!(0,h.isGetter)(t)&&!(0,p.isKeyPath)(t))throw new Error("Must call unobserve with a Getter");this.observerState=d["default"].removeObserver(this.observerState,t,e)}},{key:"dispatch",value:function(t,e){if(0===this.__batchDepth){if(this.__isDispatching)throw this.__isDispatching=!1,new Error("Dispatch may not be called while a dispatch is in progress");this.__isDispatching=!0}try{this.reactorState=d["default"].dispatch(this.reactorState,t,e)}catch(n){throw this.__isDispatching=!1,n}try{this.__notify()}finally{this.__isDispatching=!1}
|
||
}},{key:"batch",value:function(t){this.batchStart(),t(),this.batchEnd()}},{key:"registerStore",value:function(t,e){console.warn("Deprecation warning: `registerStore` will no longer be supported in 1.1, use `registerStores` instead"),this.registerStores(i({},t,e))}},{key:"registerStores",value:function(t){this.reactorState=d["default"].registerStores(this.reactorState,t),this.__notify()}},{key:"serialize",value:function(){return d["default"].serialize(this.reactorState)}},{key:"loadState",value:function(t){this.reactorState=d["default"].loadState(this.reactorState,t),this.__notify()}},{key:"reset",value:function(){var t=d["default"].reset(this.reactorState);this.reactorState=t,this.prevReactorState=t,this.observerState=new y.ObserverState}},{key:"__notify",value:function(){var t=this;if(!(this.__batchDepth>0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var n=s["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=d["default"].evaluate(t.prevReactorState,r),u=d["default"].evaluate(t.reactorState,r);t.prevReactorState=o.reactorState,t.reactorState=u.reactorState;var a=o.result,c=u.result;s["default"].is(a,c)||i.call(null,c)}});var r=d["default"].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,_.toFactory)(m),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 b({result:t,reactorState:e})}function o(t){return t}function u(t,e){var n=o(e);return t.getIn(["cache",n])}function a(t,e){var n=u(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 s(t,e,n){var r=o(e),i=t.get("dispatchId"),u=(0,y.getStoreDeps)(e),a=(0,_.toImmutable)({}).withMutations(function(e){u.forEach(function(n){var r=t.getIn(["storeStates",n]);e.set(n,r)})});return t.setIn(["cache",r],p["default"].Map({value:n,storeStates:a,dispatchId:i}))}function c(t,e){var n=o(e);return t.getIn(["cache",n,"value"])}function l(t){return t.update("dispatchId",function(t){return t+1})}function f(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)})})}var d=n(3),p=r(d),h=n(9),v=r(h),_=n(5),y=n(10),m=n(11),g=n(4),b=p["default"].Record({result:null,reactorState:null});e.registerStores=function(t,e){var n=t.get("debug");return t.withMutations(function(t){(0,g.each)(e,function(e,r){t.getIn(["stores",r])&&console.warn("Store already defined for id = "+r);var i=e.getInitialState();if(n&&!(0,_.isImmutableValue)(i))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(r,e)}).update("state",function(t){return t.set(r,i)}).update("dirtyStores",function(t){return t.add(r)}).update("storeStates",function(t){return f(t,[r])})}),l(t)})},e.dispatch=function(t,e,n){var r=t.get("state"),i=t.get("debug"),o=t.get("dirtyStores"),u=r.withMutations(function(r){i&&v["default"].dispatchStart(e,n),t.get("stores").forEach(function(t,u){var a=r.get(u),s=void 0;try{s=t.handle(a,e,n)}catch(c){throw v["default"].dispatchError(c.message),c}if(i&&void 0===s){var l="Store handler must return a value, did you forget a return statement";throw v["default"].dispatchError(l),new Error(l)}r.set(u,s),a!==s&&(o=o.add(u)),i&&v["default"].storeHandled(u,a,s)}),i&&v["default"].dispatchEnd(r)}),a=t.set("state",u).set("dirtyStores",o).update("storeStates",function(t){return f(t,o)});return l(a)},e.loadState=function(t,e){var n=[],r=(0,_.toImmutable)({}).withMutations(function(r){(0,g.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=p["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 f(t,n)})},e.addObserver=function(t,e,n){var r=e;(0,m.isKeyPath)(e)&&(e=(0,y.fromKeyPath)(e));var i=t.get("nextId"),o=(0,y.getStoreDeps)(e),u=p["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,p["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}},e.removeObserver=function(t,n,r){var i=t.get("observersMap").filter(function(t){var e=t.get("getterKey"),i=!r||t.get("handler")===r;return i?(0,m.isKeyPath)(n)&&(0,m.isKeyPath)(e)?(0,m.isEqual)(n,e):n===e:!1});return t.withMutations(function(t){i.forEach(function(n){return e.removeObserverByEntry(t,n)})})},e.removeObserverByEntry=function(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])})},e.reset=function(t){var n=t.get("debug"),r=t.get("state");return t.withMutations(function(t){var i=t.get("stores"),o=i.keySeq().toJS();i.forEach(function(e,i){var o=r.get(i),u=e.handleReset(o);if(n&&void 0===u)throw new Error("Store handleReset() must return a value, did you forget a return statement");if(n&&!(0,_.isImmutableValue)(u))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",i],u)}),t.update("storeStates",function(t){return f(t,o)}),e.resetDirtyStores(t)})},e.evaluate=function O(t,e){var n=t.get("state");if((0,m.isKeyPath)(e))return i(n.getIn(e),t);if(!(0,y.isGetter)(e))throw new Error("evaluate must be passed a keyPath or Getter");if(a(t,e))return i(c(t,e),t);var r=(0,y.getDeps)(e).map(function(e){return O(t,e).result}),o=(0,y.getComputeFn)(e).apply(null,r);return i(o,s(t,e,o))},e.serialize=function(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},e.resetDirtyStores=function(t){return t.set("dirtyStores",p["default"].Set())}},function(t,e){e.dispatchStart=function(t,e){console.group&&(console.groupCollapsed("Dispatch: %s",t),console.group("payload"),console.debug(e),console.groupEnd())},e.dispatchError=function(t){console.group&&(console.debug("Dispatch error: "+t),console.groupEnd())},e.storeHandled=function(t,e,n){console.group&&e!==n&&console.debug("Store "+t+" handled action")},e.dispatchEnd=function(t){console.group&&(console.debug("Dispatch done, new state: ",t.toJS()),console.groupEnd())}},function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,d.isArray)(t)&&(0,d.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=f["default"].Set());var n=f["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,l.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,h]}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 l=n(3),f=r(l),d=n(4),p=n(11),h=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){function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=r(i),u=o["default"].Record({dispatchId:0,state:o["default"].Map(),stores:o["default"].Map(),cache:o["default"].Map(),storeStates:o["default"].Map(),dirtyStores:o["default"].Set(),debug:!1}),a=o["default"].Record({any:o["default"].Set([]),stores:o["default"].Map({}),observersMap:o["default"].Map({}),nextId:1});e["default"]={ReactorState:u,ObserverState:a},t.exports=e["default"]}])})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(124),u=r(o);e["default"]=(0,u["default"])(i.reactor),t.exports=e["default"]},function(t,e){"use strict";var n=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=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(133),o=r(i);e.callApi=o["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({is:"partial-base",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}},computeMenuButtonClass:function(t,e){return!t&&e?"invisible":""},toggleMenu:function(){this.fire("open-menu")}}),t.exports=e["default"]},function(t,e,n){"use strict";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}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(149),u=i(o),a=n(150),s=r(a),c=u["default"];e.actions=c;var l=s;e.getters=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){t.registerStores({restApiCache:l["default"]})}function o(t){return[["restApiCache",t.entity],function(t){return!!t}]}function u(t){return[["restApiCache",t.entity],function(t){return t||(0,s.toImmutable)({})}]}function a(t){return function(e){return["restApiCache",t.entity,e]}}Object.defineProperty(e,"__esModule",{value:!0}),e.register=i,e.createHasDataGetter=o,e.createEntityMapGetter=u,e.createByIdGetter=a;var s=n(3),c=n(175),l=r(c),f=n(174),d=r(f);e.createApiActions=d["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(82),n(37),e["default"]=new o["default"]({is:"state-info",properties:{stateObj:{type:Object}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({ENTITY_HISTORY_DATE_SELECTED:null,ENTITY_HISTORY_FETCH_START:null,ENTITY_HISTORY_FETCH_ERROR:null,ENTITY_HISTORY_FETCH_SUCCESS:null,RECENT_ENTITY_HISTORY_FETCH_START:null,RECENT_ENTITY_HISTORY_FETCH_ERROR:null,RECENT_ENTITY_HISTORY_FETCH_SUCCESS:null,LOG_OUT:null}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({LOGBOOK_DATE_SELECTED:null,LOGBOOK_ENTRIES_FETCH_START:null,LOGBOOK_ENTRIES_FETCH_ERROR:null,LOGBOOK_ENTRIES_FETCH_SUCCESS:null}),t.exports=e["default"]},function(t,e,n){"use strict";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}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(176),u=i(o),a=n(58),s=r(a),c=u["default"];e.actions=c;var l=s;e.getters=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({VALIDATING_AUTH_TOKEN:null,VALID_AUTH_TOKEN:null,INVALID_AUTH_TOKEN:null,LOG_OUT:null}),t.exports=e["default"]},function(t,e,n){"use strict";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){t.registerStores({authAttempt:a["default"],authCurrent:c["default"],rememberAuth:f["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(136),a=i(u),s=n(137),c=i(s),l=n(138),f=i(l),d=n(134),p=r(d),h=n(135),v=r(h),_=p;e.actions=_;var y=v;e.getters=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},c=n(3),l=n(32),f=r(l),d=n(6),p="entity",h=new c.Immutable.Record({entityId:null,domain:null,objectId:null,state:null,entityDisplay:null,stateDisplay:null,lastChanged:null,lastChangedAsDate:null,attributes:{},isCustomGroup:null},"Entity"),v=function(t){function e(t,n,r){var o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];i(this,e);var a=t.split("."),c=u(a,2),l=c[0],d=c[1],p=n.replace(/_/g," ");o.unit_of_measurement&&(p+=" "+o.unit_of_measurement),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{entityId:t,domain:l,objectId:d,state:n,stateDisplay:p,lastChanged:r,attributes:o,entityDisplay:o.friendly_name||d.replace(/_/g," "),lastChangedAsDate:(0,f["default"])(r),isCustomGroup:"group"===l&&!o.auto})}return o(e,t),a(e,null,[{key:"entity",value:p,enumerable:!0}]),a(e,[{key:"id",get:function(){return this.entityId}}],[{key:"save",value:function(t,e){var n=(0,c.toJS)(e),r=n.entityId,i=n.state,o=n.attributes,u=void 0===o?{}:o,a={state:i,attributes:u};return(0,d.callApi)(t,"POST","states/"+r,a)}},{key:"fetch",value:function(t,e){return(0,d.callApi)(t,"GET","states/"+e)}},{key:"fetchAll",value:function(t){return(0,d.callApi)(t,"GET","states")}},{key:"fromJSON",value:function(t){var n=t.entity_id,r=t.state,i=t.last_changed,o=t.attributes;return new e(n,r,i,o)}}]),e}(h);e["default"]=v,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({is:"ha-label-badge",properties:{value:{type:String},icon:{type:String},label:{type:String},description:{type:String},image:{type:String,observe:"imageChanged"}},computeClasses:function(t){return t&&t.length>4?"value big":"value"}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({is:"loading-box"}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(125),a=r(u);n(39),n(123),n(122),n(119),n(121),n(120),e["default"]=new o["default"]({is:"state-card-content",properties:{stateObj:{type:Object,observer:"stateObjChanged"}},stateObjChanged:function(t,e){var n=o["default"].dom(this);if(!t)return void(n.lastChild&&n.removeChild(n.lastChild));var r=(0,a["default"])(t);if(e&&(0,a["default"])(e)===r)n.lastChild.stateObj=t;else{n.lastChild&&n.removeChild(n.lastChild);var i=document.createElement("state-card-"+r);i.stateObj=t,n.appendChild(i)}}}),t.exports=e["default"]},function(t,e){"use strict";function n(t,e){return t?e.map(function(e){return e in t.attributes?"has-"+e:""}).join(" "):""}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return i.reactor.evaluate(i.serviceGetters.canToggleEntity(t))}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r;var i=n(2);t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){switch(t){case"alarm_control_panel":return e&&"disarmed"===e?"mdi:bell-outline":"mdi:bell";case"binary_sensor":return e&&"off"===e?"mdi:radiobox-blank":"mdi:checkbox-marked-circle";case"camera":return"mdi:video";case"configurator":return"mdi:settings";case"conversation":return"mdi:text-to-speech";case"device_tracker":return"mdi:account";case"group":return"mdi:google-circles-communities";case"homeassistant":return"mdi:home";case"light":return"mdi:lightbulb";case"lock":return e&&"unlocked"===e?"mdi:lock-open":"mdi:lock";case"media_player":var n="mdi:cast";return e&&"off"!==e&&"idle"!==e&&(n+="-connected"),n;case"notify":return"mdi:comment-alert";case"updater":return"mdi:cloud-upload";case"scene":return"mdi:google-pages";case"script":return"mdi:file-document";case"sensor":return"mdi:eye";case"simple_alarm":return"mdi:bell";case"sun":return"mdi:white-balance-sunny";case"switch":return"mdi:flash";case"thermostat":return"mdi:nest-thermostat";default:return console.warn("Unable to find icon for domain "+t+" ("+e+")"),u["default"]}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i;var o=n(40),u=r(o);t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({SERVER_CONFIG_LOADED:null,COMPONENT_LOADED:null,LOG_OUT:null}),t.exports=e["default"]},function(t,e,n){"use strict";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){t.registerStores({serverComponent:a["default"],serverConfig:c["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(141),a=i(u),s=n(142),c=i(s),l=n(139),f=r(l),d=n(140),p=r(d),h=f;e.actions=h;var v=p;e.getters=v},function(t,e,n){"use strict";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}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(153),u=i(o),a=n(154),s=r(a),c=u["default"];e.actions=c;var l=s;e.getters=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({NAVIGATE:null,SHOW_SIDEBAR:null,LOG_OUT:null}),t.exports=e["default"]},function(t,e,n){"use strict";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){t.registerStores({notifications:a["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(171),a=i(u),s=n(169),c=r(s),l=n(170),f=r(l),d=c;e.actions=d;var p=f;e.getters=p},function(t,e,n){"use strict";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){t.registerStores({streamStatus:a["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(183),a=i(u),s=n(179),c=r(s),l=n(180),f=r(l),d=c;e.actions=d;var p=f;e.getters=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({API_FETCH_ALL_START:null,API_FETCH_ALL_SUCCESS:null,API_FETCH_ALL_FAIL:null,SYNC_SCHEDULED:null,SYNC_SCHEDULE_CANCELLED:null}),t.exports=e["default"]},function(t,e,n){"use strict";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){t.registerStores({isFetchingData:a["default"],isSyncScheduled:c["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(185),a=i(u),s=n(186),c=i(s),l=n(184),f=r(l),d=n(61),p=r(d),h=f;e.actions=h;var v=p;e.getters=v},function(t,e){"use strict";function n(t){return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n,t.exports=e["default"]},function(t,e){"use strict";function n(t){var e=t.split(" "),n=r(e,2),i=n[0],o=n[1],u=i.split(":"),a=r(u,3),s=a[0],c=a[1],l=a[2],f=o.split("-"),d=r(f,3),p=d[0],h=d[1],v=d[2];return new Date(Date.UTC(v,parseInt(h,10)-1,p,s,c,l))}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e["default"]=n,t.exports=e["default"]},function(t,e,n){(function(t){"use strict";!function(e,n){t.exports=n()}(void 0,function(){function e(){return Ln.apply(null,arguments)}function n(t){Ln=t}function r(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function o(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function u(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function a(t,e){for(var n in e)u(e,n)&&(t[n]=e[n]);return u(e,"toString")&&(t.toString=e.toString),u(e,"valueOf")&&(t.valueOf=e.valueOf),t}function s(t,e,n,r){return Pt(t,e,n,r,!0).utc()}function c(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function l(t){return null==t._pf&&(t._pf=c()),t._pf}function f(t){if(null==t._isValid){var e=l(t);t._isValid=!(isNaN(t._d.getTime())||!(e.overflow<0)||e.empty||e.invalidMonth||e.invalidWeekday||e.nullInput||e.invalidFormat||e.userInvalidated),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function d(t){var e=s(NaN);return null!=t?a(l(e),t):l(e).userInvalidated=!0,e}function p(t,e){var n,r,i;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=l(e)),"undefined"!=typeof e._locale&&(t._locale=e._locale),Rn.length>0)for(n in Rn)r=Rn[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function h(t){p(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),zn===!1&&(zn=!0,e.updateOffset(this),zn=!1)}function v(t){return t instanceof h||null!=t&&null!=t._isAMomentObject}function _(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=_(e)),n}function m(t,e,n){var r,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),u=0;for(r=0;i>r;r++)(n&&t[r]!==e[r]||!n&&y(t[r])!==y(e[r]))&&u++;return u+o}function g(){}function b(t){return t?t.toLowerCase().replace("_","-"):t}function O(t){for(var e,n,r,i,o=0;o<t.length;){for(i=b(t[o]).split("-"),e=i.length,n=b(t[o+1]),n=n?n.split("-"):null;e>0;){if(r=S(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&m(i,n,!0)>=e-1)break;e--}o++}return null}function S(e){var n=null;if(!Hn[e]&&"undefined"!=typeof t&&t&&t.exports)try{n=Nn._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),w(n)}catch(r){}return Hn[e]}function w(t,e){var n;return t&&(n="undefined"==typeof e?T(t):M(t,e),n&&(Nn=n)),Nn._abbr}function M(t,e){return null!==e?(e.abbr=t,Hn[t]=Hn[t]||new g,Hn[t].set(e),w(t),Hn[t]):(delete Hn[t],null)}function T(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Nn;if(!r(t)){if(e=S(t))return e;t=[t]}return O(t)}function E(t,e){var n=t.toLowerCase();Yn[n]=Yn[n+"s"]=Yn[e]=t}function I(t){return"string"==typeof t?Yn[t]||Yn[t.toLowerCase()]:void 0}function j(t){var e,n,r={};for(n in t)u(t,n)&&(e=I(n),e&&(r[e]=t[n]));return r}function P(t,n){return function(r){return null!=r?(C(this,t,r),e.updateOffset(this,n),this):D(this,t)}}function D(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function C(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function A(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=I(t),"function"==typeof this[t])return this[t](e);return this}function k(t,e,n){var r=""+Math.abs(t),i=e-r.length,o=t>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function x(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(Bn[t]=i),e&&(Bn[e[0]]=function(){return k(i.apply(this,arguments),e[1],e[2])}),n&&(Bn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function L(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function N(t){var e,n,r=t.match(Gn);for(e=0,n=r.length;n>e;e++)Bn[r[e]]?r[e]=Bn[r[e]]:r[e]=L(r[e]);return function(i){var o="";for(e=0;n>e;e++)o+=r[e]instanceof Function?r[e].call(i,t):r[e];return o}}function R(t,e){return t.isValid()?(e=z(e,t.localeData()),Un[e]=Un[e]||N(e),Un[e](t)):t.localeData().invalidDate()}function z(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Fn.lastIndex=0;r>=0&&Fn.test(t);)t=t.replace(Fn,n),Fn.lastIndex=0,r-=1;return t}function H(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function Y(t,e,n){or[t]=H(e)?e:function(t){return t&&n?n:e}}function G(t,e){return u(or,t)?or[t](e._strict,e._locale):new RegExp(F(t))}function F(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=y(t)}),n=0;n<t.length;n++)ur[t[n]]=r}function B(t,e){U(t,function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)})}function V(t,e,n){null!=e&&u(ur,t)&&ur[t](e,n._a,n,t)}function q(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function W(t){return this._months[t.month()]}function K(t){return this._monthsShort[t.month()]}function J(t,e,n){var r,i,o;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=s([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function $(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),q(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function Z(t){return null!=t?($(this,t),e.updateOffset(this,!0),this):D(this,"Month")}function X(){return q(this.year(),this.month())}function Q(t){var e,n=t._a;return n&&-2===l(t).overflow&&(e=n[sr]<0||n[sr]>11?sr:n[cr]<1||n[cr]>q(n[ar],n[sr])?cr:n[lr]<0||n[lr]>24||24===n[lr]&&(0!==n[fr]||0!==n[dr]||0!==n[pr])?lr:n[fr]<0||n[fr]>59?fr:n[dr]<0||n[dr]>59?dr:n[pr]<0||n[pr]>999?pr:-1,l(t)._overflowDayOfYear&&(ar>e||e>cr)&&(e=cr),l(t).overflow=e),t}function tt(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function et(t,e){var n=!0;return a(function(){return n&&(tt(t+"\n"+(new Error).stack),n=!1),e.apply(this,arguments)},e)}function nt(t,e){_r[t]||(tt(e),_r[t]=!0)}function rt(t){var e,n,r=t._i,i=yr.exec(r);if(i){for(l(t).iso=!0,e=0,n=mr.length;n>e;e++)if(mr[e][1].exec(r)){t._f=mr[e][0];break}for(e=0,n=gr.length;n>e;e++)if(gr[e][1].exec(r)){t._f+=(i[6]||" ")+gr[e][0];break}r.match(nr)&&(t._f+="Z"),St(t)}else t._isValid=!1}function it(t){var n=br.exec(t._i);return null!==n?void(t._d=new Date(+n[1])):(rt(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function ot(t,e,n,r,i,o,u){var a=new Date(t,e,n,r,i,o,u);return 1970>t&&a.setFullYear(t),a}function ut(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function at(t){return st(t)?366:365}function st(t){return t%4===0&&t%100!==0||t%400===0}function ct(){return st(this.year())}function lt(t,e,n){var r,i=n-e,o=n-t.day();return o>i&&(o-=7),i-7>o&&(o+=7),r=Dt(t).add(o,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ft(t){return lt(t,this._week.dow,this._week.doy).week}function dt(){return this._week.dow}function pt(){return this._week.doy;
|
||
}function ht(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function vt(t){var e=lt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function _t(t,e,n,r,i){var o,u=6+i-r,a=ut(t,0,1+u),s=a.getUTCDay();return i>s&&(s+=7),n=null!=n?1*n:i,o=1+u+7*(e-1)-s+n,{year:o>0?t:t-1,dayOfYear:o>0?o:at(t-1)+o}}function yt(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function mt(t,e,n){return null!=t?t:null!=e?e:n}function gt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function bt(t){var e,n,r,i,o=[];if(!t._d){for(r=gt(t),t._w&&null==t._a[cr]&&null==t._a[sr]&&Ot(t),t._dayOfYear&&(i=mt(t._a[ar],r[ar]),t._dayOfYear>at(i)&&(l(t)._overflowDayOfYear=!0),n=ut(i,0,t._dayOfYear),t._a[sr]=n.getUTCMonth(),t._a[cr]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[lr]&&0===t._a[fr]&&0===t._a[dr]&&0===t._a[pr]&&(t._nextDay=!0,t._a[lr]=0),t._d=(t._useUTC?ut:ot).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[lr]=24)}}function Ot(t){var e,n,r,i,o,u,a;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,u=4,n=mt(e.GG,t._a[ar],lt(Dt(),1,4).year),r=mt(e.W,1),i=mt(e.E,1)):(o=t._locale._week.dow,u=t._locale._week.doy,n=mt(e.gg,t._a[ar],lt(Dt(),o,u).year),r=mt(e.w,1),null!=e.d?(i=e.d,o>i&&++r):i=null!=e.e?e.e+o:o),a=_t(n,r,i,u,o),t._a[ar]=a.year,t._dayOfYear=a.dayOfYear}function St(t){if(t._f===e.ISO_8601)return void rt(t);t._a=[],l(t).empty=!0;var n,r,i,o,u,a=""+t._i,s=a.length,c=0;for(i=z(t._f,t._locale).match(Gn)||[],n=0;n<i.length;n++)o=i[n],r=(a.match(G(o,t))||[])[0],r&&(u=a.substr(0,a.indexOf(r)),u.length>0&&l(t).unusedInput.push(u),a=a.slice(a.indexOf(r)+r.length),c+=r.length),Bn[o]?(r?l(t).empty=!1:l(t).unusedTokens.push(o),V(o,r,t)):t._strict&&!r&&l(t).unusedTokens.push(o);l(t).charsLeftOver=s-c,a.length>0&&l(t).unusedInput.push(a),l(t).bigHour===!0&&t._a[lr]<=12&&t._a[lr]>0&&(l(t).bigHour=void 0),t._a[lr]=wt(t._locale,t._a[lr],t._meridiem),bt(t),Q(t)}function wt(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function Mt(t){var e,n,r,i,o;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)o=0,e=p({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],St(e),f(e)&&(o+=l(e).charsLeftOver,o+=10*l(e).unusedTokens.length,l(e).score=o,(null==r||r>o)&&(r=o,n=e));a(t,n||e)}function Tt(t){if(!t._d){var e=j(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],bt(t)}}function Et(t){var e=new h(Q(It(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function It(t){var e=t._i,n=t._f;return t._locale=t._locale||T(t._l),null===e||void 0===n&&""===e?d({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),v(e)?new h(Q(e)):(r(n)?Mt(t):n?St(t):i(e)?t._d=e:jt(t),t))}function jt(t){var n=t._i;void 0===n?t._d=new Date:i(n)?t._d=new Date(+n):"string"==typeof n?it(t):r(n)?(t._a=o(n.slice(0),function(t){return parseInt(t,10)}),bt(t)):"object"==typeof n?Tt(t):"number"==typeof n?t._d=new Date(n):e.createFromInputFallback(t)}function Pt(t,e,n,r,i){var o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=t,o._f=e,o._strict=r,Et(o)}function Dt(t,e,n,r){return Pt(t,e,n,r,!1)}function Ct(t,e){var n,i;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Dt();for(n=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][t](n))&&(n=e[i]);return n}function At(){var t=[].slice.call(arguments,0);return Ct("isBefore",t)}function kt(){var t=[].slice.call(arguments,0);return Ct("isAfter",t)}function xt(t){var e=j(t),n=e.year||0,r=e.quarter||0,i=e.month||0,o=e.week||0,u=e.day||0,a=e.hour||0,s=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*s+36e5*a,this._days=+u+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=T(),this._bubble()}function Lt(t){return t instanceof xt}function Nt(t,e){x(t,0,0,function(){var t=this.utcOffset(),n="+";return 0>t&&(t=-t,n="-"),n+k(~~(t/60),2)+e+k(~~t%60,2)})}function Rt(t){var e=(t||"").match(nr)||[],n=e[e.length-1]||[],r=(n+"").match(Tr)||["-",0,0],i=+(60*r[1])+y(r[2]);return"+"===r[0]?i:-i}function zt(t,n){var r,o;return n._isUTC?(r=n.clone(),o=(v(t)||i(t)?+t:+Dt(t))-+r,r._d.setTime(+r._d+o),e.updateOffset(r,!1),r):Dt(t).local()}function Ht(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Yt(t,n){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Rt(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&n&&(r=Ht(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!n||this._changeInProgress?ne(this,Zt(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ht(this)}function Gt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Ft(t){return this.utcOffset(0,t)}function Ut(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ht(this),"m")),this}function Bt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Rt(this._i)),this}function Vt(t){return t=t?Dt(t).utcOffset():0,(this.utcOffset()-t)%60===0}function qt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Wt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(p(t,this),t=It(t),t._a){var e=t._isUTC?s(t._a):Dt(t._a);this._isDSTShifted=this.isValid()&&m(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Kt(){return!this._isUTC}function Jt(){return this._isUTC}function $t(){return this._isUTC&&0===this._offset}function Zt(t,e){var n,r,i,o=t,a=null;return Lt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(a=Er.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:y(a[cr])*n,h:y(a[lr])*n,m:y(a[fr])*n,s:y(a[dr])*n,ms:y(a[pr])*n}):(a=Ir.exec(t))?(n="-"===a[1]?-1:1,o={y:Xt(a[2],n),M:Xt(a[3],n),d:Xt(a[4],n),h:Xt(a[5],n),m:Xt(a[6],n),s:Xt(a[7],n),w:Xt(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=te(Dt(o.from),Dt(o.to)),o={},o.ms=i.milliseconds,o.M=i.months),r=new xt(o),Lt(t)&&u(t,"_locale")&&(r._locale=t._locale),r}function Xt(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Qt(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function te(t,e){var n;return e=zt(e,t),t.isBefore(e)?n=Qt(t,e):(n=Qt(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function ee(t,e){return function(n,r){var i,o;return null===r||isNaN(+r)||(nt(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),o=n,n=r,r=o),n="string"==typeof n?+n:n,i=Zt(n,r),ne(this,i,t),this}}function ne(t,n,r,i){var o=n._milliseconds,u=n._days,a=n._months;i=null==i?!0:i,o&&t._d.setTime(+t._d+o*r),u&&C(t,"Date",D(t,"Date")+u*r),a&&$(t,D(t,"Month")+a*r),i&&e.updateOffset(t,u||a)}function re(t,e){var n=t||Dt(),r=zt(n,this).startOf("day"),i=this.diff(r,"days",!0),o=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(e&&e[o]||this.localeData().calendar(o,this,Dt(n)))}function ie(){return new h(this)}function oe(t,e){var n;return e=I("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=v(t)?t:Dt(t),+this>+t):(n=v(t)?+t:+Dt(t),n<+this.clone().startOf(e))}function ue(t,e){var n;return e=I("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=v(t)?t:Dt(t),+t>+this):(n=v(t)?+t:+Dt(t),+this.clone().endOf(e)<n)}function ae(t,e,n){return this.isAfter(t,n)&&this.isBefore(e,n)}function se(t,e){var n;return e=I(e||"millisecond"),"millisecond"===e?(t=v(t)?t:Dt(t),+this===+t):(n=+Dt(t),+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e))}function ce(t,e,n){var r,i,o=zt(t,this),u=6e4*(o.utcOffset()-this.utcOffset());return e=I(e),"year"===e||"month"===e||"quarter"===e?(i=le(this,o),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-o,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-u)/864e5:"week"===e?(r-u)/6048e5:r),n?i:_(i)}function le(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(i,"months");return 0>e-o?(n=t.clone().add(i-1,"months"),r=(e-o)/(o-n)):(n=t.clone().add(i+1,"months"),r=(e-o)/(n-o)),-(i+r)}function fe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function de(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():R(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):R(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function pe(t){var n=R(this,t||e.defaultFormat);return this.localeData().postformat(n)}function he(t,e){return this.isValid()?Zt({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ve(t){return this.from(Dt(),t)}function _e(t,e){return this.isValid()?Zt({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ye(t){return this.to(Dt(),t)}function me(t){var e;return void 0===t?this._locale._abbr:(e=T(t),null!=e&&(this._locale=e),this)}function ge(){return this._locale}function be(t){switch(t=I(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function Oe(t){return t=I(t),void 0===t||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")}function Se(){return+this._d-6e4*(this._offset||0)}function we(){return Math.floor(+this/1e3)}function Me(){return this._offset?new Date(+this):this._d}function Te(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Ee(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ie(){return f(this)}function je(){return a({},l(this))}function Pe(){return l(this).overflow}function De(t,e){x(0,[t,t.length],0,e)}function Ce(t,e,n){return lt(Dt([t,11,31+e-n]),e,n).week}function Ae(t){var e=lt(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")}function ke(t){var e=lt(this,1,4).year;return null==t?e:this.add(t-e,"y")}function xe(){return Ce(this.year(),1,4)}function Le(){var t=this.localeData()._week;return Ce(this.year(),t.dow,t.doy)}function Ne(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Re(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function ze(t){return this._weekdays[t.day()]}function He(t){return this._weekdaysShort[t.day()]}function Ye(t){return this._weekdaysMin[t.day()]}function Ge(t){var e,n,r;for(this._weekdaysParse=this._weekdaysParse||[],e=0;7>e;e++)if(this._weekdaysParse[e]||(n=Dt([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Fe(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Re(t,this.localeData()),this.add(t-e,"d")):e}function Ue(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Be(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Ve(t,e){x(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qe(t,e){return e._meridiemParse}function We(t){return"p"===(t+"").toLowerCase().charAt(0)}function Ke(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Je(t,e){e[pr]=y(1e3*("0."+t))}function $e(){return this._isUTC?"UTC":""}function Ze(){return this._isUTC?"Coordinated Universal Time":""}function Xe(t){return Dt(1e3*t)}function Qe(){return Dt.apply(null,arguments).parseZone()}function tn(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.call(e,n):r}function en(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function nn(){return this._invalidDate}function rn(t){return this._ordinal.replace("%d",t)}function on(t){return t}function un(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)}function an(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function sn(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function cn(t,e,n,r){var i=T(),o=s().set(r,e);return i[n](o,t)}function ln(t,e,n,r,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return cn(t,e,n,i);var o,u=[];for(o=0;r>o;o++)u[o]=cn(t,o,n,i);return u}function fn(t,e){return ln(t,e,"months",12,"month")}function dn(t,e){return ln(t,e,"monthsShort",12,"month")}function pn(t,e){return ln(t,e,"weekdays",7,"day")}function hn(t,e){return ln(t,e,"weekdaysShort",7,"day")}function vn(t,e){return ln(t,e,"weekdaysMin",7,"day")}function _n(){var t=this._data;return this._milliseconds=$r(this._milliseconds),this._days=$r(this._days),this._months=$r(this._months),t.milliseconds=$r(t.milliseconds),t.seconds=$r(t.seconds),t.minutes=$r(t.minutes),t.hours=$r(t.hours),t.months=$r(t.months),t.years=$r(t.years),this}function yn(t,e,n,r){var i=Zt(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function mn(t,e){return yn(this,t,e,1)}function gn(t,e){return yn(this,t,e,-1)}function bn(t){return 0>t?Math.floor(t):Math.ceil(t)}function On(){var t,e,n,r,i,o=this._milliseconds,u=this._days,a=this._months,s=this._data;return o>=0&&u>=0&&a>=0||0>=o&&0>=u&&0>=a||(o+=864e5*bn(wn(a)+u),u=0,a=0),s.milliseconds=o%1e3,t=_(o/1e3),s.seconds=t%60,e=_(t/60),s.minutes=e%60,n=_(e/60),s.hours=n%24,u+=_(n/24),i=_(Sn(u)),a+=i,u-=bn(wn(i)),r=_(a/12),a%=12,s.days=u,s.months=a,s.years=r,this}function Sn(t){return 4800*t/146097}function wn(t){return 146097*t/4800}function Mn(t){var e,n,r=this._milliseconds;if(t=I(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+Sn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(wn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function Tn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function En(t){return function(){return this.as(t)}}function In(t){return t=I(t),this[t+"s"]()}function jn(t){return function(){return this._data[t]}}function Pn(){return _(this.days()/7)}function Dn(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Cn(t,e,n){var r=Zt(t).abs(),i=di(r.as("s")),o=di(r.as("m")),u=di(r.as("h")),a=di(r.as("d")),s=di(r.as("M")),c=di(r.as("y")),l=i<pi.s&&["s",i]||1===o&&["m"]||o<pi.m&&["mm",o]||1===u&&["h"]||u<pi.h&&["hh",u]||1===a&&["d"]||a<pi.d&&["dd",a]||1===s&&["M"]||s<pi.M&&["MM",s]||1===c&&["y"]||["yy",c];return l[2]=e,l[3]=+t>0,l[4]=n,Dn.apply(null,l)}function An(t,e){return void 0===pi[t]?!1:void 0===e?pi[t]:(pi[t]=e,!0)}function kn(t){var e=this.localeData(),n=Cn(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function xn(){var t,e,n,r=hi(this._milliseconds)/1e3,i=hi(this._days),o=hi(this._months);t=_(r/60),e=_(t/60),r%=60,t%=60,n=_(o/12),o%=12;var u=n,a=o,s=i,c=e,l=t,f=r,d=this.asSeconds();return d?(0>d?"-":"")+"P"+(u?u+"Y":"")+(a?a+"M":"")+(s?s+"D":"")+(c||l||f?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(f?f+"S":""):"P0D"}var Ln,Nn,Rn=e.momentProperties=[],zn=!1,Hn={},Yn={},Gn=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Fn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Un={},Bn={},Vn=/\d/,qn=/\d\d/,Wn=/\d{3}/,Kn=/\d{4}/,Jn=/[+-]?\d{6}/,$n=/\d\d?/,Zn=/\d{1,3}/,Xn=/\d{1,4}/,Qn=/[+-]?\d{1,6}/,tr=/\d+/,er=/[+-]?\d+/,nr=/Z|[+-]\d\d:?\d\d/gi,rr=/[+-]?\d+(\.\d{1,3})?/,ir=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,or={},ur={},ar=0,sr=1,cr=2,lr=3,fr=4,dr=5,pr=6;x("M",["MM",2],"Mo",function(){return this.month()+1}),x("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),x("MMMM",0,0,function(t){return this.localeData().months(this,t)}),E("month","M"),Y("M",$n),Y("MM",$n,qn),Y("MMM",ir),Y("MMMM",ir),U(["M","MM"],function(t,e){e[sr]=y(t)-1}),U(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[sr]=i:l(n).invalidMonth=t});var hr="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),vr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),_r={};e.suppressDeprecationWarnings=!1;var yr=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gr=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],br=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=et("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),x(0,["YY",2],0,function(){return this.year()%100}),x(0,["YYYY",4],0,"year"),x(0,["YYYYY",5],0,"year"),x(0,["YYYYYY",6,!0],0,"year"),E("year","y"),Y("Y",er),Y("YY",$n,qn),Y("YYYY",Xn,Kn),Y("YYYYY",Qn,Jn),Y("YYYYYY",Qn,Jn),U(["YYYYY","YYYYYY"],ar),U("YYYY",function(t,n){n[ar]=2===t.length?e.parseTwoDigitYear(t):y(t)}),U("YY",function(t,n){n[ar]=e.parseTwoDigitYear(t)}),e.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var Or=P("FullYear",!1);x("w",["ww",2],"wo","week"),x("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),Y("w",$n),Y("ww",$n,qn),Y("W",$n),Y("WW",$n,qn),B(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=y(t)});var Sr={dow:0,doy:6};x("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),Y("DDD",Zn),Y("DDDD",Wn),U(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),e.ISO_8601=function(){};var wr=et("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Dt.apply(null,arguments);return this>t?this:t}),Mr=et("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Dt.apply(null,arguments);return t>this?this:t});Nt("Z",":"),Nt("ZZ",""),Y("Z",nr),Y("ZZ",nr),U(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Rt(t)});var Tr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Er=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ir=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Zt.fn=xt.prototype;var jr=ee(1,"add"),Pr=ee(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Dr=et("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});x(0,["gg",2],0,function(){return this.weekYear()%100}),x(0,["GG",2],0,function(){return this.isoWeekYear()%100}),De("gggg","weekYear"),De("ggggg","weekYear"),De("GGGG","isoWeekYear"),De("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),Y("G",er),Y("g",er),Y("GG",$n,qn),Y("gg",$n,qn),Y("GGGG",Xn,Kn),Y("gggg",Xn,Kn),Y("GGGGG",Qn,Jn),Y("ggggg",Qn,Jn),B(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=y(t)}),B(["gg","GG"],function(t,n,r,i){n[i]=e.parseTwoDigitYear(t)}),x("Q",0,0,"quarter"),E("quarter","Q"),Y("Q",Vn),U("Q",function(t,e){e[sr]=3*(y(t)-1)}),x("D",["DD",2],"Do","date"),E("date","D"),Y("D",$n),Y("DD",$n,qn),Y("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),U(["D","DD"],cr),U("Do",function(t,e){e[cr]=y(t.match($n)[0],10)});var Cr=P("Date",!0);x("d",0,"do","day"),x("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),x("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),x("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),x("e",0,0,"weekday"),x("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),Y("d",$n),Y("e",$n),Y("E",$n),Y("dd",ir),Y("ddd",ir),Y("dddd",ir),B(["dd","ddd","dddd"],function(t,e,n){var r=n._locale.weekdaysParse(t);null!=r?e.d=r:l(n).invalidWeekday=t}),B(["d","e","E"],function(t,e,n,r){e[r]=y(t)});var Ar="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),kr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xr="Su_Mo_Tu_We_Th_Fr_Sa".split("_");x("H",["HH",2],0,"hour"),x("h",["hh",2],0,function(){return this.hours()%12||12}),Ve("a",!0),Ve("A",!1),E("hour","h"),Y("a",qe),Y("A",qe),Y("H",$n),Y("h",$n),Y("HH",$n,qn),Y("hh",$n,qn),U(["H","HH"],lr),U(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),U(["h","hh"],function(t,e,n){e[lr]=y(t),l(n).bigHour=!0});var Lr=/[ap]\.?m?\.?/i,Nr=P("Hours",!0);x("m",["mm",2],0,"minute"),E("minute","m"),Y("m",$n),Y("mm",$n,qn),U(["m","mm"],fr);var Rr=P("Minutes",!1);x("s",["ss",2],0,"second"),E("second","s"),Y("s",$n),Y("ss",$n,qn),U(["s","ss"],dr);var zr=P("Seconds",!1);x("S",0,0,function(){return~~(this.millisecond()/100)}),x(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),x(0,["SSS",3],0,"millisecond"),x(0,["SSSS",4],0,function(){return 10*this.millisecond()}),x(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),x(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),x(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),x(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),x(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),E("millisecond","ms"),Y("S",Zn,Vn),Y("SS",Zn,qn),Y("SSS",Zn,Wn);var Hr;for(Hr="SSSS";Hr.length<=9;Hr+="S")Y(Hr,tr);for(Hr="S";Hr.length<=9;Hr+="S")U(Hr,Je);var Yr=P("Milliseconds",!1);x("z",0,0,"zoneAbbr"),x("zz",0,0,"zoneName");var Gr=h.prototype;Gr.add=jr,Gr.calendar=re,Gr.clone=ie,Gr.diff=ce,Gr.endOf=Oe,Gr.format=pe,Gr.from=he,Gr.fromNow=ve,Gr.to=_e,Gr.toNow=ye,Gr.get=A,Gr.invalidAt=Pe,Gr.isAfter=oe,Gr.isBefore=ue,Gr.isBetween=ae,Gr.isSame=se,Gr.isValid=Ie,Gr.lang=Dr,Gr.locale=me,Gr.localeData=ge,Gr.max=Mr,Gr.min=wr,Gr.parsingFlags=je,Gr.set=A,Gr.startOf=be,Gr.subtract=Pr,Gr.toArray=Te,Gr.toObject=Ee,Gr.toDate=Me,Gr.toISOString=de,Gr.toJSON=de,Gr.toString=fe,Gr.unix=we,Gr.valueOf=Se,Gr.year=Or,Gr.isLeapYear=ct,Gr.weekYear=Ae,Gr.isoWeekYear=ke,Gr.quarter=Gr.quarters=Ne,Gr.month=Z,Gr.daysInMonth=X,Gr.week=Gr.weeks=ht,Gr.isoWeek=Gr.isoWeeks=vt,Gr.weeksInYear=Le,Gr.isoWeeksInYear=xe,Gr.date=Cr,Gr.day=Gr.days=Fe,Gr.weekday=Ue,Gr.isoWeekday=Be,Gr.dayOfYear=yt,Gr.hour=Gr.hours=Nr,Gr.minute=Gr.minutes=Rr,Gr.second=Gr.seconds=zr,Gr.millisecond=Gr.milliseconds=Yr,Gr.utcOffset=Yt,Gr.utc=Ft,Gr.local=Ut,Gr.parseZone=Bt,Gr.hasAlignedHourOffset=Vt,Gr.isDST=qt,Gr.isDSTShifted=Wt,Gr.isLocal=Kt,Gr.isUtcOffset=Jt,Gr.isUtc=$t,Gr.isUTC=$t,Gr.zoneAbbr=$e,Gr.zoneName=Ze,Gr.dates=et("dates accessor is deprecated. Use date instead.",Cr),Gr.months=et("months accessor is deprecated. Use month instead",Z),Gr.years=et("years accessor is deprecated. Use year instead",Or),Gr.zone=et("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Gt);var Fr=Gr,Ur={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Br={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"},Vr="Invalid date",qr="%d",Wr=/\d{1,2}/,Kr={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"},Jr=g.prototype;Jr._calendar=Ur,Jr.calendar=tn,Jr._longDateFormat=Br,Jr.longDateFormat=en,Jr._invalidDate=Vr,Jr.invalidDate=nn,Jr._ordinal=qr,Jr.ordinal=rn,Jr._ordinalParse=Wr,Jr.preparse=on,Jr.postformat=on,Jr._relativeTime=Kr,Jr.relativeTime=un,Jr.pastFuture=an,Jr.set=sn,Jr.months=W,Jr._months=hr,Jr.monthsShort=K,Jr._monthsShort=vr,Jr.monthsParse=J,Jr.week=ft,Jr._week=Sr,Jr.firstDayOfYear=pt,Jr.firstDayOfWeek=dt,Jr.weekdays=ze,Jr._weekdays=Ar,Jr.weekdaysMin=Ye,Jr._weekdaysMin=xr,Jr.weekdaysShort=He,Jr._weekdaysShort=kr,Jr.weekdaysParse=Ge,Jr.isPM=We,Jr._meridiemParse=Lr,Jr.meridiem=Ke,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),e.lang=et("moment.lang is deprecated. Use moment.locale instead.",w),e.langData=et("moment.langData is deprecated. Use moment.localeData instead.",T);var $r=Math.abs,Zr=En("ms"),Xr=En("s"),Qr=En("m"),ti=En("h"),ei=En("d"),ni=En("w"),ri=En("M"),ii=En("y"),oi=jn("milliseconds"),ui=jn("seconds"),ai=jn("minutes"),si=jn("hours"),ci=jn("days"),li=jn("months"),fi=jn("years"),di=Math.round,pi={s:45,m:45,h:22,d:26,M:11},hi=Math.abs,vi=xt.prototype;vi.abs=_n,vi.add=mn,vi.subtract=gn,vi.as=Mn,vi.asMilliseconds=Zr,vi.asSeconds=Xr,vi.asMinutes=Qr,vi.asHours=ti,vi.asDays=ei,vi.asWeeks=ni,vi.asMonths=ri,vi.asYears=ii,vi.valueOf=Tn,vi._bubble=On,vi.get=In,vi.milliseconds=oi,vi.seconds=ui,vi.minutes=ai,vi.hours=si,vi.days=ci,vi.weeks=Pn,vi.months=li,vi.years=fi,vi.humanize=kn,vi.toISOString=xn,vi.toString=xn,vi.toJSON=xn,vi.locale=me,vi.localeData=ge,vi.toIsoString=et("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xn),vi.lang=Dr,x("X",0,0,"unix"),x("x",0,0,"valueOf"),Y("x",er),Y("X",rr),U("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),U("x",function(t,e,n){n._d=new Date(y(t))}),e.version="2.10.6",n(Dt),e.fn=Fr,e.min=At,e.max=kt,e.utc=s,e.unix=Xe,e.months=fn,e.isDate=i,e.locale=w,e.invalid=d,e.duration=Zt,e.isMoment=v,e.weekdays=pn,e.parseZone=Qe,e.localeData=T,e.isDuration=Lt,e.monthsShort=dn,e.weekdaysMin=vn,e.defineLocale=M,e.weekdaysShort=hn,e.normalizeUnits=I,e.relativeTimeThreshold=An;var _i=e;return _i})}).call(e,n(73)(t))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(22),a=r(u);e["default"]=new o["default"]({is:"domain-icon",properties:{domain:{type:String,value:""},state:{type:String,value:""}},computeIcon:function(t,e){return(0,a["default"])(t,e)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o);e["default"]=new u["default"]({is:"ha-entity-toggle",properties:{stateObj:{type:Object,observer:"stateObjChanged"},toggleChecked:{type:Boolean,value:!1}},ready:function(){this.forceStateChange()},toggleChanged:function(t){var e=t.target.checked,n=this._checkToggle(this.stateObj);e&&!n?this._call_service(!0):!e&&n&&this._call_service(!1)},stateObjChanged:function(t){t&&this.updateToggle(t)},updateToggle:function(t){this.toggleChecked=this._checkToggle(t)},forceStateChange:function(){var t=this._checkToggle(this.stateObj);this.toggleChecked===t&&(this.toggleChecked=!this.toggleChecked),this.toggleChecked=t},_checkToggle:function(t){return t&&"off"!==t.state&&"unlocked"!==t.state},_call_service:function(t){var e=this,n=void 0,r=void 0;"lock"===this.stateObj.domain?(n="lock",r=t?"lock":"unlock"):(n="homeassistant",r=t?"turn_on":"turn_off"),i.serviceActions.callService(n,r,{entity_id:this.stateObj.entityId}).then(function(){return e.forceStateChange()})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({is:"ha-card",properties:{header:{type:String},elevation:{type:Number,value:1,reflectToAttribute:!0}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(33),o=r(i),u=n(2),a=n(1),s=r(a),c=6e4,l=u.util.parseDateTime;e["default"]=new s["default"]({is:"relative-ha-datetime",properties:{datetime:{type:String,observer:"datetimeChanged"},datetimeObj:{type:Object,observer:"datetimeObjChanged"},parsedDateTime:{type:Object},relativeTime:{type:String,value:"not set"}},created:function(){this.updateRelative=this.updateRelative.bind(this)},attached:function(){this._interval=setInterval(this.updateRelative,c)},detached:function(){clearInterval(this._interval)},datetimeChanged:function(t){this.parsedDateTime=t?l(t):null,this.updateRelative()},datetimeObjChanged:function(t){this.parsedDateTime=t,this.updateRelative()},updateRelative:function(){this.relativeTime=this.parsedDateTime?(0,o["default"])(this.parsedDateTime).fromNow():""}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(18),n(92),n(91),e["default"]=new o["default"]({is:"state-history-charts",properties:{stateHistory:{type:Object},isLoadingData:{type:Boolean,value:!1},apiLoaded:{type:Boolean,value:!1},isLoading:{type:Boolean,computed:"computeIsLoading(isLoadingData, apiLoaded)"},groupedStateHistory:{type:Object,computed:"computeGroupedStateHistory(isLoading, stateHistory)"},isSingleDevice:{type:Boolean,computed:"computeIsSingleDevice(stateHistory)"}},computeIsSingleDevice:function(t){return t&&1===t.size},computeGroupedStateHistory:function(t,e){if(t||!e)return{line:[],timeline:[]};var n={},r=[];e.forEach(function(t){if(t&&0!==t.size){var e=t.find(function(t){return"unit_of_measurement"in t.attributes}),i=e?e.attributes.unit_of_measurement:!1;i?i in n?n[i].push(t.toArray()):n[i]=[t.toArray()]:r.push(t.toArray())}}),r=r.length>0&&r;var i=Object.keys(n).map(function(t){return[t,n[t]]});return{line:i,timeline:r}},googleApiLoaded:function(){var t=this;window.google.load("visualization","1",{packages:["timeline","corechart"],callback:function(){return t.apiLoaded=!0}})},computeContentClasses:function(t){return t?"loading":""},computeIsLoading:function(t,e){return t||!e},computeIsEmpty:function(t){return t&&0===t.size},extractUnit:function(t){return t[0]},extractData:function(t){return t[1]}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(10),e["default"]=new o["default"]({is:"state-card-display",properties:{stateObj:{type:Object}}}),t.exports=e["default"]},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="bookmark",t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,u["default"])(t).format("LT")}Object.defineProperty(e,"__esModule",{value:!0}),
|
||
e["default"]=i;var o=n(33),u=r(o);t.exports=e["default"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);e["default"]=function(t,e){r.authActions.validate(t,{rememberAuth:e,useStreaming:r.localStoragePreferences.useStreaming})},t.exports=e["default"]},function(t,e,n){"use strict";function r(t,e,n){function r(){y&&clearTimeout(y),p&&clearTimeout(p),g=0,p=y=m=void 0}function s(e,n){n&&clearTimeout(n),p=y=m=void 0,e&&(g=o(),h=t.apply(_,d),y||p||(d=_=void 0))}function c(){var t=e-(o()-v);0>=t||t>e?s(m,p):y=setTimeout(c,t)}function l(){s(O,y)}function f(){if(d=arguments,v=o(),_=this,m=O&&(y||!S),b===!1)var n=S&&!y;else{p||S||(g=v);var r=b-(v-g),i=0>=r||r>b;i?(p&&(p=clearTimeout(p)),g=v,h=t.apply(_,d)):p||(p=setTimeout(l,r))}return i&&y?y=clearTimeout(y):y||e===b||(y=setTimeout(c,e)),n&&(i=!0,h=t.apply(_,d)),!i||y||p||(d=_=void 0),h}var d,p,h,v,_,y,m,g=0,b=!1,O=!0;if("function"!=typeof t)throw new TypeError(u);if(e=0>e?0:+e||0,n===!0){var S=!0;O=!1}else i(n)&&(S=!!n.leading,b="maxWait"in n&&a(+n.maxWait||0,e),O="trailing"in n?!!n.trailing:O);return f.cancel=r,f}var i=n(47),o=n(129),u="Expected a function",a=Math.max;t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=null==t?void 0:t[e];return i(n)?n:void 0}var i=n(132);t.exports=r},function(t,e){"use strict";function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,e,n){"use strict";function r(t){return i(t)&&a.call(t)==o}var i=n(47),o="[object Function]",u=Object.prototype,a=u.toString;t.exports=r},function(t,e){"use strict";function n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=["isLoadingEntityHistory"];e.isLoadingEntityHistory=i;var o=["currentEntityHistoryDate"];e.currentDate=o;var u=["entityHistory"];e.entityHistoryMap=u;var a=[o,u,function(t,e){return e.get(t)||(0,r.toImmutable)({})}];e.entityHistoryForCurrentDate=a;var s=[o,u,function(t,e){return!!e.get(t)}];e.hasDataForCurrentDate=s;var c=["recentEntityHistory"];e.recentEntityHistoryMap=c;var l=["recentEntityHistory"];e.recentEntityHistoryUpdatedMap=l},function(t,e,n){"use strict";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){t.registerStores({currentEntityHistoryDate:a["default"],entityHistory:c["default"],isLoadingEntityHistory:f["default"],recentEntityHistory:p["default"],recentEntityHistoryUpdated:v["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(144),a=i(u),s=n(145),c=i(s),l=n(146),f=i(l),d=n(147),p=i(d),h=n(148),v=i(h),_=n(143),y=r(_),m=n(48),g=r(m),b=y;e.actions=b;var O=g;e.getters=O},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},a=n(3),s=n(6),c="event",l=new a.Immutable.Record({event:null,listenerCount:0},"Event"),f=function(t){function e(t){var n=arguments.length<=1||void 0===arguments[1]?0:arguments[1];r(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{event:t,listenerCount:n})}return i(e,t),o(e,null,[{key:"entity",value:c,enumerable:!0}]),o(e,[{key:"id",get:function(){return this.event}}],[{key:"fetchAll",value:function(t){return(0,s.callApi)(t,"GET","events")}},{key:"fromJSON",value:function(t){var n=t.event,r=t.listener_count;return new e(n,r)}}]),e}(l);e["default"]=f,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({SELECT_ENTITY:null,LOG_OUT:null}),t.exports=e["default"]},function(t,e,n){"use strict";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){t.registerStores({moreInfoEntityId:a["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(165),a=i(u),s=n(163),c=r(s),l=n(164),f=r(l),d=c;e.actions=d;var p=f;e.getters=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){t.dispatch(a["default"].SHOW_SIDEBAR,{show:e})}function o(t,e){t.dispatch(a["default"].NAVIGATE,{pane:e})}Object.defineProperty(e,"__esModule",{value:!0}),e.showSidebar=i,e.navigate=o;var u=n(26),a=r(u)},function(t,e){"use strict";function n(t){return[r,function(e){return e===t}]}Object.defineProperty(e,"__esModule",{value:!0}),e.isActivePane=n;var r=["selectedNavigationPanel"];e.activePane=r;var i=["showSidebar"];e.showSidebar=i},function(t,e,n){"use strict";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){t.registerStores({selectedNavigationPanel:a["default"],showSidebar:c["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(166),a=i(u),s=n(167),c=i(s),l=n(53),f=r(l),d=n(54),p=r(d),h=n(168),v=r(h),_=f;e.actions=_;var y=p;e.getters=y;var m=v;e.urlSync=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({NOTIFICATION_CREATED:null}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({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}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return[h(t),function(t){return!!t&&t.services.has(e)}]}function o(t){return[a.getters.byId(t),p,f["default"]]}Object.defineProperty(e,"__esModule",{value:!0}),e.hasService=i,e.canToggleEntity=o;var u=n(9),a=n(8),s=n(59),c=r(s),l=n(178),f=r(l),d=(0,u.createHasDataGetter)(c["default"]);e.hasData=d;var p=(0,u.createEntityMapGetter)(c["default"]);e.entityMap=p;var h=(0,u.createByIdGetter)(c["default"]);e.byDomain=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},a=n(3),s=n(6),c="service",l=new a.Immutable.Record({domain:null,services:[]},"ServiceDomain"),f=function(t){function e(t,n){r(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{domain:t,services:n})}return i(e,t),o(e,null,[{key:"entity",value:c,enumerable:!0}]),o(e,[{key:"id",get:function(){return this.domain}}],[{key:"fetchAll",value:function(){return(0,s.callApi)("GET","services")}},{key:"fromJSON",value:function(t){var n=t.domain,r=t.services;return new e(n,(0,a.toImmutable)(r))}}]),e}(l);e["default"]=f,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({STREAM_START:null,STREAM_STOP:null,STREAM_ERROR:null}),t.exports=e["default"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(25),o=n(13),u=[r.getters.hasData,i.getters.hasData,o.getters.hasData,function(t,e,n){return t&&e&&n}];e.isDataLoaded=u;var a=["isFetchingData"];e.isFetching=a;var s=["isSyncScheduled"];e.isSyncScheduled=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i);e["default"]=(0,o["default"])({VOICE_START:null,VOICE_RESULT:null,VOICE_TRANSMITTING:null,VOICE_DONE:null,VOICE_ERROR:null}),t.exports=e["default"]},function(t,e){"use strict";function n(t){return!t||(new Date).getTime()-t>6e4}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var u=n(172),a=n(192),s=i(a),c=n(194),l=i(c),f=n(196),d=i(f),p=n(15),h=r(p),v=n(24),_=r(v),y=n(8),m=r(y),g=n(49),b=r(g),O=n(152),S=r(O),w=n(25),M=r(w),T=n(157),E=r(T),I=n(52),j=r(I),P=n(55),D=r(P),C=n(27),A=r(C),k=n(13),x=r(k),L=n(28),N=r(L),R=n(30),z=r(R),H=n(189),Y=r(H),G=n(9),F=r(G),U=function B(){o(this,B);var t=(0,s["default"])();Object.defineProperties(this,{demo:{value:!1,enumerable:!0},localStoragePreferences:{value:u.localStoragePreferences,enumerable:!0},reactor:{value:t,enumerable:!0},util:{value:d["default"],enumerable:!0},startLocalStoragePreferencesSync:{value:u.localStoragePreferences.startSync.bind(u.localStoragePreferences,t)},startUrlSync:{value:D.urlSync.startSync.bind(null,t)},stopUrlSync:{value:D.urlSync.stopSync.bind(null,t)}}),(0,l["default"])(this,t,{auth:h,config:_,entity:m,entityHistory:b,errorLog:S,event:M,logbook:E,moreInfo:j,navigation:D,notification:A,service:x,stream:N,sync:z,voice:Y,restApi:F})};e["default"]=U,t.exports=e["default"]},function(t,e){"use strict";function n(t){return function(e){return null==e?void 0:e[t]}}t.exports=n},function(t,e,n){"use strict";var r=n(65),i=r("length");t.exports=i},function(t,e,n){"use strict";function r(t){return null!=t&&o(i(t))}var i=n(66),o=n(70);t.exports=r},function(t,e){"use strict";function n(t,e){return t="number"==typeof t||r.test(t)?+t:-1,e=null==e?i:e,t>-1&&t%1==0&&e>t}var r=/^\d+$/,i=9007199254740991;t.exports=n},function(t,e,n){"use strict";function r(t,e,n){if(!u(n))return!1;var r=typeof e;if("number"==r?i(n)&&o(e,n.length):"string"==r&&e in n){var a=n[e];return t===t?t===a:a!==a}return!1}var i=n(67),o=n(68),u=n(71);t.exports=r},function(t,e){"use strict";function n(t){return"number"==typeof t&&t>-1&&t%1==0&&r>=t}var r=9007199254740991;t.exports=n},function(t,e){"use strict";function n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){"use strict";function r(t,e,n){n&&i(t,e,n)&&(e=n=void 0),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var r=-1,a=u(o((e-t)/(n||1)),0),s=Array(a);++r<a;)s[r]=t,t+=n;return s}var i=n(69),o=Math.ceil,u=Math.max;t.exports=r},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(81),e["default"]=new o["default"]({is:"ha-badges-card",properties:{states:{type:Array}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2),a=n(21),s=r(a);n(36),n(35),n(19),e["default"]=new o["default"]({is:"ha-domain-card",properties:{domain:{type:String},states:{type:Array},groupEntity:{type:Object}},computeDomainTitle:function(t){return t.replace(/_/g," ")},entityTapped:function(t){if(!t.target.classList.contains("paper-toggle-button")&&!t.target.classList.contains("paper-icon-button")){t.stopPropagation();var e=t.model.item.entityId;this.async(function(){return u.moreInfoActions.selectEntity(e)},1)}},showGroupToggle:function(t,e){return!t||"on"!==t.state&&"off"!==t.state?!1:e.reduce(function(t,e){return t+(0,s["default"])(e.entityId)},0)>1}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(36),e["default"]=new o["default"]({is:"ha-introduction-card",properties:{showInstallInstruction:{type:Boolean,value:!1},showHideInstruction:{type:Boolean,value:!0}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(41),a=r(u);e["default"]=new o["default"]({is:"display-time",properties:{dateObj:{type:Object}},computeTime:function(t){return t?(0,a["default"])(t):""}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);e["default"]=new u["default"]({is:"entity-list",behaviors:[s["default"]],properties:{entities:{type:Array,bindNuclear:[i.entityGetters.entityMap,function(t){return t.valueSeq().sortBy(function(t){return t.entityId}).toArray()}]}},entitySelected:function(t){t.preventDefault(),this.fire("entity-selected",{entityId:t.model.entity.entityId})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2);n(17),e["default"]=new o["default"]({is:"ha-entity-marker",properties:{entityId:{type:String,value:""},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:{click:"badgeTap"},badgeTap:function(t){var e=this;t.stopPropagation(),this.entityId&&this.async(function(){return u.moreInfoActions.selectEntity(e.entityId)},1)},computeState:function(t){return t&&u.reactor.evaluate(u.entityGetters.byId(t))},computeIcon:function(t){return!t&&"home"},computeImage:function(t){return t&&t.attributes.entity_picture},computeValue:function(t){return t&&t.entityDisplay.split(" ").map(function(t){return t.substr(0,1)}).join("")}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(126),a=r(u);e["default"]=new o["default"]({is:"ha-state-icon",properties:{stateObj:{type:Object}},computeIcon:function(t){return(0,a["default"])(t)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2),a=n(22),s=r(a),c=n(21),l=r(c);n(17),e["default"]=new o["default"]({is:"ha-state-label-badge",properties:{state:{type:Object,observer:"stateChanged"}},listeners:{click:"badgeTap"},badgeTap:function(t){var e=this;return t.stopPropagation(),(0,l["default"])(this.state.entityId)?void("scene"===this.state.domain?u.serviceActions.callTurnOn(this.state.entityId):"off"===this.state.state?u.serviceActions.callTurnOn(this.state.entityId):u.serviceActions.callTurnOff(this.state.entityId)):void this.async(function(){return u.moreInfoActions.selectEntity(e.state.entityId)},1)},computeClasses:function(t){switch(t.domain){case"scene":return"green";case"binary_sensor":case"script":return"on"===t.state?"blue":"grey";case"updater":return"blue";default:return""}},computeValue:function(t){switch(t.domain){case"binary_sensor":case"device_tracker":case"updater":case"sun":case"scene":case"script":case"alarm_control_panel":return;case"sensor":return t.state;default:return t.state}},computeIcon:function(t){switch(t.domain){case"alarm_control_panel":return"pending"===t.state?"mdi:clock-fast":"armed_away"===t.state?"mdi:nature":"armed_home"===t.state?"mdi:home-variant":(0,s["default"])(t.domain,t.state);case"binary_sensor":case"device_tracker":case"scene":case"updater":case"script":return(0,s["default"])(t.domain,t.state);case"sun":return"above_horizon"===t.state?(0,s["default"])(t.domain):"mdi:brightness-3";default:return}},computeImage:function(t){return t.attributes.entity_picture},computeLabel:function(t){switch(t.domain){case"scene":case"script":return t.domain;case"device_tracker":return"not_home"===t.state?"Away":t.state;case"alarm_control_panel":return"pending"===t.state?"pend":"armed_away"===t.state||"armed_home"===t.state?"armed":"disarm";default:return t.attributes.unit_of_measurement}},computeDescription:function(t){return t.entityDisplay},stateChanged:function(){this.updateStyles()}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(80),e["default"]=new o["default"]({is:"state-badge",properties:{stateObj:{type:Object,observer:"updateIconColor"}},updateIconColor:function(t){"light"===t.domain&&"on"===t.state&&t.attributes.rgb_color&&t.attributes.rgb_color.reduce(function(t,e){return t+e},0)<730?this.$.icon.style.color="rgb("+t.attributes.rgb_color.join(",")+")":this.$.icon.style.color=null}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);e["default"]=new u["default"]({is:"events-list",behaviors:[s["default"]],properties:{events:{type:Array,bindNuclear:[i.eventGetters.entityMap,function(t){return t.valueSeq().sortBy(function(t){return t.event}).toArray()}]}},eventSelected:function(t){t.preventDefault(),this.fire("event-selected",{eventType:t.model.event.event})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function o(t){return"#"+i(t.r)+i(t.g)+i(t.b)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),a=r(u);e["default"]=new a["default"]({is:"ha-color-picker",properties:{width:{type:Number,value:300},height:{type:Number,value:300},color:{type:Object}},listeners:{mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},onMouseDown:function(t){this.onMouseMove(t),this.addEventListener("mousemove",this.onMouseMove)},onMouseUp:function(){this.removeEventListener("mousemove",this.onMouseMove)},onTouchStart:function(t){this.onTouchMove(t),this.addEventListener("touchmove",this.onTouchMove)},onTouchEnd:function(){this.removeEventListener("touchmove",this.onTouchMove)},onTouchMove:function(t){var e=t.touches[0];this.onColorSelect(t,{x:e.clientX,y:e.clientY})},onMouseMove:function(t){var e=this;t.preventDefault(),this.mouseMoveIsThrottled&&(this.mouseMoveIsThrottled=!1,this.onColorSelect(t),this.async(function(){return e.mouseMoveIsThrottled=!0},100))},onColorSelect:function(t,e){if(this.context){var n=e||this.relativeMouseCoordinates(t),r=this.context.getImageData(n.x,n.y,1,1).data;this.setColor({r:r[0],g:r[1],b:r[2]})}},setColor:function(t){this.color={hex:o(t),rgb:t},this.fire("colorselected",{rgb:this.color.rgb,hex:this.color.hex})},relativeMouseCoordinates:function(t){var e=0,n=0;if(this.canvas){var r=this.canvas.getBoundingClientRect();e=t.clientX-r.left,n=t.clientY-r.top}return{x:e,y:n}},ready:function(){this.setColor=this.setColor.bind(this),this.mouseMoveIsThrottled=!0,this.canvas=this.children[0],this.context=this.canvas.getContext("2d");var t=this.context.createLinearGradient(0,0,this.width,0);t.addColorStop(0,"rgb(255,0,0)"),t.addColorStop(.16,"rgb(255,0,255)"),t.addColorStop(.32,"rgb(0,0,255)"),t.addColorStop(.48,"rgb(0,255,255)"),t.addColorStop(.64,"rgb(0,255,0)"),t.addColorStop(.8,"rgb(255,255,0)"),t.addColorStop(1,"rgb(255,0,0)"),this.context.fillStyle=t,this.context.fillRect(0,0,this.width,this.height);var e=this.context.createLinearGradient(0,0,0,this.height);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(.5,"rgba(255,255,255,0)"),e.addColorStop(.5,"rgba(0,0,0,0)"),e.addColorStop(1,"rgba(0,0,0,1)"),this.context.fillStyle=e,this.context.fillRect(0,0,this.width,this.height)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(17),e["default"]=new o["default"]({is:"ha-demo-badge"}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(89),e["default"]=new o["default"]({is:"ha-logbook",properties:{entries:{type:Object,value:[]}},noEntries:function(t){return!t.length}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(93),e["default"]=new u["default"]({is:"ha-sidebar",behaviors:[s["default"]],properties:{menuShown:{type:Boolean},menuSelected:{type:String},selected:{type:String,bindNuclear:i.navigationGetters.activePane,observer:"selectedChanged"},hasHistoryComponent:{type:Boolean,bindNuclear:i.configGetters.isComponentLoaded("history")},hasLogbookComponent:{type:Boolean,bindNuclear:i.configGetters.isComponentLoaded("logbook")}},selectedChanged:function(t){for(var e=this.querySelectorAll(".menu [data-panel]"),n=0;n<e.length;n++)e[n].getAttribute("data-panel")===t?e[n].classList.add("selected"):e[n].classList.remove("selected")},menuClicked:function(t){for(var e=t.target,n=5;n&&!e.getAttribute("data-panel");)e=e.parentElement,n--;n&&this.selectPanel(e.getAttribute("data-panel"))},handleDevClick:function(t){document.activeElement.blur(),this.menuClicked(t)},toggleMenu:function(){this.fire("close-menu")},selectPanel:function(t){return t!==this.selected?"logout"===t?void this.handleLogOut():void i.navigationActions.navigate.apply(null,t.split("/")):void 0},handleLogOut:function(){i.authActions.logOut()}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return t in c?c[t]:30}function o(t){return t.entityDisplay.toLowerCase()}Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),a=r(u),s=n(2);n(85),n(74),n(75),n(76);var c={configurator:-20,group:-10,a:-1,updater:0,sun:1,device_tracker:2,alarm_control_panel:3,camera:4,sensor:5,binary_sensor:6,scene:7,script:8};e["default"]=new a["default"]({is:"ha-zone-cards",properties:{showIntroduction:{type:Boolean,value:!1},columns:{type:Number,value:2},states:{type:Object},cards:{type:Object,computed:"computeDomains(columns, states, showIntroduction)"}},computeDomains:function(t,e,n){function r(t){return t.filter(function(t){return!(t.entityId in l)})}function u(){var e=p;return p=(p+1)%t,e}function a(t,e){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];0!==e.length&&(f._columns[u()].push(t),f[t]={entities:e,groupEntity:n})}for(var c=e.groupBy(function(t){return t.domain}),l={},f={_demo:!1,_badges:[],_columns:[]},d=0;t>d;d++)f._columns[d]=[];var p=0;return n&&u(),c.keySeq().sortBy(function(t){return i(t)}).forEach(function(t){if("a"===t)return void(f._demo=!0);var n=i(t);n>=0&&10>n?f._badges.push.apply(f._badges,r(c.get(t)).sortBy(o).toArray()):"group"===t?c.get(t).filter(function(t){return!t.attributes.auto}).sortBy(o).forEach(function(t){var n=s.util.expandGroup(t,e);n.forEach(function(t){return l[t.entityId]=!0}),a(t.entityDisplay,n.toArray(),t)}):a(t,r(c.get(t)).sortBy(o).toArray())}),f},computeShouldRenderColumn:function(t,e){return 0===t||e.length},computeShowIntroduction:function(t,e,n){return 0===t&&(e||n._demo)},computeShowHideInstruction:function(t,e){return t.size>0&&!0&&!e._demo},computeGroupEntityOfCard:function(t,e){return e in t&&t[e].groupEntity},computeStatesOfCard:function(t,e){return e in t&&t[e].entities}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o);n(34),n(77),n(37),e["default"]=new u["default"]({is:"logbook-entry",entityClicked:function(t){t.preventDefault(),i.moreInfoActions.selectEntity(this.entryObj.entityId)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(34),e["default"]=new u["default"]({is:"services-list",behaviors:[s["default"]],properties:{serviceDomains:{type:Array,bindNuclear:i.serviceGetters.entityMap}},computeDomains:function(t){return t.valueSeq().map(function(t){return t.domain}).sort().toJS()},computeServices:function(t,e){return t.get(e).get("services").keySeq().toArray()},serviceClicked:function(t){t.preventDefault(),this.fire("service-selected",{domain:t.model.domain,service:t.model.service})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}Object.defineProperty(e,"__esModule",{value:!0});var o=n(72),u=r(o),a=n(1),s=r(a);e["default"]=new s["default"]({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 t=this.unit,e=this.data;if(0!==e.length){var n={legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",vAxes:{0:{title:t}},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 r=new Date(Math.min.apply(null,e.map(function(t){return t[0].lastChangedAsDate}))),o=new Date(r);o.setDate(o.getDate()+1),o>new Date&&(o=new Date);var a=e.map(function(t){function e(t,e){c&&e&&s.push([t[0]].concat(c.slice(1).map(function(t,n){return e[n]?t:null}))),s.push(t),c=t}var n=t[t.length-1],r=n.domain,u=n.entityDisplay,a=new window.google.visualization.DataTable;a.addColumn({type:"datetime",id:"Time"});var s=[],c=void 0;if("thermostat"===r){var l=t.reduce(function(t,e){return t||e.attributes.target_temp_high!==e.attributes.target_temp_low},!1);a.addColumn("number",u+" current temperature");var f=void 0;l?!function(){a.addColumn("number",u+" target temperature high"),a.addColumn("number",u+" target temperature low");var t=[!1,!0,!0];f=function(n){var r=i(n.attributes.current_temperature),o=i(n.attributes.target_temp_high),u=i(n.attributes.target_temp_low);e([n.lastChangedAsDate,r,o,u],t)}}():!function(){a.addColumn("number",u+" target temperature");var t=[!1,!0];f=function(n){var r=i(n.attributes.current_temperature),o=i(n.attributes.temperature);e([n.lastChangedAsDate,r,o],t)}}(),t.forEach(f)}else!function(){a.addColumn("number",u);var n="sensor"!==r&&[!0];t.forEach(function(t){var r=i(t.state);e([t.lastChangedAsDate,r],n)})}();return e([o].concat(c.slice(1)),!1),a.addRows(s),a}),s=void 0;s=1===a.length?a[0]:a.slice(1).reduce(function(t,e){return window.google.visualization.data.join(t,e,"full",[[0,0]],(0,u["default"])(1,t.getNumberOfColumns()),(0,u["default"])(1,e.getNumberOfColumns()))},a[0]),this.chartEngine.draw(s,n)}}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({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 t(t,e,n,r){var o=e.replace(/_/g," ");i.addRow([t,o,n,r])}if(this.isAttached){for(var e=o["default"].dom(this),n=this.data;e.node.lastChild;)e.node.removeChild(e.node.lastChild);if(n&&0!==n.length){var r=new window.google.visualization.Timeline(this),i=new window.google.visualization.DataTable;i.addColumn({type:"string",id:"Entity"}),i.addColumn({type:"string",id:"State"}),i.addColumn({type:"date",id:"Start"}),i.addColumn({type:"date",id:"End"});var u=new Date(n.reduce(function(t,e){return Math.min(t,e[0].lastChangedAsDate)},new Date)),a=new Date(u);a.setDate(a.getDate()+1),a>new Date&&(a=new Date);var s=0;n.forEach(function(e){if(0!==e.length){var n=e[0].entityDisplay,r=void 0,i=null,o=null;e.forEach(function(e){null!==i&&e.state!==i?(r=e.lastChangedAsDate,t(n,i,o,r),i=e.state,o=r):null===i&&(i=e.state,o=e.lastChangedAsDate)}),t(n,i,o,a),s++}}),r.draw(i,{height:55+42*s,timeline:{showRowLabels:n.length>1},hAxis:{format:"H:mm"}})}}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);e["default"]=new u["default"]({is:"stream-status",behaviors:[s["default"]],properties:{isStreaming:{type:Boolean,bindNuclear:i.streamGetters.isStreamingEvents},hasError:{type:Boolean,bindNuclear:i.streamGetters.hasStreamingEventsError}},toggleChanged:function(){this.isStreaming?i.streamActions.stop():i.streamActions.start()}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);e["default"]=new u["default"]({is:"ha-voice-command-dialog",behaviors:[s["default"]],properties:{dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},finalTranscript:{type:String,bindNuclear:i.voiceGetters.finalTranscript},interimTranscript:{type:String,bindNuclear:i.voiceGetters.extraInterimTranscript},isTransmitting:{type:Boolean,bindNuclear:i.voiceGetters.isTransmitting},isListening:{type:Boolean,bindNuclear:i.voiceGetters.isListening},showListenInterface:{type:Boolean,computed:"computeShowListenInterface(isListening, isTransmitting)",
|
||
observer:"showListenInterfaceChanged"},_boundOnBackdropTap:{type:Function,value:function(){return this._onBackdropTap.bind(this)}}},computeShowListenInterface:function(t,e){return t||e},dialogOpenChanged:function(t){t?this.$.dialog.backdropElement.addEventListener("click",this._boundOnBackdropTap):!t&&this.isListening&&i.voiceActions.stop()},showListenInterfaceChanged:function(t){!t&&this.dialogOpen?this.dialogOpen=!1:t&&(this.dialogOpen=!0)},_onBackdropTap:function(){this.$.dialog.backdropElement.removeEventListener("click",this._boundOnBackdropTap),this.isListening&&i.voiceActions.stop()}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(19),n(38),n(110);var c=["camera","configurator","scene"];e["default"]=new u["default"]({is:"more-info-dialog",behaviors:[s["default"]],properties:{stateObj:{type:Object,bindNuclear:i.moreInfoGetters.currentEntity,observer:"stateObjChanged"},stateHistory:{type:Object,bindNuclear:[i.moreInfoGetters.currentEntityHistory,function(t){return t?[t]:!1}]},isLoadingHistoryData:{type:Boolean,computed:"computeIsLoadingHistoryData(_delayedDialogOpen, _isLoadingHistoryData)"},_isLoadingHistoryData:{type:Boolean,bindNuclear:i.entityHistoryGetters.isLoadingEntityHistory},hasHistoryComponent:{type:Boolean,bindNuclear:i.configGetters.isComponentLoaded("history"),observer:"fetchHistoryData"},shouldFetchHistory:{type:Boolean,bindNuclear:i.moreInfoGetters.isCurrentEntityHistoryStale,observer:"fetchHistoryData"},showHistoryComponent:{type:Boolean,value:!1},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},_delayedDialogOpen:{type:Boolean,value:!1},_boundOnBackdropTap:{type:Function,value:function(){return this._onBackdropTap.bind(this)}}},computeIsLoadingHistoryData:function(t,e){return!t||e},fetchHistoryData:function(){this.stateObj&&this.hasHistoryComponent&&this.shouldFetchHistory&&i.entityHistoryActions.fetchRecent(this.stateObj.entityId)},stateObjChanged:function(t){var e=this;return t?(this.showHistoryComponent=this.hasHistoryComponent&&-1===c.indexOf(this.stateObj.domain),void this.async(function(){e.fetchHistoryData(),e.dialogOpen=!0},10)):void(this.dialogOpen=!1)},dialogOpenChanged:function(t){var e=this;t?(this.$.dialog.backdropElement.addEventListener("click",this._boundOnBackdropTap),this.async(function(){return e._delayedDialogOpen=!0},10)):!t&&this.stateObj&&(i.moreInfoActions.deselectEntity(),this._delayedDialogOpen=!1)},_onBackdropTap:function(){this.$.dialog.backdropElement.removeEventListener("click",this._boundOnBackdropTap),this.dialogOpen=!1}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2),a=n(4),s=r(a);n(87),n(105),n(103),n(102),n(104),n(98),n(99),n(101),n(100),n(106),n(95),n(94),e["default"]=new o["default"]({is:"home-assistant-main",behaviors:[s["default"]],properties:{narrow:{type:Boolean,value:!1},activePane:{type:String,bindNuclear:u.navigationGetters.activePane,observer:"activePaneChanged"},isSelectedStates:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("states")},isSelectedHistory:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("history")},isSelectedMap:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("map")},isSelectedLogbook:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("logbook")},isSelectedDevEvent:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("devEvent")},isSelectedDevState:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("devState")},isSelectedDevService:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("devService")},isSelectedDevInfo:{type:Boolean,bindNuclear:u.navigationGetters.isActivePane("devInfo")},showSidebar:{type:Boolean,bindNuclear:u.navigationGetters.showSidebar}},listeners:{"open-menu":"openMenu","close-menu":"closeMenu"},openMenu:function(){this.narrow?this.$.drawer.openDrawer():u.navigationActions.showSidebar(!0)},closeMenu:function(){this.$.drawer.closeDrawer(),this.showSidebar&&u.navigationActions.showSidebar(!1)},activePaneChanged:function(){this.narrow&&this.$.drawer.closeDrawer()},attached:function(){(0,u.startUrlSync)()},computeForceNarrow:function(t,e){return t||!e},detached:function(){(0,u.stopUrlSync)()}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2),a=n(4),s=r(a),c=n(42),l=r(c);e["default"]=new o["default"]({is:"login-form",behaviors:[s["default"]],properties:{errorMessage:{type:String,bindNuclear:u.authGetters.attemptErrorMessage},isInvalid:{type:Boolean,bindNuclear:u.authGetters.isInvalidAttempt},isValidating:{type:Boolean,observer:"isValidatingChanged",bindNuclear:u.authGetters.isValidating},loadingResources:{type:Boolean,value:!1},forceShowLoading:{type:Boolean,value:!1},showLoading:{type:Boolean,computed:"computeShowSpinner(forceShowLoading, isValidating)"}},listeners:{keydown:"passwordKeyDown","loginButton.click":"validatePassword"},observers:["validatingChanged(isValidating, isInvalid)"],computeShowSpinner:function(t,e){return t||e},validatingChanged:function(t,e){t||e||(this.$.passwordInput.value="")},isValidatingChanged:function(t){var e=this;t||this.async(function(){return e.$.passwordInput.focus()},10)},passwordKeyDown:function(t){13===t.keyCode?(this.validatePassword(),t.preventDefault()):this.isInvalid&&(this.isInvalid=!1)},validatePassword:function(){this.$.hideKeyboardOnFocus.focus(),(0,l["default"])(this.$.passwordInput.value,this.$.rememberLogin.checked)},attached:function(){var t=document.getElementById("init");t.parentElement.removeChild(t)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o);n(7),n(90),e["default"]=new u["default"]({is:"partial-dev-call-service",properties:{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(domain, service)"}},computeDescription:function(t,e){return i.reactor.evaluate([i.serviceGetters.entityMap,function(n){return n.has(t)&&n.get(t).get("services").has(e)?JSON.stringify(n.get(t).get("services").get(e).toJS(),null,2):"No description available"}])},serviceSelected:function(t){this.domain=t.detail.domain,this.service=t.detail.service},callService:function(){var t=void 0;try{t=this.serviceData?JSON.parse(this.serviceData):{}}catch(e){return void alert("Error parsing JSON: "+e)}i.serviceActions.callService(this.domain,this.service,t)},computeFormClasses:function(t){return"layout "+(t?"vertical":"horizontal")}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o);n(7),n(83),e["default"]=new u["default"]({is:"partial-dev-fire-event",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},eventType:{type:String,value:""},eventData:{type:String,value:""}},eventSelected:function(t){this.eventType=t.detail.eventType},fireEvent:function(){var t=void 0;try{t=this.eventData?JSON.parse(this.eventData):{}}catch(e){return void alert("Error parsing JSON: "+e)}i.eventActions.fireEvent(this.eventType,t)},computeFormClasses:function(t){return"layout "+(t?"vertical":"horizontal")}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(7),e["default"]=new u["default"]({is:"partial-dev-info",behaviors:[s["default"]],properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},hassVersion:{type:String,bindNuclear:i.configGetters.serverVersion},polymerVersion:{type:String,value:u["default"].version},nuclearVersion:{type:String,value:"1.2.1"},errorLog:{type:String,value:""}},attached:function(){this.refreshErrorLog()},refreshErrorLog:function(t){var e=this;t&&t.preventDefault(),this.errorLog="Loading error log…",i.errorLogActions.fetchErrorLog().then(function(t){return e.errorLog=t||"No errors have been reported."})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o);n(7),n(78),e["default"]=new u["default"]({is:"partial-dev-set-state",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},entityId:{type:String,value:""},state:{type:String,value:""},stateAttributes:{type:String,value:""}},setStateData:function(t){var e=t?JSON.stringify(t,null," "):"";this.$.inputData.value=e,this.$.inputDataWrapper.update(this.$.inputData)},entitySelected:function(t){var e=i.reactor.evaluate(i.entityGetters.byId(t.detail.entityId));this.entityId=e.entityId,this.state=e.state,this.stateAttributes=JSON.stringify(e.attributes,null," ")},handleSetState:function(){var t=void 0;try{t=this.stateAttributes?JSON.parse(this.stateAttributes):{}}catch(e){return void alert("Error parsing JSON: "+e)}i.entityActions.save({entityId:this.entityId,state:this.state,attributes:t})},computeFormClasses:function(t){return"layout "+(t?"vertical":"horizontal")}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(7),n(38),e["default"]=new u["default"]({is:"partial-history",behaviors:[s["default"]],properties:{narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},isDataLoaded:{type:Boolean,bindNuclear:i.entityHistoryGetters.hasDataForCurrentDate,observer:"isDataLoadedChanged"},stateHistory:{type:Object,bindNuclear:i.entityHistoryGetters.entityHistoryForCurrentDate},isLoadingData:{type:Boolean,bindNuclear:i.entityHistoryGetters.isLoadingEntityHistory},selectedDate:{type:String,value:null,bindNuclear:i.entityHistoryGetters.currentDate}},isDataLoadedChanged:function(t){t||this.async(function(){return i.entityHistoryActions.fetchSelectedDate()},1)},handleRefreshClick:function(){i.entityHistoryActions.fetchSelectedDate()},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:i.entityHistoryActions.changeCurrentDate})},detached:function(){this.datePicker.destroy()},computeContentClasses:function(t){return"flex content "+(t?"narrow":"wide")}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(7),n(86),n(18),e["default"]=new u["default"]({is:"partial-logbook",behaviors:[s["default"]],properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},selectedDate:{type:String,bindNuclear:i.logbookGetters.currentDate},isLoading:{type:Boolean,bindNuclear:i.logbookGetters.isLoadingEntries},isStale:{type:Boolean,bindNuclear:i.logbookGetters.isCurrentStale,observer:"isStaleChanged"},entries:{type:Array,bindNuclear:[i.logbookGetters.currentEntries,function(t){return t.reverse().toArray()}]},datePicker:{type:Object}},isStaleChanged:function(t){var e=this;t&&this.async(function(){return i.logbookActions.fetchDate(e.selectedDate)},1)},handleRefresh:function(){i.logbookActions.fetchDate(this.selectedDate)},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:i.logbookActions.changeCurrentDate})},detached:function(){this.datePicker.destroy()}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(79),window.L.Icon.Default.imagePath="/static/images/leaflet",e["default"]=new u["default"]({is:"partial-map",behaviors:[s["default"]],properties:{locationGPS:{type:Number,bindNuclear:i.configGetters.locationGPS},locationName:{type:String,bindNuclear:i.configGetters.locationName},locationEntities:{type:Array,bindNuclear:[i.entityGetters.visibleEntityMap,function(t){return t.valueSeq().filter(function(t){return t.attributes.latitude&&"home"!==t.state}).toArray()}]},zoneEntities:{type:Array,bindNuclear:[i.entityGetters.entityMap,function(t){return t.valueSeq().filter(function(t){return"zone"===t.domain}).toArray()}]},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1}},attached:function(){var t=this;window.L.Browser.mobileWebkit&&this.async(function(){var e=t.$.map,n=e.style.display;e.style.display="none",t.async(function(){e.style.display=n},1)},1)},computeMenuButtonClass:function(t,e){return!t&&e?"invisible":""},toggleMenu:function(){this.fire("open-menu")}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(7),n(88),e["default"]=new u["default"]({is:"partial-zone",behaviors:[s["default"]],properties:{narrow:{type:Boolean,value:!1},isFetching:{type:Boolean,bindNuclear:i.syncGetters.isFetching},isStreaming:{type:Boolean,bindNuclear:i.streamGetters.isStreamingEvents},canListen:{type:Boolean,bindNuclear:[i.voiceGetters.isVoiceSupported,i.configGetters.isComponentLoaded("conversation"),function(t,e){return t&&e}]},introductionLoaded:{type:Boolean,bindNuclear:i.configGetters.isComponentLoaded("introduction")},locationName:{type:String,bindNuclear:i.configGetters.locationName},showMenu:{type:Boolean,value:!1,observer:"windowChange"},states:{type:Object,bindNuclear:i.entityGetters.visibleEntityMap},columns:{type:Number}},created:function(){var t=this;this.windowChange=this.windowChange.bind(this);for(var e=[],n=0;5>n;n++)e.push(278+278*n);this.mqls=e.map(function(e){var n=window.matchMedia("(min-width: "+e+"px)");return n.addListener(t.windowChange),n})},detached:function(){var t=this;this.mqls.forEach(function(e){return e.removeListener(t.windowChange)})},windowChange:function(){var t=this.mqls.reduce(function(t,e){return t+e.matches},0);this.columns=Math.max(1,t-this.showMenu)},handleRefresh:function(){i.syncActions.fetchAll()},handleListenClick:function(){i.voiceActions.listen()},computeDomains:function(t){return t.keySeq().toArray()},computeMenuButtonClass:function(t,e){return!t&&e?"invisible":""},computeStatesOfDomain:function(t,e){return t.get(e).toArray()},computeRefreshButtonClass:function(t){return t?"ha-spin":void 0},computeShowIntroduction:function(t,e){return t||0===e.size},toggleMenu:function(){this.fire("open-menu")}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);e["default"]=new u["default"]({is:"notification-manager",behaviors:[s["default"]],properties:{text:{type:String,bindNuclear:i.notificationGetters.lastNotificationMessage,observer:"showNotification"}},showNotification:function(t){t&&this.$.toast.show()}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o);e["default"]=new u["default"]({is:"more-info-alarm_control_panel",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})},properties:{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(t,e){var n=new RegExp(e);return null===e?!0:n.test(t)},stateObjChanged:function(t){var e=this;t&&(this.codeFormat=t.attributes.code_format,this.codeInputVisible=null!==this.codeFormat,this.codeInputEnabled="armed_home"===t.state||"armed_away"===t.state||"disarmed"===t.state||"pending"===t.state||"triggered"===t.state,this.disarmButtonVisible="armed_home"===t.state||"armed_away"===t.state||"pending"===t.state||"triggered"===t.state,this.armHomeButtonVisible="disarmed"===t.state,this.armAwayButtonVisible="disarmed"===t.state),this.async(function(){return e.fire("iron-resize")},500)},callService:function(t,e){var n=e||{};n.entity_id=this.stateObj.entityId,i.serviceActions.callService("alarm_control_panel",t,n)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({is:"more-info-camera",properties:{stateObj:{type:Object},dialogOpen:{type:Boolean}},imageLoaded:function(){this.fire("iron-resize")},computeCameraImageUrl:function(t){return t?"/api/camera_proxy_stream/"+this.stateObj.entityId:"data:image/gif;base64,R0lGODlhAQABAAAAACw="}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(18),e["default"]=new u["default"]({is:"more-info-configurator",behaviors:[s["default"]],properties:{stateObj:{type:Object},action:{type:String,value:"display"},isStreaming:{type:Boolean,bindNuclear:i.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(t){return"configure"===t.state},computeSubmitCaption:function(t){return t.attributes.submit_caption||"Set configuration"},fieldChanged:function(t){var e=t.target;this.fieldInput[e.id]=e.value},submitClicked:function(){var t=this;this.isConfiguring=!0;var e={configure_id:this.stateObj.attributes.configure_id,fields:this.fieldInput};i.serviceActions.callService("configurator","configure",e).then(function(){t.isConfiguring=!1,t.isStreaming||i.syncActions.fetchAll()},function(){t.isConfiguring=!1})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(127),a=r(u);n(111),n(112),n(116),n(109),n(117),n(115),n(113),n(114),n(108),n(118),n(107),e["default"]=new o["default"]({is:"more-info-content",properties:{stateObj:{type:Object,observer:"stateObjChanged"},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"}},dialogOpenChanged:function(t){var e=o["default"].dom(this);e.lastChild&&(e.lastChild.dialogOpen=t)},stateObjChanged:function(t,e){var n=o["default"].dom(this);if(!t)return void(n.lastChild&&n.removeChild(n.lastChild));var r=(0,a["default"])(t);if(e&&(0,a["default"])(e)===r)n.lastChild.dialogOpen=this.dialogOpen,n.lastChild.stateObj=t;else{n.lastChild&&n.removeChild(n.lastChild);var i=document.createElement("more-info-"+r);i.stateObj=t,i.dialogOpen=this.dialogOpen,n.appendChild(i)}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=["entity_picture","friendly_name","icon","unit_of_measurement"];e["default"]=new o["default"]({is:"more-info-default",properties:{stateObj:{type:Object}},computeDisplayAttributes:function(t){return t?Object.keys(t.attributes).filter(function(t){return-1===u.indexOf(t)}):[]},getAttributeValue:function(t,e){return t.attributes[e]}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(4),s=r(a);n(19),e["default"]=new u["default"]({is:"more-info-group",behaviors:[s["default"]],properties:{stateObj:{type:Object},states:{type:Array,bindNuclear:[i.moreInfoGetters.currentEntity,i.entityGetters.entityMap,function(t,e){return t?t.attributes.entity_id.map(e.get.bind(e)):[]}]}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(20),s=r(a);n(84);var c=["brightness","rgb_color","color_temp"];e["default"]=new u["default"]({is:"more-info-light",properties:{stateObj:{type:Object,observer:"stateObjChanged"},brightnessSliderValue:{type:Number,value:0},ctSliderValue:{type:Number,value:0}},stateObjChanged:function(t){var e=this;t&&"on"===t.state&&(this.brightnessSliderValue=t.attributes.brightness,this.ctSliderValue=t.attributes.color_temp),this.async(function(){return e.fire("iron-resize")},500)},computeClassNames:function(t){return(0,s["default"])(t,c)},brightnessSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||(0===e?i.serviceActions.callTurnOff(this.stateObj.entityId):i.serviceActions.callService("light","turn_on",{entity_id:this.stateObj.entityId,brightness:e}))},ctSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||i.serviceActions.callService("light","turn_on",{entity_id:this.stateObj.entityId,color_temp:e})},colorPicked:function(t){var e=t.detail.rgb;i.serviceActions.callService("light","turn_on",{entity_id:this.stateObj.entityId,rgb_color:[e.r,e.g,e.b]})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(20),s=r(a),c=["volume_level"];e["default"]=new u["default"]({is:"more-info-media_player",properties:{stateObj:{type:Object,observer:"stateObjChanged"},isOff:{type:Boolean,value:!1},isPlaying:{type:Boolean,value:!1},isMuted:{type:Boolean,value:!1},volumeSliderValue:{type:Number,value:0},supportsPause:{type:Boolean,value:!1},supportsVolumeSet:{type:Boolean,value:!1},supportsVolumeMute:{type:Boolean,value:!1},supportsPreviousTrack:{type:Boolean,value:!1},supportsNextTrack:{type:Boolean,value:!1},supportsTurnOn:{type:Boolean,value:!1},supportsTurnOff:{type:Boolean,value:!1}},stateObjChanged:function(t){var e=this;t&&(this.isOff="off"===t.state,this.isPlaying="playing"===t.state,this.volumeSliderValue=100*t.attributes.volume_level,this.isMuted=t.attributes.is_volume_muted,this.supportsPause=0!==(1&t.attributes.supported_media_commands),this.supportsVolumeSet=0!==(4&t.attributes.supported_media_commands),this.supportsVolumeMute=0!==(8&t.attributes.supported_media_commands),this.supportsPreviousTrack=0!==(16&t.attributes.supported_media_commands),this.supportsNextTrack=0!==(32&t.attributes.supported_media_commands),this.supportsTurnOn=0!==(128&t.attributes.supported_media_commands),this.supportsTurnOff=0!==(256&t.attributes.supported_media_commands)),this.async(function(){return e.fire("iron-resize")},500)},computeClassNames:function(t){return(0,s["default"])(t,c)},computeIsOff:function(t){return"off"===t.state},computeMuteVolumeIcon:function(t){return t?"mdi:volume-off":"mdi:volume-high"},computePlaybackControlIcon:function(){return this.isPlaying?this.supportsPause?"mdi:pause":"mdi:stop":"mdi:play"},computeHidePowerButton:function(t,e,n){return t?!e:!n},handleTogglePower:function(){this.callService(this.isOff?"turn_on":"turn_off")},handlePrevious:function(){this.callService("media_previous_track")},handlePlaybackControl:function(){this.callService("media_play_pause")},handleNext:function(){this.callService("media_next_track")},handleVolumeTap:function(){this.supportsVolumeMute&&this.callService("volume_mute",{is_volume_muted:!this.isMuted})},volumeSliderChanged:function(t){var e=parseFloat(t.target.value),n=e>0?e/100:0;this.callService("volume_set",{volume_level:n})},callService:function(t,e){var n=e||{};n.entity_id=this.stateObj.entityId,i.serviceActions.callService("media_player",t,n)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({is:"more-info-script",properties:{stateObj:{type:Object}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2),a=n(41),s=r(a),c=u.util.parseDateTime;e["default"]=new o["default"]({is:"more-info-sun",properties:{stateObj:{type:Object},risingDate:{type:Object,computed:"computeRising(stateObj)"},settingDate:{type:Object,computed:"computeSetting(stateObj)"}},computeRising:function(t){return c(t.attributes.next_rising)},computeSetting:function(t){return c(t.attributes.next_setting)},computeOrder:function(t,e){return t>e?["set","ris"]:["ris","set"]},itemCaption:function(t){return"ris"===t?"Rising ":"Setting "},itemDate:function(t){return"ris"===t?this.risingDate:this.settingDate},itemValue:function(t){return(0,s["default"])(this.itemDate(t))}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(1),u=r(o),a=n(20),s=r(a),c=["away_mode"];e["default"]=new u["default"]({is:"more-info-thermostat",properties:{stateObj:{type:Object,observer:"stateObjChanged"},tempMin:{type:Number},tempMax:{type:Number},targetTemperatureSliderValue:{type:Number},awayToggleChecked:{type:Boolean}},stateObjChanged:function(t){this.targetTemperatureSliderValue=t.attributes.temperature,this.awayToggleChecked="on"===t.attributes.away_mode,this.tempMin=t.attributes.min_temp,this.tempMax=t.attributes.max_temp},computeClassNames:function(t){return(0,s["default"])(t,c)},targetTemperatureSliderChanged:function(t){i.serviceActions.callService("thermostat","set_temperature",{entity_id:this.stateObj.entityId,temperature:t.target.value})},toggleChanged:function(t){var e=t.target.checked;e&&"off"===this.stateObj.attributes.away_mode?this.service_set_away(!0):e||"on"!==this.stateObj.attributes.away_mode||this.service_set_away(!1)},service_set_away:function(t){var e=this;i.serviceActions.callService("thermostat","set_away_mode",{away_mode:t,entity_id:this.stateObj.entityId}).then(function(){return e.stateObjChanged(e.stateObj)})}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);e["default"]=new o["default"]({is:"more-info-updater",properties:{}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(10),n(39),e["default"]=new o["default"]({is:"state-card-configurator",properties:{stateObj:{type:Object}}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(10);var u=["playing","paused"];e["default"]=new o["default"]({is:"state-card-media_player",properties:{stateObj:{type:Object},isPlaying:{type:Boolean,computed:"computeIsPlaying(stateObj)"}},computeIsPlaying:function(t){return-1!==u.indexOf(t.state)},computePrimaryText:function(t,e){return e?t.attributes.media_title:t.stateDisplay},computeSecondaryText:function(t){var e=void 0;return"music"===t.attributes.media_content_type?t.attributes.media_artist:"tvshow"===t.attributes.media_content_type?(e=t.attributes.media_series_title,t.attributes.media_season&&t.attributes.media_episode&&(e+=" S"+t.attributes.media_season+"E"+t.attributes.media_episode),e):t.attributes.app_name?t.attributes.app_name:""}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),u=n(2);n(10),e["default"]=new o["default"]({is:"state-card-scene",properties:{stateObj:{type:Object}},activateScene:function(){u.serviceActions.callTurnOn(this.stateObj.entityId)}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(10),e["default"]=new o["default"]({is:"state-card-thermostat",properties:{stateObj:{type:Object}},computeTargetTemperature:function(t){return t.attributes.temperature+" "+t.attributes.unit_of_measurement}}),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i);n(10),n(35),e["default"]=new o["default"]({is:"state-card-toggle"}),t.exports=e["default"]},function(t,e){"use strict";function n(t){return{attached:function(){var e=this;this.__unwatchFns=Object.keys(this.properties).reduce(function(n,r){if(!("bindNuclear"in e.properties[r]))return n;var i=e.properties[r].bindNuclear;if(!i)throw new Error("Undefined getter specified for key "+r);return e[r]=t.evaluate(i),n.concat(t.observe(i,function(t){e[r]=t}))},[])},detached:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return-1!==a.indexOf(t.domain)?t.domain:(0,u["default"])(t.entityId)?"toggle":"display"}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i;var o=n(21),u=r(o),a=["thermostat","configurator","scene","media_player"];t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(!t)return u["default"];if(t.attributes.icon)return t.attributes.icon;var e=t.attributes.unit_of_measurement;return!e||"sensor"!==t.domain||e!==c.util.temperatureUnits.UNIT_TEMP_C&&e!==c.util.temperatureUnits.UNIT_TEMP_F?(0,s["default"])(t.domain,t.state):"mdi:thermometer"}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i;var o=n(40),u=r(o),a=n(22),s=r(a),c=n(2);t.exports=e["default"]},function(t,e){"use strict";function n(t){return-1!==r.indexOf(t.domain)?t.domain:"default"}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var r=["light","group","sun","configurator","thermostat","script","media_player","camera","updater","alarm_control_panel"];t.exports=e["default"]},function(t,e,n){var r;(function(t,i,o){"use strict";(function(){function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return"function"==typeof t}function s(t){return"object"==typeof t&&null!==t}function c(t){W=t}function l(t){Z=t}function f(){return function(){t.nextTick(_)}}function d(){return function(){q(_)}}function p(){var t=0,e=new tt(_),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function h(){var t=new MessageChannel;return t.port1.onmessage=_,function(){t.port2.postMessage(0)}}function v(){return function(){setTimeout(_,1)}}function _(){for(var t=0;$>t;t+=2){var e=rt[t],n=rt[t+1];e(n),rt[t]=void 0,rt[t+1]=void 0}$=0}function y(){try{var t=n(201);return q=t.runOnLoop||t.runOnContext,d()}catch(e){return v()}}function m(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function O(t){try{return t.then}catch(e){return at.error=e,at}}function S(t,e,n,r){try{t.call(e,n,r);
|
||
}catch(i){return i}}function w(t,e,n){Z(function(t){var r=!1,i=S(n,e,function(n){r||(r=!0,e!==n?E(t,n):j(t,n))},function(e){r||(r=!0,P(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,P(t,i))},t)}function M(t,e){e._state===ot?j(t,e._result):e._state===ut?P(t,e._result):D(e,void 0,function(e){E(t,e)},function(e){P(t,e)})}function T(t,e){if(e.constructor===t.constructor)M(t,e);else{var n=O(e);n===at?P(t,at.error):void 0===n?j(t,e):a(n)?w(t,e,n):j(t,e)}}function E(t,e){t===e?P(t,g()):u(e)?T(t,e):j(t,e)}function I(t){t._onerror&&t._onerror(t._result),C(t)}function j(t,e){t._state===it&&(t._result=e,t._state=ot,0!==t._subscribers.length&&Z(C,t))}function P(t,e){t._state===it&&(t._state=ut,t._result=e,Z(I,t))}function D(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+ot]=n,i[o+ut]=r,0===o&&t._state&&Z(C,t)}function C(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,i,o=t._result,u=0;u<e.length;u+=3)r=e[u],i=e[u+n],r?x(n,r,i,o):i(o);t._subscribers.length=0}}function A(){this.error=null}function k(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,e,n,r){var i,o,u,s,c=a(n);if(c){if(i=k(n,r),i===st?(s=!0,o=i.error,i=null):u=!0,e===i)return void P(e,b())}else i=r,u=!0;e._state!==it||(c&&u?E(e,i):s?P(e,o):t===ot?j(e,i):t===ut&&P(e,i))}function L(t,e){try{e(function(e){E(t,e)},function(e){P(t,e)})}catch(n){P(t,n)}}function N(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(m),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?j(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&j(n.promise,n._result))):P(n.promise,n._validationError())}function R(t){return new ct(this,t).promise}function z(t){function e(t){E(i,t)}function n(t){P(i,t)}var r=this,i=new r(m);if(!J(t))return P(i,new TypeError("You must pass an array to race.")),i;for(var o=t.length,u=0;i._state===it&&o>u;u++)D(r.resolve(t[u]),void 0,e,n);return i}function H(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(m);return E(n,t),n}function Y(t){var e=this,n=new e(m);return P(n,t),n}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this._id=ht++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==t&&(a(t)||G(),this instanceof U||F(),L(this,t))}function B(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=vt)}var V;V=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var q,W,K,J=V,$=0,Z=({}.toString,function(t,e){rt[$]=t,rt[$+1]=e,$+=2,2===$&&(W?W(_):K())}),X="undefined"!=typeof window?window:void 0,Q=X||{},tt=Q.MutationObserver||Q.WebKitMutationObserver,et="undefined"!=typeof t&&"[object process]"==={}.toString.call(t),nt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);K=et?f():tt?p():nt?h():void 0===X?y():v();var it=void 0,ot=1,ut=2,at=new A,st=new A;N.prototype._validateInput=function(t){return J(t)},N.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},N.prototype._init=function(){this._result=new Array(this.length)};var ct=N;N.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,i=0;n._state===it&&e>i;i++)t._eachEntry(r[i],i)},N.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;s(t)?t.constructor===r&&t._state!==it?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},N.prototype._settledAt=function(t,e,n){var r=this,i=r.promise;i._state===it&&(r._remaining--,t===ut?P(i,n):r._result[e]=n),0===r._remaining&&j(i,r._result)},N.prototype._willSettleAt=function(t,e){var n=this;D(t,void 0,function(t){n._settledAt(ot,e,t)},function(t){n._settledAt(ut,e,t)})};var lt=R,ft=z,dt=H,pt=Y,ht=0,vt=U;U.all=lt,U.race=ft,U.resolve=dt,U.reject=pt,U._setScheduler=c,U._setAsap=l,U._asap=Z,U.prototype={constructor:U,then:function(t,e){var n=this,r=n._state;if(r===ot&&!t||r===ut&&!e)return this;var i=new this.constructor(m),o=n._result;if(r){var u=arguments[r-1];Z(function(){x(r,i,u,o)})}else D(n,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var _t=B,yt={Promise:vt,polyfill:_t};n(200).amd?(r=function(){return yt}.call(e,n,e,o),!(void 0!==r&&(o.exports=r))):"undefined"!=typeof o&&o.exports?o.exports=yt:"undefined"!=typeof this&&(this.ES6Promise=yt),_t()}).call(void 0)}).call(e,n(198),function(){return this}(),n(197)(t))},function(t,e,n){"use strict";var r=n(44),i=r(Date,"now"),o=i||function(){return(new Date).getTime()};t.exports=o},function(t,e){"use strict";function n(t){return"number"==typeof t&&t>-1&&t%1==0&&r>=t}var r=9007199254740991;t.exports=n},function(t,e,n){"use strict";var r=n(44),i=n(130),o=n(45),u="[object Array]",a=Object.prototype,s=a.toString,c=r(Array,"isArray"),l=c||function(t){return o(t)&&i(t.length)&&s.call(t)==u};t.exports=l},function(t,e,n){"use strict";function r(t){return null==t?!1:i(t)?l.test(s.call(t)):o(t)&&u.test(t)}var i=n(46),o=n(45),u=/^\[object .+?Constructor\]$/,a=Object.prototype,s=Function.prototype.toString,c=a.hasOwnProperty,l=RegExp("^"+s.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(128),i=n(15),o=function(t,e,n){var o=arguments.length<=3||void 0===arguments[3]?null:arguments[3],u=t.evaluate(i.getters.authInfo),a=u.host+"/api/"+n;return new r.Promise(function(t,n){var r=new XMLHttpRequest;r.open(e,a,!0),r.setRequestHeader("X-HA-access",u.authToken),r.onload=function(){var e=void 0;try{e="application/json"===r.getResponseHeader("content-type")?JSON.parse(r.responseText):r.responseText}catch(i){e=r.responseText}r.status>199&&r.status<300?t(e):n(e)},r.onerror=function(){return n({})},o?r.send(JSON.stringify(o)):r.send()})};e["default"]=o,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n.useStreaming,i=void 0===r?t.evaluate(c.getters.isSupported):r,o=n.rememberAuth,u=void 0===o?!1:o,s=n.host,d=void 0===s?"":s;t.dispatch(a["default"].VALIDATING_AUTH_TOKEN,{authToken:e,host:d}),l.actions.fetchAll(t).then(function(){t.dispatch(a["default"].VALID_AUTH_TOKEN,{authToken:e,host:d,rememberAuth:u}),i?c.actions.start(t,{syncOnInitialConnect:!1}):l.actions.start(t,{skipInitialSync:!0})},function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.message,r=void 0===n?f:n;t.dispatch(a["default"].INVALID_AUTH_TOKEN,{errorMessage:r})})}function o(t){(0,s.callApi)(t,"POST","log_out"),t.dispatch(a["default"].LOG_OUT,{})}Object.defineProperty(e,"__esModule",{value:!0}),e.validate=i,e.logOut=o;var u=n(14),a=r(u),s=n(6),c=n(28),l=n(30),f="Unexpected result from API"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=["authAttempt","isValidating"];e.isValidating=n;var r=["authAttempt","isInvalid"];e.isInvalidAttempt=r;var i=["authAttempt","errorMessage"];e.attemptErrorMessage=i;var o=["rememberAuth"];e.rememberAuth=o;var u=[["authAttempt","authToken"],["authAttempt","host"],function(t,e){return{authToken:t,host:e}}];e.attemptAuthInfo=u;var a=["authCurrent","authToken"];e.currentAuthToken=a;var s=[a,["authCurrent","host"],function(t,e){return{authToken:t,host:e}}];e.currentAuthInfo=s;var c=[n,["authAttempt","authToken"],["authCurrent","authToken"],function(t,e,n){return t?e:n}];e.authToken=c;var l=[n,u,s,function(t,e,n){return t?e:n}];e.authInfo=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(null==t)throw new TypeError("Cannot destructure undefined")}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 a(t,e){var n=e.authToken,r=e.host;return(0,d.toImmutable)({authToken:n,host:r,isValidating:!0,isInvalid:!1,errorMessage:""})}function s(t,e){return i(e),_.getInitialState()}function c(t,e){var n=e.errorMessage;return t.withMutations(function(t){return t.set("isValidating",!1).set("isInvalid",!0).set("errorMessage",n)})}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},d=n(3),p=n(14),h=r(p),v=function(t){function e(){o(this,e),f(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return u(e,t),l(e,[{key:"getInitialState",value:function(){return(0,d.toImmutable)({isValidating:!1,authToken:!1,host:null,isInvalid:!1,errorMessage:""})}},{key:"initialize",value:function(){this.on(h["default"].VALIDATING_AUTH_TOKEN,a),this.on(h["default"].VALID_AUTH_TOKEN,s),this.on(h["default"].INVALID_AUTH_TOKEN,c)}}]),e}(d.Store),_=new v;e["default"]=_,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.authToken,r=e.host;return(0,l.toImmutable)({authToken:n,host:r})}function a(){return h.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(14),d=r(f),p=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,l.toImmutable)({authToken:null,host:""})}},{key:"initialize",value:function(){this.on(d["default"].VALID_AUTH_TOKEN,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),h=new p;e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.rememberAuth;return n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},c=n(3),l=n(14),f=r(l),d=function(t){function e(){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),a(e,[{key:"getInitialState",value:function(){return!0}},{key:"initialize",value:function(){this.on(f["default"].VALID_AUTH_TOKEN,u)}}]),e}(c.Store),p=new d;e["default"]=p,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){t.dispatch(c["default"].SERVER_CONFIG_LOADED,e)}function o(t){(0,a.callApi)(t,"GET","config").then(function(e){return i(t,e)})}function u(t,e){t.dispatch(c["default"].COMPONENT_LOADED,{component:e})}Object.defineProperty(e,"__esModule",{value:!0}),e.configLoaded=i,e.fetchAll=o,e.componentLoaded=u;var a=n(6),s=n(23),c=r(s)},function(t,e){"use strict";function n(t){return[["serverComponent"],function(e){return e.contains(t)}]}Object.defineProperty(e,"__esModule",{value:!0}),e.isComponentLoaded=n;var r=[["serverConfig","latitude"],["serverConfig","longitude"],function(t,e){return{latitude:t,longitude:e}}];e.locationGPS=r;var i=["serverConfig","location_name"];e.locationName=i;var o=["serverConfig","serverVersion"];e.serverVersion=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.component;return t.push(n)}function a(t,e){var n=e.components;return(0,f.toImmutable)(n)}function s(){return v.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},f=n(3),d=n(23),p=r(d),h=function(t){function e(){i(this,e),l(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),c(e,[{key:"getInitialState",value:function(){return(0,f.toImmutable)([])}},{key:"initialize",value:function(){this.on(p["default"].COMPONENT_LOADED,u),this.on(p["default"].SERVER_CONFIG_LOADED,a),this.on(p["default"].LOG_OUT,s)}}]),e}(f.Store),v=new h;e["default"]=v,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(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(0,l.toImmutable)({latitude:n,longitude:r,location_name:i,temperature_unit:o,time_zone:u,serverVersion:a})}function a(){return h.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(23),d=r(f),p=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,l.toImmutable)({latitude:null,longitude:null,location_name:"Home",temperature_unit:"°C",time_zone:"UTC",serverVersion:"unknown"})}},{key:"initialize",value:function(){this.on(d["default"].SERVER_CONFIG_LOADED,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),h=new p;e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";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){t.dispatch(f["default"].ENTITY_HISTORY_DATE_SELECTED,{date:e})}function u(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];t.dispatch(f["default"].RECENT_ENTITY_HISTORY_FETCH_START,{});var n="history/period";return null!==e&&(n+="?filter_entity_id="+e),(0,c.callApi)(t,"GET",n).then(function(e){return t.dispatch(f["default"].RECENT_ENTITY_HISTORY_FETCH_SUCCESS,{stateHistory:e})},function(){return t.dispatch(f["default"].RECENT_ENTITY_HISTORY_FETCH_ERROR,{})})}function a(t,e){return t.dispatch(f["default"].ENTITY_HISTORY_FETCH_START,{date:e}),(0,c.callApi)(t,"GET","history/period/"+e).then(function(n){return t.dispatch(f["default"].ENTITY_HISTORY_FETCH_SUCCESS,{date:e,stateHistory:n})},function(){return t.dispatch(f["default"].ENTITY_HISTORY_FETCH_ERROR,{})})}function s(t){var e=t.evaluate(p.currentDate);return a(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.changeCurrentDate=o,e.fetchRecent=u,e.fetchDate=a,e.fetchSelectedDate=s;var c=n(6),l=n(11),f=i(l),d=n(48),p=r(d)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.date;return(0,d["default"])(n)}function a(){return _.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(31),d=r(f),p=n(11),h=r(p),v=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){var t=new Date;return t.setDate(t.getDate()-1),(0,d["default"])(t)}},{key:"initialize",value:function(){this.on(h["default"].ENTITY_HISTORY_DATE_SELECTED,u),this.on(h["default"].LOG_OUT,a)}}]),e}(l.Store),_=new v;e["default"]=_,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.date,r=e.stateHistory;return 0===r.length?t.set(n,(0,l.toImmutable)({})):t.withMutations(function(t){r.forEach(function(e){return t.setIn([n,e[0].entity_id],(0,l.toImmutable)(e.map(h["default"].fromJSON)))})})}function a(){return _.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(11),d=r(f),p=n(16),h=r(p),v=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,l.toImmutable)({})}},{key:"initialize",value:function(){this.on(d["default"].ENTITY_HISTORY_FETCH_SUCCESS,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),_=new v;e["default"]=_,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},s=n(3),c=n(11),l=r(c),f=function(t){function e(){i(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),u(e,[{key:"getInitialState",value:function(){return!1}},{key:"initialize",value:function(){this.on(l["default"].ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(l["default"].ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(l["default"].ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(l["default"].RECENT_ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(l["default"].RECENT_ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(l["default"].RECENT_ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(l["default"].LOG_OUT,function(){return!1})}}]),e}(s.Store),d=new f;e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.stateHistory;return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,(0,l.toImmutable)(e.map(h["default"].fromJSON)))})})}function a(){return _.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(11),d=r(f),p=n(16),h=r(p),v=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,l.toImmutable)({})}},{key:"initialize",value:function(){this.on(d["default"].RECENT_ENTITY_HISTORY_FETCH_SUCCESS,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),_=new v;e["default"]=_,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(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(p,r)})}function a(){return v.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(11),d=r(f),p="ALL_ENTRY_FETCH",h=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,l.toImmutable)({})}},{key:"initialize",value:function(){this.on(d["default"].RECENT_ENTITY_HISTORY_FETCH_SUCCESS,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),v=new h;e["default"]=v,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=n(16),u=r(o),a=(0,i.createApiActions)(u["default"]);e["default"]=a,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=n(16),u=r(o),a=(0,i.createHasDataGetter)(u["default"]);e.hasData=a;var s=(0,i.createEntityMapGetter)(u["default"]);e.entityMap=s;var c=(0,i.createByIdGetter)(u["default"]);e.byId=c;var l=[s,function(t){return t.filter(function(t){return!t.attributes.hidden})}];e.visibleEntityMap=l},function(t,e,n){"use strict";function r(t){return(0,i.callApi)(t,"GET","error_log")}Object.defineProperty(e,"__esModule",{value:!0}),e.fetchErrorLog=r;var i=n(6)},function(t,e,n){"use strict";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}Object.defineProperty(e,"__esModule",{value:!0});var i=n(151),o=r(i),u=o;e.actions=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=n(9),u=n(27),a=n(50),s=r(a),c=(0,o.createApiActions)(s["default"]);c.fireEvent=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return(0,i.callApi)(t,"POST","events/"+e,n).then(function(){u.actions.createNotification(t,"Event "+e+" successful fired!")})},e["default"]=c,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=n(50),u=r(o),a=(0,i.createHasDataGetter)(u["default"]);e.hasData=a;var s=(0,i.createEntityMapGetter)(u["default"]);e.entityMap=s;var c=(0,i.createByIdGetter)(u["default"]);e.byId=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){t.dispatch(s["default"].LOGBOOK_DATE_SELECTED,{date:e})}function o(t,e){t.dispatch(s["default"].LOGBOOK_ENTRIES_FETCH_START,{date:e}),(0,u.callApi)(t,"GET","logbook/"+e).then(function(n){return t.dispatch(s["default"].LOGBOOK_ENTRIES_FETCH_SUCCESS,{date:e,entries:n})},function(){return t.dispatch(s["default"].LOGBOOK_ENTRIES_FETCH_ERROR,{})})}Object.defineProperty(e,"__esModule",{value:!0}),e.changeCurrentDate=i,e.fetchDate=o;var u=n(6),a=n(12),s=r(a)},function(t,e,n){"use strict";function r(t){return!t||(new Date).getTime()-t>o}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=6e4,u=["currentLogbookDate"];e.currentDate=u;var a=[u,["logbookEntriesUpdated"],function(t,e){return r(e.get(t))}];e.isCurrentStale=a;var s=[u,["logbookEntries"],function(t,e){return e.get(t)||(0,i.toImmutable)([])}];e.currentEntries=s;var c=["isLoadingLogbookEntries"];e.isLoadingEntries=c},function(t,e,n){"use strict";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){t.registerStores({currentLogbookDate:a["default"],isLoadingLogbookEntries:c["default"],logbookEntries:f["default"],logbookEntriesUpdated:p["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(159),a=i(u),s=n(160),c=i(s),l=n(161),f=i(l),d=n(162),p=i(d),h=n(155),v=r(h),_=n(156),y=r(_),m=v;e.actions=m;var g=y;e.getters=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),
|
||
Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},s=n(3),c=n(32),l=r(c),f=new s.Immutable.Record({when:null,name:null,message:null,domain:null,entityId:null},"LogbookEntry"),d=function(t){function e(t,n,r,o,u){i(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{when:t,name:n,message:r,domain:o,entityId:u})}return o(e,t),u(e,null,[{key:"fromJSON",value:function(t){var n=t.when,r=t.name,i=t.message,o=t.domain,u=t.entity_id;return new e((0,l["default"])(n),r,i,o,u)}}]),e}(f);e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.date;return(0,d["default"])(n)}function a(){return _.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(31),d=r(f),p=n(12),h=r(p),v=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,d["default"])(new Date)}},{key:"initialize",value:function(){this.on(h["default"].LOGBOOK_DATE_SELECTED,u),this.on(h["default"].LOG_OUT,a)}}]),e}(l.Store),_=new v;e["default"]=_,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},s=n(3),c=n(12),l=r(c),f=function(t){function e(){i(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),u(e,[{key:"getInitialState",value:function(){return!1}},{key:"initialize",value:function(){this.on(l["default"].LOGBOOK_ENTRIES_FETCH_START,function(){return!0}),this.on(l["default"].LOGBOOK_ENTRIES_FETCH_SUCCESS,function(){return!1}),this.on(l["default"].LOGBOOK_ENTRIES_FETCH_ERROR,function(){return!1}),this.on(l["default"].LOG_OUT,function(){return!1})}}]),e}(s.Store),d=new f;e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.date,r=e.entries;return t.set(n,(0,l.toImmutable)(r.map(h["default"].fromJSON)))}function a(){return _.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(12),d=r(f),p=n(158),h=r(p),v=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,l.toImmutable)({})}},{key:"initialize",value:function(){this.on(d["default"].LOGBOOK_ENTRIES_FETCH_SUCCESS,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),_=new v;e["default"]=_,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.date;return t.set(n,(new Date).getTime())}function a(){return h.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(12),d=r(f),p=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,l.toImmutable)({})}},{key:"initialize",value:function(){this.on(d["default"].LOGBOOK_ENTRIES_FETCH_SUCCESS,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),h=new p;e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){t.dispatch(a["default"].SELECT_ENTITY,{entityId:e})}function o(t){t.dispatch(a["default"].SELECT_ENTITY,{entityId:null})}Object.defineProperty(e,"__esModule",{value:!0}),e.selectEntity=i,e.deselectEntity=o;var u=n(51),a=r(u)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(63),o=r(i),u=n(8),a=n(49),s=["moreInfoEntityId"];e.currentEntityId=s;var c=[s,function(t){return null!==t}];e.hasCurrentEntityId=c;var l=[s,u.getters.entityMap,function(t,e){return e.get(t)||null}];e.currentEntity=l;var f=[s,a.getters.recentEntityHistoryMap,function(t,e){return e.get(t)}];e.currentEntityHistory=f;var d=[s,a.getters.recentEntityHistoryUpdatedMap,function(t,e){return(0,o["default"])(e.get(t))}];e.isCurrentEntityHistoryStale=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.entityId;return n}function a(){return h.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(51),d=r(f),p=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return null}},{key:"initialize",value:function(){this.on(d["default"].SELECT_ENTITY,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),h=new p;e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.pane;return n}function a(){return h.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(26),d=r(f),p=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return"states"}},{key:"initialize",value:function(){this.on(d["default"].NAVIGATE,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),h=new p;e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.show;return n}function a(){return h.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(26),d=r(f),p=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return!1}},{key:"initialize",value:function(){this.on(d["default"].SHOW_SIDEBAR,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),h=new p;e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return p[t.hassId]}function i(t){var e=void 0,n=void 0;"/"===location.pathname?e=n=t.evaluate(c.activePane):(e=location.pathname.substr(1),n=location.pathname,(0,l.navigate)(t,e)),history.replaceState({pane:e},d,n)}function o(t,e){var n=e.state.pane;t.evaluate(s.getters.hasCurrentEntityId)?(r(t).ignoreNextDeselectEntity=!0,s.actions.deselectEntity(t)):(0,l.navigate)(t,n)}function u(t){if(f){i(t);var e=t.observe(c.activePane,function(t){t!==history.state.pane&&history.pushState({pane:t},t,"/"+t)}),n=t.observe(s.getters.hasCurrentEntityId,function(t){t?history.pushState(history.state,d,location.pathname):u.ignoreNextDeselectEntity?u.ignoreNextDeselectEntity=!1:history.back()}),r=o.bind(null,t),u={unwatchNavigationObserver:e,unwatchMoreInfoObserver:n,popstateChangeListener:r,ignoreNextDeselectEntity:!1};p[t.hassId]=u,window.addEventListener("popstate",r)}}function a(t){if(f){var e=r(t);e&&(e.unwatchNavigationObserver(),e.unwatchMoreInfoObserver(),window.removeEventListener("popstate",e.popstateChangeListener),p[t.hassId]=!1)}}Object.defineProperty(e,"__esModule",{value:!0}),e.startSync=u,e.stopSync=a;var s=n(52),c=n(54),l=n(53),f=history.pushState&&!0,d="Home Assistant",p={}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){t.dispatch(u["default"].NOTIFICATION_CREATED,{message:e})}Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=i;var o=n(56),u=r(o)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=["notifications"];e.notificationMap=n;var r=[n,function(t){return t.last()}];e.lastNotificationMessage=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t,e){var n=e.message;return t.set(t.size,n)}function a(){return h.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(3),f=n(56),d=r(f),p=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return new l.Immutable.OrderedMap}},{key:"initialize",value:function(){this.on(d["default"].NOTIFICATION_CREATED,u),this.on(d["default"].LOG_OUT,a)}}]),e}(l.Store),h=new p;e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(173),o=r(i);e["default"]={localStoragePreferences:o["default"]},t.exports=e["default"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),i=n(28),o=n(55),u="localStorage"in window?localStorage:{},a={authToken:{getter:[r.getters.currentAuthToken,r.getters.rememberAuth,function(t,e){return e?t:null}],defaultValue:null},useStreaming:{getter:i.getters.useStreaming,defaultValue:!0},showSidebar:{getter:o.getters.showSidebar,defaultValue:!1}},s={};Object.keys(a).forEach(function(t){t in u||(u[t]=a[t].defaultValue),Object.defineProperty(s,t,{get:function(){return JSON.parse(u[t])}})}),s.startSync=function(t){Object.keys(a).forEach(function(e){var n=a[e].getter,r=function(t){u[e]=JSON.stringify(t)};t.observe(n,r),r(t.evaluate(n))})},e["default"]=s,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e={};return e.incrementData=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];o(e,t,r,n)},e.replaceData=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];o(e,t,f({},r,{replace:!0}),n)},t.fetch&&(e.fetch=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(p["default"].API_FETCH_START,{model:t,method:"fetch",params:n}),t.fetch(e,n).then(o.bind(null,e,t,n),u.bind(null,e,t,n))}),e.fetchAll=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(p["default"].API_FETCH_START,{model:t,method:"fetchAll",params:n}),t.fetchAll(e,n).then(o.bind(null,e,t,f({},n,{replace:!0})),u.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(p["default"].API_SAVE_START,{params:n}),t.save(e,n).then(a.bind(null,e,t,n),s.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(p["default"].API_DELETE_START,{params:n}),t["delete"](e,n).then(c.bind(null,e,t,n),l.bind(null,e,t,n))}),e}function o(t,e,n,r){return t.dispatch(p["default"].API_FETCH_SUCCESS,{model:e,params:n,result:r}),r}function u(t,e,n,r){return t.dispatch(p["default"].API_FETCH_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}function a(t,e,n,r){return t.dispatch(p["default"].API_SAVE_SUCCESS,{model:e,params:n,result:r}),r}function s(t,e,n,r){return t.dispatch(p["default"].API_SAVE_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}function c(t,e,n,r){return t.dispatch(p["default"].API_DELETE_SUCCESS,{model:e,params:n,result:r}),r}function l(t,e,n,r){return t.dispatch(p["default"].API_DELETE_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}Object.defineProperty(e,"__esModule",{value:!0});var f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e["default"]=i;var d=n(57),p=r(d);t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(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,(0,d.toImmutable)({})):t,a=(0,f["default"])(r)?r:[r],s=n.fromJSON||d.toImmutable;return u.withMutations(function(t){a.forEach(function(e){var n=s(e);t.setIn([o,n.id],n)})})}function a(t,e){var n=e.model,r=e.params;return t.removeIn([n.entity,r.id])}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},l=n(131),f=r(l),d=n(3),p=n(57),h=r(p),v=function(t){function e(){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"getInitialState",value:function(){return(0,d.toImmutable)({})}},{key:"initialize",value:function(){var t=this;this.on(h["default"].API_FETCH_SUCCESS,u),this.on(h["default"].API_SAVE_SUCCESS,u),this.on(h["default"].API_DELETE_SUCCESS,a),this.on(h["default"].LOG_OUT,function(){return t.getInitialState()})}}]),e}(d.Store),_=new v;e["default"]=_,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(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}var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=n(6),a=n(9),s=n(8),c=n(27),l=n(58),f=i(l),d=n(59),p=r(d),h=(0,a.createApiActions)(p["default"]);h.serviceRegistered=function(t,e,n){var r=t.evaluateToJS(f.byDomain(e));r?r.services.push(n):r={domain:e,services:[n]},h.incrementData(t,r)},h.callTurnOn=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return h.callService(t,"homeassistant","turn_on",o({},n,{entity_id:e}))},h.callTurnOff=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return h.callService(t,"homeassistant","turn_off",o({},n,{entity_id:e}))},h.callService=function(t,e,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];return(0,u.callApi)(t,"POST","services/"+e+"/"+n,r).then(function(i){"turn_on"===n&&r.entity_id?c.actions.createNotification(t,"Turned on "+r.entity_id+"."):"turn_off"===n&&r.entity_id?c.actions.createNotification(t,"Turned off "+r.entity_id+"."):c.actions.createNotification(t,"Service "+e+"/"+n+" called."),s.actions.incrementData(t,i)})},t.exports=h},function(t,e){"use strict";function n(t,e){if("lock"===t)return!0;var n=e.get(t);return!!n&&n.services.has("turn_on")}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return"group"===t.domain?"on"===t.state||"off"===t.state:(0,u["default"])(t.domain,e)}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i;var o=n(177),u=r(o);t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=_[t.hassId];e&&(e.scheduleHealthCheck.cancel(),e.source.close(),_[t.hassId]=!1)}function o(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.syncOnInitialConnect,r=void 0===n?!0:n;i(t);var u=(0,s["default"])(o.bind(null,t),v),a=t.evaluate(c.getters.authToken),f=new EventSource("/api/stream?api_password="+a+"&restrict=state_changed,component_loaded,service_registered"),p=r;_[t.hassId]={source:f,scheduleHealthCheck:u},f.addEventListener("open",function(){u(),t.batch(function(){t.dispatch(d["default"].STREAM_START),l.actions.stop(t),p?l.actions.fetchAll(t):p=!0})},!1),f.addEventListener("message",function(e){u(),"ping"!==e.data&&(0,h["default"])(t,JSON.parse(e.data))},!1),f.addEventListener("error",function(){u(),f.readyState!==EventSource.CLOSED&&t.dispatch(d["default"].STREAM_ERROR)},!1)}function u(t){i(t),t.batch(function(){t.dispatch(d["default"].STREAM_STOP),l.actions.start(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.start=o,e.stop=u;var a=n(43),s=r(a),c=n(15),l=n(30),f=n(60),d=r(f),p=n(181),h=r(p),v=6e4,_={}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=["streamStatus","isStreaming"];e.isStreamingEvents=n;var r=["streamStatus","isSupported"];e.isSupported=r;var i=["streamStatus","useStreaming"];e.useStreaming=i;var o=["streamStatus","hasError"];e.hasStreamingEventsError=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(24),o=n(13);e["default"]=function(t,e){switch(e.event_type){case"state_changed":r.actions.incrementData(t,e.data.new_state);break;case"component_loaded":i.actions.componentLoaded(t,e.data.component);break;case"service_registered":o.actions.serviceRegistered(t,e.data.domain,e.data.service)}},t.exports=e["default"]},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="object"==typeof window&&"EventSource"in window,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t){return t.withMutations(function(t){t.set("isStreaming",!0).set("useStreaming",!0).set("hasError",!1)})}function a(t){return t.withMutations(function(t){t.set("isStreaming",!1).set("useStreaming",!1).set("hasError",!1)})}function s(t){return t.withMutations(function(t){t.set("isStreaming",!1).set("hasError",!0)})}function c(){return m.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},d=n(3),p=n(60),h=r(p),v=n(182),_=r(v),y=function(t){function e(){i(this,e),f(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),l(e,[{key:"getInitialState",value:function(){return(0,d.toImmutable)({isSupported:_["default"],isStreaming:!1,useStreaming:!0,hasError:!1})}},{key:"initialize",value:function(){this.on(h["default"].STREAM_START,u),this.on(h["default"].STREAM_STOP,a),this.on(h["default"].STREAM_ERROR,s),this.on(h["default"].LOG_OUT,c)}}]),e}(d.Store),m=new y;e["default"]=m,t.exports=e["default"]},function(t,e,n){"use strict";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){return t.evaluate(_.isSyncScheduled)}function u(t){o(t)&&(t.hassId in w||(w[t.hassId]=(0,d["default"])(s.bind(null,t),S)),w[t.hassId]())}function a(t){var e=w[t.hassId];e&&e.cancel()}function s(t){return t.dispatch(h["default"].API_FETCH_ALL_START,{}),(0,y.callApi)(t,"GET","bootstrap").then(function(e){t.batch(function(){m.actions.replaceData(t,e.states),g.actions.replaceData(t,e.services),b.actions.replaceData(t,e.events),O.actions.configLoaded(t,e.config),t.dispatch(h["default"].API_FETCH_ALL_SUCCESS,{})}),u(t)},function(e){return t.dispatch(h["default"].API_FETCH_ALL_FAIL,{message:e}),u(t),Promise.reject(e)})}function c(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.skipInitialSync,r=void 0===n?!1:n;t.dispatch(h["default"].SYNC_SCHEDULED),r?u(t):s(t)}function l(t){t.dispatch(h["default"].SYNC_SCHEDULE_CANCELLED),a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.fetchAll=s,e.start=c,e.stop=l;var f=n(43),d=i(f),p=n(29),h=i(p),v=n(61),_=r(v),y=n(6),m=n(8),g=n(13),b=n(25),O=n(24),S=3e4,w={}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},s=n(3),c=n(29),l=r(c),f=function(t){function e(){i(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),u(e,[{key:"getInitialState",value:function(){return!0}},{key:"initialize",value:function(){this.on(l["default"].API_FETCH_ALL_START,function(){return!0}),this.on(l["default"].API_FETCH_ALL_SUCCESS,function(){return!1}),this.on(l["default"].API_FETCH_ALL_FAIL,function(){return!1}),this.on(l["default"].LOG_OUT,function(){return!1})}}]),e}(s.Store),d=new f;e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},s=n(3),c=n(29),l=r(c),f=function(t){function e(){i(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),u(e,[{key:"getInitialState",value:function(){return!1}},{key:"initialize",value:function(){this.on(l["default"].SYNC_SCHEDULED,function(){return!0}),this.on(l["default"].SYNC_SCHEDULE_CANCELLED,function(){return!1}),this.on(l["default"].LOG_OUT,function(){return!1})}}]),e}(s.Store),d=new f;e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){
|
||
return d[t.hassId]}function o(t){var e=i(t);if(e){var n=e.finalTranscript||e.interimTranscript;t.dispatch(f["default"].VOICE_TRANSMITTING,{finalTranscript:n}),c.actions.callService(t,"conversation","process",{text:n}).then(function(){t.dispatch(f["default"].VOICE_DONE)},function(){t.dispatch(f["default"].VOICE_ERROR)})}}function u(t){var e=i(t);e&&(e.recognition.stop(),d[t.hassId]=!1)}function a(t){o(t),u(t)}function s(t){var e=a.bind(null,t);e();var n=new webkitSpeechRecognition;d[t.hassId]={recognition:n,interimTranscript:"",finalTranscript:""},n.interimResults=!0,n.onstart=function(){return t.dispatch(f["default"].VOICE_START)},n.onerror=function(){return t.dispatch(f["default"].VOICE_ERROR)},n.onend=e,n.onresult=function(e){var n=i(t);if(n){for(var r="",o="",u=e.resultIndex;u<e.results.length;u++)e.results[u].isFinal?r+=e.results[u][0].transcript:o+=e.results[u][0].transcript;n.interimTranscript=o,n.finalTranscript+=r,t.dispatch(f["default"].VOICE_RESULT,{interimTranscript:o,finalTranscript:n.finalTranscript})}},n.start()}Object.defineProperty(e,"__esModule",{value:!0}),e.stop=u,e.finish=a,e.listen=s;var c=n(13),l=n(62),f=r(l),d={}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=["isVoiceSupported"];e.isVoiceSupported=n;var r=["currentVoiceCommand","isListening"];e.isListening=r;var i=["currentVoiceCommand","isTransmitting"];e.isTransmitting=i;var o=["currentVoiceCommand","interimTranscript"];e.interimTranscript=o;var u=["currentVoiceCommand","finalTranscript"];e.finalTranscript=u;var a=[o,u,function(t,e){return t.slice(e.length)}];e.extraInterimTranscript=a},function(t,e,n){"use strict";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){t.registerStores({currentVoiceCommand:c["default"],isVoiceSupported:a["default"]})}Object.defineProperty(e,"__esModule",{value:!0}),e.register=o;var u=n(191),a=i(u),s=n(190),c=i(s),l=n(187),f=r(l),d=n(188),p=r(d),h=f;e.actions=h;var v=p;e.getters=v},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 u(t){return t.set("isListening",!0)}function a(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 s(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 c(){return m.getInitialState()}function l(){return m.getInitialState()}function f(){return m.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var d=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),p=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},h=n(3),v=n(62),_=r(v),y=function(t){function e(){i(this,e),p(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),d(e,[{key:"getInitialState",value:function(){return(0,h.toImmutable)({isListening:!1,isTransmitting:!1,interimTranscript:"",finalTranscript:""})}},{key:"initialize",value:function(){this.on(_["default"].VOICE_START,u),this.on(_["default"].VOICE_RESULT,a),this.on(_["default"].VOICE_TRANSMITTING,s),this.on(_["default"].VOICE_DONE,c),this.on(_["default"].VOICE_ERROR,l),this.on(_["default"].LOG_OUT,f)}}]),e}(h.Store),m=new y;e["default"]=m,t.exports=e["default"]},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;r=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;if(void 0===s)return;return s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return;t=c,e=o,n=u,r=!0,a=c=void 0}},a=n(3),s=function(t){function e(){r(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return i(e,t),o(e,[{key:"getInitialState",value:function(){return"webkitSpeechRecognition"in window}}]),e}(a.Store),c=new s;e["default"]=c,t.exports=e["default"]},function(t,e,n){"use strict";function r(){var t=new i.Reactor({debug:!1});return t.hassId=o++,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r;var i=n(3),o=0;t.exports=e["default"]},function(t,e,n){"use strict";function r(t,e){return(0,i.toImmutable)(t.attributes.entity_id.map(function(t){return e.get(t)}).filter(function(t){return!!t}))}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r;var i=n(3);t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){Object.keys(n).forEach(function(r){var i=n[r];"register"in i&&i.register(e),"getters"in i&&Object.defineProperty(t,r+"Getters",{value:i.getters,enumerable:!0}),"actions"in i&&!function(){var n={};Object.getOwnPropertyNames(i.actions).forEach(function(t){(0,u["default"])(i.actions[t])&&Object.defineProperty(n,t,{value:i.actions[t].bind(null,e),enumerable:!0})}),Object.defineProperty(t,r+"Actions",{value:n,enumerable:!0})}()})}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i;var o=n(46),u=r(o);t.exports=e["default"]},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={UNIT_TEMP_C:"°C",UNIT_TEMP_F:"°F"},t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(31),o=r(i),u=n(193),a=r(u),s=n(63),c=r(s),l=n(32),f=r(l),d=n(195),p=r(d);e["default"]={dateToStr:o["default"],expandGroup:a["default"],isStaleTime:c["default"],parseDateTime:f["default"],temperatureUnits:p["default"]},t.exports=e["default"]},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){"use strict";function n(){c=!1,u.length?s=u.concat(s):l=-1,s.length&&r()}function r(){if(!c){var t=setTimeout(n);c=!0;for(var e=s.length;e;){for(u=s,s=[];++l<e;)u&&u[l].run();l=-1,e=s.length}u=null,c=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var u,a=t.exports={},s=[],c=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new i(t,e)),1!==s.length||c||setTimeout(r,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){function n(t){throw new Error("Cannot find module '"+t+"'.")}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id=199},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){}]);</script></body></html> |