Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mag-core

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mag-core - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

4

app/config.json

@@ -82,3 +82,3 @@ {

"name": "launcher",
"type": "launcher",
"type": "app",
"url": "http://192.168.1.11:8008/develop.html",

@@ -310,3 +310,3 @@ "url": "http://192.168.1.11:8030/launcher/",

"description": "Watch TV shows, movies, tv series, news and educational programs in digital quality",
"type": "app",
"type": "launcher",
"category": "media",

@@ -313,0 +313,0 @@ "backgroundColor": "#00bae8",

@@ -1,2 +0,2 @@

/*! mag-core: v1.0.5 (webpack: v1.12.14) */
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";window.host=!!window.gSTB,n(13),n(21),window.addEventListener("unload",function(){window.stbPlayerManager?stbPlayerManager.list.forEach(function(t){t.stop(),t.setViewport({x:0,y:0,width:screen.width,height:screen.height})}):gSTB.Stop()}),n(15)},function(t,e,n){"use strict";function i(t){o.call(this,t)}var o=n(3),s=n(2),a=n(5),r={coreList:[],windowList:[],windowToCoreMap:{},core:{},getInstance:function(t){var e,n=this.windowList.indexOf(t);return-1===n?(e=new i,e.plugins={},e.theme.path=s.data.themes.graphite,Object.defineProperty(e,"index",{value:r.coreList.push(e)-1,configurable:!1,enumerable:!1,writable:!1}),this.windowToCoreMap[this.windowList.push(t)-1]=e.index):e=this.coreList[this.windowToCoreMap[n]],e},destroy:function(t){var e=this.windowList.indexOf(t);return-1!==e?(this.coreList.splice(this.windowToCoreMap[e],1),this.windowToCoreMap[this.windowToCoreMap[e]]=void 0,this.windowList.splice(e,1),!0):!1}},c=null,p=gSTB.GetEnv(JSON.stringify({varList:["language","upnp_conf"]}));try{p=JSON.parse(p),p=p.result}catch(l){p={}}i.prototype=Object.create(o.prototype),i.prototype.constructor=i,i.prototype.theme={path:null},i.prototype.state=null,i.prototype.environment={onFocusDebounceTimeout:300,onInputDebounceTimeout:300,language:p.language||"en",upnp_conf:p.upnp_conf},i.prototype.onInputDebounceTimeout=300,i.prototype.intent=function(t,e){var i,o,r,p=this,l=a.create(t,e);if(t&&t.action)if(i=a.route(l,this),null!==i.runConfig){if(null===c&&(c=n(4)),i.runConfig.pid)for(o=0,r=s.data.apps.length;r>o;){if(s.data.apps[o].url===i.runConfig.url){i.runConfig=s.data.apps[o]=JSON.parse(JSON.stringify(s.data.apps[o]));break}++o}c.runApp({config:i.runConfig,visible:!0,onready:function(){a.route(l,p)}})}else i.handlerList.length>1;return l},window.extendCorePrototype=function(t,e){i.prototype[t]=e},window.addIntentHook=function(t,e){a.addHook(t,e)},t.exports=r},function(t,e,n){"use strict";function i(t,e){var n,o;for(n in e)e.hasOwnProperty(n)&&("Array"===e[n].constructor.name?(o=[],t[n]=e[n].concat(t[n]),t[n].forEach(function(t){var e=!0;o.forEach(function(n){n.name===t.name&&(e=!1)}),e&&o.push(t)}),t[n]=o):"object"==typeof e[n]?i(t[n],e[n]):t[n]=e[n])}t.exports={systemSettings:{},settings:{},environment:{},data:{},load:function(t,e){var n,o=this,s=new XMLHttpRequest;n=t.config||"config.json",s.onload=function(){var n=!1;try{o.data=JSON.parse(s.responseText)}catch(a){n=!0}t.extend?(s.onload=function(){var t=!1,n={};try{n=JSON.parse(s.responseText)}catch(a){t=!0}i(o.data,n),e(t,o.data)},s.open("GET",t.extend,!0),s.send(null)):e(n,o.data)},s.open("GET",n,!0),s.send(null)}}},function(t,e,n){"use strict";function i(){this.events={}}i.prototype={addListener:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},once:function(t,e){var n=this;this.events[t]=this.events[t]||[],this.events[t].push(function i(){e.apply(n,arguments),n.removeListener(t,i)})},addListeners:function(t){var e;for(e in t)t.hasOwnProperty(e)&&this.addListener(e,t[e])},removeListener:function(t,e){this.events[t]&&(this.events[t]=this.events[t].filter(function(t){return t!==e}),0===this.events[t].length&&(this.events[t]=void 0))},emit:function(t){var e,n=this.events[t];if(n)for(e=0;e<n.length;e++)n[e].apply(this,Array.prototype.slice.call(arguments,1))}},i.prototype.constructor=i,t.exports=i},function(t,e,n){"use strict";var i=null,o=n(20),s=n(17),a=n(16),r=n(22),c=n(2),p=null,l=null,d={topApp:null,stack:[],runHistory:[],apps:{},launcher:null,splashActive:!1,show:function(t,e){var n,o=t.config.type;if(this.topApp!==t)switch(o){case"app":this.launcher.$iframe.style.visibility="hidden",i.style.zIndex=window.frames.length;case"system":"system"===o&&(i.style.zIndex=0,t.$iframe.style.zIndex=window.frames.length),n=this.stack.indexOf(t),-1!==n&&this.stack.splice(n,1),this.stack.push(t),this.topApp&&this.topApp!==t&&("function"==typeof this.topApp.core.emit&&this.topApp.core.emit(e?"hide:auto":"hide"),this.topApp.$iframe.style.visibility="hidden"),this.topApp=t,t.$iframe.contentWindow.focus(),t.$iframe.style.visibility="visible",t.core&&"function"==typeof t.core.emit&&t.core.emit("show");break;default:t.$iframe.contentWindow.focus(),t.$iframe.style.visibility="visible"}},hide:function(t,e){var n=t.config.type;switch(t.$iframe.style.visibility="hidden",t.core&&"function"==typeof t.core.emit&&t.core.emit(e?"hide:auto":"hide"),n){case"app":case"system":this.topApp===t&&(this.topApp=null),this.stack.pop(),this.stack.length>0?this.show(this.stack.pop()):this.show(this.launcher)}},close:function(t,e){var o,s,a=c.data.apps.length,r=0;if(null===p&&(p=n(1),l=n(5)),"undefined"==typeof t)e||this.show(this.launcher);else if("app"===t.config.type){for(t===this.topApp?(this.topApp=null,this.stack.pop()):(o=this.stack.indexOf(t),this.stack.splice(o,1)),t.core&&"function"==typeof t.core.emit&&t.core.emit("exit");a>r;){if(c.data.apps[r].url===t.config.url){c.data.apps[r]=JSON.parse(JSON.stringify(c.data.apps[r])),c.data.apps[r].pid=void 0,l.replaceActionsConfig(t.config,c.data.apps[r]);break}++r}for(p.destroy(t.window),i.contentDocument.body.removeChild(t.$iframe),s=Object.keys(this.apps),a=s.length,r=0;a>r;){if(this.apps[s[r]]===t){delete d.apps[s[r]];break}++r}if(t.config.pid=void 0,t=null,!e){for(;this.stack.length;)t=this.stack.pop(),t.$iframe.style.visibility="hidden",t.core.emit("hide");this.topApp=null,this.show(this.launcher)}}},runApp:function(t){function e(){var e;l&&u&&u.window&&(e=n(1).getInstance(u.window),u.core=e,u.window.pid||(u.window.pid=h),e.ready||(p.forEach(function(n){e.plugins[n.name]=n.instance(t.config)}),"app"===t.config.type?e.call=function(e){"exit"===e?d.close(u):"app:ready"===e&&t.visible&&d.splashActive&&(d.splashActive=!1,window.splash.style.display="none",window.splash.style.backgroundImage="none",window.splash.style.backgroundColor="transparent",window.splashVersion.innerText="",d.show(u),t.onready&&t.onready())}:"osd"===t.config.type?(e.system=!0,e.config=c.data,e.call=function(t){var e,n;switch(t){case"hide":u.$iframe.style.visibility="hidden";break;case"show":for(u.$iframe.style.zIndex=window.frames.length+1,u.$iframe.style.visibility="visible",e=Object.keys(d.apps),n=e.length-1;n>-1;)d.apps[e[n]]&&"osd"===d.apps[e[n]].config.type&&u!==d.apps[e[n]]&&d.apps[e[n]].core.emit("hide"),--n;break;case"focus":d.topApp?d.topApp.core.emit("blur"):d.launcher&&d.launcher.core.emit("blur"),u.$iframe.contentWindow.focus();break;case"blur":d.topApp?(d.topApp.$iframe.contentWindow.focus(),d.topApp.core.emit("focus")):d.launcher&&(d.launcher.$iframe.contentWindow.focus(),d.launcher.core.emit("focus"))}}):(e.system=!0,e.config=c.data,e.call=function(t){switch(t){case"hide":d.hide(u);break;case"show":d.show(u)}}),e.pid=h,e.ready=!0,e.emit("load")),t.onload&&t.onload(u))}var o={},p=[],l=!1,h=-1,u=null,f=c.data.apps.length,w=0,v=!0;if(t.config.legacy)return void(window.location.href=t.config.url+"?referrer="+encodeURIComponent(window.location.href));if("app"===t.config.type){for(;f>w;){if(c.data.apps[w].url===t.config.url){t.config=c.data.apps[w],"undefined"!=typeof c.data.apps[w].pid&&(d.apps[t.config.pid]?v=!1:t.config.pid=void 0);break}++w}if(!v)return d.runHistory=d.runHistory.filter(function(e){return e.url!==t.config.url}),d.runHistory.push(t.config),d.show(d.apps[t.config.pid]),d.apps[t.config.pid].core.emit("maximize"),t.onload&&t.onload(d.apps[t.config.pid]),void(t.onready&&t.onready(d.apps[t.config.pid]));this.splashActive=!0,this.launcher.$iframe.style.visibility="hidden",window.splash.firstChild.innerText=c.data.apps[w].name,window.splash.style.display="",window.splash.style.backgroundImage="url("+c.data.apps[w].url+c.data.apps[w].icons.paths[screen.height]+c.data.apps[w].icons.states.active+")",window.splash.style.backgroundColor=c.data.apps[w].backgroundColor,window.splashVersion.innerText=c.data.apps[w].version,this.topApp&&(this.topApp.$iframe.style.visibility="hidden")}else t.config.metrics&&t.config.metrics[screen.height]&&(o.width=t.config.metrics[screen.height].width,o.height=t.config.metrics[screen.height].height,o.top=t.config.metrics[screen.height].top,o.left=t.config.metrics[screen.height].left);return a.load(t.config,function(t,n){t?(p={length:-1,forEach:function(){}},l=!0,e()):(n&&(p=n),l=!0,e())}),u={$iframe:s({url:t.config.url,visibile:!1,$container:"app"===t.config.type?i.contentDocument.body:window.document.body,width:o.width,height:o.height,top:o.top,left:o.left,onload:function(){this.contentWindow.addEventListener("keydown",function(t){0!==t.keyCode&&r("keydown:"+t.keyCode,t)}),u.window=this.contentWindow,e()}}),window:null,core:null,config:t.config},"app"===t.config.type&&(d.runHistory=d.runHistory.filter(function(e){return e.url!==t.config.url}),d.runHistory.push(t.config)),"launcher"!==t.config.type&&(h=Object.keys(d.apps).length,this.apps[h]=u),t.config.pid=h,u},init:function(){return function(t){i=s({$container:document.body,visible:!0,onload:function(){var e=this.contentDocument.head.appendChild(this.contentDocument.createElement("style"));e.textContent="html, body{ overflow: hidden; margin: 0; padding:0; width: "+screen.width+"px; height: "+screen.height+"px; } iframe { position: absolute; top: 0; left: 0; border: none; outline: none; overflow: hidden;margin: 0; padding: 0; width: "+screen.width+"px; height: "+screen.height+"px; }",this.contentWindow.parent=null,this.contentWindow.opener=null,this.contentWindow.getCoreInstanse=function(t){return n(1).getInstance(t)},this.contentWindow.getCoreInstance=function(t){return n(1).getInstance(t)},this.contentWindow.host=!0,this.contentWindow.localStorage=window.localStorage||window.stbStorage,this.contentWindow.stbEvent=window.stbEvent,this.contentWindow.dvbManager=o.dvbManager,this.contentWindow.epgManager=o.epgManager,this.contentWindow.gSTB=o.gSTB,this.contentWindow.pvrManager=o.pvrManager,this.contentWindow.stbDownloadManager=o.stbDownloadManager,this.contentWindow.stbStorage=o.stbStorage,this.contentWindow.stbUpdate=o.stbUpdate,this.contentWindow.stbUPnP=o.stbUPnP,this.contentWindow.stbWebWindow=o.stbWebWindow,this.contentWindow.stbWindowMgr=o.stbWindowMgr,this.contentWindow.timeShift=o.timeShift,this.contentWindow.stbPlayerManager=o.stbPlayerManager,t(!1,{config:{},instance:null,$iframe:i})}})}}};t.exports=d},function(t,e,n){"use strict";var i=n(18),o={},s={},a=null,r=null,c=null,p={create:function(t,e){return new i(t,e)},route:function(t,e){var p={runConfig:null,handlerList:[]};return null===r&&(r=n(1)),null===a&&(a=n(4)),t.context?("undefined"!=typeof t.context.pid?(t.once("close",function(){e&&e.pid&&a.apps[e.pid]?(a.show(a.apps[e.pid]),a.apps[e.pid].core.emit("maximize")):(e=null,a.show(a.launcher))}),t.state=i.prototype.STATE_RESOLVED,a.apps[t.context.pid].core.emit("intent",t,function(e,n){e?(t.state=i.prototype.STATE_ERROR_RECEIVED,t.callback&&t.callback(e,n)):(t.state=i.prototype.STATE_CONTEXT_RECEIVED,n.pid=t.context.pid,t.callback&&t.callback(!1,n))})):t.state=i.prototype.STATE_NOT_RESOLVED,p):(o[t.action]?o[t.action].forEach(function(n){if("undefined"!=typeof n.pid&&a.apps[n.pid]){if(t.mime&&n.actions[t.action]!==!0&&-1===n.actions[t.action].indexOf(t.mime))return;t.state=i.prototype.STATE_RESOLVED,a.apps[n.pid].core.emit("intent",t,function(o,r){return s[t.action]&&s[t.action].forEach(function(n){n(t,a.apps[e.pid])}),r=r||{},t.receiver=n.pid,t.creator=e.pid,r.pid=n.pid,t.silent?(c={pid:e.pid,action:t.action},void(t.callback&&t.callback(o,r))):(c&&c.pid===e.pid&&c.action!==t.action&&(c=null),void(o?(t.state=i.prototype.STATE_ERROR_RECEIVED,t.callback&&t.callback(o,r)):(t.state=i.prototype.STATE_CONTEXT_RECEIVED,"osd"===a.apps[n.pid].config.type?a.apps[n.pid].core.call("show"):(a.show(a.apps[n.pid],"app"!==a.apps[n.pid].config.type),t.once("close",function(){var t;if(e&&e.pid&&a.apps[e.pid])a.show(a.apps[e.pid],!0),c&&c.pid===e.pid||a.apps[e.pid].core.emit("maximize");else{for(e=null;a.stack.length;)t=a.stack.pop(),t.$iframe.style.visibility="hidden",t.core.emit("hide");a.show(a.launcher)}})),t.callback&&t.callback(!1,r))))})}else p.runConfig=n}):t.state=i.prototype.STATE_NOT_RESOLVED,p)},resolveActionsConfig:function(t){var e,n,i,s;if(t.actions)for(e=Object.keys(t.actions),i=e.length,n=0;i>n;)s=e[n],o[s]=o[s]||[],o[s].push(t),++n},replaceActionsConfig:function(t,e){var n,i,s,a,r;if(t.actions)for(n=Object.keys(t.actions),s=n.length,i=0;s>i;)a=n[i],r=o[a].indexOf(t),-1!==r&&(o[a][r]=e),++i},addHook:function(t,e){s[t]=s[t]||[],s[t].push(e)}};t.exports=p},function(t,e,n){"use strict";t.exports={serial:n(8),parallel:n(7)}},function(t,e){"use strict";t.exports=function(t,e){function n(n,r){var c=function(c,p){return c?(i=!0,void("function"==typeof e&&e(c))):(s[r]=p,n.name&&(a[n.name]=p),o++,void(o>=t.length&&"function"==typeof e&&e(null,s,a)))};i||(0===n.length?c(null,n()):n(c))}var i=!1,o=0,s=[],a={};t=Array.isArray(t)?t:[],0===t.length?"function"==typeof e&&e(null,s,a):t.forEach(n)}},function(t,e){"use strict";t.exports=function(t,e){function n(r){var c=function(c,p){return c?(i=!0,void("function"==typeof e&&e(c))):(s[o]=p,r.name&&(a[r.name]=p),o++,void(o>=t.length&&"function"==typeof e?e(null,s,a):n(t[o])))};i||(0===r.length?c(null,r()):r(c))}var i=!1,o=0,s=[],a={};t=Array.isArray(t)?t:[],0===t.length?"function"==typeof e&&e(null,s,a):n(t[0])}},function(t,e){"use strict";t.exports=function(t){var e={};return t.split("&").forEach(function(t){t=t.split("="),2===t.length&&(e[t[0]]=decodeURIComponent(t[1]))}),e}},function(t,e,n){"use strict";function i(t){var e,n=this;if(t=t||{},this.visible=!0,this.focusable=!0,this.$node=null,this.$body=null,this.parent=null,this.children=[],this.propagate=!!t.propagate,o.call(this,t.data),this.$node=t.$node||document.createElement("div"),this.$body=t.$body||this.$node,this.$node.className+=" component "+(t.className||""),this.id=t.id||this.$node.id||"cid"+a++,t.parent&&t.parent.add(this),t.visible===!1&&this.hide(),t.focusable===!1&&(this.focusable=!1),this.defaultEvents){t.events=t.events||{};for(e in this.defaultEvents)t.events[e]=t.events[e]||this.defaultEvents[e]}t.events&&this.addListeners(t.events),t.children&&this.add.apply(this,t.children),this.$node.addEventListener("click",function(t){0===t.button&&(n.focus(),n.events.click&&n.emit("click",{event:t})),t.stopPropagation()})}var o=n(3),s=n(11),a=0;i.prototype=Object.create(o.prototype),i.prototype.constructor=i,i.prototype.defaultEvents=null,i.prototype.add=function(t){var e;for(e=0;e<arguments.length;e++)t=arguments[e],this.children.push(t),t.parent=this,t.$node&&null===t.$node.parentNode&&this.$body.appendChild(t.$node),this.events.add&&this.emit("add",{item:t})},i.prototype.remove=function(){this.parent&&(s.current.activeComponent===this&&(this.blur(),this.parent.focus()),this.parent.children.splice(this.parent.children.indexOf(this),1)),this.children.forEach(function(t){t.remove()}),this.removeAllListeners(),this.$node.parentNode.removeChild(this.$node),this.events.remove&&this.emit("remove")},i.prototype.focus=function(t){var e=s.current,n=e.activeComponent;return this.focusable&&this!==n?(n&&n.blur(),e.activeComponent=n=this,n.$node.classList.add("focus"),n.events.focus&&n.emit("focus",t),!0):!1},i.prototype.blur=function(){var t=s.current,e=t.activeComponent;return this.$node.classList.remove("focus"),this===e?(t.activeComponent=null,this.events.blur&&this.emit("blur"),!0):!1},i.prototype.show=function(t){return this.visible?!0:(this.$node.classList.remove("hidden"),this.visible=!0,this.events.show&&this.emit("show",t),!0)},i.prototype.hide=function(){return this.visible?(this.$node.classList.add("hidden"),this.visible=!1,this.events.hide&&this.emit("hide"),!0):!0},t.exports=i},function(t,e,n){"use strict";var i=n(12),o=new i;o.current=null,o.history=[],o.pages=[],o.ids={},o.init=function(t){var e,n,i;if(t){for(this.pages=[],this.pages=t,e=0,n=t.length;n>e;e++)i=t[e],this.ids[i.id]=i,i.active&&(this.current=i);return this.events.init&&this.emit("init",{pages:t}),!0}return!1},o.parse=function(t){var e={name:"",data:[]};return e.data=t.split("/").map(decodeURIComponent),e.name=e.data.shift().slice(1),e},o.stringify=function(t,e){return e=Array.isArray(e)?e:[],t=encodeURIComponent(t),e=e.map(encodeURIComponent),e.unshift(t),e.join("/")},o.show=function(t,e){return t&&!t.active?(t.$node.classList.add("active"),t.active=!0,this.current=t,t.events.show&&t.emit("show",{page:t,data:e}),!0):!1},o.hide=function(t){return t&&t.active?(t.$node.classList.remove("active"),t.active=!1,this.current=null,t.events.hide&&t.emit("hide",{page:t}),!0):!1},o.navigate=function(t,e){var n=this.current,i=this.ids[t];return i&&!i.active?(location.hash=this.stringify(t,e),this.hide(this.current),this.show(i,e),this.events.navigate&&this.emit("navigate",{from:n,to:i}),this.history.push(i),!0):!1},o.back=function(){var t,e;return this.history.length>1&&(t=this.history.pop(),e=this.history[this.history.length-1],e&&!e.active)?(location.hash=e.id,this.hide(this.current),this.show(e),this.events.navigate&&this.emit("navigate",{from:t,to:e}),!0):!1},t.exports=o},function(t,e,n){"use strict";function i(){this.events={}}i.prototype={addListener:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},once:function(t,e){var n=this;this.events[t]=this.events[t]||[],this.events[t].push(function i(){e.apply(n,arguments),n.removeListener(t,i)})},addListeners:function(t){var e;for(e in t)t.hasOwnProperty(e)&&this.addListener(e,t[e])},removeListener:function(t,e){this.events[t]&&(this.events[t]=this.events[t].filter(function(t){return t!==e}),0===this.events[t].length&&(this.events[t]=void 0))},emit:function(t){var e,n=this.events[t];if(n)for(e=0;e<n.length;e++)n[e].apply(this,Array.prototype.slice.call(arguments,1))}},i.prototype.constructor=i,t.exports=i},function(t,e){"use strict";if(!document.documentElement.classList){var n=Array.prototype,i=n.indexOf,o=n.slice,s=n.push,a=n.splice,r=n.join;window.DOMTokenList=function(t){if(this._element=t,t.className!==this._classCache){if(this._classCache=t.className,!this._classCache)return;var e,n=this._classCache.replace(/^\s+|\s+$/g,"").split(/\s+/);for(e=0;e<n.length;e++)s.call(this,n[e])}},window.DOMTokenList.prototype={add:function(t){this.contains(t)||(s.call(this,t),this._element.className=o.call(this,0).join(" "))},contains:function(t){return-1!==i.call(this,t)},item:function(t){return this[t]||null},remove:function(t){var e=i.call(this,t);-1!==e&&(a.call(this,e,1),this._element.className=o.call(this,0).join(" "))},toString:function(){return r.call(this," ")},toggle:function(t){return this.contains(t)?this.remove(t):this.add(t),this.contains(t)}},Object.defineProperty(Element.prototype,"classList",{get:function(){return new window.DOMTokenList(this)}})}},function(t,e,n){"use strict";function i(t){t=t||{},t.focusable=t.focusable||!1,t.visible=t.visible||!1,t.className="widget "+(t.className||""),o.call(this,t)}var o=n(10),s=0;i.prototype=Object.create(o.prototype),i.prototype.constructor=i,t.exports=function(t){var e=new i({focusable:t.focusable,visible:t.visible,events:t.events});return e.className=e.$node.className="widgetClass"+s,t.visible||(e.$node.className="widgetClass"+s+" hidden"),++s,e.$node.style.zIndex=1e3,document.body.appendChild(e.$node),e}},function(t,e,n){"use strict";function i(){return u}function o(){var t,e,n=[],i=0;for(e=l.data.apps.length;e>i;)if(t=l.data.apps[i],p.resolveActionsConfig(t),"sap-loader"!==t.name){switch(t.type){case"launcher":!function(t){n.push(function(e){setTimeout(function(){c.launcher=c.runApp({config:l.data.apps[t],visible:!1,onload:function(){e(!1,c.launcher)}})},0)})}(i);break;case"system":case"osd":!function(t){setTimeout(function(){c.runApp({config:l.data.apps[t],visible:!1})},0)}(i);break;case"app":u.push(JSON.parse(JSON.stringify(t)))}++i}else++i;n.push(c.init()),s.parallel(n,function(){gSTB.EnableAppButton(!1),gSTB.EnableServiceButton(!1),window.loading.innerHTML="",window.loading.style.display="none",window.splash.className="padded",window.splash.style.display="none",c.show(c.launcher)})}var s=n(6),a=n(9),r=n(1),c=n(4),p=n(5),l=n(2),d=n(14),h=a(document.location.search.substring(1)),u=[];gSTB.InitPlayer(),gSTB.EnableAppButton(!0),gSTB.EnableVKButton(!0),gSTB.EnableServiceButton(!0),gSTB.ShowVirtualKeyboard(!0),gSTB.SetNativeStringMode&&gSTB.SetNativeStringMode(!0),window.getCoreInstance=window.getCoreInstanse=function(t){var e=r.getInstance(t);return e.widget=d,e.system=!0,e.getAppList=i,e.taskManager=c,e},l.load(h,function(t){var e=!1;t?window.mainMessage.innerHTML="Error loading config: url - "+(h.config||"config.json"):(e=l.data.apps.filter(function(t){return"sap-loader"===t.name}),e=e[0],e?c.runApp({config:e,visible:!0,onload:function(t){t.core.once("show",function(){window.loading.innerHTML="",window.loading.style.display="none",window.splash.className="padded",window.splash.style.display="none"}),t.core.once("ready",function(){o()})}}):o())})},function(t,e,n){"use strict";function i(t,e){var n=new XMLHttpRequest;n.open("GET",t.modulePath+(t.packageJson.main?"/"+t.packageJson.main:"/index.js")),n.onload=function(){var n,i={exports:{},id:""};if(this.responseText){n=new Function("module","exports","require",this.responseText);try{n(i,i.exports,function(e){return r.map[t.dependencies[e]]}),e(!1,{instance:i.exports,name:t.packageJson.config.name,version:t.packageJson.version})}catch(o){e(o,null)}}else e(!0,null)},n.onerror=function(){e(!0,null)},n.send(null)}var o=n(6).parallel,s=n(19),a=n(2),r={map:{},load:function(t,e){var n,r,c,p,l=this,d=t.dependencies,h=0,u=[];if(d){for(h=0,n=Object.keys(d),r=n.length;r>h;)c=d[n[h]],p=n[h],-1!==p.indexOf("plugin")?(!function(t,e){l.map[t]?u.push(function(e){e(!1,l.map[t])}):u.push(function(n){var o=a.data.options.pluginsPath+t+"/"+e;s(o,function(e,s){e?n(!0,null):i({modulePath:o,packageJson:s},function(e,i){l.map[t]=i,n(e,i)})})})}(p,c),++h):++h;o(u,function(t,n){t?"function"==typeof e&&e(!0,[]):e(!1,n)})}else"function"==typeof e&&e(!1)}};t.exports=r},function(t,e,n){"use strict";var i=(n(2),{url:"",top:0,left:0,visible:"hidden"});t.exports=function(t){var e=t.$container.appendChild(document.createElement("iframe"));return"function"==typeof t.onload&&(e.onload=t.onload),e.style.width=t.width||screen.width+"px",e.style.height=t.height||screen.height+"px",e.style.top=t.top||i.top,e.style.left=t.left||i.left,t.visible?e.style.visibility="visible":e.style.visibility=i.visible,e.src=t.url||i.url,e}},function(t,e,n){"use strict";function i(t,e){var n;if(this.action=t.action,this.mime=t.mime,this.data=t.data,this.context=t.context,this.silent=t.silent,this.callback=e,o.call(this,t),t.events)for(n in t.events)t.events[n]&&this.addListener(n,t.events[n])}var o=n(3);i.prototype=Object.create(o.prototype),i.prototype.constructor=i,i.prototype.STATE_CREATED=0,i.prototype.STATE_RESOLVED=1,i.prototype.STATE_NOT_RESOLVED=2,i.prototype.STATE_CONTEXT_RECEIVED=3,i.prototype.STATE_ERROR_RECEIVED=4,i.prototype.STATE_CLOSED=5,i.prototype.context=null,i.prototype.action=null,i.prototype.mime=null,i.prototype.data=null,i.prototype.callback=null,i.prototype.silent=!1,i.prototype.state=i.prototype.STATE_CREATED,i.prototype.close=function(){this.state=i.prototype.STATE_CLOSED,this.emit("close")},t.exports=i},function(t,e){"use strict";t.exports=function(t,e){var n=new XMLHttpRequest;n.open("GET",t+"/package.json",!0),n.onload=function(){var t=this.responseText,n=!1;try{t=JSON.parse(this.responseText)}catch(n){n=!0}e(n,t)},n.onerror=function(){e(!0,null)},n.send(null)}},function(t,e){"use strict";var n={dvbManager:window.dvbManager,epgManager:window.epgManager,gSTB:window.gSTB,pvrManager:window.pvrManager,stbDownloadManager:window.stbDownloadManager,stbStorage:window.stbStorage,stbUpdate:window.stbUpdate,stbUPnP:window.stbUPnP,stbWebWindow:window.stbWebWindow,stbWindowMgr:window.stbWindowMgr,timeShift:window.timeShift,stbPlayerManager:window.stbPlayerManager};t.exports=n},function(t,e,n){"use strict";var i=n(3);window.stbEvent=new i,window.stbEvent.onEvent=function(t,e){if(this.events.media){if(e)try{e=JSON.parse(e)}catch(n){e={}}this.emit("media",{code:parseInt(t,10),info:e})}},window.stbEvent.onBroadcastMessage=function(t,e,n){this.events.message&&this.emit("message",{broadcast:!0,windowId:t,message:e,data:n})},window.stbEvent.onMessage=function(t,e,n){this.events.message&&this.emit("message",{broadcast:!1,windowId:t,message:e,data:n})},window.stbEvent.onMount=function(t){this.events["device:mount"]&&this.emit("device:mount",{state:t})},window.stbEvent.onMediaAvailable=function(t,e){this.events["media:available"]&&this.emit("media:available",{mime:t,url:e})},window.stbEvent.onNetworkStateChange=function(t){this.events["internet:state"]&&this.emit("internet:state",{state:t})},window.stbEvent.onWebBrowserProgress=function(t){this.events["browser:progress"]&&this.emit("browser:progress",{progress:t})},window.stbEvent.onWindowActivated=function(){this.events["window:focus"]&&this.emit("window:focus")}},function(t,e,n){"use strict";var i=null,o=27,s=null;t.exports=function(t,e){var a,r,c,p,l,d;if(null===i&&(i=n(1)),null===s&&(s=n(4)),t==="keydown:"+o){for(p=Object.keys(s.apps),a=p.length-1,s.topApp=null,s.splashActive&&(s.splashActive=!1,window.splash.style.display="none",window.splash.style.backgroundImage="none",window.splash.style.backgroundColor="transparent",window.splashVersion.innerText="");a>-1;)s.apps[p[a]]&&(l=s.apps[p[a]].config.type,d=s.apps[p[a]].$iframe.style.visibility,s.apps[p[a]].core&&("osd"===l?s.apps[p[a]].core.emit("hide"):"hidden"!==d&&(s.apps[p[a]].$iframe.style.visibility="hidden",s.apps[p[a]].core.emit("hide")))),--a;return s.launcher.$iframe.contentWindow.focus(),s.launcher.$iframe.style.visibility="visible",void s.launcher.core.emit("focus")}for(a=0,r=i.coreList.length;r>a;)i.coreList[a].system&&(c=i.coreList[a],c.events[t]&&c.emit(t,e)),++a}}]);
/*! mag-core: v1.0.6 (webpack: v1.12.14) */
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";window.host=!!window.gSTB,n(13),n(21),window.addEventListener("unload",function(){window.stbPlayerManager?stbPlayerManager.list.forEach(function(t){t.stop(),t.setViewport({x:0,y:0,width:screen.width,height:screen.height})}):gSTB.Stop()}),n(15)},function(t,e,n){"use strict";function i(t){o.call(this,t)}var o=n(3),s=n(2),a=n(5),r={coreList:[],windowList:[],windowToCoreMap:{},core:{},getInstance:function(t){var e,n=this.windowList.indexOf(t);return-1===n?(e=new i,e.plugins={},e.theme.path=s.data.themes[Object.keys(s.data.themes)[0]],Object.defineProperty(e,"index",{value:r.coreList.push(e)-1,configurable:!1,enumerable:!1,writable:!1}),this.windowToCoreMap[this.windowList.push(t)-1]=e.index):e=this.coreList[this.windowToCoreMap[n]],e},destroy:function(t){var e=this.windowList.indexOf(t);return-1!==e?(this.coreList.splice(this.windowToCoreMap[e],1),this.windowToCoreMap[this.windowToCoreMap[e]]=void 0,this.windowList.splice(e,1),!0):!1}},c=null,p=gSTB.GetEnv(JSON.stringify({varList:["language","upnp_conf"]}));try{p=JSON.parse(p),p=p.result}catch(l){p={}}i.prototype=Object.create(o.prototype),i.prototype.constructor=i,i.prototype.theme={path:null},i.prototype.state=null,i.prototype.environment={onFocusDebounceTimeout:300,onInputDebounceTimeout:300,language:p.language||"en",upnp_conf:p.upnp_conf},i.prototype.onInputDebounceTimeout=300,i.prototype.intent=function(t,e){var i,o,r,p=this,l=a.create(t,e);if(t&&t.action)if(i=a.route(l,this),null!==i.runConfig){if(null===c&&(c=n(4)),i.runConfig.pid)for(o=0,r=s.data.apps.length;r>o;){if(s.data.apps[o].url===i.runConfig.url){i.runConfig=s.data.apps[o]=JSON.parse(JSON.stringify(s.data.apps[o]));break}++o}c.runApp({config:i.runConfig,visible:!0,onready:function(){a.route(l,p)}})}else i.handlerList.length>1;return l},window.extendCorePrototype=function(t,e){i.prototype[t]=e},window.addIntentHook=function(t,e){a.addHook(t,e)},t.exports=r},function(t,e,n){"use strict";function i(t,e){var n,o;for(n in e)e.hasOwnProperty(n)&&("Array"===e[n].constructor.name?(o=[],t[n]=e[n].concat(t[n]),t[n].forEach(function(t){var e=!0;o.forEach(function(n){n.name===t.name&&(e=!1)}),e&&o.push(t)}),t[n]=o):"object"==typeof e[n]?i(t[n],e[n]):t[n]=e[n])}t.exports={systemSettings:{},settings:{},environment:{},data:{},load:function(t,e){var n,o=this,s=new XMLHttpRequest;n=t.config||"http://dev.sandbox.lpo.priv//stalker_portal//server/api/launcher_profile.php?uid=2193&language=en",s.onload=function(){var n=!1;try{o.data=JSON.parse(s.responseText)}catch(a){n=!0}t.extend?(s.onload=function(){var t=!1,n={};try{n=JSON.parse(s.responseText)}catch(a){t=!0}i(o.data,n),e(t,o.data)},s.open("GET",t.extend,!0),s.send(null)):e(n,o.data)},s.open("GET",n,!0),s.send(null)}}},function(t,e,n){"use strict";function i(){this.events={}}i.prototype={addListener:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},once:function(t,e){var n=this;this.events[t]=this.events[t]||[],this.events[t].push(function i(){e.apply(n,arguments),n.removeListener(t,i)})},addListeners:function(t){var e;for(e in t)t.hasOwnProperty(e)&&this.addListener(e,t[e])},removeListener:function(t,e){this.events[t]&&(this.events[t]=this.events[t].filter(function(t){return t!==e}),0===this.events[t].length&&(this.events[t]=void 0))},emit:function(t){var e,n=this.events[t];if(n)for(e=0;e<n.length;e++)n[e].apply(this,Array.prototype.slice.call(arguments,1))}},i.prototype.constructor=i,t.exports=i},function(t,e,n){"use strict";var i=null,o=n(20),s=n(17),a=n(16),r=n(22),c=n(2),p=null,l=null,d={topApp:null,stack:[],runHistory:[],apps:{},launcher:null,splashActive:!1,show:function(t,e){var n,o=t.config.type;if(this.topApp!==t)switch(o){case"app":this.launcher.$iframe.style.visibility="hidden",i.style.zIndex=window.frames.length;case"system":"system"===o&&(i.style.zIndex=0,t.$iframe.style.zIndex=window.frames.length),n=this.stack.indexOf(t),-1!==n&&this.stack.splice(n,1),this.stack.push(t),this.topApp&&this.topApp!==t&&("function"==typeof this.topApp.core.emit&&this.topApp.core.emit(e?"hide:auto":"hide"),this.topApp.$iframe.style.visibility="hidden"),this.topApp=t,t.$iframe.contentWindow.focus(),t.$iframe.style.visibility="visible",t.core&&"function"==typeof t.core.emit&&t.core.emit("show");break;default:t.$iframe.contentWindow.focus(),t.$iframe.style.visibility="visible"}},hide:function(t,e){var n=t.config.type;switch(t.$iframe.style.visibility="hidden",t.core&&"function"==typeof t.core.emit&&t.core.emit(e?"hide:auto":"hide"),n){case"app":case"system":this.topApp===t&&(this.topApp=null),this.stack.pop(),this.stack.length>0?this.show(this.stack.pop()):this.show(this.launcher)}},close:function(t,e){var o,s,a=c.data.apps.length,r=0;if(null===p&&(p=n(1),l=n(5)),"undefined"==typeof t)e||this.show(this.launcher);else if("app"===t.config.type){for(t===this.topApp?(this.topApp=null,this.stack.pop()):(o=this.stack.indexOf(t),this.stack.splice(o,1)),t.core&&"function"==typeof t.core.emit&&t.core.emit("exit");a>r;){if(c.data.apps[r].url===t.config.url){c.data.apps[r]=JSON.parse(JSON.stringify(c.data.apps[r])),c.data.apps[r].pid=void 0,l.replaceActionsConfig(t.config,c.data.apps[r]);break}++r}for(p.destroy(t.window),i.contentDocument.body.removeChild(t.$iframe),s=Object.keys(this.apps),a=s.length,r=0;a>r;){if(this.apps[s[r]]===t){delete d.apps[s[r]];break}++r}if(t.config.pid=void 0,t=null,!e){for(;this.stack.length;)t=this.stack.pop(),t.$iframe.style.visibility="hidden",t.core.emit("hide");this.topApp=null,this.show(this.launcher)}}},runApp:function(t){function e(){var e;l&&u&&u.window&&(e=n(1).getInstance(u.window),u.core=e,u.window.pid||(u.window.pid=h),e.ready||(p.forEach(function(n){e.plugins[n.name]=n.instance(t.config)}),"app"===t.config.type?e.call=function(e){"exit"===e?d.close(u):"app:ready"===e&&t.visible&&d.splashActive&&(d.splashActive=!1,window.splash.style.display="none",window.splash.style.backgroundImage="none",window.splash.style.backgroundColor="transparent",window.splashVersion.innerText="",d.show(u),t.onready&&t.onready())}:"osd"===t.config.type?(e.system=!0,e.config=c.data,e.call=function(t){var e,n;switch(t){case"hide":u.$iframe.style.visibility="hidden";break;case"show":for(u.$iframe.style.zIndex=window.frames.length+1,u.$iframe.style.visibility="visible",e=Object.keys(d.apps),n=e.length-1;n>-1;)d.apps[e[n]]&&"osd"===d.apps[e[n]].config.type&&u!==d.apps[e[n]]&&d.apps[e[n]].core.emit("hide"),--n;break;case"focus":d.topApp?d.topApp.core.emit("blur"):d.launcher&&d.launcher.core.emit("blur"),u.$iframe.contentWindow.focus();break;case"blur":d.topApp?(d.topApp.$iframe.contentWindow.focus(),d.topApp.core.emit("focus")):d.launcher&&(d.launcher.$iframe.contentWindow.focus(),d.launcher.core.emit("focus"))}}):(e.system=!0,e.config=c.data,e.call=function(t){switch(t){case"hide":d.hide(u);break;case"show":d.show(u)}}),e.pid=h,e.ready=!0,e.emit("load")),t.onload&&t.onload(u))}var o={},p=[],l=!1,h=-1,u=null,f=c.data.apps.length,w=0,v=!0;if(t.config.legacy)return void(window.location.href=t.config.url+"?referrer="+encodeURIComponent(window.location.href));if("app"===t.config.type){for(;f>w;){if(c.data.apps[w].url===t.config.url){t.config=c.data.apps[w],"undefined"!=typeof c.data.apps[w].pid&&(d.apps[t.config.pid]?v=!1:t.config.pid=void 0);break}++w}if(!v)return d.runHistory=d.runHistory.filter(function(e){return e.url!==t.config.url}),d.runHistory.push(t.config),d.show(d.apps[t.config.pid]),d.apps[t.config.pid].core.emit("maximize"),t.onload&&t.onload(d.apps[t.config.pid]),void(t.onready&&t.onready(d.apps[t.config.pid]));this.splashActive=!0,this.launcher.$iframe.style.visibility="hidden",window.splash.firstChild.innerText=c.data.apps[w].name,window.splash.style.display="",window.splash.style.backgroundImage="url("+c.data.apps[w].url+c.data.apps[w].icons.paths[screen.height]+c.data.apps[w].icons.states.active+")",window.splash.style.backgroundColor=c.data.apps[w].backgroundColor,window.splashVersion.innerText=c.data.apps[w].version,this.topApp&&(this.topApp.$iframe.style.visibility="hidden")}else t.config.metrics&&t.config.metrics[screen.height]&&(o.width=t.config.metrics[screen.height].width,o.height=t.config.metrics[screen.height].height,o.top=t.config.metrics[screen.height].top,o.left=t.config.metrics[screen.height].left);return a.load(t.config,function(t,n){t?(p={length:-1,forEach:function(){}},l=!0,e()):(n&&(p=n),l=!0,e())}),u={$iframe:s({url:t.config.url,visibile:!1,$container:"app"===t.config.type?i.contentDocument.body:window.document.body,width:o.width,height:o.height,top:o.top,left:o.left,onload:function(){this.contentWindow.addEventListener("keydown",function(t){0!==t.keyCode&&r("keydown:"+t.keyCode,t)}),u.window=this.contentWindow,e()}}),window:null,core:null,config:t.config},"app"===t.config.type&&(d.runHistory=d.runHistory.filter(function(e){return e.url!==t.config.url}),d.runHistory.push(t.config)),"launcher"!==t.config.type&&(h=Object.keys(d.apps).length,this.apps[h]=u),t.config.pid=h,u},init:function(){return function(t){i=s({$container:document.body,visible:!0,onload:function(){var e=this.contentDocument.head.appendChild(this.contentDocument.createElement("style"));e.textContent="html, body{ overflow: hidden; margin: 0; padding:0; width: "+screen.width+"px; height: "+screen.height+"px; } iframe { position: absolute; top: 0; left: 0; border: none; outline: none; overflow: hidden;margin: 0; padding: 0; width: "+screen.width+"px; height: "+screen.height+"px; }",this.contentWindow.parent=null,this.contentWindow.opener=null,this.contentWindow.getCoreInstanse=function(t){return n(1).getInstance(t)},this.contentWindow.getCoreInstance=function(t){return n(1).getInstance(t)},this.contentWindow.host=!0,this.contentWindow.localStorage=window.localStorage||window.stbStorage,this.contentWindow.stbEvent=window.stbEvent,this.contentWindow.dvbManager=o.dvbManager,this.contentWindow.epgManager=o.epgManager,this.contentWindow.gSTB=o.gSTB,this.contentWindow.pvrManager=o.pvrManager,this.contentWindow.stbDownloadManager=o.stbDownloadManager,this.contentWindow.stbStorage=o.stbStorage,this.contentWindow.stbUpdate=o.stbUpdate,this.contentWindow.stbUPnP=o.stbUPnP,this.contentWindow.stbWebWindow=o.stbWebWindow,this.contentWindow.stbWindowMgr=o.stbWindowMgr,this.contentWindow.timeShift=o.timeShift,this.contentWindow.stbPlayerManager=o.stbPlayerManager,t(!1,{config:{},instance:null,$iframe:i})}})}}};t.exports=d},function(t,e,n){"use strict";var i=n(18),o={},s={},a=null,r=null,c=null,p={create:function(t,e){return new i(t,e)},route:function(t,e){var p={runConfig:null,handlerList:[]};return null===r&&(r=n(1)),null===a&&(a=n(4)),t.context?("undefined"!=typeof t.context.pid?(t.once("close",function(){e&&e.pid&&a.apps[e.pid]?(a.show(a.apps[e.pid]),a.apps[e.pid].core.emit("maximize")):(e=null,a.show(a.launcher))}),t.state=i.prototype.STATE_RESOLVED,a.apps[t.context.pid].core.emit("intent",t,function(e,n){e?(t.state=i.prototype.STATE_ERROR_RECEIVED,t.callback&&t.callback(e,n)):(t.state=i.prototype.STATE_CONTEXT_RECEIVED,n.pid=t.context.pid,t.callback&&t.callback(!1,n))})):t.state=i.prototype.STATE_NOT_RESOLVED,p):(o[t.action]?o[t.action].forEach(function(n){if("undefined"!=typeof n.pid&&a.apps[n.pid]){if(t.mime&&n.actions[t.action]!==!0&&-1===n.actions[t.action].indexOf(t.mime))return;t.state=i.prototype.STATE_RESOLVED,a.apps[n.pid].core.emit("intent",t,function(o,r){return s[t.action]&&s[t.action].forEach(function(n){n(t,a.apps[e.pid])}),r=r||{},t.receiver=n.pid,t.creator=e.pid,r.pid=n.pid,t.silent?(c={pid:e.pid,action:t.action},void(t.callback&&t.callback(o,r))):(c&&c.pid===e.pid&&c.action!==t.action&&(c=null),void(o?(t.state=i.prototype.STATE_ERROR_RECEIVED,t.callback&&t.callback(o,r)):(t.state=i.prototype.STATE_CONTEXT_RECEIVED,"osd"===a.apps[n.pid].config.type?a.apps[n.pid].core.call("show"):(a.show(a.apps[n.pid],"app"!==a.apps[n.pid].config.type),t.once("close",function(){var t;if(e&&e.pid&&a.apps[e.pid])a.show(a.apps[e.pid],!0),c&&c.pid===e.pid||a.apps[e.pid].core.emit("maximize");else{for(e=null;a.stack.length;)t=a.stack.pop(),t.$iframe.style.visibility="hidden",t.core.emit("hide");a.show(a.launcher)}})),t.callback&&t.callback(!1,r))))})}else p.runConfig=n}):t.state=i.prototype.STATE_NOT_RESOLVED,p)},resolveActionsConfig:function(t){var e,n,i,s;if(t.actions)for(e=Object.keys(t.actions),i=e.length,n=0;i>n;)s=e[n],o[s]=o[s]||[],o[s].push(t),++n},replaceActionsConfig:function(t,e){var n,i,s,a,r;if(t.actions)for(n=Object.keys(t.actions),s=n.length,i=0;s>i;)a=n[i],r=o[a].indexOf(t),-1!==r&&(o[a][r]=e),++i},addHook:function(t,e){s[t]=s[t]||[],s[t].push(e)}};t.exports=p},function(t,e,n){"use strict";t.exports={serial:n(8),parallel:n(7)}},function(t,e){"use strict";t.exports=function(t,e){function n(n,r){var c=function(c,p){return c?(i=!0,void("function"==typeof e&&e(c))):(s[r]=p,n.name&&(a[n.name]=p),o++,void(o>=t.length&&"function"==typeof e&&e(null,s,a)))};i||(0===n.length?c(null,n()):n(c))}var i=!1,o=0,s=[],a={};t=Array.isArray(t)?t:[],0===t.length?"function"==typeof e&&e(null,s,a):t.forEach(n)}},function(t,e){"use strict";t.exports=function(t,e){function n(r){var c=function(c,p){return c?(i=!0,void("function"==typeof e&&e(c))):(s[o]=p,r.name&&(a[r.name]=p),o++,void(o>=t.length&&"function"==typeof e?e(null,s,a):n(t[o])))};i||(0===r.length?c(null,r()):r(c))}var i=!1,o=0,s=[],a={};t=Array.isArray(t)?t:[],0===t.length?"function"==typeof e&&e(null,s,a):n(t[0])}},function(t,e){"use strict";t.exports=function(t){var e={};return t.split("&").forEach(function(t){t=t.split("="),2===t.length&&(e[t[0]]=decodeURIComponent(t[1]))}),e}},function(t,e,n){"use strict";function i(t){var e,n=this;if(t=t||{},this.visible=!0,this.focusable=!0,this.$node=null,this.$body=null,this.parent=null,this.children=[],this.propagate=!!t.propagate,o.call(this,t.data),this.$node=t.$node||document.createElement("div"),this.$body=t.$body||this.$node,this.$node.className+=" component "+(t.className||""),this.id=t.id||this.$node.id||"cid"+a++,t.parent&&t.parent.add(this),t.visible===!1&&this.hide(),t.focusable===!1&&(this.focusable=!1),this.defaultEvents){t.events=t.events||{};for(e in this.defaultEvents)t.events[e]=t.events[e]||this.defaultEvents[e]}t.events&&this.addListeners(t.events),t.children&&this.add.apply(this,t.children),this.$node.addEventListener("click",function(t){0===t.button&&(n.focus(),n.events.click&&n.emit("click",{event:t})),t.stopPropagation()})}var o=n(3),s=n(11),a=0;i.prototype=Object.create(o.prototype),i.prototype.constructor=i,i.prototype.defaultEvents=null,i.prototype.add=function(t){var e;for(e=0;e<arguments.length;e++)t=arguments[e],this.children.push(t),t.parent=this,t.$node&&null===t.$node.parentNode&&this.$body.appendChild(t.$node),this.events.add&&this.emit("add",{item:t})},i.prototype.remove=function(){this.parent&&(s.current.activeComponent===this&&(this.blur(),this.parent.focus()),this.parent.children.splice(this.parent.children.indexOf(this),1)),this.children.forEach(function(t){t.remove()}),this.removeAllListeners(),this.$node.parentNode.removeChild(this.$node),this.events.remove&&this.emit("remove")},i.prototype.focus=function(t){var e=s.current,n=e.activeComponent;return this.focusable&&this!==n?(n&&n.blur(),e.activeComponent=n=this,n.$node.classList.add("focus"),n.events.focus&&n.emit("focus",t),!0):!1},i.prototype.blur=function(){var t=s.current,e=t.activeComponent;return this.$node.classList.remove("focus"),this===e?(t.activeComponent=null,this.events.blur&&this.emit("blur"),!0):!1},i.prototype.show=function(t){return this.visible?!0:(this.$node.classList.remove("hidden"),this.visible=!0,this.events.show&&this.emit("show",t),!0)},i.prototype.hide=function(){return this.visible?(this.$node.classList.add("hidden"),this.visible=!1,this.events.hide&&this.emit("hide"),!0):!0},t.exports=i},function(t,e,n){"use strict";var i=n(12),o=new i;o.current=null,o.history=[],o.pages=[],o.ids={},o.init=function(t){var e,n,i;if(t){for(this.pages=[],this.pages=t,e=0,n=t.length;n>e;e++)i=t[e],this.ids[i.id]=i,i.active&&(this.current=i);return this.events.init&&this.emit("init",{pages:t}),!0}return!1},o.parse=function(t){var e={name:"",data:[]};return e.data=t.split("/").map(decodeURIComponent),e.name=e.data.shift().slice(1),e},o.stringify=function(t,e){return e=Array.isArray(e)?e:[],t=encodeURIComponent(t),e=e.map(encodeURIComponent),e.unshift(t),e.join("/")},o.show=function(t,e){return t&&!t.active?(t.$node.classList.add("active"),t.active=!0,this.current=t,t.events.show&&t.emit("show",{page:t,data:e}),!0):!1},o.hide=function(t){return t&&t.active?(t.$node.classList.remove("active"),t.active=!1,this.current=null,t.events.hide&&t.emit("hide",{page:t}),!0):!1},o.navigate=function(t,e){var n=this.current,i=this.ids[t];return i&&!i.active?(location.hash=this.stringify(t,e),this.hide(this.current),this.show(i,e),this.events.navigate&&this.emit("navigate",{from:n,to:i}),this.history.push(i),!0):!1},o.back=function(){var t,e;return this.history.length>1&&(t=this.history.pop(),e=this.history[this.history.length-1],e&&!e.active)?(location.hash=e.id,this.hide(this.current),this.show(e),this.events.navigate&&this.emit("navigate",{from:t,to:e}),!0):!1},t.exports=o},function(t,e,n){"use strict";function i(){this.events={}}i.prototype={addListener:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},once:function(t,e){var n=this;this.events[t]=this.events[t]||[],this.events[t].push(function i(){e.apply(n,arguments),n.removeListener(t,i)})},addListeners:function(t){var e;for(e in t)t.hasOwnProperty(e)&&this.addListener(e,t[e])},removeListener:function(t,e){this.events[t]&&(this.events[t]=this.events[t].filter(function(t){return t!==e}),0===this.events[t].length&&(this.events[t]=void 0))},emit:function(t){var e,n=this.events[t];if(n)for(e=0;e<n.length;e++)n[e].apply(this,Array.prototype.slice.call(arguments,1))}},i.prototype.constructor=i,t.exports=i},function(t,e){"use strict";if(!document.documentElement.classList){var n=Array.prototype,i=n.indexOf,o=n.slice,s=n.push,a=n.splice,r=n.join;window.DOMTokenList=function(t){if(this._element=t,t.className!==this._classCache){if(this._classCache=t.className,!this._classCache)return;var e,n=this._classCache.replace(/^\s+|\s+$/g,"").split(/\s+/);for(e=0;e<n.length;e++)s.call(this,n[e])}},window.DOMTokenList.prototype={add:function(t){this.contains(t)||(s.call(this,t),this._element.className=o.call(this,0).join(" "))},contains:function(t){return-1!==i.call(this,t)},item:function(t){return this[t]||null},remove:function(t){var e=i.call(this,t);-1!==e&&(a.call(this,e,1),this._element.className=o.call(this,0).join(" "))},toString:function(){return r.call(this," ")},toggle:function(t){return this.contains(t)?this.remove(t):this.add(t),this.contains(t)}},Object.defineProperty(Element.prototype,"classList",{get:function(){return new window.DOMTokenList(this)}})}},function(t,e,n){"use strict";function i(t){t=t||{},t.focusable=t.focusable||!1,t.visible=t.visible||!1,t.className="widget "+(t.className||""),o.call(this,t)}var o=n(10),s=0;i.prototype=Object.create(o.prototype),i.prototype.constructor=i,t.exports=function(t){var e=new i({focusable:t.focusable,visible:t.visible,events:t.events});return e.className=e.$node.className="widgetClass"+s,t.visible||(e.$node.className="widgetClass"+s+" hidden"),++s,e.$node.style.zIndex=1e3,document.body.appendChild(e.$node),e}},function(t,e,n){"use strict";function i(){return u}function o(){var t,e,n=[],i=0;for(e=l.data.apps.length;e>i;)if(t=l.data.apps[i],p.resolveActionsConfig(t),"sap-loader"!==t.name){switch(t.type){case"launcher":!function(t){n.push(function(e){setTimeout(function(){l.data.apps[t].url="http://192.168.1.103:8010/develop.html",c.launcher=c.runApp({config:l.data.apps[t],visible:!1,onload:function(){e(!1,c.launcher)}})},0)})}(i);break;case"system":case"osd":!function(t){setTimeout(function(){c.runApp({config:l.data.apps[t],visible:!1})},0)}(i);break;case"app":u.push(JSON.parse(JSON.stringify(t)))}++i}else++i;n.push(c.init()),s.parallel(n,function(){gSTB.EnableAppButton(!1),gSTB.EnableServiceButton(!1),window.loading.innerHTML="",window.loading.style.display="none",window.splash.className="padded",window.splash.style.display="none",c.show(c.launcher)})}var s=n(6),a=n(9),r=n(1),c=n(4),p=n(5),l=n(2),d=n(14),h=a(document.location.search.substring(1)),u=[];gSTB.InitPlayer(),gSTB.EnableAppButton(!0),gSTB.EnableVKButton(!0),gSTB.EnableServiceButton(!0),gSTB.ShowVirtualKeyboard(!0),gSTB.SetNativeStringMode&&gSTB.SetNativeStringMode(!0),window.getCoreInstance=window.getCoreInstanse=function(t){var e=r.getInstance(t);return e.widget=d,e.system=!0,e.getAppList=i,e.taskManager=c,e},l.load(h,function(t){var e=!1;t?window.mainMessage.innerHTML="Error loading config: url - "+(h.config||"config.json"):(e=l.data.apps.filter(function(t){return"sap-loader"===t.name}),e=e[0],e?c.runApp({config:e,visible:!0,onload:function(t){t.core.once("show",function(){window.loading.innerHTML="",window.loading.style.display="none",window.splash.className="padded",window.splash.style.display="none"}),t.core.once("ready",function(){o()})}}):o())})},function(t,e,n){"use strict";function i(t,e){var n=new XMLHttpRequest;n.open("GET",t.modulePath+(t.packageJson.main?"/"+t.packageJson.main:"/index.js")),n.onload=function(){var n,i={exports:{},id:""};if(this.responseText){n=new Function("module","exports","require",this.responseText);try{n(i,i.exports,function(e){return r.map[t.dependencies[e]]}),e(!1,{instance:i.exports,name:t.packageJson.config.name,version:t.packageJson.version})}catch(o){e(o,null)}}else e(!0,null)},n.onerror=function(){e(!0,null)},n.send(null)}var o=n(6).parallel,s=n(19),a=n(2),r={map:{},load:function(t,e){var n,r,c,p,l=this,d=t.dependencies,h=0,u=[];if(d){for(h=0,n=Object.keys(d),r=n.length;r>h;)c=d[n[h]],p=n[h],-1!==p.indexOf("plugin")?(!function(t,e){l.map[t]?u.push(function(e){e(!1,l.map[t])}):u.push(function(n){var o=a.data.options.pluginsPath+t+"/"+e;s(o,function(e,s){e?n(!0,null):i({modulePath:o,packageJson:s},function(e,i){l.map[t]=i,n(e,i)})})})}(p,c),++h):++h;o(u,function(t,n){t?"function"==typeof e&&e(!0,[]):e(!1,n)})}else"function"==typeof e&&e(!1)}};t.exports=r},function(t,e,n){"use strict";var i=(n(2),{url:"",top:0,left:0,visible:"hidden"});t.exports=function(t){var e=t.$container.appendChild(document.createElement("iframe"));return"function"==typeof t.onload&&(e.onload=t.onload),e.style.width=t.width||screen.width+"px",e.style.height=t.height||screen.height+"px",e.style.top=t.top||i.top,e.style.left=t.left||i.left,t.visible?e.style.visibility="visible":e.style.visibility=i.visible,e.src=t.url||i.url,e}},function(t,e,n){"use strict";function i(t,e){var n;if(this.action=t.action,this.mime=t.mime,this.data=t.data,this.context=t.context,this.silent=t.silent,this.callback=e,o.call(this,t),t.events)for(n in t.events)t.events[n]&&this.addListener(n,t.events[n])}var o=n(3);i.prototype=Object.create(o.prototype),i.prototype.constructor=i,i.prototype.STATE_CREATED=0,i.prototype.STATE_RESOLVED=1,i.prototype.STATE_NOT_RESOLVED=2,i.prototype.STATE_CONTEXT_RECEIVED=3,i.prototype.STATE_ERROR_RECEIVED=4,i.prototype.STATE_CLOSED=5,i.prototype.context=null,i.prototype.action=null,i.prototype.mime=null,i.prototype.data=null,i.prototype.callback=null,i.prototype.silent=!1,i.prototype.state=i.prototype.STATE_CREATED,i.prototype.close=function(){this.state=i.prototype.STATE_CLOSED,this.emit("close")},t.exports=i},function(t,e){"use strict";t.exports=function(t,e){var n=new XMLHttpRequest;n.open("GET",t+"/package.json",!0),n.onload=function(){var t=this.responseText,n=!1;try{t=JSON.parse(this.responseText)}catch(n){n=!0}e(n,t)},n.onerror=function(){e(!0,null)},n.send(null)}},function(t,e){"use strict";var n={dvbManager:window.dvbManager,epgManager:window.epgManager,gSTB:window.gSTB,pvrManager:window.pvrManager,stbDownloadManager:window.stbDownloadManager,stbStorage:window.stbStorage,stbUpdate:window.stbUpdate,stbUPnP:window.stbUPnP,stbWebWindow:window.stbWebWindow,stbWindowMgr:window.stbWindowMgr,timeShift:window.timeShift,stbPlayerManager:window.stbPlayerManager};t.exports=n},function(t,e,n){"use strict";var i=n(3);window.stbEvent=new i,window.stbEvent.onEvent=function(t,e){if(this.events.media){if(e)try{e=JSON.parse(e)}catch(n){e={}}this.emit("media",{code:parseInt(t,10),info:e})}},window.stbEvent.onBroadcastMessage=function(t,e,n){this.events.message&&this.emit("message",{broadcast:!0,windowId:t,message:e,data:n})},window.stbEvent.onMessage=function(t,e,n){this.events.message&&this.emit("message",{broadcast:!1,windowId:t,message:e,data:n})},window.stbEvent.onMount=function(t){this.events["device:mount"]&&this.emit("device:mount",{state:t})},window.stbEvent.onMediaAvailable=function(t,e){this.events["media:available"]&&this.emit("media:available",{mime:t,url:e})},window.stbEvent.onNetworkStateChange=function(t){this.events["internet:state"]&&this.emit("internet:state",{state:t})},window.stbEvent.onWebBrowserProgress=function(t){this.events["browser:progress"]&&this.emit("browser:progress",{progress:t})},window.stbEvent.onWindowActivated=function(){this.events["window:focus"]&&this.emit("window:focus")}},function(t,e,n){"use strict";var i=null,o=27,s=null;t.exports=function(t,e){var a,r,c,p,l,d;if(null===i&&(i=n(1)),null===s&&(s=n(4)),t==="keydown:"+o){for(p=Object.keys(s.apps),a=p.length-1,s.topApp=null,s.splashActive&&(s.splashActive=!1,window.splash.style.display="none",window.splash.style.backgroundImage="none",window.splash.style.backgroundColor="transparent",window.splashVersion.innerText="");a>-1;)s.apps[p[a]]&&(l=s.apps[p[a]].config.type,d=s.apps[p[a]].$iframe.style.visibility,s.apps[p[a]].core&&("osd"===l?s.apps[p[a]].core.emit("hide"):"hidden"!==d&&(s.apps[p[a]].$iframe.style.visibility="hidden",s.apps[p[a]].core.emit("hide")))),--a;return s.launcher.$iframe.contentWindow.focus(),s.launcher.$iframe.style.visibility="visible",void s.launcher.core.emit("focus")}for(a=0,r=i.coreList.length;r>a;)i.coreList[a].system&&(c=i.coreList[a],c.events[t]&&c.emit(t,e)),++a}}]);
{
"name": "mag-core",
"version": "1.0.5",
"version": "1.0.6",
"description": "Bootstrap application for magsdk projects.",

@@ -5,0 +5,0 @@ "author": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc