From 3d06c471331bb32844d9733bd2986360d0d15fac Mon Sep 17 00:00:00 2001 From: Nerwyn Singh Date: Mon, 9 Dec 2024 00:18:35 -0500 Subject: [PATCH] fix touchpad on end holdMove check and use correct var --- dist/universal-remote-card.min.js | 2 +- src/classes/remote-touchpad.ts | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dist/universal-remote-card.min.js b/dist/universal-remote-card.min.js index df8a973..ce52384 100644 --- a/dist/universal-remote-card.min.js +++ b/dist/universal-remote-card.min.js @@ -2,7 +2,7 @@ (()=>{var __webpack_modules__={894:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=11)}([function(t,e,i){"use strict";var n=Array.prototype,o=Object.prototype,a={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},r=/[&"'<>\\]/g;function s(t,e){return o.hasOwnProperty.call(t,e)}function c(t){return a[t]}function l(t,e,i){var n,o,a;if(t instanceof Error&&(t=(o=t).name+": "+o.message),Object.setPrototypeOf?(n=new Error(t),Object.setPrototypeOf(n,l.prototype)):(n=this,Object.defineProperty(n,"message",{enumerable:!1,writable:!0,value:t})),Object.defineProperty(n,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(n,this.constructor),o){var r=Object.getOwnPropertyDescriptor(o,"stack");(a=r&&(r.get||function(){return r.value}))||(a=function(){return o.stack})}else{var s=new Error(t).stack;a=function(){return s}}return Object.defineProperty(n,"stack",{get:function(){return a.call(n)}}),Object.defineProperty(n,"cause",{value:o}),n.lineno=e,n.colno=i,n.firstUpdate=!0,n.Update=function(t){var e="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},n}function u(t){return"[object Function]"===o.toString.call(t)}function p(t){return"[object Array]"===o.toString.call(t)}function d(t){return"[object String]"===o.toString.call(t)}function h(t){return"[object Object]"===o.toString.call(t)}function m(t){var e,i=(e=t)?"string"==typeof e?e.split("."):[e]:[];return function(t){for(var e=t,n=0;nt.length)r=o.slice(0,t.length),o.slice(r.length,l).forEach((function(t,i){i2?o-2:0),r=2;r0||!i)&&process.stdout.write(" ".repeat(e));var a=o===n.length-1?"":"\n";process.stdout.write(""+t+a)}))}t.exports={Node:c,Root:p,NodeList:u,Value:l,Literal:d,Symbol:h,Group:m,Array:f,Pair:y,Dict:_,Output:V,Capture:j,TemplateData:K,If:v,IfAsync:g,InlineIf:k,For:w,AsyncEach:E,AsyncAll:x,Macro:C,Caller:T,Import:L,FromImport:A,FunCall:S,Filter:O,FilterAsync:M,KeywordArgs:$,Block:I,Super:N,Extends:D,Include:P,Set:R,Switch:F,Case:U,LookupVal:b,BinOp:H,In:Y,Is:Z,Or:z,And:q,Not:W,Add:G,Concat:X,Sub:J,Mul:Q,Div:tt,FloorDiv:et,Mod:it,Pow:nt,Neg:ot,Pos:at,Compare:rt,CompareOperand:st,CallExtension:ct,CallExtensionAsync:lt,printNodes:function t(e,i){if(i=i||0,ut(e.typename+": ",i),e instanceof u)ut("\n"),e.children.forEach((function(e){t(e,i+2)}));else if(e instanceof ct)ut(e.extName+"."+e.prop+"\n"),e.args&&t(e.args,i+2),e.contentArgs&&e.contentArgs.forEach((function(e){t(e,i+2)}));else{var n=[],o=null;e.iterFields((function(t,e){t instanceof c?n.push([e,t]):(o=o||{})[e]=t})),o?ut(JSON.stringify(o,null,2)+"\n",null,!0):ut("\n"),n.forEach((function(e){var n=e[0],o=e[1];ut("["+n+"] =>",i+2),t(o,i+4)}))}}}},function(t,e){},function(t,e,i){"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}var o=i(8),a=i(17),r=i(3),s=i(0).TemplateError,c=i(2).Frame,l=i(1).Obj,u={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},p=function(t){var e,i;function o(){return t.apply(this,arguments)||this}i=t,(e=o).prototype=Object.create(i.prototype),e.prototype.constructor=e,n(e,i);var a=o.prototype;return a.init=function(t,e){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=e},a.fail=function(t,e,i){throw void 0!==e&&(e+=1),void 0!==i&&(i+=1),new s(t,e,i)},a._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},a._popBuffer=function(){this.buffer=this.bufferStack.pop()},a._emit=function(t){this.codebuf.push(t)},a._emitLine=function(t){this._emit(t+"\n")},a._emitLines=function(){for(var t=this,e=arguments.length,i=new Array(e),n=0;n0&&o._emit(","),o.compile(t,e)})),n&&this._emit(n)},a._compileExpression=function(t,e){this.assertType(t,r.Literal,r.Symbol,r.Group,r.Array,r.Dict,r.FunCall,r.Caller,r.Filter,r.LookupVal,r.Compare,r.InlineIf,r.In,r.Is,r.And,r.Or,r.Not,r.Add,r.Concat,r.Sub,r.Mul,r.Div,r.FloorDiv,r.Mod,r.Pow,r.Neg,r.Pos,r.Compare,r.NodeList),this.compile(t,e)},a.assertType=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&n._emit(","),t){n._emitLine("function(cb) {"),n._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var o=n._pushBuffer();n._withScopedSyntax((function(){n.compile(t,e),n._emitLine("cb(null, "+o+");")})),n._popBuffer(),n._emitLine("return "+o+";"),n._emitLine("}")}else n._emit("null")})),i){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+s+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+s+" && env.opts.autoescape);\n")},a.compileCallExtensionAsync=function(t,e){this.compileCallExtension(t,e,!0)},a.compileNodeList=function(t,e){this._compileChildren(t,e)},a.compileLiteral=function(t){if("string"==typeof t.value){var e=t.value.replace(/\\/g,"\\\\");e=(e=(e=(e=(e=e.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+e+'"')}else null===t.value?this._emit("null"):this._emit(t.value.toString())},a.compileSymbol=function(t,e){var i=t.value,n=e.lookup(i);n?this._emit(n):this._emit('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},a.compileGroup=function(t,e){this._compileAggregate(t,e,"(",")")},a.compileArray=function(t,e){this._compileAggregate(t,e,"[","]")},a.compileDict=function(t,e){this._compileAggregate(t,e,"{","}")},a.compilePair=function(t,e){var i=t.key,n=t.value;i instanceof r.Symbol?i=new r.Literal(i.lineno,i.colno,i.value):i instanceof r.Literal&&"string"==typeof i.value||this.fail("compilePair: Dict keys must be strings or names",i.lineno,i.colno),this.compile(i,e),this._emit(": "),this._compileExpression(n,e)},a.compileInlineIf=function(t,e){this._emit("("),this.compile(t.cond,e),this._emit("?"),this.compile(t.body,e),this._emit(":"),null!==t.else_?this.compile(t.else_,e):this._emit('""'),this._emit(")")},a.compileIn=function(t,e){this._emit("runtime.inOperator("),this.compile(t.left,e),this._emit(","),this.compile(t.right,e),this._emit(")")},a.compileIs=function(t,e){var i=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+i+'").call(context, '),this.compile(t.left,e),t.right.args&&(this._emit(","),this.compile(t.right.args,e)),this._emit(") === true")},a._binOpEmitter=function(t,e,i){this.compile(t.left,e),this._emit(i),this.compile(t.right,e)},a.compileOr=function(t,e){return this._binOpEmitter(t,e," || ")},a.compileAnd=function(t,e){return this._binOpEmitter(t,e," && ")},a.compileAdd=function(t,e){return this._binOpEmitter(t,e," + ")},a.compileConcat=function(t,e){return this._binOpEmitter(t,e,' + "" + ')},a.compileSub=function(t,e){return this._binOpEmitter(t,e," - ")},a.compileMul=function(t,e){return this._binOpEmitter(t,e," * ")},a.compileDiv=function(t,e){return this._binOpEmitter(t,e," / ")},a.compileMod=function(t,e){return this._binOpEmitter(t,e," % ")},a.compileNot=function(t,e){this._emit("!"),this.compile(t.target,e)},a.compileFloorDiv=function(t,e){this._emit("Math.floor("),this.compile(t.left,e),this._emit(" / "),this.compile(t.right,e),this._emit(")")},a.compilePow=function(t,e){this._emit("Math.pow("),this.compile(t.left,e),this._emit(", "),this.compile(t.right,e),this._emit(")")},a.compileNeg=function(t,e){this._emit("-"),this.compile(t.target,e)},a.compilePos=function(t,e){this._emit("+"),this.compile(t.target,e)},a.compileCompare=function(t,e){var i=this;this.compile(t.expr,e),t.ops.forEach((function(t){i._emit(" "+u[t.type]+" "),i.compile(t.expr,e)}))},a.compileLookupVal=function(t,e){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,e),this._emit("),"),this._compileExpression(t.val,e),this._emit(")")},a._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},a.compileFunCall=function(t,e){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,e),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,e,"[","])"),this._emit(")")},a.compileFilter=function(t,e){var i=t.name;this.assertType(i,r.Symbol),this._emit('env.getFilter("'+i.value+'").call(context, '),this._compileAggregate(t.args,e),this._emit(")")},a.compileFilterAsync=function(t,e){var i=t.name,n=t.symbol.value;this.assertType(i,r.Symbol),e.set(n,n),this._emit('env.getFilter("'+i.value+'").call(context, '),this._compileAggregate(t.args,e),this._emitLine(", "+this._makeCallback(n)),this._addScopeLevel()},a.compileKeywordArgs=function(t,e){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,e),this._emit(")")},a.compileSet=function(t,e){var i=this,n=[];t.targets.forEach((function(t){var o=t.value,a=e.lookup(o);null==a&&(a=i._tmpid(),i._emitLine("var "+a+";")),n.push(a)})),t.value?(this._emit(n.join(" = ")+" = "),this._compileExpression(t.value,e),this._emitLine(";")):(this._emit(n.join(" = ")+" = "),this.compile(t.body,e),this._emitLine(";")),t.targets.forEach((function(t,e){var o=n[e],a=t.value;i._emitLine('frame.set("'+a+'", '+o+", true);"),i._emitLine("if(frame.topLevel) {"),i._emitLine('context.setVariable("'+a+'", '+o+");"),i._emitLine("}"),"_"!==a.charAt(0)&&(i._emitLine("if(frame.topLevel) {"),i._emitLine('context.addExport("'+a+'", '+o+");"),i._emitLine("}"))}))},a.compileSwitch=function(t,e){var i=this;this._emit("switch ("),this.compile(t.expr,e),this._emit(") {"),t.cases.forEach((function(t,n){i._emit("case "),i.compile(t.cond,e),i._emit(": "),i.compile(t.body,e),t.body.children.length&&i._emitLine("break;")})),t.default&&(this._emit("default:"),this.compile(t.default,e)),this._emit("}")},a.compileIf=function(t,e,i){var n=this;this._emit("if("),this._compileExpression(t.cond,e),this._emitLine(") {"),this._withScopedSyntax((function(){n.compile(t.body,e),i&&n._emit("cb()")})),t.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){n.compile(t.else_,e),i&&n._emit("cb()")}))):i&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},a.compileIfAsync=function(t,e){this._emit("(function(cb) {"),this.compileIf(t,e,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},a._emitLoopBindings=function(t,e,i,n){var o=this;[{name:"index",val:i+" + 1"},{name:"index0",val:i},{name:"revindex",val:n+" - "+i},{name:"revindex0",val:n+" - "+i+" - 1"},{name:"first",val:i+" === 0"},{name:"last",val:i+" === "+n+" - 1"},{name:"length",val:n}].forEach((function(t){o._emitLine('frame.set("loop.'+t.name+'", '+t.val+");")}))},a.compileFor=function(t,e){var i=this,n=this._tmpid(),o=this._tmpid(),a=this._tmpid();if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = "),this._compileExpression(t.arr,e),this._emitLine(";"),this._emit("if("+a+") {"),this._emitLine(a+" = runtime.fromIterator("+a+");"),t.name instanceof r.Array){this._emitLine("var "+n+";"),this._emitLine("if(runtime.isArray("+a+")) {"),this._emitLine("var "+o+" = "+a+".length;"),this._emitLine("for("+n+"=0; "+n+" < "+a+".length; "+n+"++) {"),t.name.children.forEach((function(o,r){var s=i._tmpid();i._emitLine("var "+s+" = "+a+"["+n+"]["+r+"];"),i._emitLine('frame.set("'+o+'", '+a+"["+n+"]["+r+"]);"),e.set(t.name.children[r].value,s)})),this._emitLoopBindings(t,a,n,o),this._withScopedSyntax((function(){i.compile(t.body,e)})),this._emitLine("}"),this._emitLine("} else {");var s=t.name.children,c=s[0],l=s[1],u=this._tmpid(),p=this._tmpid();e.set(c.value,u),e.set(l.value,p),this._emitLine(n+" = -1;"),this._emitLine("var "+o+" = runtime.keys("+a+").length;"),this._emitLine("for(var "+u+" in "+a+") {"),this._emitLine(n+"++;"),this._emitLine("var "+p+" = "+a+"["+u+"];"),this._emitLine('frame.set("'+c.value+'", '+u+");"),this._emitLine('frame.set("'+l.value+'", '+p+");"),this._emitLoopBindings(t,a,n,o),this._withScopedSyntax((function(){i.compile(t.body,e)})),this._emitLine("}"),this._emitLine("}")}else{var d=this._tmpid();e.set(t.name.value,d),this._emitLine("var "+o+" = "+a+".length;"),this._emitLine("for(var "+n+"=0; "+n+" < "+a+".length; "+n+"++) {"),this._emitLine("var "+d+" = "+a+"["+n+"];"),this._emitLine('frame.set("'+t.name.value+'", '+d+");"),this._emitLoopBindings(t,a,n,o),this._withScopedSyntax((function(){i.compile(t.body,e)})),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+o+") {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},a._compileAsyncLoop=function(t,e,i){var n=this,o=this._tmpid(),a=this._tmpid(),s=this._tmpid(),c=i?"asyncAll":"asyncEach";if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+s+" = runtime.fromIterator("),this._compileExpression(t.arr,e),this._emitLine(");"),t.name instanceof r.Array){var l=t.name.children.length;this._emit("runtime."+c+"("+s+", "+l+", function("),t.name.children.forEach((function(t){n._emit(t.value+",")})),this._emit(o+","+a+",next) {"),t.name.children.forEach((function(t){var i=t.value;e.set(i,i),n._emitLine('frame.set("'+i+'", '+i+");")}))}else{var u=t.name.value;this._emitLine("runtime."+c+"("+s+", 1, function("+u+", "+o+", "+a+",next) {"),this._emitLine('frame.set("'+u+'", '+u+");"),e.set(u,u)}this._emitLoopBindings(t,s,o,a),this._withScopedSyntax((function(){var a;i&&(a=n._pushBuffer()),n.compile(t.body,e),n._emitLine("next("+o+(a?","+a:"")+");"),i&&n._popBuffer()}));var p=this._tmpid();this._emitLine("}, "+this._makeCallback(p)),this._addScopeLevel(),i&&this._emitLine(this.buffer+" += "+p+";"),t.else_&&(this._emitLine("if (!"+s+".length) {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},a.compileAsyncEach=function(t,e){this._compileAsyncLoop(t,e)},a.compileAsyncAll=function(t,e){this._compileAsyncLoop(t,e,!0)},a._compileMacro=function(t,e){var i=this,n=[],o=null,a="macro_"+this._tmpid(),s=void 0!==e;t.args.children.forEach((function(e,a){a===t.args.children.length-1&&e instanceof r.Dict?o=e:(i.assertType(e,r.Symbol),n.push(e))}));var l,u=[].concat(n.map((function(t){return"l_"+t.value})),["kwargs"]),p=n.map((function(t){return'"'+t.value+'"'})),d=(o&&o.children||[]).map((function(t){return'"'+t.key.value+'"'}));l=s?e.push(!0):new c,this._emitLines("var "+a+" = runtime.makeMacro(","["+p.join(", ")+"], ","["+d.join(", ")+"], ","function ("+u.join(", ")+") {","var callerFrame = frame;","frame = "+(s?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),n.forEach((function(t){i._emitLine('frame.set("'+t.value+'", l_'+t.value+");"),l.set(t.value,"l_"+t.value)})),o&&o.children.forEach((function(t){var e=t.key.value;i._emit('frame.set("'+e+'", '),i._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+e+'")'),i._emit(' ? kwargs["'+e+'"] : '),i._compileExpression(t.value,l),i._emit(");")}));var h=this._pushBuffer();return this._withScopedSyntax((function(){i.compile(t.body,l)})),this._emitLine("frame = "+(s?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+h+");"),this._emitLine("});"),this._popBuffer(),a},a.compileMacro=function(t,e){var i=this._compileMacro(t),n=t.name.value;e.set(n,i),e.parent?this._emitLine('frame.set("'+n+'", '+i+");"):("_"!==t.name.value.charAt(0)&&this._emitLine('context.addExport("'+n+'");'),this._emitLine('context.setVariable("'+n+'", '+i+");"))},a.compileCaller=function(t,e){this._emit("(function (){");var i=this._compileMacro(t,e);this._emit("return "+i+";})()")},a._compileGetTemplate=function(t,e,i,n){var o=this._tmpid(),a=this._templateName(),r=this._makeCallback(o),s=i?"true":"false",c=n?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,e),this._emitLine(", "+s+", "+a+", "+c+", "+r),o},a.compileImport=function(t,e){var i=t.target.value,n=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(n+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(n)),this._addScopeLevel(),e.set(i,n),e.parent?this._emitLine('frame.set("'+i+'", '+n+");"):this._emitLine('context.setVariable("'+i+'", '+n+");")},a.compileFromImport=function(t,e){var i=this,n=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(n+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(n)),this._addScopeLevel(),t.names.children.forEach((function(t){var o,a,s=i._tmpid();t instanceof r.Pair?(o=t.key.value,a=t.value.value):a=o=t.value,i._emitLine("if(Object.prototype.hasOwnProperty.call("+n+', "'+o+'")) {'),i._emitLine("var "+s+" = "+n+"."+o+";"),i._emitLine("} else {"),i._emitLine("cb(new Error(\"cannot import '"+o+"'\")); return;"),i._emitLine("}"),e.set(a,s),e.parent?i._emitLine('frame.set("'+a+'", '+s+");"):i._emitLine('context.setVariable("'+a+'", '+s+");")}))},a.compileBlock=function(t){var e=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(e)),this._emitLine(this.buffer+" += "+e+";"),this._addScopeLevel()},a.compileSuper=function(t,e){var i=t.blockName.value,n=t.symbol.value,o=this._makeCallback(n);this._emitLine('context.getSuper(env, "'+i+'", b_'+i+", frame, runtime, "+o),this._emitLine(n+" = runtime.markSafe("+n+");"),this._addScopeLevel(),e.set(n,n)},a.compileExtends=function(t,e){var i=this._tmpid(),n=this._compileGetTemplate(t,e,!0,!1);this._emitLine("parentTemplate = "+n),this._emitLine("for(var "+i+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+i+", parentTemplate.blocks["+i+"]);"),this._emitLine("}"),this._addScopeLevel()},a.compileInclude=function(t,e){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var i=this._compileGetTemplate(t,e,!1,t.ignoreMissing);this._emitLine("callback(null,"+i+");});"),this._emitLine("});");var n=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(n)),this._emitLine("callback(null,"+n+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},a.compileTemplateData=function(t,e){this.compileLiteral(t,e)},a.compileCapture=function(t,e){var i=this,n=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){i.compile(t.body,e)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=n},a.compileOutput=function(t,e){var i=this;t.children.forEach((function(n){n instanceof r.TemplateData?n.value&&(i._emit(i.buffer+" += "),i.compileLiteral(n,e),i._emitLine(";")):(i._emit(i.buffer+" += runtime.suppressValue("),i.throwOnUndefined&&i._emit("runtime.ensureDefined("),i.compile(n,e),i.throwOnUndefined&&i._emit(","+t.lineno+","+t.colno+")"),i._emit(", env.opts.autoescape);\n"))}))},a.compileRoot=function(t,e){var i=this;e&&this.fail("compileRoot: root node can't have frame"),e=new c,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,e),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var n=[],o=t.findAll(r.Block);o.forEach((function(t,e){var o=t.name.value;if(-1!==n.indexOf(o))throw new Error('Block "'+o+'" defined more than once.');n.push(o),i._emitFuncBegin(t,"b_"+o);var a=new c;i._emitLine("var frame = frame.push(true);"),i.compile(t.body,a),i._emitFuncEnd()})),this._emitLine("return {"),o.forEach((function(t,e){var n="b_"+t.name.value;i._emitLine(n+": "+n+",")})),this._emitLine("root: root\n};")},a.compile=function(t,e){var i=this["compile"+t.typename];i?i.call(this,t,e):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},a.getCode=function(){return this.codebuf.join("")},o}(l);t.exports={compile:function(t,e,i,n,r){void 0===r&&(r={});var s=new p(n,r.throwOnUndefined),c=(i||[]).map((function(t){return t.preprocess})).filter((function(t){return!!t})).reduce((function(t,e){return e(t)}),t);return s.compile(a.transform(o.parse(c,i,r),e,n)),s.getCode()},Compiler:p}},function(t,e,i){"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}var o=i(4),a=i(1).EmitterObj;t.exports=function(t){var e,i;function a(){return t.apply(this,arguments)||this}i=t,(e=a).prototype=Object.create(i.prototype),e.prototype.constructor=e,n(e,i);var r=a.prototype;return r.resolve=function(t,e){return o.resolve(o.dirname(t),e)},r.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},a}(a)},function(t,e,i){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}var a=i(12),r=i(15),s=i(0),c=i(5),l=i(18),u=i(10),p=u.FileSystemLoader,d=u.WebLoader,h=u.PrecompiledLoader,m=i(20),f=i(21),y=i(1),_=y.Obj,b=y.EmitterObj,v=i(2),g=v.handleError,k=v.Frame,w=i(22);function E(t,e,i){a((function(){t(e,i)}))}var x={type:"code",obj:{root:function(t,e,i,n,o){try{o(null,"")}catch(t){o(g(t,null,null))}}}},C=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var i=e.prototype;return i.init=function(t,e){var i=this;e=this.opts=e||{},this.opts.dev=!!e.dev,this.opts.autoescape=null==e.autoescape||e.autoescape,this.opts.throwOnUndefined=!!e.throwOnUndefined,this.opts.trimBlocks=!!e.trimBlocks,this.opts.lstripBlocks=!!e.lstripBlocks,this.loaders=[],t?this.loaders=s.isArray(t)?t:[t]:p?this.loaders=[new p("views")]:d&&(this.loaders=[new d("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new h(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=f(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],s._entries(l).forEach((function(t){var e=t[0],n=t[1];return i.addFilter(e,n)})),s._entries(m).forEach((function(t){var e=t[0],n=t[1];return i.addTest(e,n)}))},i._initLoaders=function(){var t=this;this.loaders.forEach((function(e){e.cache={},"function"==typeof e.on&&(e.on("update",(function(i,n){e.cache[i]=null,t.emit("update",i,n,e)})),e.on("load",(function(i,n){t.emit("load",i,n,e)})))}))},i.invalidateCache=function(){this.loaders.forEach((function(t){t.cache={}}))},i.addExtension=function(t,e){return e.__name=t,this.extensions[t]=e,this.extensionsList.push(e),this},i.removeExtension=function(t){var e=this.getExtension(t);e&&(this.extensionsList=s.without(this.extensionsList,e),delete this.extensions[t])},i.getExtension=function(t){return this.extensions[t]},i.hasExtension=function(t){return!!this.extensions[t]},i.addGlobal=function(t,e){return this.globals[t]=e,this},i.getGlobal=function(t){if(void 0===this.globals[t])throw new Error("global not found: "+t);return this.globals[t]},i.addFilter=function(t,e,i){var n=e;return i&&this.asyncFilters.push(t),this.filters[t]=n,this},i.getFilter=function(t){if(!this.filters[t])throw new Error("filter not found: "+t);return this.filters[t]},i.addTest=function(t,e){return this.tests[t]=e,this},i.getTest=function(t){if(!this.tests[t])throw new Error("test not found: "+t);return this.tests[t]},i.resolveTemplate=function(t,e,i){return t.isRelative&&e&&t.isRelative(i)&&t.resolve?t.resolve(e,i):i},i.getTemplate=function(t,e,i,n,o){var a,r=this,c=this,l=null;if(t&&t.raw&&(t=t.raw),s.isFunction(i)&&(o=i,i=null,e=e||!1),s.isFunction(e)&&(o=e,e=!1),t instanceof L)l=t;else{if("string"!=typeof t)throw new Error("template names must be a string: "+t);for(var u=0;u0&&!this.skip(o.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var s=this.parsePrimary();if("_"===s.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",s.lineno,s.colno),this.skipSymbol("as")){var c=this.parsePrimary();n.addChild(new a.Pair(s.lineno,s.colno,s,c))}else n.addChild(s);i=this.parseWithContext()}return new a.FromImport(t.lineno,t.colno,e,n,i)},c.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var e=new a.Block(t.lineno,t.colno);e.name=this.parsePrimary(),e.name instanceof a.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(e.name.value);var i=this.peekToken();return i||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(i.value),e},c.parseExtends=function(){var t="extends",e=this.peekToken();this.skipSymbol(t)||this.fail("parseTemplateRef: expected "+t);var i=new a.Extends(e.lineno,e.colno);return i.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),i},c.parseInclude=function(){var t="include",e=this.peekToken();this.skipSymbol(t)||this.fail("parseInclude: expected "+t);var i=new a.Include(e.lineno,e.colno);return i.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(i.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),i},c.parseIf=function(){var t,e=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new a.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new a.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var i=this.peekToken();switch(i&&i.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},c.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var e,i=new a.Set(t.lineno,t.colno,[]);(e=this.parsePrimary())&&(i.targets.push(e),this.skip(o.TOKEN_COMMA)););return this.skipValue(o.TOKEN_OPERATOR,"=")?(i.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(o.TOKEN_BLOCK_END)?(i.body=new a.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),i.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),i},c.parseSwitch=function(){var t="switch",e="endswitch",i="case",n="default",o=this.peekToken();this.skipSymbol(t)||this.skipSymbol(i)||this.skipSymbol(n)||this.fail('parseSwitch: expected "switch," "case" or "default"',o.lineno,o.colno);var r=this.parseExpression();this.advanceAfterBlockEnd(t),this.parseUntilBlocks(i,n,e);var s,c=this.peekToken(),l=[];do{this.skipSymbol(i);var u=this.parseExpression();this.advanceAfterBlockEnd(t);var p=this.parseUntilBlocks(i,n,e);l.push(new a.Case(c.line,c.col,u,p)),c=this.peekToken()}while(c&&c.value===i);switch(c.value){case n:this.advanceAfterBlockEnd(),s=this.parseUntilBlocks(e),this.advanceAfterBlockEnd();break;case e:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new a.Switch(o.lineno,o.colno,r,l,s)},c.parseStatement=function(){var t=this.peekToken();if(t.type!==o.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==s.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var e=0;e0;){var c=r[0],l=r[1],u=r[2];u===t?n+=1:u===e&&(n-=1),0===n?(o+=l,this.tokens.backN(c.length-l.length)):o+=c}return new a.Output(s.lineno,s.colno,[new a.TemplateData(s.lineno,s.colno,o)])},c.parsePostfix=function(t){for(var e,i=this.peekToken();i;){if(i.type===o.TOKEN_LEFT_PAREN)t=new a.FunCall(i.lineno,i.colno,t,this.parseSignature());else if(i.type===o.TOKEN_LEFT_BRACKET)(e=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new a.LookupVal(i.lineno,i.colno,t,e.children[0]);else{if(i.type!==o.TOKEN_OPERATOR||"."!==i.value)break;this.nextToken();var n=this.nextToken();n.type!==o.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+n.value,n.lineno,n.colno),e=new a.Literal(n.lineno,n.colno,n.value),t=new a.LookupVal(i.lineno,i.colno,t,e)}i=this.peekToken()}return t},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var e=this.parseOr(),i=t;(t=new a.InlineIf(t.lineno,t.colno)).body=i,t.cond=e,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},c.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var e=this.parseAnd();t=new a.Or(t.lineno,t.colno,t,e)}return t},c.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var e=this.parseNot();t=new a.And(t.lineno,t.colno,t,e)}return t},c.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new a.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var t=this.parseIs();;){var e=this.nextToken();if(!e)break;var i=e.type===o.TOKEN_SYMBOL&&"not"===e.value;if(i||this.pushToken(e),!this.skipSymbol("in")){i&&this.pushToken(e);break}var n=this.parseIs();t=new a.In(t.lineno,t.colno,t,n),i&&(t=new a.Not(t.lineno,t.colno,t))}return t},c.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var e=this.skipSymbol("not"),i=this.parseCompare();t=new a.Is(t.lineno,t.colno,t,i),e&&(t=new a.Not(t.lineno,t.colno,t))}return t},c.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],e=this.parseConcat(),i=[];;){var n=this.nextToken();if(!n)break;if(-1===t.indexOf(n.value)){this.pushToken(n);break}i.push(new a.CompareOperand(n.lineno,n.colno,this.parseConcat(),n.value))}return i.length?new a.Compare(i[0].lineno,i[0].colno,e,i):e},c.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(o.TOKEN_TILDE,"~");){var e=this.parseAdd();t=new a.Concat(t.lineno,t.colno,t,e)}return t},c.parseAdd=function(){for(var t=this.parseSub();this.skipValue(o.TOKEN_OPERATOR,"+");){var e=this.parseSub();t=new a.Add(t.lineno,t.colno,t,e)}return t},c.parseSub=function(){for(var t=this.parseMul();this.skipValue(o.TOKEN_OPERATOR,"-");){var e=this.parseMul();t=new a.Sub(t.lineno,t.colno,t,e)}return t},c.parseMul=function(){for(var t=this.parseDiv();this.skipValue(o.TOKEN_OPERATOR,"*");){var e=this.parseDiv();t=new a.Mul(t.lineno,t.colno,t,e)}return t},c.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(o.TOKEN_OPERATOR,"/");){var e=this.parseFloorDiv();t=new a.Div(t.lineno,t.colno,t,e)}return t},c.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(o.TOKEN_OPERATOR,"//");){var e=this.parseMod();t=new a.FloorDiv(t.lineno,t.colno,t,e)}return t},c.parseMod=function(){for(var t=this.parsePow();this.skipValue(o.TOKEN_OPERATOR,"%");){var e=this.parsePow();t=new a.Mod(t.lineno,t.colno,t,e)}return t},c.parsePow=function(){for(var t=this.parseUnary();this.skipValue(o.TOKEN_OPERATOR,"**");){var e=this.parseUnary();t=new a.Pow(t.lineno,t.colno,t,e)}return t},c.parseUnary=function(t){var e,i=this.peekToken();return e=this.skipValue(o.TOKEN_OPERATOR,"-")?new a.Neg(i.lineno,i.colno,this.parseUnary(!0)):this.skipValue(o.TOKEN_OPERATOR,"+")?new a.Pos(i.lineno,i.colno,this.parseUnary(!0)):this.parsePrimary(),t||(e=this.parseFilter(e)),e},c.parsePrimary=function(t){var e,i=this.nextToken(),n=null;if(i?i.type===o.TOKEN_STRING?e=i.value:i.type===o.TOKEN_INT?e=parseInt(i.value,10):i.type===o.TOKEN_FLOAT?e=parseFloat(i.value):i.type===o.TOKEN_BOOLEAN?"true"===i.value?e=!0:"false"===i.value?e=!1:this.fail("invalid boolean: "+i.value,i.lineno,i.colno):i.type===o.TOKEN_NONE?e=null:i.type===o.TOKEN_REGEX&&(e=new RegExp(i.value.body,i.value.flags)):this.fail("expected expression, got end of file"),void 0!==e?n=new a.Literal(i.lineno,i.colno,e):i.type===o.TOKEN_SYMBOL?n=new a.Symbol(i.lineno,i.colno,i.value):(this.pushToken(i),n=this.parseAggregate()),t||(n=this.parsePostfix(n)),n)return n;throw this.error("unexpected token: "+i.value,i.lineno,i.colno)},c.parseFilterName=function(){for(var t=this.expect(o.TOKEN_SYMBOL),e=t.value;this.skipValue(o.TOKEN_OPERATOR,".");)e+="."+this.expect(o.TOKEN_SYMBOL).value;return new a.Symbol(t.lineno,t.colno,e)},c.parseFilterArgs=function(t){return this.peekToken().type===o.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},c.parseFilter=function(t){for(;this.skip(o.TOKEN_PIPE);){var e=this.parseFilterName();t=new a.Filter(e.lineno,e.colno,e,new a.NodeList(e.lineno,e.colno,[t].concat(this.parseFilterArgs(t))))}return t},c.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var e=this.parseFilterName(),i=this.parseFilterArgs(e);this.advanceAfterBlockEnd(t.value);var n=new a.Capture(e.lineno,e.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var o=new a.Filter(e.lineno,e.colno,e,new a.NodeList(e.lineno,e.colno,[n].concat(i)));return new a.Output(e.lineno,e.colno,[o])},c.parseAggregate=function(){var t,e=this.nextToken();switch(e.type){case o.TOKEN_LEFT_PAREN:t=new a.Group(e.lineno,e.colno);break;case o.TOKEN_LEFT_BRACKET:t=new a.Array(e.lineno,e.colno);break;case o.TOKEN_LEFT_CURLY:t=new a.Dict(e.lineno,e.colno);break;default:return null}for(;;){var i=this.peekToken().type;if(i===o.TOKEN_RIGHT_PAREN||i===o.TOKEN_RIGHT_BRACKET||i===o.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(o.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof a.Dict){var n=this.parsePrimary();this.skip(o.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var r=this.parseExpression();t.addChild(new a.Pair(n.lineno,n.colno,n,r))}else{var s=this.parseExpression();t.addChild(s)}}return t},c.parseSignature=function(t,e){var i=this.peekToken();if(!e&&i.type!==o.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",i.lineno,i.colno)}i.type===o.TOKEN_LEFT_PAREN&&(i=this.nextToken());for(var n=new a.NodeList(i.lineno,i.colno),r=new a.KeywordArgs(i.lineno,i.colno),s=!1;;){if(i=this.peekToken(),!e&&i.type===o.TOKEN_RIGHT_PAREN){this.nextToken();break}if(e&&i.type===o.TOKEN_BLOCK_END)break;if(s&&!this.skip(o.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",i.lineno,i.colno);else{var c=this.parseExpression();this.skipValue(o.TOKEN_OPERATOR,"=")?r.addChild(new a.Pair(c.lineno,c.colno,c,this.parseExpression())):n.addChild(c)}s=!0}return r.children.length&&n.addChild(r),n},c.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,e=arguments.length,i=new Array(e),n=0;n=","//","**"],R=M+this.current();switch(-1!==n.indexOf(P,R)&&(this.forward(),M=R,-1!==n.indexOf(P,R+this.current())&&(M=R+this.current(),this.forward())),M){case"(":D=m;break;case")":D=f;break;case"[":D=y;break;case"]":D=_;break;case"{":D=b;break;case"}":D=v;break;case",":D=k;break;case":":D=w;break;case"~":D=E;break;case"|":D=x;break;default:D=g}return O(D,M,e,i)}if((t=this._extractUntil(o+a)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var F=this._extract("0123456789");return O(C,t+"."+F,e,i)}return O("int",t,e,i)}if(t.match(/^(true|false)$/))return O(T,t,e,i);if("none"===t)return O(L,t,e,i);if("null"===t)return O(L,t,e,i);if(t)return O(A,t,e,i);throw new Error("Unexpected value while parsing: "+t)}var U,V=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this._extractString(this.tags.BLOCK_START+"-"))||(t=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,O(l,t,e,i);if((t=this._extractString(this.tags.VARIABLE_START+"-"))||(t=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,O(p,t,e,i);t="";var j=!1;for(this._matches(this.tags.COMMENT_START)&&(j=!0,t=this._extractString(this.tags.COMMENT_START));null!==(U=this._extractUntil(V));){if(t+=U,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!j){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var K=t.slice(-this.colno);if(/^\s+$/.test(K)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!j)throw new Error("unexpected end of comment");t+=this._extractString(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===U&&j)throw new Error("expected end of comment, got end of file");return O(j?h:c,t,e,i)},e._parseString=function(t){this.forward();for(var e="";!this.isFinished()&&this.current()!==t;){var i=this.current();if("\\"===i){switch(this.forward(),this.current()){case"n":e+="\n";break;case"t":e+="\t";break;case"r":e+="\r";break;default:e+=this.current()}this.forward()}else e+=i,this.forward()}return this.forward(),e},e._matches=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},e._extractString=function(t){return this._matches(t)?(this.forwardN(t.length),t):null},e._extractUntil=function(t){return this._extractMatching(!0,t||"")},e._extract=function(t){return this._extractMatching(!1,t)},e._extractMatching=function(t,e){if(this.isFinished())return null;var i=e.indexOf(this.current());if(t&&-1===i||!t&&-1!==i){var n=this.current();this.forward();for(var o=e.indexOf(this.current());(t&&-1===o||!t&&-1!==o)&&!this.isFinished();)n+=this.current(),this.forward(),o=e.indexOf(this.current());return n}return""},e._extractRegex=function(t){var e=this.currentStr().match(t);return e?(this.forwardN(e[0].length),e):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(t){for(var e=0;e1024){for(var e=0,i=o.length-a;e0&&r.length>o&&!r.warned){r.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=r.length,s=c,console&&console.warn&&console.warn(s)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},o=d.bind(n);return o.listener=i,n.wrapFn=o,o}function m(t,e,i){var n=t._events;if(void 0===n)return[];var o=n[e];return void 0===o?[]:"function"==typeof o?i?[o.listener||o]:[o]:i?function(t){for(var e=new Array(t.length),i=0;i0&&(r=e[0]),r instanceof Error)throw r;var s=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw s.context=r,s}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)a(c,this,e);else{var l=c.length,u=y(c,l);for(i=0;i=0;a--)if(i[a]===e||i[a].listener===e){r=i[a].listener,o=a;break}if(o<0)return this;0===o?i.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return m(this,t,!0)},s.prototype.rawListeners=function(t){return m(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,i){"use strict";var n=i(3),o=i(0),a=0;function r(){return"hole_"+a++}function s(t,e){for(var i=null,n=0;n=e)return t;var i=e-t.length,r=n.repeat(" ",i/2-i%2),s=n.repeat(" ",i/2);return o.copySafeness(t,r+t+s)},e.default=function(t,e,i){return i?t||e:void 0!==t?t:e},e.dictsort=function(t,e,i){if(!n.isObject(t))throw new n.TemplateError("dictsort filter: val must be an object");var o,a=[];for(var r in t)a.push([r,t[r]]);if(void 0===i||"key"===i)o=0;else{if("value"!==i)throw new n.TemplateError("dictsort filter: You can only sort by either key or value");o=1}return a.sort((function(t,i){var a=t[o],r=i[o];return e||(n.isString(a)&&(a=a.toUpperCase()),n.isString(r)&&(r=r.toUpperCase())),a>r?1:a===r?0:-1})),a},e.dump=function(t,e){return JSON.stringify(t,null,e)},e.escape=function(t){return t instanceof o.SafeString?t:(t=null==t?"":t,o.markSafe(n.escape(t.toString())))},e.safe=function(t){return t instanceof o.SafeString?t:(t=null==t?"":t,o.markSafe(t.toString()))},e.first=function(t){return t[0]},e.forceescape=function(t){return t=null==t?"":t,o.markSafe(n.escape(t.toString()))},e.groupby=function(t,e){return n.groupBy(t,e,this.env.opts.throwOnUndefined)},e.indent=function(t,e,i){if(""===(t=a(t,"")))return"";e=e||4;var r=t.split("\n"),s=n.repeat(" ",e),c=r.map((function(t,e){return 0!==e||i?""+s+t:t})).join("\n");return o.copySafeness(t,c)},e.join=function(t,e,i){return e=e||"",i&&(t=n.map(t,(function(t){return t[i]}))),t.join(e)},e.last=function(t){return t[t.length-1]},e.length=function(t){var e=a(t,"");return void 0!==e?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:!n.isObject(e)||e instanceof o.SafeString?e.length:n.keys(e).length:0},e.list=c,e.lower=function(t){return(t=a(t,"")).toLowerCase()},e.nl2br=function(t){return null==t?"":o.copySafeness(t,t.replace(/\r\n|\n/g,"
\n"))},e.random=function(t){return t[Math.floor(Math.random()*t.length)]},e.reject=l(!1),e.rejectattr=function(t,e){return t.filter((function(t){return!t[e]}))},e.select=l(!0),e.selectattr=function(t,e){return t.filter((function(t){return!!t[e]}))},e.replace=function(t,e,i,n){var a=t;if(e instanceof RegExp)return t.replace(e,i);void 0===n&&(n=-1);var r="";if("number"==typeof e)e=""+e;else if("string"!=typeof e)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof o.SafeString))return t;if(""===e)return r=i+t.split("").join(i)+i,o.copySafeness(t,r);var s=t.indexOf(e);if(0===n||-1===s)return t;for(var c=0,l=0;s>-1&&(-1===n||l=o&&u.push(i),a.push(u)}return a},e.sum=function(t,e,i){return void 0===i&&(i=0),e&&(t=n.map(t,(function(t){return t[e]}))),i+t.reduce((function(t,e){return t+e}),0)},e.sort=o.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(t,e,i,o){var a=this,r=n.map(t,(function(t){return t})),s=n.getAttrGetter(o);return r.sort((function(t,r){var c=o?s(t):t,l=o?s(r):r;if(a.env.opts.throwOnUndefined&&o&&(void 0===c||void 0===l))throw new TypeError('sort: attribute "'+o+'" resolved to undefined');return!i&&n.isString(c)&&n.isString(l)&&(c=c.toLowerCase(),l=l.toLowerCase()),cl?e?-1:1:0})),r})),e.string=function(t){return o.copySafeness(t,t)},e.striptags=function(t,e){var i,n=u((t=a(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return i=e?n.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):n.replace(/\s+/gi," "),o.copySafeness(t,i)},e.title=function(t){var e=(t=a(t,"")).split(" ").map((function(t){return s(t)}));return o.copySafeness(t,e.join(" "))},e.trim=u,e.truncate=function(t,e,i,n){var r=t;if(e=e||255,(t=a(t,"")).length<=e)return t;if(i)t=t.substring(0,e);else{var s=t.lastIndexOf(" ",e);-1===s&&(s=e),t=t.substring(0,s)}return t+=null!=n?n:"...",o.copySafeness(r,t)},e.upper=function(t){return(t=a(t,"")).toUpperCase()},e.urlencode=function(t){var e=encodeURIComponent;return n.isString(t)?e(t):(n.isArray(t)?t:n._entries(t)).map((function(t){var i=t[0],n=t[1];return e(i)+"="+e(n)})).join("&")};var p=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,d=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,h=/^https?:\/\/.*$/,m=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/;e.urlize=function(t,e,i){r(e)&&(e=1/0);var n=!0===i?' rel="nofollow"':"";return t.split(/(\s+)/).filter((function(t){return t&&t.length})).map((function(t){var i=t.match(p),o=i?i[1]:t,a=o.substr(0,e);return h.test(o)?'"+a+"":m.test(o)?'"+a+"":d.test(o)?''+o+"":f.test(o)?'"+a+"":t})).join("")},e.wordcount=function(t){var e=(t=a(t,""))?t.match(/\w+/g):null;return e?e.length:null},e.float=function(t,e){var i=parseFloat(t);return r(i)?e:i};var y=o.makeMacro(["value","default","base"],[],(function(t,e,i){void 0===i&&(i=10);var n=parseInt(t,i);return r(n)?e:n}));e.int=y,e.d=e.default,e.e=e.escape},function(t,e,i){"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}var o=function(t){var e,i;function o(e){var i;return(i=t.call(this)||this).precompiled=e||{},i}return i=t,(e=o).prototype=Object.create(i.prototype),e.prototype.constructor=e,n(e,i),o.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},o}(i(6));t.exports={PrecompiledLoader:o}},function(t,e,i){"use strict";var n=i(2).SafeString;e.callable=function(t){return"function"==typeof t},e.defined=function(t){return void 0!==t},e.divisibleby=function(t,e){return t%e==0},e.escaped=function(t){return t instanceof n},e.equalto=function(t,e){return t===e},e.eq=e.equalto,e.sameas=e.equalto,e.even=function(t){return t%2==0},e.falsy=function(t){return!t},e.ge=function(t,e){return t>=e},e.greaterthan=function(t,e){return t>e},e.gt=e.greaterthan,e.le=function(t,e){return t<=e},e.lessthan=function(t,e){return t0)for(var o=t;oe;a+=i)n.push(a);return n},cycler:function(){return t=Array.prototype.slice.call(arguments),e=-1,{current:null,reset:function(){e=-1,this.current=null},next:function(){return++e>=t.length&&(e=0),this.current=t[e],this.current}};var t,e},joiner:function(t){return function(t){t=t||",";var e=!0;return function(){var i=e?"":t;return e=!1,i}}(t)}}}},function(t,e,i){var n=i(4);t.exports=function(t,e){function i(t,e){if(this.name=t,this.path=t,this.defaultEngine=e.defaultEngine,this.ext=n.extname(t),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return i.prototype.render=function(e,i){t.render(this.name,e,i)},e.set("view",i),e.set("nunjucksEnv",t),t}},function(t,e,i){"use strict";var n=i(4),o=i(4),a=i(0)._prettifyError,r=i(5),s=i(7).Environment,c=i(24);function l(t,e){return!!Array.isArray(e)&&e.some((function(e){return t.match(e)}))}function u(t,e){(e=e||{}).isString=!0;var i=e.env||new s([]),n=e.wrapper||c;if(!e.name)throw new Error('the "name" option is required when compiling a string');return n([p(t,e.name,i)],e)}function p(t,e,i){var n,o=(i=i||new s([])).asyncFilters,c=i.extensionsList;e=e.replace(/\\/g,"/");try{n=r.compile(t,o,c,e,i.opts)}catch(t){throw a(e,!1,t)}return{name:e,template:n}}t.exports={precompile:function(t,e){var i=(e=e||{}).env||new s([]),a=e.wrapper||c;if(e.isString)return u(t,e);var r=n.existsSync(t)&&n.statSync(t),d=[],h=[];if(r.isFile())d.push(p(n.readFileSync(t,"utf-8"),e.name||t,i));else if(r.isDirectory()){!function i(a){n.readdirSync(a).forEach((function(r){var s=o.join(a,r),c=s.substr(o.join(t,"/").length),u=n.statSync(s);u&&u.isDirectory()?l(c+="/",e.exclude)||i(s):l(c,e.include)&&h.push(s)}))}(t);for(var m=0;mt.length||o>0&&r>=n||o<0&&r<=n);r+=o)a.push(i.memberLookup(t,r));return a}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var m={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw new Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var e=0;e{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>BaseRemoteElement});var lit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(670),lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(385),ha_nunjucks__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(703),_models_constants__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(290),_models_maps__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(63),_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(626),__decorate=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};class BaseRemoteElement extends lit__WEBPACK_IMPORTED_MODULE_0__.WF{constructor(){super(...arguments),this.icons=[],this.renderRipple=!0,this.value=0,this.getValueFromHass=!0,this.unitOfMeasurement="",this.fireMouseEvent=!0,this.swiping=!1}fireHapticEvent(t){if(this.renderTemplate(this.config.haptics)??1){const e=new Event("haptic",{bubbles:!0,composed:!0});e.detail=t,window.dispatchEvent(e)}}endAction(){this.momentaryStart=void 0,this.momentaryEnd=void 0,this.swiping=!1,this.targetTouches=void 0,this.initialX=void 0,this.initialY=void 0,this.currentX=void 0,this.currentY=void 0,this.deltaX=void 0,this.deltaY=void 0}sendAction(t,e=this.config){let i;switch(t){case"mouse_action":i=e.mouse_action;break;case"multi_mouse_action":i=e.multi_mouse_action??e.mouse_action;break;case"momentary_start_action":i=e.momentary_start_action;break;case"momentary_end_action":i=e.momentary_end_action;break;case"multi_hold_action":i=e.multi_hold_action??e.hold_action??e.multi_tap_action??e.tap_action;break;case"multi_double_tap_action":i=e.multi_double_tap_action??e.double_tap_action??e.multi_tap_action??e.tap_action;break;case"multi_tap_action":i=e.multi_tap_action??e.tap_action;break;case"hold_action":i=e.hold_action??e.tap_action;break;case"double_tap_action":i=e.double_tap_action??e.tap_action;break;default:i=e.tap_action}if(!i)return clearTimeout(this.getValueFromHassTimer),this.getValueFromHass=!0,void this.requestUpdate();if(i=this.deepRenderTemplate(i),i&&this.handleConfirmation(i))try{switch(i.action){case"navigate":this.navigate(i);break;case"url":this.url(i);break;case"assist":this.assist(i);break;case"more-info":this.moreInfo(i);break;case"toggle":this.toggle(i);break;case"call-service":case"perform-action":this.callService(i);break;case"source":this.source(i);break;case"key":this.key(i,t);break;case"fire-dom-event":this.fireDomEvent(i);break;case"eval":this.eval(i);break;case"textbox":case"search":case"keyboard":this.keyboard(i)}}catch(t){throw this.endAction(),t}else this.dispatchEvent(new CustomEvent("confirmation-failed"))}key(t,e){switch(t.platform){case"Kodi":this.hass.callService("kodi","call_method",{entity_id:t.media_player_id,method:t.key});break;case"LG webOS":this.hass.callService("webostv","button",{entity_id:t.media_player_id,button:t.key});break;default:{const i={entity_id:t.remote_id??"",command:t.key??""};"hold_action"!=e||this.config.hold_action&&"none"!=this.config.hold_action.action||(i.hold_secs=.5),this.hass.callService("remote","send_command",i);break}}}source(t){switch(t.platform){case"Fire TV":case"Roku":case"Kodi":case"Apple TV":case"Samsung TV":case"LG webOS":this.hass.callService("media_player","select_source",{entity_id:t.media_player_id,source:t.source});break;case"Sony BRAVIA":this.hass.callService("media_player","play_media",{entity_id:t.media_player_id,media_content_id:t.source,media_content_type:"app"});break;default:this.hass.callService("remote","turn_on",{entity_id:t.remote_id,activity:t.source})}}callService(t){const[e,i]=(t.perform_action??t.service).split(".");this.hass.callService(e,i,t.data,t.target)}navigate(t){const e=t.navigation_path??"",i=t.navigation_replace??!1;if(e.includes("//"))return void console.error('Protocol detected in navigation path. To navigate to another website use the action "url" with the key "url_path" instead.');1==i?window.history.replaceState(window.history.state?.root?{root:!0}:null,"",e):window.history.pushState(null,"",e);const n=new Event("location-changed",{bubbles:!1,cancelable:!0,composed:!1});n.detail={replace:1==i},window.dispatchEvent(n)}url(t){let e=t.url_path??"";e.includes("//")||(e=`https://${e}`),window.open(e)}assist(t){this.hass?.auth?.external?.config?.hasAssist?this.hass?.auth?.external?.fireMessage({type:"assist/show",payload:{pipeline_id:t.pipeline_id,start_listening:t.start_listening}}):window.open(`${window.location.href}?conversation=1`,"_self")}moreInfo(t){const e=new Event("hass-more-info",{bubbles:!0,cancelable:!0,composed:!0});e.detail={entityId:t.target?.entity_id??this.config.entity_id},this.dispatchEvent(e)}toggle(t){const e={...t.data,...t.target};if(Array.isArray(e.entity_id))for(const t of e.entity_id)this.toggleSingle(t);else e.entity_id?this.toggleSingle(e.entity_id):this.hass.callService("homeassistant","toggle",e)}toggleSingle(t){const e=["closed","locked","off"].includes(this.hass.states[t].state);let i,n=t.split(".")[0];switch(n){case"lock":i=e?"unlock":"lock";break;case"cover":i=e?"open_cover":"close_cover";break;case"button":case"input_button":i="press";break;case"scene":i="turn_on";break;case"valve":i=e?"open_valve":"close_valve";break;default:n="homeassistant",i=e?"turn_on":"turn_off"}this.hass.callService(n,i,{entity_id:t})}keyboard(t){const e=new Event("keyboard-dialog-open",{composed:!0,bubbles:!0});e.detail=t,this.getRootNode().querySelector("keyboard-dialog").shadowRoot?.querySelector("dialog")?.dispatchEvent(e)}fireDomEvent(t){const e=new Event(t.event_type??"ll-custom",{composed:!0,bubbles:!0});e.detail=t,this.dispatchEvent(e)}eval(action){eval(action.eval??"")}handleConfirmation(t){if(t.confirmation){let e=`Are you sure you want to run action '${t.action}'?`;return 1==t.confirmation?(this.fireHapticEvent("warning"),confirm(e)):(t.confirmation?.text&&(e=t.confirmation.text),!!t.confirmation?.exemptions?.map((t=>t.user)).includes(this.hass.user?.id)||(this.fireHapticEvent("warning"),confirm(e)))}return!0}firstUpdated(){this.addEventListener("confirmation-failed",this.confirmationFailed)}confirmationFailed(){clearTimeout(this.getValueFromHassTimer),this.getValueFromHass=!0,this.requestUpdate()}setValue(){if(this.entityId=this.renderTemplate(this.config.entity_id),this.unitOfMeasurement=this.renderTemplate(this.config.unit_of_measurement)??"",this.getValueFromHass&&this.entityId)if(clearInterval(this.valueUpdateInterval),this.valueUpdateInterval=void 0,this.valueAttribute=this.renderTemplate(this.config.value_attribute??"state").toLowerCase(),this.hass.states[this.entityId])if("state"==this.valueAttribute)this.value=this.hass.states[this.entityId].state;else{let t;const e=this.valueAttribute.match(/\[\d+\]$/);if(e){const i=parseInt(e[0].replace(/\[|\]/g,""));this.valueAttribute=this.valueAttribute.replace(e[0],""),t=this.hass.states[this.entityId]?.attributes?.[this.valueAttribute],t=t&&Array.isArray(t)&&t.length?t[i]:void 0}else t=this.hass.states[this.entityId]?.attributes?.[this.valueAttribute];if(null!=t||"elapsed"==this.valueAttribute)switch(this.valueAttribute){case"brightness":this.value=Math.round(100*parseInt(t??0)/255);break;case"media_position":try{const e=()=>{"playing"==this.hass.states[this.entityId].state?this.value=Math.min(Math.floor(Math.floor(t)+(Date.now()-Date.parse(this.hass.states[this.entityId].attributes?.media_position_updated_at))/1e3),Math.floor(this.hass.states[this.entityId].attributes?.media_duration)):this.value=t};e(),this.valueUpdateInterval=setInterval(e,500)}catch(e){console.error(e),this.value=t}break;case"elapsed":if(this.entityId.startsWith("timer.")){if("idle"==this.hass.states[this.entityId].state)this.value=0;else{const t=this.hass.states[this.entityId].attributes?.duration.split(":"),e=3600*parseInt(t[0])+60*parseInt(t[1])+parseInt(t[2]),i=Date.parse(this.hass.states[this.entityId].attributes?.finishes_at);try{const t=()=>{if("active"==this.hass.states[this.entityId].state){const t=(i-Date.now())/1e3,n=Math.floor(e-t);this.value=Math.min(n,e)}else{const t=this.hass.states[this.entityId].attributes?.remaining.split(":"),i=3600*parseInt(t[0])+60*parseInt(t[1])+parseInt(t[2]);this.value=Math.floor(e-i)}};t(),this.valueUpdateInterval=setInterval(t,500)}catch(t){console.error(t),this.value=0}}break}default:this.value=t}else this.value=t}else this.value=void 0}renderTemplate(t,e){let i=0;this.momentaryStart&&this.momentaryEnd&&(i=(this.momentaryEnd-this.momentaryStart)/1e3),e={VALUE:this.value,HOLD_SECS:i??0,UNIT:this.unitOfMeasurement,value:this.value,hold_secs:i??0,unit:this.unitOfMeasurement,initialX:this.initialX,initialY:this.initialY,currentX:this.currentX,currentY:this.currentY,deltaX:this.deltaX,deltaY:this.deltaY,config:{...this.config,entity:this.entityId,attribute:this.valueAttribute},...e};let n=(e={render:t=>this.renderTemplate(t,e),...e}).value;null!=n&&"number"==typeof n&&null!=this.precision&&(n=Number(n).toFixed(this.precision),e={...e,VALUE:n,value:n});const o=(0,ha_nunjucks__WEBPACK_IMPORTED_MODULE_2__.X)(this.hass,t,e);if(o!=t)return o;if("string"==typeof t)for(const i of["VALUE","HOLD_SECS","UNIT"]){if(t==i)return e[i];t.includes(i)&&(t=t.replace(new RegExp(i,"g"),e[i]??""))}return t}deepRenderTemplate(t,e){const i=structuredClone(t),n=(0,_utils__WEBPACK_IMPORTED_MODULE_4__.b$)(i);for(const t of n)(0,_utils__WEBPACK_IMPORTED_MODULE_4__.HD)(i,t,this.renderTemplate((0,_utils__WEBPACK_IMPORTED_MODULE_4__.vz)(i,t),e));return i}resetGetValueFromHass(){const t=this.renderTemplate(this.config.value_from_hass_delay??_models_constants__WEBPACK_IMPORTED_MODULE_5__.s$);this.getValueFromHassTimer=setTimeout((()=>{this.getValueFromHass=!0,this.requestUpdate()}),t)}buildIcon(t,e){t=this.renderTemplate(t??"",e);let i=lit__WEBPACK_IMPORTED_MODULE_0__.qy``;if(t)if(t.includes(":"))i=lit__WEBPACK_IMPORTED_MODULE_0__.qy``;else{const e=(this.icons??[]).filter((e=>e.name==t))[0]??_models_maps__WEBPACK_IMPORTED_MODULE_3__.o$.filter((e=>e.name==t))[0];i=lit__WEBPACK_IMPORTED_MODULE_0__.qy``}return lit__WEBPACK_IMPORTED_MODULE_0__.qy`
${i}
`}buildLabel(t,e){if(t){const i=this.renderTemplate(t,e);if(i)return lit__WEBPACK_IMPORTED_MODULE_0__.qy`
${i}
`}return""}buildRipple(){return this.renderRipple?lit__WEBPACK_IMPORTED_MODULE_0__.qy``:""}buildStyles(t,e){return t?lit__WEBPACK_IMPORTED_MODULE_0__.qy``:""}setTargetTouches(t){if(this.targetTouches)for(const e of t.targetTouches){const t=this.targetTouches.findIndex((t=>t.identifier==e.identifier));t>=0?this.targetTouches[t]=e:this.targetTouches.push(e)}else this.targetTouches=Array.from(t.targetTouches??[])}onStart(t){if("targetTouches"in t){let e=0,i=0;this.setTargetTouches(t);for(const t of this.targetTouches??[])e+=t.clientX,i+=t.clientY;this.initialX=e/(this.targetTouches?.length??1),this.initialY=i/(this.targetTouches?.length??1)}else this.initialX=t.clientX,this.initialY=t.clientY;this.currentX=this.initialX,this.currentY=this.initialY}onEnd(t){}onMove(t){let e=0,i=0;if("targetTouches"in t){this.setTargetTouches(t);for(const t of this.targetTouches??[])e+=t.clientX,i+=t.clientY;e/=this.targetTouches?.length??1,i/=this.targetTouches?.length??1}else e=t.clientX??0,i=t.clientY??0;this.deltaX=e-(this.currentX??e),this.deltaY=i-(this.currentY??i),this.currentX=e,this.currentY=i}onMouseDown(t){this.fireMouseEvent&&this.onStart(t)}onMouseUp(t){this.fireMouseEvent&&this.onEnd(t),this.fireMouseEvent=!0}onMouseMove(t){this.fireMouseEvent&&this.onMove(t)}onTouchStart(t){this.fireMouseEvent=!1,this.onStart(t)}onTouchEnd(t){this.fireMouseEvent=!1,this.onEnd(t)}onTouchMove(t){this.fireMouseEvent=!1,this.onMove(t)}onContextMenu(t){if(!this.fireMouseEvent)return t.preventDefault(),t.stopPropagation(),!1}toggleRipple(){this.cancelRippleToggle(),this.renderRippleTransition=setTimeout((()=>this.rippleTransition=!1),400),this.renderRippleOff=setTimeout((()=>this.renderRipple=!1),800),this.renderRippleOn=setTimeout((()=>this.cancelRippleToggle()),850)}cancelRippleToggle(){clearTimeout(this.renderRippleOff),clearTimeout(this.renderRippleOn),clearTimeout(this.renderRippleTransition),this.renderRippleOff=void 0,this.renderRippleOn=void 0,this.renderRippleTransition=void 0,this.rippleTransition=!0,this.renderRipple=!0}static get styles(){return lit__WEBPACK_IMPORTED_MODULE_0__.AH`:host{display:flex;flex-flow:column;place-content:center space-evenly;align-items:center;position:relative;border:none;border-radius:10px;padding:0;box-sizing:border-box;outline:0;overflow:visible;font-size:inherit;color:inherit;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}md-ripple.transition-on{opacity:1 transition: opacity 375ms linear}md-ripple.transition-off{opacity:0;transition:opacity 375ms linear}.icon{pointer-events:none;position:relative;flex-flow:column;place-content:center;display:var(--icon-display,inline-flex);transform:var(--icon-transform);color:var(--icon-color,var(--primary-text-color));filter:var(--icon-filter, none);height:var(--size,48px);width:var(--size,48px);--mdc-icon-size:var(--size, 48px)}ha-icon,svg{display:inline-flex;flex-direction:column;justify-content:center;text-align:center;align-items:center;vertical-align:middle;height:var(--size,48px);width:var(--size,48px);pointer-events:none}.label{position:relative;pointer-events:none;justify-content:center;align-items:center;height:15px;line-height:15px;width:inherit;margin:0;font-family:inherit;font-size:12px;font-weight:700;display:var(--label-display,inline-flex);transform:var(--label-transform);color:var(--label-color,inherit);filter:var(--label-filter, none)}`}}__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.MZ)()],BaseRemoteElement.prototype,"hass",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.MZ)()],BaseRemoteElement.prototype,"config",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.MZ)()],BaseRemoteElement.prototype,"icons",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.wk)()],BaseRemoteElement.prototype,"renderRipple",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.wk)()],BaseRemoteElement.prototype,"renderRippleOff",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.wk)()],BaseRemoteElement.prototype,"renderRippleOn",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.wk)()],BaseRemoteElement.prototype,"renderRippleTransition",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.wk)()],BaseRemoteElement.prototype,"rippleTransition",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.wk)()],BaseRemoteElement.prototype,"value",void 0),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.Ls)({passive:!0})],BaseRemoteElement.prototype,"onMouseDown",null),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.Ls)({passive:!0})],BaseRemoteElement.prototype,"onMouseMove",null),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.Ls)({passive:!0})],BaseRemoteElement.prototype,"onTouchStart",null),__decorate([(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.Ls)({passive:!0})],BaseRemoteElement.prototype,"onTouchMove",null)},290:(t,e,i)=>{"use strict";i.d(e,{$6:()=>r,At:()=>o,HB:()=>d,RZ:()=>p,Xy:()=>s,a3:()=>a,bQ:()=>h,hI:()=>l,jc:()=>n,s$:()=>c,zM:()=>u});const n=200,o=500,a=100,r=!0,s=!0,c=1e3,l=1,u=100,p=.01,d=0,h=1},63:(t,e,i)=>{"use strict";i.d(e,{$i:()=>n,tz:()=>o,qz:()=>a,_6:()=>r,J7:()=>s,hd:()=>c,o$:()=>l,iu:()=>u,ci:()=>p,zT:()=>h,nK:()=>d,np:()=>m,rl:()=>f,j0:()=>y,$S:()=>_,ks:()=>b,Qz:()=>v,i4:()=>g,oA:()=>k,CI:()=>w,Mo:()=>E});const n=[{type:"button",name:"power",tap_action:{action:"key",key:"POWER"},icon:"mdi:power"},{type:"button",name:"home",tap_action:{action:"key",key:"HOME"},icon:"mdi:home"},{type:"button",name:"back",tap_action:{action:"key",key:"BACK"},icon:"mdi:keyboard-backspace"},{type:"button",name:"menu",tap_action:{action:"key",key:"MENU"},icon:"mdi:menu"},{type:"button",name:"settings",tap_action:{action:"key",key:"SETTINGS"},icon:"mdi:cog"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"VOLUME_UP"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"VOLUME_DOWN"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"key",key:"MUTE"},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"DPAD_UP"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"DPAD_DOWN"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"DPAD_LEFT"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"DPAD_RIGHT"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"DPAD_CENTER"},icon:"mdi:checkbox-blank-circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"DPAD_CENTER"},up:{tap_action:{action:"key",key:"DPAD_UP"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"DPAD_DOWN"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"DPAD_LEFT"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"DPAD_RIGHT"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"DPAD_CENTER"},mouse_action:{action:"key",key:'DPAD_{{ ("RIGHT" if deltaX > 0 else "LEFT") if (deltaX | abs) > (deltaY | abs) else ("DOWN" if deltaY > 0 else "UP") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"key",key:"MEDIA_PLAY_PAUSE"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"key",key:"MEDIA_PLAY"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"key",key:"MEDIA_PAUSE"},icon:"mdi:pause"},{type:"button",name:"rewind",tap_action:{action:"key",key:"MEDIA_REWIND"},icon:"mdi:rewind"},{type:"button",name:"fast_forward",tap_action:{action:"key",key:"MEDIA_FAST_FORWARD"},icon:"mdi:fast-forward"},{type:"button",name:"previous",tap_action:{action:"key",key:"MEDIA_PREVIOUS"},icon:"mdi:skip-previous"},{type:"button",name:"next",tap_action:{action:"key",key:"MEDIA_NEXT"},icon:"mdi:skip-next"},{type:"button",name:"stop",tap_action:{action:"key",key:"MEDIA_STOP"},icon:"mdi:stop"},{type:"button",name:"record",tap_action:{action:"key",key:"MEDIA_RECORD"},icon:"mdi:record"},{type:"button",name:"keyboard",tap_action:{action:"keyboard"},icon:"mdi:keyboard"},{type:"button",name:"textbox",tap_action:{action:"textbox"},icon:"mdi:text-box"},{type:"button",name:"search",tap_action:{action:"search"},icon:"mdi:google-assistant"},{type:"button",name:"delete",tap_action:{action:"key",key:"DEL"},hold_action:{action:"repeat"},icon:"mdi:backspace"},{type:"button",name:"forward_delete",tap_action:{action:"key",key:"FOWARD_DEL"},hold_action:{action:"repeat"},icon:"mdi:backspace-reverse"},{type:"button",name:"enter",tap_action:{action:"key",key:"ENTER"},icon:"mdi:magnify"},{type:"button",name:"channel_up",tap_action:{action:"key",key:"CHANNEL_UP"},icon:"mdi:arrow-up-circle"},{type:"button",name:"channel_down",tap_action:{action:"key",key:"CHANNEL_DOWN"},icon:"mdi:arrow-down-circle"},{type:"button",name:"red",tap_action:{action:"key",key:"PROG_RED"},icon:"mdi:alpha-r-box"},{type:"button",name:"green",tap_action:{action:"key",key:"PROG_GREEN"},icon:"mdi:alpha-g-box"},{type:"button",name:"yellow",tap_action:{action:"key",key:"PROG_YELLOW"},icon:"mdi:alpha-y-box"},{type:"button",name:"blue",tap_action:{action:"key",key:"PROG_BLUE"},icon:"mdi:alpha-b-box"},{type:"button",name:"a",tap_action:{action:"key",key:"BUTTON_A"},icon:"mdi:alpha-a-circle"},{type:"button",name:"b",tap_action:{action:"key",key:"BUTTON_B"},icon:"mdi:alpha-b-circle"},{type:"button",name:"x",tap_action:{action:"key",key:"BUTTON_X"},icon:"mdi:alpha-x-circle"},{type:"button",name:"y",tap_action:{action:"key",key:"BUTTON_Y"},icon:"mdi:alpha-y-circle"},{type:"button",name:"xpad",icon:"mdi:gamepad-circle"},{type:"button",name:"npad",icon:"mdi:gamepad-circle"},{type:"button",name:"n0",tap_action:{action:"key",key:"0"},icon:"mdi:numeric-0"},{type:"button",name:"n1",tap_action:{action:"key",key:"1"},icon:"mdi:numeric-1"},{type:"button",name:"n2",tap_action:{action:"key",key:"2"},icon:"mdi:numeric-2"},{type:"button",name:"n3",tap_action:{action:"key",key:"3"},icon:"mdi:numeric-3"},{type:"button",name:"n4",tap_action:{action:"key",key:"4"},icon:"mdi:numeric-4"},{type:"button",name:"n5",tap_action:{action:"key",key:"5"},icon:"mdi:numeric-5"},{type:"button",name:"n6",tap_action:{action:"key",key:"6"},icon:"mdi:numeric-6"},{type:"button",name:"n7",tap_action:{action:"key",key:"7"},icon:"mdi:numeric-7"},{type:"button",name:"n8",tap_action:{action:"key",key:"8"},icon:"mdi:numeric-8"},{type:"button",name:"n9",tap_action:{action:"key",key:"9"},icon:"mdi:numeric-9"},{type:"button",name:"numpad",icon:"mdi:dialpad"},{type:"button",name:"f1",tap_action:{action:"key",key:"F1"},icon:"mdi:keyboard-f1"},{type:"button",name:"f2",tap_action:{action:"key",key:"F2"},icon:"mdi:keyboard-f2"},{type:"button",name:"f3",tap_action:{action:"key",key:"F3"},icon:"mdi:keyboard-f3"},{type:"button",name:"f4",tap_action:{action:"key",key:"F4"},icon:"mdi:keyboard-f4"},{type:"button",name:"f5",tap_action:{action:"key",key:"F5"},icon:"mdi:keyboard-f5"},{type:"button",name:"f6",tap_action:{action:"key",key:"F6"},icon:"mdi:keyboard-f6"},{type:"button",name:"f7",tap_action:{action:"key",key:"F7"},icon:"mdi:keyboard-f7"},{type:"button",name:"f8",tap_action:{action:"key",key:"F8"},icon:"mdi:keyboard-f8"},{type:"button",name:"f9",tap_action:{action:"key",key:"F9"},icon:"mdi:keyboard-f9"},{type:"button",name:"f10",tap_action:{action:"key",key:"F10"},icon:"mdi:keyboard-f10"},{type:"button",name:"f11",tap_action:{action:"key",key:"F11"},icon:"mdi:keyboard-f11"},{type:"button",name:"f12",tap_action:{action:"key",key:"F12"},icon:"mdi:keyboard-f12"},{type:"button",name:"info",tap_action:{action:"key",key:"INFO"},icon:"mdi:information"},{type:"button",name:"guide",tap_action:{action:"key",key:"GUIDE"},icon:"mdi:television-box"},{type:"button",name:"captions",tap_action:{action:"key",key:"CAPTIONS"},icon:"mdi:closed-caption"},{type:"button",name:"button_mode",tap_action:{action:"key",key:"BUTTON_MODE"},icon:"mdi:gesture-tap-button"},{type:"button",name:"explorer",tap_action:{action:"key",key:"EXPLORER"},icon:"mdi:folder-multiple"},{type:"button",name:"teletext",tap_action:{action:"key",key:"TV_TELETEXT"},icon:"mdi:card-text"},{type:"button",name:"tv",tap_action:{action:"key",key:"TV"},icon:"mdi:television-box"},{type:"button",name:"dvr",tap_action:{action:"key",key:"DVR"},icon:"mdi:audio-video"},{type:"button",name:"audio_track",tap_action:{action:"key",key:"MEDIA_AUDIO_TRACK"},icon:"mdi:waveform"}],o=[{type:"button",name:"appletv",tap_action:{action:"source",source:"https://tv.apple.com"},icon:"appletv"},{type:"button",name:"crunchyroll",tap_action:{action:"source",source:"crunchyroll://"},icon:"crunchyroll"},{type:"button",name:"dazn",tap_action:{action:"source",source:"https://open.dazn.com/"},icon:"dazn"},{type:"button",name:"discoveryplus",tap_action:{action:"source",source:"discoveryplus://"},icon:"discovery"},{type:"button",name:"disney",tap_action:{action:"source",source:"https://www.disneyplus.com"},icon:"disney"},{type:"button",name:"emby",tap_action:{action:"source",source:"embyatv://tv.emby.embyatv/startapp"},icon:"mdi:emby"},{type:"button",name:"f1tv",tap_action:{action:"source",source:"com.formulaone.production"},icon:"f1tv"},{type:"button",name:"filmplus",tap_action:{action:"source",source:"com.guideplus.co"},icon:"filmplus"},{type:"button",name:"foxsports",tap_action:{action:"source",source:"foxsports://live"},icon:"foxsports"},{type:"button",name:"hulu",tap_action:{action:"source",source:"hulu://"},icon:"mdi:hulu"},{type:"button",name:"jellyfin",tap_action:{action:"source",source:"org.jellyfin.androidtv"},icon:"jellyfin"},{type:"button",name:"kijk",tap_action:{action:"source",source:"com.talpa.kijk"},icon:"kijk"},{type:"button",name:"kodi",tap_action:{action:"source",source:"org.xbmc.kodi"},icon:"mdi:kodi"},{type:"button",name:"max",tap_action:{action:"source",source:"https://play.max.com"},icon:"max"},{type:"button",name:"mlbtv",tap_action:{action:"source",source:"mlbatbat://"},icon:"mlbtv"},{type:"button",name:"nba",tap_action:{action:"source",source:"gametime://"},icon:"nba"},{type:"button",name:"netflix",tap_action:{action:"source",source:"netflix://"},icon:"mdi:netflix"},{type:"button",name:"npostart",tap_action:{action:"source",source:"nl.uitzendinggemist"},icon:"npo"},{type:"button",name:"nrktv",tap_action:{action:"source",source:"nrktv://"},icon:"nrktv"},{type:"button",name:"pandora",tap_action:{action:"source",source:"com.pandora.android.atv"},icon:"mdi:pandora"},{type:"button",name:"paramount",tap_action:{action:"source",source:"com.cbs.ott"},icon:"paramount"},{type:"button",name:"peacock",tap_action:{action:"source",source:"com.peacocktv.peacockandroid"},icon:"peacock"},{type:"button",name:"pia",tap_action:{action:"source",source:"piavpn://"},icon:"pia"},{type:"button",name:"plex",tap_action:{action:"source",source:"plex://"},icon:"mdi:plex"},{type:"button",name:"primevideo",tap_action:{action:"source",source:"https://app.primevideo.com"},icon:"primevideo"},{type:"button",name:"rakutentv",tap_action:{action:"source",source:"https://rakutentv.page.link"},icon:"rakutentv"},{type:"button",name:"rakutenviki",tap_action:{action:"source",source:"viki://home"},icon:"rakutenviki"},{type:"button",name:"skyshowtime",tap_action:{action:"source",source:"https://www.skyshowtime.com/deeplink"},icon:"showtime"},{type:"button",name:"spotify",tap_action:{action:"source",source:"spotify://"},icon:"mdi:spotify"},{type:"button",name:"starplus",tap_action:{action:"source",source:"https://www.starplus.com"},icon:"starplus"},{type:"button",name:"steam",tap_action:{action:"source",source:"com.valvesoftware.steamlink"},icon:"mdi:steam"},{type:"button",name:"stremio",tap_action:{action:"source",source:"stremio://"},icon:"stremio"},{type:"button",name:"surfshark",tap_action:{action:"source",source:"https://surfshark.com/locations-ul"},icon:"surfshark"},{type:"button",name:"tv2play",tap_action:{action:"source",source:"dk.tv2.tv2playtv://*.tv2.dk/android/dk.tv2.tv2playtv/callback"},icon:"tv2play"},{type:"button",name:"viaplay",tap_action:{action:"source",source:"viaplay://deeplink/film"},icon:"viaplay"},{type:"button",name:"videoland",tap_action:{action:"source",source:"videoland-v2://"},icon:"videoland"},{type:"button",name:"vlc",tap_action:{action:"source",source:"org.videolan.vlc"},icon:"mdi:vlc"},{type:"button",name:"vudu",tap_action:{action:"source",source:"vuduapp://"},icon:"vudu"},{type:"button",name:"waiputv",tap_action:{action:"source",source:"de.exaring.waipu"},icon:"waiputv"},{type:"button",name:"wow",tap_action:{action:"source",source:"de.sky.online"},icon:"wow"},{type:"button",name:"youtube",tap_action:{action:"source",source:"vnd.youtube://"},icon:"mdi:youtube"},{type:"button",name:"youtubetv",tap_action:{action:"source",source:"https://tv.youtube.com"},icon:"mdi:youtube-tv"}],a=[{type:"button",name:"wakeup",tap_action:{action:"key",key:"wakeup"},icon:"mdi:power-on"},{type:"button",name:"suspend",tap_action:{action:"key",key:"suspend"},icon:"mdi:power-off"},{type:"button",name:"home",tap_action:{action:"key",key:"home"},icon:"mdi:home"},{type:"button",name:"menu",tap_action:{action:"key",key:"menu"},icon:"mdi:menu"},{type:"button",name:"top_menu",tap_action:{action:"key",key:"top_menu"},icon:"mdi:apple"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"volume_up"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"volume_down"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"up"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"down"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"left"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"right"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"select"},icon:"mdi:circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"select"},up:{tap_action:{action:"key",key:"up"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"down"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"left"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"right"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"select"},mouse_action:{action:"key",key:'{{ ("right" if deltaX > 0 else "left") if (deltaX | abs) > (deltaY | abs) else ("down" if deltaY > 0 else "up") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"media_player.media_play_pause"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"key",key:"play"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"key",key:"pause"},icon:"mdi:pause"},{type:"button",name:"skip_backward",tap_action:{action:"key",key:"skip_backward"},icon:"mdi:skip-backward"},{type:"button",name:"skip_forward",tap_action:{action:"key",key:"skip_forward"},icon:"mdi:skip-forward"},{type:"button",name:"previous",tap_action:{action:"key",key:"previous"},icon:"mdi:skip-previous"},{type:"button",name:"next",tap_action:{action:"key",key:"next"},icon:"mdi:skip-next"}],r=[{type:"button",name:"allente",tap_action:{action:"source",source:"Allente"},icon:"allente"},{type:"button",name:"appletv",tap_action:{action:"source",source:"TV"},icon:"appletv"},{type:"button",name:"crunchyroll",tap_action:{action:"source",source:"Crunchyroll"},icon:"crunchyroll"},{type:"button",name:"dazn",tap_action:{action:"source",source:"DAZN"},icon:"dazn"},{type:"button",name:"discoveryplus",tap_action:{action:"source",source:"discovery+"},icon:"discovery"},{type:"button",name:"disney",tap_action:{action:"source",source:"Disney+"},icon:"disney"},{type:"button",name:"emby",tap_action:{action:"source",source:"Emby"},icon:"mdi:emby"},{type:"button",name:"f1tv",tap_action:{action:"source",source:"F1 TV"},icon:"f1tv"},{type:"button",name:"foxsports",tap_action:{action:"source",source:"FOX Sports"},icon:"foxsports"},{type:"button",name:"hulu",tap_action:{action:"source",source:"Hulu"},icon:"mdi:hulu"},{type:"button",name:"max",tap_action:{action:"source",source:"Max"},icon:"max"},{type:"button",name:"mlbtv",tap_action:{action:"source",source:"MLB"},icon:"mlbtv"},{type:"button",name:"nba",tap_action:{action:"source",source:"NBA"},icon:"nba"},{type:"button",name:"netflix",tap_action:{action:"source",source:"Netflix"},icon:"mdi:netflix"},{type:"button",name:"npostart",tap_action:{action:"source",source:"NPO"},icon:"npo"},{type:"button",name:"nrktv",tap_action:{action:"source",source:"NRK TV"},icon:"nrktv"},{type:"button",name:"pandora",tap_action:{action:"source",source:"Pandora"},icon:"mdi:pandora"},{type:"button",name:"paramount",tap_action:{action:"source",source:"Paramount+"},icon:"paramount"},{type:"button",name:"peacock",tap_action:{action:"source",source:"Peacock"},icon:"peacock"},{type:"button",name:"pia",tap_action:{action:"source",source:"PIA VPN"},icon:"pia"},{type:"button",name:"plex",tap_action:{action:"source",source:"Plex"},icon:"mdi:plex"},{type:"button",name:"primevideo",tap_action:{action:"source",source:"Prime Video"},icon:"primevideo"},{type:"button",name:"skyshowtime",tap_action:{action:"source",source:"SkyShowtime"},icon:"showtime"},{type:"button",name:"spotify",tap_action:{action:"source",source:"Spotify"},icon:"mdi:spotify"},{type:"button",name:"steam",tap_action:{action:"source",source:"Steam Link"},icon:"mdi:steam"},{type:"button",name:"tv2play",tap_action:{action:"source",source:"TV 2 Play"},icon:"tv2play"},{type:"button",name:"viaplay",tap_action:{action:"source",source:"Viaplay"},icon:"viaplay"},{type:"button",name:"videoland",tap_action:{action:"source",source:"Videoland"},icon:"videoland"},{type:"button",name:"vlc",tap_action:{action:"source",source:"VLC"},icon:"mdi:vlc"},{type:"button",name:"vudu",tap_action:{action:"source",source:"Fandango at Home"},icon:"vudu"},{type:"button",name:"waiputv",tap_action:{action:"source",source:"waipu.tv"},icon:"waiputv"},{type:"button",name:"wow",tap_action:{action:"source",source:"WOW"},icon:"wow"},{type:"button",name:"youtube",tap_action:{action:"source",source:"YouTube"},icon:"mdi:youtube"},{type:"button",name:"youtubetv",tap_action:{action:"source",source:"YouTube TV"},icon:"mdi:youtube-tv"}],s=[{type:"button",name:"power",tap_action:{action:"key",key:"TvPower"},icon:"mdi:power"},{type:"button",name:"home",tap_action:{action:"key",key:"Home"},icon:"mdi:home"},{type:"button",name:"back",tap_action:{action:"key",key:"Return"},icon:"mdi:keyboard-backspace"},{type:"button",name:"menu",tap_action:{action:"key",key:"ActionMenu"},icon:"mdi:menu"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"VolumeUp"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"VolumeDown"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"key",key:"Mute"},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"Up"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"Down"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"Left"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"Right"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"Confirm"},icon:"mdi:checkbox-blank-circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"Confirm"},up:{tap_action:{action:"key",key:"Up"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"Down"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"Left"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"Right"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"Confirm"},mouse_action:{action:"key",key:'{{ ("Right" if deltaX > 0 else "Left") if (deltaX | abs) > (deltaY | abs) else ("Down" if deltaY > 0 else "Up") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"media_player.media_play_pause"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"key",key:"Play"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"key",key:"Pause"},icon:"mdi:pause"},{type:"button",name:"rewind",tap_action:{action:"key",key:"Rewind"},icon:"mdi:rewind"},{type:"button",name:"fast_forward",tap_action:{action:"key",key:"Forward"},icon:"mdi:fast-forward"},{type:"button",name:"previous",tap_action:{action:"key",key:"Prev"},icon:"mdi:skip-previous"},{type:"button",name:"next",tap_action:{action:"key",key:"Next"},icon:"mdi:skip-next"},{type:"button",name:"stop",tap_action:{action:"key",key:"Stop"},icon:"mdi:stop"},{type:"button",name:"record",tap_action:{action:"key",key:"Rec"},icon:"mdi:record"},{type:"button",name:"keyboard",tap_action:{action:"keyboard"},icon:"mdi:keyboard"},{type:"button",name:"textbox",tap_action:{action:"textbox"},icon:"mdi:text-box"},{type:"button",name:"search",tap_action:{action:"search"},icon:"mdi:google-assistant"},{type:"button",name:"delete",tap_action:{action:"key",key:"input keyevent 67"},hold_action:{action:"repeat"},icon:"mdi:backspace"},{type:"button",name:"enter",tap_action:{action:"perform-action",perform_action:"remote.send_command",data:{command:"input keyevent 66"}},icon:"mdi:magnify"},{type:"button",name:"channel_up",tap_action:{action:"key",key:"ChannelUp"},icon:"mdi:arrow-up-circle"},{type:"button",name:"channel_down",tap_action:{action:"key",key:"ChannelDown"},icon:"mdi:arrow-down-circle"},{type:"button",name:"red",tap_action:{action:"key",key:"Red"},icon:"mdi:alpha-r-box"},{type:"button",name:"green",tap_action:{action:"key",key:"Green"},icon:"mdi:alpha-g-box"},{type:"button",name:"yellow",tap_action:{action:"key",key:"Yellow"},icon:"mdi:alpha-y-box"},{type:"button",name:"blue",tap_action:{action:"key",key:"Blue"},icon:"mdi:alpha-b-box"},{type:"button",name:"n0",tap_action:{action:"key",key:"Num0"},icon:"mdi:numeric-0"},{type:"button",name:"n1",tap_action:{action:"key",key:"Num1"},icon:"mdi:numeric-1"},{type:"button",name:"n2",tap_action:{action:"key",key:"Num2"},icon:"mdi:numeric-2"},{type:"button",name:"n3",tap_action:{action:"key",key:"Num3"},icon:"mdi:numeric-3"},{type:"button",name:"n4",tap_action:{action:"key",key:"Num4"},icon:"mdi:numeric-4"},{type:"button",name:"n5",tap_action:{action:"key",key:"Num5"},icon:"mdi:numeric-5"},{type:"button",name:"n6",tap_action:{action:"key",key:"Num6"},icon:"mdi:numeric-6"},{type:"button",name:"n7",tap_action:{action:"key",key:"Num7"},icon:"mdi:numeric-7"},{type:"button",name:"n8",tap_action:{action:"key",key:"Num8"},icon:"mdi:numeric-8"},{type:"button",name:"n9",tap_action:{action:"key",key:"Num9"},icon:"mdi:numeric-9"},{type:"button",name:"numpad",icon:"mdi:dialpad"},{type:"button",name:"captions",tap_action:{action:"key",key:"SubTitle"},icon:"mdi:closed-caption"},{type:"button",name:"explorer",tap_action:{action:"key",key:"ApplicationLauncher"},icon:"mdi:folder-multiple"},{type:"button",name:"teletext",tap_action:{action:"key",key:"Teletext"},icon:"mdi:card-text"},{type:"button",name:"tv",tap_action:{action:"key",key:"Tv"},icon:"mdi:television-box"},{type:"button",name:"audio_track",tap_action:{action:"key",key:"MediaAudioTrack"},icon:"mdi:waveform"}],c=[{type:"button",name:"appletv",tap_action:{action:"source",source:"Apple TV"},icon:"appletv"},{type:"button",name:"crunchyroll",tap_action:{action:"source",source:"Crunchyroll"},icon:"crunchyroll"},{type:"button",name:"dazn",tap_action:{action:"source",source:"DAZN"},icon:"dazn"},{type:"button",name:"discoveryplus",tap_action:{action:"source",source:"discovery+"},icon:"discovery"},{type:"button",name:"disney",tap_action:{action:"source",source:"Disney+"},icon:"disney"},{type:"button",name:"emby",tap_action:{action:"source",source:"Emby"},icon:"mdi:emby"},{type:"button",name:"filmplus",tap_action:{action:"source",source:"Filmplus"},icon:"filmplus"},{type:"button",name:"foxsports",tap_action:{action:"source",source:"FOX Sports"},icon:"foxsports"},{type:"button",name:"hulu",tap_action:{action:"source",source:"Hulu"},icon:"mdi:hulu"},{type:"button",name:"jellyfin",tap_action:{action:"source",source:"Jellyfin"},icon:"jellyfin"},{type:"button",name:"kijk",tap_action:{action:"source",source:"KIJK"},icon:"kijk"},{type:"button",name:"max",tap_action:{action:"source",source:"Max"},icon:"max"},{type:"button",name:"mlbtv",tap_action:{action:"source",source:"MLB"},icon:"mlbtv"},{type:"button",name:"nba",tap_action:{action:"source",source:"NBA"},icon:"nba"},{type:"button",name:"netflix",tap_action:{action:"key",key:"Netflix"},icon:"mdi:netflix"},{type:"button",name:"npo_start",tap_action:{action:"source",source:"NPO Start"},icon:"npo"},{type:"button",name:"nrktv",tap_action:{action:"source",source:"NRK TV"},icon:"nrktv"},{type:"button",name:"paramount",tap_action:{action:"source",source:"Paramount+"},icon:"paramount"},{type:"button",name:"peacock",tap_action:{action:"source",source:"Peacock"},icon:"peacock"},{type:"button",name:"pia",tap_action:{action:"source",source:"Private Internet Access VPN"},icon:"pia"},{type:"button",name:"plex",tap_action:{action:"source",source:"Plex"},icon:"mdi:plex"},{type:"button",name:"primevideo",tap_action:{action:"source",source:"Amazon Prime Video"},icon:"primevideo"},{type:"button",name:"rakutentv",tap_action:{action:"source",source:"Rakuten"},icon:"rakutentv"},{type:"button",name:"rakutenviki",tap_action:{action:"source",source:"Viki"},icon:"rakutenviki"},{type:"button",name:"skyshowtime",tap_action:{action:"source",source:"SkyShowtime"},icon:"showtime"},{type:"button",name:"spotify",tap_action:{action:"source",source:"Spotify"},icon:"mdi:spotify"},{type:"button",name:"starplus",tap_action:{action:"source",source:"Star+"},icon:"starplus"},{type:"button",name:"stremio",tap_action:{action:"source",source:"Stremio"},icon:"stremio"},{type:"button",name:"surfshark",tap_action:{action:"source",source:"Surfshark"},icon:"surfshark"},{type:"button",name:"tv2play",tap_action:{action:"source",source:"TV2 Play"},icon:"tv2play"},{type:"button",name:"viaplay",tap_action:{action:"source",source:"Viaplay"},icon:"viaplay"},{type:"button",name:"videoland",tap_action:{action:"source",source:"Videoplay"},icon:"videoland"},{type:"button",name:"vudu",tap_action:{action:"source",source:"Vudu"},icon:"vudu"},{type:"button",name:"youtube",tap_action:{action:"source",source:"YouTube"},icon:"mdi:youtube"},{type:"button",name:"youtubetv",tap_action:{action:"source",source:"YouTube TV"},icon:"mdi:youtube-tv"}],l=[{name:"allente",path:"M12.8246 16.9889V9.1355H8.9057C8.9057 9.1355 8.8874 10.2821 8.8874 10.3738 8.1728 9.4052 6.9869 8.9602 5.2068 8.9522 3.3664 8.9706 1.8037 9.7768.9791 10.947.3325 11.8161 0 12.9234 0 14.2716 0 15.6774.3325 16.7663.9791 17.6171 1.8481 18.8187 3.2697 19.447 5.0629 19.447 7.0759 19.447 7.8717 19.0779 8.6282 18.4497 8.6282 18.8737 8.7382 19.3187 8.8141 19.3187H13.0444C12.8612 19.0779 12.8246 17.9313 12.8246 16.9889ZM8.2408 15.8239C7.8901 16.248 7.3351 16.5072 6.4293 16.5072 5.4686 16.5072 4.8769 16.1564 4.5628 15.693 4.3219 15.3423 4.1937 14.769 4.1937 14.2323 4.1937 13.6773 4.3403 13.0674 4.6361 12.6984 4.9869 12.2742 5.5785 11.9785 6.5026 11.9785 7.3351 11.9785 7.8874 12.2559 8.2199 12.6251 8.5523 12.9758 8.7382 13.6041 8.7382 14.2323 8.7408 14.8266 8.5549 15.4365 8.2408 15.8239ZM14.2801 19.3658C14.2068 19.3291 14.1361 19.0804 14.2068 18.3134 14.2068 16.7611 14.2068 8.4731 14.2068 6.1825 14.2068 5.4234 14.0733 4.8998 14.0366 4.7322H18.2487C18.2932 4.8605 18.4188 5.3422 18.4188 6.0149 18.4188 8.0647 18.3246 15.2544 18.4188 18.4416 18.4188 18.9783 18.4188 19.2741 18.5288 19.3657ZM19.7512 19.3175C19.678 19.2808 19.678 19.1709 19.678 18.2651 19.678 16.7128 19.678 8.4248 19.678 6.1342 19.678 5.3751 19.5445 4.8515 19.5078 4.6839H23.7199C23.7644 4.8123 23.89 5.2939 23.89 5.9667 23.89 8.0164 23.89 15.4012 23.89 18.3933 23.89 18.93 23.89 19.2258 24 19.3174Z"},{name:"appletv",path:"M 6.820312 8.246094 C 7.179688 7.824219 7.398438 7.273438 7.398438 6.675781 C 7.398438 6.613281 7.398438 6.550781 7.394531 6.492188 L 7.394531 6.5 C 6.746094 6.566406 6.183594 6.871094 5.785156 7.324219 L 5.78125 7.328125 C 5.417969 7.726562 5.195312 8.261719 5.195312 8.851562 C 5.195312 8.910156 5.199219 8.96875 5.203125 9.023438 L 5.203125 9.015625 C 5.207031 9.015625 5.214844 9.015625 5.222656 9.015625 C 5.867188 9.015625 6.445312 8.71875 6.820312 8.25 Z M 8.195312 12.304688 C 8.203125 13.292969 8.796875 14.140625 9.648438 14.511719 L 9.664062 14.519531 C 9.46875 15.109375 9.214844 15.625 8.894531 16.09375 L 8.90625 16.070312 C 8.449219 16.734375 7.980469 17.398438 7.230469 17.414062 C 6.5 17.429688 6.269531 16.980469 5.425781 16.980469 C 4.589844 16.980469 4.328125 17.398438 3.632812 17.429688 C 2.925781 17.453125 2.375 16.703125 1.914062 16.039062 C 1.226562 15.109375 0.8125 13.941406 0.8125 12.671875 C 0.8125 11.902344 0.964844 11.167969 1.242188 10.5 L 1.226562 10.535156 C 1.679688 9.734375 2.519531 9.195312 3.484375 9.171875 L 3.488281 9.171875 C 4.191406 9.15625 4.863281 9.648438 5.296875 9.648438 C 5.726562 9.648438 6.535156 9.0625 7.386719 9.148438 C 8.210938 9.179688 8.933594 9.59375 9.378906 10.21875 L 9.386719 10.226562 C 8.675781 10.664062 8.210938 11.429688 8.195312 12.304688 Z M 15.019531 17.304688 C 14.589844 17.429688 14.097656 17.5 13.585938 17.5 C 13.582031 17.5 13.574219 17.5 13.566406 17.5 C 12.417969 17.5 11.847656 16.851562 11.847656 15.546875 L 11.847656 9.796875 L 10.851562 9.796875 L 10.851562 8.753906 L 11.898438 8.753906 L 11.898438 7.398438 L 13.28125 6.832031 L 13.28125 8.761719 L 14.878906 8.761719 L 14.878906 9.804688 L 13.289062 9.804688 L 13.289062 15.238281 C 13.285156 15.277344 13.285156 15.320312 13.285156 15.367188 C 13.285156 15.640625 13.359375 15.898438 13.492188 16.117188 L 13.492188 16.109375 C 13.644531 16.265625 13.855469 16.363281 14.089844 16.363281 C 14.128906 16.363281 14.160156 16.359375 14.195312 16.355469 L 14.191406 16.355469 C 14.492188 16.34375 14.777344 16.304688 15.050781 16.242188 L 15.019531 16.25 Z M 20.019531 17.367188 L 18.324219 17.367188 L 15.195312 8.753906 L 16.726562 8.753906 L 18.617188 14.355469 C 18.6875 14.574219 18.871094 15.199219 19.164062 16.242188 L 19.441406 15.308594 L 19.75 14.367188 L 21.710938 8.746094 L 23.230469 8.746094 Z M 20.019531 17.367188 Z"},{name:"crunchyroll",path:"M 2.933594 13.46875 C 2.707031 10.601562 3.65625 7.769531 5.566406 5.621094 C 7.476562 3.476562 10.179688 2.199219 13.050781 2.089844 C 15.921875 1.984375 18.710938 3.050781 20.777344 5.046875 C 22.847656 7.042969 24.007812 9.792969 24 12.667969 L 24 12 C 24 5.371094 18.628906 0 12 0 C 5.371094 0 0 5.371094 0 12 C 0 18.628906 5.371094 24 12 24 L 12.800781 24 C 7.261719 23.609375 2.964844 19.015625 2.933594 13.46875 Z M 19.199219 14 C 14.886719 14.015625 13.8125 8.011719 17.867188 6.53125 C 16.679688 5.898438 15.347656 5.574219 14 5.601562 C 10.601562 5.601562 7.539062 7.648438 6.238281 10.785156 C 4.9375 13.925781 5.65625 17.539062 8.058594 19.941406 C 10.460938 22.34375 14.074219 23.0625 17.214844 21.761719 C 20.351562 20.460938 22.398438 17.398438 22.398438 14 C 22.421875 13.464844 22.378906 12.925781 22.265625 12.398438 C 21.609375 13.449219 20.4375 14.0625 19.199219 14 Z M 19.199219 14 Z"},{name:"dazn",path:"m14.774 8.291.772-2.596.79 2.596zm3.848 2.268-2.025-6.128c-.045-.135-.097-.224-.154-.266a.497.497 0 0 0-.28-.063h-1.12a.485.485 0 0 0-.284.068c-.06.045-.11.132-.149.261l-2.045 6.128c-.025.032-.038.096-.038.192 0 .149.09.223.27.223h.84c.076 0 .139-.003.187-.01a.207.207 0 0 0 .116-.048.326.326 0 0 0 .077-.116c.022-.051.046-.119.072-.202l.318-1.071h2.306l.327 1.051c.026.09.051.16.077.213a.395.395 0 0 0 .087.12c.031.028.07.047.114.053h.002c.045.006.103.01.173.01h.897c.18 0 .27-.074.27-.223a.59.59 0 0 0-.005-.09.878.878 0 0 0-.036-.108l.003.006zm-.994 2.467h-.646c-.168 0-.279.024-.333.072-.055.049-.082.147-.082.295v3.638l-1.91-3.647c-.076-.155-.152-.253-.226-.295-.074-.041-.204-.063-.39-.063h-.599c-.167 0-.278.025-.332.073-.055.048-.082.147-.082.294v6.138c0 .148.025.246.077.294.052.048.16.072.328.072h.656c.167 0 .278-.024.332-.072.055-.048.082-.146.082-.294v-3.648l1.91 3.657c.077.155.152.253.227.295.073.042.204.062.39.062h.598c.167 0 .278-.024.333-.072.054-.048.082-.146.082-.294v-6.138c0-.148-.028-.246-.082-.294-.055-.048-.166-.073-.333-.073zm3.203-.581 1.665 1.665v8.385H1.505V14.11l1.663-1.664a.63.63 0 0 0 0-.89L1.504 9.891V1.505h20.991v8.384l-1.665 1.666a.63.63 0 0 0 0 .89zM24 0H0v10.613L1.387 12 0 13.387V24h24V13.387L22.613 12 24 10.613zM10.67 18.469H7.96l2.855-4.014a.67.67 0 0 0 .087-.155.425.425 0 0 0 .019-.135v-.772c0-.148-.028-.246-.082-.294-.055-.048-.166-.073-.334-.073H6.382c-.149 0-.245.028-.29.082-.045.055-.068.169-.068.343v.58c0 .172.023.287.068.341.045.055.141.083.29.083h2.545L6.11 18.469a.438.438 0 0 0-.107.27v.792c0 .148.027.245.082.294.055.048.167.072.334.072h4.25c.148 0 .245-.027.29-.081.045-.055.068-.17.068-.344v-.579c0-.173-.023-.287-.068-.342-.045-.055-.142-.082-.29-.082zM9.408 8.233c0 .264-.017.484-.052.661a1.08 1.08 0 0 1-.174.43.648.648 0 0 1-.318.231 1.523 1.523 0 0 1-.487.068h-.79v-4.17h.79c.366 0 .63.11.79.324.16.215.241.571.241 1.067v1.389zm1.38-2.789c-.225-.457-.533-.795-.921-1.013-.39-.219-.88-.328-1.47-.328H6.418c-.167 0-.278.024-.333.072-.054.049-.082.147-.082.294v6.138c0 .148.028.246.082.295.055.048.166.072.333.072h2.218c1.048 0 1.765-.447 2.15-1.342.09-.205.153-.413.188-.622a4.91 4.91 0 0 0 .054-.796V6.911c0-.367-.018-.656-.054-.868a2.2 2.2 0 0 0-.193-.612l.006.013z"},{name:"discovery",path:"M 20.89,2.51 C 20.89,2.51 21.19,2.51 21.19,2.51 21.19,2.51 21.19,4.12 21.19,4.12 21.19,4.12 22.90,4.12 22.90,4.12 22.90,4.12 22.90,4.52 22.90,4.52 22.90,4.52 21.19,4.52 21.19,4.52 21.19,5.07 21.32,5.87 20.99,6.33 21.37,6.65 21.51,6.90 21.77,7.33 22.76,8.97 23.02,10.57 23.00,12.45 22.95,16.30 20.25,19.55 16.67,20.72 15.89,20.97 14.98,21.18 14.16,21.19 14.16,21.19 11.95,21.19 11.95,21.19 11.52,21.19 11.05,21.25 10.64,21.09 11.68,20.46 12.51,19.78 13.21,18.78 15.48,15.57 14.70,11.39 11.65,8.99 10.33,7.95 8.87,7.56 7.23,7.43 7.23,7.43 7.23,2.71 7.23,2.71 7.23,2.71 11.75,2.71 11.75,2.71 11.75,2.71 13.76,2.71 13.76,2.71 15.63,2.71 17.70,3.38 19.18,4.52 19.18,4.52 19.18,4.12 19.18,4.12 19.18,4.12 20.89,4.12 20.89,4.12 20.89,4.12 20.89,2.51 20.89,2.51 Z M 20.89,4.52 C 20.89,4.52 19.28,4.52 19.28,4.52 19.28,4.52 20.89,6.03 20.89,6.03 20.89,6.03 20.89,4.52 20.89,4.52 Z M 6.23,8.28 C 8.69,7.96 10.94,8.76 12.50,10.74 13.67,12.24 13.78,13.56 13.76,15.36 13.73,17.32 12.38,19.32 10.74,20.30 9.24,21.21 8.31,21.21 6.63,21.19 3.58,21.15 0.82,18.17 0.80,15.16 0.80,14.11 0.75,13.69 1.08,12.65 1.85,10.26 3.80,8.73 6.23,8.28 Z"},{name:"disney",path:"M2.056 6.834C1.572 6.834 1 6.77 1 6.483c0-2.023 3.562-2.11 5.08-2.11c1.978 0 4.506.614 6.66 1.384c3.277 1.188 9.917 5.145 9.917 9.674c0 4.001-4.31 5.914-8.311 5.914a22 22 0 0 1-3.21-.33c-.066.243-.11.418-.264.924a4.3 4.3 0 0 1-.77.087l-.505-.043c-.33-.396-.44-1.033-.572-1.715c-2-1.165-3.298-2.155-3.891-2.836c-.506-.528-1.078-1.232-1.078-1.913c0-.351.22-.66.726-1.01c1.034-.77 2.352-1.188 4.507-1.563l.044-.9c.022-.22.242-2.573.748-3.013c.813.66.901 1.341.967 2.353c.022.44.044.901.11 1.385h.308c1.539 0 6.244.395 6.244 2.616c0 .528-.77 1.517-1.518 1.517a1.9 1.9 0 0 1-.966-.285c.329-.375.813-.704.945-.99c-.44-.528-2.814-1.143-4.551-1.143a4 4 0 0 0-.572.022l.022 4.815c.703.44 1.561.483 2.11.483c2.42 0 7.431-.417 7.431-4.331c0-3.87-4.946-6.86-8.64-8.266a21.4 21.4 0 0 0-7.937-1.496a7.2 7.2 0 0 0-1.803.198c-.373.088-.505.176-.505.264c0 .153.747.242.836.286a.22.22 0 0 1 .11.175a.26.26 0 0 1-.088.176c-.089 0-.286.022-.528.022M9.2 14.551c-2.176.177-4.595.397-4.595 1.166c0 .594 1.012 1.32 1.627 1.781a7.05 7.05 0 0 0 2.77 1.319zm11.155-9.85c-.02.428-.042.942-.042 1.723c0 .3 0 .642.01 1.027c-.042.193-.32.214-.46.278a1.2 1.2 0 0 1-.256-.192V4.83c0-.29.01-.588.01-1.038c0-.225 0-.482-.01-.792c0-.192.032-.374.15-.802a.34.34 0 0 1 .3-.224c.245.064.491.17.577.374c-.257.76-.235 1.594-.279 2.353m-.384-.085c.428.021.941.042 1.722.042c.3 0 .643 0 1.027-.01c.193.041.215.32.279.459q-.078.141-.193.257H20.1c-.289 0-.589-.01-1.037-.01c-.225 0-.482 0-.792.01c-.193.002-.375-.03-.803-.149a.35.35 0 0 1-.225-.299c.064-.246.172-.492.374-.578c.76.257 1.595.235 2.355.278z"},{name:"f1tv",path:"M20.2174 15 20.3424 15 20.3424 14.4214 20.3445 14.4214 20.5524 15 20.6605 15 20.8684 14.4214 20.8705 14.4214 20.8705 15 20.9955 15 20.9955 14.2503 20.8127 14.2503 20.6111 14.8373 20.609 14.8373 20.4022 14.2503 20.2174 14.2503 20.2174 15ZM19.5255 14.3636 19.7627 14.3636 19.7627 15 19.894 15 19.894 14.3636 20.1324 14.3636 20.1324 14.2503 19.5255 14.2503 19.5255 14.3636ZM18 15 24 9 20.3887 9 14.3889 15 18 15ZM17.1397 11.613 9.8764 11.613C7.6627 11.613 7.2754 11.7304 6.3272 12.6785 5.4405 13.5653 4.0001 15 4.0001 15L7.1465 15 7.8971 14.2494C8.3906 13.7559 8.6451 13.7047 9.6814 13.7047L15.0481 13.7047 17.1397 11.613ZM6.2304 12.2506C5.5755 12.8685 4.1506 14.2526 3.3826 15L0 15C0 15 2.7105 12.2974 4.217 10.8145 5.7691 9.337 6.5429 9 9.3897 9L19.7529 9 17.509 11.2437 9.6002 11.2437C7.5999 11.2437 7.1504 11.3824 6.2304 12.2506Z"},{name:"filmplus",path:"M19.5906 0C19.2204.1246 18.8469.259 18.4817.3964 18.1169.5341 17.7562.6762 17.3905.8103 17.025.9447 16.6652 1.0866 16.3033 1.2284 15.9418 1.3706 15.5767 1.5033 15.2165 1.6468 14.8561 1.7901 14.4937 1.9267 14.1333 2.0689 13.7729 2.2113 13.4083 2.3479 13.0465 2.4872 12.6847 2.6266 12.336 2.7852 11.9722 2.9182 11.6087 3.0514 11.258 3.21 10.8957 3.3469 10.5336 3.484 10.1695 3.6231 9.8086 3.765 9.4476 3.9072 9.0824 4.0401 8.7215 4.1831 8.3605 4.3264 7.9875 4.4577 7.6238 4.5907 7.2603 4.7239 6.8848 4.863 6.5236 4.9957 6.1626 5.1286 5.8024 5.2859 5.4495 5.4269 5.0967 5.5679 4.7658 5.7433 4.4291 5.9116 4.0921 6.0797 3.7952 6.2539 3.5 6.4878 3.2048 6.722 2.9843 6.9433 2.7474 7.2404 2.5105 7.5376 2.3245 7.8004 2.1626 8.1608 2.0006 8.5213 1.8671 8.8716 1.7782 9.2817 1.689 9.6917 1.5898 10.1143 1.5557 10.5645 1.5217 11.0146 1.4955 11.5342 1.5 12.0139 1.5045 12.4937 1.4958 13.03 1.5 13.5192 1.5042 14.0084 1.4933 14.5338 1.5 15.0244 1.5067 15.515 1.5368 16.0098 1.5279 16.5017 1.519 16.9937 1.5429 17.5047 1.5 17.9791 1.4571 18.4538 1.5229 18.9854 1.5557 19.4286 1.5886 19.8718 1.6684 20.3111 1.779 20.7105 1.8897 21.11 2.019 21.4422 2.1991 21.7957 2.3789 22.1494 2.5433 22.4078 2.7892 22.7108 3.0348 23.0141 3.26 23.2075 3.5836 23.4216 3.9072 23.6354 4.2342 23.7815 4.6214 23.8891 5.0083 23.9969 5.5471 24.0466 5.9599 24 6.3728 23.9534 6.8037 23.859 7.1675 23.7023 7.5312 23.5459 7.8415 23.4116 8.1411 23.1707 8.441 22.9302 8.6677 22.7392 8.9216 22.446 9.1755 22.1525 9.3328 21.884 9.5209 21.5401 9.7088 21.1958 9.8245 20.8535 9.9466 20.4605 10.0689 20.0677 10.1319 19.617 10.1709 19.1797 10.2102 18.7426 10.2339 18.2102 10.2526 17.7561 10.2713 17.302 10.3078 16.7615 10.3103 16.3086 10.3128 15.8559 10.8603 15.859 11.1702 15.6633 11.4805 15.4679 11.8376 15.3123 12.1695 15.1574 12.5015 15.0024 12.8299 14.7724 13.1733 14.6559 13.5164 14.5391 13.8735 14.3334 13.9898 13.9671 14.106 13.6011 14.2351 13.2284 14.4082 12.8803 14.581 12.5318 14.6604 12.1477 14.8305 11.7974 15.0005 11.447 15.1488 11.0807 15.2422 10.7038 14.7689 10.8594 14.3223 11.1044 13.8677 11.3084 13.4133 11.5128 12.962 11.7196 12.5127 11.9325 12.0631 12.1452 11.5978 12.3334 11.151 12.55 10.7042 12.7666 10.2403 12.9561 9.798 13.1763 9.3559 13.3962 8.8472 13.5395 8.4193 13.7764 7.9914 14.0134 7.3004 14.0733 7.3537 14.6899 7.4069 15.3065 7.3779 16.0259 7.3815 16.6411 7.3852 17.2563 7.386 18.0429 7.3813 18.6199 7.3765 19.1972 7.2826 19.7809 6.9891 20.2068 6.6958 20.633 6.3326 21.0007 5.8392 20.9709 5.3459 20.941 4.9266 20.6071 4.7036 20.1274 4.4803 19.6477 4.4218 19.018 4.4268 18.4251 4.4318 17.8322 4.4238 17.067 4.4268 16.446 4.4299 15.8249 4.424 15.0905 4.4268 14.4669 4.4296 13.8433 4.4226 13.0896 4.4268 12.4878 4.431 11.886 4.4817 11.241 4.6409 10.7228 4.7998 10.2046 5.0139 9.8537 5.3955 9.4983 5.7774 9.1431 6.1417 8.9296 6.5946 8.7183 7.0476 8.507 7.5217 8.3306 7.9755 8.1201 8.4291 7.9094 8.8817 7.7293 9.3414 7.5348 9.8008 7.3399 10.2509 7.1281 10.7075 6.9218 11.1644 6.7158 11.6433 6.5422 12.101 6.3362 12.5584 6.1299 13.018 5.9337 13.4797 5.7357 13.9415 5.5378 14.3942 5.3282 14.8606 5.1376 15.3266 4.9466 15.7626 4.7089 16.2392 4.5371 16.7162 4.3654 17.1151 4.0764 17.6109 3.9298 18.1066 3.7829 18.3569 3.3218 18.5054 2.8452 18.6543 2.3688 18.8898 1.8879 19.0521 1.4127 19.214.9374 19.4498.4808 19.5906 0ZM17.1376 6.0767C13.8936 7.4135 10.6707 8.8111 7.4373 10.1742 7.4373 11.0197 7.4373 11.8654 7.4373 12.7108 8.1832 12.3663 8.9787 12.0555 9.7169 11.7012 10.455 11.3469 11.2394 11.0534 11.9616 10.6846 12.6836 10.3155 13.5413 10.085 14.2323 9.6939 14.9233 9.3029 15.8537 9.1788 16.2373 8.4374 16.6206 7.6962 16.8519 6.8538 17.1376 6.0767ZM19.3118 17.5331C19.2422 16.7922 19.413 16.0875 19.2932 15.3497 19.1733 14.6118 18.2033 14.8496 17.6394 14.8014 17.0755 14.7532 16.1511 14.7866 16.1899 15.554 16.2286 16.3214 16.2401 16.9385 16.2456 17.7003 15.7024 17.7274 14.9517 17.6574 14.4338 17.6725 13.9159 17.6875 13.2419 17.5412 13.066 18.1165 12.8898 18.6918 13.0473 19.2808 13.0582 19.8553 13.0691 20.4295 13.7091 20.4755 14.2387 20.4321 14.7683 20.3886 15.5022 20.4647 16.0505 20.4321 16.1314 19.59 15.8272 18.4524 16.5737 17.8612 17.3202 17.27 18.4151 17.6443 19.3118 17.5331ZM17.5 17.6446C17.1808 17.6309 16.853 17.7695 16.615 17.9861 16.3769 18.2024 16.2713 18.4758 16.2456 18.8153 16.2203 19.1548 16.2587 19.6507 16.2456 20.0139 16.2325 20.3771 16.2551 20.8496 16.2456 21.2125 16.2362 21.5755 16.2576 22.0728 16.2456 22.4111 16.2337 22.7495 16.2699 23.1323 16.6167 23.2387 16.9631 23.3452 17.4153 23.2728 17.7787 23.2753 18.1422 23.2778 18.5985 23.3427 18.93 23.2282 19.2617 23.1136 19.3138 22.7401 19.3118 22.4111 19.3099 22.0822 19.3157 21.5855 19.3397 21.2404 19.3637 20.8953 19.2121 20.2662 19.6742 20.3484 20.1364 20.4307 20.4293 20.3738 20.8449 20.3763 21.2606 20.3788 21.6703 20.4123 22.043 20.3757 22.4154 20.339 22.518 19.9925 22.5453 19.6794 22.5726 19.3664 22.4399 18.8917 22.5174 18.5645 22.5949 18.2372 22.4709 17.8707 22.1464 17.7369 21.8222 17.6028 21.4169 17.6485 21.0401 17.6446 20.6632 17.6407 20.2284 17.646 19.8415 17.6446 19.4546 17.6432 19.0596 17.6663 18.6707 17.6725 18.2819 17.6786 17.8685 17.6602 17.5 17.6446Z"},{name:"foxsports",path:"M 0.2305 15.125 L 0.2305 5 L 6.2148 5 L 6.3984 7.7695 L 3.0469 7.7695 L 3.0469 9.0898 L 5.7773 9.0898 L 5.7773 11.8516 L 3.0273 11.8516 L 3.0273 15.125 L 0.2305 15.125 M 23.2813 15.0938 L 20.2852 9.8398 L 23.0078 5 L 20.0117 5 L 18.7695 7.1797 L 17.5469 5 L 14.4453 5 L 17.2188 9.875 L 14.2813 15.1016 L 17.293 15.0977 L 18.7305 12.5391 L 20.1836 15.0938 L 23.2813 15.0938 M 11.9102 12.0977 L 11.9102 8.0508 C 11.9102 7.5898 11.5156 7.1758 11.0703 7.1758 C 10.6289 7.1758 10.2695 7.5898 10.2695 8.0508 L 10.2695 12.082 C 10.2695 12.5469 10.6289 12.918 11.0703 12.918 C 11.5156 12.918 11.9102 12.5586 11.9102 12.0977 Z M 6.3242 10.0742 C 6.3242 7.3594 8.4414 5.1523 11.0586 5.1523 C 13.6758 5.1523 15.7969 7.3594 15.7969 10.0742 C 15.7969 12.793 13.6758 14.9961 11.0586 14.9961 C 8.4414 14.9961 6.3242 12.793 6.3242 10.0742 Z M 0 19.5195 L 0 18.9961 L 0.2617 18.7344 L 2.3867 18.7344 L 2.4648 18.6563 L 2.4648 18.1016 L 2.4102 18.0391 L 0.4375 18.0391 L 0 17.5938 L 0 16.3203 L 0.5039 15.8086 L 3.3633 15.8086 L 3.3633 16.3711 L 3.1563 16.5859 L 1.082 16.5859 L 1.0039 16.668 L 1.0039 17.207 L 1.0625 17.2656 L 3.0273 17.2656 L 3.4648 17.7148 L 3.4648 19.0039 L 2.9609 19.5195 L 0 19.5195 M 6.4609 17.6055 L 6.6094 17.4531 L 6.6094 16.7422 L 6.4609 16.5938 L 5.0938 16.5938 L 5.0938 17.6055 Z M 4.0898 15.8086 L 7.0547 15.8086 L 7.6172 16.3789 L 7.6172 17.7539 L 7.0547 18.3281 L 5.0938 18.3281 L 5.0938 19.5195 L 4.0898 19.5195 Z M 10.5156 18.6484 L 10.7227 18.4414 L 10.7227 16.8203 L 10.5156 16.6133 L 9.3477 16.6133 L 9.1406 16.8203 L 9.1406 18.4414 L 9.3477 18.6484 Z M 8.1445 18.9492 L 8.1445 16.3789 L 8.6992 15.8086 L 11.1602 15.8086 L 11.7227 16.3789 L 11.7227 18.9492 L 11.1602 19.5195 L 8.6992 19.5195 Z M 14.7344 17.3984 L 14.875 17.2539 L 14.875 16.7109 L 14.7344 16.5664 L 13.3828 16.5664 L 13.3828 17.3984 Z M 12.3789 15.8086 L 15.375 15.8086 L 15.8789 16.3203 L 15.8789 17.5039 L 15.3984 17.9961 L 16.0313 19.5195 L 14.9141 19.5195 L 14.4453 18.1719 L 13.3828 18.1719 L 13.3828 19.5195 L 12.3789 19.5195 Z M 17.3789 16.668 L 16.2188 16.668 L 16.2188 15.8086 L 19.5391 15.8086 L 19.5391 16.668 L 18.3828 16.668 L 18.3828 19.5195 L 17.3789 19.5195 L 17.3789 16.668 M 20.082 19.6211 L 20.082 19.0977 L 20.3438 18.8359 L 22.4688 18.8359 L 22.5469 18.7578 L 22.5469 18.2031 L 22.4922 18.1406 L 20.5195 18.1406 L 20.082 17.6953 L 20.082 16.4219 L 20.5859 15.9102 L 23.4453 15.9102 L 23.4453 16.4727 L 23.2383 16.6875 L 21.168 16.6875 L 21.0859 16.7695 L 21.0859 17.3086 L 21.1445 17.3672 L 23.1133 17.3672 L 23.5469 17.8164 L 23.5469 19.1055 L 23.043 19.6211 L 20.082 19.6211 Z"},{name:"jellyfin",path:"M12 .002C8.826.002-1.398 18.537.16 21.666c1.56 3.129 22.14 3.094 23.682 0C25.384 18.573 15.177 0 12 0zm7.76 18.949c-1.008 2.028-14.493 2.05-15.514 0C3.224 16.9 9.92 4.755 12.003 4.755c2.081 0 8.77 12.166 7.759 14.196zM12 9.198c-1.054 0-4.446 6.15-3.93 7.189.518 1.04 7.348 1.027 7.86 0 .511-1.027-2.874-7.19-3.93-7.19z"},{name:"kijk",path:"M19.5051 14.5813C18.3413 15.5829 17.1659 16.3763 16.0112 16.94 14.6307 17.6141 13.2811 17.956 12 17.956 7.4971 17.956 3.4816 13.8181 1.9157 11.9739A23.7339 23.7339 90 014.4949 9.3696C5.6587 8.3683 6.8341 7.5749 7.9888 7.0109 9.3693 6.3368 10.7189 5.9952 12 5.9952 16.5029 5.9952 20.5184 10.1328 22.0843 11.9773A23.7288 23.7288 90 0119.5051 14.5813ZM12 4.5C5.3725 4.5 0 11.9755 0 11.9755S5.3725 19.4509 12 19.4509 24 11.9755 24 11.9755 18.6275 4.5 12 4.5ZM11.4315 9.9397C11.4955 9.9397 11.5469 9.9917 11.5469 10.0557V13.8779C11.5469 13.9419 11.4952 13.9939 11.4315 13.9939H10.1952A.1157.1157 90 0110.0797 13.8779V10.0557C10.0797 9.9917 10.1315 9.9397 10.1952 9.9397H11.4315ZM9.5221 10.072 8.4128 11.8576 8.4099 11.8624A.192.192 90 008.3819 11.9611.192.192 90 008.4085 12.0571L8.4099 12.0592 8.4125 12.064 9.5219 13.8499A.0893.0893 90 019.4469 13.988H8.1336A.1144.1144 90 018.0365 13.9347C7.7947 13.5517 7.1544 12.5165 7.1544 12.5165V13.872C7.1544 13.936 7.1027 13.988 7.0389 13.988H5.8437A.1157.1157 90 015.7285 13.872V10.0499C5.7285 9.9859 5.78 9.9339 5.8437 9.9339H7.0389C7.1029 9.9339 7.1544 9.9859 7.1544 10.0499V11.4053S7.7944 10.3699 8.0365 9.9872C8.0579 9.9536 8.0941 9.9339 8.1336 9.9339H9.4472A.0893.0893 90 019.5219 10.072ZM18.0776 9.9339C18.1413 9.9339 18.1928 9.9859 18.1928 10.0499V13.872C18.1928 13.936 18.1411 13.988 18.0776 13.988H16.8824A.1157.1157 90 0116.7669 13.872V12.5165S16.1269 13.5517 15.8848 13.9347A.1144.1144 90 0115.7877 13.988H14.4741A.0893.0893 90 0114.3992 13.8499L15.5085 12.064C15.5096 12.0624 15.5107 12.0611 15.5115 12.0592L15.5131 12.0568A.192.192 90 0015.5392 11.9608.192.192 90 0015.5131 11.8648L15.5115 11.8624 15.5088 11.8576 14.3992 10.072A.0896.0896 90 0114.4741 9.9339H15.7877C15.8272 9.9339 15.8635 9.9536 15.8848 9.9872 16.1267 10.3699 16.7669 11.4053 16.7669 11.4053V10.0499C16.7669 9.9859 16.8187 9.9339 16.8824 9.9339H18.0776ZM13.7085 9.9397C13.7723 9.9397 13.824 9.9917 13.824 10.0557V13.9731C13.824 14.2749 13.7493 14.564 13.5947 14.7981L12.8787 15.8741A.1149.1149 90 0112.6848 15.8709L11.9664 14.7144A.1165.1165 90 0111.9683 14.5885L12.2653 14.1413C12.3248 14.0525 12.3565 13.9477 12.3565 13.8405V10.0557C12.3565 9.9917 12.4083 9.9397 12.472 9.9397H13.7085Z"},{name:"max",path:"M 3.7443 8 C 3.0949 8 2.4381 8.2932 1.5957 8.9574 L 1.5957 8.167 L 0 8.167 L 0 14.4756 L 1.6959 14.4756 L 1.6959 10.5531 C 2.4381 9.9557 2.7758 9.7664 3.0541 9.7664 C 3.3844 9.7664 3.5996 9.9742 3.5996 10.5012 L 3.5996 14.4756 L 5.2955 14.4756 L 5.2955 10.542 C 6.0377 9.9557 6.368 9.7664 6.6537 9.7664 C 6.984 9.7664 7.1992 9.9742 7.1992 10.5012 L 7.1992 14.4756 L 8.8951 14.4756 L 8.8951 9.8926 C 8.8951 8.4713 8.1047 8 7.3439 8 C 6.6945 8 6.0377 8.2746 5.173 8.9463 C 4.8947 8.2412 4.2898 8 3.7443 8 Z M 12.3426 8 C 10.6578 8 9.2588 9.4807 9.2588 11.3213 C 9.2588 13.1619 10.6578 14.6426 12.3426 14.6426 C 13.1775 14.6426 13.8975 14.3271 14.4504 13.6443 L 14.4504 14.4756 L 16.0684 14.4756 L 16.0684 8.167 L 14.4504 8.167 L 14.4504 8.9982 C 13.8975 8.3154 13.1775 8 12.3426 8 Z M 16.3652 8.167 C 17.0629 9.284 17.857 10.2822 18.7811 11.2805 C 17.857 12.3195 17.0629 13.4031 16.3652 14.4756 L 18.41 14.4756 C 18.8961 13.674 19.4416 12.9504 20.0687 12.2676 C 20.6848 12.9504 21.2006 13.674 21.683 14.4756 L 23.75 14.4756 C 23.0412 13.3697 22.2693 12.3195 21.3416 11.2805 C 22.2582 10.2822 23.0412 9.2506 23.75 8.167 L 21.7238 8.167 C 21.2191 8.9686 20.6736 9.6402 20.0687 10.3008 C 19.449 9.6402 18.9072 8.9686 18.41 8.167 Z M 12.5986 9.4621 C 13.608 9.4621 14.4207 10.2896 14.4207 11.3213 C 14.4207 12.3529 13.608 13.1805 12.5986 13.1805 C 11.593 13.1805 10.7803 12.3529 10.7803 11.3213 C 10.7803 10.2896 11.593 9.4621 12.5986 9.4621 Z M 12.5986 9.8814 C 11.8268 9.8814 11.1996 10.5234 11.1996 11.3213 C 11.1996 12.1191 11.8268 12.7611 12.5986 12.7611 C 13.3705 12.7611 13.9977 12.1191 13.9977 11.3213 C 13.9977 10.5234 13.3705 9.8814 12.5986 9.8814 Z M 12.5986 9.8814 Z"},{name:"mlbtv",path:"M 23.2539 7.0039 C 23.2656 6.293 22.6953 5.7109 21.9883 5.7031 C 21.9805 5.7031 21.9727 5.7031 21.9648 5.7031 L 16.3828 5.7031 L 19.5859 11.0625 L 19.8789 11.1016 L 20.0664 11.3438 L 20.0664 11.5742 L 20.2695 11.6172 L 20.457 11.8711 L 20.457 12.0898 L 20.6641 12.1289 L 20.875 12.3594 L 20.875 12.8672 C 21.1289 13.0977 21.4102 13.2852 21.7188 13.4297 C 22 13.5391 22.0313 13.9922 22.2031 14.2344 C 22.4141 14.5859 22.707 14.7266 22.6445 14.9258 C 22.5039 15.4492 21.9648 16.3398 21.4648 16.3789 L 19.4805 16.3789 L 19.4805 17.2305 L 21.9648 17.2305 C 22.6836 17.2266 23.2617 16.6445 23.2578 15.9258 L 23.2578 7.0039 M 9.6016 16.3945 L 8.6445 16.3945 C 8.6445 13.9922 9.4531 12.6641 10.4258 12.3984 C 10.5586 12.375 10.4922 11.7188 10.3242 11.5195 L 9.7656 11.5195 C 9.6758 11.5195 9.7266 11.3477 9.7266 11.3477 L 10.1797 10.3789 L 10.1211 10.1094 L 8.4414 10.1094 L 9.8203 9.1445 C 9.8828 6.5938 12.4961 6.3945 14.0664 7.457 C 15.0039 8.0781 15.0742 9.3086 15.0039 10.1563 C 14.9922 10.2109 14.7578 10.1758 14.7578 10.1758 C 14.7578 10.1758 14.6016 11.1133 15.0156 11.1133 L 16.8516 11.1133 C 17.5977 11.082 18.3203 11.5898 18.3203 11.5898 L 18.4961 10.9453 L 14.4766 5.7031 L 1.9961 5.7031 C 1.6523 5.6992 1.3203 5.8359 1.0742 6.0781 C 0.832 6.3242 0.6953 6.6563 0.6992 7.0039 L 0.6992 15.9297 C 0.6953 16.2734 0.8281 16.6094 1.0742 16.8516 C 1.3203 17.0977 1.6523 17.2344 1.9961 17.2344 L 10.0977 17.2344 C 9.9023 16.8945 9.6758 16.5078 9.6055 16.3945 M 2.5 14.5 C 2.5 14.0078 2.8945 13.6094 3.3867 13.6094 C 3.875 13.6094 4.2734 14.0078 4.2734 14.5 C 4.2734 14.9883 3.875 15.3867 3.3867 15.3867 L 3.3789 15.3867 C 2.8945 15.3867 2.5 14.9961 2.5 14.5117 C 2.5 14.5078 2.5 14.5039 2.5 14.5 Z"},{name:"nba",path:"M 7.8555 21.1602 C 7.5547 20.8906 7.7539 20.7734 7.7383 20.6563 C 7.5391 19.8203 6.8672 19.3203 7.2188 19.0547 C 7.1484 18.8438 7.0664 18.6367 6.9688 18.4336 C 5.9336 17.8477 5.0625 16.8789 4.9141 16.7461 C 4.7617 16.6133 4.4297 16.3438 4.3633 16.1953 C 4.2969 16.043 2.9063 14.2383 2.625 13.6211 L 2.1406 13.5547 C 1.9219 12.6367 1.1719 11.8672 1.1523 10.9648 C 1.1758 10.543 1.25 10.1289 1.3711 9.7266 C 1.4688 9.5781 1.5859 9.4414 1.7227 9.3242 L 1.7227 9.0742 C 0.6523 9.1094 0.9531 8.9922 0.7695 8.5742 C 0.5859 8.1563 0.7344 8.2227 0.7852 8.0234 C 0.9375 7.4375 1.4023 6.5195 1.6055 6.1016 C 1.8047 5.6836 1.8711 5.3828 1.8711 5.3828 C 2.6758 3.7617 2.9766 3.8789 3.9258 3.7773 L 3.9766 3.7109 C 4.9297 3.6758 4.7813 3.5938 4.9141 2.6758 C 4.7813 2.7422 4.7305 2.3906 4.7305 2.3906 C 4.6445 1.8711 4.8789 1.9727 4.9805 1.957 C 4.9961 1.1016 5.0977 0.8203 5.7148 0.5859 L 2.4922 0.5859 C 1.4375 0.5859 0.5859 1.4375 0.5859 2.4883 L 0.5859 21.5078 C 0.5859 22.5625 1.4375 23.4141 2.4922 23.4141 L 8.1055 23.4141 C 7.4531 23.0625 7.8398 22.4141 7.8555 21.1602 M 21.5078 0.5859 L 6.2852 0.5859 C 6.5156 0.6484 6.7148 0.7969 6.8359 1.0039 C 7.0703 1.0195 7.3555 1.5547 6.918 2.3242 C 7.1211 2.457 6.9688 2.6406 6.8203 2.8594 C 6.668 3.0742 6.7344 3.0586 6.6172 3.043 C 6.4531 3.3945 6.25 3.7266 6.1016 3.7422 C 6.0352 3.8203 6.0273 3.9297 6.082 4.0117 C 6.3086 4.1016 6.5156 4.2266 6.7031 4.3789 L 6.7031 4.4609 C 6.8672 4.5625 6.9531 4.6445 7.1367 4.7461 C 7.5859 5.0313 8.1563 5.5469 8.0898 7.3203 C 8.2227 7.7031 8.2734 8.457 8.3906 8.707 C 8.5078 8.957 8.793 9.4922 8.8594 9.9258 C 8.8594 9.9258 8.9258 10.5781 9.0078 10.6641 L 9.0586 10.6641 C 9.4414 10.7461 9.375 10.7969 9.4102 10.8633 L 9.5078 10.9453 C 9.6094 10.9961 9.7773 11.0469 9.7773 11.2305 L 9.8594 11.3633 C 9.9102 11.4453 9.957 11.5273 9.9961 11.6172 C 10.1289 11.9922 10.1289 12.4063 9.9961 12.7852 L 9.9961 12.8359 C 9.8477 13.2031 9.5742 13.5039 9.2266 13.6875 L 9.1914 13.6875 L 9.1406 13.7227 C 8.918 13.8281 8.6719 13.8867 8.4219 13.8867 C 7.4883 13.7656 6.832 12.9063 6.957 11.9727 C 7.0391 11.3594 7.4453 10.8398 8.0234 10.6133 C 7.8203 10.1289 7.4219 9.3438 7.3047 9.0938 C 7.1875 8.8398 6.9023 7.2188 6.8516 6.9023 C 6.8008 6.5859 6.1172 7.3203 6.1172 7.3555 C 6.1172 7.3867 5.582 8.6914 5.5664 8.7578 C 5.5547 8.8281 5.5469 8.9023 5.5469 8.9766 C 5.5469 8.9766 5.8008 9.0078 5.9336 9.4258 C 6.0664 9.8438 6.5 11.3984 6.5 11.3984 L 6.3828 11.5156 C 6.918 13.3047 6.7344 14.0742 6.9688 14.6055 C 7.2031 15.1406 7.3555 15.2422 7.6055 15.8789 C 7.8555 16.5117 7.9883 18.1172 8.0742 18.1836 C 8.3555 18.5508 8.5234 18.8359 8.5234 19.0352 C 8.5234 19.2383 8.2734 19.8555 8.375 20.2227 C 8.4727 20.5898 8.457 20.9063 8.5586 20.9922 C 8.6563 21.0742 8.6406 21.1758 8.6055 21.2422 C 8.5898 21.2734 8.5781 21.3086 8.5742 21.3438 C 8.7227 21.9102 9.2422 22.8633 8.4219 23.3633 L 8.375 23.3984 L 21.543 23.3984 C 22.582 23.3906 23.4219 22.5508 23.4336 21.5117 L 23.4336 2.4922 C 23.4219 1.4336 22.5664 0.5859 21.5078 0.5859 Z M 21.5078 0.5859 M 15.793 5.1133 L 19.2383 5.1133 L 18.5352 16.6289 L 17.7813 5.1133 L 21.1406 5.1133 L 19.6563 18.9023 L 17.2461 18.9023 Z M 15.3438 6.8359 L 13.8867 6.8359 L 13.8867 18.8867 L 12.0352 18.8867 L 12.0352 6.8359 L 10.6133 6.8359 L 10.6133 5.0977 L 15.3438 5.0977 Z M 3.543 22.2266 L 3.543 18.7852 L 4.2109 18.7852 C 4.5977 18.7852 4.8281 18.9844 4.8281 19.4727 L 4.8281 19.9883 C 4.8281 20.3047 4.7305 20.457 4.5977 20.5391 C 4.7539 20.6563 4.8438 20.8438 4.8281 21.043 L 4.8281 21.543 C 4.8281 22.0117 4.5781 22.2266 4.2109 22.2266 Z M 4.0117 20.7227 L 4.0117 21.793 L 4.1953 21.793 C 4.3438 21.793 4.3945 21.7109 4.3945 21.543 L 4.3945 20.957 C 4.3945 20.793 4.3438 20.7227 4.1953 20.7227 Z M 4.0117 19.2188 L 4.0117 20.3555 L 4.1797 20.3555 C 4.3438 20.3555 4.3789 20.3047 4.3789 20.1055 L 4.3789 19.4375 C 4.3789 19.2695 4.3281 19.2031 4.1797 19.2031 L 4.0117 19.2031 Z M 5.9336 21.5273 L 5.5156 21.5273 L 5.4648 22.2266 L 4.9961 22.2266 L 5.4141 18.7852 L 6.0664 18.7852 L 6.4688 22.2266 L 5.9844 22.2266 Z M 5.7148 19.168 L 5.6992 19.168 C 5.6641 19.5859 5.6172 20.3047 5.5977 20.5391 L 5.5469 21.1406 L 5.8984 21.1406 L 5.8477 20.5391 C 5.832 20.3047 5.7656 19.5859 5.7148 19.168 M 2.1875 22.2266 L 1.7891 22.2266 L 1.7891 18.7852 L 2.4219 18.7852 L 2.9414 21.6094 C 2.8906 20.9414 2.8398 20.1211 2.8398 19.4219 L 2.8398 18.7852 L 3.2422 18.7852 L 3.2422 22.2266 L 2.6563 22.2266 L 2.1406 19.4727 C 2.1719 20.1055 2.1875 20.625 2.1875 21.1406 Z M 2.1875 22.2266 Z"},{name:"npo",path:"M23.4519 10.6902C24.1664 11.4046 24.1664 12.5775 23.4519 13.2964L13.2964 23.4519C12.582 24.1664 11.4092 24.1664 10.6902 23.4519L.5347 13.2964C-.1798 12.582-.1798 11.4092.5347 10.6902L10.6902.5347C11.4046-.1798 12.5775-.1798 13.2964.5347L23.4519 10.6902ZM10.9239 2.3771 9.9263 3.3747C9.3511 3.9498 9.3511 4.8935 9.9263 5.4731L10.9239 6.4707C11.499 7.0459 12.4427 7.0459 13.0224 6.4707L14.02 5.4731C14.5951 4.898 14.5951 3.9543 14.02 3.3747L13.0224 2.3771C12.4427 1.8019 11.499 1.8019 10.9239 2.3771ZM13.1616 4.0398C13.3728 4.2509 13.3728 4.5924 13.1616 4.8037L12.3528 5.6124C12.1416 5.8237 11.8001 5.8237 11.5889 5.6124L10.7801 4.8037C10.5688 4.5924 10.5688 4.2509 10.7801 4.0398L11.5889 3.2309C11.8001 3.0197 12.1416 3.0197 12.3528 3.2309L13.1616 4.0398ZM7.2167 6.0843 6.2191 7.0818C5.6439 7.657 5.6439 8.6006 6.2191 9.1803L7.0369 9.9981 7.2167 10.1779 8.749 11.7102C8.9602 11.9215 9.3016 11.9215 9.5084 11.7102 9.7196 11.499 9.7151 11.1576 9.5084 10.9508L8.9871 10.4206C9.1039 10.3532 9.2163 10.2723 9.3152 10.1734L10.3127 9.1758C10.8879 8.6006 10.8879 7.657 10.3127 7.0773L9.3152 6.0798C8.7354 5.5091 7.7919 5.5091 7.2167 6.0843ZM9.4545 7.7469C9.6656 7.9581 9.6656 8.2997 9.4545 8.5108L8.6456 9.3197C8.4344 9.5309 8.0929 9.5309 7.8817 9.3197L7.7964 9.2342 7.0728 8.5108C6.8617 8.2997 6.8617 7.9581 7.0728 7.7469L7.8817 6.938C8.0929 6.7269 8.4344 6.7269 8.6456 6.938L9.4545 7.7469ZM3.451 9.8499 2.4535 10.8475C1.8784 11.4227 1.8784 12.3663 2.4535 12.946L2.467 12.9594 2.9522 13.4448 4.179 14.667C4.3902 14.8782 4.7317 14.8782 4.9385 14.667 5.1496 14.4557 5.1451 14.1143 4.9385 13.9076L3.7116 12.6809 3.3073 12.2764C3.0961 12.0652 3.0961 11.7237 3.3073 11.5125L4.1161 10.7036C4.3273 10.4925 4.6688 10.4925 4.88 10.7036L5.2844 11.1081 6.5111 12.3348C6.7224 12.546 7.0639 12.546 7.2705 12.3348 7.4818 12.1237 7.4773 11.7821 7.2705 11.5754L6.0438 10.3487 5.5585 9.8634 5.545 9.8499C4.9699 9.2747 4.0262 9.2747 3.451 9.8499Z"},{name:"nrktv",path:"M21.6896 6.8901C21.5139 6.5927 21.5038 6.4097 21.6732 6.1225L24 2.3139H20.772C20.772 2.3139 18.8327 5.4829 18.5675 5.9232 18.3049 6.3628 18.3163 6.6368 18.5783 7.0885 18.8434 7.5399 20.772 10.6862 20.772 10.6862H24C24 10.6862 21.715 6.937 21.6896 6.8901M15.066 10.6862H18.0016V2.3139H15.066M13.2146 2.1535C12.2962 2.1535 11.5528 2.9039 11.5528 3.83 11.5528 4.7559 12.2962 5.5084 13.2146 5.5084 14.1345 5.5084 14.881 4.7559 14.881 3.83 14.881 2.9039 14.1345 2.1535 13.2146 2.1535M8.4165 10.6862H11.3505V2.3139H8.4165M0 10.6862H2.9285V2.3139H-.0414M6.6341 3.659C6.4838 2.8918 5.8128 2.3139 5.0084 2.3139H3.1222L5.0175 10.6862H8.2057ZM0 13.3139V14.2914H2.5989V21.6861H3.6779V14.2914H6.2793V13.3139M12.1731 13.3139 9.9187 20.4641 7.7101 13.3139H6.5931L9.2756 21.6861H10.5456L13.2595 13.3139 Z"},{name:"paramount",path:"M7.6519 3.4867 7.2368 3.0901 7.4931 2.5755 6.9777 2.8346 6.5777 2.4416 6.671 2.988 6.1597 3.2496 6.7367 3.3405 6.8285 3.9031 7.0833 3.3984ZM9.1307 2.3332 9.4803 1.8825 8.9266 2.0371 8.61 1.5778 8.595 2.1318 8.0415 2.2902 8.5896 2.4891 8.569 3.0602 8.9199 2.6118 9.461 2.8049ZM5.9611 4.3735 5.4774 4.0588 5.6269 3.5086 5.1745 3.8586 4.7045 3.548 4.9004 4.0688 4.4496 4.4163 5.0362 4.4015 5.2362 4.9358 5.3869 4.393ZM11.1977 2.0426 11.6265 1.6605 11.0523 1.7122 10.8345 1.2 10.707 1.7429 10.1357 1.7969 10.6344 2.0929 10.5029 2.6481 10.9344 2.2734 11.4278 2.5645ZM2.678 7.4355 3.2043 7.2059 2.633 7.0928 2.5602 6.5278 2.2739 7.0178 1.723 6.9012 2.1053 7.3114 1.819 7.8003 2.3561 7.5695 2.7426 7.9931ZM1.8391 9.3077 2.3132 8.9847 1.7283 8.9785 1.5474 8.4395 1.3624 8.975.7963 8.9615 1.2526 9.2931 1.0677 9.826 1.5474 9.5018 2.0145 9.8445ZM4.4963 5.6934 3.9591 5.4749 3.9975 4.9072 3.6206 5.336 3.1013 5.1173 3.3959 5.5914 3.0219 6.0164 3.5919 5.8924 3.892 6.3787 3.9344 5.821ZM1.2618 11.2663 1.6605 10.861 1.0891 10.9641.8042 10.4692.7288 11.0255.1697 11.1201.6809 11.362.6041 11.9199 1.0138 11.5095 1.5372 11.76ZM1.099 13.3023 1.4128 12.8294.87 13.0383.4961 12.6036.5263 13.1673 0 13.3637.5495 13.5036.5824 14.064.9043 13.586 1.4677 13.7362ZM1.1904 16.8054 1.4368 17.3153 1.0218 17.6924 1.5836 17.6222 1.8302 18.1283 1.9453 17.5683 2.5236 17.5006 2.018 17.2315 2.1261 16.6799 1.7054 17.0708ZM1.0876 15.0527.634 14.6951.7751 15.2441.2941 15.5353.8629 15.5711 1.0012 16.1148 1.2246 15.5856 1.8084 15.625 1.3629 15.27 1.5795 14.748ZM16.507 2.5754 17.0223 2.8346 17.4223 2.4416 17.3291 2.988 17.8404 3.2496 17.2633 3.3405 17.1715 3.9031 16.9167 3.3984 16.3481 3.4867 16.7632 3.0901ZM15.0734 2.0371 15.39 1.5778 15.4051 2.1318 15.9586 2.2902 15.4105 2.4891 15.4309 3.0602 15.0802 2.6118 14.5389 2.8049 14.8693 2.3332 14.5197 1.8825ZM18.3732 3.5086 18.8256 3.8586 19.2955 3.548 19.0996 4.0688 19.5505 4.4163 18.9638 4.4015 18.7638 4.9358 18.6131 4.393 18.0388 4.3735 18.5227 4.0588ZM12.9477 1.7121 13.1656 1.2 13.2931 1.7429 13.8645 1.7969 13.3658 2.0929 13.4972 2.6481 13.0657 2.2734 12.5724 2.5645 12.8024 2.0426 12.3737 1.6605ZM21.3671 7.0928 21.4398 6.5278 21.7261 7.0178 22.2768 6.9012 21.8948 7.3114 22.1811 7.8003 21.644 7.5695 21.2574 7.9931 21.3219 7.4355 20.7956 7.2059ZM22.2717 8.9785 22.4526 8.4395 22.6377 8.975 23.2037 8.9615 22.7474 9.2931 22.9323 9.826 22.4526 9.5018 21.9855 9.8445 22.1608 9.3077 21.6868 8.9847ZM20.0025 4.9073 20.3794 5.336 20.8987 5.1173 20.604 5.5914 20.9781 6.0164 20.4082 5.8924 20.108 6.3787 20.0655 5.821 19.5037 5.6934 20.0409 5.4749ZM22.9109 10.9641 23.1958 10.4692 23.2712 11.0255 23.8303 11.1201 23.3192 11.362 23.396 11.9199 22.9863 11.5095 22.4627 11.76 22.7382 11.2663 22.3395 10.861ZM23.1299 13.0383 23.5039 12.6036 23.4737 13.1673 24 13.3637 23.4506 13.5036 23.4176 14.064 23.0957 13.586 22.5324 13.7362 22.9011 13.3023 22.5873 12.8294ZM22.9782 17.6923 22.4164 17.6222 22.1698 18.1283 22.0547 17.5683 21.4765 17.5006 21.982 17.2315 21.8739 16.6799 22.2946 17.0708 22.8096 16.8054 22.5632 17.3153ZM23.2249 15.244 23.7059 15.5353 23.1371 15.5711 22.9988 16.1148 22.7753 15.5856 22.1916 15.625 22.637 15.27 22.4205 14.748 22.9125 15.0527 23.366 14.6952ZM5.0813 16.6138 5.0473 16.5614 6.0387 14.9258 6.6053 14.0437 7.248 13.368 6.5461 14.7817 6.1656 15.0785ZM8.138 15.2082 8.3748 14.8688 8.5947 14.8123 9.2655 13.5343 9.3444 12.703 9.711 11.8831 9.6828 11.7755 9.1133 12.4937 8.9723 12.5447 7.9407 14.1111 8.0872 14.2638 7.0217 16.6389 7.7377 15.8982ZM9.5418 15.4514 9.4347 15.2704 8.5213 16.9217 8.3071 17.8491H8.4846L9.0682 17.1535 9.305 16.0678ZM13.1276 8.2619 12.3946 7.5418V9.9132L11.7857 11.5757 12.6126 12.1036 11.2031 15.9 11.4737 16.1337 10.7407 17.7887 11.6579 18.7841H13.041L12.8042 18.1809 14.8941 18.95H17.2656L16.7658 18.0866 16.5064 17.4081 16.4049 16.8952 17.6377 18.426H19.1562L18.7089 17.5022 18.0249 16.8086 16.3035 13.0347 15.5368 12.8011 15.315 13.0498H15.1801L14.7953 12.0357 14.4106 11.3534 13.8792 10.4975ZM11.9381 3.5225C6.6995 3.5225 2.4529 7.7821 2.4529 13.0366 2.4529 14.4803 2.7734 15.8488 3.3472 17.0746L6.9689 12.907 7.2818 12.8053 8.6771 10.8374 9.2859 10.3115 10.1992 8.878 10.7489 8.3521 11.6368 7.1052 12.195 6.6811 13.2351 7.4275 13.7509 8.386 14.4106 10.3539 15.1802 11.7195 16.7952 12.4406 18.2582 15.4347 18.6134 16.6308 18.9601 16.8851 19.2645 17.2414 19.8297 18.3169C20.8363 16.8061 21.4233 14.9901 21.4233 13.0366 21.4233 7.7821 17.1767 3.5225 11.9381 3.5225ZM18.849 19.502H18.3886L18.2825 19.7472 18.1032 20.162H17.887L17.8228 20.3027H18.0444L17.7774 20.9087C17.5868 21.3348 17.2843 21.7549 17.1114 21.7549 17.0748 21.7549 17.052 21.7375 17.052 21.6986 17.052 21.6621 17.0619 21.6224 17.1069 21.5161 17.1616 21.3855 17.2498 21.2004 17.3155 21.0633 17.4108 20.8656 17.5645 20.5551 17.5645 20.4006 17.5645 20.2452 17.468 20.1269 17.2797 20.1269 17.067 20.1269 16.8762 20.2582 16.7 20.4453L16.8144 20.162H16.379L16.0247 20.9814C15.884 21.2726 15.594 21.7543 15.4146 21.7543 15.3773 21.7543 15.3616 21.7309 15.3616 21.6932 15.3616 21.6728 15.3715 21.6302 15.3874 21.5931 15.4034 21.5558 15.6151 21.0552 15.6151 21.0552L15.9985 20.1596H15.5321L15.1595 21.0307C15.0426 21.3004 14.7512 21.7562 14.5644 21.7562 14.5264 21.7562 14.5016 21.7366 14.5016 21.6886 14.5016 21.6407 14.5363 21.5553 14.5631 21.4913L14.7583 21.055 14.759 21.0552 15.1625 20.1597H14.696L14.605 20.3614H14.6046C14.5377 20.497 14.4195 20.6588 14.2372 20.6588 14.1485 20.6588 14.1082 20.623 14.0864 20.588 14.0592 20.2863 13.873 20.1254 13.5947 20.1254 13.2098 20.1254 12.9356 20.358 12.7555 20.638 12.6354 20.8252 12.5536 21.0283 12.4811 21.2622 12.316 21.5382 12.1416 21.7543 12.0064 21.7543 11.9718 21.7543 11.9504 21.7332 11.9504 21.6869 11.9504 21.6351 11.9952 21.5333 12.0125 21.4952L12.3145 20.8389C12.3986 20.6356 12.4572 20.5014 12.4572 20.3699 12.4572 20.2282 12.3603 20.127 12.2026 20.127 11.984 20.127 11.745 20.2544 11.5575 20.4678 11.5638 20.438 11.5669 20.4035 11.5669 20.3649 11.5669 20.2094 11.4919 20.1269 11.3304 20.1269 11.1301 20.1269 10.9245 20.2474 10.7362 20.4689L10.8611 20.162H10.4356L10.079 20.9814C9.9088 21.3675 9.6372 21.7543 9.4823 21.7543 9.4462 21.7543 9.4256 21.7354 9.4256 21.6883 9.4256 21.6125 9.5051 21.4312 9.5371 21.3565L10.0089 20.2633C10.0441 20.1817 9.8173 20.1312 9.5291 20.1312 9.2331 20.1312 8.9307 20.2814 8.7068 20.4698 8.5505 20.6013 8.4347 20.6684 8.3748 20.6684 8.3458 20.6684 8.3327 20.6521 8.3327 20.6331 8.3327 20.5657 8.4899 20.3779 8.4899 20.2354 8.4899 20.1705 8.4555 20.1269 8.3678 20.1269 8.1983 20.1269 7.9996 20.2928 7.8517 20.4641L7.9765 20.1618H7.5636L7.2078 20.9814C7.0375 21.3675 6.7583 21.771 6.6036 21.771 6.5676 21.771 6.5468 21.7519 6.5468 21.7049 6.5468 21.632 6.6231 21.4518 6.6662 21.3565L7.138 20.2633C7.1732 20.1817 6.9466 20.1312 6.6584 20.1312 6.233 20.1312 5.8184 20.4239 5.596 20.7236 5.3535 21.0497 5.1892 21.3945 5.1855 21.6758 5.1824 21.9013 5.2971 22.0435 5.5284 22.0435 5.7859 22.0435 5.9916 21.8349 6.1146 21.6791 6.1117 21.6954 6.1001 21.7528 6.1001 21.7724 6.1001 21.9297 6.1616 22.0435 6.3483 22.0435 6.5135 22.0435 6.7342 21.9024 6.9117 21.6777L6.7682 22.0106H7.2187L7.6601 20.99C7.8041 20.6578 7.9714 20.4855 8.0163 20.4855 8.0308 20.4855 8.0371 20.492 8.0371 20.5047 8.0371 20.5402 7.9696 20.6333 7.9696 20.7206 7.9696 20.8099 8.0172 20.8709 8.138 20.8709 8.2344 20.8709 8.3428 20.823 8.4382 20.7628 8.2116 21.0774 8.0597 21.406 8.0562 21.6759 8.0532 21.9012 8.1682 22.0436 8.3994 22.0436 8.6436 22.0436 8.8674 21.8102 8.9904 21.6543A.8034.8034 90 008.9815 21.7623C8.9815 21.9155 9.0664 22.0435 9.2398 22.0435 9.4301 22.0435 9.5873 21.9214 9.7785 21.6832L9.6372 22.0106H10.0986L10.5195 21.0351C10.7036 20.6105 10.9533 20.3868 11.0766 20.3868 11.1131 20.3868 11.1376 20.4068 11.1376 20.4503 11.1376 20.4765 11.1265 20.5247 11.0997 20.5885L10.4825 22.0106 10.9549 22.0094 11.386 21.0169C11.5714 20.5918 11.7765 20.3815 11.9288 20.3815 11.9749 20.3815 11.9946 20.4058 11.9946 20.4572 11.9946 20.4857 11.9858 20.5332 11.9501 20.613L11.5371 21.5121C11.5027 21.589 11.4691 21.6995 11.4691 21.7849 11.4691 21.9211 11.5432 22.0435 11.7491 22.0435 12.0169 22.0435 12.2229 21.8371 12.4527 21.5259L12.4538 21.5925C12.4709 21.8396 12.6074 22.053 12.9638 22.053 13.3861 22.053 13.7281 21.7543 13.9358 21.2823 14.029 21.0705 14.074 20.8898 14.0864 20.753 14.1258 20.7731 14.1751 20.7857 14.2372 20.7857 14.2955 20.7857 14.3644 20.7739 14.436 20.7363L14.3626 20.899C14.2781 21.0794 14.1839 21.2799 14.114 21.4471 14.0625 21.5704 14.0315 21.686 14.0315 21.7633 14.0315 21.9323 14.122 22.0514 14.3101 22.0514 14.4986 22.0514 14.7576 21.8708 14.9397 21.6177H14.9454C14.9349 21.6681 14.9246 21.7397 14.9246 21.7776 14.9246 21.9168 14.9664 22.0504 15.1589 22.0504 15.3819 22.0504 15.5539 21.8856 15.7233 21.68L15.5804 22.0106H16.0469L16.4186 21.1508C16.6291 20.6655 16.8415 20.3737 17.0382 20.3737 17.0802 20.3737 17.1019 20.4021 17.1019 20.4446 17.1019 20.5255 16.9887 20.7483 16.8816 20.974 16.7848 21.1774 16.713 21.3329 16.6626 21.4553 16.6182 21.5637 16.5817 21.6944 16.5817 21.7797 16.5817 21.9292 16.6632 22.0435 16.8424 22.0435 17.1108 22.0435 17.3857 21.7793 17.5296 21.5757 17.4966 21.6698 17.4758 21.7839 17.4758 21.8738 17.4758 22.1477 17.639 22.2853 17.8644 22.2853 18.0234 22.2853 18.1609 22.2289 18.2825 22.1428 18.4588 22.018 18.6007 21.8302 18.7211 21.6559L18.6418 21.578C18.5304 21.7383 18.4082 21.8922 18.2825 21.9869 18.2038 22.0465 18.1238 22.0828 18.0445 22.0828 17.9487 22.0828 17.8872 22.0325 17.8872 21.9048 17.8872 21.779 17.9439 21.6098 18.0322 21.3849 18.0369 21.3739 18.1623 21.0868 18.2825 20.8101 18.3844 20.5759 18.4826 20.3489 18.5015 20.3028H18.8041L18.8653 20.162H18.5642ZM5.7447 21.7561C5.6781 21.7561 5.6335 21.7334 5.6318 21.6452 5.6351 21.4124 5.8227 21.0031 6.0596 20.6754 6.2237 20.4484 6.4398 20.2808 6.67 20.2808L6.3768 20.9467C6.1596 21.4501 5.9204 21.7561 5.7448 21.7561ZM8.6157 21.7561C8.5491 21.7561 8.5042 21.7334 8.5027 21.6452 8.5059 21.4124 8.6935 21.0031 8.9304 20.6754 9.0944 20.4484 9.3105 20.2808 9.5407 20.2808L9.2475 20.9467H9.2482C9.0275 21.4574 8.7994 21.7561 8.6157 21.7561ZM13.2333 21.6984C13.1293 21.8473 13.0401 21.8903 12.9629 21.8903 12.8568 21.8903 12.8253 21.7998 12.8383 21.6673 12.8615 21.4348 13.0485 20.8979 13.3111 20.5263 13.4305 20.3571 13.513 20.2867 13.6021 20.2867 13.69 20.2867 13.7212 20.364 13.718 20.4608 13.7097 20.7129 13.4903 21.3297 13.2333 21.6984ZM4.5481 20.6415C4.7102 20.6225 4.9754 20.5695 5.0763 20.5329 5.6999 20.3591 6.4062 19.9418 6.4062 19.201 6.4062 18.3477 5.5018 17.9385 4.4239 17.9385 3.2736 17.9385 2.2186 18.4483 1.8272 19.236 1.7238 19.4445 1.6661 19.672 1.6661 19.9152 1.6661 20.1349 1.7196 20.3324 1.8272 20.4917 1.9932 20.7375 2.2891 20.8919 2.7261 20.8919 3.2589 20.8919 3.6835 20.5994 3.6835 20.0908 3.6835 20.0908 3.6913 19.9479 3.5254 19.9479 3.3892 19.9479 3.3542 20.0415 3.3574 20.0908 3.3768 20.4906 3.141 20.808 2.7176 20.808 2.2447 20.808 2.0459 20.4061 2.0459 19.9751 2.0459 19.0943 2.7106 18.5106 3.4021 18.2606 3.7566 18.1312 4.0418 18.0847 4.4137 18.0847 5.1959 18.0847 5.8357 18.3855 5.8357 19.1879 5.8357 19.8602 5.2714 20.4321 4.5929 20.4799L4.6197 20.3875C4.7588 19.8949 4.9265 19.3562 5.2033 18.9554 5.2196 18.9303 5.2485 18.8927 5.2801 18.8528L5.2422 18.8055C5.1928 18.834 5.1045 18.8984 5.0693 18.9259 3.7711 19.9368 3.7319 22.774 2.0033 22.774 1.9406 22.774 1.8821 22.7691 1.8272 22.7603 1.4665 22.7023 1.2778 22.4601 1.279 22.1235 1.2793 22.0574 1.3018 21.9662 1.3018 21.9144 1.3018 21.8271 1.2426 21.7366 1.1129 21.7366.9586 21.7366.8954 21.8565.8925 22.0333.8843 22.5389 1.2556 22.8313 1.8272 22.884 1.8896 22.8898 1.955 22.967 2.0217 22.8927 3.3701 22.8927 4.1989 21.8763 4.5481 20.6415M21.3734 19.2275 20.7897 20.4889H19.5284L19.1581 21.2891H20.4194L19.8357 22.5505H20.636L21.2197 21.2891H22.4811L22.8514 20.4888H21.59L22.1737 19.2275Z"},{name:"peacock",path:"M6 12.7V7c.699-3.725 5.849-3.806 6.5 0 .401 2.234-.975 3.582-2.511 4.094Zm0 9.6V14.25L7 15.3l5-1.95c1.763-.665 3.812-3.119 3.489-6.35C14.3-.5 4.299-.5 3 7V22.3M18 1.5a1 1 0 003 0 1 1 0 00-3 0Zm0 4.19a1 1 0 003 0 1 1 0 00-3 0Zm0 4.19a1 1 0 003 0 1 1 0 00-3 0Zm0 4.19a1 1 0 003 0 1 1 0 00-3 0Zm0 4.19a1 1 0 003 0 1 1 0 00-3 0Zm0 4.19a1 1 0 003 0 1 1 0 00-3 0Z"},{name:"primevideo",path:"M10.5404 24C8.6114 23.8847 6.7246 23.3486 4.9953 22.4245 4.0043 21.9206 3.1033 21.2346 2.3328 20.3973 1.7161 19.7304 1.4078 19.2945 1.3491 18.9899 1.3174 18.8334 1.3432 18.7144 1.4211 18.6499 1.5195 18.6415 1.6179 18.6332 1.7163 18.6249 1.8497 18.6796 2.0389 18.8139 2.3132 19.0424 3.9381 20.3973 6.1992 21.3794 8.7148 21.8153 11.8436 22.3549 15.0469 22.0922 18.0628 21.0485 18.6011 20.8542 18.9437 20.7019 19.4968 20.4131 19.859 20.2188 19.9715 20.1715 20.089 20.1663 20.2309 20.1505 20.2358 20.1558 20.3141 20.245 20.4267 20.3763 20.4218 20.5496 20.2994 20.7492 20.1869 20.933 19.9862 21.1483 19.6877 21.4057 18.1558 22.7291 15.6646 23.6797 12.9924 23.958 12.5127 24.0105 10.9613 24.0315 10.5404 24ZM20.5637 22.435C20.4071 22.2932 20.4365 22.1356 20.6861 21.6893 20.9996 21.1528 21.2309 20.5659 21.3713 19.9509 21.4251 19.5833 21.337 19.4625 20.9602 19.389 20.6078 19.326 19.7807 19.3733 19.257 19.4888 19.1591 19.5098 18.9878 19.5256 18.8752 19.5256 18.6795 19.5256 18.655 19.5256 18.606 19.4625 18.5678 19.4127 18.5425 19.3529 18.5326 19.2892 18.5228 19.1947 18.5326 19.1684 18.606 19.0792 19.2394 18.5242 20.0349 18.2266 20.8525 18.2389 21.6209 18.2389 22.2424 18.4385 22.448 18.7536 22.5214 18.8691 22.5263 18.8796 22.5361 19.263 22.541 19.5466 22.5361 19.7199 22.5018 19.8984 22.3886 20.516 22.146 21.0979 21.7922 21.6 21.5444 21.9179 21.258 22.1988 20.9406 22.435 20.7448 22.54 20.6714 22.54 20.5637 22.435ZM11.6139 7.4537C11.5755 7.4363 11.5447 7.4055 11.5274 7.3669 11.5101 7.3206 11.5043 6.3482 11.5043 4.7158 11.5043 2.5336 11.5043 2.1342 11.5389 2.0879 11.5735 2.0416 11.6139 2.0358 12.0692 2.0301 12.4035 2.0243 12.5879 2.0301 12.634 2.0532 12.709 2.0821 12.7205 2.1111 12.8069 2.5742L12.8703 2.8173C12.8819 2.8231 12.928 2.7536 12.9799 2.6552 13.1412 2.331 13.4064 2.0879 13.7291 1.9722 13.8502 1.9259 13.9424 1.9143 14.1787 1.9143 14.4957 1.9143 14.6225 1.9374 14.8876 2.0706 15.1187 2.2161 15.3123 2.4144 15.4525 2.6494 15.5101 2.7478 15.5562 2.8231 15.5678 2.8231 15.5735 2.8231 15.6196 2.771 15.6657 2.7073 15.8837 2.3676 16.2052 2.1077 16.5822 1.9664 16.884 1.8834 17.2025 1.8834 17.5044 1.9664 18.0346 2.1516 18.3459 2.5452 18.5418 3.2803 18.5879 3.4829 18.5937 3.5408 18.5994 5.422 18.611 7.1006 18.5994 7.3727 18.5706 7.419 18.536 7.4653 18.5015 7.4711 17.9482 7.4769 17.3833 7.4827 17.3545 7.4827 17.2911 7.4306L17.2219 7.3727 17.2104 5.6246C17.2046 3.8997 17.2046 3.8707 17.147 3.7029 17.0317 3.3556 16.8415 3.2051 16.5245 3.2051 16.2018 3.2051 15.9712 3.3787 15.8502 3.7203 15.7637 3.9634 15.7522 4.2759 15.7522 5.8446 15.7522 7.3438 15.7522 7.3785 15.6945 7.4306 15.6484 7.4769 15.6139 7.4827 15.0778 7.4827 14.5015 7.4827 14.4381 7.4711 14.3862 7.3785 14.3539 6.8196 14.3443 6.2596 14.3574 5.6999 14.3574 4.0791 14.3516 3.8823 14.2652 3.6161 14.1499 3.2456 13.6888 3.0835 13.3257 3.2861 13.0894 3.4135 12.9626 3.6797 12.9222 4.1486 12.9049 4.2817 12.8934 5.0632 12.8934 5.8851V7.3785L12.8358 7.4306C12.7781 7.4769 12.7493 7.4827 12.2248 7.4827 11.9193 7.4827 11.6484 7.4653 11.6139 7.4537ZM.3458 9.1671C.31 9.1565.2767 9.1388.2479 9.115.2018 9.0861.2018 8.8835.2018 5.613.2018 3.7087.2133 2.14.219 2.1227.2709 2.0474.3631 2.0301.8127 2.0301 1.0721 2.0301 1.2969 2.0416 1.3199 2.0474 1.3833 2.0706 1.4064 2.14 1.4755 2.4758 1.5101 2.6494 1.5505 2.7999 1.562 2.8115 1.5735 2.8231 1.6139 2.7652 1.6542 2.6841 1.7464 2.5105 2.0173 2.2211 2.196 2.1227 2.4922 1.9451 2.8403 1.8756 3.1816 1.9259 3.9655 2.0474 4.5072 2.7189 4.7493 3.8534 4.8069 4.1428 4.8242 5.1037 4.7724 5.4741 4.7135 6.0632 4.4852 6.6223 4.1153 7.0833 3.7868 7.4306 3.4813 7.5869 3.0605 7.6042 2.7551 7.6274 2.5533 7.5927 2.3228 7.4769 2.0818 7.3418 1.8778 7.1489 1.7291 6.9154 1.6984 6.8598 1.6596 6.809 1.6139 6.7649 1.6023 6.7649 1.5908 7.2685 1.5908 7.8879 1.5908 8.513 1.5793 9.0398 1.5678 9.0745 1.5274 9.1729 1.4237 9.1903.8876 9.1903.6167 9.1903.3689 9.1845.3458 9.1729ZM2.709 6.3771C2.8992 6.3192 3.0778 6.1224 3.1816 5.8793 3.2969 5.6015 3.343 5.3294 3.3603 4.8953 3.3891 4.1428 3.2162 3.5061 2.928 3.2572 2.8358 3.1761 2.5937 3.0835 2.4842 3.0835 1.9251 3.0835 1.562 3.726 1.562 4.7216 1.562 5.4336 1.7061 5.9372 1.977 6.215 2.1729 6.406 2.4438 6.4697 2.7147 6.3771ZM21.1528 7.5869C20.2331 7.3991 19.5127 6.6801 19.3199 5.7578 18.9914 4.4496 19.3487 3.072 20.196 2.3831 20.9772 1.733 22.1092 1.7354 22.8876 2.3889 23.2104 2.6783 23.4006 2.9446 23.5793 3.3845 23.7234 3.7434 23.781 4.056 23.7983 4.5538 23.8098 4.7853 23.8041 4.9995 23.7983 5.0342 23.7579 5.1905 23.8386 5.1789 22.196 5.1789 21.3718 5.1789 20.6917 5.1905 20.6801 5.2021 20.6513 5.2484 20.7493 5.7114 20.8242 5.914 20.928 6.1861 21.1239 6.3945 21.3257 6.4523 21.758 6.5739 22.1729 6.3771 22.3113 5.9777 22.4092 5.7056 22.4208 5.6883 22.5303 5.6767 22.611 5.6709 23.1989 5.7925 23.5562 5.8793 23.7061 5.9198 23.7234 5.9951 23.6254 6.2382 23.5216 6.516 23.3833 6.7418 23.1931 6.9444 22.7967 7.3835 22.2266 7.6232 21.6369 7.5984 21.4352 7.6042 21.2162 7.5984 21.147 7.5869ZM22.3631 4.1717C22.3631 3.9113 22.2018 3.4308 22.0461 3.2456 21.9213 3.114 21.7487 3.0388 21.5677 3.0372 21.2969 3.0372 21.0894 3.1646 20.9337 3.425 20.8415 3.5929 20.732 3.9171 20.7032 4.1197L20.6859 4.2528H22.3631ZM5.5505 7.4306 5.4813 7.3727V4.7448C5.4813 2.3253 5.4813 2.1053 5.5216 2.0764 5.5793 2.0301 6.4784 2.0069 6.5879 2.0532 6.6744 2.0879 6.7032 2.1516 6.7666 2.5047 6.7954 2.661 6.8242 2.7941 6.8415 2.8057 6.8473 2.8173 6.8992 2.7478 6.9453 2.6552 7.0605 2.441 7.3199 2.1632 7.4986 2.0764 7.8352 1.918 8.2159 1.8812 8.5764 1.9722 8.7896 2.0301 8.8761 2.1053 8.8761 2.2269 8.8761 2.3137 8.7032 3.0372 8.6283 3.2746 8.5706 3.4482 8.536 3.4656 8.2824 3.3672 8.0933 3.2813 7.8902 3.2303 7.683 3.2167 7.2969 3.2167 7.049 3.4193 6.9337 3.8534 6.8876 3.9865 6.8819 4.2007 6.8703 5.7057 6.8929 6.283 6.8775 6.8611 6.8242 7.4364 6.7954 7.4595 6.6398 7.4711 6.2017 7.4769 5.6369 7.4827 5.6138 7.4769 5.5504 7.4306ZM9.3545 7.4537C9.3233 7.4443 9.2966 7.4237 9.2796 7.3959 9.268 7.3669 9.2507 2.6552 9.2623 2.1748 9.2623 2.0416 9.343 2.0243 9.9885 2.0243 10.6283 2.0243 10.6398 2.0301 10.6513 2.1979V4.8258C10.6513 7.3438 10.6513 7.3785 10.5994 7.4306 10.5533 7.4769 10.5188 7.4827 9.977 7.4827 9.66 7.4827 9.3775 7.4711 9.3487 7.4537ZM9.7234 1.6191C9.4958 1.5469 9.3081 1.3835 9.2046 1.1676 9.1222.9415 9.1222.6933 9.2046.4672 9.2796.2993 9.4409.1373 9.6081.062 9.8353-.0202 10.084-.0202 10.3113.062 10.4957.1488 10.6801.3514 10.7435.5482 10.8012.745 10.7839 1.0229 10.6974 1.2139 10.6167 1.3875 10.4265 1.5496 10.2363 1.6075 10.098 1.648 9.8329 1.6538 9.7234 1.6191ZM9.7194 16.2724C9.0674 16.1565 8.5202 15.533 8.2989 14.6612 8.1484 13.9852 8.1405 13.2877 8.2757 12.6087 8.4561 11.8197 8.8578 11.2404 9.4109 10.9976 10.0703 10.6771 10.8789 10.8909 11.268 11.4887 11.3379 11.588 11.4077 11.6652 11.4194 11.6542 11.4369 11.6487 11.4485 11.2073 11.4485 10.5341 11.4485 9.4472 11.4485 9.4251 11.5009 9.3755 11.5533 9.3258 11.5766 9.3203 12.1587 9.3313 12.3731 9.3168 12.5885 9.3298 12.7991 9.3699 12.8574 9.4251 12.869 9.9327 12.8574 13.0115L12.8457 16.0682 12.7875 16.1234C12.7409 16.1786 12.7235 16.1786 12.2519 16.1786 12.0751 16.1836 11.8982 16.1781 11.7221 16.162 11.6523 16.1344 11.6057 16.0296 11.5475 15.7151 11.5317 15.612 11.5064 15.5105 11.4718 15.4116L11.3845 15.5551C11.268 15.7648 10.9595 16.0462 10.715 16.162 10.6102 16.2117 10.4588 16.2613 10.3831 16.2724 10.2143 16.3055 9.8941 16.3055 9.7194 16.2724ZM10.8605 15.1027C11.2855 14.9095 11.5067 14.2695 11.4601 13.3922 11.4194 12.6032 11.1691 12.1397 10.7324 12.0239 10.6333 11.9898 10.5254 11.986 10.4239 12.0128 9.9989 12.1011 9.766 12.4598 9.6787 13.1439 9.6257 13.5718 9.6533 14.0052 9.7602 14.424 9.8592 14.7771 10.0338 15.0089 10.2783 15.1192 10.4239 15.1854 10.7033 15.1744 10.8605 15.1027ZM20.6817 16.2613C19.9915 16.0852 19.4172 15.6316 19.1099 15.0199 18.9718 14.7334 18.8739 14.4311 18.8188 14.1205 18.6616 13.0722 18.976 12.057 19.6397 11.4556 19.932 11.1704 20.3102 10.9777 20.7225 10.9038 22.1896 10.6224 23.4587 11.759 23.5286 13.4308 23.5723 14.0903 23.3972 14.7463 23.0279 15.3068 22.7241 15.7386 22.2777 16.0627 21.7588 16.2282 21.405 16.3027 21.0398 16.3139 20.6817 16.2613ZM21.4677 15.1468C21.7064 15.0364 21.8868 14.7606 21.9858 14.3743 22.0324 14.1757 22.044 14.0709 22.044 13.5908 22.044 13.1439 22.0324 13.0005 21.9974 12.8515 21.8635 12.3163 21.6365 12.0349 21.2872 11.9632 20.8215 11.8749 20.4605 12.2004 20.3266 12.8184 20.1636 13.5633 20.2626 14.4902 20.5478 14.8985 20.6293 15.0144 20.8156 15.1578 20.9321 15.1965 21.0485 15.2296 21.3571 15.2075 21.4677 15.1468ZM15.5004 16.2613C15.2693 16.2249 15.0478 16.1462 14.8484 16.0296 14.1848 15.6345 13.7426 14.9786 13.6433 14.2419 13.5851 13.9164 13.5851 13.3095 13.6433 12.9894 13.7519 12.2614 14.1706 11.6073 14.8018 11.1797 15.154 10.9783 15.555 10.8662 15.9661 10.8542 16.1874 10.8542 16.5483 10.9204 16.7579 10.9976 17.3241 11.2351 17.7679 11.6755 17.9921 12.2225 18.1668 12.6142 18.2366 12.9784 18.2424 13.4915 18.2424 13.8391 18.2424 13.8833 18.1959 13.9329 18.1493 13.9881 18.1376 13.9881 16.6182 13.9881H15.0871V14.0709C15.0871 14.2198 15.1569 14.5178 15.2442 14.7054 15.3432 14.9316 15.4655 15.0751 15.6401 15.1578 15.8264 15.2516 16.1233 15.2516 16.3271 15.1689 16.4901 15.1026 16.6764 14.9151 16.7346 14.7661L16.8103 14.5619C16.8394 14.4737 16.8569 14.4626 16.9384 14.4571 17.0548 14.4461 17.9863 14.6392 18.0736 14.6888 18.1609 14.744 18.1376 14.8544 17.9921 15.1468 17.8477 15.4372 17.6345 15.6921 17.3692 15.8917 16.9617 16.1786 16.6356 16.2779 16.0593 16.2889 15.7973 16.2944 15.6168 16.2889 15.5004 16.2668ZM16.7754 13.0722C16.7987 13.0556 16.7987 13.017 16.7637 12.8349 16.6764 12.3991 16.4959 12.1066 16.2398 11.9963 15.8613 11.8308 15.4247 12.0515 15.2384 12.5039 15.1569 12.7246 15.0871 13.0391 15.122 13.0722 15.1569 13.1053 16.7171 13.1053 16.7754 13.0722ZM1.9707 16.1289C1.9183 16.0737 1.8951 16.0075 1.7379 15.4503 1.5252 14.7115 1.3078 13.974 1.0858 13.2377L.591 11.5494C.527 11.3342.4746 11.1411.4746 11.108.4746 10.9976.5444 10.9811 1.2023 10.9811 1.7553 10.9811 1.8252 10.9866 1.8776 11.0252 1.9242 11.0638 1.9649 11.2073 2.1396 11.9466L2.5005 13.4971C2.6344 14.0488 2.7916 14.733 2.7916 14.7661 2.7916 14.8488 2.8324 14.7661 2.8615 14.6281L3.2923 12.7798C3.6416 11.29 3.6882 11.0804 3.7347 11.0362 3.7697 11.0031 3.8628 10.9921 4.3926 10.9866 5.0563 10.9866 5.1319 10.9921 5.1494 11.0969 5.1552 11.1521 5.0679 11.4666 4.672 12.8074L4.1073 14.7275C4.02 15.042 3.9501 15.2682 3.7464 15.9413 3.7173 16.0351 3.6765 16.1234 3.6532 16.1455 3.6241 16.1786 3.5019 16.1841 2.8149 16.1841 2.0581 16.1841 2.0115 16.1841 1.9707 16.1344ZM6.0285 16.1289 5.9586 16.0737 5.9644 13.5743C5.9703 11.2183 5.9761 11.0749 6.0227 11.0362 6.0634 10.9976 6.1274 10.9921 6.6456 10.9811 7.1404 10.9811 7.2452 10.9811 7.3093 11.0142L7.3908 11.0528V13.5357C7.3908 15.3234 7.3791 16.0462 7.3617 16.0903 7.3432 16.1239 7.312 16.1495 7.2743 16.162 7.2452 16.1731 6.9658 16.1786 6.6572 16.1786 6.1333 16.1786 6.0925 16.1786 6.0285 16.1234ZM6.436 10.5838C6.2031 10.5286 5.9703 10.3245 5.9004 10.1093 5.8422 9.9603 5.8422 9.7231 5.9004 9.5575 5.9412 9.403 6.1275 9.1989 6.2846 9.1216 6.4418 9.0444 6.8435 9.0334 7.0124 9.0996 7.2045 9.1823 7.3267 9.2872 7.4199 9.4527 7.4839 9.5906 7.4956 9.6293 7.4956 9.8279 7.4956 10.0927 7.4432 10.2141 7.2918 10.3686 7.1346 10.5231 6.9716 10.5893 6.7271 10.6003 6.6107 10.6003 6.4826 10.6003 6.436 10.5838Z"},{name:"pia",path:"M 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 Z M 24 12 M 11.40625 8.695312 C 11.40625 8.332031 10.96875 8.152344 10.710938 8.40625 C 10.457031 8.664062 10.636719 9.101562 11 9.101562 C 11.222656 9.101562 11.40625 8.917969 11.402344 8.695312 M 13.003906 8.289062 C 12.640625 8.289062 12.457031 8.726562 12.714844 8.984375 C 12.972656 9.238281 13.40625 9.058594 13.40625 8.695312 C 13.40625 8.472656 13.226562 8.289062 13.003906 8.289062 M 12.566406 9.363281 C 12.242188 9.652344 11.757812 9.652344 11.4375 9.363281 C 11.332031 9.277344 11.199219 9.425781 11.292969 9.519531 C 11.691406 9.894531 12.3125 9.894531 12.707031 9.519531 C 12.75 9.480469 12.75 9.414062 12.710938 9.375 C 12.671875 9.332031 12.609375 9.328125 12.566406 9.363281 M 16.304688 10.933594 L 16.304688 10.929688 C 16.304688 10.550781 16.054688 10.21875 15.691406 10.117188 L 15.691406 9.390625 C 15.691406 7.414062 14.089844 5.8125 12.113281 5.8125 L 11.976562 5.8125 C 10 5.8125 8.394531 7.414062 8.394531 9.390625 L 8.394531 10.097656 C 7.996094 10.171875 7.707031 10.515625 7.703125 10.921875 C 7.59375 11.105469 7.535156 11.316406 7.535156 11.53125 L 7.535156 16.121094 C 7.535156 16.667969 7.902344 17.144531 8.429688 17.289062 C 8.570312 17.605469 8.886719 17.8125 9.234375 17.8125 L 10.238281 17.8125 C 10.570312 17.8125 10.875 17.625 11.027344 17.328125 L 12.871094 17.328125 C 13.019531 17.625 13.324219 17.8125 13.65625 17.8125 L 14.660156 17.8125 C 15 17.8125 15.308594 17.617188 15.457031 17.3125 C 16.039062 17.214844 16.464844 16.710938 16.464844 16.121094 L 16.464844 11.53125 C 16.464844 11.324219 16.410156 11.117188 16.304688 10.933594 Z M 13.113281 15.382812 C 13.136719 15.539062 13.089844 15.695312 12.988281 15.816406 C 12.886719 15.933594 12.738281 16.003906 12.578125 16.003906 L 11.421875 16.003906 C 11.265625 16.003906 11.113281 15.933594 11.011719 15.816406 C 10.910156 15.695312 10.863281 15.539062 10.886719 15.382812 L 11.109375 13.871094 C 10.691406 13.515625 10.527344 12.949219 10.6875 12.421875 C 10.847656 11.898438 11.300781 11.519531 11.84375 11.460938 C 12.445312 11.390625 13.019531 11.722656 13.261719 12.277344 C 13.5 12.832031 13.351562 13.480469 12.890625 13.871094 Z M 13.246094 10.324219 L 10.761719 10.324219 C 10.605469 10.167969 10.390625 10.082031 10.171875 10.082031 L 9.75 10.082031 L 9.75 9.332031 C 9.75 8.09375 10.753906 7.089844 11.992188 7.089844 L 12.101562 7.089844 C 13.339844 7.089844 14.339844 8.09375 14.339844 9.332031 L 14.339844 10.082031 L 13.835938 10.082031 C 13.613281 10.082031 13.402344 10.167969 13.246094 10.324219 Z M 12.730469 15.457031 C 12.742188 15.496094 12.734375 15.535156 12.707031 15.570312 C 12.683594 15.601562 12.644531 15.617188 12.605469 15.617188 L 11.402344 15.617188 C 11.363281 15.617188 11.324219 15.601562 11.300781 15.566406 C 11.273438 15.535156 11.265625 15.496094 11.277344 15.457031 L 11.507812 13.785156 C 11.507812 13.761719 11.503906 13.738281 11.496094 13.714844 C 11.476562 13.683594 11.453125 13.660156 11.421875 13.636719 C 11.417969 13.632812 11.417969 13.632812 11.414062 13.628906 C 11.070312 13.375 10.925781 12.933594 11.058594 12.527344 C 11.191406 12.121094 11.566406 11.84375 11.992188 11.839844 C 12.421875 11.839844 12.800781 12.109375 12.9375 12.515625 C 13.074219 12.917969 12.9375 13.367188 12.59375 13.621094 C 12.59375 13.625 12.59375 13.628906 12.582031 13.636719 C 12.550781 13.660156 12.527344 13.683594 12.507812 13.714844 C 12.503906 13.722656 12.5 13.734375 12.5 13.746094 Z M 12.730469 15.457031 Z"},{name:"rakutentv",path:"M6.886 1.2781V1.4302C6.6426 1.2781 6.4448 1.1868 6.1405 1.1868 5.2429 1.1868 4.5734 1.9931 4.5734 2.9973 4.5734 4.0015 5.258 4.8079 6.1405 4.8079 6.4296 4.8079 6.6426 4.7166 6.886 4.5644V4.7166H7.662V1.2781H6.886ZM6.1405 3.9863C5.6993 3.9863 5.3797 3.5603 5.3797 3.0125 5.3797 2.4648 5.6993 2.0388 6.1405 2.0388 6.5817 2.0388 6.886 2.4648 6.886 3.0125 6.9013 3.545 6.5817 3.9863 6.1405 3.9863ZM13.1545 1.2781V3.3016C13.1545 3.682 12.8958 4.0015 12.5155 4.0015 12.1351 4.0015 11.8764 3.682 11.8764 3.3016V1.2781H11.0853V3.3016C11.0853 4.1384 11.6483 4.8079 12.4851 4.8079 12.8654 4.8079 13.1545 4.5949 13.1545 4.5949V4.7166H13.9305V1.2781H13.1545ZM20.4576 4.7318V2.693C20.4576 2.3126 20.7163 1.9931 21.0966 1.9931 21.477 1.9931 21.7357 2.3126 21.7357 2.693V4.7166H22.5268V2.693C22.5268 1.8562 21.9638 1.1868 21.127 1.1868 20.7467 1.1868 20.4576 1.3998 20.4576 1.3998V1.2781H19.6816V4.7318H20.4576ZM2.3216 4.7318V3.3929H2.8998L3.9039 4.7318H4.9233L3.7061 3.119C4.0865 2.8452 4.3299 2.4039 4.3299 1.9018 4.3299 1.0803 3.6605.4108 2.8389.4108H1.5V4.7166H2.3216ZM2.3216 1.2324H2.8541C3.2192 1.2324 3.5235 1.5367 3.5235 1.9018 3.5235 2.267 3.2192 2.5713 2.8541 2.5713H2.3216V1.2324ZM16.0606 3.9102C15.9844 3.9559 15.9084 4.0015 15.8019 4.0015 15.6802 4.0015 15.4367 3.9102 15.4367 3.5755V2.0996H16.1061V1.2781H15.4367L15.4367.4108H14.6608L14.6608 1.2781H14.2499V2.0996H14.6608V3.5907C14.6608 4.3666 15.2389 4.8231 15.8323 4.8231 16.0453 4.8231 16.3496 4.747 16.593 4.61L16.0606 3.9102ZM9.6095 2.8908 10.9636 1.2781 9.8682 1.2781 8.9248 2.48 8.9248.137 8.1184.137 8.1184 4.7318 8.9248 4.7318 8.9248 3.3168 10.0812 4.7318 11.1766 4.7318M17.8711 1.1868C16.9582 1.1868 16.3191 1.9779 16.3191 2.9973 16.3191 4.0623 17.1408 4.8079 17.9472 4.8079 18.3579 4.8079 18.8905 4.6709 19.3317 4.0319L18.6471 3.6363C18.1145 4.4275 17.2168 4.0319 17.1104 3.2408L19.3622 3.2408C19.5599 2.0084 18.7535 1.1868 17.8711 1.1868ZM18.5558 2.5561H17.1408C17.3081 1.7497 18.4036 1.7041 18.5558 2.5561ZM5.8822 5.221 6.858 6.2007 18.1252 5.221 5.8822 5.221ZM10.0372 12.0377C9.9862 11.5775 9.9862 11.373 10.3439 11.1686 10.5996 11.0152 11.8776 10.2484 14.2803 9.5327 14.587 9.4305 14.8427 9.4816 14.9959 9.6861 15.1493 9.8905 15.2005 10.1973 15.0982 10.4529 14.8937 10.9641 14.8427 11.373 15.0471 11.5775 15.2516 11.7309 15.4561 11.782 16.0695 11.4753 16.8875 11.0664 17.8077 9.9928 17.7565 8.2547 17.7565 7.6412 17.5009 7.1812 17.092 6.8744 16.683 6.6188 16.1206 6.5165 15.5583 6.5165 14.0246 6.5165 13.2578 6.8744 11.2641 7.6412 8.4524 8.6637 4.9251 9.7883 2.9825 10.2995 2.1646 10.504 1.5 11.0664 1.5 11.8843 1.5 13.1623 3.0336 13.5202 4.1072 13.1623 4.3117 13.1112 6.5099 12.2932 7.2767 12.191 7.379 12.191 7.4301 12.2421 7.4301 12.2932 7.4301 12.3955 7.4812 13.5202 7.5322 13.9802 7.6346 16.0762 7.7879 20.1659 7.7879 20.4215 7.839 20.9839 7.839 22.6709 8.7592 22.6709 9.6283 22.6709 10.0372 21.7507 10.2417 20.4215M21.5906 8.6637C20.4149 8.6637 19.3413 10.8107 18.5233 12.7022 17.5009 15.1049 16.9386 17.252 16.6318 17.9677 16.3763 17.252 15.6605 15.2072 15.3027 14.4915 14.6893 13.2134 14.0758 12.2421 13.2578 12.2421 12.7978 12.2421 12.2866 12.4977 12.2866 13.3157 12.2866 13.878 12.5421 14.5937 12.7978 15.2583 12.9 15.4628 14.4336 19.2457 14.6382 19.9614 14.6382 19.9614 15.405 22.2619 15.4561 22.4664 15.9161 23.8466 16.3252 24 16.6318 24 17.092 24 17.7565 23.7955 18.0633 22.4152 18.2677 21.5462 18.5745 20.5237 18.8301 19.6547 19.2901 18.1722 20.4149 15.3094 21.1817 13.5713 21.7951 12.191 22.5108 10.5551 22.5108 9.5327 22.5108 9.1748 22.3063 8.6637 21.5906 8.6637Z"},{name:"rakutenviki",path:"M7.5496 3.24 7.5496 8.2824 8.47 8.2824 8.47 6.7261 9.7889 8.2824 11.0422 8.2824 9.2623 6.2699 10.7968 4.4964 9.5435 4.4964 8.47 5.8152 8.47 3.24 7.5496 3.24zM.0007 3.5526.0007 8.2824C0 8.2832.9349 8.2824.9349 8.2824L.9349 6.8167 1.5961 6.8167 2.7414 8.2824 3.9133 8.2824 2.529 6.5136C2.9602 6.216 3.2447 5.7319 3.2447 5.1839 3.2447 4.2838 2.4838 3.5526 1.5461 3.5526L.0007 3.5526zM14.9986 3.5526 14.9986 4.4948 14.5252 4.4948 14.5252 5.3933 14.9986 5.3933 14.9986 7.0278C14.9986 7.8734 15.6612 8.3778 16.3284 8.3778 16.5772 8.3778 16.9228 8.2987 17.2033 8.1385L16.6127 7.3872C16.5326 7.4393 16.4311 7.4795 16.3144 7.4795 16.168 7.4795 15.8924 7.3722 15.8924 7.0153L15.8924 5.395 16.658 5.395 16.658 4.4964 15.8924 4.4964 15.8924 3.5526 14.9986 3.5526zM18.6786 4.3994C17.6434 4.3994 16.902 5.2726 16.902 6.3886 16.902 7.5614 17.8339 8.3792 18.7675 8.3792 19.2396 8.3792 19.844 8.2238 20.3521 7.531L19.5614 7.0933C18.9509 7.9582 17.9335 7.5202 17.8158 6.6542L20.3911 6.6542C20.6105 5.2943 19.6972 4.3994 18.6786 4.3994zM5.3027 4.4026C4.2848 4.4026 3.5134 5.295 3.5134 6.3902 3.5134 7.4848 4.2857 8.3762 5.3027 8.3762 5.633 8.3762 5.8751 8.2793 6.1448 8.1138L6.1448 8.2824 7.0402 8.2824 7.0402 4.4948C7.0402 4.4964 6.1448 4.4964 6.1448 4.4964L6.1448 4.6651C5.8751 4.5004 5.6339 4.4026 5.3027 4.4026zM22.4006 4.4026C21.9607 4.4026 21.6413 4.6354 21.6413 4.6354L21.6413 4.4964 20.7458 4.4964 20.7458 8.2824C20.7458 8.2832 21.6413 8.2824 21.6413 8.2824L21.6413 6.0574C21.6413 5.6406 21.9396 5.2885 22.3741 5.2885 22.8078 5.2885 23.107 5.6406 23.107 6.0574L23.107 8.2824 24.0008 8.2824 24.0008 6.0574C24.0008 5.1445 23.3503 4.4026 22.4006 4.4026zM.9349 4.451 1.5444 4.451C1.9645 4.451 2.3086 4.7797 2.3086 5.1839 2.3086 5.5895 1.9645 5.9184 1.5444 5.9184L.9349 5.9184.9349 4.451zM10.9483 4.4964 10.9483 6.7214C10.9483 7.6345 11.5987 8.3778 12.5484 8.3778 12.9883 8.3778 13.3079 8.1433 13.3079 8.1433L13.3079 8.2841 14.2031 8.2841 14.2031 4.4964 13.3079 4.4964 13.3079 6.7214C13.3079 7.1384 13.0093 7.4921 12.575 7.4921 12.1414 7.4921 11.842 7.1384 11.842 6.7214L11.842 4.4964 10.9483 4.4964zM18.6596 5.2166C19.0172 5.2103 19.3727 5.4323 19.4599 5.9011L17.8488 5.9011C17.9428 5.458 18.3022 5.2231 18.6596 5.2166zM5.3027 5.3152C5.8042 5.3152 6.159 5.7901 6.159 6.3902 6.1582 6.9894 5.8042 7.4639 5.3027 7.4639 4.801 7.4639 4.4338 6.9901 4.4338 6.3902 4.4338 5.791 4.801 5.3152 5.3027 5.3152zM4.9933 9.3108 6.1559 10.478 19.5787 9.3108 4.9933 9.3108zM-.001 12.4141 3.2604 20.8412 5.262 20.8412 8.4857 12.4141 5.9543 12.4141 4.2604 17.9332 2.5432 12.4141-.001 12.4141zM9.2935 12.4141 9.2935 20.8412 11.703 20.8412 11.703 12.4141 9.2935 12.4141zM13.0687 12.4141 13.0687 20.8412 15.4783 20.8412 15.4783 18.4082 16.1441 17.7426 18.3176 20.8412 21.085 20.8412 17.677 16.1878 20.8631 12.4141 18.1458 12.4141 15.4783 15.619 15.4783 12.4141 13.0687 12.4141zM21.5912 12.4141 21.5912 20.8412 24.0008 20.8412 24.0008 12.4141 21.5912 12.4141z"},{name:"showtime",path:"M12 0C8.3317 0 5.0504 1.6476 2.8492 4.2412 3.1847 4.2547 3.4606 4.3319 3.4606 4.3319 6.2608 5.0435 6.2609 7.956 6.2609 8.8696L3.6522 8.8696C3.6522 8.8696 3.6522 6.7826 2.3478 6.7826 2.0551 6.7826 1.8376 6.892 1.6712 7.0282 1.5982 7.0882 1.4345 7.2822 1.3594 7.5754 1.2096 8.1639 1.2172 9.169 2.3478 10.1739 3.8337 11.4944 6.7826 12.7174 6.7826 15.8478 6.7826 18.277 5.0607 19.5718 3.5717 19.7894 3.5717 19.7894 3.3445 19.8327 2.9266 19.8536 5.1273 22.3934 8.376 24 12 24 15.6464 24 18.9094 22.3696 21.1101 19.8026 18.6485 19.558 16.6957 16.1635 16.6957 12 16.6957 7.8365 18.6485 4.442 21.1101 4.1974 18.9094 1.6304 15.6464 0 12 0zM7.8261 4.6957 10.4348 4.6957 10.4348 10.6957 13.0435 10.6957 13.0435 4.6957 15.6522 4.6957 15.6522 19.8261 13.0435 19.8261 13.0435 13.3043 10.4348 13.3043 10.4348 19.8261 7.8261 19.8261 7.8261 4.6957zM21.6522 6.7826A5.2174 2.3478 90 0019.3043 12 5.2174 2.3478 90 0021.6522 17.2174 5.2174 2.3478 90 0024 12 5.2174 2.3478 90 0021.6522 6.7826zM.0061 11.2174C.0061 11.2174-.0288 13.6831.373 14.8696.9693 16.6304 1.6394 17.2174 2.7575 17.2174 3.5771 17.2174 4.1739 16.6957 4.1739 15.587 4.1739 14.3463 2.6362 13.6105 1.5734 12.8071.5701 12.049.0061 11.2174.0061 11.2174z"},{name:"starplus",path:"m10.9 8.58l-.79 2.399H7.601l2.002 1.472s.989-.637 2.199-.879c-1.76 1.298-2.729 2.596-2.729 2.596l-.219.682l2.045-1.473l2.026 1.473l-.772-2.399l2.047-1.472h-2.53zm-8.14.748c-.902 0-1.563.593-1.563 1.385c0 .55.265.969.881 1.299l.703.351c.396.176.573.331.573.617c0 .309-.243.528-.573.528c-.352 0-.658-.199-.812-.639L1 13.156c.22.814.901 1.3 1.781 1.3c.946 0 1.674-.617 1.674-1.476c0-.682-.374-1.121-1.078-1.43l-.66-.33c-.33-.131-.442-.31-.442-.507c0-.242.2-.44.53-.44c.286 0 .506.156.66.53l.924-.418c-.264-.66-.793-1.057-1.63-1.057zm11.728.067v4.972h1.078v-1.98l1.342 1.98h1.233l-1.409-1.98c.682-.088 1.254-.705 1.254-1.453c0-.99-.66-1.54-1.76-1.54zm-9.75.007v.979h1.098v3.994h1.098v-3.994h1.08v-.979zm15.586.534v1.537H18.73v1.02h1.594v1.525h1.07v-1.526H23v-1.02h-1.605V9.937zm-4.758.404h.66c.419 0 .682.22.682.572c0 .396-.263.66-.681.66h-.66z"},{name:"stremio",path:"M12.6527.2686 12.6527.2686 23.7314 11.3473C23.9035 11.5209 24 11.7556 24 12 24 12.2445 23.9035 12.479 23.7314 12.6527L12.6527 23.7314C12.479 23.9035 12.2445 24 12 24 11.7556 24 11.5209 23.9035 11.3473 23.7314L.2686 12.6527C.0965 12.479 0 12.2445 0 12 0 11.7556.0965 11.5209.2686 11.3473L11.3473.2686C11.5209.0965 11.7556 0 12 0 12.2445 0 12.479.0965 12.6527.2686M16.1357 12.543C16.2199 12.4849 16.2888 12.4072 16.3363 12.3167 16.3838 12.2261 16.4087 12.1254 16.4087 12.0231 16.4087 11.9208 16.3838 11.8201 16.3363 11.7295 16.2888 11.6389 16.2199 11.5613 16.1357 11.5033L11.2549 8.0895C11.1597 8.0228 11.0482 7.9835 10.9322 7.9758 10.8163 7.9681 10.7005 7.9924 10.5974 8.046 10.4943 8.0997 10.4079 8.1806 10.3477 8.2799 10.2874 8.3792 10.2555 8.4932 10.2556 8.6094V15.4368C10.2555 15.553 10.2874 15.6669 10.3477 15.7663 10.4079 15.8657 10.4943 15.9465 10.5974 16.0001 10.7005 16.0538 10.8163 16.0781 10.9322 16.0704 11.0482 16.0627 11.1597 16.0234 11.2549 15.9567L16.1357 12.543Z"},{name:"surfshark",path:"M 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 Z M 24 12M 16.546875 8.351562 L 16.546875 8.34375 C 16.539062 8.242188 16.53125 8.125 16.527344 8 C 16.511719 7.765625 16.496094 7.515625 16.480469 7.320312 C 16.457031 7.1875 16.425781 7.070312 16.386719 6.960938 C 16.148438 6.429688 15.683594 6.175781 15.191406 6.054688 C 14.964844 6.015625 14.691406 6.007812 14.398438 6 L 11.570312 6 C 9.75 6.097656 8.984375 7.152344 8.78125 7.714844 C 7.984375 10.097656 7.484375 13.1875 7.128906 15.414062 C 7.121094 15.460938 7.113281 15.5 7.105469 15.542969 L 6.988281 16.601562 C 6.980469 16.769531 7 16.953125 7.042969 17.128906 C 7.265625 17.773438 7.941406 18.320312 9.425781 17.777344 C 10.832031 17.167969 12.488281 16.410156 14.199219 15.558594 C 15.175781 14.996094 16.605469 13.703125 16.679688 12.066406 C 16.667969 10.859375 16.628906 9.589844 16.546875 8.351562 Z M 14.289062 9.246094 C 14.289062 9.386719 14.175781 9.5 14.035156 9.5 C 13.183594 9.5 12.496094 10.191406 12.496094 11.039062 L 12.496094 11.980469 C 12.496094 13.5625 11.214844 14.84375 9.636719 14.84375 C 9.496094 14.84375 9.386719 14.730469 9.386719 14.59375 L 9.386719 13.8125 C 9.386719 13.671875 9.5 13.558594 9.640625 13.558594 C 10.492188 13.558594 11.179688 12.871094 11.179688 12.019531 L 11.179688 11.078125 C 11.179688 9.5 12.460938 8.21875 14.042969 8.21875 C 14.179688 8.21875 14.289062 8.328125 14.289062 8.464844 Z M 14.289062 9.246094 Z"},{name:"tv2play",path:"M 2.26,9.74 C 2.26,8.33 2.48,7.12 3.04,5.81 3.42,4.92 3.95,4.09 4.58,3.36 7.90,-0.52 13.66,-1.11 17.76,1.86 19.66,3.24 21.11,5.51 21.53,7.82 21.78,9.18 21.70,10.58 21.70,11.95 21.70,11.95 16.75,11.95 16.75,11.95 16.75,11.09 16.80,9.74 16.69,8.93 16.53,7.78 15.86,6.48 14.98,5.73 14.49,5.33 13.99,5.01 13.39,4.80 12.95,4.65 12.37,4.55 11.90,4.56 9.18,4.59 7.20,7.15 7.20,9.74 7.20,9.74 2.26,9.74 2.26,9.74 Z M 2.26,24.00 C 2.26,24.00 2.26,19.73 2.26,19.73 2.26,19.63 2.25,19.49 2.28,19.39 2.33,19.26 2.48,19.12 2.57,19.01 2.57,19.01 3.28,18.19 3.28,18.19 3.28,18.19 6.42,14.59 6.42,14.59 6.42,14.59 8.14,12.62 8.14,12.62 8.29,12.45 8.64,12.00 8.83,11.93 8.92,11.90 9.07,11.90 9.17,11.90 9.17,11.90 15.17,11.90 15.17,11.90 15.17,11.90 14.27,12.96 14.27,12.96 14.27,12.96 12.30,15.22 12.30,15.22 12.30,15.22 10.00,17.86 10.00,17.86 10.00,17.86 8.64,19.39 8.64,19.39 8.64,19.39 21.70,19.39 21.70,19.39 21.70,19.39 21.70,24.00 21.70,24.00 21.70,24.00 2.26,24.00 2.26,24.00 Z"},{name:"viaplay",path:"M1.2766 6.6383C.4742 8.2432 0 10.0669 0 11.9999 0 13.9331.4742 15.7568 1.2766 17.3617L11.9999 11.9999ZM11.9999 0C9.0456 0 6.3465 1.0577 4.231 2.845L16.7781 9.5927V14.4073L4.231 21.155C6.31 22.9422 9.0456 24 11.9999 24 18.6383 24 24 18.6383 24 11.9999 24 5.3617 18.6383 0 11.9999 0Z"},{name:"videoland",path:"M12 23.7692 24 3 17.0433 3 12 12.6586 6.9567 3 0 3ZM12 23.7692 Z"},{name:"vudu",path:"M 6.0971 6.9926 L 5.0469 6.9926 C 4.8725 6.9963 4.7129 7.1039 4.6535 7.2709 C 4.6535 7.282 4.6535 7.2895 4.6535 7.3006 C 4.2602 8.4324 3.915 9.4047 3.518 10.5365 C 3.4141 10.8371 3.3102 11.134 3.1914 11.4346 C 3.184 11.4605 3.1654 11.4828 3.1395 11.4939 C 3.0949 11.4939 3.0949 11.4605 3.0838 11.4309 C 2.8389 10.7221 2.5939 10.017 2.3416 9.3119 L 1.6217 7.2561 C 1.6254 7.2486 1.6254 7.2412 1.6217 7.2338 C 1.5475 7.0854 1.399 6.9926 1.2357 6.9926 L 0.1707 6.9926 C 0.0854 6.9852 0.0111 7.0482 0 7.1336 C -0.0037 7.1633 0.0037 7.193 0.0148 7.2189 C 0.6271 8.9297 1.2357 10.6404 1.8443 12.3475 L 1.9705 12.7 C 2.1486 13.2195 2.6348 13.5646 3.1803 13.5609 L 3.3213 13.5609 C 3.5551 13.5498 3.7889 13.5201 4.0227 13.4682 L 4.4531 12.2287 L 6.2566 7.2301 C 6.2641 7.2078 6.2678 7.1893 6.2752 7.1707 C 6.2863 7.0854 6.227 7.0037 6.1416 6.9926 C 6.1268 6.9926 6.1156 6.9926 6.1008 6.9926 M 11.9418 7.4416 C 11.9418 7.2152 11.7674 7.0297 11.5447 7.0111 L 10.4574 7.0111 L 10.4574 7.6123 C 10.4574 8.7441 10.4574 9.7498 10.4574 10.8854 C 10.4611 11.0004 10.45 11.1154 10.424 11.2268 C 10.3424 11.635 10.0455 11.9578 9.6484 12.0729 C 9.0436 12.2695 8.3904 11.9393 8.1937 11.3307 C 8.1566 11.2119 8.1381 11.0895 8.1381 10.967 C 8.1381 10.184 8.1381 8.5104 8.1381 7.6049 L 8.1381 7 C 8.1381 7 7.0545 7 7.0471 7 C 6.8244 7.0148 6.65 7.2041 6.65 7.4268 L 6.65 7.6457 C 6.65 8.8221 6.65 9.8314 6.65 11.0301 C 6.6574 12.4773 7.8301 13.6426 9.2699 13.6314 C 9.4406 13.6314 9.6076 13.6129 9.7746 13.5795 C 10.4203 13.4719 11.0029 13.1193 11.4037 12.5998 C 11.7451 12.1693 11.9344 11.6387 11.9418 11.0857 C 11.9418 10.4586 11.9418 9.8314 11.9418 9.2006 Z M 11.9418 7.4416 M 23.75 7.4416 C 23.75 7.2189 23.5793 7.0297 23.3566 7.0111 L 22.2656 7.0111 L 22.2656 7.6123 C 22.2656 8.7441 22.2656 9.7498 22.2656 10.8854 C 22.2656 11.0004 22.2545 11.1154 22.2285 11.2268 C 22.1506 11.6312 21.85 11.9578 21.4529 12.0729 C 20.8518 12.2732 20.2023 11.943 20.002 11.3381 C 19.9611 11.2193 19.9426 11.0932 19.9426 10.967 C 19.9426 10.184 19.9426 8.5104 19.9426 7.6049 L 19.9426 7 C 19.9426 7 18.8627 7 18.8479 7 C 18.6289 7.0186 18.4582 7.2041 18.4545 7.4268 L 18.4545 7.6457 C 18.4545 8.8221 18.4545 9.8314 18.4545 11.0301 C 18.4656 12.4773 19.6383 13.6426 21.0744 13.6314 C 21.2451 13.6314 21.4158 13.6129 21.5828 13.5795 C 22.2285 13.4719 22.8074 13.1193 23.2082 12.5998 C 23.5533 12.1693 23.7426 11.6387 23.7463 11.0857 C 23.7463 10.4586 23.7463 9.8314 23.7463 9.2006 L 23.7463 7.4416 Z M 23.75 7.4416 M 16.1352 11.5385 C 15.8457 11.8873 15.4338 12.1062 14.9885 12.1471 C 14.8994 12.1508 14.8104 12.1508 14.7213 12.1471 L 13.9531 12.1471 C 13.8604 12.1471 13.8566 12.1471 13.8566 12.0506 L 13.8566 8.4584 C 13.8566 8.373 13.8566 8.373 13.942 8.373 C 14.2686 8.373 14.5691 8.373 14.8809 8.373 C 15.4375 8.3916 15.9496 8.6811 16.2539 9.1486 C 16.4506 9.4381 16.5656 9.7795 16.5805 10.132 C 16.6213 10.6404 16.4617 11.1451 16.1352 11.5385 M 16.5693 7.4898 C 16.1018 7.1893 15.56 7.0223 15.0033 7.0074 C 14.7436 7.0074 14.4875 7.0074 14.224 7.0074 L 12.8473 7.0074 C 12.6098 7.0074 12.4205 7.2004 12.4205 7.4379 L 12.4205 13.1156 C 12.4205 13.3531 12.6098 13.5461 12.8473 13.5461 L 14.9143 13.5461 C 15.0701 13.5461 15.226 13.5313 15.3818 13.5016 C 16.0053 13.4088 16.5842 13.1305 17.0443 12.7037 C 17.9016 11.9541 18.2912 10.8 18.0686 9.6793 C 17.9127 8.7701 17.3672 7.976 16.5805 7.5047 M 19.0334 14.4293 C 18.4656 14.4553 18.024 14.9451 18.0463 15.5166 C 18.0686 16.0881 18.5473 16.5297 19.115 16.5074 C 19.6717 16.4852 20.1096 16.025 20.1021 15.4646 C 20.1133 14.9117 19.6791 14.4479 19.1262 14.4293 L 19.0334 14.4293 M 19.616 15.5092 C 19.6049 15.6354 19.5492 15.7578 19.4639 15.8506 L 19.4342 15.8803 C 19.1967 16.1029 18.8256 16.0918 18.6029 15.8543 C 18.3803 15.6205 18.3914 15.2457 18.6289 15.023 C 18.8627 14.8004 19.2338 14.8115 19.4564 15.049 C 19.4564 15.049 19.4564 15.049 19.4602 15.049 C 19.5529 15.1492 19.6086 15.2791 19.616 15.4164 Z M 19.616 15.5092 M 16.818 15.3199 L 16.818 15.7727 L 17.2633 15.7727 L 17.2633 15.9285 C 17.1557 16.0102 17.0295 16.051 16.8959 16.051 C 16.6027 16.0621 16.3541 15.832 16.343 15.5352 C 16.3393 15.5129 16.3393 15.4906 16.343 15.4721 C 16.3207 15.1752 16.5396 14.9154 16.8365 14.8932 L 16.8959 14.8932 C 17.0703 14.8969 17.2299 14.9934 17.3152 15.1455 L 17.7457 14.9229 C 17.575 14.6111 17.2484 14.4256 16.8959 14.4367 C 16.3281 14.4219 15.8568 14.8746 15.842 15.4424 C 15.8271 15.9953 16.2428 16.4629 16.792 16.5037 L 16.8959 16.5037 C 17.1965 16.5037 17.4859 16.3887 17.7012 16.1734 C 17.7346 16.14 17.7568 16.0881 17.7605 16.0361 L 17.7605 15.3199 Z M 16.818 15.3199 M 15.3187 14.485 L 15.2779 14.485 C 15.1666 14.4924 15.0812 14.5852 15.0775 14.6965 L 15.0775 15.5797 L 14.276 14.485 L 13.7416 14.485 L 13.7416 16.4777 L 14.2537 16.4777 L 14.2537 15.3311 L 15.0924 16.4777 L 15.5822 16.4777 L 15.5822 14.485 Z M 15.3187 14.485 M 12.8139 14.485 L 12.1607 14.485 L 11.4111 16.4814 L 11.9937 16.4814 L 12.0939 16.192 L 12.8732 16.192 L 12.9252 16.3404 C 12.9586 16.4221 13.0328 16.474 13.1182 16.4777 L 13.5561 16.4777 Z M 12.2387 15.743 L 12.491 14.9896 L 12.7396 15.743 Z M 12.2387 15.743 M 10.3943 14.485 L 9.5557 14.485 L 9.5557 16.2699 C 9.5631 16.385 9.6559 16.4777 9.7709 16.4814 L 10.3943 16.4814 C 10.9398 16.5111 11.4111 16.0918 11.4408 15.5389 C 11.4742 14.9896 11.0549 14.5184 10.5057 14.485 C 10.4686 14.485 10.4314 14.485 10.3943 14.485 M 10.3943 16.0361 L 10.0678 16.0361 L 10.0678 14.9229 L 10.3943 14.9229 C 10.6764 14.908 10.9139 15.1232 10.9324 15.4053 L 10.9324 15.4646 C 10.9324 15.7615 10.6912 16.0361 10.398 16.0361 C 10.3943 16.0361 10.398 16.0324 10.398 16.0324 L 10.4018 16.0287 M 8.9063 14.485 C 8.7949 14.4887 8.7021 14.5777 8.6984 14.6891 L 8.6984 15.5797 L 7.8783 14.485 L 7.3439 14.485 L 7.3439 16.4777 L 7.8523 16.4777 L 7.8523 15.3311 L 8.6947 16.4852 L 9.1883 16.4852 L 9.1883 14.485 Z M 8.9063 14.485 M 6.4311 14.485 L 5.7779 14.485 L 5.032 16.4777 L 5.6258 16.4777 L 5.726 16.1883 L 6.5127 16.1883 L 6.5646 16.3404 C 6.598 16.4184 6.6723 16.4703 6.7576 16.4777 L 7.1918 16.4777 Z M 5.8559 15.743 L 6.1119 14.9896 L 6.3605 15.743 Z M 5.8559 15.743 M 5.2213 14.908 L 5.2213 14.459 L 3.6961 14.459 L 3.6961 16.448 L 4.2342 16.448 L 4.2342 15.7578 L 4.7686 15.7578 C 4.865 15.7467 4.9355 15.6687 4.943 15.5723 L 4.943 15.3051 L 4.2416 15.3051 L 4.2416 14.908 Z M 5.2213 14.908 M 0.3971 15.3941 L 3.2471 15.3941 L 3.2471 15.55 L 0.3971 15.55 Z M 0.3971 15.3941 M 20.5549 15.3941 L 23.4049 15.3941 L 23.4049 15.55 L 20.5549 15.55 Z M 20.5549 15.3941 Z"},{name:"waiputv",path:"M 10.087,7.672 10.009,7.801 V 7.863 A 3.161,3.161 0 0 0 9.786,9.016 v 4.67 a 3.064,3.064 0 0 0 0.375,1.46 c 0.034,0.061 0.07,0.119 0.107,0.177 a 2.8,2.8 0 0 0 1.33,1.093 l 0.175,0.069 a 2.766,2.766 0 0 0 2.323,-0.247 l 3.841,-2.3 a 2.952,2.952 0 0 0 0.347,-0.242 2.827,2.827 0 0 0 0.772,-0.977 l 0.065,-0.136 v -0.017 a 3.126,3.126 0 0 0 0.236,-1.177 V 6.716 A 3.074,3.074 0 0 0 18.983,5.257 2.833,2.833 0 0 0 17.545,3.976 L 17.372,3.908 a 2.917,2.917 0 0 0 -0.888,-0.149 0.485,0.485 0 0 0 -0.093,0.006 2.865,2.865 0 0 0 -1.344,0.39 l -0.948,0.567 v 0 l -2.891,1.73 a 2.842,2.842 0 0 0 -1.121,1.22 z m 5.3,-2.953 a 2.2,2.2 0 0 1 1.1,-0.3 2.235,2.235 0 0 1 0.683,0.116 0.04,0.04 0 0 0 0.027,0.014 2.193,2.193 0 0 1 1.21,1.026 2.407,2.407 0 0 1 0.293,1.141 v 4.671 a 2.435,2.435 0 0 1 -0.223,1.012 0.054,0.054 0 0 0 -0.014,0.043 2.2,2.2 0 0 1 -0.863,0.939 l -3.842,2.3 a 2.115,2.115 0 0 1 -1.782,0.187 0.042,0.042 0 0 0 -0.027,-0.014 2.182,2.182 0 0 1 -1.21,-1.026 2.4,2.4 0 0 1 -0.293,-1.143 V 9.016 A 2.442,2.442 0 0 1 10.667,8 c 0,-0.015 0.014,-0.015 0.014,-0.043 A 2.2,2.2 0 0 1 11.544,7.018 Z M 9.565,14.933 A 3.05,3.05 0 0 1 9.19,13.473 V 8.8 A 3.119,3.119 0 0 1 9.413,7.652 V 7.593 L 9.491,7.464 A 2.846,2.846 0 0 1 10.61,6.245 L 13.5,4.516 A 2.5,2.5 0 0 0 12.434,3.659 C 12.364,3.629 12.292,3.602 12.219,3.578 A 0.038,0.038 0 0 1 12.188,3.562 H 12.17 A 2.573,2.573 0 0 0 11.392,3.433 2.653,2.653 0 0 0 10.11,3.77 L 5.635,6.322 A 2.486,2.486 0 0 0 4.629,7.365 v 0.016 c 0,0.015 -0.015,0.015 -0.015,0.031 A 2.609,2.609 0 0 0 4.353,8.536 v 5.189 a 2.547,2.547 0 0 0 0.347,1.269 2.518,2.518 0 0 0 1.411,1.14 0.047,0.047 0 0 1 0.031,0.016 h 0.016 a 2.535,2.535 0 0 0 0.777,0.128 2.641,2.641 0 0 0 1.282,-0.336 L 9.677,15.11 A 1.924,1.924 0 0 1 9.565,14.933 Z m 7.5,2.467 -0.047,-0.018 A 0.8,0.8 0 0 0 16.776,17.341 H 16.75 a 0.773,0.773 0 0 0 -0.366,0.106 l -0.258,0.155 v 0 l -0.788,0.471 a 0.785,0.785 0 0 0 -0.3,0.333 l -0.021,0.035 v 0.017 a 0.863,0.863 0 0 0 -0.061,0.313 v 1.272 a 0.833,0.833 0 0 0 0.1,0.4 c 0.01,0.017 0.019,0.033 0.03,0.049 a 0.757,0.757 0 0 0 0.361,0.3 l 0.047,0.019 a 0.8,0.8 0 0 0 0.242,0.04 0.783,0.783 0 0 0 0.392,-0.108 l 1.047,-0.626 a 0.664,0.664 0 0 0 0.094,-0.066 0.781,0.781 0 0 0 0.211,-0.266 l 0.017,-0.038 v -0.006 a 0.855,0.855 0 0 0 0.065,-0.32 v -1.274 a 0.847,0.847 0 0 0 -0.1,-0.4 0.779,0.779 0 0 0 -0.396,-0.347 z m 0.314,2.02 a 0.668,0.668 0 0 1 -0.061,0.275 v 0.012 a 0.6,0.6 0 0 1 -0.235,0.256 l -1.047,0.626 A 0.573,0.573 0 0 1 15.55,20.64 h -0.007 a 0.6,0.6 0 0 1 -0.33,-0.28 0.652,0.652 0 0 1 -0.08,-0.312 V 18.772 A 0.656,0.656 0 0 1 15.2,18.5 v -0.012 a 0.6,0.6 0 0 1 0.235,-0.256 l 1.047,-0.626 a 0.607,0.607 0 0 1 0.3,-0.083 0.621,0.621 0 0 1 0.186,0.032 h 0.007 a 0.6,0.6 0 0 1 0.33,0.279 0.667,0.667 0 0 1 0.08,0.312 z m -2.591,0.569 v -1.273 a 0.841,0.841 0 0 1 0.06,-0.313 v -0.017 l 0.022,-0.035 a 0.77,0.77 0 0 1 0.3,-0.332 l 0.788,-0.472 A 0.694,0.694 0 0 0 15.667,17.313 L 15.609,17.291 H 15.6 a 0.73,0.73 0 0 0 -0.212,-0.035 0.722,0.722 0 0 0 -0.349,0.092 l -1.221,0.7 a 0.67,0.67 0 0 0 -0.274,0.284 v 0 l -0.005,0.009 a 0.722,0.722 0 0 0 -0.071,0.306 v 1.414 a 0.691,0.691 0 0 0 0.478,0.657 h 0.009 a 0.664,0.664 0 0 0 0.212,0.035 0.724,0.724 0 0 0 0.349,-0.091 l 0.4,-0.227 c -0.01,-0.016 -0.02,-0.032 -0.029,-0.048 a 0.837,0.837 0 0 1 -0.098,-0.398 z m 4.768,-0.361 H 19.52 a 0.253,0.253 0 0 1 -0.173,-0.045 0.182,0.182 0 0 1 -0.05,-0.147 V 18.4 h 0.243 a 0.22,0.22 0 0 0 0,-0.44 H 19.3 v -0.284 a 0.24,0.24 0 0 0 -0.48,0 v 0 0.287 h -0.242 a 0.22,0.22 0 0 0 0,0.44 h 0.242 v 1.035 a 0.616,0.616 0 0 0 0.176,0.494 0.76,0.76 0 0 0 0.5,0.149 h 0.063 a 0.226,0.226 0 0 0 0,-0.451 z M 21.979,18.3 A 0.24911945,0.24911945 0 0 0 21.518,18.111 L 21.036,19.37 20.555,18.114 V 18.107 A 0.25,0.25 0 0 0 20.094,18.3 l 0.675,1.591 a 0.3,0.3 0 0 0 0.159,0.16 0.294,0.294 0 0 0 0.382,-0.159 l 0.673,-1.6 z M 18.1,19.58 a 0.25,0.25 0 0 0 0,0.5 v 0 a 0.25,0.25 0 0 0 0,-0.5 z M 6.9,17.959 A 0.238,0.238 0 0 0 6.662,18.196 V 18.31 A 0.744,0.744 0 0 0 5.99,17.957 v 0 a 1.06,1.06 0 0 0 0,2.118 0.744,0.744 0 0 0 0.672,-0.349 v 0.113 A 0.237,0.237 0 0 0 6.88,20.075 H 6.92 A 0.237,0.237 0 0 0 7.137,19.839 V 18.185 A 0.238,0.238 0 0 0 6.9,17.959 Z m -0.311,1.357 a 0.565,0.565 0 0 1 -0.531,0.32 0.6,0.6 0 0 1 -0.607,-0.593 v -0.014 0 a 0.6,0.6 0 0 1 0.577,-0.621 h 0.023 a 0.588,0.588 0 0 1 0.556,0.353 0.628,0.628 0 0 1 0.054,0.28 0.7,0.7 0 0 1 -0.074,0.275 z m -2.016,-1.36 a 0.254,0.254 0 0 0 -0.244,0.185 v 0 L 4,19.316 3.653,18.2 v 0 A 0.25,0.25 0 0 0 3.436,18.025 H 3.4 a 0.251,0.251 0 0 0 -0.225,0.188 v 0 L 2.833,19.313 2.5,18.134 v 0 a 0.25110356,0.25110356 0 1 0 -0.484,0.134 l 0.011,0.035 v 0.009 l 0.5,1.569 v 0 a 0.289,0.289 0 0 0 0.248,0.194 H 2.818 A 0.29,0.29 0 0 0 3.08,19.868 v 0 l 0.33,-1.052 0.333,1.045 v 0 a 0.29,0.29 0 0 0 0.253,0.21 h 0.042 a 0.29,0.29 0 0 0 0.26,-0.194 v 0 l 0.518,-1.6 v 0 A 0.3,0.3 0 0 0 4.826,18.21 0.254,0.254 0 0 0 4.571,17.956 Z m -2.321,0 z m 5.606,0.007 H 7.813 A 0.238,0.238 0 0 0 7.59,18.2 v 1.656 0 a 0.237,0.237 0 0 0 0.473,0 v 0 -1.66 A 0.237,0.237 0 0 0 7.856,17.961 Z M 7.828,17.1 a 0.248,0.248 0 1 0 0.247,0.249 v 0 A 0.248,0.248 0 0 0 7.828,17.1 Z m 1.863,0.855 v 0 a 0.83,0.83 0 0 0 -0.7,0.353 v -0.129 a 0.22305605,0.22305605 0 0 0 -0.446,-0.01 v 0 2.395 a 0.237,0.237 0 0 0 0.218,0.228 H 8.8 a 0.237,0.237 0 0 0 0.216,-0.236 v -0.809 a 0.772,0.772 0 0 0 0.679,0.328 1.062,1.062 0 0 0 0,-2.12 z m 0.518,1.061 A 0.6,0.6 0 0 1 9.624,19.631 H 9.6 A 0.6,0.6 0 0 1 9,19.031 V 19.016 A 0.636,0.636 0 0 1 9.17,18.576 0.6,0.6 0 0 1 9.6,18.4 v 0 a 0.6,0.6 0 0 1 0.611,0.589 v 0.026 z m 2.489,-1 v 0 a 0.232,0.232 0 0 0 -0.136,-0.058 h -0.044 a 0.238,0.238 0 0 0 -0.217,0.235 v 0.923 c 0,0.284 -0.116,0.509 -0.458,0.509 -0.342,0 -0.436,-0.229 -0.436,-0.523 V 18.185 A 0.239,0.239 0 0 0 11.19,17.955 H 11.147 A 0.238,0.238 0 0 0 10.93,18.19 v 1.031 a 0.746,0.746 0 0 0 0.636,0.844 0.673,0.673 0 0 0 0.142,0.006 0.641,0.641 0 0 0 0.621,-0.327 v 0.107 a 0.224,0.224 0 1 0 0.448,0 V 18.2 A 0.236,0.236 0 0 0 12.7,18.026 Z"},{name:"wow",path:"M2.0563 15.263C2.7042 15.263 3.0046 14.8968 3.2582 14.3896L4.4037 12.0985 4.9859 14.1925C5.2112 15 5.5117 15.263 6.0845 15.263S7.0234 15.0752 7.3427 14.2957L8.2065 12.1738C8.2535 14.1549 9.6807 15.4413 11.6244 15.4413S14.892 14.1738 15.1643 12.5587L15.4647 14.2489C15.5962 14.9531 15.9248 15.263 16.4882 15.263S17.3802 15.0375 17.6619 14.5212L18.9765 12.0985 19.4929 14.2676C19.6525 14.9248 19.9436 15.263 20.5258 15.263S21.3896 15.0282 21.6431 14.5305L23.8591 10.2112A1.2019 1.2019 90 0023.9999 9.6385C23.9999 9.1315 23.6056 8.737 23.0234 8.737S22.1596 9.0188 21.9342 9.5165L20.8826 11.7699 20.3192 9.554C20.1971 9.0564 19.9154 8.737 19.3615 8.737 19.0046 8.737 18.6478 8.8404 18.3192 9.4601L17.1173 11.7794 16.7042 9.5727C16.6103 8.9907 16.1971 8.737 15.7089 8.737A.9671.9671 90 0014.7042 9.7324 1.784 1.784 90 0014.7323 10.061L14.7699 10.2489C14.2723 9.3099 13.2488 8.5587 11.8497 8.5587 10.892 8.5587 9.8028 8.9248 9.1267 9.8169A1.8122 1.8122 90 009.1361 9.5915C9.1267 9.1032 8.8075 8.737 8.2253 8.737S7.3802 8.9907 7.1737 9.5165L6.2535 11.9296 5.6431 9.5727C5.5117 9.0846 5.2582 8.737 4.7042 8.737S3.8779 8.9154 3.5962 9.5352L2.5446 11.9483 2.0187 9.5727C1.8873 8.9907 1.4741 8.737.9765 8.737S-.0282 9.1409-.0001 9.7324A.9014.9014 90 00.0375 9.986L.9671 14.1174C1.1079 14.7184 1.3333 15.263 2.0563 15.263ZM10.1784 12.061C10.1784 11.1596 10.8544 10.446 11.6995 10.446S13.2206 11.0846 13.2206 12.0141 12.5915 13.554 11.6995 13.554 10.1784 12.8968 10.1784 12.061Z"}],u=[{type:"button",name:"power",tap_action:{action:"key",key:"POWER"},icon:"mdi:power"},{type:"button",name:"sleep",tap_action:{action:"key",key:"SLEEP"},icon:"mdi:power-sleep"},{type:"button",name:"resume",tap_action:{action:"key",key:"RESUME"},icon:"mdi:power-on"},{type:"button",name:"wakeup",tap_action:{action:"key",key:"RESUME"},icon:"mdi:power-on"},{type:"button",name:"suspend",tap_action:{action:"key",key:"SUSPEND"},icon:"mdi:power-off"},{type:"button",name:"home",tap_action:{action:"key",key:"HOME"},icon:"mdi:home"},{type:"button",name:"move_home",tap_action:{action:"key",key:"MOVE_HOME"},icon:"mdi:home-import-outline"},{type:"button",name:"back",tap_action:{action:"key",key:"BACK"},icon:"mdi:keyboard-backspace"},{type:"button",name:"menu",tap_action:{action:"key",key:"MENU"},icon:"mdi:menu"},{type:"button",name:"settings",tap_action:{action:"key",key:"SETTINGS"},icon:"mdi:cog"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"VOLUME_UP"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"VOLUME_DOWN"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"key",key:"MUTE"},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"UP"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"DOWN"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"LEFT"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"RIGHT"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"CENTER"},icon:"mdi:circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"CENTER"},up:{tap_action:{action:"key",key:"UP"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"DOWN"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"LEFT"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"RIGHT"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"CENTER"},mouse_action:{action:"key",key:'{{ ("RIGHT" if deltaX > 0 else "LEFT") if (deltaX | abs) > (deltaY | abs) else ("DOWN" if deltaY > 0 else "UP") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"media_player.media_play_pause"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"perform-action",perform_action:"media_player.media_play"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"perform-action",perform_action:"media_player.media_pause"},icon:"mdi:pause"},{type:"button",name:"fast_forward",tap_action:{action:"key",key:"FAST_FORWARD"},icon:"mdi:fast-forward"},{type:"button",name:"rewind",tap_action:{action:"key",key:"REWIND"},icon:"mdi:rewind"},{type:"button",name:"keyboard",tap_action:{action:"keyboard"},icon:"mdi:keyboard"},{type:"button",name:"textbox",tap_action:{action:"textbox"},icon:"mdi:text-box"},{type:"button",name:"search",tap_action:{action:"search"},icon:"mdi:search-web"},{type:"button",name:"delete",tap_action:{action:"key",key:"input keyevent 67"},hold_action:{action:"repeat"},icon:"mdi:backspace"},{type:"button",name:"enter",tap_action:{action:"key",key:"ENTER"},icon:"mdi:magnify"},{type:"button",name:"red",tap_action:{action:"key",key:"RED"},icon:"mdi:alpha-r-box"},{type:"button",name:"green",tap_action:{action:"key",key:"GREEN"},icon:"mdi:alpha-g-box"},{type:"button",name:"yellow",tap_action:{action:"key",key:"YELLOW"},icon:"mdi:alpha-y-box"},{type:"button",name:"blue",tap_action:{action:"key",key:"BLUE"},icon:"mdi:alpha-b-box"},{type:"button",name:"component_1",tap_action:{action:"key",key:"COMPONENT1"},icon:"mdi:video-input-component"},{type:"button",name:"component_2",tap_action:{action:"key",key:"COMPONENT2"},icon:"mdi:video-input-component"},{type:"button",name:"composite_1",tap_action:{action:"key",key:"COMPOSITE1"},icon:"mdi:video-input-component"},{type:"button",name:"composite_2",tap_action:{action:"key",key:"COMPOSITE2"},icon:"mdi:video-input-component"},{type:"button",name:"hdmi_1",tap_action:{action:"key",key:"HDMI1"},icon:"mdi:video-input-hdmi"},{type:"button",name:"hdmi_2",tap_action:{action:"key",key:"HDMI2"},icon:"mdi:video-input-hdmi"},{type:"button",name:"hdmi_3",tap_action:{action:"key",key:"HDMI3"},icon:"mdi:video-input-hdmi"},{type:"button",name:"hdmi_4",tap_action:{action:"key",key:"HDMI4"},icon:"mdi:video-input-hdmi"},{type:"button",name:"input",tap_action:{action:"key",key:"INPUT"},icon:"mdi:import"},{type:"button",name:"vga",tap_action:{action:"key",key:"VGA"},icon:"mdi:serial-port"},{type:"button",name:"end",tap_action:{action:"key",key:"END"},icon:"mdi:arrow-collapse-right"},{type:"button",name:"escape",tap_action:{action:"key",key:"ESCAPE"},icon:"mdi:exit-to-app"},{type:"button",name:"pairing",tap_action:{action:"key",key:"PAIRING"},icon:"mdi:bluetooth-audio"},{type:"button",name:"home",tap_action:{action:"key",key:"HOME"},icon:"mdi:home"},{type:"button",name:"sys_up",tap_action:{action:"key",key:"SYSUP"},hold_action:{action:"repeat"},icon:"mdi:chevron-up-circle"},{type:"button",name:"sys_down",tap_action:{action:"key",key:"SYSDOWN"},hold_action:{action:"repeat"},icon:"mdi:chevron-down-circle"},{type:"button",name:"sys_left",tap_action:{action:"key",key:"SYSLEFT"},hold_action:{action:"repeat"},icon:"mdi:chevron-left-circle"},{type:"button",name:"sys_right",tap_action:{action:"key",key:"SYSRIGHT"},hold_action:{action:"repeat"},icon:"mdi:chevron-right-circle"},{type:"button",name:"text",tap_action:{action:"key",key:"TEXT"},icon:"mdi:text"},{type:"button",name:"top",tap_action:{action:"key",key:"TOP"},icon:"mdi:arrow-collapse-up"}],p=[{type:"button",name:"appletv",tap_action:{action:"source",source:"com.apple.atve.amazon.appletv"},icon:"appletv"},{type:"button",name:"crunchyroll",tap_action:{action:"source",source:"com.crunchyroll.crunchyroid"},icon:"crunchyroll"},{type:"button",name:"dazn",tap_action:{action:"source",source:"com.dazn"},icon:"dazn"},{type:"button",name:"discoveryplus",tap_action:{action:"source",source:"com.discovery.discoveryplus.firetv"},icon:"discovery"},{type:"button",name:"disney",tap_action:{action:"source",source:"com.disney.disneyplus"},icon:"disney"},{type:"button",name:"emby",tap_action:{action:"source",source:"tv.emby.embyatv"},icon:"mdi:emby"},{type:"button",name:"f1tv",tap_action:{action:"source",source:"com.formulaone.production"},icon:"f1tv"},{type:"button",name:"foxsports",tap_action:{action:"source",source:"com.foxsports.videogo"},icon:"foxsports"},{type:"button",name:"hulu",tap_action:{action:"source",source:"com.hulu.plus"},icon:"mdi:hulu"},{type:"button",name:"jellyfin",tap_action:{action:"source",source:"org.jellyfin.androidtv"},icon:"jellyfin"},{type:"button",name:"kodi",tap_action:{action:"source",source:"org.xbmc.kodi"},icon:"mdi:kodi"},{type:"button",name:"max",tap_action:{action:"source",source:"com.hbo.hbonow"},icon:"max"},{type:"button",name:"mlbtv",tap_action:{action:"source",source:"com.bamnetworks.mobile.android.gameday.atbat"},icon:"mlbtv"},{type:"button",name:"netflix",tap_action:{action:"source",source:"com.netflix.ninja"},icon:"mdi:netflix"},{type:"button",name:"nrktv",tap_action:{action:"source",source:"no.nrk.tv"},icon:"nrktv"},{type:"button",name:"pandora",tap_action:{action:"source",source:"com.pandora.android.gtv"},icon:"mdi:pandora"},{type:"button",name:"paramount",tap_action:{action:"source",source:"com.cbs.ott"},icon:"paramount"},{type:"button",name:"peacock",tap_action:{action:"source",source:"com.peacocktv.peacockfiretv"},icon:"peacock"},{type:"button",name:"pia",tap_action:{action:"source",source:"com.privateinternetaccess.android"},icon:"pia"},{type:"button",name:"plex",tap_action:{action:"source",source:"com.plexapp.android"},icon:"mdi:plex"},{type:"button",name:"primevideo",tap_action:{action:"source",source:"com.amazon.firebat"},icon:"primevideo"},{type:"button",name:"skyshowtime",tap_action:{action:"source",source:"com.skyshowtime.skyshowtime.google"},icon:"showtime"},{type:"button",name:"spotify",tap_action:{action:"source",source:"com.spotify.tv.android"},icon:"mdi:spotify"},{type:"button",name:"steam",tap_action:{action:"source",source:"com.valvesoftware.steamlink"},icon:"mdi:steam"},{type:"button",name:"stremio",tap_action:{action:"source",source:"com.stremio.tv"},icon:"stremio"},{type:"button",name:"surfshark",tap_action:{action:"source",source:"com.surfshark.vpnclient.android"},icon:"surfshark"},{type:"button",name:"viaplay",tap_action:{action:"source",source:"com.viaplay.android"},icon:"viaplay"},{type:"button",name:"videoland",tap_action:{action:"source",source:"nl.rtl.videoland.v2.firetv"},icon:"videoland"},{type:"button",name:"vlc",tap_action:{action:"source",source:"org.videolan.vlc"},icon:"mdi:vlc"},{type:"button",name:"vudu",tap_action:{action:"source",source:"com.fandango.vudu.firetv"},icon:"vudu"},{type:"button",name:"waiputv",tap_action:{action:"source",source:"de.exaring.waipu.firetv.live"},icon:"waiputv"},{type:"button",name:"wow",tap_action:{action:"source",source:"de.sky.online"},icon:"wow"},{type:"button",name:"youtube",tap_action:{action:"source",source:"com.amazon.firetv.youtube"},icon:"mdi:youtube"},{type:"button",name:"youtubetv",tap_action:{action:"source",source:"com.amazon.firetv.tv"},icon:"mdi:youtube-tv"}],d=[{type:"button",name:"home",tap_action:{action:"key",key:"GoHome"},icon:"mdi:home"},{type:"button",name:"back",tap_action:{action:"key",key:"Back"},icon:"mdi:keyboard-backspace"},{type:"button",name:"menu",tap_action:{action:"key",key:"ToggleContextMenu"},icon:"mdi:menu"},{type:"button",name:"settings",tap_action:{action:"key",key:"GoToSettings"},icon:"mdi:cog"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"VolumeUp"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"VolumeDown"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"key",key:"ToggleMute"},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"MoveUp"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"MoveDown"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"MoveLeft"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"MoveRight"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"Select"},icon:"mdi:checkbox-blank-circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"Select"},up:{tap_action:{action:"key",key:"MoveUp"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"MoveDown"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"MoveLeft"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"MoveRight"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"Select"},mouse_action:{action:"key",key:'{{ ("MoveRight" if deltaX > 0 else "MoveLeft") if (deltaX | abs) > (deltaY | abs) else ("MoveDown" if deltaY > 0 else "MoveUp") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"media_player.media_play_pause"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"perform-action",perform_action:"media_player.media_play"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"perform-action",perform_action:"media_player.media_pause"},icon:"mdi:pause"},{type:"button",name:"next",tap_action:{action:"key",key:"PlayNext"},icon:"mdi:skip-next"},{type:"button",name:"page_up",tap_action:{action:"key",key:"PageUp"},hold_action:{action:"repeat"},icon:"mdi:arrow-up"},{type:"button",name:"page_down",tap_action:{action:"key",key:"PageDown"},hold_action:{action:"repeat"},icon:"mdi:arrow-down"},{type:"button",name:"search",tap_action:{action:"key",key:"GoToSearch"},icon:"mdi:search-web"},{type:"button",name:"previous_letter",tap_action:{action:"key",key:"PreviousLetter"},icon:"mdi:page-previous"},{type:"button",name:"next_letter",tap_action:{action:"key",key:"NextLetter"},icon:"mdi:page-next"},{type:"button",name:"channel_up",tap_action:{action:"key",key:"ChannelUp"},icon:"mdi:arrow-up-circle"},{type:"button",name:"channel_down",tap_action:{action:"key",key:"ChannelDown"},icon:"mdi:arrow-down-circle"},{type:"button",name:"guide",tap_action:{action:"key",key:"Guide"},icon:"mdi:television-box"},{type:"button",name:"osd",tap_action:{action:"key",key:"ToggleOsd"},icon:"mdi:television-guide"},{type:"button",name:"osd_menu",tap_action:{action:"key",key:"ToggleOsdMenu"},icon:"mdi:television-guide"},{type:"button",name:"screenshot",tap_action:{action:"key",key:"TakeScreenshot"},icon:"mdi:monitor-screenshot"},{type:"button",name:"fullscreen",tap_action:{action:"key",key:"ToggleFullscreen"},icon:"mdi:fullscreen"},{type:"button",name:"display_content",tap_action:{action:"key",key:"DisplayContent"},icon:"mdi:content-duplicate"},{type:"button",name:"display_message",tap_action:{action:"key",key:"DisplayMessage"},icon:"mdi:message"},{type:"button",name:"stats",tap_action:{action:"key",key:"ToggleStats"},icon:"mdi:list-status"},{type:"button",name:"source",tap_action:{action:"key",key:"PlayMediaSource"},icon:"mdi:import"},{type:"button",name:"trailers",tap_action:{action:"key",key:"PlayTrailers"},icon:"mdi:truck-trailer"},{type:"button",name:"state",tap_action:{action:"key",key:"PlayState"},icon:"mdi:play-box-multiple"}],h=[],m=[{type:"button",name:"home",tap_action:{action:"key",key:"Input.Home"},icon:"mdi:home"},{type:"button",name:"back",tap_action:{action:"key",key:"Input.Back"},icon:"mdi:keyboard-backspace"},{type:"button",name:"menu",tap_action:{action:"key",key:"Input.ContextMenu"},icon:"mdi:menu"},{type:"button",name:"volume_up",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Application.SetVolume",volume:"increment"}},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Application.SetVolume",volume:"decrement"}},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Application.SetMute",mute:"toggle"}},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"Input.Up"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"Input.Down"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"Input.Left"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"Input.Right"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"Input.Select"},icon:"mdi:circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"Input.Select"},up:{tap_action:{action:"key",key:"Input.Up"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"Input.Down"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"Input.Left"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"Input.Right"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"Input.Select"},mouse_action:{action:"key",key:'Input.{{ ("Right" if deltaX > 0 else "Left") if (deltaX | abs) > (deltaY | abs) else ("Down" if deltaY > 0 else "Up") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Player.PlayPause",playerid:1}},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Player.PlayPause",playerid:1,play:!0}},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Player.PlayPause",playerid:1,play:!1}},icon:"mdi:pause"},{type:"button",name:"music_play_pause",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Player.PlayPause",playerid:0}},icon:"mdi:music"},{type:"button",name:"picture_play_pause",tap_action:{action:"perform-action",perform_action:"kodi.call_method",data:{method:"Player.PlayPause",playerid:2}},icon:"mdi:image"},{type:"button",name:"keyboard",tap_action:{action:"keyboard"},icon:"mdi:keyboard"},{type:"button",name:"textbox",tap_action:{action:"textbox"},icon:"mdi:text-box"},{type:"button",name:"search",tap_action:{action:"search"},icon:"mdi:kodi"},{type:"button",name:"info",tap_action:{action:"key",key:"Input.Info"},icon:"mdi:information"},{type:"button",name:"codec",tap_action:{action:"key",key:"Input.ShowCodec"},icon:"mdi:information-box"},{type:"button",name:"osd",tap_action:{action:"key",key:"Input.ShowOSD"},icon:"mdi:television-guide"},{type:"button",name:"process_info",tap_action:{action:"key",key:"Input.ShowPlayerProcessInfo"},icon:"mdi:information-variant-circle"}],f=[],y=[{type:"button",name:"power",tap_action:{action:"key",key:"power"},icon:"mdi:power"},{type:"button",name:"home",tap_action:{action:"key",key:"home"},icon:"mdi:home"},{type:"button",name:"back",tap_action:{action:"key",key:"back"},icon:"mdi:keyboard-backspace"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"volume_up"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"volume_down"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"key",key:"volume_mute"},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"up"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"down"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"left"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"right"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"select"},icon:"mdi:circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"select"},up:{tap_action:{action:"key",key:"up"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"down"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"left"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"right"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"select"},mouse_action:{action:"key",key:'{{ ("right" if deltaX > 0 else "left") if (deltaX | abs) > (deltaY | abs) else ("down" if deltaY > 0 else "up") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"key",key:"play"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"key",key:"play"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"key",key:"play"},icon:"mdi:pause"},{type:"button",name:"forward",tap_action:{action:"key",key:"forward"},icon:"mdi:fast-forward"},{type:"button",name:"reverse",tap_action:{action:"key",key:"reverse"},icon:"mdi:rewind"},{type:"button",name:"replay",tap_action:{action:"key",key:"replay"},icon:"mdi:replay"},{type:"button",name:"keyboard",tap_action:{action:"keyboard"},icon:"mdi:keyboard"},{type:"button",name:"textbox",tap_action:{action:"textbox"},icon:"mdi:text-box"},{type:"button",name:"search",tap_action:{action:"search"},icon:"mdi:search-web"},{type:"button",name:"delete",tap_action:{action:"key",key:"backspace"},hold_action:{action:"repeat"},icon:"mdi:backspace"},{type:"button",name:"enter",tap_action:{action:"key",key:"enter"},icon:"mdi:magnify"},{type:"button",name:"channel_up",tap_action:{action:"key",key:"channel_up"},icon:"mdi:arrow-up-circle"},{type:"button",name:"channel_down",tap_action:{action:"key",key:"channel_down"},icon:"mdi:arrow-down-circle"},{type:"button",name:"find_remote",tap_action:{action:"key",key:"find_remote"},icon:"mdi:remote-tv"},{type:"button",name:"info",tap_action:{action:"key",key:"info"},icon:"mdi:asterisk"},{type:"button",name:"input_av1",tap_action:{action:"key",key:"input_av1"},icon:"mdi:import"},{type:"button",name:"input_hdmi1",tap_action:{action:"key",key:"input_hdmi1"},icon:"mdi:video-input-hdmi"},{type:"button",name:"input_hdmi2",tap_action:{action:"key",key:"input_hdmi2"},icon:"mdi:video-input-hdmi"},{type:"button",name:"input_hdmi3",tap_action:{action:"key",key:"input_hdmi3"},icon:"mdi:video-input-hdmi"},{type:"button",name:"input_hdmi4",tap_action:{action:"key",key:"input_hdmi4"},icon:"mdi:video-input-hdmi"},{type:"button",name:"input_tuner",tap_action:{action:"key",key:"input_tuner"},icon:"mdi:video-input-antenna"},{type:"button",name:"literal",tap_action:{action:"key",key:"literal"},icon:"mdi:alphabetical"}],_=[{type:"button",name:"appletv",tap_action:{action:"source",source:"Apple TV"},icon:"appletv"},{type:"button",name:"crunchyroll",tap_action:{action:"source",source:"Crunchyroll"},icon:"crunchyroll"},{type:"button",name:"dazn",tap_action:{action:"source",source:"DAZN Live Sports Streaming"},icon:"dazn"},{type:"button",name:"discoveryplus",tap_action:{action:"source",source:"discovery+ | Stream TV Shows"},icon:"discovery"},{type:"button",name:"disney",tap_action:{action:"source",source:"Disney Plus"},icon:"disney"},{type:"button",name:"emby",tap_action:{action:"source",source:"Emby"},icon:"mdi:emby"},{type:"button",name:"f1tv",tap_action:{action:"source",source:"F1 TV"},icon:"f1tv"},{type:"button",name:"foxsports",tap_action:{action:"source",source:"FOX Sports"},icon:"foxsports"},{type:"button",name:"hulu",tap_action:{action:"source",source:"Hulu"},icon:"mdi:hulu"},{type:"button",name:"jellyfin",tap_action:{action:"source",source:"Jellyfin"},icon:"jellyfin"},{type:"button",name:"max",tap_action:{action:"source",source:"Max"},icon:"max"},{type:"button",name:"mlbtv",tap_action:{action:"source",source:"MLB"},icon:"mlbtv"},{type:"button",name:"nba",tap_action:{action:"source",source:"NBA"},icon:"nba"},{type:"button",name:"netflix",tap_action:{action:"source",source:"Netflix"},icon:"mdi:netflix"},{type:"button",name:"pandora",tap_action:{action:"source",source:"Pandora"},icon:"mdi:pandora"},{type:"button",name:"paramount",tap_action:{action:"source",source:"Paramount Plus"},icon:"paramount"},{type:"button",name:"peacock",tap_action:{action:"source",source:"Peacock TV"},icon:"peacock"},{type:"button",name:"plex",tap_action:{action:"source",source:"Plex - Free Movies & TV"},icon:"mdi:plex"},{type:"button",name:"primevideo",tap_action:{action:"source",source:"Prime Video"},icon:"primevideo"},{type:"button",name:"spotify",tap_action:{action:"source",source:"Spotify"},icon:"mdi:spotify"},{type:"button",name:"vudu",tap_action:{action:"source",source:"Fandango at Home"},icon:"vudu"},{type:"button",name:"youtube",tap_action:{action:"source",source:"YouTube"},icon:"mdi:youtube"},{type:"button",name:"youtubetv",tap_action:{action:"source",source:"YouTube TV"},icon:"mdi:youtube-tv"}],b=[{type:"button",name:"power",tap_action:{action:"key",key:"KEY_POWER"},icon:"mdi:power"},{type:"button",name:"power_on",tap_action:{action:"key",key:"KEY_POWERON"},icon:"mdi:power-on"},{type:"button",name:"power_off",tap_action:{action:"key",key:"KEY_POWEROFF"},icon:"mdi:power-off"},{type:"button",name:"home",tap_action:{action:"key",key:"KEY_HOME"},icon:"mdi:home"},{type:"button",name:"back",tap_action:{action:"key",key:"KEY_RETURN"},icon:"mdi:keyboard-backspace"},{type:"button",name:"menu",tap_action:{action:"key",key:"KEY_MENU"},icon:"mdi:menu"},{type:"button",name:"top_menu",tap_action:{action:"key",key:"KEY_TOPMENU"},icon:"mdi:backburger"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"KEY_VOLUP"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"KEY_VOLDOWN"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"key",key:"KEY_MUTE"},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"KEY_UP"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"KEY_DOWN"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"KEY_LEFT"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"KEY_RIGHT"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"KEY_ENTER"},icon:"mdi:circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"KEY_ENTER"},up:{tap_action:{action:"key",key:"KEY_UP"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"KEY_DOWN"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"KEY_LEFT"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"KEY_RIGHT"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"KEY_ENTER"},mouse_action:{action:"key",key:'KEY_{{ ("RIGHT" if deltaX > 0 else "LEFT") if (deltaX | abs) > (deltaY | abs) else ("DOWN" if deltaY > 0 else "UP") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"media_player.media_play_pause"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"key",key:"KEY_PLAY"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"key",key:"KEY_PAUSE"},icon:"mdi:pause"},{type:"button",name:"rewind",tap_action:{action:"key",key:"KEY_REWIND"},icon:"mdi:rewind"},{type:"button",name:"fast_forward",tap_action:{action:"key",key:"KEY_FF"},icon:"mdi:fast-forward"},{type:"button",name:"stop",tap_action:{action:"key",key:"KEY_STOP"},icon:"mdi:stop"},{type:"button",name:"record",tap_action:{action:"key",key:"KEY_REC"},icon:"mdi:record"},{type:"button",name:"channel_up",tap_action:{action:"key",key:"KEY_CHUP"},icon:"mdi:arrow-up-circle"},{type:"button",name:"channel_down",tap_action:{action:"key",key:"KEY_CHDOWN"},icon:"mdi:arrow-down-circle"},{type:"button",name:"channel_previous",tap_action:{action:"key",key:"KEY_PRECH"},icon:"mdi:arrow-left-circle"},{type:"button",name:"channel_favorites",tap_action:{action:"key",key:"KEY_FAVCH"},icon:"mdi:star-circle"},{type:"button",name:"channel_list",tap_action:{action:"key",key:"KEY_CH_LIST"},icon:"mdi:list-box"},{type:"button",name:"red",tap_action:{action:"key",key:"KEY_RED"},icon:"mdi:alpha-r-box"},{type:"button",name:"green",tap_action:{action:"key",key:"KEY_GREEN"},icon:"mdi:alpha-g-box"},{type:"button",name:"yellow",tap_action:{action:"key",key:"KEY_YELLOW"},icon:"mdi:alpha-y-box"},{type:"button",name:"blue",tap_action:{action:"key",key:"KEY_CYAN"},icon:"mdi:alpha-b-box"},{type:"button",name:"n0",tap_action:{action:"key",key:"KEY_0"},icon:"mdi:numeric-0"},{type:"button",name:"n1",tap_action:{action:"key",key:"KEY_1"},icon:"mdi:numeric-1"},{type:"button",name:"n2",tap_action:{action:"key",key:"KEY_2"},icon:"mdi:numeric-2"},{type:"button",name:"n3",tap_action:{action:"key",key:"KEY_3"},icon:"mdi:numeric-3"},{type:"button",name:"n4",tap_action:{action:"key",key:"KEY_4"},icon:"mdi:numeric-4"},{type:"button",name:"n5",tap_action:{action:"key",key:"KEY_5"},icon:"mdi:numeric-5"},{type:"button",name:"n6",tap_action:{action:"key",key:"KEY_6"},icon:"mdi:numeric-6"},{type:"button",name:"n7",tap_action:{action:"key",key:"KEY_7"},icon:"mdi:numeric-7"},{type:"button",name:"n8",tap_action:{action:"key",key:"KEY_8"},icon:"mdi:numeric-8"},{type:"button",name:"n9",tap_action:{action:"key",key:"KEY_9"},icon:"mdi:numeric-9"},{type:"button",name:"numpad",icon:"mdi:dialpad"},{type:"button",name:"info",tap_action:{action:"key",key:"KEY_INFO"},icon:"mdi:information"},{type:"button",name:"guide",tap_action:{action:"key",key:"KEY_GUIDE"},icon:"mdi:television-box"},{type:"button",name:"captions",tap_action:{action:"key",key:"KEY_CAPTION"},icon:"mdi:closed-caption"},{type:"button",name:"tools",tap_action:{action:"key",key:"KEY_TOOLS"},icon:"mdi:hammer-screwdriver"},{type:"button",name:"contents",tap_action:{action:"key",key:"KEY_CONTENTS"},icon:"mdi:table-of-contents"},{type:"button",name:"disc_menu",tap_action:{action:"key",key:"KEY_DISC_MENU"},icon:"mdi:dots-horizontal-circle"},{type:"button",name:"dvr_menu",tap_action:{action:"key",key:"KEY_DVR_MENU"},icon:"mdi:dots-vertical-circle"},{type:"button",name:"help",tap_action:{action:"key",key:"KEY_HELP"},icon:"mdi:help"},{type:"button",name:"live",tap_action:{action:"key",key:"KEY_LIVE"},icon:"mdi:debug-step-over"},{type:"button",name:"quick_replay",tap_action:{action:"key",key:"KEY_QUICK_REPLAY"},icon:"mdi:replay"},{type:"button",name:"still_picture",tap_action:{action:"key",key:"KEY_STILL_PICTURE"},icon:"mdi:image"},{type:"button",name:"instant_replay",tap_action:{action:"key",key:"KEY_INSTANT_REPLAY"},icon:"mdi:replay"},{type:"button",name:"source",tap_action:{action:"key",key:"KEY_SOURCE"},icon:"mdi:import"},{type:"button",name:"auto_program",tap_action:{action:"key",key:"KEY_AUTO_PROGRAM"},icon:"mdi:refresh-auto"},{type:"button",name:"channel_magic",tap_action:{action:"key",key:"KEY_MAGIC_CHANNEL"},icon:"mdi:auto-fix"},{type:"button",name:"component_1",tap_action:{action:"key",key:"KEY_COMPONENT1"},icon:"mdi:video-input-component"},{type:"button",name:"component_2",tap_action:{action:"key",key:"KEY_COMPONENT2"},icon:"mdi:video-input-component"},{type:"button",name:"av_1",tap_action:{action:"key",key:"KEY_AV1"},icon:"mdi:video-input-component"},{type:"button",name:"av_2",tap_action:{action:"key",key:"KEY_AV2"},icon:"mdi:video-input-component"},{type:"button",name:"av_2",tap_action:{action:"key",key:"KEY_AV2"},icon:"mdi:video-input-component"},{type:"button",name:"svideo_1",tap_action:{action:"key",key:"KEY_SVIDEO1"},icon:"mdi:video-input-svideo"},{type:"button",name:"svideo_2",tap_action:{action:"key",key:"KEY_SVIDEO2"},icon:"mdi:video-input-svideo"},{type:"button",name:"svideo_3",tap_action:{action:"key",key:"KEY_SVIDEO3"},icon:"mdi:video-input-svideo"},{type:"button",name:"hdmi",tap_action:{action:"key",key:"KEY_HDMI"},icon:"mdi:video-input-hdmi"},{type:"button",name:"fm_radio",tap_action:{action:"key",key:"KEY_FM_RADIO"},icon:"mdi:radio-fm"},{type:"button",name:"dvi",tap_action:{action:"key",key:"KEY_DVI"},icon:"mdi:serial-port"},{type:"button",name:"dvr",tap_action:{action:"key",key:"KEY_DVR"},icon:"mdi:record-rec"},{type:"button",name:"tv",tap_action:{action:"key",key:"KEY_TV"},icon:"mdi:television"},{type:"button",name:"antenna",tap_action:{action:"key",key:"KEY_ANTENA"},icon:"mdi:video-input-antenna"},{type:"button",name:"dtv",tap_action:{action:"key",key:"KEY_DTV"},icon:"mdi:alpha-d-box"},{type:"button",name:"ambient",tap_action:{action:"key",key:"KEY_AMBIENT"},icon:"mdi:television-ambient-light"},{type:"button",name:"3d",tap_action:{action:"key",key:"KEY_PANNEL_CHDOWN"},icon:"mdi:video-3d"},{type:"button",name:"anynet",tap_action:{action:"key",key:"KEY_ANYNET"},icon:"mdi:hdmi-port"},{type:"button",name:"energy_saving",tap_action:{action:"key",key:"KEY_ESAVING"},icon:"mdi:leaf"},{type:"button",name:"sleep_timer",tap_action:{action:"key",key:"KEY_SLEEP"},icon:"mdi:power-sleep"},{type:"button",name:"dtv_signal",tap_action:{action:"key",key:"KEY_DTV_SIGNAL"},icon:"mdi:alpha-d-circle"},{type:"button",name:"pip_toggle",tap_action:{action:"key",key:"KEY_PIP_ONOFF"},icon:"mdi:picture-in-picture-top-right"},{type:"button",name:"pip_swap",tap_action:{action:"key",key:"KEY_PIP_SWAP"},icon:"mdi:picture-in-picture-bottom-right-outline"},{type:"button",name:"pip_size",tap_action:{action:"key",key:"KEY_PIP_SIZE"},icon:"mdi:picture-in-picture-top-right-outline"},{type:"button",name:"pip_channel_up",tap_action:{action:"key",key:"KEY_PIP_CHUP"},icon:"mdi:arrow-up-circle-outline"},{type:"button",name:"pip_channel_down",tap_action:{action:"key",key:"KEY_PIP_CHDOWN"},icon:"mdi:arrow-down-circle-outline"},{type:"button",name:"pip_small",tap_action:{action:"key",key:"KEY_AUTO_ARC_PIP_SMALL"},icon:"mdi:image"},{type:"button",name:"pip_wide",tap_action:{action:"key",key:"KEY_AUTO_ARC_PIP_WIDE"},icon:"mdi:panorama"},{type:"button",name:"pip_bottom_right",tap_action:{action:"key",key:"KEY_AUTO_ARC_PIP_RIGHT_BOTTOM"},icon:"mdi:picture-in-picture-bottom-right"},{type:"button",name:"pip_scan",tap_action:{action:"key",key:"KEY_PIP_SCAN"},icon:"mdi:picture-in-picture-bottom-right-outline"},{type:"button",name:"vcr",tap_action:{action:"key",key:"KEY_VCR_MODE"},icon:"mdi:vhs"},{type:"button",name:"catv",tap_action:{action:"key",key:"KEY_CATV_MODE"},icon:"mdi:video-input-antenna"},{type:"button",name:"dss",tap_action:{action:"key",key:"KEY_DSS_MODE"},icon:"mdi:alpha-d-box"},{type:"button",name:"tv",tap_action:{action:"key",key:"KEY_TV_MODE"},icon:"mdi:television"},{type:"button",name:"dvd",tap_action:{action:"key",key:"KEY_DVD_MODE"},icon:"mdi:disc"},{type:"button",name:"stb",tap_action:{action:"key",key:"KEY_STB_MODE"},icon:"mdi:audio-video"},{type:"button",name:"pc",tap_action:{action:"key",key:"KEY_PCMODE"},icon:"mdi:desktop-tower"},{type:"button",name:"teletext_mix",tap_action:{action:"key",key:"KEY_TTX_MIX"},icon:"mdi:text"},{type:"button",name:"teletext_subface",tap_action:{action:"key",key:"KEY_"},icon:"mdi:text-box-outline"},{type:"button",name:"aspect_ratio",tap_action:{action:"key",key:"KEY_ASPECT"},icon:"mdi:aspect-ratio"},{type:"button",name:"picture_size",tap_action:{action:"key",key:"KEY_PICTURE_SIZE"},icon:"mdi:image-size-select-large"},{type:"button",name:"aspect_ratio_4_3",tap_action:{action:"key",key:"KEY_4_3"},icon:"mdi:image"},{type:"button",name:"aspect_ratio_16_9",tap_action:{action:"key",key:"KEY_16_9"},icon:"mdi:image-area"},{type:"button",name:"picture_mode",tap_action:{action:"key",key:"KEY_PMODE"},icon:"mdi:image-text"},{type:"button",name:"picture_mode_panorama",tap_action:{action:"key",key:"KEY_PANORAMA"},icon:"mdi:panorama-variant"},{type:"button",name:"picture_mode_dynamic",tap_action:{action:"key",key:"KEY_DYNAMIC"},icon:"mdi:image-auto-adjust"},{type:"button",name:"picture_mode_standard",tap_action:{action:"key",key:"KEY_STANDARD"},icon:"mdi:image"},{type:"button",name:"picture_mode_movie",tap_action:{action:"key",key:"KEY_MOVIE1"},icon:"mdi:movie"},{type:"button",name:"picture_mode_game",tap_action:{action:"key",key:"KEY_GAME"},icon:"mdi:controller"},{type:"button",name:"picture_mode_custom",tap_action:{action:"key",key:"KEY_CUSTOM"},icon:"mdi:image-plus"},{type:"button",name:"clock",tap_action:{action:"key",key:"KEY_CLOCK_DISPLAY"},icon:"mdi:clock"},{type:"button",name:"clock_timer_setup",tap_action:{action:"key",key:"KEY_SETUP_CLOCK_TIMER"},icon:"mdi:clock-alert"},{type:"button",name:"subtitle",tap_action:{action:"key",key:"KEY_SUB_TITLE"},icon:"mdi:subtitles"},{type:"button",name:"zoom_move",tap_action:{action:"key",key:"KEY_ZOOM_MOVE"},icon:"mdi:magnify-plus-cursor"},{type:"button",name:"zoom_in",tap_action:{action:"key",key:"KEY_ZOOM_IN"},icon:"mdi:magnify-plus"},{type:"button",name:"zoom_out",tap_action:{action:"key",key:"KEY_ZOOM_OUT"},icon:"mdi:magnify-minus"},{type:"button",name:"zoom_1",tap_action:{action:"key",key:"KEY_ZOOM1"},icon:"mdi:magnify-plus-outline"},{type:"button",name:"zoom_2",tap_action:{action:"key",key:"KEY_ZOOM2"},icon:"mdi:magnify-minus-outline"}],v=[{type:"button",name:"appletv",tap_action:{action:"source",source:"Apple TV"},icon:"appletv"},{type:"button",name:"dazn",tap_action:{action:"source",source:"DAZN"},icon:"dazn"},{type:"button",name:"disney",tap_action:{action:"source",source:"Disney+"},icon:"disney"},{type:"button",name:"hulu",tap_action:{action:"source",source:"Hulu"},icon:"mdi:hulu"},{type:"button",name:"netflix",tap_action:{action:"source",source:"Netflix"},icon:"mdi:netflix"},{type:"button",name:"max",tap_action:{action:"source",source:"Max"},icon:"max"},{type:"button",name:"paramount",tap_action:{action:"source",source:"Paramount+"},icon:"paramount"},{type:"button",name:"peacock",tap_action:{action:"source",source:"Peacock TV"},icon:"peacock"},{type:"button",name:"primevideo",tap_action:{action:"source",source:"Prime Video"},icon:"primevideo"},{type:"button",name:"youtube",tap_action:{action:"source",source:"YouTube"},icon:"mdi:youtube"},{type:"button",name:"youtubetv",tap_action:{action:"source",source:"YouTube TV"},icon:"mdi:youtube-tv"}],g=[{type:"button",name:"monitor_off",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Monitor",action:"turn_off"}},icon:"mdi:monitor-off"},{type:"button",name:"monitor_on",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Monitor",action:"turn_on"}},icon:"mdi:monitor"},{type:"button",name:"windows",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"LWIN"}]}}},icon:"mdi:microsoft"},{type:"button",name:"back",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"BACK"}]}}},icon:"mdi:keyboard-backspace"},{type:"button",name:"volume_down",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Media",action:"volume_down"}},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_up",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Media",action:"volume_up"}},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_mute",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Media",action:"volume_mute"}},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.1,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Volume",action:"volume_{{ ((value * 10) | round) * 10 }}"}}},{type:"touchpad",name:"mousepad",mouse_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Relmtech.Basic Input",action:"delta",extras:{Values:[{Value:0},{Value:"{{ 3 * deltaX }}"},{Value:"{{ 3 * deltaY }}"}]}}},multi_mouse_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Core.Input",action:'{{ "Horz" if (deltaX | abs) > (deltaY | abs) else "Vert" }}',extras:{Values:[{Value:"{{ -0.2 * (deltaX if (deltaX | abs) > (deltaY | abs) else deltaY) }}"}]}}},tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Relmtech.Basic Input",action:"tap"}},hold_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Relmtech.Basic Input",action:"hold"}},multi_tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Relmtech.Basic Input",action:"right"}},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"up",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"UP"}]}}},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"DOWN"}]}}},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"LEFT"}]}}},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"RIGHT"}]}}},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"RETURN"}]}}},icon:"mdi:checkbox-blank-circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"RETURN"}]}}},up:{tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"UP"}]}}},hold_action:{action:"repeat"}},down:{tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"DOWN"}]}}},hold_action:{action:"repeat"}},left:{tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"LEFT"}]}}},hold_action:{action:"repeat"}},right:{tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Navigation",action:"toggle",extras:{Values:[{Value:"RIGHT"}]}}},hold_action:{action:"repeat"}}},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Media",action:"play_pause"}},icon:"mdi:play-pause"},{type:"button",name:"stop",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Media",action:"stop"}},icon:"mdi:stop"},{type:"button",name:"previous",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Media",action:"previous"}},icon:"mdi:skip-previous"},{type:"button",name:"next",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Unified.Media",action:"next"}},icon:"mdi:skip-next"},{type:"button",name:"keyboard",tap_action:{action:"keyboard"},icon:"mdi:keyboard"},{type:"button",name:"textbox",tap_action:{action:"textbox"},icon:"mdi:text-box"},{type:"button",name:"delete",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Core.Input",action:"Press",extras:{Values:[{Value:"back"}]}}},icon:"mdi:backspace"},{type:"button",name:"forward_delete",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Core.Input",action:"Press",extras:{Values:[{Value:"delete"}]}}},icon:"mdi:backspace-reverse"},{type:"button",name:"enter",tap_action:{action:"perform-action",perform_action:"unified_remote.call",data:{remote_id:"Core.Input",action:"Press",extras:{Values:[{Value:"enter"}]}}},icon:"mdi:magnify"}],k=[],w=[{type:"button",name:"home",tap_action:{action:"key",key:"HOME"},icon:"mdi:home"},{type:"button",name:"back",tap_action:{action:"key",key:"BACK"},icon:"mdi:keyboard-backspace"},{type:"button",name:"menu",tap_action:{action:"key",key:"MENU"},icon:"mdi:menu"},{type:"button",name:"dash",tap_action:{action:"key",key:"DASH"},icon:"mdi:view-dashboard-variant"},{type:"button",name:"exit",tap_action:{action:"key",key:"EXIT"},icon:"mdi:exit-to-app"},{type:"button",name:"volume_up",tap_action:{action:"key",key:"VOLUMEUP"},hold_action:{action:"repeat"},icon:"mdi:volume-high"},{type:"button",name:"volume_down",tap_action:{action:"key",key:"VOLUMEDOWN"},hold_action:{action:"repeat"},icon:"mdi:volume-medium"},{type:"button",name:"volume_mute",tap_action:{action:"key",key:"MUTE"},icon:"mdi:volume-low"},{type:"button",name:"volume_buttons",icon:"mdi:volume-plus"},{type:"slider",name:"slider",range:[0,1],step:.01,value_attribute:"volume_level",tap_action:{action:"perform-action",perform_action:"media_player.volume_set",data:{volume_level:"{{ value | float }}"}}},{type:"button",name:"up",tap_action:{action:"key",key:"UP"},hold_action:{action:"repeat"},icon:"mdi:chevron-up"},{type:"button",name:"down",tap_action:{action:"key",key:"DOWN"},hold_action:{action:"repeat"},icon:"mdi:chevron-down"},{type:"button",name:"left",tap_action:{action:"key",key:"LEFT"},hold_action:{action:"repeat"},icon:"mdi:chevron-left"},{type:"button",name:"right",tap_action:{action:"key",key:"RIGHT"},hold_action:{action:"repeat"},icon:"mdi:chevron-right"},{type:"button",name:"center",tap_action:{action:"key",key:"ENTER"},icon:"mdi:circle"},{type:"button",name:"navigation_buttons",icon:"mdi:gamepad"},{type:"button",name:"dpad",icon:"mdi:gamepad"},{type:"touchpad",name:"touchpad",tap_action:{action:"key",key:"ENTER"},up:{tap_action:{action:"key",key:"UP"},hold_action:{action:"repeat"}},down:{tap_action:{action:"key",key:"DOWN"},hold_action:{action:"repeat"}},left:{tap_action:{action:"key",key:"LEFT"},hold_action:{action:"repeat"}},right:{tap_action:{action:"key",key:"RIGHT"},hold_action:{action:"repeat"}}},{type:"touchpad",name:"mousepad",tap_action:{action:"key",key:"ENTER"},mouse_action:{action:"key",key:'{{ ("RIGHT" if deltaX > 0 else "LEFT") if (deltaX | abs) > (deltaY | abs) else ("DOWN" if deltaY > 0 else "UP") }}',repeat_delay:100},up:{},down:{},left:{},right:{},icon:"mdi:mouse"},{type:"button",name:"play_pause",tap_action:{action:"perform-action",perform_action:"media_player.media_play_pause"},icon:"mdi:play-pause"},{type:"button",name:"play",tap_action:{action:"key",key:"PLAY"},icon:"mdi:play"},{type:"button",name:"pause",tap_action:{action:"key",key:"PAUSE"},icon:"mdi:pause"},{type:"button",name:"stop",tap_action:{action:"perform-action",perform_action:"webostv.command",data:{command:"media.controls/stop"}},icon:"mdi:stop"},{type:"button",name:"rewind",tap_action:{action:"perform-action",perform_action:"webostv.command",data:{command:"media.controls/rewind"}},icon:"mdi:rewind"},{type:"button",name:"fast_forward",tap_action:{action:"perform-action",perform_action:"webostv.command",data:{command:"media.controls/fastForward"}},icon:"mdi:fast-forward"},{type:"button",name:"keyboard",tap_action:{action:"keyboard"},icon:"mdi:keyboard"},{type:"button",name:"textbox",tap_action:{action:"textbox"},icon:"mdi:text-box"},{type:"button",name:"delete",tap_action:{action:"perform-action",perform_action:"webostv.command",data:{command:"com.webos.service.ime/deleteCharacters"}},icon:"mdi:backspace"},{type:"button",name:"enter",tap_action:{action:"perform-action",perform_action:"webostv.command",data:{command:"com.webos.service.ime/sendEnterKey"}},icon:"mdi:magnify"},{type:"button",name:"channel_up",tap_action:{action:"key",key:"CHANNELUP"},icon:"mdi:arrow-up-circle"},{type:"button",name:"channel_down",tap_action:{action:"key",key:"CHANNELDOWN"},icon:"mdi:arrow-down-circle"},{type:"button",name:"red",tap_action:{action:"key",key:"RED"},icon:"mdi:alpha-r-box"},{type:"button",name:"green",tap_action:{action:"key",key:"GREEN"},icon:"mdi:alpha-g-box"},{type:"button",name:"yellow",tap_action:{action:"key",key:"YELLOW"},icon:"mdi:alpha-y-box"},{type:"button",name:"blue",tap_action:{action:"key",key:"BLUE"},icon:"mdi:alpha-b-box"},{type:"button",name:"n0",tap_action:{action:"key",key:"0"},icon:"mdi:numeric-0"},{type:"button",name:"n1",tap_action:{action:"key",key:"1"},icon:"mdi:numeric-1"},{type:"button",name:"n2",tap_action:{action:"key",key:"2"},icon:"mdi:numeric-2"},{type:"button",name:"n3",tap_action:{action:"key",key:"3"},icon:"mdi:numeric-3"},{type:"button",name:"n4",tap_action:{action:"key",key:"4"},icon:"mdi:numeric-4"},{type:"button",name:"n5",tap_action:{action:"key",key:"5"},icon:"mdi:numeric-5"},{type:"button",name:"n6",tap_action:{action:"key",key:"6"},icon:"mdi:numeric-6"},{type:"button",name:"n7",tap_action:{action:"key",key:"7"},icon:"mdi:numeric-7"},{type:"button",name:"n8",tap_action:{action:"key",key:"8"},icon:"mdi:numeric-8"},{type:"button",name:"n9",tap_action:{action:"key",key:"9"},icon:"mdi:numeric-9"},{type:"button",name:"numpad",icon:"mdi:dialpad"},{type:"button",name:"asterisk",tap_action:{action:"key",key:"ASTERISK"},icon:"mdi:asterisk"},{type:"button",name:"info",tap_action:{action:"key",key:"INFO"},icon:"mdi:information"},{type:"button",name:"guide",tap_action:{action:"key",key:"GUIDE"},icon:"mdi:television-box"},{type:"button",name:"captions",tap_action:{action:"key",key:"CC"},icon:"mdi:closed-caption"}],E=[{type:"button",name:"disney",tap_action:{action:"source",source:"Disney+"},icon:"disney"},{type:"button",name:"netflix",tap_action:{action:"key",key:"NETFLIX"},icon:"mdi:netflix"},{type:"button",name:"primevideo",tap_action:{action:"key",key:"AMAZON"},icon:"primevideo"},{type:"button",name:"rakutentv",tap_action:{action:"source",source:"Rakuten TV"},icon:"rakutentv"},{type:"button",name:"waiputv",tap_action:{action:"source",source:"waipu.tv"},icon:"waiputv"},{type:"button",name:"wow",tap_action:{action:"source",source:"WOW"},icon:"wow"},{type:"button",name:"youtube",tap_action:{action:"source",source:"YouTube"},icon:"youtube"}]},626:(t,e,i)=>{"use strict";function n(t){let e=[];for(const i in t)if("object"==typeof t[i]){const o=n(t[i]);e=e.concat(o.map((t=>i+"."+t)))}else e.push(i);return e}function o(t,e){const i=e.split(".");if(null!=t)return 1==i.length?t[i[0]]:o(t[i[0]],i.splice(1).join("."))}function a(t,e,i){const n=e.split(".");return 1==n.length?t[n[0]]=i:(n[0]in t&&"object"==typeof t[n[0]]||(/^-?\d+$/.test(n[1])?t[n[0]]=new Array(parseInt(n[1])):t[n[0]]={}),a(t[n[0]],n.splice(1).join("."),i)),t}function r(t,...e){function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}if(!e.length)return t;const n=e.shift();if(i(t)&&i(n))for(const e in n)i(n[e])?(t[e]||Object.assign(t,{[e]:{}}),r(t[e],n[e])):Object.assign(t,{[e]:n[e]});return r(t,...e)}i.d(e,{vz:()=>o,HD:()=>a,b$:()=>n,XO:()=>c,D9:()=>r});var s=i(63);function c(t){let e,i;switch(t){case"Unified Remote":e=s.i4,i=s.oA;break;case"LG webOS":e=s.CI,i=s.Mo;break;case"Samsung TV":e=s.ks,i=s.Qz;break;case"Jellyfin":e=s.nK,i=s.zT;break;case"Kodi":e=s.np,i=s.rl;break;case"Roku":e=s.j0,i=s.$S;break;case"Apple TV":e=s.qz,i=s._6;break;case"Fire TV":e=s.iu,i=s.ci;break;case"Sony BRAVIA":e=s.J7,i=s.hd;break;default:e=s.$i,i=s.tz}return[structuredClone(e),structuredClone(i)]}},1:(t,e,i)=>{"use strict";i.d(e,{mN:()=>C,AH:()=>c,W3:()=>w,Ec:()=>E});const n=globalThis,o=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),r=new WeakMap;class s{constructor(t,e,i){if(this._$cssResult$=!0,i!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&r.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new s(i,t,a)},l=(t,e)=>{if(o)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=n.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}},u=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new s("string"==typeof t?t:t+"",void 0,a))(e)})(t):t,{is:p,defineProperty:d,getOwnPropertyDescriptor:h,getOwnPropertyNames:m,getOwnPropertySymbols:f,getPrototypeOf:y}=Object,_=globalThis,b=_.trustedTypes,v=b?b.emptyScript:"",g=_.reactiveElementPolyfillSupport,k=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},E=(t,e)=>!p(t,e),x={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),_.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(t,i,e);void 0!==n&&d(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){const{get:n,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return n?.call(this)},set(e){const a=n?.call(this);o.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??x}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;const t=y(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){const t=this.properties,e=[...m(t),...f(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return l(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(void 0!==n&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:w).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,n=i._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=i.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this._$Em=n,this[n]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??E)(this[t],e))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$ET??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$Ej()}catch(e){throw t=!1,this._$Ej(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ej(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$ET&&=this._$ET.forEach((t=>this._$EO(t,this[t]))),this._$Ej()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[k("elementProperties")]=new Map,C[k("finalized")]=new Map,g?.({ReactiveElement:C}),(_.reactiveElementVersions??=[]).push("2.0.3")},703:(t,e,i)=>{"use strict";i.d(e,{o:()=>Mi,X:()=>Ii});var n=i(894);function o(t,e){try{if(e){if(t.entities[e]){if(t.entities[e].area_id)return t.entities[e].area_id;e=t.entities[e].device_id??e}if(t.devices[e])return t.devices[e].area_id;for(const i in t.areas)if(t.areas[i].name==e)return i}return}catch{return}}function a(t,e){try{if(e){let i=e;if(t.entities[e]&&(i=t.entities[e].area_id??i,e=t.entities[e].device_id??e),t.devices[e]&&(i=t.devices[e].area_id??i),t.areas[i])return t.areas[i].name}return}catch{return}}function r(t,e){try{const i=[];if(e){const n=s(t,e);for(const e of n)for(const n in t.entities)t.entities[n].device_id==e&&i.push(n);i.sort()}return i}catch{return[]}}function s(t,e){try{const i=[];if(e){if(!(e in t.areas))for(const i in t.areas)if(t.areas[i].name==e){e=i;break}for(const n in t.devices)t.devices[n].area_id==e&&i.push(n);i.sort()}return i}catch{return[]}}function c(t,e){return!!Array.isArray(t)&&t?.includes(e)}function l(t,e,i,n){"object"!=typeof i||Array.isArray(i)||(n=i.with_unit??n,i=i.rounded??void 0);try{const o=t.states[e];let a=o?.state;if(n&&null==i&&(i=!0),i&&!isNaN(o?.state)){const i=t.entities[e]?.display_precision??0;a=Number(a).toPrecision(i)}return n&&o?.attributes?.unit_of_measurement&&(a=`${a} ${o?.attributes?.unit_of_measurement}`),a}catch{return}}function u(t,e,i){try{return t.states[e].attributes[i]}catch{return}}function p(t,e){try{const i=l(t,e);return!![!1,0,-0,""].includes(i)||Boolean(i)}catch{return!1}}function d(t){const e={};for(const i in t.states){const[n,o]=i.split(".");e[n]=e[n]??{},e[n][o]=t.states[i]}return e}function h(t,e){try{const i=[];if(e)for(const n in t.entities)t.entities[n].device_id==e&&i.push(n);return i}catch{return[]}}function m(t,e,i){try{return t.devices[e]?.[i]??u(t,e,i)}catch{return}}function f(t,e){try{if(e){if(t.entities[e])return t.entities[e].device_id;for(const i in t.devices){const n=t.devices[i];if(n.name==e||n.name_by_user==e)return i}}return}catch{return}}function y(t,e,i=!1){if(t[0]==e[0]&&t[1]==e[1])return 0;const n=1/298.257223563,o=6356752.314245,a=Math.atan((1-n)*Math.tan(t[0]*Math.PI/180)),r=Math.atan((1-n)*Math.tan(e[0]*Math.PI/180));let s=(e[1]-t[1])*Math.PI/180,c=s;const l=Math.sin(a),u=Math.cos(a),p=Math.sin(r),d=Math.cos(r);let h=0,m=0,f=0,y=0,_=0;for(let t=0;t<200;t++){const e=Math.sin(c),i=Math.cos(c);if(m=Math.sqrt((d*e)**2+(u*p-l*d*i)**2),0==m)return 0;y=l*p+u*d*i,_=Math.atan2(m,y);const o=u*d*e/m;h=1-o**2,f=0!=h?y-2*l*p/h:0;const a=n/16*h*(4+n*(4-3*h)),r=c;if(c=s+(1-a)*n*o*(_+a*m*(f+a*y*(2*f**2-1))),Math.abs(c-r)<1e-12)break;if(199==t)return null}const b=272331606109.84375*h/o**2,v=b/1024*(256+b*(b*(74-47*b)-128));let g=o*(1+b/16384*(4096+b*(b*(320-175*b)-768)))*(_-v*m*(f+v/4*(y*(2*f**2-1)-v/6*f*(4*m**2-3)*(4*f**2-3))))/1e3;return i&&(g*=.621371),g}function _(t,...e){function i(e){if(e.startsWith("zone."))return t.states[e].attributes.persons??[];let i=Object.keys(t.states).filter((t=>t==e||t.split(".")[0]==e));if("zone"==e){let e=[];for(const n of i)e.push(...t.states[n].attributes.persons??[]);i=Array.from(new Set(e))}return i}let n,o;if(1==e.length)n=[t.states["zone.home"].attributes.latitude,t.states["zone.home"].attributes.longitude],o=0;else if("number"==typeof e[0]){if("number"!=typeof e[1]||2==e.length)return null;n=[e[0],e[1]],o=2}else if("object"==typeof e[0]){if(Array.isArray(e[0])||!e[0].attributes)return null;n=[e[0].attributes.latitude,e[0].attributes.longitude],o=1}else{if("string"!=typeof e[0])return null;n=[t.states[e[0]].attributes.latitude,t.states[e[0]].attributes.longitude],o=1}let a=[];for(let t=o;te[t][i].entity_id));else for(const o of i)n.push(...Object.keys(e[t][o]).map((i=>e[t][o][i].entity_id)))}for(const t of n)a.push(...i(t))}else"string"==typeof e[t]&&a.push(...i(e[t]));a=Array.from(new Set(a));let r=null,s=1/0;for(const e of a){let i;i="string"==typeof e?t.states[e]:e;const o=i.attributes.latitude,a=i.attributes.longitude;if(null!=o&&null!=a){const t=y(n,[o,a])??1/0;t<=s&&(r=i,s=t)}}return r}function b(t,e){try{let i=e;if(t.entities[e]&&(i=t.entities[e].area_id??i,e=t.entities[e].device_id??e),e){if(t.devices[e]&&(i=t.devices[e].area_id??i),t.areas[i])return t.areas[i].floor_id;for(const i in t.areas)if(t.areas[i].name==e)return t.areas[i].floor_id}return}catch{return}}function v(t,e){if(t.floors[e])return t.floors[e].name;const i=b(t,e);return i?t.floors[i].name:void 0}function g(t,e){try{const i=[];if(e){let n;if(t.floors[e])n=e;else for(const i in t.floors)if(t.floors[i].name==e){n=i;break}if(!n)return[];for(const e in t.areas)t.areas[e].floor_id==n&&i.push(e)}return i}catch{return[]}}function k(t,...e){const i=[];for(let n of e.flat(1/0))if("string"==typeof n&&(n=t.states[n]),n)if(Array.isArray(n.attributes?.entity_id))i.push(...k(t,...n.attributes?.entity_id));else if(n?.attributes?.persons)i.push(...k(t,...n.attributes.persons));else if(n.entity_id)i.push(n);else{const e=Object.values(n);if(e[0]?.entity_id)i.push(...e);else for(const n of e){const e=Object.values(n);for(const n of e)n?.attributes?.persons?i.push(...k(t,...n.attributes.persons)):i.push(n)}}return i.filter(((t,e,i)=>e==i.findIndex((e=>e.entity_id==t.entity_id)))).sort(((t,e)=>t.entity_id.localeCompare(e.entity_id)))}function w(t,e,i,n,o){if("object"!=typeof i||Array.isArray(i)||(o=i.if_none??o,n=i.if_false??n,i=i.if_true??void 0),o){const i=Ii(t,e);if([void 0,null,"undefined","null","None"].includes(i))return o}return Ii(t,`\n\t\t{% if ${e} %}\n\t\t${i??!0}\n\t\t{% else %}\n\t\t${n??!1}\n\t\t{% endif %}\n\t`)}const E={};function x(t,e){try{return e?t.entities[e]?.labels??t.devices[e]?.labels??t.areas[e]?.labels??[]:Object.keys(E)}catch{return[]}}function C(t){for(const e in E)if(E[e].name==t)return e}function T(t){return E[t]?.name}function L(t,e){try{const i=[];let n;if(e){if(n=E[e]?e:C(e),!n)return[];for(const e in t.areas)(t.areas[e].labels??[]).includes(n)&&i.push(e);i.sort()}return i}catch{return[]}}function A(t,e){try{const i=[];if(e){let n;if(n=E[e]?e:C(e),!n)return[];for(const e in t.devices)(t.devices[e].labels??[]).includes(n)&&i.push(e);i.sort()}return i}catch{return[]}}function S(t,e){try{const i=[];if(e){let n;if(n=E[e]?e:C(e),!n)return[];for(const e in t.entities)(t.entities[e].labels??[]).includes(n)&&i.push(e);i.sort()}return i}catch{return[]}}function O(t){return t.toString()}function M(t){if(t.toString().includes("NaN"))throw Error("Result returned NaN.")}function $(t){return t!=1/0&&!isNaN(t)}function I(t,e){if("number"==typeof t)return 0!=t;if("boolean"==typeof t)return t;if(t=t.toLowerCase(),["true","yes","on","enable","1"].includes(t))return!0;if(["false","no","off","disable","0"].includes(t))return!1;if(e)return e;throw Error("Invalid input")}function N(t,e=Math.E,i){try{const i=Math.log(t)/Math.log(e);return M(i.toString()),i}catch(t){if(i)return i;throw t}}function D(t,e){try{const e=Math.sin(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}}function P(t,e){try{const e=Math.cos(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}}function R(t,e){try{const e=Math.tan(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}}function F(t,e){try{const e=Math.asin(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}}function U(t,e){try{const e=Math.acos(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}}function V(t,e){try{const e=Math.atan(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}}function j(t,e,i){try{const i=Math.atan2(t,e);return M(i.toString()),i}catch(t){if(i)return i;throw t}}function K(t,e){try{const e=Math.sqrt(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}}function B(...t){return Math.max(...t.flat(1/0))}function H(...t){return Math.min(...t.flat(1/0))}function Y(t,e){try{if((t=t.flat(1/0)).some((t=>isNaN(t))))throw Error("Non-numeric values provided");return t.reduce(((t,e)=>t+e))/t.length}catch(t){if(e)return e;throw t}}function Z(t,e){try{if((t=t.flat(1/0)).some((t=>isNaN(t))))throw Error("Non-numeric values provided");if(!t.length)throw Error("Empty array provided");t=t.sort(((t,e)=>t-e));const e=Math.floor(t.length/2);return t.length%2?t[e]:(t[e-1]+t[e])/2}catch(t){if(e)return e;throw t}}function z(t,e){try{if((t=t.flat(1/0)).some((t=>isNaN(t))))throw Error("Non-numeric values provided");if(!t.length)throw Error("Empty array provided");const e={};for(const i of t)e[i]||(e[i]=0),e[i]++;let i=t[0],n=0;for(const t in e)e[t]>n&&(i=Number(t),n=e[t]);return i}catch(t){if(e)return e;throw t}}const q=Math.E,W=Math.PI,G=2*Math.PI;function X(t,e,i){try{return t.formatEntityState(t.states[e],i)}catch{return i??t.states[e]?.state??void 0}}function J(t,e,i){try{return t.formatEntityAttributeName(t.states[e],i)}catch{return i??t.states[e]?.attributes?.[i]??void 0}}function Q(t,e,i,n){try{return t.formatEntityAttributeValue(t.states[e],i,n)}catch{return n??t.states[e]?.attributes?.[i]??void 0}}const tt=new Date,et=new Date;function it(t,e,i,n){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=t=>{const e=o(t),i=o.ceil(t);return t-e(e(t=new Date(+t),null==i?1:Math.floor(i)),t),o.range=(i,n,a)=>{const r=[];if(i=o.ceil(i),a=null==a?1:Math.floor(a),!(i0))return r;let s;do{r.push(s=new Date(+i)),e(i,a),t(i)}while(sit((e=>{if(e>=e)for(;t(e),!i(e);)e.setTime(e-1)}),((t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!i(t););else for(;--n>=0;)for(;e(t,1),!i(t););})),i&&(o.count=(e,n)=>(tt.setTime(+e),et.setTime(+n),t(tt),t(et),Math.floor(i(tt,et))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(n?e=>n(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}const nt=864e5,ot=6048e5;function at(t){return it((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/ot))}const rt=at(0),st=at(1),ct=at(2),lt=at(3),ut=at(4),pt=at(5),dt=at(6);function ht(t){return it((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/ot))}rt.range,st.range,ct.range,lt.range,ut.range,pt.range,dt.range;const mt=ht(0),ft=ht(1),yt=ht(2),_t=ht(3),bt=ht(4),vt=ht(5),gt=ht(6),kt=(mt.range,ft.range,yt.range,_t.range,bt.range,vt.range,gt.range,it((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/nt),(t=>t.getDate()-1))),wt=(kt.range,it((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/nt),(t=>t.getUTCDate()-1))),Et=(wt.range,it((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/nt),(t=>Math.floor(t/nt)))),xt=(Et.range,it((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));xt.every=t=>isFinite(t=Math.floor(t))&&t>0?it((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,i)=>{e.setFullYear(e.getFullYear()+i*t)})):null,xt.range;const Ct=it((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Tt(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Lt(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function At(t,e,i){return{y:t,m:e,d:i,H:0,M:0,S:0,L:0}}Ct.every=t=>isFinite(t=Math.floor(t))&&t>0?it((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,i)=>{e.setUTCFullYear(e.getUTCFullYear()+i*t)})):null,Ct.range;var St,Ot,Mt,$t,It,Nt={"-":"",_:" ",0:"0"},Dt=/^\s*\d+/,Pt=/^%/,Rt=/[\\^$*+?|[\]().{}]/g;function Ft(t,e,i){var n=t<0?"-":"",o=(n?-t:t)+"",a=o.length;return n+(a[t.toLowerCase(),e])))}function Kt(t,e,i){var n=Dt.exec(e.slice(i,i+1));return n?(t.w=+n[0],i+n[0].length):-1}function Bt(t,e,i){var n=Dt.exec(e.slice(i,i+1));return n?(t.u=+n[0],i+n[0].length):-1}function Ht(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.U=+n[0],i+n[0].length):-1}function Yt(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.V=+n[0],i+n[0].length):-1}function Zt(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.W=+n[0],i+n[0].length):-1}function zt(t,e,i){var n=Dt.exec(e.slice(i,i+4));return n?(t.y=+n[0],i+n[0].length):-1}function qt(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),i+n[0].length):-1}function Wt(t,e,i){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(i,i+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),i+n[0].length):-1}function Gt(t,e,i){var n=Dt.exec(e.slice(i,i+1));return n?(t.q=3*n[0]-3,i+n[0].length):-1}function Xt(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.m=n[0]-1,i+n[0].length):-1}function Jt(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.d=+n[0],i+n[0].length):-1}function Qt(t,e,i){var n=Dt.exec(e.slice(i,i+3));return n?(t.m=0,t.d=+n[0],i+n[0].length):-1}function te(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.H=+n[0],i+n[0].length):-1}function ee(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.M=+n[0],i+n[0].length):-1}function ie(t,e,i){var n=Dt.exec(e.slice(i,i+2));return n?(t.S=+n[0],i+n[0].length):-1}function ne(t,e,i){var n=Dt.exec(e.slice(i,i+3));return n?(t.L=+n[0],i+n[0].length):-1}function oe(t,e,i){var n=Dt.exec(e.slice(i,i+6));return n?(t.L=Math.floor(n[0]/1e3),i+n[0].length):-1}function ae(t,e,i){var n=Pt.exec(e.slice(i,i+1));return n?i+n[0].length:-1}function re(t,e,i){var n=Dt.exec(e.slice(i));return n?(t.Q=+n[0],i+n[0].length):-1}function se(t,e,i){var n=Dt.exec(e.slice(i));return n?(t.s=+n[0],i+n[0].length):-1}function ce(t,e){return Ft(t.getDate(),e,2)}function le(t,e){return Ft(t.getHours(),e,2)}function ue(t,e){return Ft(t.getHours()%12||12,e,2)}function pe(t,e){return Ft(1+kt.count(xt(t),t),e,3)}function de(t,e){return Ft(t.getMilliseconds(),e,3)}function he(t,e){return de(t,e)+"000"}function me(t,e){return Ft(t.getMonth()+1,e,2)}function fe(t,e){return Ft(t.getMinutes(),e,2)}function ye(t,e){return Ft(t.getSeconds(),e,2)}function _e(t){var e=t.getDay();return 0===e?7:e}function be(t,e){return Ft(rt.count(xt(t)-1,t),e,2)}function ve(t){var e=t.getDay();return e>=4||0===e?ut(t):ut.ceil(t)}function ge(t,e){return t=ve(t),Ft(ut.count(xt(t),t)+(4===xt(t).getDay()),e,2)}function ke(t){return t.getDay()}function we(t,e){return Ft(st.count(xt(t)-1,t),e,2)}function Ee(t,e){return Ft(t.getFullYear()%100,e,2)}function xe(t,e){return Ft((t=ve(t)).getFullYear()%100,e,2)}function Ce(t,e){return Ft(t.getFullYear()%1e4,e,4)}function Te(t,e){var i=t.getDay();return Ft((t=i>=4||0===i?ut(t):ut.ceil(t)).getFullYear()%1e4,e,4)}function Le(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ft(e/60|0,"0",2)+Ft(e%60,"0",2)}function Ae(t,e){return Ft(t.getUTCDate(),e,2)}function Se(t,e){return Ft(t.getUTCHours(),e,2)}function Oe(t,e){return Ft(t.getUTCHours()%12||12,e,2)}function Me(t,e){return Ft(1+wt.count(Ct(t),t),e,3)}function $e(t,e){return Ft(t.getUTCMilliseconds(),e,3)}function Ie(t,e){return $e(t,e)+"000"}function Ne(t,e){return Ft(t.getUTCMonth()+1,e,2)}function De(t,e){return Ft(t.getUTCMinutes(),e,2)}function Pe(t,e){return Ft(t.getUTCSeconds(),e,2)}function Re(t){var e=t.getUTCDay();return 0===e?7:e}function Fe(t,e){return Ft(mt.count(Ct(t)-1,t),e,2)}function Ue(t){var e=t.getUTCDay();return e>=4||0===e?bt(t):bt.ceil(t)}function Ve(t,e){return t=Ue(t),Ft(bt.count(Ct(t),t)+(4===Ct(t).getUTCDay()),e,2)}function je(t){return t.getUTCDay()}function Ke(t,e){return Ft(ft.count(Ct(t)-1,t),e,2)}function Be(t,e){return Ft(t.getUTCFullYear()%100,e,2)}function He(t,e){return Ft((t=Ue(t)).getUTCFullYear()%100,e,2)}function Ye(t,e){return Ft(t.getUTCFullYear()%1e4,e,4)}function Ze(t,e){var i=t.getUTCDay();return Ft((t=i>=4||0===i?bt(t):bt.ceil(t)).getUTCFullYear()%1e4,e,4)}function ze(){return"+0000"}function qe(){return"%"}function We(t){return+t}function Ge(t){return Math.floor(+t/1e3)}St=function(t){var e=t.dateTime,i=t.date,n=t.time,o=t.periods,a=t.days,r=t.shortDays,s=t.months,c=t.shortMonths,l=Vt(o),u=jt(o),p=Vt(a),d=jt(a),h=Vt(r),m=jt(r),f=Vt(s),y=jt(s),_=Vt(c),b=jt(c),v={a:function(t){return r[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:ce,e:ce,f:he,g:xe,G:Te,H:le,I:ue,j:pe,L:de,m:me,M:fe,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:We,s:Ge,S:ye,u:_e,U:be,V:ge,w:ke,W:we,x:null,X:null,y:Ee,Y:Ce,Z:Le,"%":qe},g={a:function(t){return r[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ae,e:Ae,f:Ie,g:He,G:Ze,H:Se,I:Oe,j:Me,L:$e,m:Ne,M:De,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:We,s:Ge,S:Pe,u:Re,U:Fe,V:Ve,w:je,W:Ke,x:null,X:null,y:Be,Y:Ye,Z:ze,"%":qe},k={a:function(t,e,i){var n=h.exec(e.slice(i));return n?(t.w=m.get(n[0].toLowerCase()),i+n[0].length):-1},A:function(t,e,i){var n=p.exec(e.slice(i));return n?(t.w=d.get(n[0].toLowerCase()),i+n[0].length):-1},b:function(t,e,i){var n=_.exec(e.slice(i));return n?(t.m=b.get(n[0].toLowerCase()),i+n[0].length):-1},B:function(t,e,i){var n=f.exec(e.slice(i));return n?(t.m=y.get(n[0].toLowerCase()),i+n[0].length):-1},c:function(t,i,n){return x(t,e,i,n)},d:Jt,e:Jt,f:oe,g:qt,G:zt,H:te,I:te,j:Qt,L:ne,m:Xt,M:ee,p:function(t,e,i){var n=l.exec(e.slice(i));return n?(t.p=u.get(n[0].toLowerCase()),i+n[0].length):-1},q:Gt,Q:re,s:se,S:ie,u:Bt,U:Ht,V:Yt,w:Kt,W:Zt,x:function(t,e,n){return x(t,i,e,n)},X:function(t,e,i){return x(t,n,e,i)},y:qt,Y:zt,Z:Wt,"%":ae};function w(t,e){return function(i){var n,o,a,r=[],s=-1,c=0,l=t.length;for(i instanceof Date||(i=new Date(+i));++s53)return null;"w"in a||(a.w=1),"Z"in a?(o=(n=Lt(At(a.y,0,1))).getUTCDay(),n=o>4||0===o?ft.ceil(n):ft(n),n=wt.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(o=(n=Tt(At(a.y,0,1))).getDay(),n=o>4||0===o?st.ceil(n):st(n),n=kt.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?Lt(At(a.y,0,1)).getUTCDay():Tt(At(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Lt(a)):Tt(a)}}function x(t,e,i,n){for(var o,a,r=0,s=e.length,c=i.length;r=c)return-1;if(37===(o=e.charCodeAt(r++))){if(o=e.charAt(r++),!(a=k[o in Nt?e.charAt(r++):o])||(n=a(t,i,n))<0)return-1}else if(o!=i.charCodeAt(n++))return-1}return n}return v.x=w(i,v),v.X=w(n,v),v.c=w(e,v),g.x=w(i,g),g.X=w(n,g),g.c=w(e,g),{format:function(t){var e=w(t+="",v);return e.toString=function(){return t},e},parse:function(t){var e=E(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",g);return e.toString=function(){return t},e},utcParse:function(t){var e=E(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Ot=St.format,Mt=St.parse,$t=St.utcFormat,It=St.utcParse;var Xe="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||$t(Xe);var Je=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:It(Xe);const Qe=Je,ti=["weeks","days","hours","minutes","seconds","milliseconds"],ei={weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001};function ii(t){return"object"==typeof t&&!Array.isArray(t)}class ni{constructor(t=0,e=0,i=0,n=0,o=0,a=0){this.days=0,this.seconds=0,this.milliseconds=0;let r={days:t,seconds:e,milliseconds:i,minutes:n,hours:o,weeks:a};ii(t)&&(delete r.days,Object.assign(r,t));let s=0;if(ti.forEach((t=>{s+=(r[t]??0)*ei[t]})),sthis.maxSeconds)throw RangeError("value out of range, must have magnitude less than 999999999 days");if(s.toString().includes(".")){const t=s.toString();this.milliseconds=Math.trunc(parseFloat(`0.${t.split(".")[1]}`)/ei.milliseconds),t.startsWith("-")&&(this.milliseconds*=-1),s=Math.trunc(s)}this.days=Math.trunc(s/ei.days),this.days=this.days||0,this.seconds=s-this.days*ei.days,this.seconds=this.seconds||0}total_seconds(){return this.days*ei.days+this.seconds+this.milliseconds*ei.milliseconds}valueOf(){return this.total_seconds()}toString(){return`${0!=this.days?`${this.days} day${Math.abs(this.days)>1?"s,":","}`:""} ${$t("%-H:%M:%S"+(this.milliseconds?".%f":""))(new Date(1e3*this.valueOf()))}`.trim()}static get min(){return new ni(-1e8)}get minSeconds(){return-864e10}static get max(){return new ni(1e8)}get maxSeconds(){return 864e10}static get resolution(){return new ni({milliseconds:1})}}class oi{constructor(t=0,e=0,i=0,n=0){this.hour=0,this.minute=0,this.second=0,this.millisecond=0;let o={hour:t,minute:e,second:i,millisecond:n};ii(t)&&(delete o.hour,Object.assign(o,t));for(const t in o)if(!Number.isInteger(o[t]))throw TypeError("'float' object cannot be interpreted as an integer");if((o.hour??0)<0||(o.hour??0)>23)throw RangeError("hour must be in 0..23");if((o.minute??0)<0||(o.minute??0)>59)throw RangeError("minute must be in 0..59");if((o.second??0)<0||(o.second??0)>59)throw RangeError("second must be in 0..59");if((o.millisecond??0)<0||(o.millisecond??0)>999)throw RangeError("millisecond must be in 0..999");Object.assign(this,o)}replace(t=this.hour,e=this.minute,i=this.second,n=this.millisecond){let o={hour:t,minute:e,second:i,millisecond:n};return ii(t)&&(delete o.hour,Object.assign(o,t)),new oi(o.hour??this.hour,o.minute??this.minute,o.second??this.second,o.millisecond??this.millisecond)}isoformat(t="auto"){let e;switch(t){case"hours":e="%H";break;case"minutes":e="%H:%M";break;case"seconds":e="%H:%M:%S";break;case"milliseconds":e="%H:%M:%S.%f";break;default:e="%H:%M:%S"+(this.millisecond?".%f":"")}return this.strftime(e)}valueOf(){return this.hour*ei.hours+this.minute*ei.minutes+this.second*ei.seconds+this.millisecond*ei.milliseconds}toString(){return this.isoformat()}strftime(t){return $t(t)(this.jsDate)}get jsDate(){return new Date(1e3*this.valueOf())}static get min(){return new oi(0,0,0,0)}static get max(){return new oi(23,59,59,999)}static get resolution(){return ni.resolution}static fromisoformat(t){const e=Qe(`1970-01-01T${t}`);if(e)return new oi(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());throw SyntaxError("Unable to parse date string")}}const ai=100,ri=9999,si=36160,ci=3652059,li=["year","month","day","hour","minute","second","millisecond"];class ui{constructor(t,e,i,n=0,o=0,a=0,r=0,s=!1){this.year=1970,this.month=1,this.day=1,this.hour=0,this.minute=0,this.second=0,this.millisecond=0,this.utc=!1;const c={year:t,month:e,day:i,hour:n,minute:o,second:a,millisecond:r,utc:s};if(ii(t)&&(delete c.year,Object.assign(c,t)),!c.year||!c.month||!c.day)throw SyntaxError("Missing required argument year, month, or day");for(const t in c)if(li.includes(t)&&!Number.isInteger(c[t]))throw TypeError(`Argument ${t} value ${c[t]} is not an integer`);if(c.yearri)throw RangeError(`year ${c.year} is out of range`);if(c.month<1||c.month>12)throw RangeError(`month ${c.month} is out of range`);if(c.day<1||c.day>new Date(c.year,c.month,0).getDate())throw RangeError(`day ${i} is out of range for month`);if((c.hour??0)<0||(c.hour??0)>23)throw RangeError("hour must be in 0..23");if((c.minute??0)<0||(c.minute??0)>59)throw RangeError("minute must be in 0..59");if((c.second??0)<0||(c.second??0)>59)throw RangeError("second must be in 0..59");if((c.millisecond??0)<0||(c.millisecond??0)>999)throw RangeError("millisecond must be in 0..999");Object.assign(this,c)}date(){return new pi(this.year,this.month,this.day)}time(){return new oi(this.hour,this.minute,this.second,this.millisecond)}replace(t=this.year,e=this.month,i=this.day,n=this.hour,o=this.minute,a=this.second,r=this.millisecond){const s={year:t,month:e,day:i,hour:n,minute:o,second:a,millisecond:r};return ii(t)&&(delete s.year,Object.assign(s,t)),new ui({year:s.year??this.year,month:s.month??this.month,day:s.day??this.day,hour:s.hour??this.hour,minute:s.minute??this.minute,second:s.second??this.second,millisecond:s.millisecond??this.millisecond})}toordinal(){return this.date().toordinal()}timestamp(){let t;return t=this.utc?Date.UTC(this.year,this.month-1,this.day||1,this.hour||0,this.minute||0,this.second||0,this.millisecond||0):this.jsDate.getTime(),t/1e3}weekday(){return this.date().weekday()}isoweekday(){return this.weekday()+1}isocalendar(){const[t,e,i]=$t("%G-%V-%u")(this.jsDate).split("-");return[Number(t),Number(e),Number(i)]}isoformat(t="T",e="auto"){const i={sep:t,timespec:e};let n;switch(ii(t)&&(delete i.sep,Object.assign(i,t),i.sep=i.sep??"T"),i.timespec){case"hours":n=`%Y-%m-%d${i.sep}%H`;break;case"minutes":n=`%Y-%m-%d${i.sep}%H:%M`;break;case"seconds":n=`%Y-%m-%d${i.sep}%H:%M:%S`;break;case"milliseconds":n=`%Y-%m-%d${i.sep}%H:%M:%S.%f`;break;default:n=`%Y-%m-%d${i.sep}%H:%M:%S${this.millisecond?".%f":""}`}return this.strftime(n)}valueOf(){return this.timestamp()}toString(){return this.isoformat(" ")}ctime(){return Ot("%a %b %-e %H:%M:%S %Y")(this.jsDate)}strftime(t){return this.utc?$t(t)(this.jsDate):Ot(t)(this.jsDate)}get jsDate(){return this.utc?new Date(1e3*this.valueOf()):new Date(this.year,this.month-1,this.day||1,this.hour||0,this.minute||0,this.second||0,this.millisecond||0)}static get min(){return new ui(ai,1,1)}static get max(){return new ui(ri,12,31,23,59,59,999)}static get resolution(){return ni.resolution}static today(){return ui.now()}static now(){return ui.fromjsdate(new Date)}static utcnow(){return ui.utcfromjsdate(new Date)}static fromtimestamp(t){const e=new Date(1e3*t);return ui.fromjsdate(e)}static utcfromtimestamp(t){const e=new Date(1e3*t);return ui.utcfromjsdate(e)}static fromjsdate(t){return new ui({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()})}static utcfromjsdate(t){return new ui({year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),utc:!0})}static fromordinal(t){if(tci)throw RangeError(`ordinal ${t} is out of range`);return ui.fromtimestamp(pi.min.valueOf()+new ni({days:t-si}).valueOf())}static combine(t,e){return new ui({year:t.year,month:t.month,day:t.day,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond})}static fromisoformat(t){const e=Qe(t);if(e)return ui.fromjsdate(e);throw SyntaxError("Unable to parse date string")}static fromisocalendar(t,e,i){return ui.strptime(`${t}-${e}-${i}`,"%G-%V-%u")}static strptime(t,e,i=!1){const n=(i?It:Mt)(e)(t);if(!n)throw Error(`'${t}' does not match format '${e}'`);return i?ui.utcfromjsdate(n):ui.fromjsdate(n)}}class pi{constructor(t,e,i){if(this.year=1970,this.month=1,this.day=1,!Number.isInteger(t)||tri)throw RangeError(`year ${t} is out of range`);if(!Number.isInteger(e)||e<1||e>12)throw RangeError(`month ${e} is out of range`);if(!Number.isInteger(i)||i<1||i>new Date(t,e,0).getDate())throw RangeError(`day ${i} is out of range for month`);Object.assign(this,{year:t,month:e,day:i})}replace(t=this.year,e=this.month,i=this.day){const n={year:t,month:e,day:i};return ii(t)&&(delete n.year,Object.assign(n,t)),new pi(n.year??this.year,n.month??this.month,n.day??this.day)}toordinal(){return Math.trunc((this.valueOf()+new ni({days:719163}).total_seconds())/ei.days)}weekday(){return(this.jsDate.getDay()+6)%7}isoweekday(){return this.weekday()+1}isocalendar(){const[t,e,i]=$t("%G-%V-%u")(this.jsDate).split("-");return[Number(t),Number(e),Number(i)]}isoformat(){return $t("%Y-%m-%d")(this.jsDate)}valueOf(){return this.jsDate.getTime()/1e3}toString(){return this.isoformat()}ctime(){return Ot("%a %b %-e 00:00:00 %Y")(this.jsDate)}strftime(t){return Ot(t)(this.jsDate)}get jsDate(){return new Date(this.year,this.month-1,this.day)}static get min(){return new pi(ai,1,1)}static get max(){return new pi(ri,12,31)}static get resolution(){return new ni({days:1})}static today(){const t=ui.now();return new pi(t.year,t.month,t.day)}static fromtimestamp(t){const e=ui.fromtimestamp(t);return new pi(e.year,e.month,e.day)}static fromordinal(t){if(tci)throw RangeError(`ordinal ${t} is out of range`);return pi.fromtimestamp(pi.min.valueOf()+new ni({days:t-si}).valueOf())}static fromisoformat(t){const e=Qe(t);if(e)return new pi(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate());throw SyntaxError("Unable to parse date string")}static fromisocalendar(t,e,i){const n=ui.strptime(`${t}-${e}-${i}`,"%G-%V-%u");return new pi(Number(n.year),Number(n.month),Number(n.day))}}const di=(...t)=>new ni(...t);di.min=ni.min,di.max=ni.max,di.resolution=ni.resolution;const hi=(...t)=>new pi(...t);hi.min=pi.min,hi.max=pi.max,hi.resolution=pi.resolution,hi.today=pi.today,hi.fromtimestamp=pi.fromtimestamp,hi.fromordinal=pi.fromordinal,hi.fromisoformat=pi.fromisoformat,hi.fromisocalendar=pi.fromisocalendar;const mi=(...t)=>new ui(...t);mi.min=ui.min,mi.max=ui.max,mi.resolution=ui.resolution,mi.today=ui.today,mi.now=ui.now,mi.utcnow=ui.utcnow,mi.fromtimestamp=ui.fromtimestamp,mi.utcfromtimestamp=ui.utcfromtimestamp,mi.fromjsdate=ui.fromjsdate,mi.utcfromjsdate=ui.utcfromjsdate,mi.fromordinal=ui.fromordinal,mi.combine=ui.combine,mi.fromisoformat=ui.fromisoformat,mi.fromisocalendar=ui.fromisocalendar,mi.strptime=ui.strptime;const fi=(...t)=>new oi(...t);fi.min=oi.min,fi.max=oi.max,fi.resolution=oi.resolution,fi.fromisoformat=oi.fromisoformat;const yi={MINYEAR:ai,MAXYEAR:ri,MINYEAR_ORDINAL:si,MAXYEAR_ORDINAL:ci,timedelta:di,date:hi,datetime:mi,time:fi};function _i(){return yi.datetime.now()}function bi(t="00:00"){const[e,i,n,o]=t.split(":"),a=yi.datetime.now(),r=yi.datetime(a.year,a.month,a.day,Number(e??0),Number(i??0),Number(n??0),Number(o??0));return M(r.toString()),r}function vi(t,e=void 0,i=!0){"object"!=typeof e||Array.isArray(e)||(i=e.utc??i,e=e.fallback??void 0);try{let e;if("string"==typeof t)if(/[^\d]/g.test(t)){t=t.replace(/T/g," ");const n=["%Y-%m-%d %H:%M:%S.%f%Z","%Y-%m-%d %H:%M:%S.%f","%Y-%m-%d %H:%M:%S%Z","%Y-%m-%d %H:%M:%S"];for(const o of n)try{e=yi.datetime.strptime(t,o,i);break}catch{}e||(t=parseFloat(t))}else t=parseFloat(t);else e="number"==typeof t?i?yi.datetime.utcfromtimestamp(t):yi.datetime.fromtimestamp(t):t instanceof pi?yi.datetime(t.year,t.month,t.day):t;return M((e??"NaN").toString()),e}catch(t){if(e)return e;throw t}}function gi(t,e){try{let e;return"string"==typeof t?(t.includes(" ")||t.includes("T")||(t+=" 00:00:00"),e=Date.parse(t)/1e3):e="number"==typeof t?yi.datetime.utcfromtimestamp(t).jsDate.getTime()/1e3:t.jsDate.getTime()/1e3,M(e.toString()),e}catch(t){if(e)return e;throw t}}function ki(t){return yi.datetime.fromjsdate(yi.datetime(t).jsDate)}function wi(t,e=1,i=!1){if(!(t instanceof ui))return t;let n=_i().valueOf()-ki(t).valueOf();if(i&&(n*=-1),n<=0)return t;(0==e||e>6)&&(e=6);const o={year:31536e3,month:2592e3,day:86400,hour:3600,minute:60,second:1},a=Object.keys(o);let r="",s=!1;for(let t=0;t0)&&(s=!0,r+=` ${i} ${a[t]}${1!=i?"s":""}`,n-=i*o[a[t]])}return r.trim()}function Ei(t,e=1){return wi(t,e)}function xi(t,e=1){return wi(t,e,!0)}const Ci={states:l,state_attr:u,has_value:p,state_translated:X,attr_name_translated:J,attr_value_translated:Q,expand:k,device_entities:h,device_attr:m,device_id:f,floor_id:b,floor_name:v,floor_areas:g,area_id:o,area_name:a,area_entities:r,area_devices:s,labels:x,label_areas:L,label_devices:A,label_entities:S,iif:w,closest:_},Ti={label_id:C,label_name:T,today_at:bi,as_datetime:vi,as_timestamp:gi,as_local:ki,time_since:Ei,time_until:xi,timestamp_local:function(t,e){try{const e=yi.datetime.fromtimestamp(t).strftime("%Y-%m-%dT%H:%M:%S%Z");return M(e),e}catch(t){if(e)return e;throw t}},timestamp_utc:function(t,e){try{const e=yi.datetime.utcfromtimestamp(t).strftime("%Y-%m-%dT%H:%M:%S%Z");return M(e),e}catch(t){if(e)return e;throw t}},timestamp_custom:function(t,e,i=!0,n=void 0){"object"!=typeof i||Array.isArray(i)||(n=i.fallback??n,i=i.local??!0);try{const n=(i?yi.datetime.fromtimestamp(t):yi.datetime.utcfromtimestamp(t)).strftime(e);return M(n),n}catch(t){if(n)return n;throw t}},to_json:function(t,e=!1,i=!1,n=!1){"object"!=typeof e||Array.isArray(e)||(n=e.sort_keys??n,i=e.pretty_print??i,e=e.ensure_ascii??!1),n&&(t=Object.keys(t).sort().reduce(((e,i)=>(e[i]=t[i],e)),{}));let o=JSON.stringify(t,void 0,i?2:void 0);return e&&(o=o.replace(/[\u007F-\uFFFF]/g,(t=>`\\u'${("0000"+t.charCodeAt(0).toString(16)).substring(-4)}`))),o},from_json:function(t){return JSON.parse(t)},closest:_,contains:c,is_number:$,bool:I,log:N,sin:D,cos:P,tan:R,asin:F,acos:U,atan:V,atan2:j,sqrt:K,max:B,min:H,average:Y,median:Z,statistical_mode:z,bitwise_and:function(t,e){return t&e},bitwise_or:function(t,e){return t|e},bitwise_xor:function(t,e){return t^e},bitwise_not:function(t){return~t},ord:function(t){if(1==t.length)return t.codePointAt(0);throw Error("Expected a character, but received a string")},multiply:function(t,e){return Number(t)*Number(e)},add:function(t,e){return Number(t)+Number(e)},regex_replace:function(t,e="",i=""){return t.replace(new RegExp(e,"g"),i)},regex_findall:function(t,e=""){return t.match(new RegExp(e,"g"))??[]},regex_findall_index:function(t,e="",i=0){return(t.match(new RegExp(e,"g"))??[])[i]},str:O},Li={states:l,is_state:function(t,e,i){try{const n=l(t,e);return Array.isArray(i)?i.includes(n):n==i}catch{return!1}},state_attr:u,is_state_attr:function(t,e,i,n){try{return u(t,e,i)==n}catch{return!1}},has_value:p,state_translated:X,attr_name_translated:J,attr_value_translated:Q,expand:k,is_hidden_entity:function(t,e){try{return t.entities[e].hidden??!1}catch{return!1}},device_entities:h,device_attr:m,is_device_attr:function(t,e,i,n){try{return null!=n&&m(t,e,i)==n}catch{return!1}},device_id:f,floors:function(t){return Object.keys(t.floors)},floor_id:b,floor_name:v,floor_areas:g,areas:function(t){try{return Object.keys(t.areas)}catch{return[]}},area_id:o,area_name:a,area_entities:r,area_devices:s,integration_entities:function(t,e){try{const i=[];if(e){for(const n in t.entities)t.entities[n].platform==e&&i.push(n);i.sort()}return i}catch{return[]}},labels:x,label_areas:L,label_devices:A,label_entities:S,iif:w,distance:function(t,...e){try{let i,n,o,a,r=0;if("string"==typeof e[0])i=t.states[e[0]].attributes.latitude,o=t.states[e[0]].attributes.longitude,r=1;else if("object"!=typeof e[0]||Array.isArray(e[0])){if("number"!=typeof e[0])return null;if("number"!=typeof e[1])throw Error("Latitude provided but not longitude 1");i=e[0],o=e[1],r=2}else i=e[0].attributes.latitude,o=e[0].attributes.longitude,r=1;if("string"==typeof e[r])n=t.states[e[r]].attributes.latitude,a=t.states[e[r]].attributes.longitude;else if("object"!=typeof e[r]||Array.isArray(e[r]))if("number"==typeof e[r]){if("number"!=typeof e[r+1])throw Error("Latitude provided but not longitude 2");n=e[r],a=e[r+1]}else n=t.states["zone.home"].attributes.latitude,a=t.states["zone.home"].attributes.longitude;else n=e[r].attributes.latitude,a=e[r].attributes.longitude;return y([i,o],[n,a],"mi"==t.config.unit_system.length)}catch{return null}},closest:_},Ai={label_id:C,label_name:T,now:_i,utcnow:function(){return yi.datetime.utcnow()},today_at:bi,as_datetime:vi,as_timestamp:gi,as_local:ki,strptime:function(t,e,i=void 0,n=!1){"object"!=typeof i||Array.isArray(i)||i instanceof ui||i instanceof pi||(n=i.utc??n,i=i.fallback??void 0);try{e=e.replace(/%z/g,"%Z");const i=yi.datetime.strptime(t,e,n);return M(i.toString()),i}catch(t){if(i)return i;throw t}},time_since:Ei,time_until:xi,as_timedelta:function(t){try{let e;if(t.includes(":")||t.includes(" ")||/^\d*\.?\d*$/.test(t)){let i,n;t.includes(" ")?t.includes("days")?[i,n]=t.split(" days "):[i,n]=t.split(" "):(i=0,n=t);const[o,a,r]=n.split(":").reverse();e=yi.timedelta(Number(i),Number(o.replace(",",".")??0),0,Number(a??0),Number(r??0))}else{if(!t.startsWith("P"))return null;{const i=t.replace(/P|T/g,"").match(/(\d*?)[A-Z]/g);if(!i)return null;const n={};for(const t of i){const e=t.match(/^(\d*)/),i=t.match(/[A-Z]$/);e&&i&&(n[i[0]]=parseFloat(e[0]))}e=yi.timedelta(n.D,n.S,0,n.M,n.H,n.W)}}return M(e.toString()),e}catch{return null}},float:function(t,e){try{const e=parseFloat(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}},is_number:$,int:function(t,e){try{const e=parseInt(t);return M(e.toString()),e}catch(t){if(e)return e;throw t}},bool:I,log:N,sin:D,cos:P,tan:R,asin:F,acos:U,atan:V,atan2:j,sqrt:K,max:B,min:H,average:Y,median:Z,statistical_mode:z,set:function(...t){return new Set(t.flat(1/0))},list:function(...t){return t.map((t=>Array.from(t))).flat(1/0)},zip:function(...t){if(t.length>1)return t[0].map(((e,i)=>{const n=[e];for(let e=1;et.name.localeCompare(e.name)));for(const t of e)E[t.label_id]=t}}(t),Mi=t,"string"==typeof e&&(e.includes("{{")&&e.includes("}}")||e.includes("{%")&&e.includes("%}"))?(e=$i.renderString(structuredClone(e),{hass:t,_states:d(t),...i}).trim(),[void 0,null,"undefined","null","None"].includes(e)?"":"true"==e.toLowerCase()||"false"!=e.toLowerCase()&&e):e}},740:(t,e,i)=>{"use strict";i.d(e,{XX:()=>V,c0:()=>x,qy:()=>E});const n=globalThis,o=n.trustedTypes,a=o?o.createPolicy("lit-html",{createHTML:t=>t}):void 0,r="$lit$",s=`lit$${(Math.random()+"").slice(9)}$`,c="?"+s,l=`<${c}>`,u=document,p=()=>u.createComment(""),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,h=Array.isArray,m="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,_=/>/g,b=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,g=/"/g,k=/^(?:script|style|textarea|title)$/i,w=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),E=w(1),x=(w(2),Symbol.for("lit-noChange")),C=Symbol.for("lit-nothing"),T=new WeakMap,L=u.createTreeWalker(u,129);function A(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==a?a.createHTML(e):e}const S=(t,e)=>{const i=t.length-1,n=[];let o,a=2===e?"":"",c=f;for(let e=0;e"===p[0]?(c=o??f,d=-1):void 0===p[1]?d=-2:(d=c.lastIndex-p[2].length,u=p[1],c=void 0===p[3]?b:'"'===p[3]?g:v):c===g||c===v?c=b:c===y||c===_?c=f:(c=b,o=void 0);const m=c===b&&t[e+1].startsWith("/>")?" ":"";a+=c===f?i+l:d>=0?(n.push(u),i.slice(0,d)+r+i.slice(d)+s+m):i+s+(-2===d?e:m)}return[A(t,a+(t[i]||"")+(2===e?"":"")),n]};class O{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let a=0,l=0;const u=t.length-1,d=this.parts,[h,m]=S(t,e);if(this.el=O.createElement(h,i),L.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=L.nextNode())&&d.length0){n.textContent=o?o.emptyScript:"";for(let i=0;ih(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==C&&d(this._$AH)?this._$AA.nextSibling.data=t:this.$(u.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=O.createElement(A(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new $(n,this),i=t.u(this.options);t.p(e),this.$(i),this._$AH=t}}_$AC(t){let e=T.get(t.strings);return void 0===e&&T.set(t.strings,e=new O(t)),e}T(t){h(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new I(this.k(p()),this.k(p()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}_$AI(t,e=this,i,n){const o=this.strings;let a=!1;if(void 0===o)t=M(this,t,e,0),a=!d(t)||t!==this._$AH&&t!==x,a&&(this._$AH=t);else{const n=t;let r,s;for(t=o[0],r=0;r{const n=i?.renderBefore??e;let o=n._$litPart$;if(void 0===o){const t=i?.renderBefore??null;n._$litPart$=o=new I(e.insertBefore(p(),t),t,void 0,i??{})}return o._$AI(t),o}},385:(t,e,i)=>{"use strict";i.d(e,{EM:()=>n,Ls:()=>l,MZ:()=>s,wk:()=>c});const n=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};var o=i(1);const a={attribute:!0,type:String,converter:o.W3,reflect:!1,hasChanged:o.Ec},r=(t=a,e,i)=>{const{kind:n,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(i.name,t),"accessor"===n){const{name:n}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(n,o,t)},init(e){return void 0!==e&&this.C(n,void 0,t),e}}}if("setter"===n){const{name:n}=i;return function(i){const o=this[n];e.call(this,i),this.requestUpdate(n,o,t)}}throw Error("Unsupported decorator location: "+n)};function s(t){return(e,i)=>"object"==typeof i?r(t,e,i):((t,e,i)=>{const n=e.hasOwnProperty(i);return e.constructor.createProperty(i,n?{...t,wrapped:!0}:t),n?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function c(t){return s({...t,state:!0,attribute:!1})}function l(t){return(e,i)=>{const n="function"==typeof e?e:e[i];Object.assign(n,t)}}},670:(t,e,i)=>{"use strict";i.d(e,{WF:()=>a,AH:()=>n.AH,qy:()=>o.qy});var n=i(1),o=i(740);class a extends n.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,o.XX)(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return o.c0}}a._$litElement$=!0,a.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:a});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:a}),(globalThis.litElementVersions??=[]).push("4.0.3")}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var i=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(t,e)=>{for(var i in e)__webpack_require__.o(e,i)&&!__webpack_require__.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var __webpack_exports__={};(()=>{"use strict";var t=__webpack_require__(670),e=__webpack_require__(385),i=__webpack_require__(703);function n(t){return null==t}var o={isNothing:n,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:n(t)?[]:[t]},repeat:function(t,e){var i,n="";for(i=0;is&&(e=n-s+(a=" ... ").length),i-n>s&&(i=n+s-(r=" ...").length),{str:a+t.slice(e,i).replace(/\t/g,"→")+r,pos:n-e+a.length}}function l(t,e){return o.repeat(" ",e-t.length)+t}var u=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var i,n=/\r?\n|\r|\0/g,a=[0],r=[],s=-1;i=n.exec(t.buffer);)r.push(i.index),a.push(i.index+i[0].length),t.position<=i.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var u,p,d="",h=Math.min(t.line+e.linesAfter,r.length).toString().length,m=e.maxLength-(e.indent+h+3);for(u=1;u<=e.linesBefore&&!(s-u<0);u++)p=c(t.buffer,a[s-u],r[s-u],t.position-(a[s]-a[s-u]),m),d=o.repeat(" ",e.indent)+l((t.line-u+1).toString(),h)+" | "+p.str+"\n"+d;for(p=c(t.buffer,a[s],r[s],t.position,m),d+=o.repeat(" ",e.indent)+l((t.line+1).toString(),h)+" | "+p.str+"\n",d+=o.repeat("-",e.indent+h+3+p.pos)+"^\n",u=1;u<=e.linesAfter&&!(s+u>=r.length);u++)p=c(t.buffer,a[s+u],r[s+u],t.position-(a[s]-a[s+u]),m),d+=o.repeat(" ",e.indent)+l((t.line+u+1).toString(),h)+" | "+p.str+"\n";return d.replace(/\n$/,"")},p=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"],h=function(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===p.indexOf(e))throw new s('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach((function(i){t[i].forEach((function(t){e[String(t)]=i}))})),e}(e.styleAliases||null),-1===d.indexOf(this.kind))throw new s('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function m(t,e){var i=[];return t[e].forEach((function(t){var e=i.length;i.forEach((function(i,n){i.tag===t.tag&&i.kind===t.kind&&i.multi===t.multi&&(e=n)})),i[e]=t})),i}function f(t){return this.extend(t)}f.prototype.extend=function(t){var e=[],i=[];if(t instanceof h)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new s("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(t){if(!(t instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(f.prototype);return n.implicit=(this.implicit||[]).concat(e),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=m(n,"implicit"),n.compiledExplicit=m(n,"explicit"),n.compiledTypeMap=function(){var t,e,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(i.multi[t.kind].push(t),i.multi.fallback.push(t)):i[t.kind][t.tag]=i.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),w=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),E=/^[-+]?[0-9]+e/,x=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!w.test(t)||"_"===t[t.length-1])},construct:function(t){var e,i;return i="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:i*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||o.isNegativeZero(t))},represent:function(t,e){var i;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(t))return"-0.0";return i=t.toString(10),E.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),C=y.extend({implicit:[_,b,k,x]}),T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),L=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),A=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==T.exec(t)||null!==L.exec(t))},construct:function(t){var e,i,n,o,a,r,s,c,l=0,u=null;if(null===(e=T.exec(t))&&(e=L.exec(t)),null===e)throw new Error("Date resolve error");if(i=+e[1],n=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(i,n,o));if(a=+e[4],r=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),c=new Date(Date.UTC(i,n,o,a,r,s,l)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(t){return t.toISOString()}}),S=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",M=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,n=0,o=t.length,a=O;for(i=0;i64)){if(e<0)return!1;n+=6}return n%8==0},construct:function(t){var e,i,n=t.replace(/[\r\n=]/g,""),o=n.length,a=O,r=0,s=[];for(e=0;e>16&255),s.push(r>>8&255),s.push(255&r)),r=r<<6|a.indexOf(n.charAt(e));return 0==(i=o%4*6)?(s.push(r>>16&255),s.push(r>>8&255),s.push(255&r)):18===i?(s.push(r>>10&255),s.push(r>>2&255)):12===i&&s.push(r>>4&255),new Uint8Array(s)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,i,n="",o=0,a=t.length,r=O;for(e=0;e>18&63],n+=r[o>>12&63],n+=r[o>>6&63],n+=r[63&o]),o=(o<<8)+t[e];return 0==(i=a%3)?(n+=r[o>>18&63],n+=r[o>>12&63],n+=r[o>>6&63],n+=r[63&o]):2===i?(n+=r[o>>10&63],n+=r[o>>4&63],n+=r[o<<2&63],n+=r[64]):1===i&&(n+=r[o>>2&63],n+=r[o<<4&63],n+=r[64],n+=r[64]),n}}),$=Object.prototype.hasOwnProperty,I=Object.prototype.toString,N=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,n,o,a,r=[],s=t;for(e=0,i=s.length;e>10),56320+(t-65536&1023))}for(var st=new Array(256),ct=new Array(256),lt=0;lt<256;lt++)st[lt]=at(lt)?1:0,ct[lt]=at(lt);function ut(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||U,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function pt(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=u(i),new s(e,i)}function dt(t,e){throw pt(t,e)}function ht(t,e){t.onWarning&&t.onWarning.call(null,pt(t,e))}var mt={YAML:function(t,e,i){var n,o,a;null!==t.version&&dt(t,"duplication of %YAML directive"),1!==i.length&&dt(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&dt(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),a=parseInt(n[2],10),1!==o&&dt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&ht(t,"unsupported YAML version of the document")},TAG:function(t,e,i){var n,o;2!==i.length&&dt(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],X.test(n)||dt(t,"ill-formed tag handle (first argument) of the TAG directive"),V.call(t.tagMap,n)&&dt(t,'there is a previously declared suffix for "'+n+'" tag handle'),J.test(o)||dt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){dt(t,"tag prefix is malformed: "+o)}t.tagMap[n]=o}};function ft(t,e,i,n){var o,a,r,s;if(e1&&(t.result+=o.repeat("\n",e-1))}function wt(t,e){var i,n,o=t.tag,a=t.anchor,r=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=r),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,dt(t,"tab characters must not be used in indentation")),45===n)&&it(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,vt(t,!0,-1)&&t.lineIndent<=e)r.push(null),n=t.input.charCodeAt(t.position);else if(i=t.line,Ct(t,e,B,!1,!0),r.push(t.result),vt(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&0!==n)dt(t,"bad indentation of a sequence entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente)&&(_&&(r=t.line,s=t.lineStart,c=t.position),Ct(t,e,H,!0,o)&&(_?f=t.result:y=t.result),_||(_t(t,d,h,m,f,y,r,s,c),m=f=y=null),vt(t,!0,-1),l=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==l)dt(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===a?dt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?dt(t,"repeat of an indentation width identifier"):(p=e+a-1,u=!0)}if(et(r)){do{r=t.input.charCodeAt(++t.position)}while(et(r));if(35===r)do{r=t.input.charCodeAt(++t.position)}while(!tt(r)&&0!==r)}for(;0!==r;){for(bt(t),t.lineIndent=0,r=t.input.charCodeAt(t.position);(!u||t.lineIndentp&&(p=t.lineIndent),tt(r))d++;else{if(t.lineIndent0){for(o=r,a=0;o>0;o--)(r=ot(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+r:dt(t,"expected hexadecimal character");t.result+=rt(a),t.position++}else dt(t,"unknown escape sequence");i=n=t.position}else tt(s)?(ft(t,i,n,!0),kt(t,vt(t,!1,e)),i=n=t.position):t.position===t.lineStart&>(t)?dt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}dt(t,"unexpected end of the stream within a double quoted scalar")}(t,h)?_=!0:function(t){var e,i,n;if(42!==(n=t.input.charCodeAt(t.position)))return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!it(n)&&!nt(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&dt(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),V.call(t.anchorMap,i)||dt(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],vt(t,!0,-1),!0}(t)?(_=!0,null===t.tag&&null===t.anchor||dt(t,"alias node should not have any properties")):function(t,e,i){var n,o,a,r,s,c,l,u,p=t.kind,d=t.result;if(it(u=t.input.charCodeAt(t.position))||nt(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(it(n=t.input.charCodeAt(t.position+1))||i&&nt(n)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,r=!1;0!==u;){if(58===u){if(it(n=t.input.charCodeAt(t.position+1))||i&&nt(n))break}else if(35===u){if(it(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&>(t)||i&&nt(u))break;if(tt(u)){if(s=t.line,c=t.lineStart,l=t.lineIndent,vt(t,!1,-1),t.lineIndent>=e){r=!0,u=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=c,t.lineIndent=l;break}}r&&(ft(t,o,a,!1),kt(t,t.line-s),o=a=t.position,r=!1),et(u)||(a=t.position+1),u=t.input.charCodeAt(++t.position)}return ft(t,o,a,!1),!!t.result||(t.kind=p,t.result=d,!1)}(t,h,j===i)&&(_=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(_=c&&wt(t,m))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&dt(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),l=0,u=t.implicitTypes.length;l"),null!==t.result&&d.kind!==t.kind&&dt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):dt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||_}function Tt(t){var e,i,n,o,a=t.position,r=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(vt(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(r=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!it(o);)o=t.input.charCodeAt(++t.position);for(n=[],(i=t.input.slice(e,t.position)).length<1&&dt(t,"directive name must not be less than one character in length");0!==o;){for(;et(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!tt(o));break}if(tt(o))break;for(e=t.position;0!==o&&!it(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==o&&bt(t),V.call(mt,i)?mt[i](t,i,n):ht(t,'unknown document directive "'+i+'"')}vt(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,vt(t,!0,-1)):r&&dt(t,"directives end mark is expected"),Ct(t,t.lineIndent-1,H,!1,!0),vt(t,!0,-1),t.checkLineBreaks&&W.test(t.input.slice(a,t.position))&&ht(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&>(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,vt(t,!0,-1)):t.position=55296&&n<=56319&&e+1=56320&&i<=57343?1024*(n-55296)+i-56320+65536:n}function fe(t){return/^\n* /.test(t)}var ye=1,_e=2,be=3,ve=4,ge=5;function ke(t,e,i,n,o){t.dump=function(){if(0===e.length)return t.quotingType===re?'""':"''";if(!t.noCompatMode&&(-1!==ne.indexOf(e)||oe.test(e)))return t.quotingType===re?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,i),r=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),c=n||t.flowLevel>-1&&i>=t.flowLevel;switch(function(t,e,i,n,o,a,r,s){var c,l,u=0,p=null,d=!1,h=!1,m=-1!==n,f=-1,y=pe(l=me(t,0))&&l!==Mt&&!ue(l)&&l!==Ht&&l!==qt&&l!==Yt&&l!==Bt&&l!==Gt&&l!==Xt&&l!==Qt&&l!==ee&&l!==Ft&&l!==Vt&&l!==Kt&&l!==Pt&&l!==te&&l!==Zt&&l!==zt&&l!==jt&&l!==Rt&&l!==Ut&&l!==Wt&&l!==Jt&&function(t){return!ue(t)&&t!==Yt}(me(t,t.length-1));if(e||r)for(c=0;c=65536?c+=2:c++){if(!pe(u=me(t,c)))return ge;y=y&&he(u,p,s),p=u}else{for(c=0;c=65536?c+=2:c++){if((u=me(t,c))===It)d=!0,m&&(h=h||c-f-1>n&&" "!==t[f+1],f=c);else if(!pe(u))return ge;y=y&&he(u,p,s),p=u}h=h||m&&c-f-1>n&&" "!==t[f+1]}return d||h?i>9&&fe(t)?ge:r?a===re?ge:_e:h?ve:be:!y||r||o(t)?a===re?ge:_e:ye}(e,c,t.indent,r,(function(e){return function(t,e){var i,n;for(i=0,n=t.implicitTypes.length;i"+we(e,t.indent)+Ee(ce(function(t,e){for(var i,n,o,a=/(\n+)([^\n]*)/g,r=(o=-1!==(o=t.indexOf("\n"))?o:t.length,a.lastIndex=o,xe(t.slice(0,o),e)),s="\n"===t[0]||" "===t[0];n=a.exec(t);){var c=n[1],l=n[2];i=" "===l[0],r+=c+(s||i||""===l?"":"\n")+xe(l,e),s=i}return r}(e,r),a));case ge:return'"'+function(t){for(var e,i="",n=0,o=0;o=65536?o+=2:o++)n=me(t,o),!(e=ie[n])&&pe(n)?(i+=t[o],n>=65536&&(i+=t[o+1])):i+=e||ae(n);return i}(e)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function we(t,e){var i=fe(t)?String(e):"",n="\n"===t[t.length-1];return i+(!n||"\n"!==t[t.length-2]&&"\n"!==t?n?"":"-":"+")+"\n"}function Ee(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function xe(t,e){if(""===t||" "===t[0])return t;for(var i,n,o=/ [^ ]/g,a=0,r=0,s=0,c="";i=o.exec(t);)(s=i.index)-a>e&&(n=r>a?r:s,c+="\n"+t.slice(a,n),a=n+1),r=s;return c+="\n",t.length-a>e&&r>a?c+=t.slice(a,r)+"\n"+t.slice(r+1):c+=t.slice(a),c.slice(1)}function Ce(t,e,i,n){var o,a,r,s="",c=t.tag;for(o=0,a=i.length;o tag resolver accepts not "'+l+'" style');n=c.represent[l](e,l)}t.dump=n}return!0}return!1}function Le(t,e,i,n,o,a,r){t.tag=null,t.dump=i,Te(t,i,!1)||Te(t,i,!0);var c,l=St.call(t.dump),u=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var p,d,h="[object Object]"===l||"[object Array]"===l;if(h&&(d=-1!==(p=t.duplicates.indexOf(i))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(o=!1),d&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(h&&d&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(function(t,e,i,n){var o,a,r,c,l,u,p="",d=t.tag,h=Object.keys(i);if(!0===t.sortKeys)h.sort();else if("function"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new s("sortKeys must be a boolean or a function");for(o=0,a=h.length;o1024)&&(t.dump&&It===t.dump.charCodeAt(0)?u+="?":u+="? "),u+=t.dump,l&&(u+=le(t,e)),Le(t,e+1,c,!0,l)&&(t.dump&&It===t.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=t.dump));t.tag=d,t.dump=p||"{}"}(t,e,t.dump,o),d&&(t.dump="&ref_"+p+t.dump)):(function(t,e,i){var n,o,a,r,s,c="",l=t.tag,u=Object.keys(i);for(n=0,o=u.length;n1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Le(t,e,r,!1,!1)&&(c+=s+=t.dump));t.tag=l,t.dump="{"+c+"}"}(t,e,t.dump),d&&(t.dump="&ref_"+p+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!r&&e>0?Ce(t,e-1,t.dump,o):Ce(t,e,t.dump,o),d&&(t.dump="&ref_"+p+t.dump)):(function(t,e,i){var n,o,a,r="",s=t.tag;for(n=0,o=i.length;n",t.dump=c+" "+t.dump)}return!0}function Ae(t,e){var i,n,o=[],a=[];for(Se(t,o,a),i=0,n=a.length;i=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};class Be extends t.WF{constructor(){super(...arguments),this.baseTabIndex=0,this.entryIndex=-1,this.actionsTabIndex=0,this.touchpadTabIndex=2,this.guiMode=!0,this.yamlStringsCache={},this.people=[],this.BASE_TABS=["general","layout","actions","icons"],this.TOUCHPAD_TABS=["up","down","center","left","right"],this.DEFAULT_KEYS=[],this.DEFAULT_SOURCES=[],this.DEFAULT_ACTIONS=[]}static get properties(){return{hass:{},config:{}}}setConfig(t){this.config=t}configChanged(t){t=this.autofillDefaultFields(t);const e=new Event("config-changed",{bubbles:!0,composed:!0});e.detail={config:t},this.dispatchEvent(e),this.requestUpdate()}entriesChanged(t){let e;e=3===this.baseTabIndex?"custom_icons":"custom_actions",this.configChanged({...this.config,[e]:t})}entryChanged(t){let e,i,n;if(3===this.baseTabIndex)e=structuredClone(this.config.custom_icons??[]),i=e[this.entryIndex],n={...i,...t};else switch(e=structuredClone(this.config.custom_actions??[]),i=e[this.entryIndex],this.renderTemplate(i?.type,this.getEntryContext(i))){case"touchpad":if(2!=this.touchpadTabIndex){n={...i,[this.TOUCHPAD_TABS[this.touchpadTabIndex]]:{...i[this.TOUCHPAD_TABS[this.touchpadTabIndex]],...t}};break}default:n={...i,...t}}e[this.entryIndex]=n,this.entriesChanged(e)}toggleGuiMode(t){this.yamlString=void 0,this.configChanged(this.config),this.guiMode=!this.guiMode}get activeEntry(){if(this.entryIndex<0)return;let t;return 3===this.baseTabIndex?(this.config.custom_icons??[])[this.entryIndex]:(t=(this.config.custom_actions??[])[this.entryIndex],"touchpad"===this.renderTemplate(t?.type,this.getEntryContext(t))&&2!=this.touchpadTabIndex?t[this.TOUCHPAD_TABS[this.touchpadTabIndex]]??{}:t)}get yaml(){if(null==this.yamlString){let t="";switch(this.baseTabIndex){case 3:case 2:t=$e(this.activeEntry);break;case 1:t=$e(this.config.rows)}this.yamlString=["{}","[]"].includes(t.trim())?"":t}return this.yamlString??""}set yaml(t){this.yamlString=t;try{const t=Me(this.yaml);switch(this.baseTabIndex){case 3:{const e=structuredClone(this.config.custom_icons??[]);e[this.entryIndex]=t,this.entriesChanged(e);break}case 2:{const e=structuredClone(this.config.custom_actions??[]);switch(this.renderTemplate(e[this.entryIndex].type,this.getEntryContext(t))){case"touchpad":if(2!=this.touchpadTabIndex){e[this.entryIndex]={...e[this.entryIndex],[this.TOUCHPAD_TABS[this.touchpadTabIndex]]:t};break}default:e[this.entryIndex]=t}this.entriesChanged(e);break}case 1:this.configChanged({...this.config,rows:t})}this.errors=void 0}catch(t){this.errors=[t.message]}}handleYamlCodeChanged(t){t.stopPropagation();const e=t.detail.value;e!=this.yaml&&(this.yaml=e)}handleStyleCodeChanged(t){t.stopPropagation();const e=t.detail.value;this.entryIndex>-1&&this.activeEntry?e!=this.activeEntry?.styles&&this.entryChanged({styles:e}):e!=this.config.styles&&this.configChanged({...this.config,styles:e})}handleActionCodeChanged(t){t.stopPropagation();const e=t.target.id,i=t.detail.value;if(this.yamlStringsCache[e]=i,this.activeEntry)try{const t=Me(i);if(JSON.stringify(t??{}).includes("null"))return;this.entryChanged({[e]:t}),this.errors=void 0}catch(t){this.errors=[t.message]}}handleEvalCodeChanged(t){t.stopPropagation();const e=t.target.id,i=t.detail.value;this.activeEntry&&this.entryChanged({type:this.activeEntry.type,name:this.activeEntry.name,[e]:{...this.activeEntry[e],eval:i}})}handleBaseTabSelected(t){this.yamlStringsCache={},this.yamlString=void 0,this.entryIndex=-1,this.guiMode=!0;const e=t.detail.index;this.baseTabIndex!=e&&(this.baseTabIndex=e)}handleActionsTabSelected(t){this.yamlStringsCache={};const e=t.detail.index;this.actionsTabIndex!=e&&(this.actionsTabIndex=e)}handleTouchpadTabSelected(t){this.yamlString=void 0,this.yamlStringsCache={};const e=t.detail.index;this.touchpadTabIndex!=e&&(this.touchpadTabIndex=e,this.setActionsTab(this.entryIndex))}handleSelectorChange(t){this.yamlStringsCache={};const e=t.target.id;let i=t.detail.value;switch(e.endsWith(".confirmation.exemptions")&&(i=(i??[]).map((t=>({user:t})))),this.baseTabIndex){case 3:case 2:this.entryChanged((0,je.HD)(structuredClone(this.activeEntry),e,i));break;default:this.configChanged({...this.config,[e]:i})}null==i&&setTimeout((()=>{this.configChanged(this.config)}),100)}handleLayoutActionListItemDragStart(t){t.stopPropagation(),t.isTrusted&&t.dataTransfer&&t.dataTransfer.setData("text/plain","- "+t.currentTarget.innerText)}addEntry(t){const e=t.detail.index;let i;switch(this.baseTabIndex){case 3:i=structuredClone(this.config.custom_icons)??[],i.push({name:`custom_icon_${(this.config.custom_icons??[]).length}`,path:""});break;default:{const t=Re[e];i=structuredClone(this.config.custom_actions)??[];let n=t;const o=this.config.custom_actions?.filter((e=>e.type==t));o&&o.length&&(n+=`_${(this.config.custom_actions??[]).length}`),i.push({type:Re[e],name:n});break}}this.entriesChanged(i);const n=this.shadowRoot?.querySelector(".features");n&&setTimeout((()=>n.scrollTop=n.scrollHeight),100)}removeEntry(t){const e=t.currentTarget.index;let i;i=3===this.baseTabIndex?this.config.custom_icons??[]:this.config.custom_actions??[],i=structuredClone(i),i.splice(e,1),this.entriesChanged(i)}moveEntry(t){let e;t.stopPropagation(),e=3===this.baseTabIndex?this.config.custom_icons??[]:this.config.custom_actions??[],e=structuredClone(e);const{oldIndex:i,newIndex:n}=t.detail;e.splice(n,0,e.splice(i,1)[0]),this.entriesChanged(e)}copyEntry(t){let e;e=3===this.baseTabIndex?this.config.custom_icons??[]:this.config.custom_actions??[],e=structuredClone(e);const i=t.currentTarget.index,n=structuredClone(e[i]);n.name=`${n.name}_copy`,e.splice(i,1,e[i],n),this.entriesChanged(e)}editEntry(t){this.yamlStringsCache={},this.yamlString=void 0;const e=t.currentTarget.index;3===this.baseTabIndex||(this.setActionsTab(e),this.touchpadTabIndex=2),this.entryIndex=e}exitEditEntry(t){this.yamlStringsCache={},this.yamlString=void 0,this.entryIndex=-1}setActionsTab(t){let e=this.config.custom_actions?.[t]??{type:"button",name:""};const i=e.type;"touchpad"==i&&2!=this.touchpadTabIndex&&(e=e[this.TOUCHPAD_TABS[this.touchpadTabIndex]]??{});const n=this.getEntryContext(e);"none"!=this.renderTemplate(e?.mouse_action?.action??"none",n)||"none"!=this.renderTemplate(e?.multi_mouse_action?.action??"none",n)?"touchpad"==i&&2==this.touchpadTabIndex?this.actionsTabIndex=3:this.actionsTabIndex=0:"none"!=this.renderTemplate(e?.momentary_start_action?.action??"none",n)||"none"!=this.renderTemplate(e?.momentary_end_action?.action??"none",n)?"touchpad"==i&&2==this.touchpadTabIndex?this.actionsTabIndex=2:this.actionsTabIndex=1:"touchpad"!=i||"none"==this.renderTemplate(e?.multi_tap_action?.action??"none",n)&&"none"==this.renderTemplate(e?.multi_double_tap_action?.action??"none",n)&&"none"==this.renderTemplate(e?.multi_hold_action?.action??"none",n)?this.actionsTabIndex=0:this.actionsTabIndex=1}buildIconElement(e,i){let n=t.qy``,o=this.renderTemplate(e.icon??e.path??"",i);if(!o.includes(":")){const t=(this.config.custom_icons??[]).filter((t=>t.name==o))[0]??Ve.o$.filter((t=>t.name==o))[0];o=t?.path??o}if(!o.length)switch(this.renderTemplate(e?.type,i)){case"touchpad":o="mdi:gesture-tap-button";break;case"slider":o=this.renderTemplate(e?.vertical??!1,i)?"mdi:tune-vertical-variant":"mdi:tune-variant";break;default:o="mdi:circle-small"}return n=o.includes(":")?t.qy``:t.qy``,n}buildEntryList(){let e,i;return 3===this.baseTabIndex?(e=this.config.custom_icons??[],i="Custom Icons"):(e=this.config.custom_actions??[],i="Custom Actions"),t.qy`
${i}
${e.map(((e,i)=>{const n=this.getEntryContext(e),o=this.buildIconElement(e,n),a=this.renderTemplate(e.label,n),r=this.renderTemplate(e.type,n),s=this.renderTemplate(e.name,n);return t.qy`
${o}
${r} ⸱ ${s} ${a?` ⸱ ${a}`:""} ${n.config.entity?t.qy`${n.config.entity}${n.config.attribute?` ⸱ ${n.config.attribute}`:""}`:""}
`}))}
`}buildAddEntryButton(){return 3===this.baseTabIndex?t.qy``:t.qy`${Re.map((e=>t.qy`${e}`))}`}buildEntryHeader(){let e;return e=3===this.baseTabIndex?"SVG Icon":this.renderTemplate(this.config.custom_actions?.[this.entryIndex]?.type??"button",this.getEntryContext(this.activeEntry??{type:"button",name:""})),t.qy`
${e}
`}buildSelector(e,i,n,o){const a={...this.hass,localize:(t,e)=>({"ui.panel.lovelace.editor.action-editor.actions.repeat":"Repeat","ui.panel.lovelace.editor.action-editor.actions.fire-dom-event":"Fire DOM event","ui.panel.lovelace.editor.action-editor.actions.eval":"Evaluate JS","ui.panel.lovelace.editor.action-editor.actions.key":"Key","ui.panel.lovelace.editor.action-editor.actions.source":"Source","ui.panel.lovelace.editor.action-editor.actions.keyboard":"Keyboard","ui.panel.lovelace.editor.action-editor.actions.textbox":"Textbox","ui.panel.lovelace.editor.action-editor.actions.search":"Search"}[t]??this.hass.localize(t,e))};let r;switch(this.baseTabIndex){case 3:case 2:r=(0,je.vz)(this.activeEntry,i);break;case 1:break;default:r=this.config[i]}return i.endsWith(".confirmation.exemptions")&&(r=(r??[]).map((t=>t.user))),t.qy``}buildMainFeatureOptions(e=t.qy``){const i=this.renderTemplate(this.activeEntry.autofill_entity_id??this.config.autofill_entity_id??Ue.$6,this.getEntryContext(this.activeEntry)),n=(Array.isArray(this.activeEntry?.tap_action?.target?.entity_id)?this.activeEntry?.tap_action?.target?.entity_id?.[0]:this.activeEntry?.tap_action?.target?.entity_id)??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id;return t.qy`${this.buildSelector("Name","name",{text:{}})} ${this.buildSelector("Entity","entity_id",{entity:{}},i?n:void 0)} ${this.hass.states[this.activeEntry?.entity_id??(i?n:"")??""]?this.buildSelector("Attribute","value_attribute",{attribute:{entity_id:this.activeEntry?.entity_id??n}},i?"state":void 0):""}
${e} ${this.buildSelector("Autofill","autofill_entity_id",{boolean:{}},this.config.autofill_entity_id??Ue.$6)} ${this.buildSelector("Haptics","haptics",{boolean:{}},i?this.config.haptics??Ue.Xy:Ue.Xy)}
`}buildAppearancePanel(e=t.qy``){return t.qy`
Appearance
${this.buildAlertBox("Change the feature appearance based on its value using a template like '{{ value | float }}'.")} ${e}${this.buildCodeEditor("css")}
`}buildCommonAppearanceOptions(){const e=this.getEntryContext(this.activeEntry??{type:"button",name:""});let i,n=this.renderTemplate(this.activeEntry?.icon??"",e);if(n&&!n.includes(":")){const e=(this.config.custom_icons??[]).filter((t=>t.name==n))[0]??Ve.o$.filter((t=>t.name==n))[0];n=e?.path??n,i=t.qy``}return t.qy`${this.buildSelector("Label","label",{text:{multiline:!0}})}
${this.buildSelector("Icon","icon",{icon:{}})}${i??""}${this.buildSelector("Units","unit_of_measurement",{text:{}})}
`}buildInteractionsPanel(e){return t.qy`
Interactions
${e}
`}buildActionOption(e,i,n,o=!1){const a=this.getEntryContext(this.activeEntry??{}),r=this.renderTemplate(this.activeEntry.autofill_entity_id??this.config.autofill_entity_id??Ue.$6,a),s=this.renderTemplate(this.activeEntry?.[i]?.action??"none",a),c=this.renderTemplate(this.activeEntry?.[i]?.platform??this.config.platform??"Android TV",a);return t.qy`
${this.buildSelector(e,i,n)} ${"none"!=s&&i.includes("double_tap_action")?this.buildSelector("Double tap window",`${i}.double_tap_window`,{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},(r?this.config.double_tap_window:void 0)??Ue.jc):i.includes("hold_action")&&this.activeEntry[i]?t.qy`
${this.buildSelector("Hold time",`${i}.hold_time`,{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},(r?this.config.hold_time:void 0)??Ue.At)} ${"repeat"==this.renderTemplate(this.activeEntry?.[i]?.action,a)?this.buildSelector("Repeat delay",`${i}.repeat_delay`,{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},(r?this.config.repeat_delay:void 0)??Ue.a3):""}
`:"none"!=s&&i.includes("mouse_action")?this.buildSelector("Repeat delay",`${i}.repeat_delay`,{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},0):""} ${"key"==s?t.qy`
${["Kodi","LG webOS"].includes(c)?this.buildSelector("Media Player ID",`${i}.media_player_id`,{entity:{filter:{domain:"media_player"}}},r?this.config.media_player_id:void 0):this.buildSelector("Remote ID",`${i}.remote_id`,{entity:{filter:{domain:"remote"}}},r?this.config.remote_id:void 0)} ${this.buildSelector("Platform",`${i}.platform`,{select:{mode:"dropdown",options:Ne,reorder:!1}},r?this.config.platform??"Android TV":"Android TV")}
${this.buildSelector("Key",`${i}.key`,{text:{}})}`:""} ${"source"==s?t.qy`
${["Android TV"].includes(c)?this.buildSelector("Remote ID",`${i}.remote_id`,{entity:{filter:{domain:"remote"}}},r?this.config.remote_id:void 0):this.buildSelector("Media Player ID",`${i}.media_player_id`,{entity:{filter:{domain:"media_player"}}},r?this.config.media_player_id:void 0)} ${this.buildSelector("Platform",`${i}.platform`,{select:{mode:"dropdown",options:Ne,reorder:!1}},r?this.config.platform??"Android TV":"Android TV")}
${this.buildSelector("Source",`${i}.source`,{text:{}})}`:""} ${["keyboard","textbox","search"].includes(s)?t.qy`
${this.buildSelector("Keyboard ID",`${i}.keyboard_id`,{entity:{filter:{domain:["remote","media_player"]}}},r?this.config.keyboard_id:void 0)} ${this.buildSelector("Platform",`${i}.platform`,{select:{mode:"dropdown",options:Ie,reorder:!1}},r&&Ie.includes(this.config.platform)?this.config.platform:"Android TV")}
${["Android TV","Roku"].includes(c)?t.qy`
${this.buildSelector("Remote ID",`${i}.remote_id`,{entity:{filter:{domain:"remote"}}},r?this.config.remote_id:void 0)} ${"Roku"==c?this.buildSelector("Media Player ID",`${i}.media_player_id`,{entity:{filter:{domain:"media_player"}}},r?this.config.media_player_id:void 0):""}
`:""} ${this.buildSelector("Prompt",`${i}.keyboard_prompt`,{text:{}})}`:""} ${"more-info"==s?this.buildSelector("Entity",`${i}.target.entity_id`,{entity:{}},r?this.activeEntry?.entity_id??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id:void 0):""} ${"toggle"==s?this.buildSelector("Target",`${i}.target`,{target:{}}):""} ${o||"fire-dom-event"==s?this.buildCodeEditor("action",i):""} ${"eval"==s?t.qy`${this.buildAlertBox("Evaluating raw JavaScript strings in browser is considered extremely unsafe. Do not use unless you know what you're doing!","warning")} ${this.buildCodeEditor("eval",i)}`:""} ${"none"!=s?t.qy`${this.buildSelector("Confirmation",`${i}.confirmation`,{boolean:{}},!1)} ${this.activeEntry?.[i]?.confirmation?t.qy`${this.buildSelector("Text",`${i}.confirmation.text`,{text:{}})} ${this.buildSelector("Exemptions",`${i}.confirmation.exemptions`,{select:{multiple:!0,mode:"list",options:this.people,reorder:!1}})}`:""}`:""}
`}buildTabBar(e,i,n){return t.qy`${n.map((e=>t.qy``))}`}buildButtonGuiEditor(){const e=this.buildTabBar(this.actionsTabIndex,this.handleActionsTabSelected,["default","momentary"]);let i;const n=De.concat();n.splice(De.indexOf("repeat"),1);const o={ui_action:{actions:n}};return i=1===this.actionsTabIndex?t.qy`${e} ${this.buildAlertBox("Enabling momentary actions disables tap, double tap, and hold actions.","warning")} ${this.buildActionOption("Start behavior (optional)","momentary_start_action",o)} ${this.buildAlertBox("Set the action below, and then use the code editor to set a data field to the seconds the feature was held down using a template like '{{ hold_secs | float }}'.")} ${this.buildActionOption("End behavior (optional)","momentary_end_action",o,!0)}`:t.qy`${e} ${this.buildActionOption("Tap behavior (optional)","tap_action",o)} ${this.buildActionOption("Double tap behavior (optional)","double_tap_action",o)} ${this.buildActionOption("Hold behavior (optional)","hold_action",{ui_action:{actions:De}})}`,t.qy`${this.buildMainFeatureOptions()} ${this.buildAppearancePanel(this.buildCommonAppearanceOptions())} ${this.buildInteractionsPanel(i)}`}buildButtonPadGuiEditor(){return t.qy`Coming Soon!`}buildSliderGuiEditor(){const e=De.concat();e.splice(De.indexOf("repeat"),1);const i=this.getEntryContext(this.activeEntry??{}),n=Number(this.renderTemplate(this.activeEntry?.range?.[0],i)),o=Number(this.renderTemplate(this.activeEntry?.range?.[0],i)),a=Number(this.renderTemplate(this.activeEntry?.step,i)),r=this.renderTemplate(this.activeEntry?.unit_of_measurement,i);return t.qy`${this.buildMainFeatureOptions(t.qy`${this.buildSelector("Min","range.0",{number:{max:o??void 0,step:a,mode:"box",unit_of_measurement:r},RANGE_MIN:Ue.HB})} ${this.buildSelector("Max","range.1",{number:{min:n??void 0,step:a,mode:"box",unit_of_measurement:r},RANGE_MAX:Ue.bQ})} ${this.buildSelector("Step","step",{number:{min:0,step:a??Math.min(1,((o??Ue.bQ)-(n??Ue.HB))/Ue.zM),mode:"box",unit_of_measurement:r},STEP:Ue.RZ})} ${this.buildSelector("Update after action delay","value_from_hass_delay",{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},Ue.s$)}`)} ${this.buildAppearancePanel(t.qy`${this.buildCommonAppearanceOptions()}${this.buildSelector("Vertical","vertical",{boolean:{}},!1)}`)} ${this.buildInteractionsPanel(t.qy`${this.buildAlertBox()} ${this.buildActionOption("Behavior","tap_action",{ui_action:{actions:e}},!0)}`)}`}buildTouchpadGuiEditor(){const e=["default","multi-touch"];2==this.touchpadTabIndex&&e.push("momentary","mouse");const i=this.buildTabBar(this.actionsTabIndex,this.handleActionsTabSelected,e);let n;const o=De.concat();o.splice(De.indexOf("repeat"),1);const a={ui_action:{actions:o}};switch(this.actionsTabIndex){case 3:n=t.qy`${i} ${this.buildAlertBox("Enabling mouse actions disables directional swipe actions.","warning")} ${this.buildActionOption("Mouse behavior (optional)","mouse_action",a)} ${this.buildActionOption("Multi-touch mouse behavior (optional)","multi_mouse_action",a)}`;break;case 2:n=t.qy`${i} ${this.buildAlertBox("Enabling momentary actions disables tap, double tap, and hold actions.","warning")} ${this.buildActionOption("Start behavior (optional)","momentary_start_action",a)} ${this.buildAlertBox("Set the action below, and then use the code editor to set a data field to the seconds the feature was held down using a template like '{{ hold_secs | float }}'.")} ${this.buildActionOption("End behavior (optional)","momentary_end_action",a,!0)}`;break;case 1:n=t.qy`${i} ${this.buildActionOption(`Multi-touch ${2==this.touchpadTabIndex?"tap":"swipe"} behavior (optional)`,"multi_tap_action",a)} ${2==this.touchpadTabIndex?this.buildActionOption("Multi-touch double tap behavior (optional)","multi_double_tap_action",a):""} ${this.buildActionOption("Multi-touch hold behavior (optional)","multi_hold_action",{ui_action:{actions:De}})}`;break;default:n=t.qy`${i} ${this.buildActionOption((2==this.touchpadTabIndex?"Tap":"Swipe")+" behavior (optional)","tap_action",a)} ${2==this.touchpadTabIndex?this.buildActionOption("Double tap behavior (optional)","double_tap_action",a):""} ${this.buildActionOption("Hold behavior (optional)","hold_action",{ui_action:{actions:De}})}`}const r=this.buildTabBar(this.touchpadTabIndex,this.handleTouchpadTabSelected,this.TOUCHPAD_TABS);return t.qy`${r} ${2==this.touchpadTabIndex?this.buildMainFeatureOptions():""} ${this.buildAppearancePanel(this.buildCommonAppearanceOptions())} ${this.buildInteractionsPanel(n)}`}buildIconGuiEditor(){return t.qy`
${this.buildAlertBox("Icons must be resized to 24x24px to display correctly. Use a tool like https://yqnn.github.io/svg-path-editor/ to edit your SVG paths. If correctly sized the icon will perfectly fit in the preview ouline below.","info")} ${this.buildSelector("Name","name",{text:{}})} ${this.buildSelector("SVG Path","path",{text:{multiline:!0}})}
`}buildEntryGuiEditor(){let e;if(3===this.baseTabIndex)e=this.buildIconGuiEditor();else switch(this.config.custom_actions?.[this.entryIndex]?.type){case"slider":e=this.buildSliderGuiEditor();break;case"touchpad":e=this.buildTouchpadGuiEditor();break;default:e=this.buildButtonGuiEditor()}return t.qy`
${e}
`}buildCodeEditor(e,i){let n,o,a,r,s,c;switch(e){case"css":c="jinja2",o=(this.entryIndex>-1?this.activeEntry?.styles:this.config.styles)??"",a=this.handleStyleCodeChanged,n="CSS Styles",r=!0,s=!1;break;case"action":c="yaml",a=this.handleActionCodeChanged,i=i??"tap_action",o=this.yamlStringsCache[i]??$e(this.activeEntry?.[i]??{}),o="{}"==o.trim()?"":o,r=!0,s=!1;break;case"layout":c="yaml",o=this.yaml,a=this.handleYamlCodeChanged,o="[]"==o.trim()?"":o,r=!1,s=!1;break;case"eval":c="jinja2",o=this.yamlStringsCache[`${i}.eval`]??(this.activeEntry?.[i]).eval??"",a=this.handleEvalCodeChanged,r=!1,s=!1;break;default:c="yaml",o=this.yaml,a=this.handleYamlCodeChanged,r=!0,s=!0}return t.qy`
${n?t.qy`
${n}
`:""}
`}buildEntryEditor(){let e;return e=this.guiMode?this.buildEntryGuiEditor():this.buildCodeEditor("yaml"),t.qy`${this.buildEntryHeader()}
${e}
`}buildLayoutEditor(){const e=Array.from(new Set([...this.config.custom_actions?.map((t=>t.name))??[],...this.customActionsFromFile?.map((t=>t.name))??[]])),i=e.map((t=>this.config.custom_actions?.filter((e=>e.name==t))[0]??this.customActionsFromFile?.filter((e=>e.name==t))[0]??{type:"button",name:""})),n=this.DEFAULT_KEYS.filter((t=>!e.includes(t.name))),o=this.DEFAULT_SOURCES.filter((t=>!e.includes(t.name)));return t.qy`
${this.buildCodeEditor("layout")}
${i?.length?t.qy`
Custom Actions
    ${i.map((e=>{const i=this.getEntryContext(e),n=this.buildIconElement(e,i);return t.qy`
  • ${n} ${e.name}
  • `}))}

`:""}
${n.length?t.qy`
Default Keys
    ${n.map((e=>{const i=this.getEntryContext(e),n=this.buildIconElement(e,i);return t.qy`
  • ${n} ${e.name}
  • `}))}
`:""} ${o.length?t.qy`
Default Sources
    ${o.map((e=>{const i=this.getEntryContext(e),n=this.buildIconElement(e,i);return t.qy`
  • ${n} ${e.name}
  • `}))}
`:""}
`}buildGeneralEditor(){return t.qy`
Media Platform and Entity IDs
${this.buildSelector("Platform","platform",{select:{mode:"dropdown",options:Ne,reorder:!1}},"Android TV")} ${this.buildSelector("Remote ID","remote_id",{entity:{filter:{domain:"remote"}}})} ${this.buildSelector("Keyboard ID","keyboard_id",{entity:{filter:{domain:["remote","media_player"]}}})} ${this.buildSelector("Media Player ID","media_player_id",{entity:{filter:{domain:"media_player"}}})}
Action Timings
${this.buildSelector("Hold time","hold_time",{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},Ue.At)} ${this.buildSelector("Repeat delay","repeat_delay",{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},Ue.a3)} ${this.buildSelector("Double tap window","double_tap_window",{number:{min:0,step:0,mode:"box",unit_of_measurement:"ms"}},Ue.jc)}
Miscellaneous
${this.buildCodeEditor("css")}
${this.buildSelector("Autofill","autofill_entity_id",{boolean:{}},Ue.$6)} ${this.buildSelector("Haptics","haptics",{boolean:{}},Ue.Xy)}
${this.buildSelector("Title","title",{text:{}})}
${this.buildSelector("Custom Actions File","custom_actions_file",{text:{}})}
`}buildErrorPanel(){return t.qy`${this.errors&&this.errors.length>0?t.qy`
${this.hass.localize("ui.errors.config.error_detected")}:
    ${this.errors.map((e=>t.qy`
  • ${e}
  • `))}
`:""}`}buildAlertBox(e="Set the action below, and then use the code editor to set a data field to the feature's new value using a template like '{{ value | float }}'.",i="info"){return t.qy``}buildPeopleList(){this.people=[];const t=Object.keys(this.hass.states).filter((t=>t.startsWith("person.")));for(const e of t)this.people.push({value:this.hass.states[e].attributes.user_id,label:this.hass.states[e].attributes.friendly_name??this.hass.states[e].attributes.id??e})}fetchCustomActionsFromFile(t){if(!this.customActionsFromFile&&t){t=`${t.startsWith("/")?"":"/"}${t}`;try{const e=t.split(".").pop()?.toLowerCase();this.hass.fetchWithAuth(t).then((t=>"json"==e?t.json():t.text())).then((t=>{const i="json"==e?t:Me(t);if(!Array.isArray(i))throw TypeError(i);this.customActionsFromFile=i,this.requestUpdate()}))}catch(e){console.error(`File ${t} is not a valid JSON or YAML array\n${e}`),this.customActionsFromFile=[]}}}render(){if(!this.hass||!this.config)return t.qy``;const e={config:{...this.config,entity:(0,i.X)(this.hass,this.config.remote_id??this.config.media_player_id??this.config.keyboard_id??""),attribute:"state"}};this.buildPeopleList(),this.fetchCustomActionsFromFile((0,i.X)(this.hass,this.config.custom_actions_file??""));const n=(0,i.X)(this.hass,this.config.platform??"Android TV",e),[o,a]=(0,je.XO)(n);this.DEFAULT_KEYS=o,this.DEFAULT_SOURCES=a,this.DEFAULT_ACTIONS=[...o,...a];const r=this.buildTabBar(this.baseTabIndex,this.handleBaseTabSelected,this.BASE_TABS);let s;switch(this.baseTabIndex){case 3:case 2:s=this.entryIndex>-1&&this.activeEntry?t.qy`${this.buildEntryEditor()}`:t.qy`${this.buildEntryList()}${this.buildAddEntryButton()}`;break;case 1:s=this.buildLayoutEditor();break;default:s=this.buildGeneralEditor()}return t.qy`${r}${s}${this.buildErrorPanel()}`}renderTemplate(t,e){e={render:t=>this.renderTemplate(t,e),...e};const n=(0,i.X)(this.hass,t,e);if(n!=t)return n;if("string"==typeof t)for(const i of["VALUE","HOLD_SECS","UNIT"]){if(t==i)return e[i];t.includes(i)&&(t=t.replace(new RegExp(i,"g"),e[i]??""))}return t}getEntryContext(t){const e={VALUE:0,HOLD_SECS:0,UNIT:"",value:0,hold_secs:0,unit:"",config:{...t,entity:"",attribute:""}};e.config.attribute=this.renderTemplate(t?.value_attribute??"state",e),e.config.entity=this.renderTemplate(t?.entity_id??(Array.isArray(t?.tap_action?.target?.entity_id)?t?.tap_action?.target?.entity_id?.[0]:t?.tap_action?.target?.entity_id)??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id,e);const i=this.renderTemplate(t?.unit_of_measurement,e);e.UNIT=i,e.unit=i;const n=this.getFeatureValue(e.config.entity,e.config.attribute);return e.VALUE=n,e.value=n,e}getFeatureValue(t,e){if(this.hass.states[t]){if("state"!=e&&e){let i;const n=e.match(/\[\d+\]$/);if(n){const o=parseInt(n[0].replace(/\[|\]/g,""));return e=e.replace(n[0],""),i=this.hass.states[t].attributes[e],i&&Array.isArray(i)&&i.length?i[o]:void 0}if(i=this.hass.states[t].attributes[e],null!=i||"elapsed"==e)switch(e){case"brightness":return Math.round(100*parseInt(i??0)/255);case"elapsed":if(t.startsWith("timer.")){const e=this.hass.states[t].attributes.duration.split(":"),i=3600*parseInt(e[0])+60*parseInt(e[1])+parseInt(e[2]);if("idle"==this.hass.states[t].state)return 0;if("active"==this.hass.states[t].state){const e=(Date.parse(this.hass.states[t].attributes.finishes_at)-Date.now())/1e3,n=Math.floor(i-e);return Math.min(n,i)}{const e=this.hass.states[t].attributes.remaining.split(":"),n=3600*parseInt(e[0])+60*parseInt(e[1])+parseInt(e[2]);return Math.floor(i-n)}}default:return i}return i}return this.hass.states[t].state}return""}updatePlatform(t){switch(t){case"KODI":case"Kodi":return"Kodi";case"ROKU":case"Roku":return"Roku";case"FIRE":case"FIRETV":case"FIRE_TV":case"FIRE TV":case"Fire TV":return"Fire TV";case"BRAVIA":case"Sony BRAVIA":return"Sony BRAVIA";case"APPLE TV":case"Apple TV":return"Apple TV";case"SAMSUNG TV":case"Samsung TV":return"Samsung TV";case"WEBOS":case"LG webOS":return"LG webOS";case"ANDROID":case"ANDROIDTV":case"ANDROID_TV":case"ANDROID TV":case"Android TV":return"Android TV";default:return}}autofillDefaultFields(t){const e=structuredClone(t),i=[];for(const t of e.custom_actions??[])i.push(this.autofillDefaultEntryFields(e,t));return e.custom_actions=i,e}autofillDefaultEntryFields(t,e,i,n){const o=this.getEntryContext(e);if(this.renderTemplate(e.autofill_entity_id??t.autofill_entity_id??Ue.$6,o)){if(i&&n){const t=structuredClone([...this.customActionsFromFile??[],...this.DEFAULT_ACTIONS].filter((t=>t.name==i))[0])??{},o=t[n];e={...o,...e}}else{const t=structuredClone([...this.customActionsFromFile??[],...this.DEFAULT_ACTIONS].filter((t=>t.name==this.renderTemplate(e.name,o)))[0])??{};e={...t,...e,value_attribute:e.value_attribute??t.value_attribute}}for(const t of Pe)if(e[t]){const i=e[t]??{};switch(this.renderTemplate(i.action,o)){case"keyboard":case"textbox":case"search":case"key":case"source":break;case"toggle":case"more-info":case"service":case"perform-action":for(const t of["entity_id","device_id","area_id","label_id"])i.data?.[t]&&(i.target=i.target??{},i.target[t]=i.data?.[t],delete i.data?.[t]);default:delete i.keyboard_id,delete i.keyboard_prompt,delete i.remote_id,delete i.media_player_id,delete i.platform}e[t]=i}if("touchpad"==this.renderTemplate(e.type,o))for(const i of Fe)e[i]&&(e[i]=this.autofillDefaultEntryFields(t,e[i]??{},this.renderTemplate(e.name,o),i))}return e}handleUpdateDeprecatedConfig(){const t=this.updateDeprecatedFields(this.config);this.configChanged(t)}updateDeprecatedFields(t=this.config){const e=structuredClone(t);if("adb_id"in e&&(e.keyboard_id=e.adb_id,delete e.adb_id),"keyboard_mode"in e&&(e.platform=e.keyboard_mode,delete e.keyboard_mode),e.platform=this.updatePlatform(e.platform),"enable_button_feedback"in e&&(e.haptics=e.enable_button_feedback),"button_haptics"in e&&(e.haptics=e.button_haptics),!e.rows){const i=[],n=Object.keys(e).filter((t=>t.includes("_row")));for(const o of n){let n=t[o];"string"==typeof n&&(n=[n]),"volume_row"==o?n=["volume_"+n[0]]:"navigation_row"==o&&(n=["navigation_"+n[0]]),i.push(n),delete e[o]}e.rows=i}const i=JSON.stringify(e.rows??[]).replace(/vol_buttons/g,"volume_buttons").replace(/nav_buttons/g,"navigation_buttons").replace(/d_pad/g,"dpad").replace(/direction_pad/g,"dpad").replace(/num_pad/g,"numpad").replace(/number_pad/g,"numpad").replace(/x_pad/g,"xpad").replace(/gamepad/g,"xpad").replace(/xgamepad/g,"xpad").replace(/x_gamepad/g,"xpad").replace(/n_pad/g,"npad").replace(/ngamepad/g,"npad").replace(/n_gamepad/g,"npad").replace(/volume_slider/g,"slider").replace(/nav_touchpad/g,"touchpad").replace(/navigation_touchpad/g,"touchpad");if(e.rows=JSON.parse(i),!Array.isArray(e.custom_icons)&&"object"==typeof e.custom_icons&&null!=e.custom_icons){const t=[];for(const i of Object.keys(e.custom_icons))t.push({name:i,path:e?.custom_icons?.[i]});e.custom_icons=t}let n=[];if(Array.isArray(e.custom_actions)||"object"!=typeof e.custom_actions||null==e.custom_actions)n=e.custom_actions??[];else for(const t of Object.keys(e.custom_actions))n.push({...e.custom_actions?.[t],name:t});for(const t of["custom_keys","custom_sources"])if(t in e){for(const i of Object.keys(e[t]))n.push({...e[t]?.[i],name:i});delete e[t]}const o=n.findIndex((t=>"slider"==t.name)),a=n[o]??{type:"slider",name:"slider"};let r=!1;if("slider_style"in e){let t=a.styles??"";t+="\n:host {";const i=e.slider_style;for(const e in i)t+=`\n ${e}: ${i[e]};`;t+="\n}",a.styles=t.trim(),delete e.slider_style,r=!0}if("tooltip"in a){let t=a.styles??"";t+=`\n.tooltip {\n display: {{ "initial" if render(${a.tooltip}) else "none" }};\n}`,a.styles=t.trim(),r=!0}if("slider_range"in e&&(a.range=e.slider_range,delete e.slider_range,r=!0),"slider_step"in e&&(a.step=e.slider_step,delete e.slider_step,r=!0),"slider_attribute"in e&&(a.value_attribute=e.slider_attribute,delete e.slider_attribute,r=!0),"enable_slider_feedback"in e&&(a.haptics=e.enable_slider_feedback,delete e.enable_slider_feedback,r=!0),"slider_haptics"in e&&(a.haptics=e.slider_haptics,delete e.slider_haptics,r=!0),"slider_id"in e){e.media_player_id||(e.media_player_id=e.slider_id),a.entity_id=a.entity_id??e.slider_id??t.media_player_id??"";const i=a.tap_action??this.DEFAULT_KEYS.filter((t=>"slider"==t.name))[0].tap_action;if(i){const t=i.data??{},n=i.target??{};"entity_id"in n||(n.entity_id=t.entity_id??e.slider_id,delete t.entity_id),i.data=t,i.target=n}a.tap_action=i,delete e.slider_id,r=!0}if(r){const t=this.DEFAULT_KEYS.filter((t=>"slider"==t.name))[0];o>-1?n[o]={...structuredClone(t),...a}:n.push({...structuredClone(t),...a})}const s=n.findIndex((t=>"touchpad"==t.name)),c=n[s]??{type:"touchpad",name:"touchpad"};let l=!1;if("touchpad_style"in e){let t=c.styles??"";t+="\ntoucharea {";const i=e.touchpad_style;for(const e in i)t+=`\n ${e}: ${i[e]};`;t+="\n}",c.styles=t.trim(),delete e.touchpad_style,l=!0}if("touchpad_height"in e){let t=c.styles??"";t+=`\ntoucharea {\n height: ${e.touchpad_height};\n}`,c.styles=t.trim(),delete e.touchpad_height,l=!0}"enable_touchpad_feedback"in e&&(c.haptics=e.enable_touchpad_feedback,delete e.enable_touchpad_feedback,l=!0),"touchpad_haptics"in e&&(c.haptics=e.touchpad_haptics,delete e.touchpad_haptics,l=!0),"enable_double_click"in e&&(c.double_tap_action={action:"key",key:e.double_click_keycode??"BACK"},delete e.enable_double_click,delete e.double_click_keycode,l=!0),"long_click_keycode"in e&&(c.hold_action={action:"key",key:e.long_click_keycode??"DPAD_CENTER"},l=!0);const u=this.DEFAULT_KEYS.filter((t=>"touchpad"==t.name))[0];if(e.rows.toString().includes("touchpad")){const t=n.filter((t=>"center"==t.name))[0];if(t){for(const e of Pe)t[e]?c[e]=t[e]:u[e]&&!c[e]&&(c[e]=u[e]);l=!0}for(const t of Fe){const i=n.filter((e=>e.name==t))[0];!c[t]&&i&&e.rows.toString().includes("touchpad")&&(c[t]=i,delete c[t]?.icon,l=!0)}}if(l){for(const t of Fe)c[t]||(c[t]=structuredClone(u[t]??{}),delete c[t]?.type,delete c[t]?.icon);s>-1?n[s]={...structuredClone(u),...c}:n.push({...structuredClone(u),...c})}for(const[t,e]of n.entries()){const i=this.updateDeprecatedActionFields(e,n);for(const t of Fe)i[t]&&(i[t]=this.updateDeprecatedActionFields(i[t],n));n[t]=i}if(e.style){let t=e.styles??"";t+="\n:host {";const i=e.style;for(const e in i)t+=`\n ${e}: ${i[e]};`;t+="\n}",e.styles=t.trim(),delete e.style}if(e.button_style){let t=e.styles??"";t+="\nremote-button {";const i=e.button_style;for(const e in i)t+=`\n ${e}: ${i[e]};`;t+="\n}",e.styles=t.trim(),delete e.button_style}if(e.row_styles){let t=e.styles??"";const i=e.row_styles;for(const e in i){if(e.includes("-"))t+=`\n#${e} {`;else if("rows"==e)t+="\n.row {";else{if("columns"!=e)continue;t+="\n.column {"}for(const n in i[e])t+=`\n ${n}: ${i[e][n]};`;t+="\n}"}e.styles=t.trim(),delete e.row_styles}return e.custom_actions=n,e}updateDeprecatedActionFields(t,e){let i=structuredClone(t);"svg_path"in i&&(i.icon=i.svg_path);const n=["key","source","service","service_data","data","target","navigation_path","navigation_replace","url_path","confirmation","pipeline_id","start_listening"],o=i.tap_action??{};let a=!1;for(const t of n)t in i&&(a=!0,o[t]=i[t],delete i[t]);a&&(i.tap_action=o);for(const t of Pe)if(t in i){const e=i[t];e&&(e.action?"call-service"==e.action&&(e.action="perform-action",e.perform_action=e.service??"",delete e.service):e.key?e.action="key":e.source?e.action="source":e.perform_action?e.action="perform-action":e.service?(e.action="perform-action",e.perform_action=e.service,delete e.service):e.navigation_path?e.action="navigate":e.url_path?e.action="url":e.browser_mod?e.action="fire-dom-event":e.pipeline_id||e.start_listening?e.action="assist":e.action="none",e.service_data&&(e.data={...e.service_data,...e.data},delete e.service_data),i[t]=e)}if(i.type=(i.type??"button").toLowerCase(),i.style){let t=i.styles??"";t+="\n:host {";const e=i.style;for(const i in e)t+=`\n ${i}: ${e[i]};`;t+="\n}",i.styles=t.trim(),delete i.style}if("template"in t){const n=e?.filter((e=>t.template==e.name))[0]??this.DEFAULT_ACTIONS.filter((e=>t.template==e.name))[0]??{};i=(0,je.D9)(structuredClone(n),t),delete i.template}return i}static get styles(){return t.AH`:host{display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}.content{padding:12px;display:inline-flex;flex-direction:column;gap:24px;box-sizing:border-box;width:100%}.action-options{display:inline-flex;flex-direction:column;gap:8px;box-sizing:border-box;width:100%}ha-expansion-panel{display:block;border-radius:6px;border:solid 1px var(--outline-color);--ha-card-border-radius:6px;--expansion-panel-content-padding:0}ha-icon{display:flex;color:var(--secondary-text-color)}.add-list-item{margin:0 18px 12px}ha-button{width:fit-content;--mdc-icon-size:100%}ha-list-item{text-transform:capitalize}.features{max-height:480px;overflow:auto;overflow-y:scroll}.feature-list-item{display:flex;align-items:center;pointer-events:none}.handle{display:flex;align-items:center;cursor:move;cursor:grab;padding-right:8px;padding-inline-end:8px;padding-inline-start:initial;direction:var(--direction);pointer-events:all}.feature-list-item-content{height:60px;font-size:16px;display:flex;align-items:center;justify-content:flex-start;flex-grow:1;gap:8px;overflow:hidden}.primary:first-letter{text-transform:capitalize}.feature-list-item-label{display:flex;flex-direction:column}.secondary{font-size:12px;color:var(--secondary-text-color)}.copy-icon,.edit-icon,.remove-icon{color:var(--secondary-text-color);pointer-events:all;--mdc-icon-button-size:36px}.header{display:inline-flex;justify-content:space-between;align-items:center}.text-icon{color:var(--mdc-dialog-content-ink-color,rgba(0,0,0,.6))}.back-title{display:flex;align-items:center;font-size:18px}.wrapper{width:100%}.gui-editor{display:inline-flex;flex-direction:column;gap:24px;padding:8px 0;width:100%}.yaml-editor{display:inline-flex;flex-direction:column;padding:8px 0;width:100%}ha-code-editor{--code-mirror-max-height:calc(100vh - 245px)}.layout-editor{display:flex;flex-direction:column;font-weight:500}.actions-list-container{background:var(--code-editor-background-color,var(--mdc-text-field-fill-color,#f5f5f5));padding:4px;border-radius:4px}.default-action-lists-container{display:flex;flex-direction:row}.action-list-container{max-height:285px;overflow:scroll}.custom-action-list-container{max-height:190px}.action-list{columns:1;-webkit-columns:1;-moz-columns:1;margin-top:4px;padding-left:4px}.custom-action-list{columns:2;-webkit-columns:2;-moz-columns:2}.action-list-item::marker{content:''}.action-list-item{display:flex;flex-direction:row;align-items:center;gap:4px;padding:2px 0}.action-list-item-label{width:100%;background:0 0;border:none;outline:0;font-family:monospace;font-size:14px}.error,.info{word-break:break-word;margin-top:8px}.error{color:var(--error-color)}.error ul{margin:4px 0}.error li,.warning li{white-space:pre-wrap}.title-header{font-size:20px;font-weight:500;padding:12px 4px}.panel-header{display:inline-flex;gap:4px}.style-header{font-size:var(--mdc-typography-body1-font-size,1rem);font-weight:500;padding:8px}.form{display:grid;grid-template-columns:repeat(var(--form-grid-column-count,auto-fit),minmax(var(--form-grid-min-width,200px),1fr));gap:24px 8px}.actions-form{display:grid;grid-template-columns:repeat(var(--form-grid-column-count,auto-fit),minmax(var(--form-grid-min-width,200px),1fr));gap:8px}.selector-margin{margin:8px 0}.custom-icon-picked{position:absolute;padding:16px;pointer-events:none}.custom-icon-preview{align-self:center;outline:1px dashed var(--primary-color);--mdc-icon-size:50%}mwc-tab-bar{--mdc-tab-horizontal-padding:16px}`}}Ke([(0,e.MZ)()],Be.prototype,"hass",void 0),Ke([(0,e.MZ)()],Be.prototype,"config",void 0),Ke([(0,e.wk)()],Be.prototype,"baseTabIndex",void 0),Ke([(0,e.wk)()],Be.prototype,"entryIndex",void 0),Ke([(0,e.wk)()],Be.prototype,"actionsTabIndex",void 0),Ke([(0,e.wk)()],Be.prototype,"touchpadTabIndex",void 0),Ke([(0,e.wk)()],Be.prototype,"guiMode",void 0),Ke([(0,e.wk)()],Be.prototype,"errors",void 0);var He=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let Ye=class extends t.WF{constructor(){super(...arguments),this.onKeyDownFired=!1}getRokuId(t){return(this.config?.keyboard_id??"").split(".")[0]!=t?"media_player"===t?this.config?.media_player_id:this.config?.remote_id:this.config?.keyboard_id}forceCursorToEnd(){this.textarea.selectionStart=this.textarea.value.length,this.textarea.selectionEnd=this.textarea.value.length}forceCursorToEndEvent(t){t.preventDefault(),this.forceCursorToEnd()}kodiOnKeyDown(t){if(t.stopImmediatePropagation(),["Backspace","Enter"].includes(t.key)){const t=this.textarea?.value??"";this.hass.callService("kodi","call_method",{entity_id:this.config?.keyboard_id,method:"Input.SendText",text:t,done:!1})}}kodiOnInput(t){t.stopImmediatePropagation();const e=this.textarea?.value??"";this.hass.callService("kodi","call_method",{entity_id:this.config?.keyboard_id,method:"Input.SendText",text:e,done:!1})}webosOnKeyDown(t){if(t.stopImmediatePropagation(),["Backspace","Enter"].includes(t.key)){const t=this.textarea?.value??"";this.hass.callService("webostv","command",{entity_id:this.config?.keyboard_id,command:"com.webos.service.ime/insertText",payload:{text:t,replace:!0}})}}webosOnInput(t){t.stopImmediatePropagation();const e=this.textarea?.value??"";this.hass.callService("webostv","command",{entity_id:this.config?.keyboard_id,command:"com.webos.service.ime/insertText",payload:{text:e,replace:!0}})}unifiedRemoteOnKeyDown(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e={Backspace:"back",Enter:"enter"}[t.key??""];e&&(this.onKeyDownFired=!0,this.hass.callService("unified_remote","call",{target:this.config?.keyboard_id,remote_id:"Core.Input",action:"Press",extras:{Values:[{Value:e}]}}))}unifiedRemoteOnInput(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e=t.inputType??"",i=t.data??"";if(i&&"insertText"==e)this.hass.callService("unified_remote","call",{target:this.config?.keyboard_id,remote_id:"Core.Input",action:"Text",extras:{Values:[{Value:i}]}});else if(!this.onKeyDownFired){const t={deleteContentBackward:"back",insertLineBreak:"enter"}[e??""];t&&this.hass.callService("unified_remote","call",{target:this.config?.keyboard_id,remote_id:"Core.Input",action:"Press",extras:{Values:[{Value:t}]}})}this.onKeyDownFired=!1}rokuOnKeyDown(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e=t.key,i={Backspace:"backspace",Enter:"enter"}[e??""];i&&(this.onKeyDownFired=!0,this.hass.callService("remote","send_command",{entity_id:this.getRokuId("remote"),command:i}),"Enter"==e&&this.closeDialog())}rokuOnInput(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e=t.inputType??"",i=t.data??"";if(i&&"insertText"==e)this.hass.callService("remote","send_command",{entity_id:this.config?.keyboard_id,command:`Lit_${i}`});else if(!this.onKeyDownFired){const t={deleteContentBackward:"backspace",insertLineBreak:"enter"}[e??""];t&&this.hass.callService("remote","send_command",{entity_id:this.getRokuId("remote"),command:t})}this.onKeyDownFired=!1}adbOnKeyDown(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e=t.key,i={Backspace:"67",Enter:"66"}[e??""];i&&(this.onKeyDownFired=!0,this.hass.callService(this.domain??"remote",this.service??"send_command",{entity_id:this.config?.keyboard_id,command:`input keyevent ${i}`}),"Enter"==e&&this.closeDialog())}adbOnInput(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e=t.inputType??"",i=t.data??"";if(i&&"insertText"==e)this.adbSendText(i);else if(!this.onKeyDownFired){const t={deleteContentBackward:"67",insertLineBreak:"66"}[e??""];t&&this.hass.callService(this.domain??"remote",this.service??"send_command",{entity_id:this.config?.keyboard_id,command:`input keyevent ${t}`})}this.onKeyDownFired=!1}adbSendText(t){this.hass.callService(this.domain??"remote",this.service??"send_command",{entity_id:this.config?.keyboard_id,command:`input text "${t}"`})}androidTvOnKeyDown(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e=t.key,i={Backspace:"DEL",Enter:"ENTER"}[e??""];i&&(this.onKeyDownFired=!0,this.hass.callService("remote","send_command",{entity_id:this.config?.remote_id,command:i}),"Enter"==e&&this.closeDialog())}androidTvOnInput(t){t.stopImmediatePropagation(),this.forceCursorToEnd();const e=t.inputType??"",i=t.data??"";if(i&&"insertText"==e)this.adbSendText(i);else if(!this.onKeyDownFired){const t={deleteContentBackward:"DEL",insertLineBreak:"ENTER"}[e??""];t&&(this.hass.callService("remote","send_command",{entity_id:this.config?.remote_id,command:t}),"insertLineBreak"==e&&this.closeDialog())}this.onKeyDownFired=!1}keyboardOnPaste(t){t.stopImmediatePropagation(),"Kodi"!=this.config?.platform&&this.forceCursorToEnd();const e=t.clipboardData?.getData("Text");if(e)switch(this.config?.platform){case"Unified Remote":this.hass.callService("unified_remote","call",{target:this.config?.keyboard_id,remote_id:"Core.Input",action:"Text",extras:{Values:[{Value:e}]}});break;case"Kodi":this.hass.callService("kodi","call_method",{entity_id:this.config?.keyboard_id,method:"Input.SendText",text:this.textarea?.value??"",done:!1});break;case"LG webOS":this.hass.callService("webostv","command",{entity_id:this.config?.keyboard_id,command:"com.webos.service.ime/insertText",text:this.textarea?.value??"",replace:!0});break;case"Roku":this.hass.callService("remote","send_command",{entity_id:this.config?.keyboard_id,command:`Lit_${e}`});break;default:this.hass.callService(this.domain??"remote",this.service??"send_command",{entity_id:this.config?.keyboard_id,command:`input text "${e}"`})}}search(t){const e=this.textarea?.value;if(e)switch(this.config?.platform){case"Kodi":this.hass.callService("kodi","call_method",{entity_id:this.config?.keyboard_id,method:"Input.SendText",text:e,done:!0});break;case"LG webOS":break;case"Roku":this.hass.callService("roku","search",{entity_id:this.getRokuId("media_player"),keyword:e});break;default:this.hass.callService(this.domain??"remote",this.service??"send_command",{entity_id:this.config?.keyboard_id,command:`am start -a "android.search.action.GLOBAL_SEARCH" --es query "${e}"`})}this.closeDialog()}textBox(t){const e=this.textarea?.value;if(e)switch(this.config?.platform){case"Unified Remote":this.hass.callService("unified_remote","call",{target:this.config?.keyboard_id,remote_id:"Core.Input",action:"Text",extras:{Values:[{Value:e}]}});break;case"Kodi":this.hass.callService("kodi","call_method",{entity_id:this.config?.keyboard_id,method:"Input.SendText",text:e,done:!1});break;case"LG webOS":this.hass.callService("webostv","command",{entity_id:this.config?.keyboard_id,command:"com.webos.service.ime/insertText",payload:{text:e,replace:!0}});break;case"Roku":this.hass.callService("remote","send_command",{entity_id:this.getRokuId("remote"),command:`Lit_${e}`});break;default:this.hass.callService(this.domain??"remote",this.service??"send_command",{entity_id:this.config?.keyboard_id,command:`input text "${e}"`})}this.closeDialog()}enterDialog(){switch(this.config?.platform){case"Unified Remote":this.hass.callService("unified_remote","call",{target:this.config?.keyboard_id,remote_id:"Core.Input",action:"Press",extras:{Values:[{Value:"enter"}]}});break;case"Kodi":this.hass.callService("kodi","call_method",{entity_id:this.config?.keyboard_id,method:"Input.SendText",text:this.textarea?.value??"",done:!0});break;case"LG webOS":this.hass.callService("webostv","command",{entity_id:this.config?.keyboard_id,command:"com.webos.service.ime/sendEnterKey"});break;case"Roku":this.hass.callService("remote","send_command",{entity_id:this.getRokuId("remote"),command:"enter"});break;case"Fire TV":case"Sony BRAVIA":this.hass.callService(this.domain??"remote",this.service??"send_command",{entity_id:this.config?.keyboard_id,command:"input keyevent 66"});break;default:this.hass.callService("remote","send_command",{entity_id:this.config?.remote_id,command:"ENTER"})}this.closeDialog()}showDialog(t){this.config=t.detail,"media_player"===(this.config?.keyboard_id??"").split(".")[0]?(this.domain="androidtv",this.service="adb_command"):(this.domain="remote",this.service="send_command");const e=this.shadowRoot?.querySelector("dialog");if(e){try{e.showModal()}catch{e.close(),e.showModal()}window.addEventListener("popstate",(()=>this.closeDialog()))}this.textarea=this.shadowRoot?.querySelector("textarea");const i=this.textarea;"Kodi"==this.config?.platform&&"search"==this.config?.action&&this.hass.callService("kodi","call_method",{entity_id:this.config.keyboard_id,method:"Addons.ExecuteAddon",addonid:"script.globalsearch"}),setTimeout((()=>{i&&i.focus()}),.4)}cancelDialog(t){t.preventDefault(),this.closeDialog()}closeDialog(t){const e=this.shadowRoot?.querySelector("dialog");if(e){try{e.close()}catch{e.showModal(),e.close()}window.removeEventListener("popstate",(()=>this.closeDialog()))}this.textarea&&(this.textarea.value="",this.textarea.blur()),this.config=void 0,this.domain=void 0,this.service=void 0,this.textarea=void 0}buildDialogButton(e,i){return t.qy`
${e}
`}render(){let e,i,n,o,a,r=t.qy``;switch(this.config?.action){case"search":e="Search for something...",r=t.qy`${this.buildDialogButton("Close",this.closeDialog)}${this.buildDialogButton("Search",this.search)}`;break;case"textbox":e="Type something...",r=t.qy`${this.buildDialogButton("Close",this.closeDialog)}${this.buildDialogButton("Send",this.textBox)}`;break;default:switch(a=this.forceCursorToEndEvent,this.config?.platform){case"Unified Remote":i=this.unifiedRemoteOnInput,n=this.unifiedRemoteOnKeyDown;break;case"Kodi":i=this.kodiOnInput,n=this.kodiOnKeyDown,a=void 0;break;case"LG webOS":i=this.webosOnInput,n=this.webosOnKeyDown,a=void 0;break;case"Roku":i=this.rokuOnInput,n=this.rokuOnKeyDown;break;case"Fire TV":case"Sony BRAVIA":i=this.adbOnInput,n=this.adbOnKeyDown;break;default:i=this.androidTvOnInput,n=this.androidTvOnKeyDown}e="Type something...",o=this.keyboardOnPaste,r=t.qy`${this.buildDialogButton("Close",this.closeDialog)}${this.buildDialogButton("Enter",this.enterDialog)}`}e=this.config?.keyboard_prompt??e;const s=t.qy``;return t.qy`${s}
${r}
`}static get styles(){return t.AH`:host{-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}dialog{height:0;width:0;display:inline-flex;flex-direction:column;position:fixed;border:none;background:var(--ha-card-background,var(--card-background-color,#fff));border-radius:var(--ha-card-border-radius,12px);opacity:0;transition:all .1s ease-in-out;pointer-events:none}dialog[open]{height:fit-content;width:85%;opacity:1;transition:all .1s ease-in-out;pointer-events:all}textarea{position:relative;height:180px;padding:8px;outline:0;background:0 0;border:none;resize:none;font-family:inherit;font-weight:500;font-size:30px}.buttons{height:36px;display:inline-flex;flex-direction:row;justify-content:space-between;margin:0 12px}.button{height:100%;width:min-content;align-content:center;cursor:pointer;border-radius:var(--mdc-shape-small,4px);overflow:hidden}button{height:100%;width:100%;background:0 0;opacity:1;border:none;overflow:hidden;cursor:pointer;padding:0}@media (hover:hover){button:hover{background:var(--ha-ripple-color);opacity:var(--md-ripple-hover-opacity)}}button:active{background:var(--ha-ripple-color);opacity:var(--md-ripple-pressed-opacity)}.button span{font-family:inherit;font-size:var(--paper-font-body1_-_font-size);font-weight:600;text-transform:uppercase;color:var(--mdc-theme-primary,#6200ee);user-select:none;-webkit-user-select:none;-moz-user-select:none;position:relative;top:-32px;padding:0 8px;pointer-events:none}dialog::backdrop{background:#000;opacity:.7}`}};He([(0,e.MZ)()],Ye.prototype,"hass",void 0),He([(0,e.wk)()],Ye.prototype,"config",void 0),Ye=He([(0,e.EM)("keyboard-dialog")],Ye);var Ze=__webpack_require__(44),ze=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let qe=class extends Ze.W{constructor(){super(...arguments),this.clickCount=0,this.hold=!1}onClick(t){if(t.stopImmediatePropagation(),this.clickCount++,"none"!=this.renderTemplate(this.config.double_tap_action?.action??"none")){if(this.clickCount>1)this.fireHapticEvent("success"),this.sendAction("double_tap_action"),this.endAction();else if(!this.clickTimer){const t=this.config.double_tap_action?.double_tap_window?this.renderTemplate(this.config.double_tap_action?.double_tap_window):Ue.jc;this.clickTimer=setTimeout((()=>{this.fireHapticEvent("light"),this.sendAction("tap_action"),this.endAction()}),t)}}else this.fireHapticEvent("light"),this.sendAction("tap_action"),this.endAction()}onStart(t){if(super.onStart(t),this.cancelRippleToggle(),this.swiping=!1,"none"!=this.renderTemplate(this.config.momentary_start_action?.action??"none"))this.fireHapticEvent("light"),this.momentaryStart=performance.now(),this.sendAction("momentary_start_action");else if("none"!=this.renderTemplate(this.config.momentary_end_action?.action??"none"))this.fireHapticEvent("light"),this.momentaryStart=performance.now();else if(!this.holdTimer){const t=this.renderTemplate(this.config.hold_action?.hold_time??Ue.At);this.holdTimer=setTimeout((()=>{if(!this.swiping)if(this.hold=!0,"repeat"==this.renderTemplate(this.config.hold_action?.action)){const t=this.renderTemplate(this.config.hold_action?.repeat_delay??Ue.a3);this.holdInterval||(this.holdInterval=setInterval((()=>{this.fireHapticEvent("selection"),this.sendAction("tap_action")}),t))}else this.fireHapticEvent("medium"),this.sendAction("hold_action")}),t)}}onEnd(t){this.swiping||("none"!=this.renderTemplate(this.config.momentary_end_action?.action??"none")?(this.fireHapticEvent("selection"),this.momentaryEnd=performance.now(),this.sendAction("momentary_end_action"),this.endAction()):"none"!=this.renderTemplate(this.config.momentary_start_action?.action??"none")?this.endAction():this.hold?(t.stopImmediatePropagation(),t.preventDefault(),this.endAction()):this.onClick(t)),this.toggleRipple()}onMove(t){let e,i;"targetTouches"in t?(e=t.targetTouches[0].clientX,i=t.targetTouches[0].clientY):(e=t.clientX,i=t.clientY),this.deltaX=e-(this.currentX??e),this.deltaY=i-(this.currentY??i),this.currentX=e,this.currentY=i;const n=this.currentX-(this.initialX??0),o=this.currentY-(this.initialY??0);Math.abs(Math.abs(n)-Math.abs(o))>24&&(this.endAction(),this.swiping=!0)}onMouseLeave(t){this.endAction(),this.swiping=!0,this.toggleRipple()}onTouchCancel(t){this.endAction(),this.toggleRipple()}endAction(){clearTimeout(this.clickTimer),this.clickTimer=void 0,this.clickCount=0,clearTimeout(this.holdTimer),clearInterval(this.holdInterval),this.holdTimer=void 0,this.holdInterval=void 0,this.hold=!1,super.endAction()}render(){return this.setValue(),t.qy` ${this.buildStyles(this.config.styles)}`}static get styles(){return[super.styles,t.AH`:host{align-content:center;text-align:center}button{display:flex;height:inherit;width:inherit;border-radius:var(--size,48px);overflow:visible;cursor:pointer;pointer-events:all;position:relative;opacity:1;padding:0;background:rgb(0,0,0,0);border:none;flex-direction:column;align-content:center;text-align:center;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}`]}};ze([(0,e.MZ)()],qe.prototype,"config",void 0),qe=ze([(0,e.EM)("remote-button")],qe);var We=__webpack_require__(740);class Ge{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Xe="important",Je=" !"+Xe,Qe=(ti=class extends Ge{constructor(t){if(super(t),1!==t.type||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const n=t[i];return null==n?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?i.removeProperty(t):i[t]=null);for(const t in e){const n=e[t];if(null!=n){this.ut.add(t);const e="string"==typeof n&&n.endsWith(Je);t.includes("-")||e?i.setProperty(t,e?n.slice(0,-11):n,e?Xe:""):i[t]=n}}return We.c0}},(...t)=>({_$litDirective$:ti,values:t}));var ti,ei=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let ii=class extends Ze.W{constructor(){super(...arguments),this.showTooltip=!1,this.thumbOffset=0,this.sliderOn=!0,this.currentValue=this.value,this.speed=.02,this.range=[Ue.HB,Ue.bQ],this.step=Ue.RZ,this.sliderWidth=0,this.sliderHeight=0,this.vertical=!1,this.thumbWidth=50,this.resizeObserver=new ResizeObserver((t=>{for(const e of t)this.sliderWidth=this.vertical?e.contentRect.height:e.contentRect.width,this.sliderHeight=this.vertical?e.contentRect.width:e.contentRect.height,this.setThumbOffset()})),this.rtl=!1}onInput(t){const e=t.currentTarget;if(this.swiping)null==this.value&&(this.getValueFromHass=!0),this.setValue(),this.currentValue=this.value??0,this.setThumbOffset(),this.showTooltip=!1;else{clearTimeout(this.getValueFromHassTimer),this.getValueFromHass=!1,this.value=e.value,this.fireHapticEvent("selection");const t=parseFloat(this.oldValue??this.value??"0"),i=parseFloat(e.value??t);this.newValue=i,this.currentValue=t,this.setThumbOffset(),this.showTooltip=!0,i>this.range[0]&&(this.sliderOn=!0),clearInterval(this.intervalId),this.intervalId=void 0;let n=t;t>i?this.intervalId=setInterval((()=>{n-=this.speed,this.currentValue=n,this.setThumbOffset(),i>=n&&(clearInterval(this.intervalId),this.intervalId=void 0,this.currentValue=i,this.setThumbOffset())}),Ue.hI):t{n+=this.speed,this.currentValue=n,this.setThumbOffset(),i<=n&&(clearInterval(this.intervalId),this.intervalId=void 0,this.currentValue=i,this.setThumbOffset())}),Ue.hI)):this.currentValue=i,this.oldValue=i}}onStart(t){super.onStart(t);const e=t.currentTarget;this.swiping||(clearTimeout(this.getValueFromHassTimer),this.getValueFromHass=!1,this.currentValue=e.value,this.value=e.value,this.setThumbOffset(),this.showTooltip=!0,this.sliderOn=!0)}onEnd(t){this.setThumbOffset(),this.showTooltip=!1,this.setValue(),this.swiping?(this.getValueFromHass=!0,this.setValue(),this.currentValue=this.value??0,this.setThumbOffset(),this.setSliderState(this.currentValue)):(this.newValue||0==this.newValue||(this.newValue=Number(this.value)),this.precision||(this.newValue=Math.trunc(this.newValue)),this.value=this.newValue,this.fireHapticEvent("light"),this.sendAction("tap_action")),this.endAction(),this.resetGetValueFromHass()}onMove(t){if(!this.vertical){super.onMove(t);const e=50;Math.abs((this.currentX??0)-(this.initialX??0))this.range[0]}endAction(){clearInterval(this.valueUpdateInterval),this.valueUpdateInterval=void 0,super.endAction()}buildBackground(){const e={};return this.vertical&&(e.transform=`rotateZ(${this.rtl?"90":"270"}deg)`,e.width=`${this.sliderWidth}px`,e.height=`var(--background-height, ${this.sliderHeight}px)`),t.qy`
`}buildTooltip(){return t.qy`
`}buildSliderStyles(e){let i,n;const o=this.shadowRoot?.querySelector(".container");if(o){const t=getComputedStyle(o);i=t.getPropertyValue("height"),n=t.getPropertyValue("width")}const a=`'${this.renderTemplate("{{ value }}{{ unit }}",e)}'`;let r,s;this.vertical?(r=`translate(calc(-0.3 * ${n??"var(--height)"} - 0.8em - 18px), calc(-1 * var(--thumb-offset)))`,s="translateY(calc(-1 * var(--thumb-offset)))"):(r=`translate(var(--thumb-offset), calc(-0.5 * ${i??"var(--height)"} - 0.4em - 10px))`,s="translateX(var(--thumb-offset))");const c=`\n\t\t:host {\n\t\t\t--tooltip-label: ${a};\n\t\t\t--tooltip-transform: ${r};\n\t\t\t--icon-transform: ${s};\n\t\t}\n\t\t${this.rtl?"\n\t\t.slider::-webkit-slider-thumb {\n\t\t\tscale: -1;\n\t\t}\n\t\t.slider::-moz-range-thumb {\n\t\t\tscale: -1;\n\t\t}\n\t\t":""}\n\t\t`;return t.qy``}buildSlider(e=this.config,i){const n=i.value;this.setSliderState(n);const o={};return"none"==this.renderTemplate(e.tap_action?.action,i)&&(o["pointer-events"]="none"),this.vertical&&(o.transform=`rotateZ(${this.rtl?"90":"270"}deg)`,o.height=`${this.sliderHeight}px`,o.width=`${this.sliderWidth}px`,o["touch-action"]="none"),t.qy``}render(){this.setValue(),this.getValueFromHass&&(this.currentValue=this.value);const e={VALUE:this.getValueFromHass?this.value:this.currentValue,value:this.getValueFromHass?this.value:this.currentValue};this.config.range&&(this.range[0]=parseFloat(this.renderTemplate(this.config.range[0],e)??Ue.HB),this.range[1]=parseFloat(this.renderTemplate(this.config.range[1],e)??Ue.bQ)),this.speed=(this.range[1]-this.range[0])/50,this.config.step?this.step=Number(this.renderTemplate(this.config.step,e)):this.step=(this.range[1]-this.range[0])/Ue.zM;const i=this.step.toString().split(".");i.length>1?this.precision=i[1].length:this.precision=0,this.vertical=1==this.renderTemplate(this.config.vertical??!1,e),this.resizeObserver.observe(this);const n={},o=this.shadowRoot?.querySelector("input");if(o){const t=getComputedStyle(o),e=t.getPropertyValue("--thumb-width"),i=t.getPropertyValue("--height");this.thumbWidth=e?parseInt(e.replace(/[^0-9]+/g,"")):parseInt(i.replace(/[^0-9]+/g,"")),this.vertical&&(this.style.setProperty("width","fit-content"),this.style.setProperty("align-self","stretch"),n.height=`${this.sliderWidth}px`,n.width="var(--height)")}return this.rtl="rtl"==getComputedStyle(this).direction,this.setThumbOffset(),this.style.setProperty("--thumb-offset",`calc(${this.rtl&&!this.vertical?"-1 * ":""}${this.thumbOffset}px)`),t.qy`
${this.buildBackground()}${this.buildSlider(void 0,e)} ${this.buildIcon(this.config.icon,e)} ${this.buildLabel(this.config.label,e)}
${this.buildTooltip()}${this.buildSliderStyles(e)} ${this.buildStyles(this.config.styles,e)}`}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}static get styles(){return[super.styles,t.AH`:host{display:flex;flex-flow:column;flex-grow:0;place-content:center space-evenly;align-items:center;position:relative;height:unset;width:100%;border:none;border-radius:25px;padding:0;box-sizing:border-box;line-height:0;outline:0;overflow:visible;font-size:inherit;color:inherit;pointer-events:none;--color:var(--primary-text-color);--height:48px}.container{all:inherit;overflow:hidden;height:var(--height);align-self:center;color:var(--background,var(--primary-background-color))}.background{position:absolute;width:inherit;height:var(--background-height,100%);background:var( --background, var(--primary-background-color) - )}.off,.slider{position:absolute;appearance:none;-webkit-appearance:none;-moz-appearance:none;pointer-events:all;height:100%;width:inherit;background:0 0;overflow:hidden}.slider::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;height:var(--height);width:var(--thumb-width,var(--height));cursor:pointer;background:var(--color);border-color:rgb(0,0,0,0);box-shadow:var(--thumb-box-shadow,calc(-100vw - (var(--thumb-width,var(--height))/ 2)) 0 0 100vw var(--color));border-radius:var(--thumb-border-radius,var(--height))}.slider::-moz-range-thumb{appearance:none;-webkit-appearance:none;height:var(--height);width:var(--thumb-width,var(--height));cursor:pointer;background:var(--color);border-color:rgb(0,0,0,0);box-shadow:var(--thumb-box-shadow,calc(-100vw - (var(--thumb-width,var(--height))/ 2)) 0 0 100vw var(--color));border-radius:var(--thumb-border-radius,var(--height))}.off::-webkit-slider-thumb{visibility:hidden}.off::-moz-range-thumb{visibility:hidden}.tooltip{background:var(--clear-background-color);color:var(--primary-text-color);position:absolute;border-radius:.8em;padding:.2em .4em;height:20px;width:fit-content;line-height:20px;transform:var(--tooltip-transform);display:var(--tooltip-display)}.faded-out{opacity:0;transition:opacity 180ms ease-in-out 0s,left 180ms ease-in-out 0s,bottom 180ms ease-in-out 0s}.faded-in{opacity:1;transition:opacity 540ms ease-in-out 0s}.tooltip::after{content:var(--tooltip-label,0)}.icon{color:var(--icon-color,var(--background,var(--primary-background-color)));--mdc-icon-size:var(--size, 32px)}`]}};ei([(0,e.MZ)()],ii.prototype,"config",void 0),ei([(0,e.wk)()],ii.prototype,"showTooltip",void 0),ei([(0,e.wk)()],ii.prototype,"thumbOffset",void 0),ei([(0,e.wk)()],ii.prototype,"sliderOn",void 0),ei([(0,e.wk)()],ii.prototype,"currentValue",void 0),ei([(0,e.wk)()],ii.prototype,"sliderWidth",void 0),ei([(0,e.wk)()],ii.prototype,"sliderHeight",void 0),ii=ei([(0,e.EM)("remote-slider")],ii);var ni=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let oi=class extends Ze.W{constructor(){super(...arguments),this.clickCount=0,this.hold=!1,this.holdStart=!1,this.holdMove=!1,this.fireMouseAction=!0}onClick(t){t.stopImmediatePropagation(),this.clickCount++;const e=this.targetTouches?.length||1,i=this.getMultiPrefix();if("none"!=this.renderTemplate(this.config.double_tap_action?.action??"none")||"none"!=this.renderTemplate(this.config.multi_double_tap_action?.action??"none")){const t=`${i}double_tap_action`;if(this.clickCount>e)this.fireHapticEvent("success"),this.sendAction(t),this.endAction();else if(!this.clickTimer){let e="double_tap_window"in(this.config[t]??{})?this.renderTemplate(this.config[t]?.double_tap_window):Ue.jc;"multi_"==i&&this.config.multi_double_tap_action&&(e=this.renderTemplate(this.config.multi_double_tap_action?.double_tap_window??Ue.jc)),this.clickTimer=setTimeout((()=>{this.fireHapticEvent("light"),this.sendAction(`${i}tap_action`),this.endAction()}),e)}}else this.fireHapticEvent("light"),this.sendAction(`${i}tap_action`),this.endAction()}onStart(t){super.onStart(t),this.cancelRippleToggle(),this.holdStart=!0,this.direction||"none"==this.renderTemplate(this.config.momentary_start_action?.action??"none")?this.direction||"none"==this.renderTemplate(this.config.momentary_end_action?.action??"none")?this.holdTimer||this.setHoldTimer():(this.fireHapticEvent("light"),this.momentaryStart=performance.now()):(this.fireHapticEvent("light"),this.momentaryStart=performance.now(),this.sendAction("momentary_start_action"))}onEnd(t){this.direction||"none"==this.renderTemplate(this.config.momentary_end_action?.action??"none")?this.direction||"none"==this.renderTemplate(this.config.momentary_start_action?.action??"none")?this.hold||this.holdMove?(t.stopImmediatePropagation(),t.preventDefault(),this.endAction(),"targetTouches"in t&&t.targetTouches?.length&&(this.hold=!0)):this.hold&&"targetTouches"in t&&t.targetTouches.length||this.onClick(t):this.endAction():(this.momentaryEnd=performance.now(),this.fireHapticEvent("selection"),this.sendAction("momentary_end_action"),this.endAction()),this.toggleRipple()}onMove(t){if(!this.initialX||!this.initialY||!this.holdStart)return;super.onMove(t);const e=this.getMultiPrefix();if("none"!=this.renderTemplate(this.config[`${e}mouse_action`]?.action??"none")){if((this.holdMove||Math.abs(Math.abs(this.deltaX??0)-Math.abs(this.deltaY??0))>2)&&this.fireMouseAction){clearTimeout(this.holdTimer),this.holdTimer=void 0,this.holdMove=!0;const t=this.renderTemplate(this.config[`${e}mouse_action`]?.repeat_delay??0);t&&(this.fireMouseAction=!1,setTimeout((()=>{this.fireMouseAction=!0}),t)),this.sendAction(`${e}mouse_action`)}}else{const t=(this.currentX??0)-this.initialX,i=(this.currentY??0)-this.initialY;Math.abs(Math.abs(t)-Math.abs(i))>2&&(Math.abs(t)>Math.abs(i)?this.direction=t<0?"left":"right":this.direction=i<0?"up":"down",this.holdMove||(this.fireHapticEvent("light"),this.sendAction(`${e}tap_action`,this.getActions()),this.holdMove=!0,this.holdTimer&&(clearTimeout(this.holdTimer),this.holdTimer=void 0,this.setHoldTimer())))}}onMouseLeave(t){this.endAction(),this.toggleRipple()}onTouchCancel(t){this.endAction(),this.toggleRipple()}endAction(){clearTimeout(this.holdTimer),clearInterval(this.holdInterval),clearTimeout(this.clickTimer),this.holdTimer=void 0,this.holdInterval=void 0,this.clickTimer=void 0,this.hold=!1,this.holdStart=!1,this.holdMove=!1,this.direction=void 0,this.clickCount=0,super.endAction()}getActions(){return this.direction?this.config[this.direction]:this.config}getMultiPrefix(){return this.targetTouches&&this.targetTouches.length>1?"multi_":""}setHoldTimer(){const t=`${this.getMultiPrefix()}hold_action`,e=this.getActions(),i=this.renderTemplate(e[t]?.hold_time??Ue.At);this.holdTimer=setTimeout((()=>{this.hold=!0;const t=this.getActions(),e=this.getMultiPrefix();let i="repeat"==this.renderTemplate(t.hold_action?.action),n=this.renderTemplate(t.hold_action?.repeat_delay??Ue.a3);"multi_"==e&&t.multi_hold_action&&(i="repeat"==this.renderTemplate(t.multi_hold_action?.action),n=this.renderTemplate(t.multi_hold_action?.repeat_delay??Ue.a3)),i?this.holdInterval||(this.holdInterval=setInterval((()=>{this.fireHapticEvent("selection"),this.sendAction(`${this.getMultiPrefix()}tap_action`,this.getActions())}),n)):(this.fireHapticEvent("medium"),this.sendAction(`${e}hold_action`,t))}),i)}render(){return this.setValue(),t.qy`
${this.buildRipple()}
${this.buildStyles(this.config.styles)}`}static get styles(){return[super.styles,t.AH`:host{display:contents;--mdc-ripple-press-opacity:0.04}toucharea{border-radius:32px;flex-grow:1;height:250px;width:-moz-available;width:-webkit-fill-available;width:fill-available;background:var(--primary-background-color,#6f767d);touch-action:none;text-align:center;position:relative;overflow:hidden;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:space-between}.toucharea-row{min-height:var(--size,48px);display:flex;flex-direction:row;flex-wrap:nowrap;width:-moz-available;width:-webkit-fill-available;width:fill-available;justify-content:space-around;align-items:center}`]}};ni([(0,e.MZ)()],oi.prototype,"config",void 0),oi=ni([(0,e.EM)("remote-touchpad")],oi);let ai=class extends Ze.W{render(){return this.setValue(),t.qy`${this.buildIcon(this.config.icon)}${this.buildLabel(this.config.label)}${this.buildStyles(this.config.styles)}`}};ai=ni([(0,e.EM)("remote-icon-label")],ai);var ri=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};console.info("%c UNIVERSAL-REMOTE-CARD v4.3.0","color: white; font-weight: bold; background: green");class si extends t.WF{constructor(){super(...arguments),this.DEFAULT_ACTIONS=[],this.nRows=0,this.nColumns=0,this.nPads=0,this.editMode=!1,this.rtl=!1}static get properties(){return{hass:{},config:{}}}static getConfigElement(){return document.createElement("universal-remote-card-editor")}static getStubConfig(){return{type:"custom:android-tv-card",rows:[]}}getCardSize(){let t=this.config.rows?.length??0;return this.config.title&&(t+=1),t}async setConfig(t){if(!t)throw new Error("Invalid configuration");this.config=t}updateElementConfig(t){if(!Object.keys(t).length)return t;const e=structuredClone(t),n={config:{...this.config,entity:(0,i.X)(this.hass,e.entity_id??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id??""),attribute:(0,i.X)(this.hass,e.value_attribute??"state")}};for(const t of Pe)if(e[t]){const o=e[t]??{};switch((0,i.X)(this.hass,o.action,n)){case"keyboard":case"textbox":case"search":o.keyboard_id=o.keyboard_id??this.config.keyboard_id;case"key":case"source":o.remote_id=o.remote_id??this.config.remote_id,o.media_player_id=o.media_player_id??this.config.media_player_id,o.platform=o.platform??this.config.platform;break;case"perform-action":{const[t,a]=(0,i.X)(this.hass,o.perform_action??"",n).split("."),r=o.target??{};if(!(r.entity_id||r.device_id||r.area_id||r.label_id)){const a=(0,i.X)(this.hass,e.entity_id??"",n);switch(t){case"remote":r.entity_id=a.startsWith("remote")?e.entity_id:this.config.remote_id;break;case"media_player":case"androidtv":case"kodi":case"denonavr":case"webostv":r.entity_id=a.startsWith("media_player")?e.entity_id:this.config.media_player_id;break;case"unified_remote":o.data=o.data??{},o.data.target=o.data.target??e.entity_id??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id;break;default:r.entity_id=e.entity_id}}o.target=r;break}}e[t]=o}e.haptics=e.haptics??this.config.haptics??!0,this.config.double_tap_window&&(e.double_tap_action&&(e.double_tap_action.double_tap_window=e.double_tap_action?.double_tap_window??this.config.double_tap_window??Ue.jc),e.multi_double_tap_action&&(e.multi_double_tap_action.double_tap_window=e.multi_double_tap_action.double_tap_window??this.config.double_tap_window??Ue.jc)),(this.config.hold_time||e.double_tap_action||e.multi_double_tap_action)&&(e.hold_action=e.hold_action??{},e.hold_action.hold_time=e.hold_action?.hold_time??this.config.hold_time??Ue.At,e.multi_hold_action=e.multi_hold_action??{},e.multi_hold_action.hold_time=e.multi_hold_action?.hold_time??this.config.hold_time??Ue.At),this.config.repeat_delay&&("repeat"==e.hold_action?.action&&(e.hold_action.repeat_delay=e.hold_action.repeat_delay??this.config.repeat_delay??Ue.a3),e.multi_hold_action&&"repeat"==e.multi_hold_action?.action&&(e.multi_hold_action.repeat_delay=e.multi_hold_action.repeat_delay??this.config.repeat_delay??Ue.a3));const o=(0,i.X)(this.hass,e.type,n);if("slider"==o&&"slider"==(0,i.X)(this.hass,e.name,n)?e.entity_id=e.entity_id??this.config.media_player_id:e.entity_id=e.entity_id??(Array.isArray(e.tap_action?.target?.entity_id)?e.tap_action?.target?.entity_id?.[0]:e.tap_action?.target?.entity_id)??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id,"touchpad"==o)for(const t of Fe)e[t].entity_id=e.entity_id,e[t].value_attribute=e.value_attribute,e[t]=this.updateElementConfig(e[t]??{});return e.card=this.config,e}getElementConfig(t){const e=[...this.config.custom_actions??[],...this.customActionsFromFile??[]].filter((e=>e.name==t))[0];return e?e.autofill_entity_id??this.config.autofill_entity_id??Ue.$6?this.updateElementConfig(e):e:this.updateElementConfig(this.DEFAULT_ACTIONS.filter((e=>e.name==t))[0]??{})}buildRow(e){this.nRows++;const i=`row-${this.nRows}`;return t.qy`
${e}
`}buildColumn(e){this.nColumns++;const i=`column-${this.nColumns}`;return t.qy`
${e}
`}buildPad(e){this.nPads++;const i=`pad-${this.nPads}`;return t.qy`
${e.map((t=>this.buildButton(t,this.getElementConfig(t))))}
`}buildButton(e,i){return Object.keys(i).length?t.qy``:t.qy`
`}buildSlider(e,i){return t.qy``}buildTouchpad(e,i){return t.qy``}buildVolumeButtons(){return[this.buildButton("volume_down",this.getElementConfig("volume_down")),this.buildButton("volume_mute",this.getElementConfig("volume_mute")),this.buildButton("volume_up",this.getElementConfig("volume_up"))]}buildNavButtons(){const t=[this.buildButton("left",this.getElementConfig("left")),this.buildButton("center",this.getElementConfig("center")),this.buildButton("right",this.getElementConfig("right"))];return this.rtl&&t.reverse(),this.buildColumn([this.buildRow([this.buildButton("up",this.getElementConfig("up"))]),this.buildRow(t),this.buildRow([this.buildButton("down",this.getElementConfig("down"))])])}buildElements(t,e=!1,n={}){"string"==typeof t&&(t=[t]);const o=[];for(let a of t)if(a=(0,i.X)(this.hass,a,n),"string"==typeof a&&a.includes("- ")&&(a=Me(a)),"object"==typeof a&&null!=a)o.push(this.buildElements(a,!e,n));else switch(a){case"volume_buttons":{const t=this.buildVolumeButtons();e&&t.reverse(),o.push(...t);break}case"navigation_buttons":o.push(this.buildNavButtons());break;case"dpad":o.push(this.buildPad(["","up","","left","center","right","","down",""]));break;case"numpad":o.push(this.buildPad(["n7","n8","n9","n4","n5","n6","n1","n2","n3"]));break;case"xpad":o.push(this.buildPad(["","y","","x","","b","","a",""]));break;case"npad":o.push(this.buildPad(["","x","","y","","a","","b",""]));break;default:{const t=this.getElementConfig(a);switch(t.type){case"slider":o.push(this.buildSlider(a,t));break;case"touchpad":o.push(this.buildTouchpad(a,t));break;default:o.push(this.buildButton(a,t))}break}}return e?this.buildColumn(o):this.buildRow(o)}buildDialog(){return t.qy``}fetchCustomActionsFromFile(t){if(!this.customActionsFromFile&&t){t=`${t.startsWith("/")?"":"/"}${t}`;try{const e=t.split(".").pop()?.toLowerCase();this.hass.fetchWithAuth(t).then((t=>"json"==e?t.json():t.text())).then((t=>{const i="json"==e?t:Me(t);if(!Array.isArray(i))throw TypeError(i);this.customActionsFromFile=i,this.requestUpdate()}))}catch(e){console.error(`File ${t} is not a valid JSON or YAML array\n${e}`),this.customActionsFromFile=[]}}}render(){if(!this.config||!this.hass)return t.qy``;const e={config:{...this.config,entity:(0,i.X)(this.hass,this.config.remote_id??this.config.media_player_id??this.config.keyboard_id??""),attribute:"state"}};this.fetchCustomActionsFromFile((0,i.X)(this.hass,this.config.custom_actions_file??"")),this.editMode=Boolean(document.querySelector("home-assistant")?.shadowRoot?.querySelector("hui-dialog-edit-card")?.shadowRoot?.querySelector("ha-dialog")),this.rtl="rtl"==getComputedStyle(this).direction;const n=(0,i.X)(this.hass,this.config.platform??"Android TV",e),[o,a]=(0,je.XO)(n);this.DEFAULT_ACTIONS=[...o,...a];const r=[];this.nRows=0,this.nColumns=0,this.nPads=0;for(const t of this.config.rows??[]){const i=this.buildElements(t,!1,e);r.push(i)}const s=this.config.styles?t.qy``:"";return t.qy`${r}${this.buildDialog()}${s}`}static get styles(){return t.AH`ha-card{padding:12px;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var( + )}.off,.slider{position:absolute;appearance:none;-webkit-appearance:none;-moz-appearance:none;pointer-events:all;height:100%;width:inherit;background:0 0;overflow:hidden}.slider::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;height:var(--height);width:var(--thumb-width,var(--height));cursor:pointer;background:var(--color);border-color:rgb(0,0,0,0);box-shadow:var(--thumb-box-shadow,calc(-100vw - (var(--thumb-width,var(--height))/ 2)) 0 0 100vw var(--color));border-radius:var(--thumb-border-radius,var(--height))}.slider::-moz-range-thumb{appearance:none;-webkit-appearance:none;height:var(--height);width:var(--thumb-width,var(--height));cursor:pointer;background:var(--color);border-color:rgb(0,0,0,0);box-shadow:var(--thumb-box-shadow,calc(-100vw - (var(--thumb-width,var(--height))/ 2)) 0 0 100vw var(--color));border-radius:var(--thumb-border-radius,var(--height))}.off::-webkit-slider-thumb{visibility:hidden}.off::-moz-range-thumb{visibility:hidden}.tooltip{background:var(--clear-background-color);color:var(--primary-text-color);position:absolute;border-radius:.8em;padding:.2em .4em;height:20px;width:fit-content;line-height:20px;transform:var(--tooltip-transform);display:var(--tooltip-display)}.faded-out{opacity:0;transition:opacity 180ms ease-in-out 0s,left 180ms ease-in-out 0s,bottom 180ms ease-in-out 0s}.faded-in{opacity:1;transition:opacity 540ms ease-in-out 0s}.tooltip::after{content:var(--tooltip-label,0)}.icon{color:var(--icon-color,var(--background,var(--primary-background-color)));--mdc-icon-size:var(--size, 32px)}`]}};ei([(0,e.MZ)()],ii.prototype,"config",void 0),ei([(0,e.wk)()],ii.prototype,"showTooltip",void 0),ei([(0,e.wk)()],ii.prototype,"thumbOffset",void 0),ei([(0,e.wk)()],ii.prototype,"sliderOn",void 0),ei([(0,e.wk)()],ii.prototype,"currentValue",void 0),ei([(0,e.wk)()],ii.prototype,"sliderWidth",void 0),ei([(0,e.wk)()],ii.prototype,"sliderHeight",void 0),ii=ei([(0,e.EM)("remote-slider")],ii);var ni=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let oi=class extends Ze.W{constructor(){super(...arguments),this.clickCount=0,this.hold=!1,this.holdStart=!1,this.holdMove=!1,this.fireMouseAction=!0}onClick(t){t.stopImmediatePropagation(),this.clickCount++;const e=this.targetTouches?.length||1,i=this.getMultiPrefix();if("none"!=this.renderTemplate(this.config.double_tap_action?.action??"none")||"none"!=this.renderTemplate(this.config.multi_double_tap_action?.action??"none")){const t=`${i}double_tap_action`;if(this.clickCount>e)this.fireHapticEvent("success"),this.sendAction(t),this.endAction();else if(!this.clickTimer){let e="double_tap_window"in(this.config[t]??{})?this.renderTemplate(this.config[t]?.double_tap_window):Ue.jc;"multi_"==i&&this.config.multi_double_tap_action&&(e=this.renderTemplate(this.config.multi_double_tap_action?.double_tap_window??Ue.jc)),this.clickTimer=setTimeout((()=>{this.fireHapticEvent("light"),this.sendAction(`${i}tap_action`),this.endAction()}),e)}}else this.fireHapticEvent("light"),this.sendAction(`${i}tap_action`),this.endAction()}onStart(t){super.onStart(t),this.cancelRippleToggle(),this.holdStart=!0,this.direction||"none"==this.renderTemplate(this.config.momentary_start_action?.action??"none")?this.direction||"none"==this.renderTemplate(this.config.momentary_end_action?.action??"none")?this.holdTimer||this.setHoldTimer():(this.fireHapticEvent("light"),this.momentaryStart=performance.now()):(this.fireHapticEvent("light"),this.momentaryStart=performance.now(),this.sendAction("momentary_start_action"))}onEnd(t){this.direction||"none"==this.renderTemplate(this.config.momentary_end_action?.action??"none")?this.direction||"none"==this.renderTemplate(this.config.momentary_start_action?.action??"none")?this.hold||this.holdMove?(t.stopImmediatePropagation(),t.preventDefault(),this.endAction(),"targetTouches"in t&&t.targetTouches?.length&&(this.holdMove=!0)):this.holdMove||"targetTouches"in t&&t.targetTouches.length||this.onClick(t):this.endAction():(this.momentaryEnd=performance.now(),this.fireHapticEvent("selection"),this.sendAction("momentary_end_action"),this.endAction()),this.toggleRipple()}onMove(t){if(!this.initialX||!this.initialY||!this.holdStart)return;super.onMove(t);const e=this.getMultiPrefix();if("none"!=this.renderTemplate(this.config[`${e}mouse_action`]?.action??"none")){if((this.holdMove||Math.abs(Math.abs(this.deltaX??0)-Math.abs(this.deltaY??0))>2)&&this.fireMouseAction){clearTimeout(this.holdTimer),this.holdTimer=void 0,this.holdMove=!0;const t=this.renderTemplate(this.config[`${e}mouse_action`]?.repeat_delay??0);t&&(this.fireMouseAction=!1,setTimeout((()=>{this.fireMouseAction=!0}),t)),this.sendAction(`${e}mouse_action`)}}else{const t=(this.currentX??0)-this.initialX,i=(this.currentY??0)-this.initialY;Math.abs(Math.abs(t)-Math.abs(i))>2&&(Math.abs(t)>Math.abs(i)?this.direction=t<0?"left":"right":this.direction=i<0?"up":"down",this.holdMove||(this.fireHapticEvent("light"),this.sendAction(`${e}tap_action`,this.getActions()),this.holdMove=!0,this.holdTimer&&(clearTimeout(this.holdTimer),this.holdTimer=void 0,this.setHoldTimer())))}}onMouseLeave(t){this.endAction(),this.toggleRipple()}onTouchCancel(t){this.endAction(),this.toggleRipple()}endAction(){clearTimeout(this.holdTimer),clearInterval(this.holdInterval),clearTimeout(this.clickTimer),this.holdTimer=void 0,this.holdInterval=void 0,this.clickTimer=void 0,this.hold=!1,this.holdStart=!1,this.holdMove=!1,this.direction=void 0,this.clickCount=0,super.endAction()}getActions(){return this.direction?this.config[this.direction]:this.config}getMultiPrefix(){return this.targetTouches&&this.targetTouches.length>1?"multi_":""}setHoldTimer(){const t=`${this.getMultiPrefix()}hold_action`,e=this.getActions(),i=this.renderTemplate(e[t]?.hold_time??Ue.At);this.holdTimer=setTimeout((()=>{this.hold=!0;const t=this.getActions(),e=this.getMultiPrefix();let i="repeat"==this.renderTemplate(t.hold_action?.action),n=this.renderTemplate(t.hold_action?.repeat_delay??Ue.a3);"multi_"==e&&t.multi_hold_action&&(i="repeat"==this.renderTemplate(t.multi_hold_action?.action),n=this.renderTemplate(t.multi_hold_action?.repeat_delay??Ue.a3)),i?this.holdInterval||(this.holdInterval=setInterval((()=>{this.fireHapticEvent("selection"),this.sendAction(`${this.getMultiPrefix()}tap_action`,this.getActions())}),n)):(this.fireHapticEvent("medium"),this.sendAction(`${e}hold_action`,t))}),i)}render(){return this.setValue(),t.qy`
${this.buildRipple()}
${this.buildStyles(this.config.styles)}`}static get styles(){return[super.styles,t.AH`:host{display:contents;--mdc-ripple-press-opacity:0.04}toucharea{border-radius:32px;flex-grow:1;height:250px;width:-moz-available;width:-webkit-fill-available;width:fill-available;background:var(--primary-background-color,#6f767d);touch-action:none;text-align:center;position:relative;overflow:hidden;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:space-between}.toucharea-row{min-height:var(--size,48px);display:flex;flex-direction:row;flex-wrap:nowrap;width:-moz-available;width:-webkit-fill-available;width:fill-available;justify-content:space-around;align-items:center}`]}};ni([(0,e.MZ)()],oi.prototype,"config",void 0),oi=ni([(0,e.EM)("remote-touchpad")],oi);let ai=class extends Ze.W{render(){return this.setValue(),t.qy`${this.buildIcon(this.config.icon)}${this.buildLabel(this.config.label)}${this.buildStyles(this.config.styles)}`}};ai=ni([(0,e.EM)("remote-icon-label")],ai);var ri=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};console.info("%c UNIVERSAL-REMOTE-CARD v4.3.0","color: white; font-weight: bold; background: green");class si extends t.WF{constructor(){super(...arguments),this.DEFAULT_ACTIONS=[],this.nRows=0,this.nColumns=0,this.nPads=0,this.editMode=!1,this.rtl=!1}static get properties(){return{hass:{},config:{}}}static getConfigElement(){return document.createElement("universal-remote-card-editor")}static getStubConfig(){return{type:"custom:android-tv-card",rows:[]}}getCardSize(){let t=this.config.rows?.length??0;return this.config.title&&(t+=1),t}async setConfig(t){if(!t)throw new Error("Invalid configuration");this.config=t}updateElementConfig(t){if(!Object.keys(t).length)return t;const e=structuredClone(t),n={config:{...this.config,entity:(0,i.X)(this.hass,e.entity_id??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id??""),attribute:(0,i.X)(this.hass,e.value_attribute??"state")}};for(const t of Pe)if(e[t]){const o=e[t]??{};switch((0,i.X)(this.hass,o.action,n)){case"keyboard":case"textbox":case"search":o.keyboard_id=o.keyboard_id??this.config.keyboard_id;case"key":case"source":o.remote_id=o.remote_id??this.config.remote_id,o.media_player_id=o.media_player_id??this.config.media_player_id,o.platform=o.platform??this.config.platform;break;case"perform-action":{const[t,a]=(0,i.X)(this.hass,o.perform_action??"",n).split("."),r=o.target??{};if(!(r.entity_id||r.device_id||r.area_id||r.label_id)){const a=(0,i.X)(this.hass,e.entity_id??"",n);switch(t){case"remote":r.entity_id=a.startsWith("remote")?e.entity_id:this.config.remote_id;break;case"media_player":case"androidtv":case"kodi":case"denonavr":case"webostv":r.entity_id=a.startsWith("media_player")?e.entity_id:this.config.media_player_id;break;case"unified_remote":o.data=o.data??{},o.data.target=o.data.target??e.entity_id??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id;break;default:r.entity_id=e.entity_id}}o.target=r;break}}e[t]=o}e.haptics=e.haptics??this.config.haptics??!0,this.config.double_tap_window&&(e.double_tap_action&&(e.double_tap_action.double_tap_window=e.double_tap_action?.double_tap_window??this.config.double_tap_window??Ue.jc),e.multi_double_tap_action&&(e.multi_double_tap_action.double_tap_window=e.multi_double_tap_action.double_tap_window??this.config.double_tap_window??Ue.jc)),(this.config.hold_time||e.double_tap_action||e.multi_double_tap_action)&&(e.hold_action=e.hold_action??{},e.hold_action.hold_time=e.hold_action?.hold_time??this.config.hold_time??Ue.At,e.multi_hold_action=e.multi_hold_action??{},e.multi_hold_action.hold_time=e.multi_hold_action?.hold_time??this.config.hold_time??Ue.At),this.config.repeat_delay&&("repeat"==e.hold_action?.action&&(e.hold_action.repeat_delay=e.hold_action.repeat_delay??this.config.repeat_delay??Ue.a3),e.multi_hold_action&&"repeat"==e.multi_hold_action?.action&&(e.multi_hold_action.repeat_delay=e.multi_hold_action.repeat_delay??this.config.repeat_delay??Ue.a3));const o=(0,i.X)(this.hass,e.type,n);if("slider"==o&&"slider"==(0,i.X)(this.hass,e.name,n)?e.entity_id=e.entity_id??this.config.media_player_id:e.entity_id=e.entity_id??(Array.isArray(e.tap_action?.target?.entity_id)?e.tap_action?.target?.entity_id?.[0]:e.tap_action?.target?.entity_id)??this.config.remote_id??this.config.media_player_id??this.config.keyboard_id,"touchpad"==o)for(const t of Fe)e[t].entity_id=e.entity_id,e[t].value_attribute=e.value_attribute,e[t]=this.updateElementConfig(e[t]??{});return e.card=this.config,e}getElementConfig(t){const e=[...this.config.custom_actions??[],...this.customActionsFromFile??[]].filter((e=>e.name==t))[0];return e?e.autofill_entity_id??this.config.autofill_entity_id??Ue.$6?this.updateElementConfig(e):e:this.updateElementConfig(this.DEFAULT_ACTIONS.filter((e=>e.name==t))[0]??{})}buildRow(e){this.nRows++;const i=`row-${this.nRows}`;return t.qy`
${e}
`}buildColumn(e){this.nColumns++;const i=`column-${this.nColumns}`;return t.qy`
${e}
`}buildPad(e){this.nPads++;const i=`pad-${this.nPads}`;return t.qy`
${e.map((t=>this.buildButton(t,this.getElementConfig(t))))}
`}buildButton(e,i){return Object.keys(i).length?t.qy``:t.qy`
`}buildSlider(e,i){return t.qy``}buildTouchpad(e,i){return t.qy``}buildVolumeButtons(){return[this.buildButton("volume_down",this.getElementConfig("volume_down")),this.buildButton("volume_mute",this.getElementConfig("volume_mute")),this.buildButton("volume_up",this.getElementConfig("volume_up"))]}buildNavButtons(){const t=[this.buildButton("left",this.getElementConfig("left")),this.buildButton("center",this.getElementConfig("center")),this.buildButton("right",this.getElementConfig("right"))];return this.rtl&&t.reverse(),this.buildColumn([this.buildRow([this.buildButton("up",this.getElementConfig("up"))]),this.buildRow(t),this.buildRow([this.buildButton("down",this.getElementConfig("down"))])])}buildElements(t,e=!1,n={}){"string"==typeof t&&(t=[t]);const o=[];for(let a of t)if(a=(0,i.X)(this.hass,a,n),"string"==typeof a&&a.includes("- ")&&(a=Me(a)),"object"==typeof a&&null!=a)o.push(this.buildElements(a,!e,n));else switch(a){case"volume_buttons":{const t=this.buildVolumeButtons();e&&t.reverse(),o.push(...t);break}case"navigation_buttons":o.push(this.buildNavButtons());break;case"dpad":o.push(this.buildPad(["","up","","left","center","right","","down",""]));break;case"numpad":o.push(this.buildPad(["n7","n8","n9","n4","n5","n6","n1","n2","n3"]));break;case"xpad":o.push(this.buildPad(["","y","","x","","b","","a",""]));break;case"npad":o.push(this.buildPad(["","x","","y","","a","","b",""]));break;default:{const t=this.getElementConfig(a);switch(t.type){case"slider":o.push(this.buildSlider(a,t));break;case"touchpad":o.push(this.buildTouchpad(a,t));break;default:o.push(this.buildButton(a,t))}break}}return e?this.buildColumn(o):this.buildRow(o)}buildDialog(){return t.qy``}fetchCustomActionsFromFile(t){if(!this.customActionsFromFile&&t){t=`${t.startsWith("/")?"":"/"}${t}`;try{const e=t.split(".").pop()?.toLowerCase();this.hass.fetchWithAuth(t).then((t=>"json"==e?t.json():t.text())).then((t=>{const i="json"==e?t:Me(t);if(!Array.isArray(i))throw TypeError(i);this.customActionsFromFile=i,this.requestUpdate()}))}catch(e){console.error(`File ${t} is not a valid JSON or YAML array\n${e}`),this.customActionsFromFile=[]}}}render(){if(!this.config||!this.hass)return t.qy``;const e={config:{...this.config,entity:(0,i.X)(this.hass,this.config.remote_id??this.config.media_player_id??this.config.keyboard_id??""),attribute:"state"}};this.fetchCustomActionsFromFile((0,i.X)(this.hass,this.config.custom_actions_file??"")),this.editMode=Boolean(document.querySelector("home-assistant")?.shadowRoot?.querySelector("hui-dialog-edit-card")?.shadowRoot?.querySelector("ha-dialog")),this.rtl="rtl"==getComputedStyle(this).direction;const n=(0,i.X)(this.hass,this.config.platform??"Android TV",e),[o,a]=(0,je.XO)(n);this.DEFAULT_ACTIONS=[...o,...a];const r=[];this.nRows=0,this.nColumns=0,this.nPads=0;for(const t of this.config.rows??[]){const i=this.buildElements(t,!1,e);r.push(i)}const s=this.config.styles?t.qy``:"";return t.qy`${r}${this.buildDialog()}${s}`}static get styles(){return t.AH`ha-card{padding:12px;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var( --ha-ripple-pressed-opacity, 0.12 );--ha-ripple-color:var(--secondary-text-color);--mdc-ripple-hover-color:var( diff --git a/src/classes/remote-touchpad.ts b/src/classes/remote-touchpad.ts index 6ff9465..aabaa00 100644 --- a/src/classes/remote-touchpad.ts +++ b/src/classes/remote-touchpad.ts @@ -137,12 +137,11 @@ export class RemoteTouchpad extends BaseRemoteElement { e.preventDefault(); this.endAction(); if ('targetTouches' in e && e.targetTouches?.length) { - this.hold = true; + this.holdMove = true; } } else if ( - !this.hold || - !('targetTouches' in e) || - !e.targetTouches.length + !this.holdMove && + (!('targetTouches' in e) || !e.targetTouches.length) ) { this.onClick(e); }