function t(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */}const e=window,n=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),r=new WeakMap;let o=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(n&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&r.set(e,t))}return t}toString(){return this.cssText}};const s=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[i+1]),t[0]);return new o(n,t,i)},a=n?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,i))(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */;var l;const u=window,c=u.trustedTypes,h=c?c.emptyScript:"",d=u.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},f=(t,e)=>e!==t&&(e==e||t==t),m={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:f};let g=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,n)=>{const i=this._$Ep(n,e);void 0!==i&&(this._$Ev.set(i,n),t.push(i))})),t}static createProperty(t,e=m){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,n,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||m}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{n?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((n=>{const i=document.createElement("style"),r=e.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=m){var i;const r=this.constructor._$Ep(t,n);if(void 0!==r&&!0===n.reflect){const o=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:p).toAttribute(e,n.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var n;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:p;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let i=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||f)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var _;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:g}),(null!==(l=u.reactiveElementVersions)&&void 0!==l?l:u.reactiveElementVersions=[]).push("1.4.2");const v=window,y=v.trustedTypes,x=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,b=`lit$${(Math.random()+"").slice(9)}$`,w="?"+b,T=`<${w}>`,A=document,C=(t="")=>A.createComment(t),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S=/-->/g,L=/>/g,$=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),O=/'/g,P=/"/g,D=/^(?:script|style|textarea|title)$/i,R=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),N=R(1),z=R(2),F=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),B=new WeakMap,V=A.createTreeWalker(A,129,null,!1),j=(t,e)=>{const n=t.length-1,i=[];let r,o=2===e?"":"",s=E;for(let e=0;e"===l[0]?(s=null!=r?r:E,u=-1):void 0===l[1]?u=-2:(u=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?$:'"'===l[3]?P:O):s===P||s===O?s=$:s===S||s===L?s=E:(s=$,r=void 0);const h=s===$&&t[e+1].startsWith("/>")?" ":"";o+=s===E?n+T:u>=0?(i.push(a),n.slice(0,u)+"$lit$"+n.slice(u)+b+h):n+b+(-2===u?(i.push(void 0),e):h)}const a=o+(t[n]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(a):a,i]};class X{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[l,u]=j(t,e);if(this.el=X.createElement(l,n),V.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=V.nextNode())&&a.length0){i.textContent=y?y.emptyScript:"";for(let n=0;nk(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==I&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){var e;const{values:n,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=X.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(n);else{const t=new H(r,this),e=t.v(this.options);t.p(n),this.T(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new X(t)),e}k(t){k(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const r of t)i===e.length?e.push(n=new U(this.O(C()),this.O(C()),this,this.options)):n=e[i],n._$AI(r),i++;i2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,i){const r=this.strings;let o=!1;if(void 0===r)t=Y(this,t,e,0),o=!M(t)||t!==this._$AH&&t!==F,o&&(this._$AH=t);else{const i=t;let s,a;for(t=r[0],s=0;s{var i,r;const o=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new U(e.insertBefore(C(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return F}}nt.finalized=!0,nt._$litElement$=!0,null===(tt=globalThis.litElementHydrateSupport)||void 0===tt||tt.call(globalThis,{LitElement:nt});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:nt}),(null!==(et=globalThis.litElementVersions)&&void 0!==et?et:globalThis.litElementVersions=[]).push("3.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const rt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:n,elements:i}=e;return{kind:n,elements:i,finisher(e){customElements.define(t,e)}}})(t,e) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */,ot=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,t)}};function st(t){return(e,n)=>void 0!==n?((t,e,n)=>{e.constructor.createProperty(n,t)})(t,e,n):ot(t,e) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */}function at(t){return st({...t,state:!0})} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var lt;null===(lt=window.HTMLSlotElement)||void 0===lt||lt.prototype.assignedElements; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const ut=1;class ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const ht=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends ct{constructor(t){var e;if(super(t),t.type!==ut||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var n,i;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(n=this.st)||void 0===n?void 0:n.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const t in e){const n=!!e[t];n===this.nt.has(t)||(null===(i=this.st)||void 0===i?void 0:i.has(t))||(n?(r.add(t),this.nt.add(t)):(r.remove(t),this.nt.delete(t)))}return F}});var dt="M8.5 4.5L5.4 9.5L8.5 14.7L5.2 20.5L3.4 19.6L6.1 14.7L3 9.5L6.7 3.6L8.5 4.5M14.7 4.4L11.6 9.5L14.7 14.5L11.4 20.3L9.6 19.4L12.3 14.5L9.2 9.5L12.9 3.5L14.7 4.4M21 4.4L17.9 9.5L21 14.5L17.7 20.3L15.9 19.4L18.6 14.5L15.5 9.5L19.2 3.5L21 4.4",pt="M10 2L7.6 5.4C8.4 5.2 9.2 5 10 5C10.8 5 11.6 5.2 12.4 5.4M19 5C17.89 5 17 5.89 17 7V13.76C16.36 14.33 16 15.15 16 16C16 17.66 17.34 19 19 19C20.66 19 22 17.66 22 16C22 15.15 21.64 14.33 21 13.77V7C21 5.89 20.11 5 19 5M19 6C19.55 6 20 6.45 20 7V8H18V7C18 6.45 18.45 6 19 6M5.5 6.7L1.3 7L3.1 10.8C3.2 10 3.5 9.2 3.9 8.5C4.4 7.8 4.9 7.2 5.5 6.7M10 7C7.2 7 5 9.2 5 12C5 14.8 7.2 17 10 17C12.8 17 15 14.8 15 12C15 9.2 12.8 7 10 7M3.2 13.2L1.4 17L5.5 17.4C5 16.9 4.4 16.2 4 15.5C3.5 14.8 3.3 14 3.2 13.2M7.6 18.6L10 22L12.4 18.6C11.6 18.8 10.8 19 10 19C9.1 19 8.3 18.8 7.6 18.6Z",ft="M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",mt="M21 20V2H3V20H1V23H23V20M19 4V11H17V4M5 4H7V11H5M5 20V13H7V20M9 20V4H15V20M17 20V13H19V20Z";var gt={version:"version",current:"current"},_t={card:{climate:{disable_window:"Disable window",disable_summer:"Disable summer",disable_eco:"Disable eco",disable_heat:"Disable heat",disable_off:"Disable off",eco_temperature:"Eco temperature",set_current_as_main:"Swap target with current temperature places"}}},vt={window_open:"Window open",night_mode:"Night mode",eco:"Eco",summer:"Summer"},yt={common:gt,editor:_t,extra_states:vt},xt=Object.freeze({__proto__:null,common:gt,editor:_t,extra_states:vt,default:yt}),bt={version:"Version",current:"Aktuell"},wt={card:{climate:{disable_window:"Fenster-offen-Anzeige deaktivieren",disable_summer:"Sommer-Anzeige deaktivieren",disable_eco:"Eco-Anzeige deaktivieren",disable_heat:"Heiz-Anzeige deaktivieren",disable_off:"Aus-Anzeige deaktivieren",eco_temperature:"Eco Temperatur",set_current_as_main:"Zieltemperatur mit aktueller Temperatur tauschen"}}},Tt={window_open:"Fenster offen",night_mode:"Nachtmodus",eco:"Eco",summer:"Sommer"},At={common:bt,editor:wt,extra_states:Tt},Ct=Object.freeze({__proto__:null,common:bt,editor:wt,extra_states:Tt,default:At}),Mt={version:"version",current:"Actuel"},kt={window_open:"Fenêtre ouverte",night_mode:"Mode nuit",eco:"Eco",summer:"Été"},Et={common:Mt,extra_states:kt},St=Object.freeze({__proto__:null,common:Mt,extra_states:kt,default:Et}),Lt={version:"версия",current:"текущий"},$t={window_open:"Окно открыто",night_mode:"Ночной режим",eco:"Эко",summer:"Лето"},Ot={common:Lt,extra_states:$t},Pt=Object.freeze({__proto__:null,common:Lt,extra_states:$t,default:Ot}),Dt={version:"wersja",current:"aktualna"},Rt={window_open:"otwarte okno",night_mode:"tryb nocny",eco:"tryb ekonomiczny",summer:"lato"},Nt={common:Dt,extra_states:Rt},zt=Object.freeze({__proto__:null,common:Dt,extra_states:Rt,default:Nt}),Ft={version:"verzia",current:"aktuálny"},It={window_open:"Okno otvorené",night_mode:"Nočný mód",eco:"Eco",summer:"Leto"},Bt={common:Ft,extra_states:It},Vt={version:"Verzió",current:"Aktuális"},jt={window_open:"Ablak nyitva",night_mode:"Éjszakai mód",eco:"Eco",summer:"Nyár"},Xt={common:Vt,extra_states:jt},Yt={version:"version",current:"nuværende"},Ht={window_open:"Vindue åben",night_mode:"Nattilstand",eco:"Eco",summer:"Sommer"},Ut={common:Yt,extra_states:Ht},Wt={version:"version",current:"Actual"},qt={window_open:"Ventana abierta",night_mode:"Modo noche",eco:"Eco",summer:"Verano"},Zt={common:Wt,extra_states:qt},Gt={version:"versiyon",current:"şimdiki"},Kt={window_open:"Pencere açık",night_mode:"Gece modu",eco:"Eco",summer:"Yaz"},Qt={common:Gt,extra_states:Kt},Jt={version:"versione",current:"Corrente"},te={window_open:"Finestra aperta",night_mode:"Modalità notturna",eco:"Eco",summer:"Estate"},ee={common:Jt,extra_states:te},ne={version:"versão",current:"actual"},ie={card:{climate:{disable_window:"Desactivar Janela",disable_summer:"Desactivar Verão",disable_eco:"Desactivar Eco",disable_heat:"Desactivar Aquecimento",disable_off:"Desactivar Off",eco_temperature:"Modo Eco",set_current_as_main:"Mudar para a temperatura local actual"}}},re={window_open:"Janela Aberta",night_mode:"Modo Noturno",eco:"Eco",summer:"Verão"},oe={common:ne,editor:ie,extra_states:re},se={version:"版本",current:"当前"},ae={window_open:"窗户打开",night_mode:"夜间模式",eco:"节能",summer:"夏季"},le={common:se,extra_states:ae},ue={version:"версія",current:"поточний"},ce={window_open:"Вікно відчинено",night_mode:"Нічний режим",eco:"Економія",summer:"Літо"},he={common:ue,extra_states:ce},de={version:"έκδοση",current:"τρέχουσα"},pe={window_open:"Παράθυρο ανοικτό",night_mode:"Λειτουργία νυκτός",eco:"Εξοικονόμηση",summer:"Καλοκαίρι"},fe={common:de,extra_states:pe},me={version:"versie",current:"huidig"},ge={window_open:"Raam open",night_mode:"Nacht modus",eco:"Eco",summer:"Zomer"},_e={common:me,extra_states:ge},ve={version:"versjon",current:"nåværende"},ye={window_open:"Vindu åpent",night_mode:"Nattmodus",eco:"Eco",summer:"Sommer"},xe={common:ve,extra_states:ye},be={version:"verze",current:"aktuální"},we={window_open:"Otevřené okno",night_mode:"Noční režim",eco:"Eco",summer:"Léto"},Te={common:be,extra_states:we},Ae={version:"različica",current:"trenutno"},Ce={window_open:"Okno odprto",night_mode:"Nočni način",eco:"Eko",summer:"Poletje"},Me={common:Ae,extra_states:Ce},ke={version:"version",current:"Nuvarande"},Ee={window_open:"Fönster öppet",night_mode:"Nattläge",eco:"Eco",summer:"Sommar"},Se={common:ke,extra_states:Ee},Le={version:"версия",currrent:"текущий"},$e={window_open:"Отворен прозорец",night_mode:"Нощен режим",eco:"Екологичен режим",summer:"Лято"},Oe={common:Le,extra_states:$e},Pe={version:"version",current:"Nykyinen"},De={window_open:"Ikkuna auki",night_mode:"Yötila",eco:"Eco",summer:"Kesä"},Re={common:Pe,extra_states:De},Ne={version:"versiune",current:"curent"},ze={window_open:"Fereastră deschisă",night_mode:"Mod noapte",eco:"Eco",summer:"Vară"},Fe={common:Ne,extra_states:ze},Ie={version:"versió",current:"Actual"},Be={window_open:"Finestra oberta",night_mode:"Mode nocturn",eco:"Eco",summer:"Estiu"},Ve={common:Ie,extra_states:Be};const je={en:xt,de:Ct,fr:St,ru:Pt,sk:Object.freeze({__proto__:null,common:Ft,extra_states:It,default:Bt}),hu:Object.freeze({__proto__:null,common:Vt,extra_states:jt,default:Xt}),pl:zt,da:Object.freeze({__proto__:null,common:Yt,extra_states:Ht,default:Ut}),es:Object.freeze({__proto__:null,common:Wt,extra_states:qt,default:Zt}),tr:Object.freeze({__proto__:null,common:Gt,extra_states:Kt,default:Qt}),it:Object.freeze({__proto__:null,common:Jt,extra_states:te,default:ee}),pt:Object.freeze({__proto__:null,common:ne,editor:ie,extra_states:re,default:oe}),cn:Object.freeze({__proto__:null,common:se,extra_states:ae,default:le}),uk:Object.freeze({__proto__:null,common:ue,extra_states:ce,default:he}),el:Object.freeze({__proto__:null,common:de,extra_states:pe,default:fe}),nl:Object.freeze({__proto__:null,common:me,extra_states:ge,default:_e}),no:Object.freeze({__proto__:null,common:ve,extra_states:ye,default:xe}),cs:Object.freeze({__proto__:null,common:be,extra_states:we,default:Te}),sl:Object.freeze({__proto__:null,common:Ae,extra_states:Ce,default:Me}),sv:Object.freeze({__proto__:null,common:ke,extra_states:Ee,default:Se}),bg:Object.freeze({__proto__:null,common:Le,extra_states:$e,default:Oe}),fi:Object.freeze({__proto__:null,common:Pe,extra_states:De,default:Re}),ro:Object.freeze({__proto__:null,common:Ne,extra_states:ze,default:Fe}),ca:Object.freeze({__proto__:null,common:Ie,extra_states:Be,default:Ve})};function Xe({hass:t,string:e,search:n="",replace:i=""}){var r;const o=null!==(r=null==t?void 0:t.locale.language)&&void 0!==r?r:"en";let s;try{s=e.split(".").reduce(((t,e)=>t[e]),je[o])}catch(t){s=e.split(".").reduce(((t,e)=>t[e]),je.en)}return void 0===s&&(s=e.split(".").reduce(((t,e)=>t[e]),je.en)),""!==n&&""!==i&&(s=s.replace(n,i)),s}function Ye(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),je[e])}catch(t){return}}var He,Ue,We=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function qe(t,e){if(t.length!==e.length)return!1;for(var n=0;nnew Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric"}))),Ze((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric"}))),Ze((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"numeric",day:"numeric"}))),Ze((t=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short"}))),Ze((t=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric"}))),Ze((t=>new Intl.DateTimeFormat(t.language,{month:"long"}))),Ze((t=>new Intl.DateTimeFormat(t.language,{year:"numeric"}))),function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(He||(He={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(Ue||(Ue={}));const Ge=Ze((t=>{if(t.time_format===Ue.language||t.time_format===Ue.system){const e=t.time_format===Ue.language?t.language:void 0,n=(new Date).toLocaleString(e);return n.includes("AM")||n.includes("PM")}return t.time_format===Ue.am_pm}));Ze((t=>new Intl.DateTimeFormat("en"!==t.language||Ge(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:Ge(t)?"numeric":"2-digit",minute:"2-digit",hour12:Ge(t)}))),Ze((t=>new Intl.DateTimeFormat("en"!==t.language||Ge(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:Ge(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:Ge(t)}))),Ze((t=>new Intl.DateTimeFormat("en"!==t.language||Ge(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",hour12:Ge(t)}))),Ze((t=>new Intl.DateTimeFormat("en"!==t.language||Ge(t)?t.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:Ge(t)}))),Ze((t=>new Intl.DateTimeFormat("en"!==t.language||Ge(t)?t.language:"en-u-hc-h23",{hour:Ge(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:Ge(t)}))),Ze((t=>new Intl.DateTimeFormat("en"!==t.language||Ge(t)?t.language:"en-u-hc-h23",{weekday:"long",hour:Ge(t)?"numeric":"2-digit",minute:"2-digit",hour12:Ge(t)})));const Ke=(t,e,n,i)=>{i=i||{},n=null==n?{}:n;const r=new Event(e,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return r.detail=n,t.dispatchEvent(r),r},Qe=(t,e,n)=>{const i=e?(t=>{switch(t.number_format){case He.comma_decimal:return["en-US","en"];case He.decimal_comma:return["de","es","it"];case He.space_comma:return["fr","sv","cs"];case He.system:return;default:return t.language}})(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==He.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(i,Je(t,n)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,Je(t,n)).format(Number(t))}return"string"==typeof t?t:`${((t,e=2)=>Math.round(t*10**e)/10**e)(t,null==n?void 0:n.maximumFractionDigits).toString()}${"currency"===(null==n?void 0:n.style)?` ${n.currency}`:""}`},Je=(t,e)=>{const n=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return n;if(!e||!e.minimumFractionDigits&&!e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;n.minimumFractionDigits=e,n.maximumFractionDigits=e}return n};class tn extends TypeError{constructor(t,e){let n;const{message:i,...r}=t,{path:o}=t;super(0===o.length?i:"At path: "+o.join(".")+" -- "+i),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,r),this.name=this.constructor.name,this.failures=()=>{var i;return null!=(i=n)?i:n=[t,...e()]}}}function en(t){return"object"==typeof t&&null!=t}function nn(t){return"string"==typeof t?JSON.stringify(t):""+t}function rn(t,e,n,i){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:r,branch:o}=e,{type:s}=n,{refinement:a,message:l="Expected a value of type `"+s+"`"+(a?" with refinement `"+a+"`":"")+", but received: `"+nn(i)+"`"}=t;return{value:i,type:s,refinement:a,key:r[r.length-1],path:r,branch:o,...t,message:l}}function*on(t,e,n,i){(function(t){return en(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const r of t){const t=rn(r,e,n,i);t&&(yield t)}}function*sn(t,e,n){void 0===n&&(n={});const{path:i=[],branch:r=[t],coerce:o=!1,mask:s=!1}=n,a={path:i,branch:r};if(o&&(t=e.coercer(t,a),s&&"type"!==e.type&&en(e.schema)&&en(t)&&!Array.isArray(t)))for(const n in t)void 0===e.schema[n]&&delete t[n];let l=!0;for(const n of e.validator(t,a))l=!1,yield[n,void 0];for(let[n,u,c]of e.entries(t,a)){const e=sn(u,c,{path:void 0===n?i:[...i,n],branch:void 0===n?r:[...r,u],coerce:o,mask:s});for(const i of e)i[0]?(l=!1,yield[i[0],void 0]):o&&(u=i[1],void 0===n?t=u:t instanceof Map?t.set(n,u):t instanceof Set?t.add(u):en(t)&&(t[n]=u))}if(l)for(const n of e.refiner(t,a))l=!1,yield[n,void 0];l&&(yield[void 0,t])}class an{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:e,schema:n,validator:i,refiner:r,coercer:o=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=n,this.entries=s,this.coercer=o,this.validator=i?(t,e)=>on(i(t,e),e,this,t):()=>[],this.refiner=r?(t,e)=>on(r(t,e),e,this,t):()=>[]}assert(t){return ln(t,this)}create(t){return function(t,e){const n=un(t,e,{coerce:!0});if(n[0])throw n[0];return n[1]}(t,this)}is(t){return function(t,e){return!un(t,e)[0]}(t,this)}mask(t){return function(t,e){const n=un(t,e,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(t,this)}validate(t,e){return void 0===e&&(e={}),un(t,this,e)}}function ln(t,e){const n=un(t,e);if(n[0])throw n[0]}function un(t,e,n){void 0===n&&(n={});const i=sn(t,e,n),r=function(t){const{done:e,value:n}=t.next();return e?void 0:n}(i);if(r[0]){const t=new tn(r[0],(function*(){for(const t of i)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,r[1]]}function cn(t,e){return new an({type:t,schema:null,validator:e})}function hn(t){return new an({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[n,i]of e.entries())yield[n,i,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: "+nn(t)})}function dn(){return cn("boolean",(t=>"boolean"==typeof t))}function pn(t){const e=nn(t),n=typeof t;return new an({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?t:null,validator:n=>n===t||"Expected the literal `"+e+"`, but received: "+nn(n)})}function fn(){return cn("number",(t=>"number"==typeof t&&!isNaN(t)||"Expected a number, but received: "+nn(t)))}function mn(t){const e=t?Object.keys(t):[],n=cn("never",(()=>!1));return new an({type:"object",schema:t||null,*entries(i){if(t&&en(i)){const r=new Set(Object.keys(i));for(const n of e)r.delete(n),yield[n,i[n],t[n]];for(const t of r)yield[t,i[t],n]}},validator:t=>en(t)||"Expected an object, but received: "+nn(t),coercer:t=>en(t)?{...t}:t})}function gn(t){return new an({...t,validator:(e,n)=>void 0===e||t.validator(e,n),refiner:(e,n)=>void 0===e||t.refiner(e,n)})}function _n(){return cn("string",(t=>"string"==typeof t||"Expected a string, but received: "+nn(t)))}function vn(t){const e=Object.keys(t);return new an({type:"type",schema:t,*entries(n){if(en(n))for(const i of e)yield[i,n[i],t[i]]},validator:t=>en(t)||"Expected an object, but received: "+nn(t)})}function yn(t){const e=t.map((t=>t.type)).join(" | ");return new an({type:"union",schema:null,coercer(e,n){const i=t.find((t=>{const[n]=t.validate(e,{coerce:!0});return!n}))||cn("unknown",(()=>!0));return i.coercer(e,n)},validator(n,i){const r=[];for(const e of t){const[...t]=sn(n,e,i),[o]=t;if(!o[0])return[];for(const[e]of t)e&&r.push(e)}return["Expected the value to satisfy a union of `"+e+"`, but received: "+nn(n),...r]}})}const xn=mn({user:_n()}),bn=yn([dn(),mn({text:gn(_n()),excemptions:gn(hn(xn))})]),wn=mn({action:pn("url"),url_path:_n(),confirmation:gn(bn)}),Tn=mn({action:pn("call-service"),service:_n(),service_data:gn(mn()),data:gn(mn()),target:gn(mn({entity_id:gn(yn([_n(),hn(_n())])),device_id:gn(yn([_n(),hn(_n())])),area_id:gn(yn([_n(),hn(_n())]))})),confirmation:gn(bn)}),An=mn({action:pn("navigate"),navigation_path:_n(),confirmation:gn(bn)}),Cn=vn({action:pn("fire-dom-event")}),Mn=mn({action:function(t){const e={},n=t.map((t=>nn(t))).join();for(const n of t)e[n]=n;return new an({type:"enums",schema:e,validator:e=>t.includes(e)||"Expected one of `"+n+"`, but received: "+nn(e)})}(["none","toggle","more-info","call-service","url","navigate"]),confirmation:gn(bn)});var kn;kn=t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":return Tn;case"fire-dom-event":return Cn;case"navigate":return An;case"url":return wn}return Mn},new an({type:"dynamic",schema:null,*entries(t,e){const n=kn(t,e);yield*n.entries(t,e)},validator:(t,e)=>kn(t,e).validator(t,e),coercer:(t,e)=>kn(t,e).coercer(t,e),refiner:(t,e)=>kn(t,e).refiner(t,e)}),s` #sortable a:nth-of-type(2n) paper-icon-item { animation-name: keyframes1; animation-iteration-count: infinite; transform-origin: 50% 10%; animation-delay: -0.75s; animation-duration: 0.25s; } #sortable a:nth-of-type(2n-1) paper-icon-item { animation-name: keyframes2; animation-iteration-count: infinite; animation-direction: alternate; transform-origin: 30% 5%; animation-delay: -0.5s; animation-duration: 0.33s; } #sortable a { height: 48px; display: flex; } #sortable { outline: none; display: block !important; } .hidden-panel { display: flex !important; } .sortable-fallback { display: none; } .sortable-ghost { opacity: 0.4; } .sortable-fallback { opacity: 0; } @keyframes keyframes1 { 0% { transform: rotate(-1deg); animation-timing-function: ease-in; } 50% { transform: rotate(1.5deg); animation-timing-function: ease-out; } } @keyframes keyframes2 { 0% { transform: rotate(1deg); animation-timing-function: ease-in; } 50% { transform: rotate(-1.5deg); animation-timing-function: ease-out; } } .show-panel, .hide-panel { display: none; position: absolute; top: 0; right: 4px; --mdc-icon-button-size: 40px; } :host([rtl]) .show-panel { right: initial; left: 4px; } .hide-panel { top: 4px; right: 8px; } :host([rtl]) .hide-panel { right: initial; left: 8px; } :host([expanded]) .hide-panel { display: block; } :host([expanded]) .show-panel { display: inline-flex; } paper-icon-item.hidden-panel, paper-icon-item.hidden-panel span, paper-icon-item.hidden-panel ha-icon[slot="item-icon"] { color: var(--secondary-text-color); cursor: pointer; } `;function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sn(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e} /*! * GSAP 3.11.3 * https://greensock.com * * @license Copyright 2008-2022, GreenSock. All rights reserved. * Subject to the terms at https://greensock.com/standard-license or for * Club GreenSock members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */var Ln,$n,On,Pn,Dn,Rn,Nn,zn,Fn,In,Bn,Vn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},jn={duration:.5,overwrite:!1,delay:0},Xn=2*Math.PI,Yn=Xn/4,Hn=0,Un=Math.sqrt,Wn=Math.cos,qn=Math.sin,Zn=function(t){return"string"==typeof t},Gn=function(t){return"function"==typeof t},Kn=function(t){return"number"==typeof t},Qn=function(t){return void 0===t},Jn=function(t){return"object"==typeof t},ti=function(t){return!1!==t},ei=function(){return"undefined"!=typeof window},ni=function(t){return Gn(t)||Zn(t)},ii="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},ri=Array.isArray,oi=/(?:-?\.?\d|\.)+/gi,si=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ai=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,li=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ui=/[+-]=-?[.\d]+/,ci=/[^,'"\[\]\s]+/gi,hi=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,di={},pi={},fi=function(t){return(pi=Xi(t,di))&&Xo},mi=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},gi=function(t,e){return!e&&console.warn(t)},_i=function(t,e){return t&&(di[t]=e)&&pi&&(pi[t]=e)||di},vi=function(){return 0},yi={suppressEvents:!0,isStart:!0,kill:!1},xi={suppressEvents:!0,kill:!1},bi={suppressEvents:!0},wi={},Ti=[],Ai={},Ci={},Mi={},ki=30,Ei=[],Si="",Li=function(t){var e,n,i=t[0];if(Jn(i)||Gn(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(n=Ei.length;n--&&!Ei[n].targetTest(i););e=Ei[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new io(t[n],e)))||t.splice(n,1);return t},$i=function(t){return t._gsap||Li(wr(t))[0]._gsap},Oi=function(t,e,n){return(n=t[e])&&Gn(n)?t[e]():Qn(n)&&t.getAttribute&&t.getAttribute(e)||n},Pi=function(t,e){return(t=t.split(",")).forEach(e)||t},Di=function(t){return Math.round(1e5*t)/1e5||0},Ri=function(t){return Math.round(1e7*t)/1e7||0},Ni=function(t,e){var n=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===n?t+i:"-"===n?t-i:"*"===n?t*i:t/i},zi=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++io;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e},qi=function(t,e,n,i){void 0===n&&(n="_first"),void 0===i&&(i="_last");var r=e._prev,o=e._next;r?r._next=o:t[n]===e&&(t[n]=o),o?o._prev=r:t[i]===e&&(t[i]=r),e._next=e._prev=e.parent=null},Zi=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove(t),t._act=0},Gi=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},Ki=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Qi=function(t,e,n,i){return t._startAt&&($n?t._startAt.revert(xi):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},Ji=function t(e){return!e||e._ts&&t(e.parent)},tr=function(t){return t._repeat?er(t._tTime,t=t.duration()+t._rDelay)*t:0},er=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},nr=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},ir=function(t){return t._end=Ri(t._start+(t._tDur/Math.abs(t._ts||t._rts||1e-8)||0))},rr=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=Ri(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),ir(t),n._dirty||Gi(n,t)),t},or=function(t,e){var n;if((e._time||e._initted&&!e._dur)&&(n=nr(t.rawTime(),e),(!e._dur||_r(0,e.totalDuration(),n)-e._tTime>1e-8)&&e.render(n,!0)),Gi(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-1e-8}},sr=function(t,e,n,i){return e.parent&&Zi(e),e._start=Ri((Kn(n)?n:n||t!==Pn?fr(t,n,e):t._time)+e._delay),e._end=Ri(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Wi(t,e,"_first","_last",t._sort?"_start":0),cr(e)||(t._recent=e),i||or(t,e),t._ts<0&&rr(t,t._tTime),t},ar=function(t,e){return(di.ScrollTrigger||mi("scrollTrigger",e))&&di.ScrollTrigger.create(e,t)},lr=function(t,e,n,i,r){return ho(t,e,r),t._initted?!n&&t._pt&&!$n&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&Fn!==Yr.frame?(Ti.push(t),t._lazy=[r,i],1):void 0:1},ur=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},cr=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},hr=function(t,e,n,i){var r=t._repeat,o=Ri(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=o/t._dur),t._dur=o,t._tDur=r?r<0?1e10:Ri(o*(r+1)+t._rDelay*r):o,s>0&&!i&&rr(t,t._tTime=t._tDur*s),t.parent&&ir(t),n||Gi(t.parent,t),t},dr=function(t){return t instanceof oo?Gi(t):hr(t,t._dur)},pr={_start:0,endTime:vi,totalDuration:vi},fr=function t(e,n,i){var r,o,s,a=e.labels,l=e._recent||pr,u=e.duration()>=1e8?l.endTime(!1):e._dur;return Zn(n)&&(isNaN(n)||n in a)?(o=n.charAt(0),s="%"===n.substr(-1),r=n.indexOf("="),"<"===o||">"===o?(r>=0&&(n=n.replace(/=/,"")),("<"===o?l._start:l.endTime(l._repeat>=0))+(parseFloat(n.substr(1))||0)*(s?(r<0?l:i).totalDuration()/100:1)):r<0?(n in a||(a[n]=u),a[n]):(o=parseFloat(n.charAt(r-1)+n.substr(r+1)),s&&i&&(o=o/100*(ri(i)?i[0]:i).totalDuration()),r>1?t(e,n.substr(0,r-1),i)+o:u+o)):null==n?u:+n},mr=function(t,e,n){var i,r,o=Kn(e[1]),s=(o?2:1)+(t<2?0:1),a=e[s];if(o&&(a.duration=e[1]),a.parent=n,t){for(i=a,r=n;r&&!("immediateRender"in i);)i=r.vars.defaults||{},r=ti(r.vars.inherit)&&r.parent;a.immediateRender=ti(i.immediateRender),t<2?a.runBackwards=1:a.startAt=e[s-1]}return new _o(e[0],a,e[s+1])},gr=function(t,e){return t||0===t?e(t):e},_r=function(t,e,n){return ne?e:n},vr=function(t,e){return Zn(t)&&(e=hi.exec(t))?e[1]:""},yr=[].slice,xr=function(t,e){return t&&Jn(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&Jn(t[0]))&&!t.nodeType&&t!==Dn},br=function(t,e,n){return void 0===n&&(n=[]),t.forEach((function(t){var i;return Zn(t)&&!e||xr(t,1)?(i=n).push.apply(i,wr(t)):n.push(t)}))||n},wr=function(t,e,n){return On&&!e&&On.selector?On.selector(t):!Zn(t)||n||!Rn&&Hr()?ri(t)?br(t,n):xr(t)?yr.call(t,0):t?[t]:[]:yr.call((e||Nn).querySelectorAll(t),0)},Tr=function(t){return t=wr(t)[0]||gi("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return wr(e,n.querySelectorAll?n:n===t?gi("Invalid scope")||Nn.createElement("div"):t)}},Ar=function(t){return t.sort((function(){return.5-Math.random()}))},Cr=function(t){if(Gn(t))return t;var e=Jn(t)?t:{each:t},n=Qr(e.ease),i=e.from||0,r=parseFloat(e.base)||0,o={},s=i>0&&i<1,a=isNaN(i)||s,l=e.axis,u=i,c=i;return Zn(i)?u=c={center:.5,edges:.5,end:1}[i]||0:!s&&a&&(u=i[0],c=i[1]),function(t,s,h){var d,p,f,m,g,_,v,y,x,b=(h||e).length,w=o[b];if(!w){if(!(x="auto"===e.grid?0:(e.grid||[1,1e8])[1])){for(v=-1e8;v<(v=h[x++].getBoundingClientRect().left)&&xv&&(v=g),gb?b-1:l?"y"===l?b/x:x:Math.max(x,b/x))||0)*("edges"===i?-1:1),w.b=b<0?r-b:r,w.u=vr(e.amount||e.each)||0,n=n&&b<0?Gr(n):n}return b=(w[t]-w.min)/w.max||0,Ri(w.b+(n?n(b):b)*w.v)+w.u}},Mr=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=Ri(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(Kn(n)?0:vr(n))}},kr=function(t,e){var n,i,r=ri(t);return!r&&Jn(t)&&(n=r=t.radius||1e8,t.values?(t=wr(t.values),(i=!Kn(t[0]))&&(n*=n)):t=Mr(t.increment)),gr(e,r?Gn(t)?function(e){return i=t(e),Math.abs(i-e)<=n?i:e}:function(e){for(var r,o,s=parseFloat(i?e.x:e),a=parseFloat(i?e.y:0),l=1e8,u=0,c=t.length;c--;)(r=i?(r=t[c].x-s)*r+(o=t[c].y-a)*o:Math.abs(t[c]-s))(r=Math.abs(r))&&(o=i,a=r);return o},Pr=function(t,e,n){var i,r,o,s=t.vars,a=s[e],l=On,u=t._ctx;if(a)return i=s[e+"Params"],r=s.callbackScope||t,n&&Ti.length&&Fi(),u&&(On=u),o=i?a.apply(r,i):a.call(r),On=l,o},Dr=function(t){return Zi(t),t.scrollTrigger&&t.scrollTrigger.kill(!!$n),t.progress()<1&&Pr(t,"onInterrupt"),t},Rr=function(t){var e=(t=!t.name&&t.default||t).name,n=Gn(t),i=e&&!n&&t.init?function(){this._props=[]}:t,r={init:vi,render:Mo,add:uo,kill:Eo,modifier:ko,rawVars:0},o={targetTest:0,get:0,getSetter:wo,aliases:{},register:0};if(Hr(),t!==i){if(Ci[e])return;ji(i,ji(Hi(t,r),o)),Xi(i.prototype,Xi(r,Hi(t,o))),Ci[i.prop=e]=i,t.targetTest&&(Ei.push(i),wi[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}_i(e,i),t.register&&t.register(Xo,i,$o)},Nr={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},zr=function(t,e,n){return 255*(6*(t+=t<0?1:t>1?-1:0)<1?e+(n-e)*t*6:t<.5?n:3*t<2?e+(n-e)*(2/3-t)*6:e)+.5|0},Fr=function(t,e,n){var i,r,o,s,a,l,u,c,h,d,p=t?Kn(t)?[t>>16,t>>8&255,255&t]:0:Nr.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Nr[t])p=Nr[t];else if("#"===t.charAt(0)){if(t.length<6&&(i=t.charAt(1),r=t.charAt(2),o=t.charAt(3),t="#"+i+i+r+r+o+o+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&255,255&p,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t]}else if("hsl"===t.substr(0,3))if(p=d=t.match(oi),e){if(~t.indexOf("="))return p=t.match(si),n&&p.length<4&&(p[3]=1),p}else s=+p[0]%360/360,a=+p[1]/100,i=2*(l=+p[2]/100)-(r=l<=.5?l*(a+1):l+a-l*a),p.length>3&&(p[3]*=1),p[0]=zr(s+1/3,i,r),p[1]=zr(s,i,r),p[2]=zr(s-1/3,i,r);else p=t.match(oi)||Nr.transparent;p=p.map(Number)}return e&&!d&&(i=p[0]/255,r=p[1]/255,o=p[2]/255,l=((u=Math.max(i,r,o))+(c=Math.min(i,r,o)))/2,u===c?s=a=0:(h=u-c,a=l>.5?h/(2-u-c):h/(u+c),s=u===i?(r-o)/h+(ra&&(u+=y-l),((m=(_=(c+=y)-u)-d)>0||x)&&(v=++i.frame,r=_-1e3*i.time,i.time=_/=1e3,d+=m+(m>=h?4:h-m),g=1),x||(t=e(n)),g)for(o=0;o=e&&o--},_listeners:p},i}(),Hr=function(){return!Bn&&Yr.wake()},Ur={},Wr=/^[\d.\-M][\d.\-,\s]/,qr=/["']/g,Zr=function(t){for(var e,n,i,r={},o=t.substr(1,t.length-3).split(":"),s=o[0],a=1,l=o.length;a1&&s.config?s.config.apply(null,~t.indexOf("{")?[Zr(o[1])]:(e=t,n=e.indexOf("(")+1,i=e.indexOf(")"),r=e.indexOf("(",n),e.substring(n,~r&&r=1?n:1,o=(i||(e?.3:.45))/(n<1?n:1),s=o/Xn*(Math.asin(1/r)||0),a=function(t){return 1===t?1:r*Math.pow(2,-10*t)*qn((t-s)*o)+1},l="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:to(a);return o=Xn/o,l.config=function(n,i){return t(e,n,i)},l},no=function t(e,n){void 0===n&&(n=1.70158);var i=function(t){return t?--t*t*((n+1)*t+n)+1:0},r="out"===e?i:"in"===e?function(t){return 1-i(1-t)}:to(i);return r.config=function(n){return t(e,n)},r};Pi("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var n=e<5?e+1:e;Jr(t+",Power"+(n-1),e?function(t){return Math.pow(t,n)}:function(t){return t},(function(t){return 1-Math.pow(1-t,n)}),(function(t){return t<.5?Math.pow(2*t,n)/2:1-Math.pow(2*(1-t),n)/2}))})),Ur.Linear.easeNone=Ur.none=Ur.Linear.easeIn,Jr("Elastic",eo("in"),eo("out"),eo()),function(t,e){var n=1/e,i=function(i){return i0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,hr(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Hr(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(rr(this,t),!n._dp||n.parent||or(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t0||!this._tDur&&!t)&&sr(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&1e-8===Math.abs(this._zTime)||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Ii(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+tr(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+tr(this),e):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(t,e){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*n,e):this._repeat?er(this._tTime,n)+1:1},e.timeScale=function(t){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var e=this.parent&&this._ts?nr(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(_r(-this._delay,this._tDur,e),!0),ir(this),Ki(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Hr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&1e-8!==Math.abs(this._zTime)&&(this._tTime-=1e-8)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&sr(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(ti(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?nr(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=bi);var e=$n;return $n=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),$n=e,this},e.globalTime=function(t){for(var e=this,n=arguments.length?t:e.rawTime();e;)n=e._start+n/(e._ts||1),e=e._dp;return!this.parent&&this.vars.immediateRender?-1:n},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,dr(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,dr(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(fr(this,t),ti(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,ti(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,n=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=n&&t1?(e?(i[t]=e,n&&(i[t+"Params"]=n),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},e.then=function(t){var e=this;return new Promise((function(n){var i=Gn(t)?t:Vi,r=function(){var t=e.then;e.then=null,Gn(i)&&(i=i(e))&&(i.then||i===e)&&(e.then=t),n(i),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?r():e._prom=r}))},e.kill=function(){Dr(this)},t}();ji(ro.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var oo=function(t){function e(e,n){var i;return void 0===e&&(e={}),(i=t.call(this,e)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=ti(e.sortChildren),Pn&&sr(e.parent||Pn,En(i),n),e.reversed&&i.reverse(),e.paused&&i.paused(!0),e.scrollTrigger&&ar(En(i),e.scrollTrigger),i}Sn(e,t);var n=e.prototype;return n.to=function(t,e,n){return mr(0,arguments,this),this},n.from=function(t,e,n){return mr(1,arguments,this),this},n.fromTo=function(t,e,n,i){return mr(2,arguments,this),this},n.set=function(t,e,n){return e.duration=0,e.parent=this,Ui(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new _o(t,e,fr(this,n),1),this},n.call=function(t,e,n){return sr(this,_o.delayedCall(0,t,e),n)},n.staggerTo=function(t,e,n,i,r,o,s){return n.duration=e,n.stagger=n.stagger||i,n.onComplete=o,n.onCompleteParams=s,n.parent=this,new _o(t,n,fr(this,r)),this},n.staggerFrom=function(t,e,n,i,r,o,s){return n.runBackwards=1,Ui(n).immediateRender=ti(n.immediateRender),this.staggerTo(t,e,n,i,r,o,s)},n.staggerFromTo=function(t,e,n,i,r,o,s,a){return i.startAt=n,Ui(i).immediateRender=ti(i.immediateRender),this.staggerTo(t,e,i,r,o,s,a)},n.render=function(t,e,n){var i,r,o,s,a,l,u,c,h,d,p,f,m=this._time,g=this._dirty?this.totalDuration():this._tDur,_=this._dur,v=t<=0?0:Ri(t),y=this._zTime<0!=t<0&&(this._initted||!_);if(this!==Pn&&v>g&&t>=0&&(v=g),v!==this._tTime||n||y){if(m!==this._time&&_&&(v+=this._time-m,t+=this._time-m),i=v,h=this._start,l=!(c=this._ts),y&&(_||(m=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(p=this._yoyo,a=_+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*a+t,e,n);if(i=Ri(v%a),v===g?(s=this._repeat,i=_):((s=~~(v/a))&&s===v/a&&(i=_,s--),i>_&&(i=_)),d=er(this._tTime,a),!m&&this._tTime&&d!==s&&(d=s),p&&1&s&&(i=_-i,f=1),s!==d&&!this._lock){var x=p&&1&d,b=x===(p&&1&s);if(se)for(i=t._first;i&&i._start<=n;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=n;){if("isPause"===i.data&&i._start=m&&t>=0)for(r=this._first;r;){if(o=r._next,(r._act||i>=r._start)&&r._ts&&u!==r){if(r.parent!==this)return this.render(t,e,n);if(r.render(r._ts>0?(i-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(i-r._start)*r._ts,e,n),i!==this._time||!this._ts&&!l){u=0,o&&(v+=this._zTime=-1e-8);break}}r=o}else{r=this._last;for(var w=t<0?t:i;r;){if(o=r._prev,(r._act||w<=r._end)&&r._ts&&u!==r){if(r.parent!==this)return this.render(t,e,n);if(r.render(r._ts>0?(w-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(w-r._start)*r._ts,e,n||$n&&(r._initted||r._startAt)),i!==this._time||!this._ts&&!l){u=0,o&&(v+=this._zTime=w?-1e-8:1e-8);break}}r=o}}if(u&&!e&&(this.pause(),u.render(i>=m?0:-1e-8)._zTime=i>=m?1:-1,this._ts))return this._start=h,ir(this),this.render(t,e,n);this._onUpdate&&!e&&Pr(this,"onUpdate",!0),(v===g&&this._tTime>=this.totalDuration()||!v&&m)&&(h!==this._start&&Math.abs(c)===Math.abs(this._ts)||this._lock||((t||!_)&&(v===g&&this._ts>0||!v&&this._ts<0)&&Zi(this,1),e||t<0&&!m||!v&&!m&&g||(Pr(this,v===g&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(v0)&&this._prom())))}return this},n.add=function(t,e){var n=this;if(Kn(e)||(e=fr(this,e,t)),!(t instanceof ro)){if(ri(t))return t.forEach((function(t){return n.add(t,e)})),this;if(Zn(t))return this.addLabel(t,e);if(!Gn(t))return this;t=_o.delayedCall(0,t)}return this!==t?sr(this,t,e):this},n.getChildren=function(t,e,n,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=!0),void 0===i&&(i=-1e8);for(var r=[],o=this._first;o;)o._start>=i&&(o instanceof _o?e&&r.push(o):(n&&r.push(o),t&&r.push.apply(r,o.getChildren(!0,e,n)))),o=o._next;return r},n.getById=function(t){for(var e=this.getChildren(1,1,1),n=e.length;n--;)if(e[n].vars.id===t)return e[n]},n.remove=function(t){return Zn(t)?this.removeLabel(t):Gn(t)?this.killTweensOf(t):(qi(this,t),t===this._recent&&(this._recent=this._last),Gi(this))},n.totalTime=function(e,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ri(Yr.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,n),this._forcing=0,this):this._tTime},n.addLabel=function(t,e){return this.labels[t]=fr(this,e),this},n.removeLabel=function(t){return delete this.labels[t],this},n.addPause=function(t,e,n){var i=_o.delayedCall(0,e||vi,n);return i.data="isPause",this._hasPause=1,sr(this,i,fr(this,t))},n.removePause=function(t){var e=this._first;for(t=fr(this,t);e;)e._start===t&&"isPause"===e.data&&Zi(e),e=e._next},n.killTweensOf=function(t,e,n){for(var i=this.getTweensOf(t,n),r=i.length;r--;)so!==i[r]&&i[r].kill(t,e);return this},n.getTweensOf=function(t,e){for(var n,i=[],r=wr(t),o=this._first,s=Kn(e);o;)o instanceof _o?zi(o._targets,r)&&(s?(!so||o._initted&&o._ts)&&o.globalTime(0)<=e&&o.globalTime(o.totalDuration())>e:!e||o.isActive())&&i.push(o):(n=o.getTweensOf(r,e)).length&&i.push.apply(i,n),o=o._next;return i},n.tweenTo=function(t,e){e=e||{};var n,i=this,r=fr(i,t),o=e,s=o.startAt,a=o.onStart,l=o.onStartParams,u=o.immediateRender,c=_o.to(i,ji({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(s&&"time"in s?s.time:i._time))/i.timeScale())||1e-8,onStart:function(){if(i.pause(),!n){var t=e.duration||Math.abs((r-(s&&"time"in s?s.time:i._time))/i.timeScale());c._dur!==t&&hr(c,t,0,1).render(c._time,!0,!0),n=1}a&&a.apply(c,l||[])}},e));return u?c.render(0):c},n.tweenFromTo=function(t,e,n){return this.tweenTo(e,ji({startAt:{time:fr(this,t)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(t){return void 0===t&&(t=this._time),Or(this,fr(this,t))},n.previousLabel=function(t){return void 0===t&&(t=this._time),Or(this,fr(this,t),1)},n.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+1e-8)},n.shiftChildren=function(t,e,n){void 0===n&&(n=0);for(var i,r=this._first,o=this.labels;r;)r._start>=n&&(r._start+=t,r._end+=t),r=r._next;if(e)for(i in o)o[i]>=n&&(o[i]+=t);return Gi(this)},n.invalidate=function(e){var n=this._first;for(this._lock=0;n;)n.invalidate(e),n=n._next;return t.prototype.invalidate.call(this,e)},n.clear=function(t){void 0===t&&(t=!0);for(var e,n=this._first;n;)e=n._next,this.remove(n),n=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Gi(this)},n.totalDuration=function(t){var e,n,i,r=0,o=this,s=o._last,a=1e8;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-t:t));if(o._dirty){for(i=o.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),(n=s._start)>a&&o._sort&&s._ts&&!o._lock?(o._lock=1,sr(o,s,n-s._delay,1)._lock=0):a=n,n<0&&s._ts&&(r-=n,(!i&&!o._dp||i&&i.smoothChildTiming)&&(o._start+=n/o._ts,o._time-=n,o._tTime-=n),o.shiftChildren(-n,!1,-Infinity),a=0),s._end>r&&s._ts&&(r=s._end),s=e;hr(o,o===Pn&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(t){if(Pn._ts&&(Ii(Pn,nr(t,Pn)),Fn=Yr.frame),Yr.frame>=ki){ki+=Vn.autoSleep||120;var e=Pn._first;if((!e||!e._ts)&&Vn.autoSleep&&Yr._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Yr.sleep()}}},e}(ro);ji(oo.prototype,{_lock:0,_hasPause:0,_forcing:0});var so,ao,lo=function(t,e,n,i,r,o,s){var a,l,u,c,h,d,p,f,m=new $o(this._pt,t,e,0,1,Co,null,r),g=0,_=0;for(m.b=n,m.e=i,n+="",(p=~(i+="").indexOf("random("))&&(i=Lr(i)),o&&(o(f=[n,i],t,e),n=f[0],i=f[1]),l=n.match(li)||[];a=li.exec(i);)c=a[0],h=i.substring(g,a.index),u?u=(u+1)%5:"rgba("===h.substr(-5)&&(u=1),c!==l[_++]&&(d=parseFloat(l[_-1])||0,m._pt={_next:m._pt,p:h||1===_?h:",",s:d,c:"="===c.charAt(1)?Ni(d,c)-d:parseFloat(c)-d,m:u&&u<4?Math.round:0},g=li.lastIndex);return m.c=g")})),s.duration();else{for(c in l={},x)"ease"===c||"easeEach"===c||po(c,x[c],l,x.easeEach);for(c in l)for(M=l[c].sort((function(t,e){return t.t-e.t})),S=0,a=0;ap-1e-8&&!m?p:t<1e-8?0:t;if(f){if(g!==this._tTime||!t||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==m){if(i=g,c=this.timeline,this._repeat){if(s=f+this._rDelay,this._repeat<-1&&m)return this.totalTime(100*s+t,e,n);if(i=Ri(g%s),g===p?(o=this._repeat,i=f):((o=~~(g/s))&&o===g/s&&(i=f,o--),i>f&&(i=f)),(l=this._yoyo&&1&o)&&(h=this._yEase,i=f-i),a=er(this._tTime,s),i===d&&!n&&this._initted)return this._tTime=g,this;o!==a&&(c&&this._yEase&&Kr(c,l),!this.vars.repeatRefresh||l||this._lock||(this._lock=n=1,this.render(Ri(s*o),!0).invalidate()._lock=0))}if(!this._initted){if(lr(this,m?t:i,n,e,g))return this._tTime=0,this;if(d!==this._time)return this;if(f!==this._dur)return this.render(t,e,n)}if(this._tTime=g,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(h||this._ease)(i/f),this._from&&(this.ratio=u=1-u),i&&!d&&!e&&(Pr(this,"onStart"),this._tTime!==g))return this;for(r=this._pt;r;)r.r(u,r.d),r=r._next;c&&c.render(t<0?t:!i&&l?-1e-8:c._dur*c._ease(i/this._dur),e,n)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(m&&Qi(this,t,0,n),Pr(this,"onUpdate")),this._repeat&&o!==a&&this.vars.onRepeat&&!e&&this.parent&&Pr(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(m&&!this._onUpdate&&Qi(this,t,0,!0),(t||!f)&&(g===this._tDur&&this._ts>0||!g&&this._ts<0)&&Zi(this,1),e||m&&!d||!(g||d||l)||(Pr(this,g===p?"onComplete":"onReverseComplete",!0),this._prom&&!(g0)&&this._prom()))}}else!function(t,e,n,i){var r,o,s,a=t.ratio,l=e<0||!e&&(!t._start&&ur(t)&&(t._initted||!cr(t))||(t._ts<0||t._dp._ts<0)&&!cr(t))?0:1,u=t._rDelay,c=0;if(u&&t._repeat&&(c=_r(0,t._tDur,e),o=er(c,u),t._yoyo&&1&o&&(l=1-l),o!==er(t._tTime,u)&&(a=1-l,t.vars.repeatRefresh&&t._initted&&t.invalidate())),l!==a||$n||i||1e-8===t._zTime||!e&&t._zTime){if(!t._initted&&lr(t,e,i,n,c))return;for(s=t._zTime,t._zTime=e||(n?1e-8:0),n||(n=e&&!s),t.ratio=l,t._from&&(l=1-l),t._time=0,t._tTime=c,r=t._pt;r;)r.r(l,r.d),r=r._next;e<0&&Qi(t,e,0,!0),t._onUpdate&&!n&&Pr(t,"onUpdate"),c&&t._repeat&&!n&&t.parent&&Pr(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===l&&(l&&Zi(t,1),n||$n||(Pr(t,l?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,n);return this},n.targets=function(){return this._targets},n.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},n.resetTo=function(t,e,n,i){Bn||Yr.wake(),this._ts||this.play();var r=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ho(this,r),function(t,e,n,i,r,o,s){var a,l,u,c,h=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!h)for(h=t._ptCache[e]=[],u=t._ptLookup,c=t._targets.length;c--;){if((a=u[c][e])&&a.d&&a.d._pt)for(a=a.d._pt;a&&a.p!==e&&a.fp!==e;)a=a._next;if(!a)return ao=1,t.vars[e]="+=0",ho(t,s),ao=0,1;h.push(a)}for(c=h.length;c--;)(a=(l=h[c])._pt||l).s=!i&&0!==i||r?a.s+(i||0)+o*a.c:i,a.c=n-a.s,l.e&&(l.e=Di(n)+vr(l.e)),l.b&&(l.b=a.s+vr(l.b))}(this,t,e,n,i,this._ease(r/this._dur),r)?this.resetTo(t,e,n,i):(rr(this,0),this.parent||Wi(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Dr(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,so&&!0!==so.vars.overwrite)._first||Dr(this),this.parent&&n!==this.timeline.totalDuration()&&hr(this,this._dur*this.timeline._tDur/n,0,1),this}var i,r,o,s,a,l,u,c=this._targets,h=t?wr(t):c,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0}(c,h))return"all"===e&&(this._pt=0),Dr(this);for(i=this._op=this._op||[],"all"!==e&&(Zn(e)&&(a={},Pi(e,(function(t){return a[t]=1})),e=a),e=function(t,e){var n,i,r,o,s=t[0]?$i(t[0]).harness:0,a=s&&s.aliases;if(!a)return e;for(i in n=Xi({},e),a)if(i in n)for(r=(o=a[i].split(",")).length;r--;)n[o[r]]=n[i];return n}(c,e)),u=c.length;u--;)if(~h.indexOf(c[u]))for(a in r=d[u],"all"===e?(i[u]=e,s=r,o={}):(o=i[u]=i[u]||{},s=e),s)(l=r&&r[a])&&("kill"in l.d&&!0!==l.d.kill(a)||qi(this,l,"_pt"),delete r[a]),"all"!==o&&(o[a]=1);return this._initted&&!this._pt&&p&&Dr(this),this},e.to=function(t,n){return new e(t,n,arguments[2])},e.from=function(t,e){return mr(1,arguments)},e.delayedCall=function(t,n,i,r){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:n,onReverseComplete:n,onCompleteParams:i,onReverseCompleteParams:i,callbackScope:r})},e.fromTo=function(t,e,n){return mr(2,arguments)},e.set=function(t,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(t,n)},e.killTweensOf=function(t,e,n){return Pn.killTweensOf(t,e,n)},e}(ro);ji(_o.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Pi("staggerTo,staggerFrom,staggerFromTo",(function(t){_o[t]=function(){var e=new oo,n=yr.call(arguments,0);return n.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,n)}}));var vo=function(t,e,n){return t[e]=n},yo=function(t,e,n){return t[e](n)},xo=function(t,e,n,i){return t[e](i.fp,n)},bo=function(t,e,n){return t.setAttribute(e,n)},wo=function(t,e){return Gn(t[e])?yo:Qn(t[e])&&t.setAttribute?bo:vo},To=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},Ao=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Co=function(t,e){var n=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*t):Math.round(1e4*(n.s+n.c*t))/1e4)+i,n=n._next;i+=e.c}e.set(e.t,e.p,i,e)},Mo=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},ko=function(t,e,n,i){for(var r,o=this._pt;o;)r=o._next,o.p===i&&o.modifier(t,e,n),o=r},Eo=function(t){for(var e,n,i=this._pt;i;)n=i._next,i.p===t&&!i.op||i.op===t?qi(this,i,"_pt"):i.dep||(e=1),i=n;return!e},So=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},Lo=function(t){for(var e,n,i,r,o=t._pt;o;){for(e=o._next,n=i;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:r)?o._prev._next=o:i=o,(o._next=n)?n._prev=o:r=o,o=e}t._pt=i},$o=function(){function t(t,e,n,i,r,o,s,a,l){this.t=e,this.s=i,this.c=r,this.p=n,this.r=o||To,this.d=s||this,this.set=a||vo,this.pr=l||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,n){this.mSet=this.mSet||this.set,this.set=So,this.m=t,this.mt=n,this.tween=e},t}();Pi(Si+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return wi[t]=1})),di.TweenMax=di.TweenLite=_o,di.TimelineLite=di.TimelineMax=oo,Pn=new oo({sortChildren:!1,defaults:jn,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Vn.stringFilter=Xr;var Oo=[],Po={},Do=[],Ro=0,No=function(t){return(Po[t]||Do).map((function(t){return t()}))},zo=function(){var t=Date.now(),e=[];t-Ro>2&&(No("matchMediaInit"),Oo.forEach((function(t){var n,i,r,o,s=t.queries,a=t.conditions;for(i in s)(n=Dn.matchMedia(s[i]).matches)&&(r=1),n!==a[i]&&(a[i]=n,o=1);o&&(t.revert(),r&&e.push(t))})),No("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t)})),Ro=t,No("matchMedia"))},Fo=function(){function t(t,e){this.selector=e&&Tr(e),this.data=[],this._r=[],this.isReverted=!1,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,n){Gn(t)&&(n=e,e=t,t=Gn);var i=this,r=function(){var t,r=On,o=i.selector;return r&&r!==i&&r.data.push(i),n&&(i.selector=Tr(n)),On=i,t=e.apply(i,arguments),Gn(t)&&i._r.push(t),On=r,i.selector=o,i.isReverted=!1,t};return i.last=r,t===Gn?r(i):t?i[t]=r:r},e.ignore=function(t){var e=On;On=null,t(this),On=e},e.getTweens=function(){var e=[];return this.data.forEach((function(n){return n instanceof t?e.push.apply(e,n.getTweens()):n instanceof _o&&!(n.parent&&"nested"===n.parent.data)&&e.push(n)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var n=this;if(t){var i=this.getTweens();this.data.forEach((function(t){"isFlip"===t.data&&(t.revert(),t.getChildren(!0,!0,!1).forEach((function(t){return i.splice(i.indexOf(t),1)})))})),i.map((function(t){return{g:t.globalTime(0),t:t}})).sort((function(t,e){return e.g-t.g||-1})).forEach((function(e){return e.t.revert(t)})),this.data.forEach((function(e){return!(e instanceof ro)&&e.revert&&e.revert(t)})),this._r.forEach((function(e){return e(t,n)})),this.isReverted=!0}else this.data.forEach((function(t){return t.kill&&t.kill()}));if(this.clear(),e){var r=Oo.indexOf(this);~r&&Oo.splice(r,1)}},e.revert=function(t){this.kill(t||{})},t}(),Io=function(){function t(t){this.contexts=[],this.scope=t}var e=t.prototype;return e.add=function(t,e,n){Jn(t)||(t={matches:t});var i,r,o,s=new Fo(0,n||this.scope),a=s.conditions={};for(r in this.contexts.push(s),e=s.add("onMatch",e),s.queries=t,t)"all"===r?o=1:(i=Dn.matchMedia(t[r]))&&(Oo.indexOf(s)<0&&Oo.push(s),(a[r]=i.matches)&&(o=1),i.addListener?i.addListener(zo):i.addEventListener("change",zo));return o&&e(s),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Bo={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n1){var i=t.map((function(t){return Xo.quickSetter(t,e,n)})),r=i.length;return function(t){for(var e=r;e--;)i[e](t)}}t=t[0]||{};var o=Ci[e],s=$i(t),a=s.harness&&(s.harness.aliases||{})[e]||e,l=o?function(e){var i=new o;In._pt=0,i.init(t,n?e+n:e,In,0,[t]),i.render(1,i),In._pt&&Mo(1,In)}:s.set(t,a);return o?l:function(e){return l(t,a,n?e+n:e,s,1)}},quickTo:function(t,e,n){var i,r=Xo.to(t,Xi(((i={})[e]="+=0.1",i.paused=!0,i),n||{})),o=function(t,n,i){return r.resetTo(e,t,n,i)};return o.tween=r,o},isTweening:function(t){return Pn.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Qr(t.ease,jn.ease)),Yi(jn,t||{})},config:function(t){return Yi(Vn,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,i=t.plugins,r=t.defaults,o=t.extendTimeline;(i||"").split(",").forEach((function(t){return t&&!Ci[t]&&!di[t]&&gi(e+" effect requires "+t+" plugin.")})),Mi[e]=function(t,e,i){return n(wr(t),ji(e||{},r),i)},o&&(oo.prototype[e]=function(t,n,i){return this.add(Mi[e](t,Jn(n)?n:(i=n)&&{},this),i)})},registerEase:function(t,e){Ur[t]=Qr(e)},parseEase:function(t,e){return arguments.length?Qr(t,e):Ur},getById:function(t){return Pn.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var n,i,r=new oo(t);for(r.smoothChildTiming=ti(t.smoothChildTiming),Pn.remove(r),r._dp=0,r._time=r._tTime=Pn._time,n=Pn._first;n;)i=n._next,!e&&!n._dur&&n instanceof _o&&n.vars.onComplete===n._targets[0]||sr(r,n,n._start-n._delay),n=i;return sr(Pn,r,0),r},context:function(t,e){return t?new Fo(t,e):On},matchMedia:function(t){return new Io(t)},matchMediaRefresh:function(){return Oo.forEach((function(t){var e,n,i=t.conditions;for(n in i)i[n]&&(i[n]=!1,e=1);e&&t.revert()}))||zo()},addEventListener:function(t,e){var n=Po[t]||(Po[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=Po[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:function t(e,n,i){var r=n-e;return ri(e)?Sr(e,t(0,e.length),n):gr(i,(function(t){return(r+(t-e)%r)%r+e}))},wrapYoyo:function t(e,n,i){var r=n-e,o=2*r;return ri(e)?Sr(e,t(0,e.length-1),n):gr(i,(function(t){return e+((t=(o+(t-e)%o)%o||0)>r?o-t:t)}))},distribute:Cr,random:Er,snap:kr,normalize:function(t,e,n){return $r(t,e,0,1,n)},getUnit:vr,clamp:function(t,e,n){return gr(n,(function(n){return _r(t,e,n)}))},splitColor:Fr,toArray:wr,selector:Tr,mapRange:$r,pipe:function(){for(var t=arguments.length,e=new Array(t),n=0;n=0)return;i._gsap.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(ys,e,"")),t=vs}(r||e)&&this.props.push(t,e,r[t])},bs=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},ws=function(){var t,e,n=this.props,i=this.target,r=i.style,o=i._gsap;for(t=0;t=0?Ms[r]:"")+t},Es=function(){"undefined"!=typeof window&&window.document&&(Yo=window,Ho=Yo.document,Uo=Ho.documentElement,qo=As("div")||{style:{}},As("div"),vs=ks(vs),ys=vs+"Origin",qo.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ko=!!ks("perspective"),Go=Xo.core.reverting,Wo=1)},Ss=function t(e){var n,i=As("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,o=this.nextSibling,s=this.style.cssText;if(Uo.appendChild(i),i.appendChild(this),this.style.display="block",e)try{n=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(n=this._gsapBBox());return r&&(o?r.insertBefore(this,o):r.appendChild(this)),Uo.removeChild(i),this.style.cssText=s,n},Ls=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},$s=function(t){var e;try{e=t.getBBox()}catch(n){e=Ss.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Ss||(e=Ss.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+Ls(t,["x","cx","x1"])||0,y:+Ls(t,["y","cy","y1"])||0,width:0,height:0}},Os=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!$s(t))},Ps=function(t,e){if(e){var n=t.style;e in Qo&&e!==ys&&(e=vs),n.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty(e.replace(ns,"-$1").toLowerCase())):n.removeAttribute(e)}},Ds=function(t,e,n,i,r,o){var s=new $o(t._pt,e,n,0,1,o?hs:cs);return t._pt=s,s.b=i,s.e=r,t._props.push(n),s},Rs={deg:1,rad:1,turn:1},Ns={grid:1,flex:1},zs=function t(e,n,i,r){var o,s,a,l,u=parseFloat(i)||0,c=(i+"").trim().substr((u+"").length)||"px",h=qo.style,d=is.test(n),p="svg"===e.tagName.toLowerCase(),f=(p?"client":"offset")+(d?"Width":"Height"),m=100,g="px"===r,_="%"===r;return r===c||!u||Rs[r]||Rs[c]?u:("px"!==c&&!g&&(u=t(e,n,i,"px")),l=e.getCTM&&Os(e),!_&&"%"!==c||!Qo[n]&&!~n.indexOf("adius")?(h[d?"width":"height"]=m+(g?c:r),s=~n.indexOf("adius")||"em"===r&&e.appendChild&&!p?e:e.parentNode,l&&(s=(e.ownerSVGElement||{}).parentNode),s&&s!==Ho&&s.appendChild||(s=Ho.body),(a=s._gsap)&&_&&a.width&&d&&a.time===Yr.time&&!a.uncache?Di(u/a.width*m):((_||"%"===c)&&!Ns[Cs(s,"display")]&&(h.position=Cs(e,"position")),s===e&&(h.position="static"),s.appendChild(qo),o=qo[f],s.removeChild(qo),h.position="absolute",d&&_&&((a=$i(s)).time=Yr.time,a.width=s[f]),Di(g?o*u/m:o&&u?m/o*u:0))):(o=l?e.getBBox()[d?"width":"height"]:e[f],Di(_?u/o*m:u/100*o)))},Fs=function(t,e,n,i){var r;return Wo||Es(),e in os&&"transform"!==e&&~(e=os[e]).indexOf(",")&&(e=e.split(",")[0]),Qo[e]&&"transform"!==e?(r=Gs(t,i),r="transformOrigin"!==e?r[e]:r.svg?r.origin:Ks(Cs(t,ys))+" "+r.zOrigin+"px"):(!(r=t.style[e])||"auto"===r||i||~(r+"").indexOf("calc("))&&(r=Xs[e]&&Xs[e](t,e,n)||Cs(t,e)||Oi(t,e)||("opacity"===e?1:0)),n&&!~(r+"").trim().indexOf(" ")?zs(t,e,r,n)+n:r},Is=function(t,e,n,i){if(!n||"none"===n){var r=ks(e,t,1),o=r&&Cs(t,r,1);o&&o!==n?(e=r,n=o):"borderColor"===e&&(n=Cs(t,"borderTopColor"))}var s,a,l,u,c,h,d,p,f,m,g,_=new $o(this._pt,t.style,e,0,1,Co),v=0,y=0;if(_.b=n,_.e=i,n+="","auto"===(i+="")&&(t.style[e]=i,i=Cs(t,e)||i,t.style[e]=n),Xr(s=[n,i]),i=s[1],l=(n=s[0]).match(ai)||[],(i.match(ai)||[]).length){for(;a=ai.exec(i);)d=a[0],f=i.substring(v,a.index),c?c=(c+1)%5:"rgba("!==f.substr(-5)&&"hsla("!==f.substr(-5)||(c=1),d!==(h=l[y++]||"")&&(u=parseFloat(h)||0,g=h.substr((u+"").length),"="===d.charAt(1)&&(d=Ni(u,d)+g),p=parseFloat(d),m=d.substr((p+"").length),v=ai.lastIndex-m.length,m||(m=m||Vn.units[e]||g,v===i.length&&(i+=m,_.e+=m)),g!==m&&(u=zs(t,e,h,m)||0),_._pt={_next:_._pt,p:f||1===y?f:",",s:u,c:p-u,m:c&&c<4||"zIndex"===e?Math.round:0});_.c=v-1;)n=a[r],Qo[n]&&(i=1,n="transformOrigin"===n?ys:vs),Ps(o,n);i&&(Ps(o,vs),l&&(l.svg&&o.removeAttribute("transform"),Gs(o,1),l.uncache=1,bs(s)))}},Xs={clearProps:function(t,e,n,i,r){if("isFromStart"!==r.data){var o=t._pt=new $o(t._pt,e,n,0,0,js);return o.u=i,o.pr=-10,o.tween=r,t._props.push(n),1}}},Ys=[1,0,0,1,0,0],Hs={},Us=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},Ws=function(t){var e=Cs(t,vs);return Us(e)?Ys:e.substr(7).match(si).map(Di)},qs=function(t,e){var n,i,r,o,s=t._gsap||$i(t),a=t.style,l=Ws(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(r=t.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?Ys:l:(l!==Ys||t.offsetParent||t===Uo||s.svg||(r=a.display,a.display="block",(n=t.parentNode)&&t.offsetParent||(o=1,i=t.nextElementSibling,Uo.appendChild(t)),l=Ws(t),r?a.display=r:Ps(t,"display"),o&&(i?n.insertBefore(t,i):n?n.appendChild(t):Uo.removeChild(t))),e&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},Zs=function(t,e,n,i,r,o){var s,a,l,u=t._gsap,c=r||qs(t,!0),h=u.xOrigin||0,d=u.yOrigin||0,p=u.xOffset||0,f=u.yOffset||0,m=c[0],g=c[1],_=c[2],v=c[3],y=c[4],x=c[5],b=e.split(" "),w=parseFloat(b[0])||0,T=parseFloat(b[1])||0;n?c!==Ys&&(a=m*v-g*_)&&(l=w*(-g/a)+T*(m/a)-(m*x-g*y)/a,w=w*(v/a)+T*(-_/a)+(_*x-v*y)/a,T=l):(w=(s=$s(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),T=s.y+(~(b[1]||b[0]).indexOf("%")?T/100*s.height:T)),i||!1!==i&&u.smooth?(y=w-h,x=T-d,u.xOffset=p+(y*m+x*_)-y,u.yOffset=f+(y*g+x*v)-x):u.xOffset=u.yOffset=0,u.xOrigin=w,u.yOrigin=T,u.smooth=!!i,u.origin=e,u.originIsAbsolute=!!n,t.style[ys]="0px 0px",o&&(Ds(o,u,"xOrigin",h,w),Ds(o,u,"yOrigin",d,T),Ds(o,u,"xOffset",p,u.xOffset),Ds(o,u,"yOffset",f,u.yOffset)),t.setAttribute("data-svg-origin",w+" "+T)},Gs=function(t,e){var n=t._gsap||new io(t);if("x"in n&&!e&&!n.uncache)return n;var i,r,o,s,a,l,u,c,h,d,p,f,m,g,_,v,y,x,b,w,T,A,C,M,k,E,S,L,$,O,P,D,R=t.style,N=n.scaleX<0,z="px",F="deg",I=getComputedStyle(t),B=Cs(t,ys)||"0";return i=r=o=l=u=c=h=d=p=0,s=a=1,n.svg=!(!t.getCTM||!Os(t)),I.translate&&("none"===I.translate&&"none"===I.scale&&"none"===I.rotate||(R[vs]=("none"!==I.translate?"translate3d("+(I.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==I.rotate?"rotate("+I.rotate+") ":"")+("none"!==I.scale?"scale("+I.scale.split(" ").join(",")+") ":"")+("none"!==I[vs]?I[vs]:"")),R.scale=R.rotate=R.translate="none"),g=qs(t,n.svg),n.svg&&(n.uncache?(k=t.getBBox(),B=n.xOrigin-k.x+"px "+(n.yOrigin-k.y)+"px",M=""):M=!e&&t.getAttribute("data-svg-origin"),Zs(t,M||B,!!M||n.originIsAbsolute,!1!==n.smooth,g)),f=n.xOrigin||0,m=n.yOrigin||0,g!==Ys&&(x=g[0],b=g[1],w=g[2],T=g[3],i=A=g[4],r=C=g[5],6===g.length?(s=Math.sqrt(x*x+b*b),a=Math.sqrt(T*T+w*w),l=x||b?es(b,x)*Jo:0,(h=w||T?es(w,T)*Jo+l:0)&&(a*=Math.abs(Math.cos(h*ts))),n.svg&&(i-=f-(f*x+m*w),r-=m-(f*b+m*T))):(D=g[6],O=g[7],S=g[8],L=g[9],$=g[10],P=g[11],i=g[12],r=g[13],o=g[14],u=(_=es(D,$))*Jo,_&&(M=A*(v=Math.cos(-_))+S*(y=Math.sin(-_)),k=C*v+L*y,E=D*v+$*y,S=A*-y+S*v,L=C*-y+L*v,$=D*-y+$*v,P=O*-y+P*v,A=M,C=k,D=E),c=(_=es(-w,$))*Jo,_&&(v=Math.cos(-_),P=T*(y=Math.sin(-_))+P*v,x=M=x*v-S*y,b=k=b*v-L*y,w=E=w*v-$*y),l=(_=es(b,x))*Jo,_&&(M=x*(v=Math.cos(_))+b*(y=Math.sin(_)),k=A*v+C*y,b=b*v-x*y,C=C*v-A*y,x=M,A=k),u&&Math.abs(u)+Math.abs(l)>359.9&&(u=l=0,c=180-c),s=Di(Math.sqrt(x*x+b*b+w*w)),a=Di(Math.sqrt(C*C+D*D)),_=es(A,C),h=Math.abs(_)>2e-4?_*Jo:0,p=P?1/(P<0?-P:P):0),n.svg&&(M=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Us(Cs(t,vs)),M&&t.setAttribute("transform",M))),Math.abs(h)>90&&Math.abs(h)<270&&(N?(s*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(a*=-1,h+=h<=0?180:-180)),e=e||n.uncache,n.x=i-((n.xPercent=i&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+z,n.y=r-((n.yPercent=r&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-r)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+z,n.z=o+z,n.scaleX=Di(s),n.scaleY=Di(a),n.rotation=Di(l)+F,n.rotationX=Di(u)+F,n.rotationY=Di(c)+F,n.skewX=h+F,n.skewY=d+F,n.transformPerspective=p+z,(n.zOrigin=parseFloat(B.split(" ")[2])||0)&&(R[ys]=Ks(B)),n.xOffset=n.yOffset=0,n.force3D=Vn.force3D,n.renderTransform=n.svg?ea:Ko?ta:Js,n.uncache=0,n},Ks=function(t){return(t=t.split(" "))[0]+" "+t[1]},Qs=function(t,e,n){var i=vr(e);return Di(parseFloat(e)+parseFloat(zs(t,"x",n+"px",i)))+i},Js=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,ta(t,e)},ta=function(t,e){var n=e||this,i=n.xPercent,r=n.yPercent,o=n.x,s=n.y,a=n.z,l=n.rotation,u=n.rotationY,c=n.rotationX,h=n.skewX,d=n.skewY,p=n.scaleX,f=n.scaleY,m=n.transformPerspective,g=n.force3D,_=n.target,v=n.zOrigin,y="",x="auto"===g&&t&&1!==t||!0===g;if(v&&("0deg"!==c||"0deg"!==u)){var b,w=parseFloat(u)*ts,T=Math.sin(w),A=Math.cos(w);w=parseFloat(c)*ts,b=Math.cos(w),o=Qs(_,o,T*b*-v),s=Qs(_,s,-Math.sin(w)*-v),a=Qs(_,a,A*b*-v+v)}"0px"!==m&&(y+="perspective("+m+") "),(i||r)&&(y+="translate("+i+"%, "+r+"%) "),(x||"0px"!==o||"0px"!==s||"0px"!==a)&&(y+="0px"!==a||x?"translate3d("+o+", "+s+", "+a+") ":"translate("+o+", "+s+") "),"0deg"!==l&&(y+="rotate("+l+") "),"0deg"!==u&&(y+="rotateY("+u+") "),"0deg"!==c&&(y+="rotateX("+c+") "),"0deg"===h&&"0deg"===d||(y+="skew("+h+", "+d+") "),1===p&&1===f||(y+="scale("+p+", "+f+") "),_.style[vs]=y||"translate(0, 0)"},ea=function(t,e){var n,i,r,o,s,a=e||this,l=a.xPercent,u=a.yPercent,c=a.x,h=a.y,d=a.rotation,p=a.skewX,f=a.skewY,m=a.scaleX,g=a.scaleY,_=a.target,v=a.xOrigin,y=a.yOrigin,x=a.xOffset,b=a.yOffset,w=a.forceCSS,T=parseFloat(c),A=parseFloat(h);d=parseFloat(d),p=parseFloat(p),(f=parseFloat(f))&&(p+=f=parseFloat(f),d+=f),d||p?(d*=ts,p*=ts,n=Math.cos(d)*m,i=Math.sin(d)*m,r=Math.sin(d-p)*-g,o=Math.cos(d-p)*g,p&&(f*=ts,s=Math.tan(p-f),r*=s=Math.sqrt(1+s*s),o*=s,f&&(s=Math.tan(f),n*=s=Math.sqrt(1+s*s),i*=s)),n=Di(n),i=Di(i),r=Di(r),o=Di(o)):(n=m,o=g,i=r=0),(T&&!~(c+"").indexOf("px")||A&&!~(h+"").indexOf("px"))&&(T=zs(_,"x",c,"px"),A=zs(_,"y",h,"px")),(v||y||x||b)&&(T=Di(T+v-(v*n+y*r)+x),A=Di(A+y-(v*i+y*o)+b)),(l||u)&&(s=_.getBBox(),T=Di(T+l/100*s.width),A=Di(A+u/100*s.height)),s="matrix("+n+","+i+","+r+","+o+","+T+","+A+")",_.setAttribute("transform",s),w&&(_.style[vs]=s)},na=function(t,e,n,i,r){var o,s,a=360,l=Zn(r),u=parseFloat(r)*(l&&~r.indexOf("rad")?Jo:1)-i,c=i+u+"deg";return l&&("short"===(o=r.split("_")[1])&&(u%=a)!==u%180&&(u+=u<0?a:-360),"cw"===o&&u<0?u=(u+36e9)%a-~~(u/a)*a:"ccw"===o&&u>0&&(u=(u-36e9)%a-~~(u/a)*a)),t._pt=s=new $o(t._pt,e,n,i,u,as),s.e=c,s.u="deg",t._props.push(n),s},ia=function(t,e){for(var n in e)t[n]=e[n];return t},ra=function(t,e,n){var i,r,o,s,a,l,u,c=ia({},n._gsap),h=n.style;for(r in c.svg?(o=n.getAttribute("transform"),n.setAttribute("transform",""),h[vs]=e,i=Gs(n,1),Ps(n,vs),n.setAttribute("transform",o)):(o=getComputedStyle(n)[vs],h[vs]=e,i=Gs(n,1),h[vs]=o),Qo)(o=c[r])!==(s=i[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(a=vr(o)!==(u=vr(s))?zs(n,r,o,u):parseFloat(o),l=parseFloat(s),t._pt=new $o(t._pt,i,r,a,l-a,ss),t._pt.u=u||0,t._props.push(r));ia(i,c)};Pi("padding,margin,Width,Radius",(function(t,e){var n="Top",i="Right",r="Bottom",o="Left",s=(e<3?[n,i,r,o]:[n+o,n+i,r+i,r+o]).map((function(n){return e<2?t+n:"border"+n+t}));Xs[e>1?"border"+t:t]=function(t,e,n,i,r){var o,a;if(arguments.length<4)return o=s.map((function(e){return Fs(t,e,n)})),5===(a=o.join(" ")).split(o[0]).length?o[0]:a;o=(i+"").split(" "),a={},s.forEach((function(t,e){return a[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,a,r)}}));var oa,sa,aa,la={name:"css",register:Es,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,i,r){var o,s,a,l,u,c,h,d,p,f,m,g,_,v,y,x,b=this._props,w=t.style,T=n.vars.startAt;for(h in Wo||Es(),this.styles=this.styles||Ts(t),x=this.styles.props,this.tween=n,e)if("autoRound"!==h&&(s=e[h],!Ci[h]||!co(h,e,n,i,t,r)))if(u=typeof s,c=Xs[h],"function"===u&&(u=typeof(s=s.call(n,i,t,r))),"string"===u&&~s.indexOf("random(")&&(s=Lr(s)),c)c(this,t,h,s,n)&&(y=1);else if("--"===h.substr(0,2))o=(getComputedStyle(t).getPropertyValue(h)+"").trim(),s+="",Vr.lastIndex=0,Vr.test(o)||(d=vr(o),p=vr(s)),p?d!==p&&(o=zs(t,h,o,p)+p):d&&(s+=d),this.add(w,"setProperty",o,s,i,r,0,0,h),b.push(h),x.push(h,0,w[h]);else if("undefined"!==u){if(T&&h in T?(o="function"==typeof T[h]?T[h].call(n,i,t,r):T[h],Zn(o)&&~o.indexOf("random(")&&(o=Lr(o)),vr(o+"")||(o+=Vn.units[h]||vr(Fs(t,h))||""),"="===(o+"").charAt(1)&&(o=Fs(t,h))):o=Fs(t,h),l=parseFloat(o),(f="string"===u&&"="===s.charAt(1)&&s.substr(0,2))&&(s=s.substr(2)),a=parseFloat(s),h in os&&("autoAlpha"===h&&(1===l&&"hidden"===Fs(t,"visibility")&&a&&(l=0),x.push("visibility",0,w.visibility),Ds(this,w,"visibility",l?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==h&&"transform"!==h&&~(h=os[h]).indexOf(",")&&(h=h.split(",")[0])),m=h in Qo)if(this.styles.save(h),g||((_=t._gsap).renderTransform&&!e.parseTransform||Gs(t,e.parseTransform),v=!1!==e.smoothOrigin&&_.smooth,(g=this._pt=new $o(this._pt,w,vs,0,1,_.renderTransform,_,0,-1)).dep=1),"scale"===h)this._pt=new $o(this._pt,_,"scaleY",l,(f?Ni(l,f+a):a)-l||0,ss),this._pt.u=0,b.push("scaleY",h),h+="X";else{if("transformOrigin"===h){x.push(ys,0,w[ys]),s=Vs(s),_.svg?Zs(t,s,0,v,0,this):((p=parseFloat(s.split(" ")[2])||0)!==_.zOrigin&&Ds(this,_,"zOrigin",_.zOrigin,p),Ds(this,w,h,Ks(o),Ks(s)));continue}if("svgOrigin"===h){Zs(t,s,1,v,0,this);continue}if(h in Hs){na(this,_,h,l,f?Ni(l,f+s):s);continue}if("smoothOrigin"===h){Ds(this,_,"smooth",_.smooth,s);continue}if("force3D"===h){_[h]=s;continue}if("transform"===h){ra(this,s,t);continue}}else h in w||(h=ks(h)||h);if(m||(a||0===a)&&(l||0===l)&&!rs.test(s)&&h in w)a||(a=0),(d=(o+"").substr((l+"").length))!==(p=vr(s)||(h in Vn.units?Vn.units[h]:d))&&(l=zs(t,h,o,p)),this._pt=new $o(this._pt,m?_:w,h,l,(f?Ni(l,f+a):a)-l,m||"px"!==p&&"zIndex"!==h||!1===e.autoRound?ss:us),this._pt.u=p||0,d!==p&&"%"!==p&&(this._pt.b=o,this._pt.r=ls);else if(h in w)Is.call(this,t,h,o,f?f+s:s);else{if(!(h in t)){mi(h,s);continue}this.add(t,h,o||t[h],f?f+s:s,i,r)}m||(h in w?x.push(h,0,w[h]):x.push(h,1,o||t[h])),b.push(h)}y&&Lo(this)},render:function(t,e){if(e.tween._time||!Go())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:Fs,aliases:os,getSetter:function(t,e,n){var i=os[e];return i&&i.indexOf(",")<0&&(e=i),e in Qo&&e!==ys&&(t._gsap.x||Fs(t,"x"))?n&&Zo===n?"scale"===e?ms:fs:(Zo=n||{})&&("scale"===e?gs:_s):t.style&&!Qn(t.style[e])?ds:~e.indexOf("-")?ps:wo(t,e)},core:{_removeProperty:Ps,_getMatrix:qs}};Xo.utils.checkPrefix=ks,Xo.core.getStyleSaver=Ts,aa=Pi((oa="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(sa="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Qo[t]=1})),Pi(sa,(function(t){Vn.units[t]="deg",Hs[t]=1})),os[aa[13]]=oa+","+sa,Pi("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");os[e[1]]=aa[e[0]]})),Pi("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){Vn.units[t]="px"})),Xo.registerPlugin(la);var ua=Xo.registerPlugin(la)||Xo;ua.core.Tween;var ca=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,ha=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,da=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,pa=/(^[#\.][a-z]|[a-y][a-z])/i,fa=Math.PI/180,ma=180/Math.PI,ga=Math.sin,_a=Math.cos,va=Math.abs,ya=Math.sqrt,xa=Math.atan2,ba=function(t){return"string"==typeof t},wa=function(t){return"number"==typeof t},Ta={},Aa={},Ca=function(t){return Math.round((t+1e8)%1*1e5)/1e5||(t<0?0:1)},Ma=function(t){return Math.round(1e5*t)/1e5||0},ka=function(t){return Math.round(1e10*t)/1e10||0},Ea=function(t,e,n,i){var r=t[e],o=1===i?6:Ba(r,n,i);if(o&&o+n+2e){for(;--r&&t[r]>e;);r<0&&(r=0)}else for(;t[++r] element or an SVG path data string")}function Pa(t){var e,n=0;for(t.reverse();n-1;)n=r[o].nodeName.toLowerCase(),e.indexOf(","+n+",")<0&&i.setAttributeNS(null,n,r[o].nodeValue);return i}(t,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),T=function(t,e){for(var n=e?e.split(","):[],i={},r=n.length;--r>-1;)i[n[r]]=+t.getAttribute(n[r])||0;return i}(t,Da[A]),"rect"===A?(o=T.rx,s=T.ry||o,i=T.x,r=T.y,h=T.width-2*o,d=T.height-2*s,n=o||s?"M"+(_=(m=(f=i+o)+h)+o)+","+(y=r+s)+" V"+(x=y+d)+" C"+[_,b=x+s*C,g=m+o*C,w=x+s,m,w,m-(m-f)/3,w,f+(m-f)/3,w,f,w,p=i+o*(1-C),w,i,b,i,x,i,x-(x-y)/3,i,y+(x-y)/3,i,y,i,v=r+s*(1-C),p,r,f,r,f+(m-f)/3,r,m-(m-f)/3,r,m,r,g,r,_,v,_,y].join(",")+"z":"M"+(i+h)+","+r+" v"+d+" h"+-h+" v"+-d+" h"+h+"z"):"circle"===A||"ellipse"===A?("circle"===A?u=(o=s=T.r)*C:(o=T.rx,u=(s=T.ry)*C),n="M"+((i=T.cx)+o)+","+(r=T.cy)+" C"+[i+o,r+u,i+(l=o*C),r+s,i,r+s,i-l,r+s,i-o,r+u,i-o,r,i-o,r-u,i-l,r-s,i,r-s,i+l,r-s,i+o,r-u,i+o,r].join(",")+"z"):"line"===A?n="M"+T.x1+","+T.y1+" L"+T.x2+","+T.y2:"polyline"!==A&&"polygon"!==A||(n="M"+(i=(c=(t.getAttribute("points")+"").match(ha)||[]).shift())+","+(r=c.shift())+" L"+c.join(","),"polygon"===A&&(n+=","+i+","+r+"z")),a.setAttribute("d",qa(a._gsRawPath=Ha(n))),e&&t.parentNode&&(t.parentNode.insertBefore(a,t),t.parentNode.removeChild(t)),a):t}function Na(t,e,n){var i,r=t[e],o=t[e+2],s=t[e+4];return r+=(o-r)*n,r+=((o+=(s-o)*n)-r)*n,i=o+(s+(t[e+6]-s)*n-o)*n-r,r=t[e+1],r+=((o=t[e+3])-r)*n,r+=((o+=((s=t[e+5])-o)*n)-r)*n,Ma(xa(o+(s+(t[e+7]-s)*n-o)*n-r,i)*ma)}function za(t,e,n){n=void 0===n?1:ka(n)||0,e=ka(e)||0;var i=Math.max(0,~~(va(n-e)-1e-8)),r=function(t){for(var e=[],n=0;nn&&(e=1-e,n=1-n,function(t,e){var n=t.length;for(e||t.reverse();n--;)t[n].reversed||Pa(t[n])}(r),r.totalLength=0),e<0||n<0){var o=Math.abs(~~Math.min(e,n))+1;e+=o,n+=o}r.totalLength||Ia(r);var s,a,l,u,c,h,d,p,f=n>1,m=Va(r,e,Ta,!0),g=Va(r,n,Aa),_=g.segment,v=m.segment,y=g.segIndex,x=m.segIndex,b=g.i,w=m.i,T=x===y,A=b===w&&T;if(f||i){for(s=yy)&&r.splice(u,1);else _.angle=Na(_,b+l,0),m=_[b+=l],g=_[b+1],_.length=_.totalLength=0,_.totalPoints=r.totalPoints=8,_.push(m,g,m,g,m,g,m,g);return r.totalLength=0,r}function Fa(t,e,n){e=e||0,t.samples||(t.samples=[],t.lookup=[]);var i,r,o,s,a,l,u,c,h,d,p,f,m,g,_,v,y,x=~~t.resolution||12,b=1/x,w=n?e+6*n+1:t.length,T=t[e],A=t[e+1],C=e?e/6*x:0,M=t.samples,k=t.lookup,E=(e?t.minLength:1e8)||1e8,S=M[C+n*x-1],L=e?M[C-1]:0;for(M.length=k.length=0,r=e+2;r8&&(t.splice(r,6),r-=6,w-=6);else for(i=1;i<=x;i++)l=u-(u=((g=b*i)*g*o+3*(m=1-g)*(g*s+m*a))*g),p=f-(f=(g*g*c+3*m*(g*h+m*d))*g),(v=ya(p*p+l*l))=1)return 0;var i=t[e],r=t[e+1],o=t[e+2],s=t[e+3],a=t[e+4],l=t[e+5],u=i+(o-i)*n,c=o+(a-o)*n,h=r+(s-r)*n,d=s+(l-s)*n,p=u+(c-u)*n,f=h+(d-h)*n,m=a+(t[e+6]-a)*n,g=l+(t[e+7]-l)*n;return c+=(m-c)*n,d+=(g-d)*n,t.splice(e+2,4,Ma(u),Ma(h),Ma(p),Ma(f),Ma(p+(c-p)*n),Ma(f+(d-f)*n),Ma(c),Ma(d),Ma(m),Ma(g)),t.samples&&t.samples.splice(e/6*t.resolution|0,0,0,0,0,0,0,0),6}function Va(t,e,n,i){n=n||{},t.totalLength||Ia(t),(e<0||e>1)&&(e=Ca(e));var r,o,s,a,l,u,c,h=0,d=t[0];if(e)if(1===e)c=1,u=(d=t[h=t.length-1]).length-8;else{if(t.length>1){for(s=t.totalLength*e,l=u=0;(l+=t[u++].totalLength)1)&&(e=Ca(e)),t.length>1){for(s=t.totalLength*e,l=u=0;(l+=t[u++].totalLength)=1?1-1e-9:c||1e-9):p.angle||0),f}function Xa(t,e,n,i,r,o,s){for(var a,l,u,c,h,d=t.length;--d>-1;)for(l=(a=t[d]).length,u=0;u1&&(n=ya(x)*n,i=ya(x)*i);var b=n*n,w=i*i,T=(b*w-b*y-w*v)/(b*y+w*v);T<0&&(T=0);var A=(o===s?-1:1)*ya(T),C=A*(n*_/i),M=A*(-i*g/n),k=(t+a)/2+(c*C-h*M),E=(e+l)/2+(h*C+c*M),S=(g-C)/n,L=(_-M)/i,$=(-g-C)/n,O=(-_-M)/i,P=S*S+L*L,D=(L<0?-1:1)*Math.acos(S/ya(P)),R=(S*O-L*$<0?-1:1)*Math.acos((S*$+L*O)/ya(P*($*$+O*O)));isNaN(R)&&(R=d),!s&&R>0?R-=p:s&&R<0&&(R+=p),D%=p,R%=p;var N,z=Math.ceil(va(R)/(p/4)),F=[],I=R/z,B=4/3*ga(I/2)/(1+_a(I/2)),V=c*n,j=h*n,X=h*-i,Y=c*i;for(N=0;N-1e-4?0:e})).match(ca)||[],_=[],v=0,y=0,x=2/3,b=g.length,w=0,T="ERROR: malformed path: "+t,A=function(t,e,n,i){c=(n-t)/3,h=(i-e)/3,a.push(t+c,e+h,n-c,i-h,n,i)};if(!t||!isNaN(g[0])||isNaN(g[1]))return console.log(T),_;for(e=0;e.5||va(y-r)>.5)&&(A(v,y,i,r),"L"===o&&(e+=2)),v=i,y=r;else if("A"===o){if(f=g[e+4],m=g[e+5],c=g[e+6],h=g[e+7],n=7,f.length>1&&(f.length<3?(h=c,c=m,n--):(h=m,c=f.substr(2),n-=2),m=f.charAt(1),f=f.charAt(0)),d=Ya(v,y,+g[e+1],+g[e+2],+g[e+3],+f,+m,(s?v:0)+1*c,(s?y:0)+1*h),e+=n,d)for(n=0;n1?function(t){for(var e=new fl,n=0;n4&&(o=r.offsetLeft,s=r.offsetTop,r=0);if("absolute"!==(a=Ga.getComputedStyle(t)).position&&"fixed"!==a.position)for(i=t.offsetParent;h&&h!==i;)o+=h.scrollLeft||0,s+=h.scrollTop||0,h=h.parentNode;(r=n.style).top=t.offsetTop-s+"px",r.left=t.offsetLeft-o+"px",r[rl]=a[rl],r[ol]=a[ol],r.position="fixed"===a.position?"fixed":"absolute",t.parentNode.appendChild(n)}return n},pl=function(t,e,n,i,r,o,s){return t.a=e,t.b=n,t.c=i,t.d=r,t.e=o,t.f=s,t},fl=function(){function t(t,e,n,i,r,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=1),void 0===r&&(r=0),void 0===o&&(o=0),pl(this,t,e,n,i,r,o)}var e=t.prototype;return e.inverse=function(){var t=this.a,e=this.b,n=this.c,i=this.d,r=this.e,o=this.f,s=t*i-e*n||1e-10;return pl(this,i/s,-e/s,-n/s,t/s,(n*o-i*r)/s,-(t*o-e*r)/s)},e.multiply=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,o=this.e,s=this.f,a=t.a,l=t.c,u=t.b,c=t.d,h=t.e,d=t.f;return pl(this,a*e+u*i,a*n+u*r,l*e+c*i,l*n+c*r,o+h*e+d*i,s+h*n+d*r)},e.clone=function(){return new t(this.a,this.b,this.c,this.d,this.e,this.f)},e.equals=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,o=this.e,s=this.f;return e===t.a&&n===t.b&&i===t.c&&r===t.d&&o===t.e&&s===t.f},e.apply=function(t,e){void 0===e&&(e={});var n=t.x,i=t.y,r=this.a,o=this.b,s=this.c,a=this.d,l=this.e,u=this.f;return e.x=n*r+i*s+l||0,e.y=n*o+i*a+u||0,e},t}();function ml(t,e,n,i){if(!t||!t.parentNode||(Za||sl(t)).documentElement===t)return new fl;var r=function(t){for(var e,n;t&&t!==Qa;)(n=t._gsap)&&n.uncache&&n.get(t,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t),o=ul(t)?al:ll,s=dl(t,n),a=o[0].getBoundingClientRect(),l=o[1].getBoundingClientRect(),u=o[2].getBoundingClientRect(),c=s.parentNode,h=!i&&cl(t),d=new fl((l.left-a.left)/100,(l.top-a.top)/100,(u.left-a.left)/100,(u.top-a.top)/100,a.left+(h?0:Ga.pageXOffset||Za.scrollLeft||Ka.scrollLeft||Qa.scrollLeft||0),a.top+(h?0:Ga.pageYOffset||Za.scrollTop||Ka.scrollTop||Qa.scrollTop||0));if(c.removeChild(s),r)for(a=r.length;a--;)(l=r[a]).scaleX=l.scaleY=0,l.renderTransform(1,l);return e?d.inverse():d} /*! * MotionPathPlugin 3.11.3 * https://greensock.com * * @license Copyright 2008-2022, GreenSock. All rights reserved. * Subject to the terms at https://greensock.com/standard-license or for * Club GreenSock members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */var gl,_l,vl,yl,xl,bl,wl="x,translateX,left,marginLeft,xPercent".split(","),Tl="y,translateY,top,marginTop,yPercent".split(","),Al=Math.PI/180,Cl=function(t,e,n,i){for(var r=e.length,o=2===i?0:i,s=0;s1?t=1:t<0&&(t=0);i--;)ja(n[i],t,!i&&e.rotate,n[i]);for(;r;)r.set(r.t,r.p,r.path[r.pp]+r.u,r.d,t),r=r._next;e.rotate&&e.rSet(e.target,e.rProp,n[0].angle*(e.radians?Al:1)+e.rOffset+e.ru,e,t)}else e.styles.revert()},getLength:function(t){return Ia(Oa(t)).totalLength},sliceRawPath:za,getRawPath:Oa,pointsToSegment:Wa,stringToRawPath:Ha,rawPathToString:qa,transformRawPath:Xa,getGlobalMatrix:ml,getPositionOnPath:ja,cacheRawPathMeasurements:Ia,convertToPath:function(t,e){return yl(t).map((function(t){return Ra(t,!1!==e)}))},convertCoordinates:function(t,e,n){var i=ml(e,!0,!0).multiply(ml(t));return n?i.apply(n):i},getAlignMatrix:Ol,getRelativePosition:function(t,e,n,i){var r=Ol(t,e,n,i);return{x:r.e,y:r.f}},arrayToRawPath:function(t,e){var n=Cl(Cl([],t,(e=e||{}).x||"x",0),t,e.y||"y",1);return e.relative&&kl(n),["cubic"===e.type?n:Wa(n,e.curviness)]}};(gl||"undefined"!=typeof window&&(gl=window.gsap)&&gl.registerPlugin&&gl)&&gl.registerPlugin(Rl);var Nl,zl,Fl,Il,Bl,Vl,jl,Xl,Yl,Hl,Ul,Wl,ql,Zl,Gl,Kl,Ql,Jl,tu,eu,nu=0,iu=function(){return"undefined"!=typeof window},ru=function(){return Nl||iu()&&(Nl=window.gsap)&&Nl.registerPlugin&&Nl},ou=function(t){return"function"==typeof t},su=function(t){return"object"==typeof t},au=function(t){return void 0===t},lu=function(){return!1},uu="transform",cu="transformOrigin",hu=function(t){return Math.round(1e4*t)/1e4},du=Array.isArray,pu=function(t,e){var n=Fl.createElementNS?Fl.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Fl.createElement(t);return n.style?n:Fl.createElement(t)},fu=180/Math.PI,mu=1e20,gu=new fl,_u=Date.now||function(){return(new Date).getTime()},vu=[],yu={},xu=0,bu=/^(?:a|input|textarea|button|select)$/i,wu=0,Tu={},Au={},Cu=function(t,e){var n,i={};for(n in t)i[n]=e?t[n]*e:t[n];return i},Mu=function t(e,n){for(var i,r=e.length;r--;)n?e[r].style.touchAction=n:e[r].style.removeProperty("touch-action"),(i=e[r].children)&&i.length&&t(i,n)},ku=function(){return vu.forEach((function(t){return t()}))},Eu=function(){return!vu.length&&Nl.ticker.remove(ku)},Su=function(t){for(var e=vu.length;e--;)vu[e]===t&&vu.splice(e,1);Nl.to(Eu,{overwrite:!0,delay:15,duration:0,onComplete:Eu,data:"_draggable"})},Lu=function(t,e,n,i){if(t.addEventListener){var r=ql[e];i=i||(Ul?{passive:!1}:null),t.addEventListener(r||e,n,i),r&&e!==r&&t.addEventListener(e,n,i)}},$u=function(t,e,n){if(t.removeEventListener){var i=ql[e];t.removeEventListener(i||e,n),i&&e!==i&&t.removeEventListener(e,n)}},Ou=function(t){t.preventDefault&&t.preventDefault(),t.preventManipulation&&t.preventManipulation()},Pu=function t(e){Zl=e.touches&&nu2||r<-2)&&!i)return f=t.scrollLeft,Nl.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-f),void(e.onKill&&e.onKill());(n=-n)<0?(d=n-.5|0,n=0):n>v?(d=n-v|0,n=v):d=0,(d||o)&&(this._skip||(u[uu]=s+-d+"px,"+-h+a),d+_>=0&&(u.paddingRight=d+_+"px")),t.scrollLeft=0|n,f=t.scrollLeft},this.top=function(n,i){if(!arguments.length)return-(t.scrollTop+h);var r=t.scrollTop-p,o=h;if((r>2||r<-2)&&!i)return p=t.scrollTop,Nl.killTweensOf(this,{top:1,scrollTop:1}),this.top(-p),void(e.onKill&&e.onKill());(n=-n)<0?(h=n-.5|0,n=0):n>y?(h=n-y|0,n=y):h=0,(h||o)&&(this._skip||(u[uu]=s+-d+"px,"+-h+a)),t.scrollTop=0|n,p=t.scrollTop},this.maxScrollTop=function(){return y},this.maxScrollLeft=function(){return v},this.disable=function(){for(c=l.firstChild;c;)o=c.nextSibling,t.appendChild(c),c=o;t===l.parentNode&&t.removeChild(l)},this.enable=function(){if((c=t.firstChild)!==l){for(;c;)o=c.nextSibling,l.appendChild(c),c=o;t.appendChild(l),this.calibrate()}},this.calibrate=function(e){var o,s,a,c=t.clientWidth===n;p=t.scrollTop,f=t.scrollLeft,c&&t.clientHeight===i&&l.offsetHeight===r&&m===t.scrollWidth&&g===t.scrollHeight&&!e||((h||d)&&(s=this.left(),a=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),o=Xu(t),c&&!e||(u.display="block",u.width="auto",u.paddingRight="0px",(_=Math.max(0,t.scrollWidth-t.clientWidth))&&(_+=parseFloat(o.paddingLeft)+(eu?parseFloat(o.paddingRight):0))),u.display="inline-block",u.position="relative",u.overflow="visible",u.verticalAlign="top",u.boxSizing="content-box",u.width="100%",u.paddingRight=_+"px",eu&&(u.paddingBottom=o.paddingBottom),n=t.clientWidth,i=t.clientHeight,m=t.scrollWidth,g=t.scrollHeight,v=t.scrollWidth-n,y=t.scrollHeight-i,r=l.offsetHeight,u.display="block",(s||a)&&(this.left(s),this.top(a)))},this.content=l,this.element=t,this._skip=!1,this.enable()},ec=function(t){if(iu()&&document.body){var e=window&&window.navigator;zl=window,Fl=document,Il=Fl.documentElement,Bl=Fl.body,Vl=pu("div"),Jl=!!window.PointerEvent,(jl=pu("div")).style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",Ql="grab"===jl.style.cursor?"grab":"move",Gl=e&&-1!==e.userAgent.toLowerCase().indexOf("android"),Wl="ontouchstart"in Il&&"orientation"in zl||e&&(e.MaxTouchPoints>0||e.msMaxTouchPoints>0),i=pu("div"),r=pu("div"),o=r.style,s=Bl,o.display="inline-block",o.position="relative",i.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",i.appendChild(r),s.appendChild(i),n=r.offsetHeight+18>i.scrollHeight,s.removeChild(i),eu=n,ql=function(t){for(var e=t.split(","),n=(("onpointerdown"in Vl?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in Vl?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":t).split(",")),i={},r=4;--r>-1;)i[e[r]]=n[r],i[n[r]]=e[r];try{Il.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){Ul=1}}))}catch(t){}return i}("touchstart,touchmove,touchend,touchcancel"),Lu(Fl,"touchcancel",lu),Lu(zl,"touchmove",lu),Bl&&Bl.addEventListener("touchstart",lu),Lu(Fl,"contextmenu",(function(){for(var t in yu)yu[t].isPressed&&yu[t].endDrag()})),Nl=Xl=ru()}var n,i,r,o,s;Nl?(Kl=Nl.plugins.inertia,Yl=Nl.utils.checkPrefix,uu=Yl(uu),cu=Yl(cu),Hl=Nl.utils.toArray,tu=!!Yl("perspective")):t&&console.warn("Please gsap.registerPlugin(Draggable)")},nc=function(){function t(t){this._listeners={},this.target=t||this}var e=t.prototype;return e.addEventListener=function(t,e){var n=this._listeners[t]||(this._listeners[t]=[]);~n.indexOf(e)||n.push(e)},e.removeEventListener=function(t,e){var n=this._listeners[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},e.dispatchEvent=function(t){var e,n=this;return(this._listeners[t]||[]).forEach((function(i){return!1===i.call(n,{type:t,target:n.target})&&(e=!1)})),e},t}(),ic=function(t){var e,n;function i(e,n){var r;r=t.call(this)||this,Xl||ec(1),e=Hl(e)[0],Kl||(Kl=Nl.plugins.inertia),r.vars=n=Cu(n||{}),r.target=e,r.x=r.y=r.rotation=0,r.dragResistance=parseFloat(n.dragResistance)||0,r.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,r.lockAxis=n.lockAxis,r.autoScroll=n.autoScroll||0,r.lockedAxis=null,r.allowEventDefault=!!n.allowEventDefault,Nl.getProperty(e,"x");var o,s,a,l,u,c,h,d,p,f,m,g,_,v,y,x,b,w,T,A,C,M,k,E,S,L,$,O,P,D,R,N,z,F=(n.type||"x,y").toLowerCase(),I=~F.indexOf("x")||~F.indexOf("y"),B=-1!==F.indexOf("rotation"),V=B?"rotation":I?"x":"left",j=I?"y":"top",X=!(!~F.indexOf("x")&&!~F.indexOf("left")&&"scroll"!==F),Y=!(!~F.indexOf("y")&&!~F.indexOf("top")&&"scroll"!==F),H=n.minimumMovement||2,U=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(r),W=Hl(n.trigger||n.handle||e),q={},Z=0,G=!1,K=n.autoScrollMarginTop||40,Q=n.autoScrollMarginRight||40,J=n.autoScrollMarginBottom||40,tt=n.autoScrollMarginLeft||40,et=n.clickableTest||Ku,nt=0,it=e._gsap||Nl.core.getCache(e),rt=Ju(e),ot=function(t,n){return parseFloat(it.get(e,t,n))},st=e.ownerDocument||Fl,at=function(t){return Ou(t),t.stopImmediatePropagation&&t.stopImmediatePropagation(),!1},lt=function t(n){if(U.autoScroll&&U.isDragging&&(G||b)){var i,r,o,a,l,u,c,h,p=e,f=15*U.autoScroll;for(G=!1,Au.scrollTop=null!=zl.pageYOffset?zl.pageYOffset:null!=st.documentElement.scrollTop?st.documentElement.scrollTop:st.body.scrollTop,Au.scrollLeft=null!=zl.pageXOffset?zl.pageXOffset:null!=st.documentElement.scrollLeft?st.documentElement.scrollLeft:st.body.scrollLeft,a=U.pointerX-Au.scrollLeft,l=U.pointerY-Au.scrollTop;p&&!r;)i=(r=Iu(p.parentNode))?Au:p.parentNode,o=r?{bottom:Math.max(Il.clientHeight,zl.innerHeight||0),right:Math.max(Il.clientWidth,zl.innerWidth||0),left:0,top:0}:i.getBoundingClientRect(),u=c=0,Y&&((h=i._gsMaxScrollY-i.scrollTop)<0?c=h:l>o.bottom-J&&h?(G=!0,c=Math.min(h,f*(1-Math.max(0,o.bottom-l)/J)|0)):lo.right-Q&&h?(G=!0,u=Math.min(h,f*(1-Math.max(0,o.right-a)/Q)|0)):an?n+(r-n)*o:r-1;)(o=(r=t[s])-i)<0&&(o=-o),o=e&&r<=n&&(a=s,l=o);return t[a]}:isNaN(t)?function(t){return t}:function(){return t*i}},ht=function(){var t,i,r,o;h=!1,s?(s.calibrate(),U.minX=m=-s.maxScrollLeft(),U.minY=_=-s.maxScrollTop(),U.maxX=f=U.maxY=g=0,h=!0):n.bounds&&(t=Wu(n.bounds,e.parentNode),B?(U.minX=m=t.left,U.maxX=f=t.left+t.width,U.minY=_=U.maxY=g=0):au(n.bounds.maxX)&&au(n.bounds.maxY)?(i=Wu(e,e.parentNode),U.minX=m=Math.round(ot(V,"px")+t.left-i.left),U.minY=_=Math.round(ot(j,"px")+t.top-i.top),U.maxX=f=Math.round(m+(t.width-i.width)),U.maxY=g=Math.round(_+(t.height-i.height))):(t=n.bounds,U.minX=m=t.minX,U.minY=_=t.minY,U.maxX=f=t.maxX,U.maxY=g=t.maxY),m>f&&(U.minX=f,U.maxX=f=m,m=U.minX),_>g&&(U.minY=g,U.maxY=g=_,_=U.minY),B&&(U.minRotation=m,U.maxRotation=f),h=!0),n.liveSnap&&(r=!0===n.liveSnap?n.snap||{}:n.liveSnap,o=du(r)||ou(r),B?(T=ct(o?r:r.rotation,m,f,1),A=null):r.points?C=function(t,e,n,i,r,o,s){return o=o&&on?n+(d-n)*h:dr?r+(p-r)*h:po&&(a.x=d,a.y=p),a}:du(t)?function(e){for(var n,i,r,s,a=t.length,l=0,u=mu;--a>-1;)(s=(n=(r=t[a]).x-e.x)*n+(i=r.y-e.y)*i)1e3?0:.5:n.minDuration,overshoot:l}),U.tween=a=Nl.to(s||e,{inertia:t,data:"_draggable",onComplete:dt,onInterrupt:pt,onUpdate:n.fastMode?Uu:ut,onUpdateParams:n.fastMode?[U,"onthrowupdate","onThrowUpdate"]:r&&r.radius?[!1,!0]:[]}),n.fastMode||(s&&(s._skip=!0),a.render(1e9,!0,!0),ut(!0,!0),U.endX=U.x,U.endY=U.y,B&&(U.endRotation=U.x),a.play(0),ut(!0,!0),s&&(s._skip=!1))):h&&U.applyBounds()},mt=function(t){var n,i=E;E=ml(e.parentNode,!0),t&&U.isPressed&&!E.equals(i||new fl)&&(n=i.inverse().apply({x:a,y:l}),E.apply(n,n),a=n.x,l=n.y),E.equals(gu)&&(E=null)},gt=function(){var t,n,i,r=1-U.edgeResistance,o=rt?Nu(st):0,d=rt?Ru(st):0;I&&(it.x=ot(V,"px")+"px",it.y=ot(j,"px")+"px",it.renderTransform()),mt(!1),qu.x=U.pointerX-o,qu.y=U.pointerY-d,E&&E.apply(qu,qu),a=qu.x,l=qu.y,b&&(bt(U.pointerX,U.pointerY),lt(!0)),N=ml(e),s?(ht(),c=s.top(),u=s.left()):(_t()?(ut(!0,!0),ht()):U.applyBounds(),B?(t=e.ownerSVGElement?[it.xOrigin-e.getBBox().x,it.yOrigin-e.getBBox().y]:(Xu(e)[cu]||"0 0").split(" "),x=U.rotationOrigin=ml(e).apply({x:parseFloat(t[0])||0,y:parseFloat(t[1])||0}),ut(!0,!0),n=U.pointerX-x.x-o,i=x.y-U.pointerY+d,u=U.x,c=U.y=Math.atan2(i,n)*fu):(c=ot(j,"px"),u=ot(V,"px"))),h&&r&&(u>f?u=f+(u-f)/r:ug?c=g+(c-g)/r:c<_&&(c=_-(_-c)/r))),U.startX=u=hu(u),U.startY=c=hu(c)},_t=function(){return U.tween&&U.tween.isActive()},vt=function(){!jl.parentNode||_t()||U.isDragging||jl.parentNode.removeChild(jl)},yt=function(t,r){var u;if(!o||U.isPressed||!t||!("mousedown"!==t.type&&"pointerdown"!==t.type||r)&&_u()-nt<30&&ql[U.pointerEvent.type])R&&t&&o&&Ou(t);else{if(S=_t(),z=!1,U.pointerEvent=t,ql[t.type]?(k=~t.type.indexOf("touch")?t.currentTarget||t.target:st,Lu(k,"touchend",wt),Lu(k,"touchmove",xt),Lu(k,"touchcancel",wt),Lu(st,"touchstart",Du)):(k=null,Lu(st,"mousemove",xt)),$=null,Jl&&k||(Lu(st,"mouseup",wt),t&&t.target&&Lu(t.target,"mouseup",wt)),M=et.call(U,t.target)&&!1===n.dragClickables&&!r)return Lu(t.target,"change",wt),Uu(U,"pressInit","onPressInit"),Uu(U,"press","onPress"),Qu(W,!0),void(R=!1);var c;if(L=!(!k||X===Y||!1===U.vars.allowNativeTouchScrolling||U.vars.allowContextMenu&&t&&(t.ctrlKey||t.which>2))&&(X?"y":"x"),(R=!L&&!U.allowEventDefault)&&(Ou(t),Lu(zl,"touchforcechange",Ou)),t.changedTouches?(t=v=t.changedTouches[0],y=t.identifier):t.pointerId?y=t.pointerId:v=y=null,nu++,c=lt,vu.push(c),1===vu.length&&Nl.ticker.add(ku),l=U.pointerY=t.pageY,a=U.pointerX=t.pageX,Uu(U,"pressInit","onPressInit"),(L||U.autoScroll)&&Vu(e.parentNode),!e.parentNode||!U.autoScroll||s||B||!e.parentNode._gsMaxScrollX||jl.parentNode||e.getBBox||(jl.style.width=e.parentNode.scrollWidth+"px",e.parentNode.appendChild(jl)),gt(),U.tween&&U.tween.kill(),U.isThrowing=!1,Nl.killTweensOf(s||e,q,!0),s&&Nl.killTweensOf(e,{scrollTo:1},!0),U.tween=U.lockedAxis=null,(n.zIndexBoost||!B&&!s&&!1!==n.zIndexBoost)&&(e.style.zIndex=i.zIndex++),U.isPressed=!0,d=!(!n.onDrag&&!U._listeners.drag),p=!(!n.onMove&&!U._listeners.move),!1!==n.cursor||n.activeCursor)for(u=W.length;--u>-1;)Nl.set(W[u],{cursor:n.activeCursor||n.cursor||("grab"===Ql?"grabbing":Ql)});Uu(U,"press","onPress")}},xt=function(t){var n,i,r,s,u,c,h=t;if(o&&!Zl&&U.isPressed&&t){if(U.pointerEvent=t,n=t.changedTouches){if((t=n[0])!==v&&t.identifier!==y){for(s=n.length;--s>-1&&(t=n[s]).identifier!==y&&t.target!==e;);if(s<0)return}}else if(t.pointerId&&y&&t.pointerId!==y)return;k&&L&&!$&&(qu.x=t.pageX-(rt?Nu(st):0),qu.y=t.pageY-(rt?Ru(st):0),E&&E.apply(qu,qu),i=qu.x,r=qu.y,((u=Math.abs(i-a))!==(c=Math.abs(r-l))&&(u>H||c>H)||Gl&&L===$)&&($=u>c&&X?"x":"y",L&&$!==L&&Lu(zl,"touchforcechange",Ou),!1!==U.vars.lockAxisOnTouchScroll&&X&&Y&&(U.lockedAxis="x"===$?"y":"x",ou(U.vars.onLockAxis)&&U.vars.onLockAxis.call(U,h)),Gl&&L===$))?wt(h):(U.allowEventDefault||L&&(!$||L===$)||!1===h.cancelable?R&&(R=!1):(Ou(h),R=!0),U.autoScroll&&(G=!0),bt(t.pageX,t.pageY,p))}else R&&t&&o&&Ou(t)},bt=function(t,e,n){var i,r,o,s,d,p,v=1-U.dragResistance,y=1-U.edgeResistance,w=U.pointerX,M=U.pointerY,k=c,S=U.x,L=U.y,$=U.endX,O=U.endY,P=U.endRotation,D=b;U.pointerX=t,U.pointerY=e,rt&&(t-=Nu(st),e-=Ru(st)),B?(s=Math.atan2(x.y-e,t-x.x)*fu,(d=U.y-s)>180?(c-=360,U.y=s):d<-180&&(c+=360,U.y=s),U.x!==u||Math.abs(c-s)>H?(U.y=s,o=u+(c-s)*v):o=u):(E&&(p=t*E.a+e*E.c+E.e,e=t*E.b+e*E.d+E.f,t=p),(r=e-l)-H&&(r=0),(i=t-a)-H&&(i=0),(U.lockAxis||U.lockedAxis)&&(i||r)&&((p=U.lockedAxis)||(U.lockedAxis=p=X&&Math.abs(i)>Math.abs(r)?"y":Y?"x":null,p&&ou(U.vars.onLockAxis)&&U.vars.onLockAxis.call(U,U.pointerEvent)),"y"===p?r=0:"x"===p&&(i=0)),o=hu(u+i*v),s=hu(c+r*v)),(T||A||C)&&(U.x!==o||U.y!==s&&!B)&&(C&&(Tu.x=o,Tu.y=s,p=C(Tu),o=hu(p.x),s=hu(p.y)),T&&(o=hu(T(o))),A&&(s=hu(A(s)))),h&&(o>f?o=f+Math.round((o-f)*y):og?s=Math.round(g+(s-g)*y):s<_&&(s=Math.round(_+(s-_)*y)))),(U.x!==o||U.y!==s&&!B)&&(B?(U.endRotation=U.x=U.endX=o,b=!0):(Y&&(U.y=U.endY=s,b=!0),X&&(U.x=U.endX=o,b=!0)),n&&!1===Uu(U,"move","onMove")?(U.pointerX=w,U.pointerY=M,c=k,U.x=S,U.y=L,U.endX=$,U.endY=O,U.endRotation=P,b=D):!U.isDragging&&U.isPressed&&(U.isDragging=z=!0,Uu(U,"dragstart","onDragStart")))},wt=function t(i,r){if(o&&U.isPressed&&(!i||null==y||r||!(i.pointerId&&i.pointerId!==y&&i.target!==e||i.changedTouches&&!function(t,e){for(var n=t.length;n--;)if(t[n].identifier===e)return!0}(i.changedTouches,y)))){U.isPressed=!1;var s,a,l,u,c,h=i,d=U.isDragging,p=U.vars.allowContextMenu&&i&&(i.ctrlKey||i.which>2),f=Nl.delayedCall(.001,vt);if(k?($u(k,"touchend",t),$u(k,"touchmove",xt),$u(k,"touchcancel",t),$u(st,"touchstart",Du)):$u(st,"mousemove",xt),$u(zl,"touchforcechange",Ou),Jl&&k||($u(st,"mouseup",t),i&&i.target&&$u(i.target,"mouseup",t)),b=!1,d&&(Z=wu=_u(),U.isDragging=!1),Su(lt),M&&!p)return i&&($u(i.target,"change",t),U.pointerEvent=h),Qu(W,!1),Uu(U,"release","onRelease"),Uu(U,"click","onClick"),void(M=!1);for(a=W.length;--a>-1;)ju(W[a],"cursor",n.cursor||(!1!==n.cursor?Ql:null));if(nu--,i){if((s=i.changedTouches)&&(i=s[0])!==v&&i.identifier!==y){for(a=s.length;--a>-1&&(i=s[a]).identifier!==y&&i.target!==e;);if(a<0&&!r)return}U.pointerEvent=h,U.pointerX=i.pageX,U.pointerY=i.pageY}return p&&h?(Ou(h),R=!0,Uu(U,"release","onRelease")):h&&!d?(R=!1,S&&(n.snap||n.bounds)&&ft(n.inertia||n.throwProps),Uu(U,"release","onRelease"),Gl&&"touchmove"===h.type||-1!==h.type.indexOf("cancel")||(Uu(U,"click","onClick"),_u()-nt<300&&Uu(U,"doubleclick","onDoubleClick"),u=h.target||e,nt=_u(),c=function(){nt===P||!U.enabled()||U.isPressed||h.defaultPrevented||(u.click?u.click():st.createEvent&&((l=st.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,zl,1,U.pointerEvent.screenX,U.pointerEvent.screenY,U.pointerX,U.pointerY,!1,!1,!1,!1,0,null),u.dispatchEvent(l)))},Gl||h.defaultPrevented||Nl.delayedCall(.05,c))):(ft(n.inertia||n.throwProps),U.allowEventDefault||!h||!1===n.dragClickables&&et.call(U,h.target)||!d||L&&(!$||L!==$)||!1===h.cancelable?R=!1:(R=!0,Ou(h)),Uu(U,"release","onRelease")),_t()&&f.duration(U.tween.duration()),d&&Uu(U,"dragend","onDragEnd"),!0}R&&i&&o&&Ou(i)},Tt=function(t){if(t&&U.isDragging&&!s){var n=t.target||e.parentNode,i=n.scrollLeft-n._gsScrollX,r=n.scrollTop-n._gsScrollY;(i||r)&&(E?(a-=i*E.a+r*E.c,l-=r*E.d+i*E.b):(a-=i,l-=r),n._gsScrollX+=i,n._gsScrollY+=r,bt(U.pointerX,U.pointerY))}},At=function(t){var e=_u(),n=e-nt<100,i=e-Z<50,r=n&&P===nt,o=U.pointerEvent&&U.pointerEvent.defaultPrevented,s=n&&D===nt,a=t.isTrusted||null==t.isTrusted&&n&&r;if((r||i&&!1!==U.vars.suppressClickOnDrag)&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),n&&(!U.pointerEvent||!U.pointerEvent.defaultPrevented)&&(!r||a&&!s))return a&&r&&(D=nt),void(P=nt);(U.isPressed||i||n)&&(a&&t.detail&&n&&!o||Ou(t)),n||i||z||(t&&t.target&&(U.pointerEvent=t),Uu(U,"click","onClick"))},Ct=function(t){return E?{x:t.x*E.a+t.y*E.c+E.e,y:t.x*E.b+t.y*E.d+E.f}:{x:t.x,y:t.y}};return(w=i.get(e))&&w.kill(),r.startDrag=function(t,n){var i,r,o,s;yt(t||U.pointerEvent,!0),n&&!U.hitTest(t||U.pointerEvent)&&(i=Hu(t||U.pointerEvent),r=Hu(e),o=Ct({x:i.left+i.width/2,y:i.top+i.height/2}),s=Ct({x:r.left+r.width/2,y:r.top+r.height/2}),a-=o.x-s.x,l-=o.y-s.y),U.isDragging||(U.isDragging=z=!0,Uu(U,"dragstart","onDragStart"))},r.drag=xt,r.endDrag=function(t){return wt(t||U.pointerEvent,!0)},r.timeSinceDrag=function(){return U.isDragging?0:(_u()-Z)/1e3},r.timeSinceClick=function(){return(_u()-nt)/1e3},r.hitTest=function(t,e){return i.hitTest(U.target,t,e)},r.getDirection=function(t,n){var i,r,o,s,a,l,h="velocity"===t&&Kl?t:su(t)&&!B?"element":"start";return"element"===h&&(a=Hu(U.target),l=Hu(t)),i="start"===h?U.x-u:"velocity"===h?Kl.getVelocity(e,V):a.left+a.width/2-(l.left+l.width/2),B?i<0?"counter-clockwise":"clockwise":(n=n||2,r="start"===h?U.y-c:"velocity"===h?Kl.getVelocity(e,j):a.top+a.height/2-(l.top+l.height/2),s=(o=Math.abs(i/r))<1/n?"":i<0?"left":"right",of?r=f:rg?o=g:o<_&&(o=_),(U.x!==r||U.y!==o)&&(s=!0,U.x=U.endX=r,B?U.endRotation=r:U.y=U.endY=o,b=!0,lt(!0),U.autoScroll&&!U.isDragging))for(Vu(e.parentNode),a=e,Au.scrollTop=null!=zl.pageYOffset?zl.pageYOffset:null!=st.documentElement.scrollTop?st.documentElement.scrollTop:st.body.scrollTop,Au.scrollLeft=null!=zl.pageXOffset?zl.pageXOffset:null!=st.documentElement.scrollLeft?st.documentElement.scrollLeft:st.body.scrollLeft;a&&!u;)l=(u=Iu(a.parentNode))?Au:a.parentNode,Y&&l.scrollTop>l._gsMaxScrollY&&(l.scrollTop=l._gsMaxScrollY),X&&l.scrollLeft>l._gsMaxScrollX&&(l.scrollLeft=l._gsMaxScrollX),a=l;U.isThrowing&&(s||U.endX>f||U.endXg||U.endY<_)&&ft(n.inertia||n.throwProps,s)}return U},r.update=function(t,n,i){if(n&&U.isPressed){var r=ml(e),o=N.apply({x:U.x-u,y:U.y-c}),s=ml(e.parentNode,!0);s.apply({x:r.e-o.x,y:r.f-o.y},o),U.x-=o.x-s.e,U.y-=o.y-s.f,lt(!0),gt()}var a=U.x,l=U.y;return mt(!n),t?U.applyBounds():(b&&i&<(!0),ut(!0)),n&&(bt(U.pointerX,U.pointerY),b&<(!0)),U.isPressed&&!n&&(X&&Math.abs(a-U.x)>.01||Y&&Math.abs(l-U.y)>.01&&!B)&>(),U.autoScroll&&(Vu(e.parentNode,U.isDragging),G=U.isDragging,lt(!0),Fu(e,Tt),zu(e,Tt)),U},r.enable=function(t){var i,r,a,l={lazy:!0};if(!1!==n.cursor&&(l.cursor=n.cursor||Ql),Nl.utils.checkPrefix("touchCallout")&&(l.touchCallout="none"),"soft"!==t){for(Mu(W,X===Y?"none":n.allowNativeTouchScrolling&&e.scrollHeight===e.clientHeight==(e.scrollWidth===e.clientHeight)||n.allowEventDefault?"manipulation":X?"pan-y":"pan-x"),r=W.length;--r>-1;)a=W[r],Jl||Lu(a,"mousedown",yt),Lu(a,"touchstart",yt),Lu(a,"click",At,!0),Nl.set(a,l),a.getBBox&&a.ownerSVGElement&&X!==Y&&Nl.set(a.ownerSVGElement,{touchAction:n.allowNativeTouchScrolling||n.allowEventDefault?"manipulation":X?"pan-y":"pan-x"}),n.allowContextMenu||Lu(a,"contextmenu",at);Qu(W,!1)}return zu(e,Tt),o=!0,Kl&&"soft"!==t&&Kl.track(s||e,I?"x,y":B?"rotation":"top,left"),e._gsDragID=i="d"+xu++,yu[i]=U,s&&(s.enable(),s.element._gsDragID=i),(n.bounds||B)&>(),n.bounds&&U.applyBounds(),U},r.disable=function(t){for(var n,i=U.isDragging,r=W.length;--r>-1;)ju(W[r],"cursor",null);if("soft"!==t){for(Mu(W,null),r=W.length;--r>-1;)n=W[r],ju(n,"touchCallout",null),$u(n,"mousedown",yt),$u(n,"touchstart",yt),$u(n,"click",At),$u(n,"contextmenu",at);Qu(W,!0),k&&($u(k,"touchcancel",wt),$u(k,"touchend",wt),$u(k,"touchmove",xt)),$u(st,"mouseup",wt),$u(st,"mousemove",xt)}return Fu(e,Tt),o=!1,Kl&&"soft"!==t&&Kl.untrack(s||e,I?"x,y":B?"rotation":"top,left"),s&&s.disable(),Su(lt),U.isDragging=U.isPressed=M=!1,i&&Uu(U,"dragend","onDragEnd"),U},r.enabled=function(t,e){return arguments.length?t?U.enable(e):U.disable(e):o},r.kill=function(){return U.isThrowing=!1,U.tween&&U.tween.kill(),U.disable(),Nl.set(W,{clearProps:"userSelect"}),delete yu[e._gsDragID],U},~F.indexOf("scroll")&&(s=r.scrollProxy=new tc(e,function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t}({onKill:function(){U.isPressed&&wt(null)}},n)),e.style.overflowY=Y&&!Wl?"auto":"hidden",e.style.overflowX=X&&!Wl?"auto":"hidden",e=s.content),B?q.rotation=1:(X&&(q[V]=1),Y&&(q[j]=1)),it.force3D=!("force3D"in n)||n.force3D,r.enable(),r}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i.register=function(t){Nl=t,ec()},i.create=function(t,e){return Xl||ec(!0),Hl(t).map((function(t){return new i(t,e)}))},i.get=function(t){return yu[(Hl(t)[0]||{})._gsDragID]},i.timeSinceDrag=function(){return(_u()-wu)/1e3},i.hitTest=function(t,e,n){if(t===e)return!1;var i,r,o,s=Hu(t),a=Hu(e),l=s.top,u=s.left,c=s.right,h=s.bottom,d=s.width,p=s.height,f=a.left>c||a.righth||a.bottom=d*p*n||r>=a.width*a.height*n):i.width>n&&i.height>n))},i}(nc);!function(t,e){for(var n in e)n in t||(t[n]=e[n])}(ic.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1}),ic.zIndex=1e3,ic.version="3.11.3",ru()&&Nl.registerPlugin(ic),ua.registerPlugin(Rl),ua.registerPlugin(ic);const rc={auto:"M18,11V12.5C21.19,12.5 23.09,16.05 21.33,18.71L20.24,17.62C21.06,15.96 19.85,14 18,14V15.5L15.75,13.25L18,11M18,22V20.5C14.81,20.5 12.91,16.95 14.67,14.29L15.76,15.38C14.94,17.04 16.15,19 18,19V17.5L20.25,19.75L18,22M19,3H18V1H16V3H8V1H6V3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H14C13.36,20.45 12.86,19.77 12.5,19H5V8H19V10.59C19.71,10.7 20.39,10.94 21,11.31V5A2,2 0 0,0 19,3Z",heat_cool:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",fan_only:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",dry:ft,window_open:mt,eco:"M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z",summer:pt,temperature:"M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z",humidity:ft};function oc(t){const e=window;e.customCards=e.customCards||[],e.customCards.push(Object.assign(Object.assign({},t),{preview:!0}))}console.info("%c BetterThermostatUI-CARD \n%c version: 1.0.3 ","color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),oc({type:"better-thermostat-ui-card",name:"Better Thermostat Climate Card",description:"Card for climate entity"});let sc=class extends nt{constructor(){super(),this.value=0,this.current=0,this.humidity=0,this.min=0,this.max=35,this.step=1,this.window=!1,this.summer=!1,this.status="loading",this.mode="off",this.dragging=!1,this._init=!0,this._firstRender=!0,this._ignore=!1,this._hasWindow=!1,this._hasSummer=!1,this._oldValueMin=0,this._oldValueMax=0,this._display_bottom=0,this._display_top=0,this.modes=[],this.render=()=>{var t,e,n,i,r,o,s,a,l,u,c,h,d,p,f,m,g,_,v;return N`
${null===(t=this._config)||void 0===t?void 0:t.name}
${this._hasWindow&&!(null===(o=this._config)||void 0===o?void 0:o.disable_window)?z` `:""} ${this._hasSummer&&!(null===(a=this._config)||void 0===a?void 0:a.disable_summer)?z` `:""} ${z`${Qe(this._display_top,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1})}`} ${z` ${this.hass.config.unit_system.temperature} `} ${"unavailable"===(null===(u=null==this?void 0:this.stateObj)||void 0===u?void 0:u.state)||"unknown"===(null===(c=null==this?void 0:this.stateObj)||void 0===c?void 0:c.state)?z` ${this.hass.localize("state.default.unavailable")} `:""} ${0===this.humidity?z` ${z`${Qe(this.current,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1})}`} ${z` ${this.hass.config.unit_system.temperature} `} `:z` ${z`${Qe(this._display_bottom,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1})}`} ${z` ${this.hass.config.unit_system.temperature} `} ${z`${Qe(this.humidity,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1})}`} % `}
${(null==this?void 0:this._hasSummer)?z` ${(null===(h=null==this?void 0:this._config)||void 0===h?void 0:h.disable_heat)?N``:this._renderIcon("heat",this.mode)} ${(null===(d=null==this?void 0:this._config)||void 0===d?void 0:d.disable_eco)?N``:(null===(f=null===(p=null==this?void 0:this.stateObj)||void 0===p?void 0:p.attributes)||void 0===f?void 0:f.saved_temperature)&&"none"!==(null===(g=null===(m=null==this?void 0:this.stateObj)||void 0===m?void 0:m.attributes)||void 0===g?void 0:g.saved_temperature)&&"unavailable"!==(null===(_=null==this?void 0:this.stateObj)||void 0===_?void 0:_.state)?this._renderIcon("eco","eco"):this._renderIcon("eco","none")} ${(null===(v=null==this?void 0:this._config)||void 0===v?void 0:v.disable_off)?N``:this._renderIcon("off",this.mode)} `:z` ${this.modes.map((t=>{var e,n,i;return(null===(e=this._config)||void 0===e?void 0:e.disable_heat)&&"heat"===t||(null===(n=this._config)||void 0===n?void 0:n.disable_eco)&&"eco"===t||(null===(i=this._config)||void 0===i?void 0:i.disable_off)&&"off"===t?N``:this._renderIcon(t,this.mode)}))} `}
`}}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}static async getConfigElement(){return await Promise.resolve().then((function(){return pc})),document.createElement("better-thermostat-ui-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>["climate"].includes(t.split(".")[0]))),n=e.filter((e=>{var n;return null===(n=t.states[e].attributes)||void 0===n?void 0:n.call_for_heat}));return{type:"custom:better-thermostat-ui-card",entity:n[0]||e[0]}}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}getCardSize(){return 1}_percent2bar(t){return 176-1.76*t}_value2percent(t){return(t-this.min)/(this.max-this.min)*100}_percent2value(t){return t/100*(this.max-this.min)+this.min}_updateValue(t){const e=Math.round(t/this.step)*this.step;this.value!==e&&(this.value=e,this._updateDisplay(),this._vibrate(2))}_updateDragger(t){this.dragging=t}_liveSnapPont(t,e){var n;const i=180/Math.PI,r=null===(n=null==t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector("#shadowpath"),o=(null==r?void 0:r.getTotalLength())||0;return function(e){const n=function(t,e,n){let r,o,s=8,a=1/0;for(var l,u,c=0;c<=e;c+=s)(u=f(l=t.getPointAtLength(c))).5;){let n,i,l,u,c,h;(l=o-s)>=0&&(c=f(n=t.getPointAtLength(l))){clearTimeout(u._timeout),0===u._oldValueMin&&(u._oldValueMin=u.value),u._ignore=!0;let t=u.value;t-=u.step,t{t._ignore=!1,t._setTemperature(),t.requestUpdate("value",t._oldValueMin),t._oldValueMin=0}),600,u)})),null===(s=null===(o=null==this?void 0:this.shadowRoot)||void 0===o?void 0:o.querySelector("#c-plus"))||void 0===s||s.addEventListener("click",(()=>{clearTimeout(u._timeout),0===u._oldValueMax&&(u._oldValueMax=u.value),u._ignore=!0;let t=u.value;t+=u.step,t>u.max&&(t=u.max),u.value=t,u._updateDisplay(),u._timeout=setTimeout((t=>{t._ignore=!1,t._setTemperature(),t.requestUpdate("value",t._oldValueMax),t._oldValueMax=0}),600,u)})),ic.create(c,{type:"x,y",edgeResistance:1,liveSnap:{points:t=>this._liveSnapPont(u,t)},onRelease:()=>{u._updateDragger(!1),c.blur(),c.classList.remove("active");let t=new CustomEvent("value-changed",{detail:{value:this.value},bubbles:!0,composed:!0});this.dispatchEvent(t),this._setTemperature()},onPress:()=>{u._vibrate(30),c.classList.add("active"),c.focus()},onDragStart:function(){u._updateDragger(!0)}}),ua.to(c,{duration:0,repeat:0,repeatDelay:0,yoyo:!1,ease:"power1.inOut",motionPath:{path:null===(a=null==this?void 0:this.shadowRoot)||void 0===a?void 0:a.querySelector("#shadowpath"),autoRotate:!1,fromCurrent:!0,useRadians:!0,curviness:2,start:this._value2percent(this.value)/100||0,end:this._value2percent(this.value)/100||0}}),ua.to(h,{duration:0,repeat:0,repeatDelay:0,yoyo:!1,ease:"power1.inOut",motionPath:{path:null===(l=null==this?void 0:this.shadowRoot)||void 0===l?void 0:l.querySelector("#shadowpath"),autoRotate:!1,fromCurrent:!0,useRadians:!0,curviness:2,start:this._value2percent(this.current)/100||0,end:this._value2percent(this.current)/100||0}}),this._init=!1}shouldUpdate(t){return void 0!==t.has("_config")&&void 0!==t.get("_config")&&(this._hasSummer=!1,this._hasWindow=!1,this.humidity=0),void 0!==t.get("hass")&&(this._init=!1),!0}updated(t){var e,n,i,r;if(super.updated(t),this._ignore||this._init||this.dragging)return;const o=null===(e=null==this?void 0:this.shadowRoot)||void 0===e?void 0:e.querySelector(".value-handler"),s=null===(n=null==this?void 0:this.shadowRoot)||void 0===n?void 0:n.querySelector(".current-handler");t.has("value")&&ua.to(o,{duration:this._firstRender?0:5,repeat:0,repeatDelay:0,yoyo:!1,ease:"power1.inOut",motionPath:{path:null===(i=null==this?void 0:this.shadowRoot)||void 0===i?void 0:i.querySelector("#shadowpath"),autoRotate:!1,fromCurrent:!0,useRadians:!0,curviness:2,immediateRender:!0,start:this._value2percent(t.get("value"))/100||0,end:this._value2percent(this.value)/100||0}}),t.has("current")&&ua.to(s,{duration:this._firstRender?0:25,repeat:0,repeatDelay:0,yoyo:!1,ease:"power1.inOut",motionPath:{path:null===(r=null==this?void 0:this.shadowRoot)||void 0===r?void 0:r.querySelector("#shadowpath"),autoRotate:!1,fromCurrent:!0,useRadians:!0,curviness:2,start:this._value2percent(t.get("current"))/100||0,end:this._value2percent(this.current)/100||0}}),this._firstRender=!1}willUpdate(t){if(!this.hass||!this._config||!t.has("hass")&&!t.has("_config"))return;const e=this._config.entity,n=this.hass.states[e];if(!n)return;const i=t.get("hass");if(!i||i.states[e]!==n){if(!this._config||!this.hass||!this._config.entity)return;this.stateObj=n;const t=this.stateObj.attributes,e=this.stateObj.state;this.mode=e||"off",t.hvac_modes&&(this.modes=Object.values(t.hvac_modes)),t.temperature&&(this.value=t.temperature),t.target_temp_step&&(this.step=t.target_temp_step),t.min_temp&&(this.min=t.min_temp),t.max_temp&&(this.max=t.max_temp),t.current_temperature&&(this.current=t.current_temperature),void 0!==(null==t?void 0:t.humidity)&&(this.humidity=parseFloat(t.humidity)),void 0!==(null==t?void 0:t.window_open)&&(this._hasWindow=!0,this.window=t.window_open),void 0!==(null==t?void 0:t.call_for_heat)&&(this._hasSummer=!0,this.summer=!t.call_for_heat),this._updateDisplay()}}_updateDisplay(){var t;(null===(t=null==this?void 0:this._config)||void 0===t?void 0:t.set_current_as_main)?(this._display_bottom=this.value,this._display_top=this.current):(this._display_bottom=this.current,this._display_top=this.value)}_handleAction(t){var e,n,i;if("eco"===t.currentTarget.mode){null===((null===(n=null===(e=null==this?void 0:this.stateObj)||void 0===e?void 0:e.attributes)||void 0===n?void 0:n.saved_temperature)||null)?this.hass.callService("better_thermostat","set_temp_target_temperature",{entity_id:this._config.entity,temperature:(null===(i=this._config)||void 0===i?void 0:i.eco_temperature)||18}):this.hass.callService("better_thermostat","restore_saved_target_temperature",{entity_id:this._config.entity})}else this.hass.callService("climate","set_hvac_mode",{entity_id:this._config.entity,hvac_mode:t.currentTarget.mode})}_setTemperature(){this.hass.callService("climate","set_temperature",{entity_id:this._config.entity,temperature:this.value})}_renderIcon(t,e){if(!rc[t])return N``;const n=this.hass.localize(`component.climate.state._.${t}`)||Xe({hass:this.hass,string:`extra_states.${t}`});return N` `}_handleMoreInfo(){Ke(this,"hass-more-info",{entityId:this._config.entity})}};sc.styles=s` :host { display: block; overflow: hidden; box-sizing: border-box; } ha-card { height: 100%; width: 100%; vertical-align: middle; justify-content: center; justify-items: center; padding-left: 1em; padding-right: 1em; box-sizing: border-box; } .unavailable { opacity: 0.3; } .unavailable #bar, .unavailable .main-value, .unavailable #value,.unavailable #current, .unavailable .current-info, .unknown #bar, .unknown .main-value, .unknown #value,.unknown #current, .unknown .current-info { display: none; } .more-info { position: absolute; cursor: pointer; top: 0px; right: 0px; inset-inline-end: 0px; inset-inline-start: initial; border-radius: 100%; color: var(--secondary-text-color); z-index: 1; direction: var(--direction); } .container { position: relative; width: 100%; height: 100%; } .content { margin: -0.5em auto; position: relative; width: 100%; box-sizing: border-box; } .name { display: block; width: 100%; text-align: center; font-size: 20px; padding-top: 1em; } svg { height: auto; margin: auto; display: block; width: 100%; transform: scale(1.5); -webkit-backface-visibility: hidden; max-width: 255px; } path { stroke-linecap: round; stroke-width: 1; } text { fill: var(--primary-text-color); } .window_open { --mode-color: var(--energy-grid-consumption-color) } .summer { --mode-color: var(--state-not_home-color) } .auto, .heat_cool { --mode-color: var(--state-climate-auto-color); } .cool { --mode-color: var(--state-climate-cool-color); } .heat { --mode-color: var(--label-badge-red); } .manual { --mode-color: var(--state-climate-manual-color); } .off { --mode-color: var(--state-climate-off-color); } .fan_only { --mode-color: var(--state-climate-fan_only-color); } .eco { --mode-color: var(--state-climate-eco-color); } .dry { --mode-color: var(--state-climate-dry-color); } .idle { --mode-color: var(--state-climate-idle-color); } .unknown-mode { --mode-color: var(--state-unknown-color); } #modes { z-index: 1; position: relative; display: flex; width: auto; justify-content: center; margin-top: 1em; margin-bottom: 1em; } #modes > * { color: var(--disabled-text-color); cursor: pointer; display: inline-block; } #modes .selected-icon { color: var(--mode-color); } #shadowpath { stroke: #e7e7e8; } #value { fill: var(--mode-color); r: 5; z-index: 9999 !important; transition: r 0.3s ease-in-out, fill 0.6s ease-in-out; } #value,#current { filter: drop-shadow(0px 0px 1px #000); } #value:hover, #value:active, #value:focus, #value.active { r: 8 !important; } #current { pointer-events: none; fill: var(--label-badge-grey); } .status { transition: fill 0.6s ease-in-out, filter 0.6s ease-in-out; filter: none; } .status.active { fill: var(--error-color); filter: drop-shadow(0px 0px 6px var(--error-color)); } #bar { stroke: var(--mode-color); stroke-dasharray: 176; stroke-dashoffset: 0; transition: stroke-dashoffset 5.1s ease-in-out 0s, stroke 0.6s ease-in-out; } #bar.drag { transition: none !important; } #c-minus,#c-plus { cursor: pointer; } .control { cursor: pointer; pointer-events: none; } ha-icon-button { transition: color 0.6s ease-in-out; } .eco ha-icon-button[title="heat"], .window_open ha-icon-button[title="heat"], .summer ha-icon-button[title="heat"] { --mode-color: var(--disabled-text-color); } .summer,.window { transition: fill 0.3s ease; fill: var(--disabled-text-color); } line { stroke: var(--disabled-text-color); } .summer.active { fill: var(--state-not_home-color); } .window.active { fill: var(--energy-grid-consumption-color); } `,t([st({attribute:!1})],sc.prototype,"hass",void 0),t([st({type:Number})],sc.prototype,"value",void 0),t([st({type:Number})],sc.prototype,"current",void 0),t([st({type:Number})],sc.prototype,"humidity",void 0),t([st({type:Number})],sc.prototype,"min",void 0),t([st({type:Number})],sc.prototype,"max",void 0),t([st({type:Number})],sc.prototype,"step",void 0),t([st({type:Boolean})],sc.prototype,"window",void 0),t([st({type:Boolean})],sc.prototype,"summer",void 0),t([st({type:String})],sc.prototype,"status",void 0),t([st({type:String})],sc.prototype,"mode",void 0),t([st({type:Boolean,reflect:!0})],sc.prototype,"dragging",void 0),t([at()],sc.prototype,"_config",void 0),sc=t([rt("better-thermostat-ui-card")],sc);const ac=function(){for(var t=arguments.length,e=new Array(t),n=0;nt.schema)),o=Object.assign({},...r);return i?vn(o):mn(o)}(mn({index:gn(fn()),view_index:gn(fn()),view_layout:cn("any",(()=>!0)),type:_n()}),mn({entity:gn(_n()),name:gn(_n()),icon:gn(_n())}),mn({disable_window:gn(dn()),disable_summer:gn(dn()),disable_eco:gn(dn()),disable_heat:gn(dn()),disable_off:gn(dn()),set_current_as_main:gn(dn()),eco_temperature:gn(fn())})),lc=["icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],uc=t=>{var e,n;customElements.get("ha-form")&&(customElements.get("hui-action-editor")||((t,e,n,i)=>{const[r,o,s]=t.split(".",3);return Number(r)>e||Number(r)===e&&(void 0===i?Number(o)>=n:Number(o)>n)||void 0!==i&&Number(r)===e&&Number(o)===n&&Number(s)>=i})(t,2022,11))||null===(e=customElements.get("hui-button-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-entity-picker")||null===(n=customElements.get("hui-entities-card"))||void 0===n||n.getConfigElement()},cc=["eco_temperature","disable_window","disable_summer","disable_eco","disable_heat","disable_off","set_current_as_main"],hc=Ze((()=>[{name:"entity",selector:{entity:{domain:["climate"]}}},{name:"name",selector:{text:{}}},{name:"eco_temperature",selector:{number:{placeholder:20,min:5,max:45}}},{type:"grid",name:"",schema:[{name:"disable_window",selector:{boolean:{}}},{name:"disable_summer",selector:{boolean:{}}},{name:"disable_eco",selector:{boolean:{}}},{name:"disable_heat",selector:{boolean:{}}},{name:"disable_off",selector:{boolean:{}}},{name:"set_current_as_main",selector:{boolean:{}}}]}]));let dc=class extends nt{constructor(){super(...arguments),this._computeLabel=t=>{const e=(n=this.hass,function(t){var e;let i=Ye(t,null!==(e=null==n?void 0:n.locale.language)&&void 0!==e?e:"en");return i||(i=Ye(t,"en")),null!=i?i:t});var n;return lc.includes(t.name)?e(`editor.card.generic.${t.name}`):cc.includes(t.name)?e(`editor.card.climate.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),uc(this.hass.connection.haVersion)}setConfig(t){ln(t,ac),this._config=t}render(){if(!this.hass||!this._config)return N``;const t=hc();return N` `}_valueChanged(t){Ke(this,"config-changed",{config:t.detail.value}),Ke(this,"hass",{config:t.detail.value})}};t([at()],dc.prototype,"_config",void 0),t([st({attribute:!1})],dc.prototype,"hass",void 0),dc=t([rt("better-thermostat-ui-card-editor")],dc);var pc=Object.freeze({__proto__:null,get ClimateCardEditor(){return dc}});export{sc as BetterThermostatUi,oc as registerCustomCard};