homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
1 lines • 192 kB
JavaScript
import{a as wn}from"./chunk-CIOYC5VW.js";import{m as ve,n as pe}from"./chunk-WCXU6QPE.js";import{a as hn,b as Cn,c as _n,e as _e,l as xe,y as ue}from"./chunk-JKRWJSXD.js";import{a as Mn}from"./chunk-HLPH5YTD.js";import{c as Tn}from"./chunk-TTVC7HAX.js";import{b as bn}from"./chunk-REE7MX3I.js";import{h as Sn,k as yn}from"./chunk-LNTR2LBX.js";import{a as gn,e as ai}from"./chunk-DNCUP6B7.js";import{a as xn,b as A}from"./chunk-2WNK6SOS.js";import{$c as B,Ac as m,Bc as v,Ca as We,Cc as ge,Da as an,Fa as ki,G as en,H as Pt,Ha as ot,Jb as I,K as tn,Kb as u,M as Te,Ma as sn,Mb as dn,Pb as h,Q as De,Rb as Ei,Sb as Ii,Sc as vn,Tb as Vi,Ub as a,Vb as s,Vc as fn,Wb as f,X as nn,Xb as mn,Yb as un,_b as Ce,a as Yi,b as Zi,ba as on,bc as S,cc as _,e as Je,fa as rn,g as Vr,ga as it,gb as r,h as Qt,ha as Ct,hd as Fe,i as wi,jb as ln,kb as ti,kd as ri,la as qe,lb as ii,ld as At,ma as N,mb as ke,mc as c,n as ce,nc as x,ob as cn,oc as y,pc as te,qc as ni,r as Qi,rc as re,s as Ji,sc as ae,ta as nt,tb as k,tc as se,ua as Z,ub as _t,uc as oi,va as Q,vb as xt,w as Jt,wb as pn,wc as J,x as ei,xc as H,yc as Ue,zb as M}from"./chunk-NVNBNEFN.js";var En=Je((Jp,kn)=>{kn.exports=function(n,t){return Array.prototype.slice.call(n,t)}});var Vn=Je((ed,In)=>{var Dr=typeof setImmediate=="function",Di;Dr?Di=function(e){setImmediate(e)}:Di=function(e){setTimeout(e,0)};In.exports=Di});var Pn=Je((td,Dn)=>{"use strict";var Pr=Vn();Dn.exports=function(n,t,o){n&&Pr(function(){n.apply(o||null,t||[])})}});var Hn=Je((id,Bn)=>{"use strict";var An=En(),Ar=Pn();Bn.exports=function(n,t){var o=t||{},i={};return n===void 0&&(n={}),n.on=function(l,p){return i[l]?i[l].push(p):i[l]=[p],n},n.once=function(l,p){return p._once=!0,n.on(l,p),n},n.off=function(l,p){var b=arguments.length;if(b===1)delete i[l];else if(b===0)i={};else{var w=i[l];if(!w)return n;w.splice(w.indexOf(p),1)}return n},n.emit=function(){var l=An(arguments);return n.emitterSnapshot(l.shift()).apply(this,l)},n.emitterSnapshot=function(l){var p=(i[l]||[]).slice(0);return function(){var b=An(arguments),w=this||n;if(l==="error"&&o.throws!==!1&&!p.length)throw b.length===1?b[0]:b;return p.forEach(function(L){o.async?Ar(L,b,w):L.apply(w,b),L._once&&n.off(l,L)}),n}},n}});var Nn=Je((nd,Fn)=>{var Rn=global.CustomEvent;function Br(){try{var e=new Rn("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}Fn.exports=Br()?Rn: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 Ln=Je((od,Gn)=>{"use strict";var On=[],Pi="",Hr=/^on/;for(Pi in global)Hr.test(Pi)&&On.push(Pi.slice(2));Gn.exports=On});var zn=Je((rd,$n)=>{"use strict";var Rr=Nn(),Fr=Ln(),si=global.document,jn=Nr,Wn=Gr,Bt=[];global.addEventListener||(jn=Or,Wn=Lr);$n.exports={add:jn,remove:Wn,fabricate:jr};function Nr(e,n,t,o){return e.addEventListener(n,t,o)}function Or(e,n,t){return e.attachEvent("on"+n,Ur(e,n,t))}function Gr(e,n,t,o){return e.removeEventListener(n,t,o)}function Lr(e,n,t){var o=Un(e,n,t);if(o)return e.detachEvent("on"+n,o)}function jr(e,n,t){var o=Fr.indexOf(n)===-1?l():i();e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on"+n,o);function i(){var p;return si.createEvent?(p=si.createEvent("Event"),p.initEvent(n,!0,!0)):si.createEventObject&&(p=si.createEventObject()),p}function l(){return new Rr(n,{detail:t})}}function Wr(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 Ur(e,n,t){var o=Un(e,n,t)||Wr(e,n,t);return Bt.push({wrapper:o,element:e,type:n,fn:t}),o}function Un(e,n,t){var o=$r(e,n,t);if(o){var i=Bt[o].wrapper;return Bt.splice(o,1),i}}function $r(e,n,t){var o,i;for(o=0;o<Bt.length;o++)if(i=Bt[o],i.element===e&&i.type===n&&i.fn===t)return o}});var Yn=Je((ad,Kn)=>{"use strict";var qn={},zr="(?:^|\\s)",qr="(?:\\s|$)";function Xn(e){var n=qn[e];return n?n.lastIndex=0:qn[e]=n=new RegExp(zr+e+qr,"g"),n}function Xr(e,n){var t=e.className;t.length?Xn(n).test(t)||(e.className+=" "+n):e.className=n}function Kr(e,n){e.className=e.className.replace(Xn(n)," ").trim()}Kn.exports={add:Xr,rm:Kr}});var ao=Je((sd,ro)=>{"use strict";var Yr=Hn(),St=zn(),rt=Yn(),yt=document,Ze=yt.documentElement;function Zr(e,n){var t=arguments.length;t===1&&Array.isArray(e)===!1&&(n=e,e=[]);var o,i,l,p,b,w,V,L,X,z,O,fe=null,Y,R=n||{};R.moves===void 0&&(R.moves=eo),R.accepts===void 0&&(R.accepts=eo),R.invalid===void 0&&(R.invalid=jt),R.containers===void 0&&(R.containers=e||[]),R.isContainer===void 0&&(R.isContainer=Jr),R.copy===void 0&&(R.copy=!1),R.copySortSource===void 0&&(R.copySortSource=!1),R.revertOnSpill===void 0&&(R.revertOnSpill=!1),R.removeOnSpill===void 0&&(R.removeOnSpill=!1),R.direction===void 0&&(R.direction="vertical"),R.ignoreInputTextSelection===void 0&&(R.ignoreInputTextSelection=!0),R.mirrorContainer===void 0&&(R.mirrorContainer=yt.body);var le=Yr({containers:R.containers,start:_i,end:ft,cancel:Ut,remove:Tt,destroy:vt,canMove:Ci,dragging:!1});return R.removeOnSpill===!0&&le.on("over",kt).on("out",Et),et(),le;function Ge(T){return le.containers.indexOf(T)!==-1||R.isContainer(T)}function et(T){var j=T?"remove":"add";Ht(Ze,j,"mousedown",ze),Ht(Ze,j,"mouseup",bt)}function Ye(T){var j=T?"remove":"add";Ht(Ze,j,"mousemove",hi)}function lt(T){var j=T?"remove":"add";St[j](Ze,"selectstart",Gt),St[j](Ze,"click",Gt)}function vt(){et(!0),bt({})}function Gt(T){Y&&T.preventDefault()}function ze(T){w=T.clientX,V=T.clientY;var j=Zn(T)!==1||T.metaKey||T.ctrlKey;if(!j){var q=T.target,ee=ct(q);ee&&(Y=ee,Ye(),T.type==="mousedown"&&(no(q)?q.focus():T.preventDefault()))}}function hi(T){if(Y){if(Zn(T)===0){bt({});return}if(!(T.clientX!==void 0&&Math.abs(T.clientX-w)<=(R.slideFactorX||0)&&T.clientY!==void 0&&Math.abs(T.clientY-V)<=(R.slideFactorY||0))){if(R.ignoreInputTextSelection){var j=at("clientX",T)||0,q=at("clientY",T)||0,ee=yt.elementFromPoint(j,q);if(no(ee))return}var Ae=Y;Ye(!0),lt(),ft(),Lt(Ae);var Me=Qr(l);p=at("pageX",T)-Me.left,b=at("pageY",T)-Me.top,rt.add(z||l,"gu-transit"),zt(),wt(T)}}}function ct(T){if(!(le.dragging&&o)&&!Ge(T)){for(var j=T;Ne(T)&&Ge(Ne(T))===!1;)if(R.invalid(T,j)||(T=Ne(T),!T))return;var q=Ne(T);if(q&&!R.invalid(T,j)){var ee=R.moves(T,q,j,Rt(T));if(ee)return{item:T,source:q}}}}function Ci(T){return!!ct(T)}function _i(T){var j=ct(T);j&&Lt(j)}function Lt(T){xi(T.item,T.source)&&(z=T.item.cloneNode(!0),le.emit("cloned",z,T.item,"copy")),i=T.source,l=T.item,L=X=Rt(T.item),le.dragging=!0,le.emit("drag",l,i)}function jt(){return!1}function ft(){if(le.dragging){var T=z||l;gt(T,Ne(T))}}function Wt(){Y=!1,Ye(!0),lt(!0)}function bt(T){if(Wt(),!!le.dragging){var j=z||l,q=at("clientX",T)||0,ee=at("clientY",T)||0,Ae=Jn(o,q,ee),Me=$t(Ae,q,ee);Me&&(z&&R.copySortSource||!z||Me!==i)?gt(j,Me):R.removeOnSpill?Tt():Ut()}}function gt(T,j){var q=Ne(T);z&&R.copySortSource&&j===i&&q.removeChild(l),ht(j)?le.emit("cancel",T,i,i):le.emit("drop",T,j,i,X),Mt()}function Tt(){if(le.dragging){var T=z||l,j=Ne(T);j&&j.removeChild(T),le.emit(z?"cancel":"remove",T,j,i),Mt()}}function Ut(T){if(le.dragging){var j=arguments.length>0?T:R.revertOnSpill,q=z||l,ee=Ne(q),Ae=ht(ee);Ae===!1&&j&&(z?ee&&ee.removeChild(z):i.insertBefore(q,L)),Ae||j?le.emit("cancel",q,i,i):le.emit("drop",q,ee,i,X),Mt()}}function Mt(){var T=z||l;Wt(),Qe(),T&&rt.rm(T,"gu-transit"),O&&clearTimeout(O),le.dragging=!1,fe&&le.emit("out",T,fe,i),le.emit("dragend",T),i=l=z=L=X=O=fe=null}function ht(T,j){var q;return j!==void 0?q=j:o?q=X:q=Rt(z||l),T===i&&q===L}function $t(T,j,q){for(var ee=T;ee&&!Ae();)ee=Ne(ee);return ee;function Ae(){var Me=Ge(ee);if(Me===!1)return!1;var tt=qt(ee,T),Ee=It(ee,tt,j,q),je=ht(ee,Ee);return je?!0:R.accepts(l,ee,i,Ee)}}function wt(T){if(!o)return;T.preventDefault();var j=at("clientX",T)||0,q=at("clientY",T)||0,ee=j-p,Ae=q-b;o.style.left=ee+"px",o.style.top=Ae+"px";var Me=z||l,tt=Jn(o,j,q),Ee=$t(tt,j,q),je=Ee!==null&&Ee!==fe;(je||Ee===null)&&(Xt(),fe=Ee,Vt());var Re=Ne(Me);if(Ee===i&&z&&!R.copySortSource){Re&&Re.removeChild(Me);return}var Ie,oe=qt(Ee,tt);if(oe!==null)Ie=It(Ee,oe,j,q);else if(R.revertOnSpill===!0&&!z)Ie=L,Ee=i;else{z&&Re&&Re.removeChild(Me);return}(Ie===null&&je||Ie!==Me&&Ie!==Rt(Me))&&(X=Ie,Ee.insertBefore(Me,Ie),le.emit("shadow",Me,Ee,i));function Le(Kt){le.emit(Kt,Me,fe,i)}function Vt(){je&&Le("over")}function Xt(){fe&&Le("out")}}function kt(T){rt.rm(T,"gu-hide")}function Et(T){le.dragging&&rt.add(T,"gu-hide")}function zt(){if(!o){var T=l.getBoundingClientRect();o=l.cloneNode(!0),o.style.width=to(T)+"px",o.style.height=io(T)+"px",rt.rm(o,"gu-transit"),rt.add(o,"gu-mirror"),R.mirrorContainer.appendChild(o),Ht(Ze,"add","mousemove",wt),rt.add(R.mirrorContainer,"gu-unselectable"),le.emit("cloned",o,l,"mirror")}}function Qe(){o&&(rt.rm(R.mirrorContainer,"gu-unselectable"),Ht(Ze,"remove","mousemove",wt),Ne(o).removeChild(o),o=null)}function qt(T,j){for(var q=j;q!==T&&Ne(q)!==T;)q=Ne(q);return q===Ze?null:q}function It(T,j,q,ee){var Ae=R.direction==="horizontal",Me=j!==T?Ee():tt();return Me;function tt(){var Re=T.children.length,Ie,oe,Le;for(Ie=0;Ie<Re;Ie++)if(oe=T.children[Ie],Le=oe.getBoundingClientRect(),Ae&&Le.left+Le.width/2>q||!Ae&&Le.top+Le.height/2>ee)return oe;return null}function Ee(){var Re=j.getBoundingClientRect();return je(Ae?q>Re.left+to(Re)/2:ee>Re.top+io(Re)/2)}function je(Re){return Re?Rt(j):j}}function xi(T,j){return typeof R.copy=="boolean"?R.copy:R.copy(T,j)}}function Ht(e,n,t,o){var i={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},l={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},p={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};global.navigator.pointerEnabled?St[n](e,l[t],o):global.navigator.msPointerEnabled?St[n](e,p[t],o):(St[n](e,i[t],o),St[n](e,t,o))}function Zn(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 Qr(e){var n=e.getBoundingClientRect();return{left:n.left+Qn("scrollLeft","pageXOffset"),top:n.top+Qn("scrollTop","pageYOffset")}}function Qn(e,n){return typeof global[n]<"u"?global[n]:Ze.clientHeight?Ze[e]:yt.body[e]}function Jn(e,n,t){e=e||{};var o=e.className||"",i;return e.className+=" gu-hide",i=yt.elementFromPoint(n,t),e.className=o,i}function Jr(){return!1}function eo(){return!0}function to(e){return e.width||e.right-e.left}function io(e){return e.height||e.bottom-e.top}function Ne(e){return e.parentNode===yt?null:e.parentNode}function no(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"||oo(e)}function oo(e){return!e||e.contentEditable==="false"?!1:e.contentEditable==="true"?!0:oo(Ne(e))}function Rt(e){return e.nextElementSibling||n();function n(){var t=e;do t=t.nextSibling;while(t&&t.nodeType!==1);return t}}function ea(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function at(e,n){var t=ea(n),o={pageX:"clientX",pageY:"clientY"};return e in o&&!(e in t)&&o[e]in t&&(e=o[e]),t[e]}ro.exports=Zr});var Ri=Vr(ao(),1),Ai=class{constructor(n,t,o){this.name=n,this.drake=t,this.options=o,this.initEvents=!1}},ne=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}(ne||{}),ta=Object.keys(ne).map(e=>ne[e]),ia=Ri.default||Ri,Ft=class{constructor(n=ia){this.build=n}},dt=(e,n,t)=>o=>o.pipe(Pt(({event:i,name:l})=>i===e&&(n===void 0||l===n)),ei(({name:i,args:l})=>t(i,l))),na=(e,[n,t,o])=>({name:e,el:n,container:t,source:o}),Bi=(()=>{let n=class n{constructor(o){this.drakeFactory=o,this.groups={},this.dispatch$=new ce,this.elContainerSource=i=>l=>this.dispatch$.pipe(dt(i,l,na)),this.cancel=this.elContainerSource(ne.Cancel),this.remove=this.elContainerSource(ne.Remove),this.shadow=this.elContainerSource(ne.Shadow),this.over=this.elContainerSource(ne.Over),this.out=this.elContainerSource(ne.Out),this.drag=i=>this.dispatch$.pipe(dt(ne.Drag,i,(l,[p,b])=>({name:l,el:p,source:b}))),this.dragend=i=>this.dispatch$.pipe(dt(ne.DragEnd,i,(l,[p])=>({name:l,el:p}))),this.drop=i=>this.dispatch$.pipe(dt(ne.Drop,i,(l,[p,b,w,V])=>({name:l,el:p,target:b,source:w,sibling:V}))),this.cloned=i=>this.dispatch$.pipe(dt(ne.Cloned,i,(l,[p,b,w])=>({name:l,clone:p,original:b,cloneType:w}))),this.dropModel=i=>this.dispatch$.pipe(dt(ne.DropModel,i,(l,[p,b,w,V,L,X,z,O,fe])=>({name:l,el:p,target:b,source:w,sibling:V,item:L,sourceModel:X,targetModel:z,sourceIndex:O,targetIndex:fe}))),this.removeModel=i=>this.dispatch$.pipe(dt(ne.RemoveModel,i,(l,[p,b,w,V,L,X])=>({name:l,el:p,container:b,source:w,item:V,sourceModel:L,sourceIndex:X}))),(this.drakeFactory===null||this.drakeFactory===void 0)&&(this.drakeFactory=new Ft)}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 Ai(o,this.drakeFactory.build([],i),i))}handleModels({name:o,drake:i,options:l}){let p,b,w;i.on("remove",(V,L,X)=>{if(!i.models)return;let z=i.models[i.containers.indexOf(X)];z=z.slice(0);let O=z.splice(b,1)[0];this.dispatch$.next({event:ne.RemoveModel,name:o,args:[V,L,X,O,z,b]})}),i.on("drag",(V,L)=>{i.models&&(p=V,b=this.domIndexOf(V,L))}),i.on("drop",(V,L,X,z)=>{if(!i.models||!L)return;w=this.domIndexOf(V,L);let O=i.models[i.containers.indexOf(X)],fe=i.models[i.containers.indexOf(L)],Y;if(L===X)O=O.slice(0),Y=O.splice(b,1)[0],O.splice(w,0,Y),fe=O;else{let R=p!==V;if(Y=O[b],R){if(!l.copyItem)throw new Error("If you have enabled `copy` on a group, you must provide a `copyItem` function.");Y=l.copyItem(Y)}if(R||(O=O.slice(0),O.splice(b,1)),fe=fe.slice(0),fe.splice(w,0,Y),R)try{L.removeChild(V)}catch{}}this.dispatch$.next({event:ne.DropModel,name:o,args:[V,L,X,z,Y,O,fe,b,w]})})}setupEvents(o){if(o.initEvents)return;o.initEvents=!0;let i=o.name,l=this,p=b=>{switch(b){case ne.Drag:o.drake.on(b,(...w)=>{this.dispatch$.next({event:b,name:i,args:w})});break;case ne.Drop:o.drake.on(b,(...w)=>{this.dispatch$.next({event:b,name:i,args:w})});break;case ne.DragEnd:o.drake.on(b,(...w)=>{this.dispatch$.next({event:b,name:i,args:w})});break;case ne.Cancel:case ne.Remove:case ne.Shadow:case ne.Over:case ne.Out:o.drake.on(b,(...w)=>{this.dispatch$.next({event:b,name:i,args:w})});break;case ne.Cloned:o.drake.on(b,(...w)=>{this.dispatch$.next({event:b,name:i,args:w})});break;case ne.DropModel:o.drake.on(b,(...w)=>{this.dispatch$.next({event:b,name:i,args:w})});break;case ne.RemoveModel:o.drake.on(b,(...w)=>{this.dispatch$.next({event:b,name:i,args:w})});break;default:break}};ta.forEach(p)}domIndexOf(o,i){if(i)return Array.prototype.indexOf.call(i.children,o)}};n.\u0275fac=function(i){return new(i||n)(qe(Ft,8))},n.\u0275prov=it({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),hd=(()=>{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){var i;if(o&&o.dragula){let{previousValue:l,currentValue:p,firstChange:b}=o.dragula,w=!!l,V=!!p;w&&this.teardown(l),V&&this.setup()}else if(o&&o.dragulaModel){let{previousValue:l,currentValue:p,firstChange:b}=o.dragulaModel,w=(i=this.group)==null?void 0:i.drake;if(this.dragula&&w){w.models=w.models||[];let V=w.models.indexOf(l);V!==-1?(w.models.splice(V,1),p&&w.models.splice(V,0,p)):p&&w.models.push(p)}}}setup(){var l;let o=p=>{var b,w,V;this.dragulaModel&&((b=p.drake)!=null&&b.models?(V=(w=p.drake)==null?void 0:w.models)==null||V.push(this.dragulaModel):p.drake&&(p.drake.models=[this.dragulaModel]))};if(!this.dragula)return;let i=this.dragulaService.find(this.dragula);if(!i){let p={};i=this.dragulaService.createGroup(this.dragula,p)}o(i),(l=i.drake)==null||l.containers.push(this.container),this.subscribe(this.dragula),this.group=i}subscribe(o){this.subs=new wi,this.subs.add(this.dragulaService.dropModel(o).subscribe(({source:i,target:l,sourceModel:p,targetModel:b})=>{i===this.el.nativeElement?this.dragulaModelChange.emit(p):l===this.el.nativeElement&&this.dragulaModelChange.emit(b)})),this.subs.add(this.dragulaService.removeModel(o).subscribe(({source:i,sourceModel:l})=>{i===this.el.nativeElement&&this.dragulaModelChange.emit(l)}))}teardown(o){var l,p;this.subs&&this.subs.unsubscribe();let i=this.dragulaService.find(o);if(i){let b=(l=i.drake)==null?void 0:l.containers.indexOf(this.el.nativeElement);if(b!==-1&&((p=i.drake)==null||p.containers.splice(b,1)),this.dragulaModel&&i.drake&&i.drake.models){let w=i.drake.models.indexOf(this.dragulaModel);w!==-1&&i.drake.models.splice(w,1)}}}ngOnDestroy(){this.dragula&&this.teardown(this.dragula)}};n.\u0275fac=function(i){return new(i||n)(ke(ot),ke(Bi))},n.\u0275dir=xt({type:n,selectors:[["","dragula",""]],inputs:{dragula:"dragula",dragulaModel:"dragulaModel"},outputs:{dragulaModelChange:"dragulaModelChange"},standalone:!1,features:[nt]});let e=n;return e})(),Cd=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[Bi]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=_t({type:n}),n.\u0275inj=Ct({providers:[Bi]});let e=n;return e})(),_d=new Ft((e,n)=>new Hi(e,n)),Hi=class{constructor(n=[],t={},o){this.containers=n,this.options=t,this.models=o,this.emitter$=new ce,this.subs=new wi,this.dragging=!1}on(n,t){this.subs.add(this.emitter$.pipe(Pt(({eventType:o})=>o===n)).subscribe(({eventType:o,args:i})=>{if(o===ne.Drag){let l=Array.from(i),p=l[0],b=l[1];t(p,b);return}if(o===ne.Drop){let l=Array.from(i),p=l[0],b=l[1],w=l[2],V=l[3];t(p,b,w,V);return}if(o===ne.Remove){let l=Array.from(i),p=l[0],b=l[1],w=l[2];t(p,b,w);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=N(bn);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=pn({name:"convertTemp",type:e,pure:!0})}return e})();function oa(e,n){if(e&1&&c(0),e&2){let t=_().$implicit;y(" ",t.value,"% ")}}function ra(e,n){if(e&1&&(c(0),m(1,"convertTemp")),e&2){let t=_().$implicit;y(" ",v(1,1,t.value),"\xB0 ")}}function aa(e,n){if(e&1&&c(0),e&2){let t=_().$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),M(4,oa,1,1)(5,ra,2,3)(6,aa,1,1),s()()),e&2){let t,o=n.$implicit;r(2),x(o.description),r(2),h((t=o.unit)==="percentage"?4:t==="celsius"?5:6)}}function la(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),m(3,"translate"),s(),a(4,"span",20),c(5),s()()),e&2){let t=_(2);r(2),x(v(3,2,"child_bridge.config.platform")),r(3),x(t.matchedCachedAccessory.platform)}}function ca(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),m(3,"translate"),s(),a(4,"span",20),c(5),s()()),e&2){let t=_(2);r(2),x(v(3,2,"child_bridge.config.accessory")),r(3),x(t.matchedCachedAccessory.accessory)}}function pa(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),m(3,"translate"),s(),a(4,"span",20),c(5),s()(),M(6,la,6,4,"li",19)(7,ca,6,4,"li",19)),e&2){let t=_();r(2),x(v(3,4,"accessories.plugin")),r(3),x(t.matchedCachedAccessory.plugin),r(),h(t.matchedCachedAccessory.platform?6:-1),r(),h(t.matchedCachedAccessory.accessory?7:-1)}}function da(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 ma(e,n){if(e&1&&(a(0,"li",19)(1,"span",11),c(2),m(3,"translate"),s(),a(4,"span",20),c(5),s()()),e&2){let t=_();r(2),x(v(3,2,"accessories.bridge_name")),r(3),x(t.matchedCachedAccessory.bridge)}}function ua(e,n){if(e&1){let t=Ce();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),m(8,"translate"),s(),a(9,"button",28),S("click",function(){Z(t);let i=_();return Q(i.removeSingleCachedAccessories())}),f(10,"i",29),s()()}if(e&2){let t=_();r(4),x(t.matchedCachedAccessory.UUID),r(3),x(v(8,2,"accessories.button_remove"))}}var so=(()=>{class e{$activeModal=N(ve);$modal=N(pe);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(p=>p.$cacheFile===i);if(l.length){let p=this.service.accessoryInformation.Name,b=this.service.accessoryInformation["Serial Number"],w=l.filter(V=>{let L=V.services.find(O=>O.constructorName==="AccessoryInformation"),X=L.characteristics.find(O=>O.displayName==="Name"),z=L.characteristics.find(O=>O.displayName==="Serial Number");return X.value===p&&z.value===b});if(w.length===1)return Zi(Yi({},w[0]),{bridge:o.name})}}}removeSingleCachedAccessories(){this.$activeModal.close();let t=this.$modal.open(wn,{size:"lg",backdrop:"static"});t.componentInstance.selectedBridge=this.service.instance.username.replaceAll(":","")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({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"],["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),m(5,"translate"),S("click",function(){return i.$activeModal.dismiss("Dismiss")}),s()(),a(6,"div",4)(7,"ul",5)(8,"li",6)(9,"label",7),c(10),m(11,"translate"),s(),a(12,"div",8)(13,"input",9),S("ngModelChange",function(p){return i.service.customName=p}),s()()(),a(14,"li",10)(15,"span",11),c(16),m(17,"translate"),s(),a(18,"div",12)(19,"input",13),m(20,"translate"),se("ngModelChange",function(p){return ae(i.service.hidden,p)||(i.service.hidden=p),p}),s(),f(21,"label",14),s()(),a(22,"li",10)(23,"span",11),c(24),m(25,"translate"),s(),a(26,"div",12)(27,"input",15),m(28,"translate"),se("ngModelChange",function(p){return ae(i.service.onDashboard,p)||(i.service.onDashboard=p),p}),s(),f(29,"label",16),s()()(),a(30,"ul",5)(31,"li",17)(32,"h6",18),c(33),m(34,"translate"),s()(),a(35,"li",19)(36,"span",11),c(37),m(38,"translate"),s(),a(39,"span",20),c(40),s()(),a(41,"li",19)(42,"span",11),c(43),m(44,"translate"),s(),a(45,"span",20),c(46),s()(),Ii(47,sa,7,2,"li",19,Ei),s(),a(49,"ul",21)(50,"li",17)(51,"h6",18),c(52),m(53,"translate"),s()(),M(54,pa,8,6),Ii(55,da,5,2,"li",19,Ei),a(57,"li",19)(58,"span",11),c(59),m(60,"translate"),s(),a(61,"span",20),c(62),s()(),M(63,ma,6,4,"li",19),a(64,"li",19)(65,"span",11),c(66),m(67,"translate"),s(),a(68,"span",20),c(69),s()(),a(70,"li",19)(71,"span",11),c(72),m(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()(),M(86,ua,11,4),s()(),a(87,"div",23),f(88,"div",11),a(89,"div",24)(90,"button",25),m(91,"translate"),S("click",function(){return i.$activeModal.dismiss("Dismiss")}),c(92),m(93,"translate"),s()(),f(94,"div",26),s()()),o&2&&(r(3),x(i.service.customName||i.service.serviceName),r(),I("aria-label",v(5,29,"form.button_close")),r(6),x(v(11,31,"accessories.custom_name")),r(3),u("ngModel",i.service.customName||i.service.serviceName),r(3),x(v(17,33,"accessories.hide_this_accessory")),r(3),re("ngModel",i.service.hidden),I("aria-label",v(20,35,"accessories.hide_this_accessory")),r(5),x(v(25,37,"accessories.show_on_dashboard")),r(3),re("ngModel",i.service.onDashboard),I("aria-label",v(28,39,"accessories.show_on_dashboard")),r(6),x(v(34,41,"accessories.service_info")),r(4),x(v(38,43,"accessories.service")),r(3),x(i.service.humanType),r(3),x(v(44,45,"accessories.name")),r(3),x(i.service.serviceName),r(),Vi(i.service.serviceCharacteristics),r(5),x(v(53,47,"accessories.accessory_info")),r(2),h(i.matchedCachedAccessory?54:-1),r(),Vi(i.accessoryInformation),r(4),x(v(60,49,"accessories.bridge_username")),r(3),x(i.service.instance.username),r(),h(i.matchedCachedAccessory?63:-1),r(3),x(v(67,51,"accessories.bridge_ip")),r(3),x(i.service.instance.ipAddress),r(3),x(v(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(),h(i.matchedCachedAccessory?86:-1),r(4),I("aria-label",v(91,55,"form.button_close")),r(2),y(" ",v(93,57,"form.button_close")," "))},dependencies:[ue,_n,Cn,_e,xe,A,$e],encapsulation:2})}return e})();var lo=(()=>{class e{$api=N(yn);$auth=N(Tn);$modal=N(pe);$toastr=N(Sn);$translate=N(xn);$ws=N(Mn);layoutSaved=new ce;accessoryData=new ce;readyForControl=!1;accessoryLayout;accessories={services:[]};rooms=[];io;roomsOrdered=!1;hiddenTypes=["InputSource","CameraRTPStreamManagement","ProtocolInformation"];accessoryCache=[];pairingCache=[];constructor(){Jt(this.$api.get("/server/cached-accessories")).then(t=>{this.accessoryCache=t}).catch(t=>console.error(t)),Jt(this.$api.get("/server/pairings")).then(t=>{this.pairingCache=t}).catch(t=>console.error(t))}showAccessoryInformation(t){let o=this.$modal.open(so,{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 Qt(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",()=>Qt(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 Qt(this,null,function*(){this.accessoryLayout=yield Jt(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);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(p=>p.uniqueId===t.uniqueId));if(i)this.rooms.find(l=>l.name===i.name).services.push(t);else{let l=this.rooms.find(p=>p.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 p=o.services.findIndex(w=>w.uniqueId===i.uniqueId),b=o.services.findIndex(w=>w.uniqueId===l.uniqueId);return p<b?-1:p>b?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(p=>p.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(p=>(this.readyForControl||p(void 0),this.io.socket.emit("accessory-control",{set:{uniqueId:t.uniqueId,aid:t.aid,siid:t.iid,iid:i.iid,value:l}}),p(void 0))),i):null})})}static \u0275fac=function(o){return new(o||e)};static \u0275prov=it({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var mt=function(){function e(){}return e}();var li=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 p=n._prevSVG&&n._prevSVG.parentNode;p&&this._renderer.removeChild(p,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=[],p=0;p<i.length;p++){var b=i[p].getAttribute("type");if(!b||b==="application/ecmascript"||b==="application/javascript"){var w=i[p].innerText||i[p].textContent;l.push(w),this._renderer.removeChild(i[p].parentNode,i[p])}}if(l.length>0&&(o==="always"||o==="once"&&!this._ranScripts[t])){for(var p=0;p<l.length;p++)new Function(l[p])(window);this._ranScripts[t]=!0}},e.\u0275fac=function(t){return new(t||e)(qe(ti))},e.\u0275prov=it({token:e,factory:e.\u0275fac,providedIn:"root"}),e}();var Fi=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(li),ke(ot))},e.\u0275cmp=k({type:e,selectors:[["inline-svg"]],inputs:{context:"context",content:"content",replaceContents:"replaceContents",prepend:"prepend"},features:[nt],decls:0,vars:0,template:function(t,o){},encapsulation:2,changeDetection:0}),e}();var Nt=function(){function e(n,t,o,i,l,p){this._appBase=n,this._location=t,this._config=o,this._http=o&&!o.bypassHttpClientInterceptorChain?i:new ai(l),this._renderer=p.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 Qi(this._cloneSVG(e._cache.get(l)));if(e._inProgressReqs.has(l))return e._inProgressReqs.get(l);var p=this._http.get(l,{responseType:"text"}).pipe(on(function(){e._inProgressReqs.delete(l)}),tn(function(b){return e._inProgressReqs.delete(l),Ji(b.message)}),nn(),ei(function(b){var w=i._svgElementFromString(b);return e._cache.set(l,w),i._cloneSVG(w)}));return e._inProgressReqs.set(l,p),p},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(fn,8),qe(vn,8),qe(mt,8),qe(ai),qe(gn),qe(ti))},e.\u0275prov=it({token:e,factory:e.\u0275fac,providedIn:"root"}),e}();function mo(e){return e.charAt(0)==="#"||e.indexOf(".svg#")>-1}function uo(){return typeof SVGRect<"u"}function vo(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 Ni(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++)Ni(i[t],n)}function fo(e,n){for(var t in n)e.setAttribute(t,n[t])}var U=function(){function e(n,t,o,i,l,p,b,w){this._el=n,this._viewContainerRef=t,this._resolver=o,this._svgCache=i,this._renderer=l,this._inlineSVGService=p,this._config=b,this.platformId=w,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=uo(),!At(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),!(!At(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(mo(t.inlineSVG)){var i=t.inlineSVG.split("#")[1];o=vo(t._renderer,o,i)}t._processSvg(o)},function(o){t._fail(o)}))}},e.prototype._processSvg=function(n){if(n){if(this.removeSVGAttributes&&ri(this.platformId)&&Ni(n,this.removeSVGAttributes),this.setSVGAttributes&&fo(n,this.setSVGAttributes),this.onSVGLoaded&&(n=this.onSVGLoaded(n,this._el.nativeElement)),this._insertEl(n),ri(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(Fi);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(Fi)._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 At(this.platformId)||ri(this.platformId)},e.prototype._isSSRDisabled=function(){return At(this.platformId)&&this._config&&this._config.clientOnly},e.\u0275fac=function(t){return new(t||e)(ke(ot),ke(cn),ke(ln),ke(Nt),ke(ii),ke(li),ke(mt,8),ke(sn))},e.\u0275dir=xt({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:[oi([Nt]),nt]}),e}();var $=function(){function e(){}return e.forRoot=function(n){return{ngModule:e,providers:[{provide:mt,useValue:n}]}},e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=_t({type:e}),e.\u0275inj=Ct({}),e}();var ut=function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e}(ut||{}),Oe=function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e}(Oe||{});function ga(e){return pi(e)&&typeof e.from=="function"}function pi(e){return typeof e=="object"&&typeof e.to=="function"}function go(e){e.parentElement.removeChild(e)}function Oi(e){return e!=null}function ho(e){e.preventDefault()}function ha(e){return e.filter(function(n){return this[n]?!1:this[n]=!0},{})}function Ca(e,n){return Math.round(e/n)*n}function _a(e,n){var t=e.getBoundingClientRect(),o=e.ownerDocument,i=o.documentElement,l=So(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 Co(e,n,t){t>0&&(He(e,n),setTimeout(function(){ci(e,n)},t))}function _o(e){return Math.max(Math.min(e,100),0)}function di(e){return Array.isArray(e)?e:[e]}function xa(e){e=String(e);var n=e.split(".");return n.length>1?n[1].length:0}function He(e,n){e.classList&&!/\s/.test(n)?e.classList.add(n):e.className+=" "+n}function ci(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 Sa(e,n){return e.classList?e.classList.contains(n):new RegExp("\\b"+n+"\\b").test(e.className)}function So(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 ya(){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 ba(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,n)}catch{}return e}function Ta(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Li(e,n){return 100/(n-e)}function Gi(e,n,t){return n*100/(e[t+1]-e[t])}function Ma(e,n){return Gi(e,e[0]<0?n+Math.abs(e[0]):n-e[0],0)}function wa(e,n){return n*(e[1]-e[0])/100+e[0]}function Ot(e,n){for(var t=1;e>=n[t];)t+=1;return t}function ka(e,n,t){if(t>=e.slice(-1)[0])return 100;var o=Ot(t,e),i=e[o-1],l=e[o],p=n[o-1],b=n[o];return p+Ma([i,l],t)/Li(p,b)}function Ea(e,n,t){if(t>=100)return e.slice(-1)[0];var o=Ot(t,n),i=e[o-1],l=e[o],p=n[o-1],b=n[o];return wa([i,l],(t-p)*Li(p,b))}function Ia(e,n,t,o){if(o===100)return o;var i=Ot(o,e),l=e[i-1],p=e[i];return t?o-l>(p-l)/2?p:l:n[i-1]?e[i-1]+Ca(o-e[i-1],n[i-1]):o}var Va=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(p){l.push([di(n[p]),p])}),l.sort(function(p,b){return p[0][0]-b[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]=Gi(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,p=1,b=t[i],w=0,V=0,L=0,X=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]);b>0;)w=this.xPct[i+1+X]-this.xPct[i+X],t[i+X]*p+100-l*100>100?(V=w*l,p=(b-100*l)/t[i+X],l=1):(V=t[i+X]*w/100*p,p=0),o?(L=L-V,this.xPct.length+X>=1&&X--):(L=L+V,this.xPct.length-X>=1&&X++),b=t[i+X]*p;return n+L},e.prototype.toStepping=function(n){return n=ka(this.xVal,this.xPct,n),n},e.prototype.fromStepping=function(n){return Ea(this.xVal,this.xPct,n)},e.prototype.getStep=function(n){return n=Ia(this.xPct,this.xSteps,this.snap,n),n},e.prototype.getDefaultStep=function(n,t,o){var i=Ot(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=Ot(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(xa);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]=Gi([this.xVal[n],this.xVal[n+1]],t,0)/Li(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}(),xo={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Da={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"},st={tooltips:".__tooltips",aria:".__aria"};function Pa(e,n){if(!Ke(n))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=n}function Aa(e,n){if(!Ke(n))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=n}function Ba(e,n){if(!Ke(n))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=n}function Ha(e,n){if(!Ke(n))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=n}function Ra(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 Va(n,e.snap||!1,e.singleStep)}function Fa(e,n){if(n=di(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=n.length,e.start=n}function Na(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=n}function Oa(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=n}function Ga(e,n){if(typeof n!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=n}function yo(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 La(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 bo(e,n){if(!Ke(n))throw new Error("noUiSlider: 'margin' option must be numeric.");n!==0&&(e.margin=e.spectrum.getDistance(n))}function ja(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 Wa(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 Ua(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 $a(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,p=n.indexOf("hover")>=0,b=n.indexOf("unconstrained")>=0,w=n.indexOf("invert-connects")>=0,V=n.indexOf("drag-all")>=0,L=n.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");bo(e,e.start[1]-e.start[0])}if(w&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(b&&(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:V,smoothSteps:L,fixed:i,snap:l,hover:p,unconstrained:b,invertConnects:w}}function za(e,n){if(n!==!1)if(n===!0||pi(n)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(n)}else{if(n=di(n),n.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");n.forEach(function(o){if(typeof o!="boolean"&&!pi(o))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=n}}function qa(e,n){if(n.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=n}function Xa(e,n){if(!pi(n))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=n}function Ka(e,n){if(!ga(n))throw new Error("noUiS