homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
1 lines • 234 kB
JavaScript
import{a as Ln}from"./chunk-3UI2RHE7.js";import{m as ce,n as ae}from"./chunk-OHFVMRCL.js";import{a as Vn,b as En,c as In,e as ge,l as he,z as le}from"./chunk-MMYB2ZMV.js";import{a as Hn}from"./chunk-2QXNFD4L.js";import{c as Bn}from"./chunk-7LZPZXYJ.js";import{b as Ye}from"./chunk-3P637DAY.js";import{h as Pn,k as An}from"./chunk-SXUVUFAV.js";import{a as kn,e as vi}from"./chunk-R3JWGCC5.js";import{a as Dn,b as D}from"./chunk-KPKQNEWS.js";import{$a as r,Ac as d,Bc as p,Ca as ot,Cc as ve,Fa as rt,G as dn,Gb as V,H as Bt,Hb as h,Ib as C,Ja as gn,Jc as Oi,K as pn,Kb as Ht,Lb as Lt,M as ue,Mb as Ot,Nb as m,Ob as a,Pb as s,Q as mn,Qb as f,Rb as xn,Sb as Sn,Ub as z,Wc as Mn,X as un,Xa as Li,Xb as b,Yb as g,Zc as wn,a as rn,b as an,ba as vn,bd as H,cb as hn,db as li,e as Je,eb as ci,fa as fn,fb as ke,g as Ur,ga as nt,gc as bn,h as ri,ha as xt,hb as Cn,hc as yn,hd as at,i as Hi,jc as c,jd as Le,ka as qe,kc as x,la as L,lb as w,lc as y,mb as St,mc as X,n as re,nb as bt,nc as et,o as sn,ob as di,oc as Tn,pc as pi,pd as ui,qc as J,qd as Nt,r as ln,ra as O,rc as ee,s as cn,sa as N,sc as te,tb as We,ub as _n,uc as mi,w as ai,wc as oe,x as si,xc as I,yc as Ue}from"./chunk-QSPBB6EE.js";var Nn=Je((em,On)=>{On.exports=function(n,t){return Array.prototype.slice.call(n,t)}});var Rn=Je((tm,Fn)=>{var $r=typeof setImmediate=="function",Ni;$r?Ni=function(e){setImmediate(e)}:Ni=function(e){setTimeout(e,0)};Fn.exports=Ni});var jn=Je((im,Gn)=>{"use strict";var zr=Rn();Gn.exports=function(n,t,o){n&&zr(function(){n.apply(o||null,t||[])})}});var $n=Je((nm,Un)=>{"use strict";var Wn=Nn(),qr=jn();Un.exports=function(n,t){var o=t||{},i={};return n===void 0&&(n={}),n.on=function(l,u){return i[l]?i[l].push(u):i[l]=[u],n},n.once=function(l,u){return u._once=!0,n.on(l,u),n},n.off=function(l,u){var T=arguments.length;if(T===1)delete i[l];else if(T===0)i={};else{var E=i[l];if(!E)return n;E.splice(E.indexOf(u),1)}return n},n.emit=function(){var l=Wn(arguments);return n.emitterSnapshot(l.shift()).apply(this,l)},n.emitterSnapshot=function(l){var u=(i[l]||[]).slice(0);return function(){var T=Wn(arguments),E=this||n;if(l==="error"&&o.throws!==!1&&!u.length)throw T.length===1?T[0]:T;return u.forEach(function(G){o.async?qr(G,T,E):G.apply(E,T),G._once&&n.off(l,G)}),n}},n}});var Kn=Je((om,qn)=>{var zn=global.CustomEvent;function Kr(){try{var e=new zn("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}qn.exports=Kr()?zn:typeof document<"u"&&typeof document.createEvent=="function"?function(n,t){var o=document.createEvent("CustomEvent");return t?o.initCustomEvent(n,t.bubbles,t.cancelable,t.detail):o.initCustomEvent(n,!1,!1,void 0),o}:function(n,t){var o=document.createEventObject();return o.type=n,t?(o.bubbles=!!t.bubbles,o.cancelable=!!t.cancelable,o.detail=t.detail):(o.bubbles=!1,o.cancelable=!1,o.detail=void 0),o}});var Zn=Je((rm,Yn)=>{"use strict";var Xn=[],Fi="",Xr=/^on/;for(Fi in global)Xr.test(Fi)&&Xn.push(Fi.slice(2));Yn.exports=Xn});var io=Je((am,to)=>{"use strict";var Yr=Kn(),Zr=Zn(),fi=global.document,Qn=Qr,Jn=ea,Ft=[];global.addEventListener||(Qn=Jr,Jn=ta);to.exports={add:Qn,remove:Jn,fabricate:ia};function Qr(e,n,t,o){return e.addEventListener(n,t,o)}function Jr(e,n,t){return e.attachEvent("on"+n,oa(e,n,t))}function ea(e,n,t,o){return e.removeEventListener(n,t,o)}function ta(e,n,t){var o=eo(e,n,t);if(o)return e.detachEvent("on"+n,o)}function ia(e,n,t){var o=Zr.indexOf(n)===-1?l():i();e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on"+n,o);function i(){var u;return fi.createEvent?(u=fi.createEvent("Event"),u.initEvent(n,!0,!0)):fi.createEventObject&&(u=fi.createEventObject()),u}function l(){return new Yr(n,{detail:t})}}function na(e,n,t){return function(i){var l=i||global.event;l.target=l.target||l.srcElement,l.preventDefault=l.preventDefault||function(){l.returnValue=!1},l.stopPropagation=l.stopPropagation||function(){l.cancelBubble=!0},l.which=l.which||l.keyCode,t.call(e,l)}}function oa(e,n,t){var o=eo(e,n,t)||na(e,n,t);return Ft.push({wrapper:o,element:e,type:n,fn:t}),o}function eo(e,n,t){var o=ra(e,n,t);if(o){var i=Ft[o].wrapper;return Ft.splice(o,1),i}}function ra(e,n,t){var o,i;for(o=0;o<Ft.length;o++)if(i=Ft[o],i.element===e&&i.type===n&&i.fn===t)return o}});var ao=Je((sm,ro)=>{"use strict";var no={},aa="(?:^|\\s)",sa="(?:\\s|$)";function oo(e){var n=no[e];return n?n.lastIndex=0:no[e]=n=new RegExp(aa+e+sa,"g"),n}function la(e,n){var t=e.className;t.length?oo(n).test(t)||(e.className+=" "+n):e.className=n}function ca(e,n){e.className=e.className.replace(oo(n)," ").trim()}ro.exports={add:la,rm:ca}});var ho=Je((lm,go)=>{"use strict";var da=$n(),yt=io(),st=ao(),Tt=document,Ze=Tt.documentElement;function pa(e,n){var t=arguments.length;t===1&&Array.isArray(e)===!1&&(n=e,e=[]);var o,i,l,u,T,E,P,G,Q,Y,W,Se=null,ne,F=n||{};F.moves===void 0&&(F.moves=po),F.accepts===void 0&&(F.accepts=po),F.invalid===void 0&&(F.invalid=Xt),F.containers===void 0&&(F.containers=e||[]),F.isContainer===void 0&&(F.isContainer=ua),F.copy===void 0&&(F.copy=!1),F.copySortSource===void 0&&(F.copySortSource=!1),F.revertOnSpill===void 0&&(F.revertOnSpill=!1),F.removeOnSpill===void 0&&(F.removeOnSpill=!1),F.direction===void 0&&(F.direction="vertical"),F.ignoreInputTextSelection===void 0&&(F.ignoreInputTextSelection=!0),F.mirrorContainer===void 0&&(F.mirrorContainer=Tt.body);var fe=da({containers:F.containers,start:Vi,end:ht,cancel:Zt,remove:wt,destroy:gt,canMove:ki,dragging:!1});return F.removeOnSpill===!0&&fe.on("over",Et).on("out",It),tt(),fe;function Fe(M){return fe.containers.indexOf(M)!==-1||F.isContainer(M)}function tt(M){var U=M?"remove":"add";Rt(Ze,U,"mousedown",ze),Rt(Ze,U,"mouseup",Mt)}function Xe(M){var U=M?"remove":"add";Rt(Ze,U,"mousemove",wi)}function dt(M){var U=M?"remove":"add";yt[U](Ze,"selectstart",qt),yt[U](Ze,"click",qt)}function gt(){tt(!0),Mt({})}function qt(M){ne&&M.preventDefault()}function ze(M){E=M.clientX,P=M.clientY;var U=so(M)!==1||M.metaKey||M.ctrlKey;if(!U){var Z=M.target,se=pt(Z);se&&(ne=se,Xe(),M.type==="mousedown"&&(vo(Z)?Z.focus():M.preventDefault()))}}function wi(M){if(ne){if(so(M)===0){Mt({});return}if(!(M.clientX!==void 0&&Math.abs(M.clientX-E)<=(F.slideFactorX||0)&&M.clientY!==void 0&&Math.abs(M.clientY-P)<=(F.slideFactorY||0))){if(F.ignoreInputTextSelection){var U=lt("clientX",M)||0,Z=lt("clientY",M)||0,se=Tt.elementFromPoint(U,Z);if(vo(se))return}var Pe=ne;Xe(!0),dt(),ht(),Kt(Pe);var Me=ma(l);u=lt("pageX",M)-Me.left,T=lt("pageY",M)-Me.top,st.add(Y||l,"gu-transit"),Jt(),Vt(M)}}}function pt(M){if(!(fe.dragging&&o)&&!Fe(M)){for(var U=M;Oe(M)&&Fe(Oe(M))===!1;)if(F.invalid(M,U)||(M=Oe(M),!M))return;var Z=Oe(M);if(Z&&!F.invalid(M,U)){var se=F.moves(M,Z,U,Gt(M));if(se)return{item:M,source:Z}}}}function ki(M){return!!pt(M)}function Vi(M){var U=pt(M);U&&Kt(U)}function Kt(M){Ei(M.item,M.source)&&(Y=M.item.cloneNode(!0),fe.emit("cloned",Y,M.item,"copy")),i=M.source,l=M.item,G=Q=Gt(M.item),fe.dragging=!0,fe.emit("drag",l,i)}function Xt(){return!1}function ht(){if(fe.dragging){var M=Y||l;Ct(M,Oe(M))}}function Yt(){ne=!1,Xe(!0),dt(!0)}function Mt(M){if(Yt(),!!fe.dragging){var U=Y||l,Z=lt("clientX",M)||0,se=lt("clientY",M)||0,Pe=co(o,Z,se),Me=Qt(Pe,Z,se);Me&&(Y&&F.copySortSource||!Y||Me!==i)?Ct(U,Me):F.removeOnSpill?wt():Zt()}}function Ct(M,U){var Z=Oe(M);Y&&F.copySortSource&&U===i&&Z.removeChild(l),_t(U)?fe.emit("cancel",M,i,i):fe.emit("drop",M,U,i,Q),kt()}function wt(){if(fe.dragging){var M=Y||l,U=Oe(M);U&&U.removeChild(M),fe.emit(Y?"cancel":"remove",M,U,i),kt()}}function Zt(M){if(fe.dragging){var U=arguments.length>0?M:F.revertOnSpill,Z=Y||l,se=Oe(Z),Pe=_t(se);Pe===!1&&U&&(Y?se&&se.removeChild(Y):i.insertBefore(Z,G)),Pe||U?fe.emit("cancel",Z,i,i):fe.emit("drop",Z,se,i,Q),kt()}}function kt(){var M=Y||l;Yt(),Qe(),M&&st.rm(M,"gu-transit"),W&&clearTimeout(W),fe.dragging=!1,Se&&fe.emit("out",M,Se,i),fe.emit("dragend",M),i=l=Y=G=Q=W=Se=null}function _t(M,U){var Z;return U!==void 0?Z=U:o?Z=Q:Z=Gt(Y||l),M===i&&Z===G}function Qt(M,U,Z){for(var se=M;se&&!Pe();)se=Oe(se);return se;function Pe(){var Me=Fe(se);if(Me===!1)return!1;var it=ei(se,M),Ve=Dt(se,it,U,Z),je=_t(se,Ve);return je?!0:F.accepts(l,se,i,Ve)}}function Vt(M){if(!o)return;M.preventDefault();var U=lt("clientX",M)||0,Z=lt("clientY",M)||0,se=U-u,Pe=Z-T;o.style.left=se+"px",o.style.top=Pe+"px";var Me=Y||l,it=co(o,U,Z),Ve=Qt(it,U,Z),je=Ve!==null&&Ve!==Se;(je||Ve===null)&&(ti(),Se=Ve,Pt());var He=Oe(Me);if(Ve===i&&Y&&!F.copySortSource){He&&He.removeChild(Me);return}var Ee,me=ei(Ve,it);if(me!==null)Ee=Dt(Ve,me,U,Z);else if(F.revertOnSpill===!0&&!Y)Ee=G,Ve=i;else{Y&&He&&He.removeChild(Me);return}(Ee===null&&je||Ee!==Me&&Ee!==Gt(Me))&&(Q=Ee,Ve.insertBefore(Me,Ee),fe.emit("shadow",Me,Ve,i));function Re(ii){fe.emit(ii,Me,Se,i)}function Pt(){je&&Re("over")}function ti(){Se&&Re("out")}}function Et(M){st.rm(M,"gu-hide")}function It(M){fe.dragging&&st.add(M,"gu-hide")}function Jt(){if(!o){var M=l.getBoundingClientRect();o=l.cloneNode(!0),o.style.width=mo(M)+"px",o.style.height=uo(M)+"px",st.rm(o,"gu-transit"),st.add(o,"gu-mirror"),F.mirrorContainer.appendChild(o),Rt(Ze,"add","mousemove",Vt),st.add(F.mirrorContainer,"gu-unselectable"),fe.emit("cloned",o,l,"mirror")}}function Qe(){o&&(st.rm(F.mirrorContainer,"gu-unselectable"),Rt(Ze,"remove","mousemove",Vt),Oe(o).removeChild(o),o=null)}function ei(M,U){for(var Z=U;Z!==M&&Oe(Z)!==M;)Z=Oe(Z);return Z===Ze?null:Z}function Dt(M,U,Z,se){var Pe=F.direction==="horizontal",Me=U!==M?Ve():it();return Me;function it(){var He=M.children.length,Ee,me,Re;for(Ee=0;Ee<He;Ee++)if(me=M.children[Ee],Re=me.getBoundingClientRect(),Pe&&Re.left+Re.width/2>Z||!Pe&&Re.top+Re.height/2>se)return me;return null}function Ve(){var He=U.getBoundingClientRect();return je(Pe?Z>He.left+mo(He)/2:se>He.top+uo(He)/2)}function je(He){return He?Gt(U):U}}function Ei(M,U){return typeof F.copy=="boolean"?F.copy:F.copy(M,U)}}function Rt(e,n,t,o){var i={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},l={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},u={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};global.navigator.pointerEnabled?yt[n](e,l[t],o):global.navigator.msPointerEnabled?yt[n](e,u[t],o):(yt[n](e,i[t],o),yt[n](e,t,o))}function so(e){if(e.touches!==void 0)return e.touches.length;if(e.which!==void 0&&e.which!==0)return e.which;if(e.buttons!==void 0)return e.buttons;var n=e.button;if(n!==void 0)return n&1?1:n&2?3:n&4?2:0}function ma(e){var n=e.getBoundingClientRect();return{left:n.left+lo("scrollLeft","pageXOffset"),top:n.top+lo("scrollTop","pageYOffset")}}function lo(e,n){return typeof global[n]<"u"?global[n]:Ze.clientHeight?Ze[e]:Tt.body[e]}function co(e,n,t){e=e||{};var o=e.className||"",i;return e.className+=" gu-hide",i=Tt.elementFromPoint(n,t),e.className=o,i}function ua(){return!1}function po(){return!0}function mo(e){return e.width||e.right-e.left}function uo(e){return e.height||e.bottom-e.top}function Oe(e){return e.parentNode===Tt?null:e.parentNode}function vo(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"||fo(e)}function fo(e){return!e||e.contentEditable==="false"?!1:e.contentEditable==="true"?!0:fo(Oe(e))}function Gt(e){return e.nextElementSibling||n();function n(){var t=e;do t=t.nextSibling;while(t&&t.nodeType!==1);return t}}function va(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function lt(e,n){var t=va(n),o={pageX:"clientX",pageY:"clientY"};return e in o&&!(e in t)&&o[e]in t&&(e=o[e]),t[e]}go.exports=pa});var Wi=Ur(ho(),1),Ri=class{constructor(n,t,o){this.name=n,this.drake=t,this.options=o,this.initEvents=!1}},pe=function(e){return e.Cancel="cancel",e.Cloned="cloned",e.Drag="drag",e.DragEnd="dragend",e.Drop="drop",e.Out="out",e.Over="over",e.Remove="remove",e.Shadow="shadow",e.DropModel="dropModel",e.RemoveModel="removeModel",e}(pe||{}),fa=Object.keys(pe).map(e=>pe[e]),ga=Wi.default||Wi,jt=class{constructor(n=ga){this.build=n}},ut=(e,n,t)=>o=>o.pipe(Bt(({event:i,name:l})=>i===e&&(n===void 0||l===n)),si(({name:i,args:l})=>t(i,l))),ha=(e,[n,t,o])=>({name:e,el:n,container:t,source:o}),Gi=(()=>{let n=class n{constructor(o){this.drakeFactory=o,this.groups={},this.dispatch$=new re,this.elContainerSource=i=>l=>this.dispatch$.pipe(ut(i,l,ha)),this.cancel=this.elContainerSource(pe.Cancel),this.remove=this.elContainerSource(pe.Remove),this.shadow=this.elContainerSource(pe.Shadow),this.over=this.elContainerSource(pe.Over),this.out=this.elContainerSource(pe.Out),this.drag=i=>this.dispatch$.pipe(ut(pe.Drag,i,(l,[u,T])=>({name:l,el:u,source:T}))),this.dragend=i=>this.dispatch$.pipe(ut(pe.DragEnd,i,(l,[u])=>({name:l,el:u}))),this.drop=i=>this.dispatch$.pipe(ut(pe.Drop,i,(l,[u,T,E,P])=>({name:l,el:u,target:T,source:E,sibling:P}))),this.cloned=i=>this.dispatch$.pipe(ut(pe.Cloned,i,(l,[u,T,E])=>({name:l,clone:u,original:T,cloneType:E}))),this.dropModel=i=>this.dispatch$.pipe(ut(pe.DropModel,i,(l,[u,T,E,P,G,Q,Y,W,Se])=>({name:l,el:u,target:T,source:E,sibling:P,item:G,sourceModel:Q,targetModel:Y,sourceIndex:W,targetIndex:Se}))),this.removeModel=i=>this.dispatch$.pipe(ut(pe.RemoveModel,i,(l,[u,T,E,P,G,Q])=>({name:l,el:u,container:T,source:E,item:P,sourceModel:G,sourceIndex:Q}))),(this.drakeFactory===null||this.drakeFactory===void 0)&&(this.drakeFactory=new jt)}add(o){if(this.find(o.name))throw new Error('Group named: "'+o.name+'" already exists.');return this.groups[o.name]=o,this.handleModels(o),this.setupEvents(o),o}find(o){return this.groups[o]}destroy(o){let i=this.find(o);i&&(i.drake&&i.drake.destroy(),delete this.groups[o])}createGroup(o,i){return this.add(new Ri(o,this.drakeFactory.build([],i),i))}handleModels({name:o,drake:i,options:l}){let u,T,E;i.on("remove",(P,G,Q)=>{if(!i.models)return;let Y=i.models[i.containers.indexOf(Q)];Y=Y.slice(0);let W=Y.splice(T,1)[0];this.dispatch$.next({event:pe.RemoveModel,name:o,args:[P,G,Q,W,Y,T]})}),i.on("drag",(P,G)=>{i.models&&(u=P,T=this.domIndexOf(P,G))}),i.on("drop",(P,G,Q,Y)=>{if(!i.models||!G)return;E=this.domIndexOf(P,G);let W=i.models[i.containers.indexOf(Q)],Se=i.models[i.containers.indexOf(G)],ne;if(G===Q)W=W.slice(0),ne=W.splice(T,1)[0],W.splice(E,0,ne),Se=W;else{let F=u!==P;if(ne=W[T],F){if(!l.copyItem)throw new Error("If you have enabled `copy` on a group, you must provide a `copyItem` function.");ne=l.copyItem(ne)}if(F||(W=W.slice(0),W.splice(T,1)),Se=Se.slice(0),Se.splice(E,0,ne),F)try{G.removeChild(P)}catch{}}this.dispatch$.next({event:pe.DropModel,name:o,args:[P,G,Q,Y,ne,W,Se,T,E]})})}setupEvents(o){if(o.initEvents)return;o.initEvents=!0;let i=o.name,l=this,u=T=>{switch(T){case pe.Drag:o.drake.on(T,(...E)=>{this.dispatch$.next({event:T,name:i,args:E})});break;case pe.Drop:o.drake.on(T,(...E)=>{this.dispatch$.next({event:T,name:i,args:E})});break;case pe.DragEnd:o.drake.on(T,(...E)=>{this.dispatch$.next({event:T,name:i,args:E})});break;case pe.Cancel:case pe.Remove:case pe.Shadow:case pe.Over:case pe.Out:o.drake.on(T,(...E)=>{this.dispatch$.next({event:T,name:i,args:E})});break;case pe.Cloned:o.drake.on(T,(...E)=>{this.dispatch$.next({event:T,name:i,args:E})});break;case pe.DropModel:o.drake.on(T,(...E)=>{this.dispatch$.next({event:T,name:i,args:E})});break;case pe.RemoveModel:o.drake.on(T,(...E)=>{this.dispatch$.next({event:T,name:i,args:E})});break;default:break}};fa.forEach(u)}domIndexOf(o,i){if(i)return Array.prototype.indexOf.call(i.children,o)}};n.\u0275fac=function(i){return new(i||n)(qe(jt,8))},n.\u0275prov=nt({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),Cm=(()=>{let n=class n{get container(){return this.el&&this.el.nativeElement}constructor(o,i){this.el=o,this.dragulaService=i,this.dragulaModelChange=new We}ngOnChanges(o){if(o&&o.dragula){let{previousValue:i,currentValue:l,firstChange:u}=o.dragula,T=!!i,E=!!l;T&&this.teardown(i),E&&this.setup()}else if(o&&o.dragulaModel){let{previousValue:i,currentValue:l,firstChange:u}=o.dragulaModel,T=this.group?.drake;if(this.dragula&&T){T.models=T.models||[];let E=T.models.indexOf(i);E!==-1?(T.models.splice(E,1),l&&T.models.splice(E,0,l)):l&&T.models.push(l)}}}setup(){let o=l=>{this.dragulaModel&&(l.drake?.models?l.drake?.models?.push(this.dragulaModel):l.drake&&(l.drake.models=[this.dragulaModel]))};if(!this.dragula)return;let i=this.dragulaService.find(this.dragula);if(!i){let l={};i=this.dragulaService.createGroup(this.dragula,l)}o(i),i.drake?.containers.push(this.container),this.subscribe(this.dragula),this.group=i}subscribe(o){this.subs=new Hi,this.subs.add(this.dragulaService.dropModel(o).subscribe(({source:i,target:l,sourceModel:u,targetModel:T})=>{i===this.el.nativeElement?this.dragulaModelChange.emit(u):l===this.el.nativeElement&&this.dragulaModelChange.emit(T)})),this.subs.add(this.dragulaService.removeModel(o).subscribe(({source:i,sourceModel:l})=>{i===this.el.nativeElement&&this.dragulaModelChange.emit(l)}))}teardown(o){this.subs&&this.subs.unsubscribe();let i=this.dragulaService.find(o);if(i){let l=i.drake?.containers.indexOf(this.el.nativeElement);if(l!==-1&&i.drake?.containers.splice(l,1),this.dragulaModel&&i.drake&&i.drake.models){let u=i.drake.models.indexOf(this.dragulaModel);u!==-1&&i.drake.models.splice(u,1)}}}ngOnDestroy(){this.dragula&&this.teardown(this.dragula)}};n.\u0275fac=function(i){return new(i||n)(ke(rt),ke(Gi))},n.\u0275dir=bt({type:n,selectors:[["","dragula",""]],inputs:{dragula:"dragula",dragulaModel:"dragulaModel"},outputs:{dragulaModelChange:"dragulaModelChange"},standalone:!1,features:[ot]});let e=n;return e})(),_m=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[Gi]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=St({type:n}),n.\u0275inj=xt({providers:[Gi]});let e=n;return e})(),xm=new jt((e,n)=>new ji(e,n)),ji=class{constructor(n=[],t={},o){this.containers=n,this.options=t,this.models=o,this.emitter$=new re,this.subs=new Hi,this.dragging=!1}on(n,t){this.subs.add(this.emitter$.pipe(Bt(({eventType:o})=>o===n)).subscribe(({eventType:o,args:i})=>{if(o===pe.Drag){let l=Array.from(i),u=l[0],T=l[1];t(u,T);return}if(o===pe.Drop){let l=Array.from(i),u=l[0],T=l[1],E=l[2],P=l[3];t(u,T,E,P);return}if(o===pe.Remove){let l=Array.from(i),u=l[0],T=l[1],E=l[2];t(u,T,E);return}t(i)}))}start(n){this.dragging=!0}end(){this.dragging=!1}cancel(n){this.dragging=!1}canMove(n){return this.options.accepts?this.options.accepts(n):!1}remove(){this.dragging=!1}destroy(){this.subs.unsubscribe()}emit(n,...t){this.emitter$.next({eventType:n,args:t})}};var $e=(()=>{class e{$settings=L(Ye);constructor(){}transform(t,o=this.$settings.env.temperatureUnits){return o==="f"?t*1.8+32:t}static \u0275fac=function(o){return new(o||e)};static \u0275pipe=di({name:"convertTemp",type:e,pure:!0})}return e})();function Ca(e,n){if(e&1&&c(0),e&2){let t=g().$implicit;y(" ",t.value,"% ")}}function _a(e,n){if(e&1&&(c(0),d(1,"convertTemp")),e&2){let t=g().$implicit;y(" ",p(1,1,t.value),"\xB0 ")}}function xa(e,n){if(e&1&&c(0),e&2){let t=g().$implicit;y(" ",t.value," ")}}function Sa(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),s(),a(3,"span",20),h(4,Ca,1,1)(5,_a,2,3)(6,xa,1,1),s()()),e&2){let t,o=n.$implicit;r(2),x(o.description),r(2),C((t=o.unit)==="percentage"?4:t==="celsius"?5:6)}}function ba(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),d(3,"translate"),s(),a(4,"span",20),c(5),s()()),e&2){let t=g(2);r(2),x(p(3,2,"child_bridge.config.platform")),r(3),x(t.matchedCachedAccessory.platform)}}function ya(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),d(3,"translate"),s(),a(4,"span",20),c(5),s()()),e&2){let t=g(2);r(2),x(p(3,2,"child_bridge.config.accessory")),r(3),x(t.matchedCachedAccessory.accessory)}}function Ta(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),d(3,"translate"),s(),a(4,"span",20),c(5),s()(),h(6,ba,6,4,"li",19),h(7,ya,6,4,"li",19)),e&2){let t=g();r(2),x(p(3,4,"accessories.plugin")),r(3),x(t.matchedCachedAccessory.plugin),r(),C(t.matchedCachedAccessory.platform?6:-1),r(),C(t.matchedCachedAccessory.accessory?7:-1)}}function Ma(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),s(),a(3,"span",20),c(4),s()()),e&2){let t=n.$implicit;r(2),x(t.key),r(2),x(t.value)}}function wa(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),d(3,"translate"),s(),a(4,"span",20),c(5),s()()),e&2){let t=g();r(2),x(p(3,2,"accessories.bridge_name")),r(3),x(t.matchedCachedAccessory.bridge)}}function ka(e,n){if(e&1){let t=z();a(0,"li",19)(1,"span",22),c(2,"UUID"),s(),a(3,"span",20),c(4),s()(),a(5,"li",27)(6,"span",11),c(7),d(8,"translate"),s(),a(9,"button",28),b("click",function(){O(t);let i=g();return N(i.removeSingleCachedAccessories())}),f(10,"i",29),s()()}if(e&2){let t=g();r(4),x(t.matchedCachedAccessory.UUID),r(3),x(p(8,2,"accessories.button_remove"))}}var Co=(()=>{class e{$activeModal=L(ce);$modal=L(ae);service;accessoryCache;pairingCache;accessoryInformation;matchedCachedAccessory=null;constructor(){}ngOnInit(){this.accessoryInformation=Object.entries(this.service.accessoryInformation).map(([t,o])=>({key:t,value:o})),this.matchedCachedAccessory=this.matchToCachedAccessory()}matchToCachedAccessory(){let t=this.service.instance.username,o=this.pairingCache.find(i=>i._username===t);if(o){let i=o._main?"cachedAccessories":`cachedAccessories.${o._id}`,l=this.accessoryCache.filter(u=>u.$cacheFile===i);if(l.length){let u=this.service.accessoryInformation.Name,T=this.service.accessoryInformation["Serial Number"],E=l.filter(P=>{let G=P.services.find(W=>W.constructorName==="AccessoryInformation"),Q=G.characteristics.find(W=>W.displayName==="Name"),Y=G.characteristics.find(W=>W.displayName==="Serial Number");return Q.value===u&&Y.value===T});if(E.length===1)return an(rn({},E[0]),{bridge:o.name})}}}removeSingleCachedAccessories(){this.$activeModal.close();let t=this.$modal.open(Ln,{size:"lg",backdrop:"static"});t.componentInstance.selectedBridge=this.service.instance.username.replaceAll(":","")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service",accessoryCache:"accessoryCache",pairingCache:"pairingCache"},decls:95,vars:59,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"list-group","list-group-box","mb-3"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","id","form-name","autocomplete","off",1,"form-control","custom-input",3,"ngModelChange","ngModel"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","hide-accessory",1,"rendux-input",3,"ngModelChange","ngModel"],["for","hide-accessory",1,"rendux-label","ms-3"],["type","checkbox","id","show-on-dashboard",1,"rendux-input","mb-0",3,"ngModelChange","ngModel"],["for","show-on-dashboard",1,"rendux-label","ms-3"],[1,"list-group-item"],[1,"mb-0","text-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-left","flex-column","flex-md-row"],[1,"text-start","text-md-end","grey-text","font-monospace"],[1,"list-group","list-group-box","mb-0"],[1,"text-start","font-monospace"],[1,"modal-footer","justify-content-between"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),c(3),s(),a(4,"button",3),d(5,"translate"),b("click",function(){return i.$activeModal.dismiss("Dismiss")}),s()(),a(6,"div",4)(7,"ul",5)(8,"li",6)(9,"label",7),c(10),d(11,"translate"),s(),a(12,"div",8)(13,"input",9),b("ngModelChange",function(u){return i.service.customName=u}),s()()(),a(14,"li",10)(15,"span",11),c(16),d(17,"translate"),s(),a(18,"div",12)(19,"input",13),d(20,"translate"),te("ngModelChange",function(u){return ee(i.service.hidden,u)||(i.service.hidden=u),u}),s(),f(21,"label",14),s()(),a(22,"li",10)(23,"span",11),c(24),d(25,"translate"),s(),a(26,"div",12)(27,"input",15),d(28,"translate"),te("ngModelChange",function(u){return ee(i.service.onDashboard,u)||(i.service.onDashboard=u),u}),s(),f(29,"label",16),s()()(),a(30,"ul",5)(31,"li",17)(32,"h6",18),c(33),d(34,"translate"),s()(),a(35,"li",19)(36,"span",11),c(37),d(38,"translate"),s(),a(39,"span",20),c(40),s()(),a(41,"li",19)(42,"span",11),c(43),d(44,"translate"),s(),a(45,"span",20),c(46),s()(),Lt(47,Sa,7,2,"li",19,Ht),s(),a(49,"ul",21)(50,"li",17)(51,"h6",18),c(52),d(53,"translate"),s()(),h(54,Ta,8,6),Lt(55,Ma,5,2,"li",19,Ht),a(57,"li",19)(58,"span",11),c(59),d(60,"translate"),s(),a(61,"span",20),c(62),s()(),h(63,wa,6,4,"li",19),a(64,"li",19)(65,"span",11),c(66),d(67,"translate"),s(),a(68,"span",20),c(69),s()(),a(70,"li",19)(71,"span",11),c(72),d(73,"translate"),s(),a(74,"span",20),c(75),s()(),a(76,"li",19)(77,"span",22),c(78,"aid"),s(),a(79,"span",20),c(80),s()(),a(81,"li",19)(82,"span",22),c(83,"iid"),s(),a(84,"span",20),c(85),s()(),h(86,ka,11,4),s()(),a(87,"div",23),f(88,"div",11),a(89,"div",24)(90,"button",25),d(91,"translate"),b("click",function(){return i.$activeModal.dismiss("Dismiss")}),c(92),d(93,"translate"),s()(),f(94,"div",26),s()()),o&2&&(r(3),x(i.service.customName||i.service.serviceName),r(),V("aria-label",p(5,29,"form.button_close")),r(6),x(p(11,31,"accessories.custom_name")),r(3),m("ngModel",i.service.customName||i.service.serviceName),r(3),x(p(17,33,"accessories.hide_this_accessory")),r(3),J("ngModel",i.service.hidden),V("aria-label",p(20,35,"accessories.hide_this_accessory")),r(5),x(p(25,37,"accessories.show_on_dashboard")),r(3),J("ngModel",i.service.onDashboard),V("aria-label",p(28,39,"accessories.show_on_dashboard")),r(6),x(p(34,41,"accessories.service_info")),r(4),x(p(38,43,"accessories.service")),r(3),x(i.service.humanType),r(3),x(p(44,45,"accessories.name")),r(3),x(i.service.serviceName),r(),Ot(i.service.serviceCharacteristics),r(5),x(p(53,47,"accessories.accessory_info")),r(2),C(i.matchedCachedAccessory?54:-1),r(),Ot(i.accessoryInformation),r(4),x(p(60,49,"accessories.bridge_username")),r(3),x(i.service.instance.username),r(),C(i.matchedCachedAccessory?63:-1),r(3),x(p(67,51,"accessories.bridge_ip")),r(3),x(i.service.instance.ipAddress),r(3),x(p(73,53,"accessories.bridge_port")),r(3),x(i.service.instance.port),r(5),x(i.service.aid),r(5),x(i.service.iid),r(),C(i.matchedCachedAccessory?86:-1),r(4),V("aria-label",p(91,55,"form.button_close")),r(2),y(" ",p(93,57,"form.button_close")," "))},dependencies:[le,In,En,ge,he,D,$e],encapsulation:2})}return e})();var _o=(()=>{class e{$api=L(An);$auth=L(Bn);$modal=L(ae);$toastr=L(Pn);$translate=L(Dn);$ws=L(Hn);layoutSaved=new re;accessoryData=new re;readyForControl=!1;accessoryLayout;accessories={services:[]};rooms=[];io;roomsOrdered=!1;hiddenTypes=["InputSource","LockManagement","CameraRTPStreamManagement","ProtocolInformation"];accessoryCache=[];pairingCache=[];constructor(){ai(this.$api.get("/server/cached-accessories")).then(t=>{this.accessoryCache=t}).catch(t=>console.error(t)),ai(this.$api.get("/server/pairings")).then(t=>{this.pairingCache=t}).catch(t=>console.error(t))}showAccessoryInformation(t){let o=this.$modal.open(Co,{size:"lg",backdrop:"static"});return o.componentInstance.service=t,o.componentInstance.accessoryCache=this.accessoryCache,o.componentInstance.pairingCache=this.pairingCache,o.result.then(()=>this.saveLayout()).catch(()=>this.saveLayout()),!1}stop(){this.io.end(),this.rooms=[],this.accessories={services:[]},this.roomsOrdered=!1,delete this.accessoryLayout}start(){return ri(this,null,function*(){this.readyForControl=!1,this.io=this.$ws.connectToNamespace("accessories"),yield this.loadLayout(),this.io.connected?(this.io.socket.emit("get-accessories"),setTimeout(()=>{this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")})},1e3)):this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")}),this.io.socket.on("accessories-data",t=>{this.parseServices(t),this.generateHelpers(),this.sortIntoRooms(),this.roomsOrdered||(this.orderRooms(),this.applyCustomAttributes(),this.roomsOrdered=!0),this.accessoryData.next(t)}),this.io.socket.on("accessories-reload-required",()=>ri(this,null,function*(){this.stop(),yield this.start()})),this.io.socket.on("accessory-control-failure",t=>{console.error(t),this.$toastr.error(t,this.$translate.instant("toast.title_error"))}),this.io.socket.on("accessories-ready-for-control",()=>{this.readyForControl=!0})})}saveLayout(){this.accessoryLayout=this.rooms.map(t=>({name:t.name,services:t.services.map(o=>({uniqueId:o.uniqueId,aid:o.aid,iid:o.iid,uuid:o.uuid,customName:o.customName||void 0,hidden:o.hidden||void 0,onDashboard:o.onDashboard||void 0}))})).filter(t=>t.services.length),this.io.request("save-layout",{user:this.$auth.user.username,layout:this.accessoryLayout}).subscribe({next:()=>this.layoutSaved.next(void 0),error:t=>{console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}loadLayout(){return ri(this,null,function*(){this.accessoryLayout=yield ai(this.io.request("get-layout",{user:this.$auth.user.username})),this.rooms=this.accessoryLayout.map(t=>({name:t.name,services:[]}))})}parseServices(t){if(!this.accessories.services.length){this.accessories.services=t;return}t.forEach(o=>{let i=this.accessories.services.find(l=>l.uniqueId===o.uniqueId);o.type==="LockMechanism"&&this.attachLockManagementToMechanism(o),i?Object.assign(i,o):this.accessories.services.push(o)})}sortIntoRooms(){this.accessories.services.forEach(t=>{if(this.hiddenTypes.includes(t.type))return;if(t.linked&&(t.linkedServices={},t.linked.forEach(i=>{t.linkedServices[i]=this.accessories.services.find(l=>l.aid===t.aid&&l.iid===i&&l.instance.username===t.instance.username)})),!this.rooms.find(i=>i.services.find(l=>l.uniqueId===t.uniqueId))){let i=this.accessoryLayout.find(l=>l.services.find(u=>u.uniqueId===t.uniqueId));if(i)this.rooms.find(l=>l.name===i.name).services.push(t);else{let l=this.rooms.find(u=>u.name==="Default Room");l?l.services.push(t):this.rooms.push({name:"Default Room",services:[t]})}}})}orderRooms(){this.rooms.forEach(t=>{let o=this.accessoryLayout.find(i=>i.name===t.name);t.services.sort((i,l)=>{let u=o.services.findIndex(E=>E.uniqueId===i.uniqueId),T=o.services.findIndex(E=>E.uniqueId===l.uniqueId);return u<T?-1:u>T?1:0})})}applyCustomAttributes(){this.rooms.forEach(t=>{let o=this.accessoryLayout.find(i=>i.name===t.name);t.services.forEach(i=>{let l=o.services.find(u=>u.uniqueId===i.uniqueId);Object.assign(i,l)})})}generateHelpers(){this.accessories.services.forEach(t=>{t.getCharacteristic||(t.getCharacteristic=o=>{let i=t.serviceCharacteristics.find(l=>l.type===o);return i?(i.setValue=l=>new Promise(u=>(this.readyForControl||u(void 0),this.io.socket.emit("accessory-control",{set:{uniqueId:t.uniqueId,aid:t.aid,siid:t.iid,iid:i.iid,value:l}}),u(void 0))),i):null})})}attachLockManagementToMechanism(t){let o=[],i=[];for(let l of this.accessories.services)l.type==="LockMechanism"&&l.accessoryInformation.Name===t.accessoryInformation.Name&&l.accessoryInformation["Serial Number"]===t.accessoryInformation["Serial Number"]?o.push(l):l.type==="LockManagement"&&l.accessoryInformation.Name===t.accessoryInformation.Name&&l.accessoryInformation["Serial Number"]===t.accessoryInformation["Serial Number"]&&i.push(l);if(o.length===1&&i.length===1){let l=i[0];t.linkedServices||(t.linkedServices={}),t.linkedServices[l.iid]=l}}static \u0275fac=function(o){return new(o||e)};static \u0275prov=nt({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var vt=function(){function e(){}return e}();var gi=function(){function e(n){this._ranScripts={},this._renderer=n.createRenderer(null,null)}return e.prototype.insertEl=function(n,t,o,i,l){if(i&&!l){var u=n._prevSVG&&n._prevSVG.parentNode;u&&this._renderer.removeChild(u,n._prevSVG),t.innerHTML=""}l?this._renderer.insertBefore(t,o,t.firstChild):this._renderer.appendChild(t,o),o.nodeName==="svg"&&(n._prevSVG=o)},e.prototype.evalScripts=function(n,t,o){for(var i=n.querySelectorAll("script"),l=[],u=0;u<i.length;u++){var T=i[u].getAttribute("type");if(!T||T==="application/ecmascript"||T==="application/javascript"){var E=i[u].innerText||i[u].textContent;l.push(E),this._renderer.removeChild(i[u].parentNode,i[u])}}if(l.length>0&&(o==="always"||o==="once"&&!this._ranScripts[t])){for(var u=0;u<l.length;u++)new Function(l[u])(window);this._ranScripts[t]=!0}},e.\u0275fac=function(t){return new(t||e)(qe(li))},e.\u0275prov=nt({token:e,factory:e.\u0275fac,providedIn:"root"}),e}();var Ui=function(){function e(n,t){this._inlineSVGService=n,this._el=t}return e.prototype.ngAfterViewInit=function(){this._updateContent()},e.prototype.ngOnChanges=function(n){n.content&&this._updateContent()},e.prototype._updateContent=function(){this._inlineSVGService.insertEl(this.context,this._el.nativeElement,this.content,this.replaceContents,this.prepend)},e.\u0275fac=function(t){return new(t||e)(ke(gi),ke(rt))},e.\u0275cmp=w({type:e,selectors:[["inline-svg"]],inputs:{context:"context",content:"content",replaceContents:"replaceContents",prepend:"prepend"},features:[ot],decls:0,vars:0,template:function(t,o){},encapsulation:2,changeDetection:0}),e}();var Wt=function(){function e(n,t,o,i,l,u){this._appBase=n,this._location=t,this._config=o,this._http=o&&!o.bypassHttpClientInterceptorChain?i:new vi(l),this._renderer=u.createRenderer(null,null),this.setBaseUrl(),e._cache||(e._cache=new Map),e._inProgressReqs||(e._inProgressReqs=new Map)}return e.prototype.getSVG=function(n,t,o){var i=this;o===void 0&&(o=!0);var l=(t?this.getAbsoluteUrl(n):n).replace(/#.+$/,"");if(o&&e._cache.has(l))return ln(this._cloneSVG(e._cache.get(l)));if(e._inProgressReqs.has(l))return e._inProgressReqs.get(l);var u=this._http.get(l,{responseType:"text"}).pipe(vn(function(){e._inProgressReqs.delete(l)}),pn(function(T){return e._inProgressReqs.delete(l),cn(T.message)}),un(),si(function(T){var E=i._svgElementFromString(T);return e._cache.set(l,E),i._cloneSVG(E)}));return e._inProgressReqs.set(l,u),u},e.prototype.setBaseUrl=function(){this._config?this._baseUrl=this._config.baseUrl:this._appBase!==null?this._baseUrl=this._appBase:this._location!==null&&(this._baseUrl=this._location.getBaseHrefFromDOM())},e.prototype.getAbsoluteUrl=function(n){this._baseUrl&&!/^https?:\/\//i.test(n)&&(n=this._baseUrl+n,n.indexOf("//")===0&&(n=n.substring(1)));var t=this._renderer.createElement("BASE");return t.href=n,t.href},e.prototype._svgElementFromString=function(n){var t=this._renderer.createElement("DIV");t.innerHTML=n;var o=t.querySelector("svg");if(!o)throw new Error("No SVG found in loaded contents");return o},e.prototype._cloneSVG=function(n){return n.cloneNode(!0)},e.\u0275fac=function(t){return new(t||e)(qe(wn,8),qe(Mn,8),qe(vt,8),qe(vi),qe(kn),qe(li))},e.\u0275prov=nt({token:e,factory:e.\u0275fac,providedIn:"root"}),e}();function bo(e){return e.charAt(0)==="#"||e.indexOf(".svg#")>-1}function yo(){return typeof SVGRect<"u"}function To(e,n,t){var o=n.querySelector('[id="'.concat(t,'"]'));if(!o)throw new Error('Symbol "'.concat(t,'" not found'));var i=e.createElement("svg","svg");e.appendChild(i,o);var l=e.createElement("use","svg");return e.setAttribute(l,"href","#".concat(t),"xlink"),e.appendChild(i,l),i}function $i(e,n){for(var t=0;t<n.length;t++){var o=e.getAttribute(n[t]);o&&e.removeAttribute(n[t])}for(var i=e.getElementsByTagName("*"),t=0;t<i.length;t++)$i(i[t],n)}function Mo(e,n){for(var t in n)e.setAttribute(t,n[t])}var q=function(){function e(n,t,o,i,l,u,T,E){this._el=n,this._viewContainerRef=t,this._resolver=o,this._svgCache=i,this._renderer=l,this._inlineSVGService=u,this._config=T,this.platformId=E,this.resolveSVGUrl=!0,this.replaceContents=!0,this.prepend=!1,this.injectComponent=!1,this.cacheSVG=!0,this.forceEvalStyles=!1,this.evalScripts="always",this.onSVGInserted=new We,this.onSVGFailed=new We,this._supportsSVG=yo(),!Nt(this.platformId)&&!this._supportsSVG&&this._fail("Embed SVG are not supported by this browser")}return e.prototype.ngOnInit=function(){!this._isValidPlatform()||this._isSSRDisabled()||this._insertSVG()},e.prototype.ngOnChanges=function(n){if(!(!this._isValidPlatform()||this._isSSRDisabled())){var t=!!n.setSVGAttributes;(n.inlineSVG||t)&&this._insertSVG(t)}},e.prototype.ngOnDestroy=function(){this._subscription&&this._subscription.unsubscribe()},e.prototype._insertSVG=function(n){var t=this;if(n===void 0&&(n=!1),!(!Nt(this.platformId)&&!this._supportsSVG)){if(!this.inlineSVG){this._fail("No URL passed to [inlineSVG]");return}!n&&this.inlineSVG===this._prevUrl||(this._prevUrl=this.inlineSVG,this._subscription=this._svgCache.getSVG(this.inlineSVG,this.resolveSVGUrl,this.cacheSVG).subscribe(function(o){if(bo(t.inlineSVG)){var i=t.inlineSVG.split("#")[1];o=To(t._renderer,o,i)}t._processSvg(o)},function(o){t._fail(o)}))}},e.prototype._processSvg=function(n){if(n){if(this.removeSVGAttributes&&ui(this.platformId)&&$i(n,this.removeSVGAttributes),this.setSVGAttributes&&Mo(n,this.setSVGAttributes),this.onSVGLoaded&&(n=this.onSVGLoaded(n,this._el.nativeElement)),this._insertEl(n),ui(this.platformId)&&this._inlineSVGService.evalScripts(n,this.inlineSVG,this.evalScripts),this.forceEvalStyles){var t=n.querySelectorAll("style");Array.from(t).forEach(function(o){return o.textContent+=""})}this.onSVGInserted.emit(n)}},e.prototype._insertEl=function(n){if(this.injectComponent){if(!this._svgComp){var t=this._resolver.resolveComponentFactory(Ui);this._svgComp=this._viewContainerRef.createComponent(t)}this._svgComp.instance.context=this,this._svgComp.instance.replaceContents=this.replaceContents,this._svgComp.instance.prepend=this.prepend,this._svgComp.instance.content=n,this._renderer.appendChild(this._el.nativeElement,this._svgComp.injector.get(Ui)._el.nativeElement)}else this._inlineSVGService.insertEl(this,this._el.nativeElement,n,this.replaceContents,this.prepend)},e.prototype._fail=function(n){if(this.onSVGFailed.emit(n),this.fallbackImgUrl){var t=this._renderer.createElement("IMG");this._renderer.setAttribute(t,"src",this.fallbackImgUrl),this._insertEl(t)}else this.fallbackSVG&&this.fallbackSVG!==this.inlineSVG&&(this.inlineSVG=this.fallbackSVG,this._insertSVG())},e.prototype._isValidPlatform=function(){return Nt(this.platformId)||ui(this.platformId)},e.prototype._isSSRDisabled=function(){return Nt(this.platformId)&&this._config&&this._config.clientOnly},e.\u0275fac=function(t){return new(t||e)(ke(rt),ke(Cn),ke(hn),ke(Wt),ke(ci),ke(gi),ke(vt,8),ke(gn))},e.\u0275dir=bt({type:e,selectors:[["","inlineSVG",""]],inputs:{inlineSVG:"inlineSVG",resolveSVGUrl:"resolveSVGUrl",replaceContents:"replaceContents",prepend:"prepend",injectComponent:"injectComponent",cacheSVG:"cacheSVG",setSVGAttributes:"setSVGAttributes",removeSVGAttributes:"removeSVGAttributes",forceEvalStyles:"forceEvalStyles",evalScripts:"evalScripts",fallbackImgUrl:"fallbackImgUrl",fallbackSVG:"fallbackSVG",onSVGLoaded:"onSVGLoaded"},outputs:{onSVGInserted:"onSVGInserted",onSVGFailed:"onSVGFailed"},features:[mi([Wt]),ot]}),e}();var K=function(){function e(){}return e.forRoot=function(n){return{ngModule:e,providers:[{provide:vt,useValue:n}]}},e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=St({type:e}),e.\u0275inj=xt({}),e}();var ft=function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e}(ft||{}),Ne=function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e}(Ne||{});function Ia(e){return Ci(e)&&typeof e.from=="function"}function Ci(e){return typeof e=="object"&&typeof e.to=="function"}function wo(e){e.parentElement.removeChild(e)}function zi(e){return e!=null}function ko(e){e.preventDefault()}function Da(e){return e.filter(function(n){return this[n]?!1:this[n]=!0},{})}function Pa(e,n){return Math.round(e/n)*n}function Aa(e,n){var t=e.getBoundingClientRect(),o=e.ownerDocument,i=o.documentElement,l=Do(o);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),n?t.top+l.y-i.clientTop:t.left+l.x-i.clientLeft}function Ke(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Vo(e,n,t){t>0&&(Be(e,n),setTimeout(function(){hi(e,n)},t))}function Eo(e){return Math.max(Math.min(e,100),0)}function _i(e){return Array.isArray(e)?e:[e]}function Ba(e){e=String(e);var n=e.split(".");return n.length>1?n[1].length:0}function Be(e,n){e.classList&&!/\s/.test(n)?e.classList.add(n):e.className+=" "+n}function hi(e,n){e.classList&&!/\s/.test(n)?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")}function Ha(e,n){return e.classList?e.classList.contains(n):new RegExp("\\b"+n+"\\b").test(e.className)}function Do(e){var n=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",o=n?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=n?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return{x:o,y:i}}function La(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Oa(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,n)}catch{}return e}function Na(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Ki(e,n){return 100/(n-e)}function qi(e,n,t){return n*100/(e[t+1]-e[t])}function Fa(e,n){return qi(e,e[0]<0?n+Math.abs(e[0]):n-e[0],0)}function Ra(e,n){return n*(e[1]-e[0])/100+e[0]}function Ut(e,n){for(var t=1;e>=n[t];)t+=1;return t}function Ga(e,n,t){if(t>=e.slice(-1)[0])return 100;var o=Ut(t,e),i=e[o-1],l=e[o],u=n[o-1],T=n[o];return u+Fa([i,l],t)/Ki(u,T)}function ja(e,n,t){if(t>=100)return e.slice(-1)[0];var o=Ut(t,n),i=e[o-1],l=e[o],u=n[o-1],T=n[o];return Ra([i,l],(t-u)*Ki(u,T))}function Wa(e,n,t,o){if(o===100)return o;var i=Ut(o,e),l=e[i-1],u=e[i];return t?o-l>(u-l)/2?u:l:n[i-1]?e[i-1]+Pa(o-e[i-1],n[i-1]):o}var Ua=function(){function e(n,t,o){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[o||!1],this.xNumSteps=[!1],this.snap=t;var i,l=[];for(Object.keys(n).forEach(function(u){l.push([_i(n[u]),u])}),l.sort(function(u,T){return u[0][0]-T[0][0]}),i=0;i<l.length;i++)this.handleEntryPoint(l[i][1],l[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(n){for(var t=[],o=0;o<this.xNumSteps.length-1;o++)t[o]=qi(this.xVal,n,o);return t},e.prototype.getAbsoluteDistance=function(n,t,o){var i=0;if(n<this.xPct[this.xPct.length-1])for(;n>this.xPct[i+1];)i++;else n===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!o&&n===this.xPct[i+1]&&i++,t===null&&(t=[]);var l,u=1,T=t[i],E=0,P=0,G=0,Q=0;for(o?l=(n-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):l=(this.xPct[i+1]-n)/(this.xPct[i+1]-this.xPct[i]);T>0;)E=this.xPct[i+1+Q]-this.xPct[i+Q],t[i+Q]*u+100-l*100>100?(P=E*l,u=(T-100*l)/t[i+Q],l=1):(P=t[i+Q]*E/100*u,u=0),o?(G=G-P,this.xPct.length+Q>=1&&Q--):(G=G+P,this.xPct.length-Q>=1&&Q++),T=t[i+Q]*u;return n+G},e.prototype.toStepping=function(n){return n=Ga(this.xVal,this.xPct,n),n},e.prototype.fromStepping=function(n){return ja(this.xVal,this.xPct,n)},e.prototype.getStep=function(n){return n=Wa(this.xPct,this.xSteps,this.snap,n),n},e.prototype.getDefaultStep=function(n,t,o){var i=Ut(n,this.xPct);return(n===100||t&&n===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/o},e.prototype.getNearbySteps=function(n){var t=Ut(n,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var n=this.xNumSteps.map(Ba);return Math.max.apply(null,n)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(n){return this.getStep(this.toStepping(n))},e.prototype.handleEntryPoint=function(n,t){var o;if(n==="min"?o=0:n==="max"?o=100:o=parseFloat(n),!Ke(o)||!Ke(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(o),this.xVal.push(t[0]);var i=Number(t[1]);o?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(n,t){if(t){if(this.xVal[n]===this.xVal[n+1]){this.xSteps[n]=this.xHighestCompleteStep[n]=this.xVal[n];return}this.xSteps[n]=qi([this.xVal[n],this.xVal[n+1]],t,0)/Ki(this.xPct[n],this.xPct[n+1]);var o=(this.xVal[n+1]-this.xVal[n])/this.xNumSteps[n],i=Math.ceil(Number(o.toFixed(3))-1),l=this.xVal[n]+this.xNumSteps[n]*i;this.xHighestCompleteStep[n]=l}},e}(),Io={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},$a={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},ct={tooltips:".__tooltips",aria:".__aria"};function za(e,n){if(!Ke(n))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=n}function qa(e,n){if(!Ke(n))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=n}function Ka(e,n){if(!Ke(n))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=n}function Xa(e,n){if(!Ke(n))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=n}function Ya(e,n){if(typeof n!="object"||Array.isArray(n))throw new Error("noUiSlider: 'range' is not an object.");if(n.min===void 0||n.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Ua(n,e.snap||!1,e.singleStep)}function Za(e,n){if(n=_i(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=n.length,e.start=n}function Qa(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=n}function Ja(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=n}function es(e,n){if(typeof n!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=n}function Po(e,n){var t=[!1],o;if(n==="lower"?n=[!0,!1]:n==="upper"&&(n=[!1,!0]),n===!0||n===!1){for(o=1;o<e.handles;o++)t.push(n);t.push(!1)}else{if(!Array.isArray(n)||!n.length||n.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=n}e.connect=t}function ts(e,n){switch(n){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Ao(e,n){if(!Ke(n))throw new Error("noUiSlider: 'margin' option must be numeric.");n!==0&&(e.margin=e.spectrum.getDistance(n))}function is(e,n){if(!Ke(n))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(n),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function ns(e,n){var t;if(!Ke(n)&&!Array.isArray(n))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(n)&&!(n.length===2||Ke(n[0])||Ke(n[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(n!==0){for(Array.isArray(n)||(n=[n,n]),e.padding=[e.spectrum.getDistance(n[0]),e.spectrum.getDistance(n[1])],t=0;t<e.spectrum.xNumSteps.length-1;t++)if(e.padding[0][t]<0||e.padding[1][t]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var o=n[0]+n[1],i=e.spectrum.xVal[0],l=e.spectrum.xVal[e.spectrum.xVal.length-1];if(o/(l-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function os(e,n){switch(n){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function rs(e,n){if(typeof n!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=n.indexOf("tap")>=0,o=n.indexOf("drag")>=0,i=n.indexOf("fixed")>=0,l=n.indexOf("snap")>=0,u=n.indexOf("hover")>=0,T=n.indexOf("unconstrained")>=0,E=n.indexOf("invert-connects")>=0,P=n.indexOf("drag-all")>=0,G=n.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Ao(e,e.start[1]-e.start[0])}if(E&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(T&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:t||l,drag:o,dragAll:P,smoothSteps:G,fixed:i,snap:l,hover:u,unconstrained:T,invertConnects:E}}function as(e,n){if(n!==!1)if(n===!0||Ci(n)){e.tooltips=[