PageSourceSearch

https://www.jamendo.com/Client/scripts/main-build.994137531.js

js jamendo.com collected 2026-09-24 07:28:55 UTC 2,063,956 bytes, 65 lines download raw bytes

1var requirejs,require,define;!function(global,setTimeout){function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e){var r;for(r=0;r<e.length&&(!e[r]||!t(e[r],r,e));r+=1);}}function eachReverse(e,t){if(e){var r;for(r=e.length-1;r>-1&&(!e[r]||!t(e[r],r,e));r-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var r;for(r in e)if(hasProp(e,r)&&t(e[r],r))break}function mixin(e,t,r,n){t&&eachProp(t,function(t,i){if(r||!hasProp(e,i))if(!n||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp)e[i]=t;else{e[i]||(e[i]={});mixin(e[i],t,r,n)}});return e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;each(e.split("."),function(e){t=t[e]});return t}function makeError(e,t,r,n){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);i.requireType=e;i.requireModules=n;r&&(i.originalError=r);return i}function newContext(e){function t(e){var t,r;for(t=0;t<e.length;t++){r=e[t];if("."===r){e.splice(t,1);t-=1}else if(".."===r){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;if(t>0){e.splice(t-1,2);t-=2}}}}function r(e,r,n){var i,o,a,s,l,u,c,d,p,f,h,m,y=r&&r.split("/"),g=M.map,v=g&&g["*"];if(e){e=e.split("/");c=e.length-1;M.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,""));if("."===e[0].charAt(0)&&y){m=y.slice(0,y.length-1);e=m.concat(e)}t(e);e=e.join("/")}if(n&&g&&(y||v)){a=e.split("/");e:for(s=a.length;s>0;s-=1){u=a.slice(0,s).join("/");if(y)for(l=y.length;l>0;l-=1){o=getOwn(g,y.slice(0,l).join("/"));if(o){o=getOwn(o,u);if(o){d=o;p=s;break e}}}if(!f&&v&&getOwn(v,u)){f=getOwn(v,u);h=s}}if(!d&&f){d=f;p=h}if(d){a.splice(0,p,d);e=a.join("/")}}i=getOwn(M.pkgs,e);return i||e}function n(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===b.contextName){t.parentNode.removeChild(t);return!0}})}function i(e){var t=getOwn(M.paths,e);if(t&&isArray(t)&&t.length>1){t.shift();b.require.undef(e);b.makeRequire(null,{skipMap:!0})([e]);return!0}}function o(e){var t,r=e?e.indexOf("!"):-1;if(r>-1){t=e.substring(0,r);e=e.substring(r+1,e.length)}return[t,e]}function a(e,t,n,i){var a,s,l,u,c=null,d=t?t.name:null,p=e,f=!0,h="";if(!e){f=!1;e="_@r"+(j+=1)}u=o(e);c=u[0];e=u[1];if(c){c=r(c,d,i);s=getOwn(E,c)}if(e)if(c)h=n?e:s&&s.normalize?s.normalize(e,function(e){return r(e,d,i)}):-1===e.indexOf("!")?r(e,d,i):e;else{h=r(e,d,i);u=o(h);c=u[0];h=u[1];n=!0;a=b.nameToUrl(h)}l=!c||s||n?"":"_unnormalized"+(D+=1);return{prefix:c,name:h,parentMap:t,unnormalized:!!l,url:a,originalName:p,isDefine:f,id:(c?c+"!"+h:h)+l}}function s(e){var t=e.id,r=getOwn(S,t);r||(r=S[t]=new b.Module(e));return r}function l(e,t,r){var n=e.id,i=getOwn(S,n);if(!hasProp(E,n)||i&&!i.defineEmitComplete){i=s(e);i.error&&"error"===t?r(i.error):i.on(t,r)}else"defined"===t&&r(E[n])}function u(e,t){var r=e.requireModules,n=!1;if(t)t(e);else{each(r,function(t){var r=getOwn(S,t);if(r){r.error=e;if(r.events.error){n=!0;r.emit("error",e)}}});n||req.onError(e)}}function c(){if(globalDefQueue.length){each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(b.defQueueMap[t]=!0);A.push(e)});globalDefQueue=[]}}function d(e){delete S[e];delete k[e]}function p(e,t,r){var n=e.map.id;if(e.error)e.emit("error",e.error);else{t[n]=!0;each(e.depMaps,function(n,i){var o=n.id,a=getOwn(S,o);if(a&&!e.depMatched[i]&&!r[o])if(getOwn(t,o)){e.defineDep(i,E[o]);e.check()}else p(a,t,r)});r[n]=!0}}function f(){var e,t,r=1e3*M.waitSeconds,o=r&&b.startTime+r<(new Date).getTime(),a=[],s=[],l=!1,c=!0;if(!v){v=!0;eachProp(k,function(e){var r=e.map,u=r.id;if(e.enabled){r.isDefine||s.push(e);if(!e.error)if(!e.inited&&o)if(i(u)){t=!0;l=!0}else{a.push(u);n(u)}else if(!e.inited&&e.fetched&&r.isDefine){l=!0;if(!r.prefix)return c=!1}}});if(o&&a.length){e=makeError("timeout","Load timeout for modules: "+a,null,a);e.contextName=b.contextName;return u(e)}c&&each(s,function(e){p(e,{},{})});o&&!t||!l||!isBrowser&&!isWebWorker||x||(x=setTimeout(function(){x=0;f()},50));v=!1}}function h(e){hasProp(E,e[0])||s(a(e[0],null,!0)).init(e[1],e[2])}function m(e,t,r,n){e.detachEvent&&!isOpera?n&&e.detachEvent(n,t):e.removeEventListener(r,t,!1)}function y(e){var t=e.currentTarget||e.srcElement;m(t,b.onScriptLoad,"load","onreadystatechange");m(t,b.onScriptError,"error");return{node:t,id:t&&t.getAttribute("data-requiremodule")}}function g(){var e;c();for(;A.length;){e=A.shift();if(null===e[0])return u(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));h(e)}b.defQueueMap={}}var v,_,b,w,x,M={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},S={},k={},T={},A=[],E={},P={},O={},j=1,D=1;w={require:function(e){return e.require?e.require:e.require=b.makeRequire(e.map)},exports:function(e){e.usingExports=!0;if(e.map.isDefine)return e.exports?E[e.map.id]=e.exports:e.exports=E[e.map.id]={}}
1,module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(M.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}};_=function(e){this.events=getOwn(T,e.id)||{};this.map=e;this.shim=getOwn(M.shim,e.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};_.prototype={init:function(e,t,r,n){n=n||{};if(!this.inited){this.factory=t;r?this.on("error",r):this.events.error&&(r=bind(this,function(e){this.emit("error",e)}));this.depMaps=e&&e.slice(0);this.errback=r;this.inited=!0;this.ignore=n.ignore;n.enabled||this.enabled?this.enable():this.check()}},defineDep:function(e,t){if(!this.depMatched[e]){this.depMatched[e]=!0;this.depCount-=1;this.depExports[e]=t}},fetch:function(){if(!this.fetched){this.fetched=!0;b.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();b.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;if(!P[e]){P[e]=!0;b.load(this.map.id,e)}},check:function(){if(this.enabled&&!this.enabling){var e,t,r=this.map.id,n=this.depExports,i=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{i=b.execCb(r,o,n,i)}catch(t){e=t}else i=b.execCb(r,o,n,i);if(this.map.isDefine&&void 0===i){t=this.module;t?i=t.exports:this.usingExports&&(i=this.exports)}if(e){e.requireMap=this.map;e.requireModules=this.map.isDefine?[this.map.id]:null;e.requireType=this.map.isDefine?"define":"require";return u(this.error=e)}}else i=o;this.exports=i;if(this.map.isDefine&&!this.ignore){E[r]=i;if(req.onResourceLoad){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)});req.onResourceLoad(b,this.map,a)}}d(r);this.defined=!0}this.defining=!1;if(this.defined&&!this.defineEmitted){this.defineEmitted=!0;this.emit("defined",this.exports);this.defineEmitComplete=!0}}}else hasProp(b.defQueueMap,r)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,n=a(e.prefix);this.depMaps.push(n);l(n,"defined",bind(this,function(n){var i,o,c,p=getOwn(O,this.map.id),f=this.map.name,h=this.map.parentMap?this.map.parentMap.name:null,m=b.makeRequire(e.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){n.normalize&&(f=n.normalize(f,function(e){return r(e,h,!0)})||"");o=a(e.prefix+"!"+f,this.map.parentMap,!0);l(o,"defined",bind(this,function(e){this.map.normalizedMap=o;this.init([],function(){return e},null,{enabled:!0,ignore:!0})}));c=getOwn(S,o.id);if(c){this.depMaps.push(o);this.events.error&&c.on("error",bind(this,function(e){this.emit("error",e)}));c.enable()}}else if(p){this.map.url=b.nameToUrl(p);this.load()}else{i=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})});i.error=bind(this,function(e){this.inited=!0;this.error=e;e.requireModules=[t];eachProp(S,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&d(e.map.id)});u(e)});i.fromText=bind(this,function(r,n){var o=e.name,l=a(o),c=useInteractive;n&&(r=n);c&&(useInteractive=!1);s(l);hasProp(M.config,t)&&(M.config[o]=M.config[t]);try{req.exec(r)}catch(e){return u(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0);this.depMaps.push(l);b.completeLoad(o);m([o],i)});n.load(e.name,m,i,M)}}));b.enable(n,this);this.pluginMaps[n.id]=n},enable:function(){k[this.map.id]=this;this.enabled=!0;this.enabling=!0;each(this.depMaps,bind(this,function(e,t){var r,n,i;if("string"==typeof e){e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[t]=e;i=getOwn(w,e.id);if(i){this.depExports[t]=i(this);return}this.depCount+=1;l(e,"defined",bind(this,function(e){if(!this.undefed){this.defineDep(t,e);this.check()}}));this.errback?l(e,"error",bind(this,this.errback)):this.events.error&&l(e,"error",bind(this,function(e){this.emit("error",e)}))}r=e.id;n=S[r];hasProp(w,r)||!n||n.enabled||b.enable(e,this)}));eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(S,e.id);t&&!t.enabled&&b.enable(e,this)}));this.enabling=!1;this.check()},on:function(e,t){var r=this.events[e];r||(r=this.events[e]=[]);r.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)});"error"===e&&delete this.events[e]}};b={config:M,contextName:e,registry:S,defined:E,urlFetched:P,defQueue:A,defQueueMap:{},Module:_,makeModuleMap:a,nextTick:req.nextTick,onError:u,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");if("string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,r){return(-1===r.indexOf("?")?"?":"&")+t}}var r=M.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){if(n[t]){M[t]||(M[t]={});mixin(M[t],e,!0,!0)}else M[t]=e});e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(O[e]=t)})});if(e.shim){eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e});!e.exports&&!e.init||e.exportsFn||(e.exportsFn=b.makeShimExports(e));r[t]=e});M.shim=r}e.packages&&each(e.packages,function(e){var t,r;e="string"==typeof e?{name:e}:e;r=e.name;t=e.location;t&&(M.paths[r]=e.location);M.pkgs[r]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")});eachProp(S,function(e,t){e.inited||e.map.unnormalized||(e.map=a(t,null,!0))});(e.deps||e.callback)&&b.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;
1e.init&&(t=e.init.apply(global,arguments));return t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,i){function o(r,n,l){var c,d,p;i.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0);if("string"==typeof r){if(isFunction(n))return u(makeError("requireargs","Invalid require call"),l);if(t&&hasProp(w,r))return w[r](S[t.id]);if(req.get)return req.get(b,r,t,o);d=a(r,t,!1,!0);c=d.id;return hasProp(E,c)?E[c]:u(makeError("notloaded",'Module name "'+c+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))}g();b.nextTick(function(){g();p=s(a(null,t));p.skipMap=i.skipMap;p.init(r,n,l,{enabled:!0});f()});return o}i=i||{};mixin(o,{isBrowser:isBrowser,toUrl:function(e){var n,i=e.lastIndexOf("."),o=e.split("/")[0],a="."===o||".."===o;if(-1!==i&&(!a||i>1)){n=e.substring(i,e.length);e=e.substring(0,i)}return b.nameToUrl(r(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(E,a(e,t,!1,!0).id)},specified:function(e){e=a(e,t,!1,!0).id;return hasProp(E,e)||hasProp(S,e)}});t||(o.undef=function(e){c();var r=a(e,t,!0),i=getOwn(S,e);i.undefed=!0;n(e);delete E[e];delete P[r.url];delete T[e];eachReverse(A,function(t,r){t[0]===e&&A.splice(r,1)});delete b.defQueueMap[e];if(i){i.events.defined&&(T[e]=i.events);d(e)}});return o},enable:function(e){getOwn(S,e.id)&&s(e).enable()},completeLoad:function(e){var t,r,n,o=getOwn(M.shim,e)||{},a=o.exports;c();for(;A.length;){r=A.shift();if(null===r[0]){r[0]=e;if(t)break;t=!0}else r[0]===e&&(t=!0);h(r)}b.defQueueMap={};n=getOwn(S,e);if(!t&&!hasProp(E,e)&&n&&!n.inited){if(!(!M.enforceDefine||a&&getGlobal(a)))return i(e)?void 0:u(makeError("nodefine","No define call for "+e,null,[e]));h([e,o.deps||[],o.exportsFn])}f()},nameToUrl:function(e,t,r){var n,i,o,a,s,l,u,c=getOwn(M.pkgs,e);c&&(e=c);u=getOwn(O,e);if(u)return b.nameToUrl(u,t,r);if(req.jsExtRegExp.test(e))s=e+(t||"");else{n=M.paths;i=e.split("/");for(o=i.length;o>0;o-=1){a=i.slice(0,o).join("/");l=getOwn(n,a);if(l){isArray(l)&&(l=l[0]);i.splice(0,o,l);break}}s=i.join("/");s+=t||(/^data\:|^blob\:|\?/.test(s)||r?"":".js");s=("/"===s.charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":M.baseUrl)+s}return M.urlArgs&&!/^blob\:/.test(s)?s+M.urlArgs(e,s):s},load:function(e,t){req.load(b,e,t)},execCb:function(e,t,r,n){return t.apply(n,r)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=y(e);b.completeLoad(t.id)}},onScriptError:function(e){var t=y(e);if(!i(t.id)){var r=[];eachProp(S,function(e,n){0!==n.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id){r.push(n);return!0}})});return u(makeError("scripterror",'Script error for "'+t.id+(r.length?'", needed by: '+r.join(", "):'"'),e,[t.id]))}}};b.require=b.makeRequire();return b}function getInteractiveScript(){if(interactiveScript&&"interactive"===interactiveScript.readyState)return interactiveScript;eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e});return interactiveScript}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.5",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs;requirejs=void 0}if(void 0!==require&&!isFunction(require)){cfg=require;require=void 0}req=requirejs=function(e,t,r,n){var i,o,a=defContextName;if(!isArray(e)&&"string"!=typeof e){o=e;if(isArray(t)){e=t;t=r;r=n}else e=[]}o&&o.context&&(a=o.context);i=getOwn(contexts,a);i||(i=contexts[a]=req.s.newContext(a));o&&i.configure(o);return i.require(e,t,r)};req.config=function(e){return req(e)};req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()};require||(require=req);req.version=version;req.jsExtRegExp=/^\/|:|\?|\.js$/;req.isBrowser=isBrowser;s=req.s={contexts:contexts,newContext:newContext};req({});each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}});if(isBrowser){head=s.head=document.getElementsByTagName("head")[0];baseElement=document.getElementsByTagName("base")[0];baseElement&&(head=s.head=baseElement.parentNode)}req.onError=defaultOnError;req.createNode=function(e,t,r){var n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");n.type=e.scriptType||"text/javascript";n.charset="utf-8";n.async=!0;return n};req.load=function(e,t,r){var n,i=e&&e.config||{};if(isBrowser){n=req.createNode(i,t,r);n.setAttribute("data-requirecontext",e.contextName);n.setAttribute("data-requiremodule",t);if(!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera){n.addEventListener("load",e.onScriptLoad,!1);n.addEventListener("error",e.onScriptError,!1)}else{useInteractive=!0;n.attachEvent("onreadystatechange",e.onScriptLoad)}n.src=r;i.onNodeCreated&&i.onNodeCreated(n,i,t,r);currentlyAddingScript=n;baseElement?head.insertBefore(n,baseElement):head.appendChild(n);currentlyAddingScript=null;return n}if(isWebWorker)try{setTimeout(function(){},0);importScripts(r);e.completeLoad(t)}catch(n){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+r,n,[t]))}};isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){head||(head=e.parentNode);dataMain=e.getAttribute("data-main");if(dataMain){mainScript=dataMain;if(!cfg.baseUrl&&-1===mainScript.indexOf("!")){src=mainScript.split("/");mainScript=src.pop();subPath=src.length?src.join("/")+"/":"./";cfg.baseUrl=subPath}mainScript=mainScript.replace(jsSuffixRegExp,"");req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain);cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript];return!0}});define=function(e,t,r){var n,i;if("string"!=typeof e){r=t;t=e;e=null}if(!isArray(t)){r=t;t=null}if(!t&&isFunction(r)){t=[];if(r.length){r.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,r){t.push(r)});t=(1===r.length?["require"]:["require","exports","module"]).concat(t)}}if(useInteractive){n=currentlyAddingScript||getInteractiveScript();if(n){e||(e=n.getAttribute("data-requiremodule"));i=contexts[n.getAttribute("data-requirecontext")]}}if(i){i.defQueue.push([e,t,r]);i.defQueueMap[e]=!0}else globalDefQueue.push([e,t,r])};define.amd={jQuery:!0};req.exec=function(text){return eval(text)};req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout);define("requirejs",function(){});!function(e,t,r){"use strict";!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};e[n].call(i.exports,i,i.exports,t);i.l=!0;return i.exports}var r={};t.m=e;t.c=r;t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})};
1t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};t.d(r,"a",r);return r};t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.p="";t(t.s=128)}([function(e,t,n){var i=n(2),o=n(18),a=n(13),s=n(14),l=n(19),u=function(e,t,n){var c,d,p,f,h=e&u.F,m=e&u.G,y=e&u.S,g=e&u.P,v=e&u.B,_=m?i:y?i[t]||(i[t]={}):(i[t]||{}).prototype,b=m?o:o[t]||(o[t]={}),w=b.prototype||(b.prototype={});m&&(n=t);for(c in n){d=!h&&_&&_[c]!==r;p=(d?_:n)[c];f=v&&d?l(p,i):g&&"function"==typeof p?l(Function.call,p):p;_&&s(_,c,p,e&u.U);b[c]!=p&&a(b,c,f);g&&w[c]!=p&&(w[c]=p)}};i.core=o;u.F=1;u.G=2;u.S=4;u.P=8;u.B=16;u.W=32;u.U=64;u.R=128;e.exports=u},function(e,t,r){var n=r(4);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,r){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof t&&(t=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(50)("wks"),i=r(35),o=r(2).Symbol,a="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=n},function(e,t,r){var n=r(1),i=r(94),o=r(22),a=Object.defineProperty;t.f=r(7)?Object.defineProperty:function(e,t,r){n(e);t=o(t,!0);n(r);if(i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");"value"in r&&(e[t]=r.value);return e}},function(e,t,r){e.exports=!r(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){var n=r(24),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){var n=r(23);e.exports=function(e){return Object(n(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){var n=r(47),i=r(23);e.exports=function(e){return n(i(e))}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(6),i=r(31);e.exports=r(7)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){e[t]=r;return e}},function(e,t,r){var n=r(2),i=r(13),o=r(12),a=r(35)("src"),s=Function.toString,l=(""+s).split("toString");r(18).inspectSource=function(e){return s.call(e)};(e.exports=function(e,t,r,s){var u="function"==typeof r;u&&(o(r,"name")||i(r,"name",t));if(e[t]!==r){u&&(o(r,a)||i(r,a,e[t]?""+e[t]:l.join(String(t))));if(e===n)e[t]=r;else if(s)e[t]?e[t]=r:i(e,t,r);else{delete e[t];i(e,t,r)}}})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,r){var n=r(48),i=r(31),o=r(11),a=r(22),s=r(12),l=r(94),u=Object.getOwnPropertyDescriptor;t.f=r(7)?u:function(e,t){e=o(e);t=a(t,!0);if(l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!n.f.call(e,t),e[t])}},function(e,t,r){var n=r(12),i=r(9),o=r(68)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){e=i(e);return n(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){var n=r(0),i=r(3),o=r(23),a=/"/g,s=function(e,t,r,n){var i=String(o(e)),s="<"+t;""!==r&&(s+=" "+r+'="'+String(n).replace(a,"&quot;")+'"');return s+">"+i+"</"+t+">"};e.exports=function(e,t){var r={};r[e]=t(s);n(n.P+n.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",r)}},function(t,r){var n=t.exports={version:"2.5.1"};"number"==typeof e&&(e=n)},function(e,t,n){var i=n(10);e.exports=function(e,t,n){i(e);if(t===r)return e;switch(n){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(3);e.exports=function(e,t){return!!e&&n(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,r){var n=r(4);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(e==r)throw TypeError("Can't call method on  "+e);return e}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(0),i=r(18),o=r(3);e.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r);n(n.S+n.F*o(function(){r(1)}),"Object",a)}},function(e,t,n){var i=n(19),o=n(47),a=n(9),s=n(8),l=n(84);e.exports=function(e,t){var n=1==e,u=2==e,c=3==e,d=4==e,p=6==e,f=5==e||p,h=t||l;return function(t,l,m){for(var y,g,v=a(t),_=o(v),b=i(l,m,3),w=s(_.length),x=0,M=n?h(t,w):u?h(t,0):r;w>x;x++)if(f||x in _){y=_[x];g=b(y,x,v);if(e)if(n)M[x]=g;else if(g)switch(e){case 3:return!0;case 5:return y;case 6:return x;case 2:M.push(y)}else if(d)return!1}return p?-1:c||d?d:M}}},function(e,t,r){var n=r(96),i=r(69);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,n){var i=n(1),o=n(97),a=n(69),s=n(68)("IE_PROTO"),l=function(){},u=function(){var e,t=n(66)("iframe"),r=a.length;t.style.display="none";n(70).appendChild(t);t.src="javascript:";e=t.contentWindow.document;e.open();e.write("<script>document.F=Object<\/script>");e.close();u=e.F;for(;r--;)delete u.prototype[a[r]];return u()};e.exports=Object.create||function(e,t){var n;if(null!==e){l.prototype=i(e);n=new l;l.prototype=null;n[s]=e}else n=u();return t===r?n:o(n,t)}},function(e,t,n){if(n(7)){var i=n(36),o=n(2),a=n(3),s=n(0),l=n(62),u=n(92),c=n(19),d=n(42),p=n(31),f=n(13),h=n(43),m=n(24),y=n(8),g=n(117),v=n(37),_=n(22),b=n(12),w=n(39),x=n(4),M=n(9),S=n(82),k=n(28),T=n(16),A=n(38).f,E=n(49),P=n(35),O=n(5),j=n(26),D=n(51),C=n(60),L=n(86),I=n(40),R=n(57),Y=n(41),N=n(85),F=n(108),W=n(6),U=n(15),q=W.f,H=U.f,V=o.RangeError,B=o.TypeError,z=o.Uint8Array,K=Array.prototype,$=u.ArrayBuffer,G=u.DataView,J=j(0),Q=j(2),X=j(3),Z=j(4),ee=j(5),te=j(6),re=D(!0),ne=D(!1),ie=L.values,oe=L.keys,ae=L.entries,se=K.lastIndexOf,le=K.reduce,ue=K.reduceRight,ce=K.join,de=K.sort,pe=K.slice,fe=K.toString,he=K.toLocaleStr
1ing,me=O("iterator"),ye=O("toStringTag"),ge=P("typed_constructor"),ve=P("def_constructor"),_e=l.CONSTR,be=l.TYPED,we=l.VIEW,xe=j(1,function(e,t){return Ae(C(e,e[ve]),t)}),Me=a(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),Se=!!z&&!!z.prototype.set&&a(function(){new z(1).set({})}),ke=function(e,t){var r=m(e);if(r<0||r%t)throw V("Wrong offset!");return r},Te=function(e){if(x(e)&&be in e)return e;throw B(e+" is not a typed array!")},Ae=function(e,t){if(!(x(e)&&ge in e))throw B("It is not a typed array constructor!");return new e(t)},Ee=function(e,t){return Pe(C(e,e[ve]),t)},Pe=function(e,t){for(var r=0,n=t.length,i=Ae(e,n);n>r;)i[r]=t[r++];return i},Oe=function(e,t,r){q(e,t,{get:function(){return this._d[r]}})},je=function(e){var t,n,i,o,a,s,l=M(e),u=arguments.length,d=u>1?arguments[1]:r,p=d!==r,f=E(l);if(f!=r&&!S(f)){for(s=f.call(l),i=[],t=0;!(a=s.next()).done;t++)i.push(a.value);l=i}p&&u>2&&(d=c(d,arguments[2],2));for(t=0,n=y(l.length),o=Ae(this,n);n>t;t++)o[t]=p?d(l[t],t):l[t];return o},De=function(){for(var e=0,t=arguments.length,r=Ae(this,t);t>e;)r[e]=arguments[e++];return r},Ce=!!z&&a(function(){he.call(new z(1))}),Le=function(){return he.apply(Ce?pe.call(Te(this)):Te(this),arguments)},Ie={copyWithin:function(e,t){return F.call(Te(this),e,t,arguments.length>2?arguments[2]:r)},every:function(e){return Z(Te(this),e,arguments.length>1?arguments[1]:r)},fill:function(e){return N.apply(Te(this),arguments)},filter:function(e){return Ee(this,Q(Te(this),e,arguments.length>1?arguments[1]:r))},find:function(e){return ee(Te(this),e,arguments.length>1?arguments[1]:r)},findIndex:function(e){return te(Te(this),e,arguments.length>1?arguments[1]:r)},forEach:function(e){J(Te(this),e,arguments.length>1?arguments[1]:r)},indexOf:function(e){return ne(Te(this),e,arguments.length>1?arguments[1]:r)},includes:function(e){return re(Te(this),e,arguments.length>1?arguments[1]:r)},join:function(e){return ce.apply(Te(this),arguments)},lastIndexOf:function(e){return se.apply(Te(this),arguments)},map:function(e){return xe(Te(this),e,arguments.length>1?arguments[1]:r)},reduce:function(e){return le.apply(Te(this),arguments)},reduceRight:function(e){return ue.apply(Te(this),arguments)},reverse:function(){for(var e,t=this,r=Te(t).length,n=Math.floor(r/2),i=0;i<n;){e=t[i];t[i++]=t[--r];t[r]=e}return t},some:function(e){return X(Te(this),e,arguments.length>1?arguments[1]:r)},sort:function(e){return de.call(Te(this),e)},subarray:function(e,t){var n=Te(this),i=n.length,o=v(e,i);return new(C(n,n[ve]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,y((t===r?i:v(t,i))-o))}},Re=function(e,t){return Ee(this,pe.call(Te(this),e,t))},Ye=function(e){Te(this);var t=ke(arguments[1],1),r=this.length,n=M(e),i=y(n.length),o=0;if(i+t>r)throw V("Wrong length!");for(;o<i;)this[t+o]=n[o++]},Ne={entries:function(){return ae.call(Te(this))},keys:function(){return oe.call(Te(this))},values:function(){return ie.call(Te(this))}},Fe=function(e,t){return x(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},We=function(e,t){return Fe(e,t=_(t,!0))?p(2,e[t]):H(e,t)},Ue=function(e,t,r){if(Fe(e,t=_(t,!0))&&x(r)&&b(r,"value")&&!b(r,"get")&&!b(r,"set")&&!r.configurable&&(!b(r,"writable")||r.writable)&&(!b(r,"enumerable")||r.enumerable)){e[t]=r.value;return e}return q(e,t,r)};if(!_e){U.f=We;W.f=Ue}s(s.S+s.F*!_e,"Object",{getOwnPropertyDescriptor:We,defineProperty:Ue});a(function(){fe.call({})})&&(fe=he=function(){return ce.call(this)});var qe=h({},Ie);h(qe,Ne);f(qe,me,Ne.values);h(qe,{slice:Re,set:Ye,constructor:function(){},toString:fe,toLocaleString:Le});Oe(qe,"buffer","b");Oe(qe,"byteOffset","o");Oe(qe,"byteLength","l");Oe(qe,"length","e");q(qe,ye,{get:function(){return this[be]}});e.exports=function(e,t,n,u){u=!!u;var c=e+(u?"Clamped":"")+"Array",p="get"+e,h="set"+e,m=o[c],v=m||{},_=m&&T(m),b=!m||!l.ABV,M={},S=m&&m.prototype,E=function(e,r){var n=e._d;return n.v[p](r*t+n.o,Me)},P=function(e,r,n){var i=e._d;u&&(n=(n=Math.round(n))<0?0:n>255?255:255&n);i.v[h](r*t+i.o,n,Me)},O=function(e,t){q(e,t,{get:function(){return E(this,t)},set:function(e){return P(this,t,e)},enumerable:!0})};if(b){m=n(function(e,n,i,o){d(e,m,c,"_d");var a,s,l,u,p=0,h=0;if(x(n)){if(!(n instanceof $||"ArrayBuffer"==(u=w(n))||"SharedArrayBuffer"==u))return be in n?Pe(m,n):je.call(m,n);a=n;h=ke(i,t);var v=n.byteLength;if(o===r){if(v%t)throw V("Wrong length!");s=v-h;if(s<0)throw V("Wrong length!")}else{s=y(o)*t;if(s+h>v)throw V("Wrong length!")}l=s/t}else{l=g(n);s=l*t;a=new $(s)}
1f(e,"_d",{b:a,o:h,l:s,e:l,v:new G(a)});for(;p<l;)O(e,p++)});S=m.prototype=k(qe);f(S,"constructor",m)}else if(!a(function(){m(1)})||!a(function(){new m(-1)})||!R(function(e){new m;new m(null);new m(1.5);new m(e)},!0)){m=n(function(e,n,i,o){d(e,m,c);var a;return x(n)?n instanceof $||"ArrayBuffer"==(a=w(n))||"SharedArrayBuffer"==a?o!==r?new v(n,ke(i,t),o):i!==r?new v(n,ke(i,t)):new v(n):be in n?Pe(m,n):je.call(m,n):new v(g(n))});J(_!==Function.prototype?A(v).concat(A(_)):A(v),function(e){e in m||f(m,e,v[e])});m.prototype=S;i||(S.constructor=m)}var j=S[me],D=!!j&&("values"==j.name||j.name==r),C=Ne.values;f(m,ge,!0);f(S,be,c);f(S,we,!0);f(S,ve,m);(u?new m(1)[ye]==c:ye in S)||q(S,ye,{get:function(){return c}});M[c]=m;s(s.G+s.W+s.F*(m!=v),M);s(s.S,c,{BYTES_PER_ELEMENT:t});s(s.S+s.F*a(function(){v.of.call(m,1)}),c,{from:je,of:De});"BYTES_PER_ELEMENT"in S||f(S,"BYTES_PER_ELEMENT",t);s(s.P,c,Ie);Y(c);s(s.P+s.F*Se,c,{set:Ye});s(s.P+s.F*!D,c,Ne);i||S.toString==fe||(S.toString=fe);s(s.P+s.F*a(function(){new m(1).slice()}),c,{slice:Re});s(s.P+s.F*(a(function(){return[1,2].toLocaleString()!=new m([1,2]).toLocaleString()})||!a(function(){S.toLocaleString.call([1,2])})),c,{toLocaleString:Le});I[c]=D?j:C;i||D||f(S,me,C)}}else e.exports=function(){}},function(e,t,n){var i=n(112),o=n(0),a=n(50)("metadata"),s=a.store||(a.store=new(n(115))),l=function(e,t,n){var o=s.get(e);if(!o){if(!n)return r;s.set(e,o=new i)}var a=o.get(t);if(!a){if(!n)return r;o.set(t,a=new i)}return a},u=function(e,t,n){var i=l(t,n,!1);return i!==r&&i.has(e)},c=function(e,t,n){var i=l(t,n,!1);return i===r?r:i.get(e)},d=function(e,t,r,n){l(r,n,!0).set(e,t)},p=function(e,t){var r=l(e,t,!1),n=[];r&&r.forEach(function(e,t){n.push(t)});return n},f=function(e){return e===r||"symbol"==typeof e?e:String(e)},h=function(e){o(o.S,"Reflect",e)};e.exports={store:s,map:l,has:u,get:c,set:d,keys:p,key:f,exp:h}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(35)("meta"),i=r(4),o=r(12),a=r(6).f,s=0,l=Object.isExtensible||function(){return!0},u=!r(3)(function(){return l(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++s,w:{}}})},d=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,n)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[n].i},p=function(e,t){if(!o(e,n)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[n].w},f=function(e){u&&h.NEED&&l(e)&&!o(e,n)&&c(e);return e},h=e.exports={KEY:n,NEED:!1,fastKey:d,getWeak:p,onFreeze:f}},function(e,t,n){var i=n(5)("unscopables"),o=Array.prototype;o[i]==r&&n(13)(o,i,{});e.exports=function(e){o[i][e]=!0}},function(e,t,r){var n=r(19),i=r(106),o=r(82),a=r(1),s=r(8),l=r(49),u={},c={},t=e.exports=function(e,t,r,d,p){var f,h,m,y,g=p?function(){return e}:l(e),v=n(r,d,t?2:1),_=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(o(g))for(f=s(e.length);f>_;_++){y=t?v(a(h=e[_])[0],h[1]):v(e[_])
2;if(y===u||y===c)return y}else for(m=g.call(e);!(h=m.next()).done;){y=i(m,v,h.value,t);if(y===u||y===c)return y}};t.BREAK=u;t.RETURN=c},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(e===r?"":e,")_",(++n+i).toString(36))}},function(e,t){e.exports=!1},function(e,t,r){var n=r(24),i=Math.max,o=Math.min;e.exports=function(e,t){e=n(e);return e<0?i(e+t,0):o(e,t)}},function(e,t,r){var n=r(96),i=r(69).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,n){var i=n(20),o=n(5)("toStringTag"),a="Arguments"==i(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,l;return e===r?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),o))?n:a?i(t):"Object"==(l=i(t))&&"function"==typeof t.callee?"Arguments":l}},function(e,t){e.exports={}},function(e,t,r){var n=r(2),i=r(6),o=r(7),a=r(5)("species");e.exports=function(e){var t=n[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||i!==r&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,r){var n=r(14);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){var n=r(6).f,i=r(12),o=r(5)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,r){var n=r(0),i=r(23),o=r(3),a=r(75),s="["+a+"]",l="​…",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),d=function(e,t,r){var i={},s=o(function(){return!!a[e]()||l[e]()!=l}),u=i[e]=s?t(p):a[e];r&&(i[r]=u);n(n.P+n.F*s,"String",i)},p=d.trim=function(e,t){e=String(i(e));1&t&&(e=e.replace(u,""));2&t&&(e=e.replace(c,""));return e};e.exports=d},function(e,t,r){var n=r(4);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){var n=r(20);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var i=n(39),o=n(5)("iterator"),a=n(40);e.exports=n(18).getIteratorMethod=function(e){if(e!=r)return e[o]||e["@@iterator"]||a[i(e)]}},function(e,t,r){var n=r(2),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,r){var n=r(11),i=r(8),o=r(37);e.exports=function(e){return function(t,r,a){var s,l=n(t),u=i(l.length),c=o(a,u);if(e&&r!=r)for(;u>c;){s=l[c++];if(s!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(20);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,n){var i=n(4),o=n(20),a=n(5)("match");e.exports=function(e){var t;return i(e)&&((t=e[a])!==r?!!t:"RegExp"==o(e))}},function(e,t,n){var i=n(36),o=n(0),a=n(14),s=n(13),l=n(12),u=n(40),c=n(56),d=n(44),p=n(16),f=n(5)("iterator"),h=!([].keys&&"next"in[].keys()),m=function(){return this};e.exports=function(e,t,n,y,g,v,_){c(n,t,y);var b,w,x,M=function(e){if(!h&&e in A)return A[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",k="values"==g,T=!1,A=e.prototype,E=A[f]||A["@@iterator"]||g&&A[g],P=E||M(g),O=g?k?M("entries"):P:r,j="Array"==t?A.entries||E:E;if(j){x=p(j.call(new e));if(x!==Object.prototype&&x.next){d(x,S,!0);i||l(x,f)||s(x,f,m)}}if(k&&E&&"values"!==E.name){T=!0;P=function(){return E.call(this)}}i&&!_||!h&&!T&&A[f]||s(A,f,P);u[t]=P;u[S]=m;if(g){b={values:k?P:M("values"),keys:v?P:M("keys"),entries:O};if(_)for(w in b)w in A||a(A,w,b[w]);else o(o.P+o.F*(h||T),t,b)}return b}},function(e,t,r){var n=r(28),i=r(31),o=r(44),a={};r(13)(a,r(5)("iterator"),function(){return this});e.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)});o(e,t+" Iterator")}},function(e,t,r){var n=r(5)("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0};Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o=[7],a=o[n]();a.next=function(){return{done:r=!0}};o[n]=function(){return a};e(o)}catch(e){}return r}},function(e,t,r){var n=r(1);e.exports=function(){var e=n(this),t="";e.global&&(t+="g");e.ignoreCase&&(t+="i");e.multiline&&(t+="m");e.unicode&&(t+="u");e.sticky&&(t+="y");return t}},function(e,t,r){var n=r(13),i=r(14),o=r(3),a=r(23),s=r(5);e.exports=function(e,t,r){var l=s(e),u=r(a,l,""[e]),c=u[0],d=u[1];if(o(function(){var t={};t[l]=function(){return 7};return 7!=""[e](t)})){i(String.prototype,e,c);n(RegExp.prototype,l,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)})}}},function(e,t,n){var i=n(1),o=n(10),a=n(5)("species");e.exports=function(e,t){var n,s=i(e).constructor;return s===r||(n=i(s)[a])==r?t:o(n)}},function(e,t,n){var i=n(2),o=n(0),a=n(14),s=n(43),l=n(32),u=n(34),c=n(42),d=n(4),p=n(3),f=n(57),h=n(44),m=n(74);e.exports=function(e,t,n,y,g,v){var _=i[e],b=_,w=g?"set":"add",x=b&&b.prototype,M={},S=function(e){var t=x[e];a(x,e,"delete"==e?function(e){return!(v&&!d(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!d(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!d(e)?r:t.call(this,0===e?0:e)}:"add"==e?function(e){t.call(this,0===e?0:e);return this}:function(e,r){t.call(this,0===e?0:e,r);return this})};if("function"==typeof b&&(v||x.forEach&&!p(function(){(new b).entries().next()}))){var k=new b,T=k[w](v?{}:-0,1)!=k,A=p(function(){k.has(1)}),E=f(function(e){new b(e)}),P=!v&&p(function(){for(var e=new b,t=5;t--;)e[w](t,t);return!e.has(-0)});if(!E){b=t(function(t,n){c(t,b,e);var i=m(new _,t,b);n!=r&&u(n,g,i[w],i);return i});b.prototype=x;x.constructor=b}if(A||P){S("delete");S("has");g&&S("get")}(P||T)&&S(w);v&&x.clear&&delete x.clear}else{b=y.getConstructor(t,e,g,w);s(b.prototype,n);l.NEED=!0}h(b,e);M[e]=b;o(o.G+o.W+o.F*(b!=_),M);v||y.setStrong(b,e,g);return b}},function(e,t,r){for(var n,i=r(2),o=r(13),a=r(35),s=a("typed_array"),l=a("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,d=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)if(n=i[p[d++]]){o(n.prototype,s,!0);o(n.prototype,l,!0)}else c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,r){e.exports=r(36)||!r(3)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){});delete r(2)[e]})},function(e,t,r){var n=r(0);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){var i=n(0),o=n(10),a=n(19),s=n(34);e.exports=function(e){i(i.S,e,{from:function(e){var t,n,i,l,u=arguments[1];o(this);t=u!==r;t&&o(u);if(e==r)return new this;n=[];if(t){i=0;l=a(u,arguments[2],2);s(e,!1,function(e){n.push(l(e,i++))})}else s(e,!1,n.push,n);return new this(n)}})}},function(e,t,r){var n=r(4),i=r(2).document,o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){var n=r(2),i=r(18),o=r(36),a=r(95),s=r(6).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,r){var n=r(50)("keys"),i=r(35);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleStr
2ing,toString,valueOf".split(",")},function(e,t,r){var n=r(2).document;e.exports=n&&n.documentElement},function(e,t,r){var n=r(27),i=r(52),o=r(48),a=r(9),s=r(47),l=Object.assign;e.exports=!l||r(3)(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";e[r]=7;n.split("").forEach(function(e){t[e]=e});return 7!=l({},e)[r]||Object.keys(l({},t)).join("")!=n})?function(e,t){for(var r=a(e),l=arguments.length,u=1,c=i.f,d=o.f;l>u;)for(var p,f=s(arguments[u++]),h=c?n(f).concat(c(f)):n(f),m=h.length,y=0;m>y;)d.call(f,p=h[y++])&&(r[p]=f[p]);return r}:l},function(e,t,n){var i=n(4),o=n(1),a=function(e,t){o(e);if(!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(19)(Function.call,n(15).f(Object.prototype,"__proto__").set,2);r(e,[]);t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){a(e,n);t?e.__proto__=n:r(e,n);return e}}({},!1):r),check:a}},function(e,t){e.exports=function(e,t,n){var i=n===r;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,r){var n=r(4),i=r(72).set;e.exports=function(e,t,r){var o,a=t.constructor;a!==r&&"function"==typeof a&&(o=a.prototype)!==r.prototype&&n(o)&&i&&i(e,o);return e}},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,r){var n=r(24),i=r(23);e.exports=function(e){var t=String(i(this)),r="",o=n(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var r=Math.expm1;e.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:r},function(e,t,n){var i=n(24),o=n(23);e.exports=function(e){return function(t,n){var a,s,l=String(o(t)),u=i(n),c=l.length;if(u<0||u>=c)return e?"":r;a=l.charCodeAt(u);return a<55296||a>56319||u+1===c||(s=l.charCodeAt(u+1))<56320||s>57343?e?l.charAt(u):a:e?l.slice(u,u+2):s-56320+(a-55296<<10)+65536}}},function(e,t,r){var n=r(54),i=r(23);e.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(e))}},function(e,t,r){var n=r(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{t[n]=!1;return!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var i=n(40),o=n(5)("iterator"),a=Array.prototype;e.exports=function(e){return e!==r&&(i.Array===e||a[o]===e)}},function(e,t,r){var n=r(6),i=r(31);e.exports=function(e,t,r){t in e?n.f(e,t,i(0,r)):e[t]=r}},function(e,t,r){var n=r(212);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,n){var i=n(9),o=n(37),a=n(8);e.exports=function(e){for(var t=i(this),n=a(t.length),s=arguments.length,l=o(s>1?arguments[1]:r,n),u=s>2?arguments[2]:r,c=u===r?n:o(u,n);c>l;)t[l++]=e;return t}},function(e,t,n){var i=n(33),o=n(87),a=n(40),s=n(11);e.exports=n(55)(Array,"Array",function(e,t){this._t=s(e);this._i=0;this._k=t},function(){var e=this._t,t=this._k,n=this._i++;if(!e||n>=e.length){this._t=r;return o(1)}return"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values");a.Arguments=a.Array;i("keys");i("values");i("entries")},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n,i,o,a=r(19),s=r(73),l=r(70),u=r(66),c=r(2),d=c.process,p=c.setImmediate,f=c.clearImmediate,h=c.MessageChannel,m=c.Dispatch,y=0,g={},v=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e];t()}},_=function(e){v.call(e.data)};if(!p||!f){p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);g[++y]=function(){s("function"==typeof e?e:Function(e),t)};n(y);return y};f=function(e){delete g[e]};if("process"==r(20)(d))n=function(e){d.nextTick(a(v,e,1))};else if(m&&m.now)n=function(e){m.now(a(v,e,1))};else if(h){i=new h;o=i.port2;i.port1.onmessage=_;n=a(o.postMessage,o,1)}else if(c.addEventListener&&"function"==typeof postMessage&&!c.importScripts){n=function(e){c.postMessage(e+"","*")};c.addEventListener("message",_,!1)}else n="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this);v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}}e.exports={set:p,clear:f}},function(e,t,n){var i=n(2),o=n(88).set,a=i.MutationObserver||i.WebKitMutationObserver,s=i.process,l=i.Promise,u="process"==n(20)(s);e.exports=function(){var e,t,n,c=function(){var i,o;u&&(i=s.domain)&&i.exit();for(;e;){o=e.fn;e=e.next;try{o()}catch(i){e?n():t=r;throw i}}t=r;i&&i.enter()};if(u)n=function(){s.nextTick(c)};else if(a){var d=!0,p=document.createTextNode("");new a(c).observe(p,{characterData:!0}
2);n=function(){p.data=d=!d}}else if(l&&l.resolve){var f=l.resolve();n=function(){f.then(c)}}else n=function(){o.call(i,c)};return function(i){var o={fn:i,next:r};t&&(t.next=o);if(!e){e=o;n()}t=o}}},function(e,t,n){function i(e){var t,n;this.promise=new e(function(e,i){if(t!==r||n!==r)throw TypeError("Bad Promise constructor");t=e;n=i});this.resolve=o(t);this.reject=o(n)}var o=n(10);e.exports.f=function(e){return new i(e)}},function(e,t,r){var n=r(38),i=r(52),o=r(1),a=r(2).Reflect;e.exports=a&&a.ownKeys||function(e){var t=n.f(o(e)),r=i.f;return r?t.concat(r(e)):t}},function(e,t,n){function i(e,t,r){var n,i,o,a=Array(r),s=8*r-t-1,l=(1<<s)-1,u=l>>1,c=23===t?F(2,-24)-F(2,-77):0,d=0,p=e<0||0===e&&1/e<0?1:0;e=N(e);if(e!=e||e===R){i=e!=e?1:0;n=l}else{n=W(U(e)/q);if(e*(o=F(2,-n))<1){n--;o*=2}e+=n+u>=1?c/o:c*F(2,1-u);if(e*o>=2){n++;o/=2}if(n+u>=l){i=0;n=l}else if(n+u>=1){i=(e*o-1)*F(2,t);n+=u}else{i=e*F(2,u-1)*F(2,t);n=0}}for(;t>=8;a[d++]=255&i,i/=256,t-=8);n=n<<t|i;s+=t;for(;s>0;a[d++]=255&n,n/=256,s-=8);a[--d]|=128*p;return a}function o(e,t,r){var n,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,l=r-1,u=e[l--],c=127&u;u>>=7;for(;s>0;c=256*c+e[l],l--,s-=8);n=c&(1<<-s)-1;c>>=-s;s+=t;for(;s>0;n=256*n+e[l],l--,s-=8);if(0===c)c=1-a;else{if(c===o)return n?NaN:u?-R:R;n+=F(2,t);c-=a}return(u?-1:1)*n*F(2,c-t)}function a(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function s(e){return[255&e]}function l(e){return[255&e,e>>8&255]}function u(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function c(e){return i(e,52,8)}function d(e){return i(e,23,4)}function p(e,t,r){A(e[O],t,{get:function(){return this[r]}})}function f(e,t,r,n){var i=+r,o=k(i);if(o+t>e[V])throw I(j);var a=e[H]._b,s=o+e[B],l=a.slice(s,s+t);return n?l:l.reverse()}function h(e,t,r,n,i,o){var a=+r,s=k(a);if(s+t>e[V])throw I(j);for(var l=e[H]._b,u=s+e[B],c=n(+i),d=0;d<t;d++)l[u+d]=c[o?d:t-d-1]}var m=n(2),y=n(7),g=n(36),v=n(62),_=n(13),b=n(43),w=n(3),x=n(42),M=n(24),S=n(8),k=n(117),T=n(38).f,A=n(6).f,E=n(85),P=n(44),O="prototype",j="Wrong index!",D=m.ArrayBuffer,C=m.DataView,L=m.Math,I=m.RangeError,R=m.Infinity,Y=D,N=L.abs,F=L.pow,W=L.floor,U=L.log,q=L.LN2,H=y?"_b":"buffer",V=y?"_l":"byteLength",B=y?"_o":"byteOffset";if(v.ABV){if(!w(function(){D(1)})||!w(function(){new D(-1)})||w(function(){new D;new D(1.5);new D(NaN);return"ArrayBuffer"!=D.name})){D=function(e){x(this,D);return new Y(k(e))};for(var z,K=D[O]=Y[O],$=T(Y),G=0;$.length>G;)(z=$[G++])in D||_(D,z,Y[z]);g||(K.constructor=D)}var J=new C(new D(2)),Q=C[O].setInt8;J.setInt8(0,2147483648);J.setInt8(1,2147483649);!J.getInt8(0)&&J.getInt8(1)||b(C[O],{setInt8:function(e,t){Q.call(this,e,t<<24>>24)},setUint8:function(e,t){Q.call(this,e,t<<24>>24)}},!0)}else{D=function(e){x(this,D,"ArrayBuffer");var t=k(e);this._b=E.call(Array(t),0);this[V]=t};C=function(e,t,n){x(this,C,"DataView");x(e,D,"DataView");var i=e[V],o=M(t);if(o<0||o>i)throw I("Wrong offset!");n=n===r?i-o:S(n);if(o+n>i)throw I("Wrong length!");this[H]=e;this[B]=o;this[V]=n};if(y){p(D,"byteLength","_l");p(C,"buffer","_b");p(C,"byteLength","_l");p(C,"byteOffset","_o")}b(C[O],{getInt8:function(e){return f(this,1,e)[0]<<24>>24},getUint8:function(e){return f(this,1,e)[0]},getInt16:function(e){var t=f(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=f(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return a(f(this,4,e,arguments[1]))},getUint32:function(e){return a(f(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return o(f(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return o(f(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){h(this,1,e,s,t)},setUint8:function(e,t){h(this,1,e,s,t)},setInt16:function(e,t){h(this,2,e,l,t,arguments[2])},setUint16:function(e,t){h(this,2,e,l,t,arguments[2])},setInt32:function(e,t){h(this,4,e,u,t,arguments[2])},setUint32:function(e,t){h(this,4,e,u,t,arguments[2])},setFloat32:function(e,t){h(this,4,e,d,t,arguments[2])},setFloat64:function(e,t){h(this,8,e,c,t,arguments[2])}})}P(D,"ArrayBuffer");P(C,"DataView");_(C[O],v.VIEW,!0);t.ArrayBuffer=D;t.DataView=C},function(e,t){e.exports=function(e,t){var r=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,r)}}},function(e,t,r){e.exports=!r(7)&&!r(3)(function(){return 7!=Object.defineProperty(r(66)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){t.f=r(5)},function(e,t,r){var n=r(12),i=r(11),o=r(51)(!1),a=r(68)("IE_PROTO");e.exports=function(e,t){var r,s=i(e),l=0,u=[];for(r in s)r!=a&&n(s,r)&&u.push(r);for(;t.length>l;
2)n(s,r=t[l++])&&(~o(u,r)||u.push(r));return u}},function(e,t,r){var n=r(6),i=r(1),o=r(27);e.exports=r(7)?Object.defineProperties:function(e,t){i(e);for(var r,a=o(t),s=a.length,l=0;s>l;)n.f(e,r=a[l++],t[r]);return e}},function(e,t,r){var n=r(11),i=r(38).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(e){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?s(e):i(n(e))}},function(e,t,r){var n=r(10),i=r(4),o=r(73),a=[].slice,s={},l=function(e,t,r){if(!(t in s)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";s[t]=Function("F,a","return new F("+n.join(",")+")")}return s[t](e,r)};e.exports=Function.bind||function(e){var t=n(this),r=a.call(arguments,1),s=function(){var n=r.concat(a.call(arguments));return this instanceof s?l(t,n.length,n):o(t,n,e)};i(t.prototype)&&(s.prototype=t.prototype);return s}},function(e,t,r){var n=r(20);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=n(e))throw TypeError(t);return+e}},function(e,t,r){var n=r(4),i=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){var n=r(2).parseFloat,i=r(45).trim;e.exports=1/n(r(75)+"-0")!=-1/0?function(e){var t=i(String(e),3),r=n(t);return 0===r&&"-"==t.charAt(0)?-0:r}:n},function(e,t,r){var n=r(2).parseInt,i=r(45).trim,o=r(75),a=/^[-+]?0[xX]/;e.exports=8!==n(o+"08")||22!==n(o+"0x16")?function(e,t){var r=i(String(e),3);return n(r,t>>>0||(a.test(r)?16:10))}:n},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,r){var n=r(77),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),l=i(2,-126),u=function(e){return e+1/o-1/o};e.exports=Math.fround||function(e){var t,r,i=Math.abs(e),c=n(e);if(i<l)return c*u(i/l/a)*l*a;t=(1+a/o)*i;r=t-(t-i);return r>s||r!=r?c*(1/0):c*r}},function(e,t,n){var i=n(1);e.exports=function(e,t,n,o){try{return o?t(i(n)[0],n[1]):t(n)}catch(t){var a=e.return;a!==r&&i(a.call(e));throw t}}},function(e,t,r){var n=r(10),i=r(9),o=r(47),a=r(8);e.exports=function(e,t,r,s,l){n(t);var u=i(e),c=o(u),d=a(u.length),p=l?d-1:0,f=l?-1:1;if(r<2)for(;;){if(p in c){s=c[p];p+=f;break}p+=f;if(l?p<0:d<=p)throw TypeError("Reduce of empty array with no initial value")}for(;l?p>=0:d>p;p+=f)p in c&&(s=t(s,c[p],p,u));return s}},function(e,t,n){var i=n(9),o=n(37),a=n(8);e.exports=[].copyWithin||function(e,t){var n=i(this),s=a(n.length),l=o(e,s),u=o(t,s),c=arguments.length>2?arguments[2]:r,d=Math.min((c===r?s:o(c,s))-u,s-l),p=1;if(u<l&&l<u+d){p=-1;u+=d-1;l+=d-1}for(;d-- >0;){u in n?n[l]=n[u]:delete n[l];l+=p;u+=p}return n}},function(e,t,r){r(7)&&"g"!=/./g.flags&&r(6).f(RegExp.prototype,"flags",{configurable:!0,get:r(58)})},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,r){var n=r(1),i=r(4),o=r(90);e.exports=function(e,t){n(e);if(i(t)&&t.constructor===e)return t;var r=o.f(e);(0,r.resolve)(t);return r.promise}},function(e,t,n){var i=n(113),o=n(46);e.exports=n(61)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:r)}},{get:function(e){var t=i.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return i.def(o(this,"Map"),0===e?0:e,t)}},i,!0)},function(e,t,n){var i=n(6).f,o=n(28),a=n(43),s=n(19),l=n(42),u=n(34),c=n(55),d=n(87),p=n(41),f=n(7),h=n(32).fastKey,m=n(46),y=f?"_s":"size",g=function(e,t){var r,n=h(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};e.exports={getConstructor:function(e,t,n,c){var d=e(function(e,i){l(e,d,t,"_i");e._t=t;e._i=o(null);e._f=r;e._l=r;e[y]=0;i!=r&&u(i,n,e[c],e)});a(d.prototype,{clear:function(){for(var e=m(this,t),n=e._i,i=e._f;i;i=i.n){i.r=!0;i.p&&(i.p=i.p.n=r);delete n[i.i]}e._f=e._l=r;e[y]=0},delete:function(e){var r=m(this,t),n=g(r,e);if(n){var i=n.n,o=n.p;delete r._i[n.i];n.r=!0;o&&(o.n=i);i&&(i.p=o);r._f==n&&(r._f=i);r._l==n&&(r._l=o);r[y]--}return!!n},forEach:function(e){m(this,t);for(var n,i=s(e,arguments.length>1?arguments[1]:r,3);n=n?n.n:this._f;){i(n.v,n.k,this);for(;n&&n.r;)n=n.p}},has:function(e){return!!g(m(this,t),e)}});f&&i(d.prototype,"size",{get:function(){return m(this,t)[y]}});return d},def:function(e,t,n){var i,o,a=g(e,t);if(a)a.v=n;else{e._l=a={i:o=h(t,!0),k:t,v:n,p:i=e._l,n:r,r:!1};e._f||(e._f=a);i&&(i.n=a);e[y]++;"F"!==o&&(e._i[o]=a)}return e},getEntry:g,setStrong:function(e,t,n){c(e,t,function(e,n){this._t=m(e,t);this._k=n;this._l=r},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;
2if(!e._t||!(e._l=n=n?n.n:e._t._f)){e._t=r;return d(1)}return"keys"==t?d(0,n.k):"values"==t?d(0,n.v):d(0,[n.k,n.v])},n?"entries":"values",!n,!0);p(t)}}},function(e,t,n){var i=n(113),o=n(46);e.exports=n(61)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:r)}},{add:function(e){return i.def(o(this,"Set"),e=0===e?0:e,e)}},i)},function(e,t,n){var i,o=n(26)(0),a=n(14),s=n(32),l=n(71),u=n(116),c=n(4),d=n(3),p=n(46),f=s.getWeak,h=Object.isExtensible,m=u.ufstore,y={},g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:r)}},v={get:function(e){if(c(e)){var t=f(e);return!0===t?m(p(this,"WeakMap")).get(e):t?t[this._i]:r}},set:function(e,t){return u.def(p(this,"WeakMap"),e,t)}},_=e.exports=n(61)("WeakMap",g,v,u,!0,!0);if(d(function(){return 7!=(new _).set((Object.freeze||Object)(y),7).get(y)})){i=u.getConstructor(g,"WeakMap");l(i.prototype,v);s.NEED=!0;o(["delete","has","get","set"],function(e){var t=_.prototype,r=t[e];a(t,e,function(t,n){if(c(t)&&!h(t)){this._f||(this._f=new i);var o=this._f[e](t,n);return"set"==e?this:o}return r.call(this,t,n)})})}},function(e,t,n){var i=n(43),o=n(32).getWeak,a=n(1),s=n(4),l=n(42),u=n(34),c=n(26),d=n(12),p=n(46),f=c(5),h=c(6),m=0,y=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},v=function(e,t){return f(e.a,function(e){return e[0]===t})};g.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var r=v(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});~t&&this.a.splice(t,1);return!!~t}};e.exports={getConstructor:function(e,t,n,a){var c=e(function(e,i){l(e,c,t,"_i");e._t=t;e._i=m++;e._l=r;i!=r&&u(i,n,e[a],e)});i(c.prototype,{delete:function(e){if(!s(e))return!1;var r=o(e);return!0===r?y(p(this,t)).delete(e):r&&d(r,this._i)&&delete r[this._i]},has:function(e){if(!s(e))return!1;var r=o(e);return!0===r?y(p(this,t)).has(e):r&&d(r,this._i)}});return c},def:function(e,t,r){var n=o(a(t),!0);!0===n?y(e).set(t,r):n[e._i]=r;return e},ufstore:y}},function(e,t,n){var i=n(24),o=n(8);e.exports=function(e){if(e===r)return 0;var t=i(e),n=o(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){function i(e,t,n,c,d,p,f,h){for(var m,y,g=d,v=0,_=!!f&&l(f,h,3);v<c;){if(v in n){m=_?_(n[v],v,t):n[v];y=!1;if(a(m)){y=m[u];y=y!==r?!!y:o(m)}if(y&&p>0)g=i(e,t,m,s(m.length),g,p-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=m}g++}v++}return g}var o=n(53),a=n(4),s=n(8),l=n(19),u=n(5)("isConcatSpreadable");e.exports=i},function(e,t,n){var i=n(8),o=n(76),a=n(23);e.exports=function(e,t,n,s){var l=String(a(e)),u=l.length,c=n===r?" ":String(n),d=i(t);if(d<=u||""==c)return l;var p=d-u,f=o.call(c,Math.ceil(p/c.length));f.length>p&&(f=f.slice(0,p));return s?f+l:l+f}},function(e,t,r){var n=r(27),i=r(11),o=r(48).f;e.exports=function(e){return function(t){for(var r,a=i(t),s=n(a),l=s.length,u=0,c=[];l>u;)o.call(a,r=s[u++])&&c.push(e?[r,a[r]]:a[r]);return c}}},function(e,t,r){var n=r(39),i=r(122);e.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,r){var n=r(34);e.exports=function(e,t){var r=[];n(e,!1,r.push,r,t);return r}},function(e,t){e.exports=Math.scale||function(e,t,r,n,i){return 0===arguments.length||e!=e||t!=t||r!=r||n!=n||i!=i?NaN:e===1/0||e===-1/0?e:(e-t)*(i-n)/(r-t)+n}},function(e,t,n){var i=n(39),o=n(5)("iterator"),a=n(40);e.exports=n(18).isIterable=function(e){var t=Object(e);return t[o]!==r||"@@iterator"in t||a.hasOwnProperty(i(t))}},function(e,t,r){var n=r(126),i=r(73),o=r(10);e.exports=function(){for(var e=o(this),t=arguments.length,r=Array(t),a=0,s=n._,l=!1;t>a;)(r[a]=arguments[a++])===s&&(l=!0);return function(){var n,o=this,a=arguments.length,u=0,c=0;if(!l&&!a)return i(e,r,o);n=r.slice();if(l)for(;t>u;u++)n[u]===s&&(n[u]=arguments[c++]);for(;a>c;)n.push(arguments[c++]);return i(e,n,o)}}},function(e,t,r){e.exports=r(2)},function(e,t,r){var n=r(6),i=r(15),o=r(91),a=r(11);e.exports=function(e,t){for(var r,s=o(a(t)),l=s.length,u=0;l>u;)n.f(e,r=s[u++],i.f(t,r));return e}},function(e,t,r){r(129);r(131);r(132);r(133);r(134);r(135);r(136);r(137);r(138);r(139);r(140);r(141);r(142);r(143);r(144);r(145);r(147);r(148);r(149);r(150);r(151);r(152);r(153);r(154);r(155);r(156);r(157);r(158);r(159);r(160);r(161);r(162);r(163);r(164);r(165);r(166);r(167);r(168);r(169);r(170);r(171);r(172);r(173);r(174);r(175);r(176);r(177);r(178);r(179);r(180);r(181);r(182);r(183);r(184);r(185);r(186);r(187);r(188);r(189);r(190);r(191);r(192);r(193);r(194);r(195);r(196);r(197);r(198);r(199);r(200);r(201);r(202);r(203);r(204);r(205);r(206);r(207);r(208);r(209);r(210);r(211);r(213);r(214);r(215);r(216);r(217);r(218);r(219);r(220);r(221);r(222);r(223);r(224);r(86);r(225);r(226);r(227);r(109);r(228);r(229);r(230);r(231);r(232);r(112);r(114);r(115);r(233);r(234);r(235);r(236);r(237);r(238);r(239);r(240);r(241);r(242);r(243);r(244);r(245);r(246);r(247);r(248);r(249);r(250);r(252);r(253);r(255);r(256);r(257);r(258);r(259);r(260);r(261);r(262);r(263);r(264);r(265);r(266);r(267);r(268);r(269);r(270);r(271);r(272);r(273);r(274);r(275);r(276);r(277);r(278);r(279);r(280);
2r(281);r(282);r(283);r(284);r(285);r(286);r(287);r(288);r(289);r(290);r(291);r(292);r(293);r(294);r(295);r(296);r(297);r(298);r(299);r(300);r(301);r(302);r(303);r(304);r(305);r(306);r(307);r(308);r(309);r(310);r(311);r(312);r(313);r(314);r(315);r(316);r(317);r(318);r(319);r(320);r(321);r(322);r(323);r(324);r(325);r(49);r(327);r(124);r(328);r(329);r(330);r(331);r(332);r(333);r(334);r(335);r(336);e.exports=r(337)},function(e,t,n){var i=n(2),o=n(12),a=n(7),s=n(0),l=n(14),u=n(32).KEY,c=n(3),d=n(50),p=n(44),f=n(35),h=n(5),m=n(95),y=n(67),g=n(130),v=n(53),_=n(1),b=n(11),w=n(22),x=n(31),M=n(28),S=n(98),k=n(15),T=n(6),A=n(27),E=k.f,P=T.f,O=S.f,j=i.Symbol,D=i.JSON,C=D&&D.stringify,L=h("_hidden"),I=h("toPrimitive"),R={}.propertyIsEnumerable,Y=d("symbol-registry"),N=d("symbols"),F=d("op-symbols"),W=Object.prototype,U="function"==typeof j,q=i.QObject,H=!q||!q.prototype||!q.prototype.findChild,V=a&&c(function(){return 7!=M(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=E(W,t);n&&delete W[t];P(e,t,r);n&&e!==W&&P(W,t,n)}:P,B=function(e){var t=N[e]=M(j.prototype);t._k=e;return t},z=U&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},K=function(e,t,r){e===W&&K(F,t,r);_(e);t=w(t,!0);_(r);if(o(N,t)){if(r.enumerable){o(e,L)&&e[L][t]&&(e[L][t]=!1);r=M(r,{enumerable:x(0,!1)})}else{o(e,L)||P(e,L,x(1,{}));e[L][t]=!0}return V(e,t,r)}return P(e,t,r)},$=function(e,t){_(e);for(var r,n=g(t=b(t)),i=0,o=n.length;o>i;)K(e,r=n[i++],t[r]);return e},G=function(e,t){return t===r?M(e):$(M(e),t)},J=function(e){var t=R.call(this,e=w(e,!0));return!(this===W&&o(N,e)&&!o(F,e))&&(!(t||!o(this,e)||!o(N,e)||o(this,L)&&this[L][e])||t)},Q=function(e,t){e=b(e);t=w(t,!0);if(e!==W||!o(N,t)||o(F,t)){var r=E(e,t);!r||!o(N,t)||o(e,L)&&e[L][t]||(r.enumerable=!0);return r}},X=function(e){for(var t,r=O(b(e)),n=[],i=0;r.length>i;)o(N,t=r[i++])||t==L||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===W,n=O(r?F:b(e)),i=[],a=0;n.length>a;)!o(N,t=n[a++])||r&&!o(W,t)||i.push(N[t]);return i};if(!U){j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:r),t=function(r){this===W&&t.call(F,r);o(this,L)&&o(this[L],e)&&(this[L][e]=!1);V(this,e,x(1,r))};a&&H&&V(W,e,{configurable:!0,set:t});return B(e)};l(j.prototype,"toString",function(){return this._k});k.f=Q;T.f=K;n(38).f=S.f=X;n(48).f=J;n(52).f=Z;a&&!n(36)&&l(W,"propertyIsEnumerable",J,!0);m.f=function(e){return B(h(e))}}s(s.G+s.W+s.F*!U,{Symbol:j});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)h(ee[te++]);for(var re=A(h.store),ne=0;re.length>ne;)y(re[ne++]);s(s.S+s.F*!U,"Symbol",{for:function(e){return o(Y,e+="")?Y[e]:Y[e]=j(e)},keyFor:function(e){if(!z(e))throw TypeError(e+" is not a symbol!");for(var t in Y)if(Y[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}});s(s.S+s.F*!U,"Object",{create:G,defineProperty:K,defineProperties:$,getOwnPropertyDescriptor:Q,getOwnPropertyNames:X,getOwnPropertySymbols:Z});D&&s(s.S+s.F*(!U||c(function(){var e=j();return"[null]"!=C([e])||"{}"!=C({a:e})||"{}"!=C(Object(e))})),"JSON",{stringify:function(e){if(e!==r&&!z(e)){for(var t,n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);t=i[1];"function"==typeof t&&(n=t);!n&&v(t)||(t=function(e,t){n&&(t=n.call(this,e,t));if(!z(t))return t});i[1]=t;return C.apply(D,i)}}});j.prototype[I]||n(13)(j.prototype,I,j.prototype.valueOf);p(j,"Symbol");p(Math,"Math",!0);p(i.JSON,"JSON",!0)},function(e,t,r){var n=r(27),i=r(52),o=r(48);e.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,s=r(e),l=o.f,u=0;s.length>u;
2)l.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,r){var n=r(0);n(n.S+n.F*!r(7),"Object",{defineProperty:r(6).f})},function(e,t,r){var n=r(0);n(n.S+n.F*!r(7),"Object",{defineProperties:r(97)})},function(e,t,r){var n=r(11),i=r(15).f;r(25)("getOwnPropertyDescriptor",function(){return function(e,t){return i(n(e),t)}})},function(e,t,r){var n=r(0);n(n.S,"Object",{create:r(28)})},function(e,t,r){var n=r(9),i=r(16);r(25)("getPrototypeOf",function(){return function(e){return i(n(e))}})},function(e,t,r){var n=r(9),i=r(27);r(25)("keys",function(){return function(e){return i(n(e))}})},function(e,t,r){r(25)("getOwnPropertyNames",function(){return r(98).f})},function(e,t,r){var n=r(4),i=r(32).onFreeze;r(25)("freeze",function(e){return function(t){return e&&n(t)?e(i(t)):t}})},function(e,t,r){var n=r(4),i=r(32).onFreeze;r(25)("seal",function(e){return function(t){return e&&n(t)?e(i(t)):t}})},function(e,t,r){var n=r(4),i=r(32).onFreeze;r(25)("preventExtensions",function(e){return function(t){return e&&n(t)?e(i(t)):t}})},function(e,t,r){var n=r(4);r(25)("isFrozen",function(e){return function(t){return!n(t)||!!e&&e(t)}})},function(e,t,r){var n=r(4);r(25)("isSealed",function(e){return function(t){return!n(t)||!!e&&e(t)}})},function(e,t,r){var n=r(4);r(25)("isExtensible",function(e){return function(t){return!!n(t)&&(!e||e(t))}})},function(e,t,r){var n=r(0);n(n.S+n.F,"Object",{assign:r(71)})},function(e,t,r){var n=r(0);n(n.S,"Object",{is:r(146)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,r){var n=r(0);n(n.S,"Object",{setPrototypeOf:r(72).set})},function(e,t,r){var n=r(39),i={};i[r(5)("toStringTag")]="z";i+""!="[object z]"&&r(14)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)
3},function(e,t,r){var n=r(0);n(n.P,"Function",{bind:r(99)})},function(e,t,r){var n=r(6).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||r(7)&&n(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,r){var n=r(4),i=r(16),o=r(5)("hasInstance"),a=Function.prototype;o in a||r(6).f(a,o,{value:function(e){if("function"!=typeof this||!n(e))return!1;if(!n(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,r){var n=r(2),i=r(12),o=r(20),a=r(74),s=r(22),l=r(3),u=r(38).f,c=r(15).f,d=r(6).f,p=r(45).trim,f=n.Number,h=f,m=f.prototype,y="Number"==o(r(28)(m)),g="trim"in String.prototype,v=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():p(t,3);var r,n,i,o=t.charCodeAt(0);if(43===o||45===o){r=t.charCodeAt(2);if(88===r||120===r)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:n=2;i=49;break;case 79:case 111:n=8;i=55;break;default:return+t}for(var a,l=t.slice(2),u=0,c=l.length;u<c;u++){a=l.charCodeAt(u);if(a<48||a>i)return NaN}return parseInt(l,n)}}return+t};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof f&&(y?l(function(){m.valueOf.call(r)}):"Number"!=o(r))?a(new h(v(t)),r,f):v(t)};for(var _,b=r(7)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;b.length>w;w++)i(h,_=b[w])&&!i(f,_)&&d(f,_,c(h,_));f.prototype=m;m.constructor=f;r(14)(n,"Number",f)}},function(e,t,r){var n=r(0),i=r(24),o=r(100),a=r(76),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",d=function(e,t){for(var r=-1,n=t;++r<6;){n+=e*u[r];u[r]=n%1e7;n=l(n/1e7)}},p=function(e){for(var t=6,r=0;--t>=0;){r+=u[t];u[t]=l(r/e);r=r%e*1e7}},f=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var r=String(u[e]);t=""===t?r:t+a.call("0",7-r.length)+r}return t},h=function(e,t,r){return 0===t?r:t%2==1?h(e,t-1,r*e):h(e*e,t/2,r)},m=function(e){for(var t=0,r=e;r>=4096;){t+=12;r/=4096}for(;r>=2;){t+=1;r/=2}return t};n(n.P+n.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(3)(function(){s.c
3all({})})),"Number",{toFixed:function(e){var t,r,n,s,l=o(this,c),u=i(e),y="",g="0";if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0){y="-";l=-l}if(l>1e-21){t=m(l*h(2,69,1))-69;r=t<0?l*h(2,-t,1):l/h(2,t,1);r*=4503599627370496;t=52-t;if(t>0){d(0,r);n=u;for(;n>=7;){d(1e7,0);n-=7}d(h(10,n,1),0);n=t-1;for(;n>=23;){p(1<<23);n-=23}p(1<<n);d(1,1);p(2);g=f()}else{d(0,r);d(1<<-t,0);g=f()+a.call("0",u)}}if(u>0){s=g.length;g=y+(s<=u?"0."+a.call("0",u-s)+g:g.slice(0,s-u)+"."+g.slice(s-u))}else g=y+g;return g}})},function(e,t,n){var i=n(0),o=n(3),a=n(100),s=1..toPrecision;i(i.P+i.F*(o(function(){return"1"!==s.call(1,r)})||!o(function(){s.call({})})),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return e===r?s.call(t):s.call(t,e)}})},function(e,t,r){var n=r(0);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,r){var n=r(0),i=r(2).isFinite;n(n.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,r){var n=r(0);n(n.S,"Number",{isInteger:r(101)})},function(e,t,r){var n=r(0);n(n.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,r){var n=r(0),i=r(101),o=Math.abs;n(n.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,r){var n=r(0);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,r){var n=r(0);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,r){var n=r(0),i=r(102);n(n.S+n.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,r){var n=r(0),i=r(103);n(n.S+n.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,r){var n=r(0),i=r(103);n(n.G+n.F*(parseInt!=i),{parseInt:i})},function(e,t,r){var n=r(0),i=r(102);n(n.G+n.F*(parseFloat!=i),{parseFloat:i})},function(e,t,r){var n=r(0),i=r(104),o=Math.sqrt,a=Math.acosh;n(n.S+n.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t,r){function n(e){return isFinite(e=+e)&&0!=e?e<0?-n(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=r(0),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:n})},function(e,t,r){var n=r(0),i=Math.atanh;n(n.S+n.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,r){var n=r(0),i=r(77);n(n.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,r){var n=r(0);n(n.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,r){var n=r(0),i=Math.exp;n(n.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,r){var n=r(0),i=r(78);n(n.S+n.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,r){var n=r(0);n(n.S,"Math",{fround:r(105)})},function(e,t,r){var n=r(0),i=Math.abs;n(n.S,"Math",{hypot:function(e,t){for(var r,n,o=0,a=0,s=arguments.length,l=0;a<s;){r=i(arguments[a++]);if(l<r){n=l/r;o=o*n*n+1;l=r}else if(r>0){n=r/l;o+=n*n}else o+=r}return l===1/0?1/0:l*Math.sqrt(o)}})},function(e,t,r){var n=r(0),i=Math.imul;n(n.S+n.F*r(3)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(e,t){var r=+e,n=+t,i=65535&r,o=65535&n;return 0|i*o+((65535&r>>>16)*o+i*(65535&n>>>16)<<16>>>0)}})},function(e,t,r){var n=r(0);n(n.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,r){var n=r(0);n(n.S,"Math",{log1p:r(104)})},function(e,t,r){var n=r(0);n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,r){var n=r(0);n(n.S,"Math",{sign:r(77)})},function(e,t,r){var n=r(0),i=r(78),o=Math.exp;n(n.S+n.F*r(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,r){var n=r(0),i=r(78),o=Math.exp;n(n.S,"Math",{tanh:function(e){var t=i(e=+e),r=i(-e);return t==1/0?1:r==1/0?-1:(t-r)/(o(e)+o(-e))}})},function(e,t,r){var n=r(0);n(n.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,r){var n=r(0),i=r(37),o=String.fromCharCode,a=String.fromCodePoint;n(n.S+n.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,a=0;n>a;){t=+arguments[a++];if(i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){var n=r(0),i=r(11),o=r(8);
3n(n.S,"String",{raw:function(e){for(var t=i(e.raw),r=o(t.length),n=arguments.length,a=[],s=0;r>s;){a.push(String(t[s++]));s<n&&a.push(String(arguments[s]))}return a.join("")}})},function(e,t,r){r(45)("trim",function(e){return function(){return e(this,3)}})},function(e,t,r){var n=r(0),i=r(79)(!1);n(n.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){var i=n(0),o=n(8),a=n(80),s="".endsWith;i(i.P+i.F*n(81)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:r,i=o(t.length),l=n===r?i:Math.min(o(n),i),u=String(e);return s?s.call(t,u,l):t.slice(l-u.length,l)===u}})},function(e,t,n){var i=n(0),o=n(80);i(i.P+i.F*n(81)("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:r)}})},function(e,t,r){var n=r(0);n(n.P,"String",{repeat:r(76)})},function(e,t,n){var i=n(0),o=n(8),a=n(80),s="".startsWith;i(i.P+i.F*n(81)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:r,t.length)),i=String(e);return s?s.call(t,i,n):t.slice(n,n+i.length)===i}})},function(e,t,n){var i=n(79)(!0);n(55)(String,"String",function(e){this._t=String(e);this._i=0},function(){var e,t=this._t,n=this._i;if(n>=t.length)return{value:r,done:!0};e=i(t,n);this._i+=e.length;return{value:e,done:!1}})},function(e,t,r){r(17)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,r){r(17)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,r){r(17)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,r){r(17)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,r){r(17)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,r){r(17)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,r){r(17)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,r){r(17)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,r){r(17)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,r){r(17)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,r){r(17)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,r){r(17)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,r){r(17)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,r){var n=r(0);n(n.S,"Array",{isArray:r(53)})},function(e,t,n){var i=n(19),o=n(0),a=n(9),s=n(106),l=n(82),u=n(8),c=n(83),d=n(49);o(o.S+o.F*!n(57)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,p,f=a(e),h="function"==typeof this?this:Array,m=arguments.length,y=m>1?arguments[1]:r,g=y!==r,v=0,_=d(f);g&&(y=i(y,m>2?arguments[2]:r,2));if(_==r||h==Array&&l(_)){t=u(f.length);for(n=new h(t);t>v;v++)c(n,v,g?y(f[v],v):f[v])}else for(p=_.call(f),n=new h;!(o=p.next()).done;v++)c(n,v,g?s(p,y,[o.value,v],!0):o.value);n.length=v;return n}})},function(e,t,r){var n=r(0),i=r(83);n(n.S+n.F*r(3)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,r=new("function"==typeof this?this:Array)(t);t>e;)i(r,e,arguments[e++]);r.length=t;return r}})},function(e,t,n){var i=n(0),o=n(11),a=[].join;i(i.P+i.F*(n(47)!=Object||!n(21)(a)),"Array",{join:function(e){return a.call(o(this),e===r?",":e)}})},function(e,t,n){var i=n(0),o=n(70),a=n(20),s=n(37),l=n(8),u=[].slice;i(i.P+i.F*n(3)(function(){o&&u.call(o)}),"Array",{slice:function(e,t){var n=l(this.length),i=a(this);t=t===r?n:t;if("Array"==i)return u.call(this,e,t);for(var o=s(e,n),c=s(t,n),d=l(c-o),p=Array(d),f=0;f<d;f++)p[f]="String"==i?this.charAt(o+f):this[o+f];return p}})},function(e,t,n){var i=n(0),o=n(10),a=n(9),s=n(3),l=[].sort,u=[1,2,3];i(i.P+i.F*(s(function(){u.sort(r)})||!s(function(){u.sort(null)})||!n(21)(l)),"Array",{sort:function(e){return e===r?l.call(a(this)):l.call(a(this),o(e))}})},function(e,t,r){var n=r(0),i=r(26)(0),o=r(21)([].forEach,!0);
3n(n.P+n.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var i=n(4),o=n(53),a=n(5)("species");e.exports=function(e){var t;if(o(e)){t=e.constructor;"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=r);if(i(t)){t=t[a];null===t&&(t=r)}}return t===r?Array:t}},function(e,t,r){var n=r(0),i=r(26)(1);n(n.P+n.F*!r(21)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,r){var n=r(0),i=r(26)(2);n(n.P+n.F*!r(21)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,r){var n=r(0),i=r(26)(3);n(n.P+n.F*!r(21)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,r){var n=r(0),i=r(26)(4);n(n.P+n.F*!r(21)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,r){var n=r(0),i=r(107);n(n.P+n.F*!r(21)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,r){var n=r(0),i=r(107);n(n.P+n.F*!r(21)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,r){var n=r(0),i=r(51)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(a||!r(21)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,r){var n=r(0),i=r(11),o=r(24),a=r(8),s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(l||!r(21)(s)),"Array",{lastIndexOf:function(e){if(l)return s.apply(this,arguments)||0;var t=i(this),r=a(t.length),n=r-1;arguments.length>1&&(n=Math.min(n,o(arguments[1])));n<0&&(n=r+n);for(;n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}})},function(e,t,r){var n=r(0);n(n.P,"Array",{copyWithin:r(108)});r(33)("copyWithin")},function(e,t,r){var n=r(0);n(n.P,"Array",{fill:r(85)});r(33)("fill")},function(e,t,n){var i=n(0),o=n(26)(5),a=!0;"find"in[]&&Array(1).find(function(){a=!1});i(i.P+i.F*a,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:r)}});n(33)("find")},function(e,t,n){var i=n(0),o=n(26)(6),a="findIndex",s=!0;a in[]&&Array(1)[a](function(){s=!1});i(i.P+i.F*s,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:r)}});n(33)(a)},function(e,t,r){r(41)("Array")},function(e,t,n){var i=n(2),o=n(74),a=n(6).f,s=n(38).f,l=n(54),u=n(58),c=i.RegExp,d=c,p=c.prototype,f=/a/g,h=/a/g,m=new c(f)!==f;if(n(7)&&(!m||n(3)(function(){h[n(5)("match")]=!1;return c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")}))){c=function(e,t){var n=this instanceof c,i=l(e),a=t===r;return!n&&i&&e.constructor===c&&a?e:o(m?new d(i&&!a?e.source:e,t):d((i=e instanceof c)?e.source:e,i&&a?u.call(e):t),n?this:p,c)};for(var y=s(d),g=0;y.length>g;)!function(e){e in c||a(c,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})}(y[g++]);p.constructor=c;c.prototype=p;n(14)(i,"RegExp",c)}n(41)("RegExp")},function(e,t,n){n(109);var i=n(1),o=n(58),a=n(7),s=/./.toString,l=function(e){n(14)(RegExp.prototype,"toString",e,!0)};n(3)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?l(function(){var e=i(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?o.call(e):r)}):"toString"!=s.name&&l(function(){return s.call(this)})},function(e,t,n){n(59)("match",1,function(e,t,n){return[function(n){var i=e(this),o=n==r?r:n[t];return o!==r?o.call(n,i):new RegExp(n)[t](String(i))},n]})},function(e,t,n){n(59)("replace",2,function(e,t,n){return[function(i,o){var a=e(this),s=i==r?r:i[t];return s!==r?s.call(i,a,o):n.call(String(a),i,o)},n]})},function(e,t,n){n(59)("search",1,function(e,t,n){return[function(n){var i=e(this),o=n==r?r:n[t];return o!==r?o.call(n,i):new RegExp(n)[t](String(i))},n]})},function(e,t,n){n(59)("split",2,function(e,t,i){var o=n(54),a=i,s=[].push,l="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[l]||2!="ab".split(/(?:ab)*/)[l]||4!=".".split(/(.?)(.?)/)[l]||".".split(/()()/)[l]>1||"".split(/.?/)[l]){var u=/()??/.exec("")[1]===r;i=function(e,t){var n=String(this);if(e===r&&0===t)return[];if(!o(e))return a.call(n,e,t);var i,c,d,p,f,h=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,g=t===r?4294967295:t>>>0,v=new RegExp(e.source,m+"g");u||(i=new RegExp("^"+v.source+"$(?!\\s)",m));for(;c=v.exec(n);){d=c.index+c[0][l];if(d>y){h.push(n.slice(y,c.index));!u&&c[l]>1&&c[0].replace(i,function(){for(f=1;f<arguments[l]-2;f++)arguments[f]===r&&(c[f]=r)});c[l]>1&&c.index<n[l]&&s.apply(h,c.slice(1));p=c[0][l];y=d;if(h[l]>=g)break}v.lastIndex===c.index&&v.lastIndex++}y===n[l]?!p&&v.test("")||h.push(""):h.push(n.slice(y));return h[l]>g?h.slice(0,g):h}}else"0".split(r,0)[l]&&(i=function(e,t){return e===r&&0===t?[]:a.call(this,e,t)});return[function(n,o){var a=e(this),s=n==r?r:n[t];return s!==r?s.call(n,a,o):i.call(String(a),n,o)},i]})},function(e,t,n){var i,o,a,s,l=n(36),u=n(2),c=n(19),d=n(39),p=n(0),f=n(4),h=n(10),m=n(42),y=n(34),g=n(60),v=n(88).set,_=n(89)(),b=n(90),w=n(110),x=n(111),M=u.TypeError,S=u.process,k=u.Promise,T="process"==d(S),A=function(){},E=o=b.f,P=!!function(){try{var e=k.resolve(1),t=(e.constructor={})[n(5)("species")]=function(e){e(A,A)};return(T||"function"==typeof PromiseRejectionEvent)&&e.then(A)instanceof t}catch(e){}}(),O=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},j=function(e,t){if(!e._n){e._n=!0;var r=e._c;_(function(){for(var n=e._v,i=1==e._s,o=0;r.length>
3o;)!function(t){var r,o,a=i?t.ok:t.fail,s=t.resolve,l=t.reject,u=t.domain;try{if(a){if(!i){2==e._h&&L(e);e._h=1}if(!0===a)r=n;else{u&&u.enter();r=a(n);u&&u.exit()}r===t.promise?l(M("Promise-chain cycle")):(o=O(r))?o.call(r,s,l):s(r)}else l(n)}catch(e){l(e)}}(r[o++]);e._c=[];e._n=!1;t&&!e._h&&D(e)})}},D=function(e){v.call(u,function(){var t,n,i,o=e._v,a=C(e);if(a){t=w(function(){T?S.emit("unhandledRejection",o,e):(n=u.onunhandledrejection)?n({promise:e,reason:o}):(i=u.console)&&i.error&&i.error("Unhandled promise rejection",o)});e._h=T||C(e)?2:1}e._a=r;if(a&&t.e)throw t.v})},C=function(e){if(1==e._h)return!1;for(var t,r=e._a||e._c,n=0;r.length>n;){t=r[n++];if(t.fail||!C(t.promise))return!1}return!0},L=function(e){v.call(u,function(){var t;T?S.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},I=function(e){var t=this;if(!t._d){t._d=!0;t=t._w||t;t._v=e;t._s=2;t._a||(t._a=t._c.slice());j(t,!0)}},R=function(e){var t,r=this;if(!r._d){r._d=!0;r=r._w||r;try{if(r===e)throw M("Promise can't be resolved itself");if(t=O(e))_(function(){var n={_w:r,_d:!1};try{t.call(e,c(R,n,1),c(I,n,1))}catch(e){I.call(n,e)}});else{r._v=e;r._s=1;j(r,!1)}}catch(e){I.call({_w:r,_d:!1},e)}}};if(!P){k=function(e){m(this,k,"Promise","_h");h(e);i.call(this);try{e(c(R,this,1),c(I,this,1))}catch(e){I.call(this,e)}};i=function(e){this._c=[];this._a=r;this._s=0;this._d=!1;this._v=r;this._h=0;this._n=!1};i.prototype=n(43)(k.prototype,{then:function(e,t){var n=E(g(this,k));n.ok="function"!=typeof e||e;n.fail="function"==typeof t&&t;n.domain=T?S.domain:r;this._c.push(n);this._a&&this._a.push(n);this._s&&j(this,!1);return n.promise},catch:function(e){return this.then(r,e)}});a=function(){var e=new i;this.promise=e;this.resolve=c(R,e,1);this.reject=c(I,e,1)};b.f=E=function(e){return e===k||e===s?new a(e):o(e)}}p(p.G+p.W+p.F*!P,{Promise:k});n(44)(k,"Promise");n(41)("Promise");s=n(18).Promise;p(p.S+p.F*!P,"Promise",{reject:function(e){var t=E(this);(0,t.reject)(e);return t.promise}});p(p.S+p.F*(l||!P),"Promise",{resolve:function(e){return x(l&&this===s?k:this,e)}});p(p.S+p.F*!(P&&n(57)(function(e){k.all(e).catch(A)})),"Promise",{all:function(e){var t=this,n=E(t),i=n.resolve,o=n.reject,a=w(function(){var n=[],a=0,s=1;y(e,!1,function(e){var l=a++,u=!1;n.push(r);s++;t.resolve(e).then(function(e){if(!u){u=!0;n[l]=e;--s||i(n)}},o)});--s||i(n)});a.e&&o(a.v);return n.promise},race:function(e){var t=this,r=E(t),n=r.reject,i=w(function(){y(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});i.e&&n(i.v);return r.promise}})},function(e,t,n){var i=n(116),o=n(46);n(61)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:r)}},{add:function(e){return i.def(o(this,"WeakSet"),e,!0)}},i,!1,!0)},function(e,t,r){var n=r(0),i=r(10),o=r(1),a=(r(2).Reflect||{}).apply,s=Function.apply;n(n.S+n.F*!r(3)(function(){a(function(){})}),"Reflect",{apply:function(e,t,r){var n=i(e),l=o(r);return a?a(n,t,l):s.call(n,t,l)}})},function(e,t,r){var n=r(0),i=r(28),o=r(10),a=r(1),s=r(4),l=r(3),u=r(99),c=(r(2).Reflect||{}).construct,d=l(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),p=!l(function(){c(function(){})});n(n.S+n.F*(d||p),"Reflect",{construct:function(e,t){o(e);a(t);var r=arguments.length<3?e:o(arguments[2]);if(p&&!d)return c(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];n.push.apply(n,t);return new(u.apply(e,n))}var l=r.prototype,f=i(s(l)?l:Object.prototype),h=Function.apply.call(e,f,t);return s(h)?h:f}})},function(e,t,r){var n=r(6),i=r(0),o=r(1),a=r(22);i(i.S+i.F*r(3)(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,r){o(e);t=a(t,!0);o(r);try{n.f(e,t,r);return!0}catch(e){return!1}}})},function(e,t,r){var n=r(0),i=r(15).f,o=r(1);n(n.S,"Reflect",{deleteProperty:function(e,t){var r=i(o(e),t);return!(r&&!r.configurable)&&delete e[t]}})},function(e,t,n){var i=n(0),o=n(1),a=function(e){this._t=o(e);this._i=0;var t,r=this._k=[];for(t in e)r.push(t)};n(56)(a,"Object",function(){var e,t=this,n=t._k;do{if(t._i>=n.length)return{value:r,done:!0}}while(!((e=n[t._i++])in t._t));return{value:e,done:!1}});i(i.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,t,n){function i(e,t){var n,l,d=arguments.length<3?e:arguments[2];return c(e)===d?e[t]:(n=o.f(e,t))?s(n,"value")?n.value:n.get!==r?n.get.call(d):r:u(l=a(e))?i(l,t,d):void 0}var o=n(15),a=n(16),s=n(12),l=n(0),u=n(4),c=n(1);l(l.S,"Reflect",{get:i})},function(e,t,r){var n=r(15),i=r(0),o=r(1);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return n.f(o(e),t)}})},function(e,t,r){var n=r(0),i=r(16),o=r(1);n(n.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,r){var n=r(0);n(n.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,r){var n=r(0),i=r(1),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(e){i(e);return!o||o(e)}})},function(e,t,r){var n=r(0);n(n.S,"Reflect",{ownKeys:r(91)})},function(e,t,r){var n=r(0),i=r(1),o=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(e){i(e);try{o&&o(e);return!0}catch(e){return!1}}})},function(e,t,n){function i(e,t,n){var u,f,h=arguments.length<4?e:arguments[3],m=a.f(d(e),t);if(!m){if(p(f=s(e)))return i(f,t,n,h);m=c(0)}if(l(m,"value")){if(!1===m.writable||!p(h))return!1;u=a.f(h,t)||c(0);u.value=n;o.f(h,t,u);return!0}return m.set!==r&&(m.set.call(h,n),!0)}var o=n(6),a=n(15),s=n(16),l=n(12),u=n(0),c=n(31),d=n(1),p=n(4);u(u.S,"Reflect",{set:i})},function(e,t,r){var n=r(0),i=r(72);i&&n(n.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{i.set(e,t);return!0}catch(e){return!1}}})},function(e,t,r){var n=r(0);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,r){var n=r(0),i=r(9),o=r(22);n(n.P+n.F*r(3)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),r=o(t);return"number"!=typeof r||isFinite(r)?t.toISOString():null}})},function(e,t,r){var n=r(0),i=r(251);n(n.P+n.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,r){var n=r(3),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=n(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!n(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),r=e.getUTCMilliseconds(),n=t<0?"-":t>9999?"+":"";return n+("00000"+Math.abs(t)).slice(n?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(r>99?r:"0"+a(r))+"Z"}:o},function(e,t,r){var n=Date.prototype,i=n.toString,o=n.getTime;new Date(NaN)+""!="Invalid Date"&&r(14)(n,"toString",function(){var e=o.call(this);return e===e?i.call(this):"Invalid Date"})},function(e,t,r){var n=r(5)("toPrimitive"),i=Date.prototype;n in i||r(13)(i,n,r(254))},function(e,t,r){var n=r(1),i=r(22);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(n(this),"number"!=e)}},function(e,t,n){var i=n(0),o=n(62),a=n(92),s=n(1),l=n(37),u=n(8),c=n(4),d=n(2).ArrayBuffer,p=n(60),f=a.ArrayBuffer,h=a.DataView,m=o.ABV&&d.isView,y=f.prototype.slice,g=o.VIEW;i(i.G+i.W+i.F*(d!==f),{ArrayBuffer:f});i(i.S+i.F*!o.CONSTR,"ArrayBuffer",{isView:function(e){return m&&m(e)||c(e)&&g in e}});i(i.P+i.U+i.F*n(3)(function(){return!new f(2).slice(1,r).byteLength}
3),"ArrayBuffer",{slice:function(e,t){if(y!==r&&t===r)return y.call(s(this),e);for(var n=s(this).byteLength,i=l(e,n),o=l(t===r?n:t,n),a=new(p(this,f))(u(o-i)),c=new h(this),d=new h(a),m=0;i<o;)d.setUint8(m++,c.getUint8(i++));return a}});n(41)("ArrayBuffer")},function(e,t,r){var n=r(0);n(n.G+n.W+n.F*!r(62).ABV,{DataView:r(92).DataView})},function(e,t,r){r(29)("Int8",1,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,r){r(29)("Uint8",1,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,r){r(29)("Uint8",1,function(e){return function(t,r,n){return e(this,t,r,n)}},!0)},function(e,t,r){r(29)("Int16",2,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,r){r(29)("Uint16",2,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,r){r(29)("Int32",4,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,r){r(29)("Uint32",4,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,r){r(29)("Float32",4,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,r){r(29)("Float64",8,function(e){return function(t,r,n){return e(this,t,r,n)}})},function(e,t,n){var i=n(0),o=n(51)(!0);i(i.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:r)}});n(33)("includes")},function(e,t,r){var n=r(0),i=r(118),o=r(9),a=r(8),s=r(10),l=r(84);n(n.P,"Array",{flatMap:function(e){var t,r,n=o(this);s(e);t=a(n.length);r=l(n,0);i(r,n,n,t,0,1,e,arguments[1]);return r}});r(33)("flatMap")},function(e,t,n){var i=n(0),o=n(118),a=n(9),s=n(8),l=n(24),u=n(84);i(i.P,"Array",{flatten:function(){var e=arguments[0],t=a(this),n=s(t.length),i=u(t,0);o(i,t,t,n,0,e===r?1:l(e));return i}});n(33)("flatten")},function(e,t,r){var n=r(0),i=r(79)(!0);n(n.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){var i=n(0),o=n(119);i(i.P,"String",{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:r,!0)}})},function(e,t,n){var i=n(0),o=n(119);i(i.P,"String",{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:r,!1)}})},function(e,t,r){r(45)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,r){r(45)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,r){var n=r(0),i=r(23),o=r(8),a=r(54),s=r(58),l=RegExp.prototype,u=function(e,t){this._r=e;this._s=t};r(56)(u,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}});n(n.P,"String",{matchAll:function(e){i(this);if(!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),r="flags"in l?String(e.flags):s.call(e),n=new RegExp(e.source,~r.indexOf("g")?r:"g"+r);n.lastIndex=o(e.lastIndex);return new u(n,t)}})},function(e,t,r){r(67)("asyncIterator")},function(e,t,r){r(67)("observable")},function(e,t,n){var i=n(0),o=n(91),a=n(11),s=n(15),l=n(83);i(i.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,i=a(e),u=s.f,c=o(i),d={},p=0;c.length>p;){n=u(i,t=c[p++]);n!==r&&l(d,t,n)}return d}})},function(e,t,r){var n=r(0),i=r(120)(!1);n(n.S,"Object",{values:function(e){return i(e)}})},function(e,t,r){var n=r(0),i=r(120)(!0);n(n.S,"Object",{entries:function(e){return i(e)}})},function(e,t,r){var n=r(0),i=r(9),o=r(10),a=r(6);r(7)&&n(n.P+r(63),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,r){var n=r(0),i=r(9),o=r(10),a=r(6);r(7)&&n(n.P+r(63),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,r){var n=r(0),i=r(9),o=r(22),a=r(16),s=r(15).f;r(7)&&n(n.P+r(63),"Object",{__lookupGetter__:function(e){var t,r=i(this),n=o(e,!0);do{if(t=s(r,n))return t.get}while(r=a(r))}})},function(e,t,r){var n=r(0),i=r(9),o=r(22),a=r(16),s=r(15).f;r(7)&&n(n.P+r(63),"Object",{__lookupSetter__:function(e){var t,r=i(this),n=o(e,!0);do{if(t=s(r,n))return t.set}while(r=a(r))}})},function(e,t,r){var n=r(0);n(n.P+n.R,"Map",{toJSON:r(121)("Map")})},function(e,t,r){var n=r(0);n(n.P+n.R,"Set",{toJSON:r(121)("Set")})},function(e,t,r){r(64)("Map")},function(e,t,r){r(64)("Set")},function(e,t,r){r(64)("WeakMap")},function(e,t,r){r(64)("WeakSet")},function(e,t,r){r(65)("Map")},function(e,t,r){r(65)("Set")},function(e,t,r){r(65)("WeakMap")},function(e,t,r){r(65)("WeakSet")},function(e,t,r){var n=r(0);n(n.G,{global:r(2)})},function(e,t,r){var n=r(0);
3n(n.S,"System",{global:r(2)})},function(e,t,r){var n=r(0),i=r(20);n(n.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,r){var n=r(0);n(n.S,"Math",{clamp:function(e,t,r){return Math.min(r,Math.max(t,e))}})},function(e,t,r){var n=r(0);n(n.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,r){var n=r(0),i=180/Math.PI;n(n.S,"Math",{degrees:function(e){return e*i}})},function(e,t,r){var n=r(0),i=r(123),o=r(105);n(n.S,"Math",{fscale:function(e,t,r,n,a){return o(i(e,t,r,n,a))}})},function(e,t,r){var n=r(0);n(n.S,"Math",{iaddh:function(e,t,r,n){var i=e>>>0,o=t>>>0,a=r>>>0;return o+(n>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(e,t,r){var n=r(0);n(n.S,"Math",{isubh:function(e,t,r,n){var i=e>>>0,o=t>>>0,a=r>>>0;return o-(n>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(e,t,r){var n=r(0);n(n.S,"Math",{imulh:function(e,t){var r=+e,n=+t,i=65535&r,o=65535&n,a=r>>16,s=n>>16,l=(a*o>>>0)+(i*o>>>16);return a*s+(l>>16)+((i*s>>>0)+(65535&l)>>16)}})},function(e,t,r){var n=r(0);n(n.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,r){var n=r(0),i=Math.PI/180;n(n.S,"Math",{radians:function(e){return e*i}})},function(e,t,r){var n=r(0);n(n.S,"Math",{scale:r(123)})},function(e,t,r){var n=r(0);n(n.S,"Math",{umulh:function(e,t){var r=+e,n=+t,i=65535&r,o=65535&n,a=r>>>16,s=n>>>16,l=(a*o>>>0)+(i*o>>>16);return a*s+(l>>>16)+((i*s>>>0)+(65535&l)>>>16)}})},function(e,t,r){var n=r(0);n(n.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,r){var n=r(0),i=r(18),o=r(2),a=r(60),s=r(111);n(n.P+n.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},function(e,t,r){var n=r(0),i=r(90),o=r(110);n(n.S,"Promise",{try:function(e){var t=i.f(this),r=o(e);(r.e?t.reject:t.resolve)(r.v);return t.promise}})},function(e,t,r){var n=r(30),i=r(1),o=n.key,a=n.set;n.exp({defineMetadata:function(e,t,r,n){a(e,t,i(r),o(n))}})},function(e,t,n){var i=n(30),o=n(1),a=i.key,s=i.map,l=i.store;i.exp({deleteMetadata:function(e,t){var n=arguments.length<3?r:a(arguments[2]),i=s(o(t),n,!1);if(i===r||!i.delete(e))return!1;if(i.size)return!0;var u=l.get(t);u.delete(n);return!!u.size||l.delete(t)}})},function(e,t,n){var i=n(30),o=n(1),a=n(16),s=i.has,l=i.get,u=i.key,c=function(e,t,n){if(s(e,t,n))return l(e,t,n);var i=a(t);return null!==i?c(e,i,n):r};i.exp({getMetadata:function(e,t){return c(e,o(t),arguments.length<3?r:u(arguments[2]))}})},function(e,t,n){var i=n(114),o=n(122),a=n(30),s=n(1),l=n(16),u=a.keys,c=a.key,d=function(e,t){var r=u(e,t),n=l(e);if(null===n)return r;var a=d(n,t);return a.length?r.length?o(new i(r.concat(a))):a:r};a.exp({getMetadataKeys:function(e){return d(s(e),arguments.length<2?r:c(arguments[1]))}})},function(e,t,n){var i=n(30),o=n(1),a=i.get,s=i.key;i.exp({getOwnMetadata:function(e,t){return a(e,o(t),arguments.length<3?r:s(arguments[2]))}})},function(e,t,n){var i=n(30),o=n(1),a=i.keys,s=i.key;i.exp({getOwnMetadataKeys:function(e){return a(o(e),arguments.length<2?r:s(arguments[1]))}})},function(e,t,n){var i=n(30),o=n(1),a=n(16),s=i.has,l=i.key,u=function(e,t,r){if(s(e,t,r))return!0;var n=a(t);return null!==n&&u(e,n,r)};i.exp({hasMetadata:function(e,t){return u(e,o(t),arguments.length<3?r:l(arguments[2]))}})},function(e,t,n){var i=n(30),o=n(1),a=i.has,s=i.key;i.exp({hasOwnMetadata:function(e,t){return a(e,o(t),arguments.length<3?r:s(arguments[2]))}})},function(e,t,n){var i=n(30),o=n(1),a=n(10),s=i.key,l=i.set;i.exp({metadata:function(e,t){return function(n,i){l(e,t,(i!==r?o:a)(n),s(i))}}
4})},function(e,t,r){var n=r(0),i=r(89)(),o=r(2).process,a="process"==r(20)(o);n(n.G,{asap:function(e){var t=a&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){var i=n(0),o=n(2),a=n(18),s=n(89)(),l=n(5)("observable"),u=n(10),c=n(1),d=n(42),p=n(43),f=n(13),h=n(34),m=h.RETURN,y=function(e){return null==e?r:u(e)},g=function(e){var t=e._c;if(t){e._c=r;t()}},v=function(e){return e._o===r},_=function(e){if(!v(e)){e._o=r;g(e)}},b=function(e,t){c(e);this._c=r;this._o=e;e=new w(this);try{var n=t(e),i=n;if(null!=n){"function"==typeof n.unsubscribe?n=function(){i.unsubscribe()}:u(n);this._c=n}}catch(t){e.error(t);return}v(this)&&g(this)};b.prototype=p({},{unsubscribe:function(){_(this)}});var w=function(e){this._s=e};w.prototype=p({},{next:function(e){var t=this._s;if(!v(t)){var r=t._o;try{var n=y(r.next);if(n)return n.call(r,e)}
4catch(e){try{_(t)}finally{throw e}}}},error:function(e){var t=this._s;if(v(t))throw e;var n=t._o;t._o=r;try{var i=y(n.error);if(!i)throw e;e=i.call(n,e)}catch(e){try{g(t)}finally{throw e}}g(t);return e},complete:function(e){var t=this._s;if(!v(t)){var n=t._o;t._o=r;try{var i=y(n.complete);e=i?i.call(n,e):r}catch(e){try{g(t)}finally{throw e}}g(t);return e}}});var x=function(e){d(this,x,"Observable","_f")._f=u(e)};p(x.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(a.Promise||o.Promise)(function(r,n){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){n(e);i.unsubscribe()}},error:n,complete:r})})}});p(x,{from:function(e){var t="function"==typeof this?this:x,r=y(c(e)[l]);if(r){var n=c(r.call(e));return n.constructor===t?n:new t(function(e){return n.subscribe(e)})}return new t(function(t){var r=!1;s(function(){if(!r){try{if(h(e,!1,function(e){t.next(e);if(r)return m})===m)return}catch(e){if(r)throw e;t.error(e);return}t.complete()}});return function(){r=!0}})},of:function(){for(var e=0,t=arguments.length,r=Array(t);e<t;)r[e]=arguments[e++];return new("function"==typeof this?this:x)(function(e){var t=!1;s(function(){if(!t){for(var n=0;n<r.length;++n){e.next(r[n]);if(t)return}e.complete()}});return function(){t=!0}})}});f(x.prototype,l,function(){return this});i(i.G,{Observable:x});n(41)("Observable")},function(e,t,r){var n=r(0),i=r(88);n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,r){for(var n=r(86),i=r(27),o=r(14),a=r(2),s=r(13),l=r(40),u=r(5),c=u("iterator"),d=u("toStringTag"),p=l.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(f),m=0;m<h.length;m++){var y,g=h[m],v=f[g],_=a[g],b=_&&_.prototype;if(b){b[c]||s(b,c,p);b[d]||s(b,d,g);l[g]=p;if(v)for(y in n)b[y]||o(b,y,n[y],!0)}}},function(e,t,r){var n=r(2),i=r(0),o=n.navigator,a=[].slice,s=!!o&&/MSIE .\./.test(o.userAgent),l=function(e){return function(t,r){var n=arguments.length>2,i=!!n&&a.call(arguments,2);return e(n?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,r)}};i(i.G+i.B+i.F*s,{setTimeout:l(n.setTimeout),setInterval:l(n.setInterval)})},function(e,t,n){function i(e){var t=h(null);e!=r&&(w(e)?b(e,!0,function(e,r){t[e]=r}):f(t,e));return t}function o(e,t,r){_(t);var n,i,o=k(e),a=y(o),s=a.length,l=0;if(arguments.length<3){if(!s)throw TypeError("Reduce of empty object with no initial value");n=o[a[l++]]}else n=Object(r);for(;s>l;)A(o,i=a[l++])&&(n=t(n,o[i],i,e));return n}function a(e,t){return(t==t?v(e,t):P(e,function(e){return e!=e}))!==r}function s(e,t){if(A(e,t))return e[t]}function l(e,t,r){T&&t in Object?g.f(e,t,p(0,r)):e[t]=r;return e}function u(e){return S(e)&&m(e)===i.prototype}var c=n(19),d=n(0),p=n(31),f=n(71),h=n(28),m=n(16),y=n(27),g=n(6),v=n(326),_=n(10),b=n(34),w=n(124),x=n(56),M=n(87),S=n(4),k=n(11),T=n(7),A=n(12),E=function(e){var t=1==e,n=4==e;return function(o,a,s){var l,u,d,p=c(a,s,3),f=k(o),h=t||7==e||2==e?new("function"==typeof this?this:i):r;for(l in f)if(A(f,l)){u=f[l];d=p(u,l,o);if(e)if(t)h[l]=d;else if(d)switch(e){case 2:h[l]=u;break;case 3:return!0;case 5:return u;case 6:return l;case 7:h[d[0]]=d[1]}else if(n)return!1}return 3==e||n?n:h}},P=E(6),O=function(e){return function(t){return new j(t,e)}},j=function(e,t){this._t=k(e);this._a=y(e);this._i=0;this._k=t};x(j,"Dict",function(){var e,t=this,n=t._t,i=t._a,o=t._k;do{if(t._i>=i.length){t._t=r;return M(1)}}while(!A(n,e=i[t._i++]));return"keys"==o?M(0,e):"values"==o?M(0,n[e]):M(0,[e,n[e]])});i.prototype=null;d(d.G+d.F,{Dict:i});d(d.S,"Dict",{keys:O("keys"),values:O("values"),entries:O("entries"),forEach:E(0),map:E(1),filter:E(2),some:E(3),every:E(4),find:E(5),findKey:P,mapPairs:E(7),reduce:o,keyOf:v,includes:a,has:A,get:s,set:l,isDict:u})},function(e,t,r){var n=r(27),i=r(11);e.exports=function(e,t){for(var r,o=i(e),a=n(o),s=a.length,l=0;s>l;)if(o[r=a[l++]]===t)return r}},function(e,t,r){var n=r(1),i=r(49);e.exports=r(18).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,r){var n=r(2),i=r(18),o=r(0),a=r(125);o(o.G+o.F,{delay:function(e){return new(i.Promise||n.Promise)(function(t){setTimeout(a.call(t,!0),e)})}})},function(e,t,r){var n=r(126),i=r(0);r(18)._=n._=n._||{};i(i.P+i.F,"Function",{part:r(125)})},function(e,t,r){var n=r(0);n(n.S+n.F,"Object",{isObject:r(4)})},function(e,t,r){var n=r(0);n(n.S+n.F,"Object",{classof:r(39)})},function(e,t,r){var n=r(0),i=r(127);n(n.S+n.F,"Object",{define:i})},function(e,t,r){var n=r(0),i=r(127),o=r(28);n(n.S+n.F,"Object",{make:function(e,t){return i(o(e),t)}})},function(e,t,n){n(55)(Number,"Number",function(e){this._l=+e;this._i=0},function(){var e=this._i++,t=!(e<this._l);return{done:t,value:t?r:e}})},function(e,t,r){var n=r(0),i=r(93)(/[\\^$*+?.()|[\]{}]/g,"\\$&");n(n.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t,r){var n=r(0),i=r(93)(/[&<>"']/g,{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"});n(n.P+n.F,"String",{escapeHTML:function(){return i(this)}})},function(e,t,r){var n=r(0),i=r(93)(/&(?:amp|lt|gt|quot|apos);/g,{"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'"});n(n.P+n.F,"String",{unescapeHTML:function(){return i(this)}})}]);"undefined"!=typeof module&&module.exports?module.exports=e:t.core=e}(1,1);define("core-js",["core-js/client/core"],function(e){return e});define("core-js/client/core",function(){});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/configuration/bootLoader",["require","exports"],e)}(function(e,t){"use strict";function r(e,t){return e in i?i[e]:t}function n(e,t){i[e]=t;return this}
4Object.defineProperty(t,"__esModule",{value:!0});t.Properties={Adapter:{Cookie:"adapter.cookie",Session:"adapter.session",Template:{Class:"adapter.template",Directory:"adapter.template.directory",Bundle:"adapter.template.bundle"}},Application:{IsApp:"application.isapp",ResetIndexedDb:"application.resetIndexedDb"},Connectivity:"connectivity",HostApi:"hostapi",Manager:{Localization:{Models:"manager.localization.models"}},Router:{BackboneOptions:"router.backbone.options"},Tracker:{Application:"tracker.application"}};var i={};t.getValue=r;t.setValue=n;Object.keys(t.Properties).forEach(function(e){n(t.Properties[e],"")})});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser/polyfill/promise",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PolyPromise=function(){var e;!function(e){e.Pending="pending";e.Resolved="resolved";e.Rejected="rejected"}(e||(e={}));var t=function(){function t(t){this.executor=t;this.state=e.Pending;this.subPromiseStack=[];this.execute()}t.prototype.triggerResult=function(){for(;this.subPromiseStack.length;){this.subPromiseStack.shift()._execute()}};t.prototype.execute=function(){this._execute()};t.prototype._execute=function(){var t=this;try{this.executor(function(r){t.state=e.Resolved;t.value=r;t.triggerResult()},function(r){t.state=e.Rejected;t.value=r;t.triggerResult()})}catch(t){this.state=e.Rejected;this.value=t;this.triggerResult()}};t.prototype._createSubPromise=function(n,i){var o=this,a=new r(function(r,a){var s,l;if(o.state===e.Resolved){s=n;l=r}else{s=i;l=a}try{if(s){var u=s(o.value);if(u instanceof t)return u.then(r,a);r(u)}else l(o.value)}catch(e){a(e)}});this.state!==e.Pending?a._execute():this.subPromiseStack.push(a);return a};t.prototype.then=function(e,t){return this._createSubPromise(e,t)};t.prototype.catch=function(e){return this._createSubPromise(null,e)};t.prototype.toString=function(){return"[object Promise]"};t.all=function(e){return new t(function(r,n){var i=[],o=0,a=0;e.forEach(function(e,s){if(e instanceof t){++o;e.then(function(e){i[s]=e;++a>=o&&r(i)},n)}else i[s]=e});o||r(i)})};t.resolve=function(e){return new t(function(t){setTimeout(function(){t(e)},0)})};return t}(),r=function(e){return function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.execute=function(){};return t}(e)}(t);return t}();"undefined"==typeof window||"Promise"in window||(window.Promise=t.PolyPromise);t.default=t.PolyPromise});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/capabilities",["require","exports","./browser/polyfill/promise"],e)}(function(e,t){"use strict";function r(){}function n(e){e.then(function(e){return Object.assign(l,e)}).then(function(){Object.freeze(l)}).then(a,s)}function i(){return{MultiTrack:!1,Volume:!0}}function o(e,t){void 0===t&&(t=r);return u.then(function(){e instanceof Array||(e=[e]);var r=!e.find(function(e){return!l[e]});r&&t();return r})}Object.defineProperty(t,"__esModule",{value:!0});e("./browser/polyfill/promise");var a,s,l=i(),u=new Promise(function(e,t){a=e;s=t});t.initialize=n;t.getDefault=i;t.isCapable=o});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser/microsound",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MicroSound="data:audio/ogg;base64,T2dnUwACAAAAAAAAAACsH1UOAAAAAMfSW08BHgF2b3JiaXMAAAAAAkSsAAAAAAAAAEUBAAAAAAC4AU9nZ1MAAAAAAAAAAAAArB9VDgEAAABnkKE3D1P//////
4///////////qQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABIAAABFTkNPREVSPWxpYnNuZGZpbGUBBXZvcmJpcyFCQ1YBAAABABhjVClGmVLSSokZc5QxRplikkqJpYQWQkidcxRTqTnXnGusubUghBAaU1ApBZlSjlJpGWOQKQWZUhBLSSV0EjonnWMQW0nB1phri0G2HIQNmlJMKcSUUopCCBlTjCnFlFJKQgcldA465hxTjkooQbicc6u1lpZji6l0kkrnJGRMQkgphZJKB6VTTkJINZbWUikdc1JSakHoIIQQQrYghA2C0JBVAAABAMBAEBqyCgBQAAAQiqEYigKEhqwCADIAAASgKI7iKI4jOZJjSRYQGrIKAAACABAAAMBwFEmRFMmxJEvSLEvTRFFVfdU2VVX2dV3XdV3XdSA0ZBUAAAEAQEinmaUaIMIMZBgIDVkFACAAAABGKMIQA0JDVgEAAAEAAGIoOYgmtOZ8c46DZjloKsXmdHAi1eZJbirm5pxzzjknm3PGOOecc4pyZjFoJrTmnHMSg2YpaCa05pxznsTmQWuqtOacc8Y5p4NxRhjnnHOatOZBajbW5pxzFrSmOWouxeaccyLl5kltLtXmnHPOOeecc84555xzqhenc3BOOOecc6L25lpuQhfnnHM+Gad7c0I455xzzjnnnHPOOeecc4LQkFUAABAAAEEYNoZxpyBIn6OBGEWIacikB92jwyRoDHIKqUejo5FS6iCUVMZJKZ0gNGQVAAAIAAAhhBRSSCGFFFJIIYUUUoghhhhiyCmnnIIKKqmkoooyyiyzzDLLLLPMMuuws8467DDEEEMMrbQSS0211VhjrbnnnGsO0lpprbXWSimllFJKKQgNWQUAgAAAEAgZZJBBRiGFFFKIIaaccsopqKACQkNWAQCAAAACAAAAPMlzREd0REd0REd0REd0RMdzPEeUREmUREm0TMvUTE8VVdWVXVvWZd32bWEXdt33dd/3dePXhWFZlmVZlmVZlmVZlmVZlmVZgtCQVQAACAAAgBBCCCGFFFJIIaUYY8wx56CTUEIgNGQVAAAIACAAAADAURzFcSRHciTJkixJkzRLszzN0zxN9ERRFE3TVEVXdEXdtEXZlE3XdE3ZdFVZtV1Ztm3Z1m1flm3f933f933f933f933f93UdCA1ZBQBIAADoSI6kSIqkSI7jOJIkAaEhqwAAGQAAAQAoiqM4juNIkiRJlqRJnuVZomZqpmd6qqgCoSGrAABAAAABAAAAAAAomuIppuIpouI5oiNKomVaoqZqriibsuu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6LhAasgoAkAAA0JEcyZEcSZEUSZEcyQFCQ1YBADIAAAIAcAzHkBTJsSxL0zzN0zxN9ERP9ExPFV3RBUJDVgEAgAAAAgAAAAAAMCTDUixHczRJlFRLtVRNtVRLFVVPVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVNU3TNE0gNGQlABAFAEA5bLHm3hthmHIUc2mMU45qUJFCylkNKkIKMYm9VcwxJzHHzjHmpOWcMYQYtJo7pxRzkgKhISsEgNAMAIfjAJJmAZKlAQAAAAAAAICkaYDmeYDmeQAAAAAAAAAgaRqgeR6geR4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI6mAZrnAZrnAQAAAAAAAIDmeYAnmoAnigAAAAAAAABgeR7giR7giSIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI6mAZrnAZonAgAAAAAAAIDleYBnioDniQAAAAAAAACgeR7giSLgiSIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIAABwCAAAuh0JAVAUCcAIBDcSwJAAAcx7EsAABwHMmyAADAsizPAwAAy7I8DwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAADAgAMAQIAJZaDQkJUAQBQAgEExNA3IsmUBl2UBNA2gaQBPBHgeQDUBgAAAgAIHAIAAGzQlFgcoNGQlABAFAGBQFEuyLM+DpmmaKELTNE0UoWmeZ5rQNM8zTYii55kmPM/zTBOmKYqqCkRRVQUAABQ4AAAE2KApsThAoSErAYCQAACDo1iWpnme54miaaoqNM3zRFEUTdM0VRWa5nmiKIqmaZqqCk3zPFEURdNUVVWFpnmeKIqiaaqqq8LzRFE0TdM0VdV14XmiaIqmaZqq6roQRVE0TdNUVdd1XSCKpmmaquq6rgtE0TRNVVVdV5aBKJqmaaqq68oyME3TVFXXdV1ZBpimqrqu68oyQFVd13VlWZYBqqqqrivLsgxwXdd1XVm2bQCu67qybNsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEIlJaWUSqkgpFJSKRWEVFIqJaOSUmopZRBSKSmVCkIppZVUAADYgQMA2IGFUGjISgAgDwCAIEQpxhhzTkqpFGPOOSelVIox55yTUjLGmHPOSSkZY8w556SUjDnnnHNSSsacc845KaVzzjnnnJRSSuecc05KKSWEzjknpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmqZpnmeKmmRpmud5niiapiZJmuZ5nieKpsnzPE8URdE0VZPneZ4oiqJpqirXFUXRNE1VVVWyLIqiaJqqqqowTdNUVVd1XZimKaqqq8ouZNk0VdV1ZRm2bZqq6rqyDFRXVV3XloGrqqps2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAQgpBSCiGlFEJKKYSUUggJAAAYcAAACDChDBQashIASAUAAAyRUkoppZTSOCWllFJKKaVxTEoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKQUALlU4AOg+2LA6wknRWGChISsBgFQAAMAYhRiDUEprFUKMOSelpdYqhBhzTkpKreWMOQchpdZiy51zDEIprcXYU+mclJRai7GnFDoqKbUWW++9pJJaay3G3nsKKdTWWoy991ZTay3GGnvvObYSS6wx9t57j7XF2GLsvfceW0u15VgAAGaDAwBEgg2rI5wUjQUWGrISAAgJACCMUUopxpxzzjnnpJSMMeYchBBCCKGUkjHHnIMQQgghlFIy5pyDEEIIJYRSSsacgw5CCCWEUlLqnHMQQgihhFBKKZ1zDkIIIYRQSkqpcxBCCCGEEEopJaXUOQghlBBCCCmllEIIIYQQQgghlZJSCCGEEEIopZRUUgohhBBCCKWEUlJKKYUQSgghhFBSSimlUkoJIYQQSkoppRRKCCGUEEJKKaWUSgkhhBBKSKmklFJJIYQQQggFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAUQAAEIISQkktAkgpJq2GSDknrdYSOaQcxRoippSTlkIGmVJMSgktdIxJSym2EjpIqeYcUwgpAAAAggCAABNAYICg4AshIMYAAAQhMkMkFFbBAoMyaHCYBwAPEBESAUBigiLt4gK6DHBBF3cdCCEIQQhicQAFJODghBueeMMTbnCCTlGpAwEAAAAAYACABwAAhAKIiGjmKiwuMDI0Njg6PD5ABAAAAADACwA+AACQECAiopmrsLjAyNDY4Ojw+AAJAAAEEAAAAAAAAQQgICAAAAAAABAAAAAgIE9nZ1MABDoRAAAAAAAArB9VDgIAAAAvC4v4Bi3m4drW0axGxk3aGs3G/wEUJvHNBg9/n+awqRpvL1fxNLm+m9t29H7E1/DMqC13XFSEBHpHvZRRQu2BpuEUwx31rMtPLMcwcF6DPwAAFa7Fz4uiUqKf/cfAiEHbxk/8/A+1OMne252nxf7tdh8QTW3crTk04f/C9UPdq4f0/RPGNGKkX5n9eGJkudlwDwjgdvueAsRrL9JVeBBR68cgmk+SA34mfJvckhg64iSSJKWTpmeOWFLuVb4XlhfKn6hCypZyb7XFgvUnFzG/fapZS96Ht1X46OP+ObHcOj4WcjXE+lLMuhzeutPjN/+SeXl69IVReWm8b1UUd1/xW6Xd1ryku1+fyEvHfahZV71qkqgIITgQhYNLh+ASPkc93fRoc1JyIzTMUQ8/77WcVt1oQuBFc9P7O9CV2p0KUEJKKcT/j0GQO1t9+eO3TsFx/Q4vMV4690E/e88I67xpbpzuVYDr7e4e3lau3tZaYLftvztJgAiWmcvQkWHvRGmcTjecZOF1PKZLIw45tM9B6ARytKd82uNnEjeVL92YjCna6RxhVzKmVtB5f0tntiL606vB99cTmv7r/PLmHdPDoyy78VFeLdYvs7k0+FVg1nkvVhcJo8Jov94ybv6gTr47WzdUHHmGAmXm4nYWt0pWW5LWTmkOOjQZoA0d2jYGPke9uXqPCCQDdVBH3abx0R7qSAauOYEv4N3owmD4AKr3KxxeVKDSEP8/BsFmv5un7BV6HcD8sZL3+0GlnvzuOfr0tAhxm/a12XxsFjY3N3UDe0DsCKFEIHRlI+kIFhWnzT3B9sIuP8+aM6WcTgTiyQm9jLDuMHfTg/d4SFJKO/p9kA68RB3sDz1A2/czqjTPZU4uWcgPqx12zv7Omcm9mLxUrnpj/irkZfyVt7FXpcy/zqbI24Dn8+X+VVEZs9yy//M75L/splkXL/Dh0gimQcEUEomHhnMdgANeR32U9sYdFAzDHPWI8+ndUezAwQ2+QN73S0O/+2KBs8ihCSml8v/HCEN+NZe5z8+0KjRksayDptfpvQMOvi1hQsHF0fDuNjvs+PrwpHaA8c8ZGkAlA2Qt++mWI0k3XhCIvvQvP510JQMJx0Ynga4FbnAdAAm9l0MgEajGmzb06/ZH12VFPy67TlXNiE5/mb+NdXYrEjfkG2TvKQxMRqy+ITPnjyrYswWpm/maej1Yz4vLlr6+B9bC+9UW3r6WOL+k8v9CQ1dD0fyLUexoBTgggoARoKkBXkd91vl3N0XQRtDOx3tH/Vzmt3RmBkcVXwN/x6EvUPn/YwwgLh5388GffH996eBTrXjlU08ehmYmrjzz+//+f79xb/X9f/23370Utze3jUKMkonbr7xia12dzVuAKDK3u2GTgqbv77zFPe/TOeTMqbMWeqvzu1OdIWcAcuC+XvcMgGkht6DAM+V7c8+Czm2NW4C4OZ2rXlh4thfs90CYFphby4LOe4R733t/n2zeeHuHBbBjkIO3R7zFxwMDb9NWnU2Oi+NNAN7l1M3lc7AAQAA=";t.default=t.MicroSound});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser/mediaelement",["require","exports","./polyfill/promise"],e)}(function(e,t){"use strict";function r(){return u}function n(e){for(;e-- >0;){var t=new Audio;s.push(t);try{t.load()}catch(e){}}a()}function i(){return l.then(function(){return new Promise(function(e){!function t(){var r=s.pop();r?e(r):setTimeout(t,16)}()})})}function o(e){e.src="";e.volume=1;s.push(e)}
4Object.defineProperty(t,"__esModule",{value:!0});e("./polyfill/promise");var a,s=[],l=new Promise(function(e){a=e}),u=!1;try{new Audio;u=!0}catch(e){}t.isEnabled=r;t.createPool=n;t.newInstance=i;t.deleteInstance=o});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser/polyfill/map",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=0;t.PolyMap=function(){return function(){function e(){this.clear()}e.prototype.set=function(e,t){var n=this.internalList.indexOf(e);if(-1===n){n=r++;this._length++}this.internalList[n]=e;this.internalValueList[n]=t};e.prototype.clear=function(){this._length=0;this.internalList=[];this.internalValueList=[]};e.prototype.delete=function(e){var t=this.internalList.indexOf(e);if(-1!==t){this._length--;this.internalList.splice(t,1);return this.internalValueList.splice(t,1)[0]}};e.prototype.entries=function(){throw new Error("Polyfill: Not implemented yet...")};e.prototype.forEach=function(e){var t=this;this.internalList.forEach(function(r,n){e(t.internalValueList[n],r,t)})};e.prototype.get=function(e){return this.internalValueList[this.internalList.indexOf(e)]};e.prototype.has=function(e){return this.internalList.includes(e)};e.prototype.keys=function(){throw new Error("Polyfill: Not implemented yet...")};e.prototype.values=function(){throw new Error("Polyfill: Not implemented yet...")};Object.defineProperty(e.prototype,"size",{get:function(){return this._length},enumerable:!0,configurable:!0});return e}()}();"undefined"==typeof window||"Map"in window||(window.Map=t.PolyMap);t.default=t.PolyMap});var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser/webaudio",["require","exports","./polyfill/map","./mediaelement"],e)}(function(e,t){"use strict";function r(){return s.isEnabled()&&"undefined"!=typeof AudioContext}function n(){var e=new AudioContext;e.createGain=e.createGain||e.createGainNode;e.createDelay=e.createDelay||e.createDelayNode;e.createScriptProcessor=e.createScriptProcessor||e.createJavaScriptNode;return e}function i(e){void 0===e&&(e="default");return l[e]||(l[e]=n())}function o(e){u.has(e)||u.set(e,i().createMediaElementSource(e));return u.get(e)}function a(){return i().createGain()}Object.defineProperty(t,"__esModule",{value:!0});e("./polyfill/map");var s=__importStar(e("./mediaelement"));window.AudioContext=window.AudioContext||window.webkitAudioContext;var l={};t.isEnabled=r;t.createContext=n;t.getContext=i;var u=new Map;t.createFromMediaElement=o;t.createGainNode=a});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/track/factory",["require","exports"],e)}(function(e,t){"use strict";function r(e){i.push(e)}function n(e){for(var t=0;t<i.length;++t){var r=i[t];if(r.isEnabled())return new r.classDefinition(e)}console.error("No Supported Media Adapter found...");return null}Object.defineProperty(t,"__esModule",{value:!0});var i=[];t.addMediaAdapter=r;t.getInstance=n});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("FSEventDispatcher/eventdispatcher",["require","exports"],e)}(function(e,t){"use strict";function r(e){Object.assign(e.prototype,i.prototype)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.internalList=[];this.list=[]}e.prototype.add=function(e){this.list.push(e)};e.prototype.remove=function(e){var t=e.callback,r=e.context;if(t||r)for(var n=this.list.length-1;n>=0;--n){var i=this.list[n];if(!r&&(i.callback===t||i.callback._originalCallback===t)||!t&&i.context===r||i.context===r&&(i.callback===t||i.callback._originalCallback===t)){this.list.splice(n,1);for(var o=0;o<this.internalList.length;++o)this.internalList[o](n)}}else{this.list.splice(0,this.list.length);for(var o=0;o<this.internalList.length;++o)this.internalList[o](-1)}};e.prototype.execute=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=0,n=function(e){-1!==e?r&&r>=e&&--r:r=0};this.internalList.push(n);for(var i=[];r<this.list.length;++r){var o=this.list[r],a=o.callback.apply(o.context,e);void 0!==a&&i.push(a)}this.internalList.splice(this.internalList.indexOf(n),1);return i};return e}(),i=function(){function e(){this._events={}}e.prototype.on=function(e,t,r){(this._events[e]||(this._events[e]=new n)).add({callback:t,context:r||this});return this};e.prototype.once=function(e,t,r){var n=this,i=function(){n.off(e,i,r);t.apply(this,arguments)};i._originalCallback=t;return this.on(e,t,r)};e.prototype.off=function(e,t,r){if(!e&&!t&&!r){this._events={};return this}for(var n=e?[e]:Object.keys(this._events),i=0,o=n.length;i<o;++i){var a=n[i],s=this._events[a];s&&s.remove({callback:t,context:r})}return this};e.prototype.trigger=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=this._events[e];if(!n)return this;n.execute.apply(n,t);return this};e.prototype.triggerResult=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=this._events[e];return n?n.execute.apply(n,t):[]};e.Mediator=new e;return e}();t.eventdispatchable=r;t.default=i});define("FSEventDispatcher",["FSEventDispatcher/eventdispatcher"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esMo
4dule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/track",["require","exports","./browser/polyfill/promise","FSEventDispatcher"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;e("./browser/polyfill/promise");var n,i=__importDefault(e("FSEventDispatcher"));!function(e){e.Play="play";e.Pause="pause";e.Stop="stop"}(n=t.ETrackState||(t.ETrackState={}));var o;!function(e){e[e.Linear=0]="Linear"}(o=t.ETrackEffectEase||(t.ETrackEffectEase={}));var a=(r={},r[o.Linear]=function(e,t,r,n,i){return(r-e)/(t-e)*(i-n)+n},r),s=function(e){function t(t){var r=e.call(this)||this;r.infos=t;r.bindMethods();r.isDispose=!1;r._state=n.Stop;r._effects=[];r._fadeEffect=null;r._effectsByName={};r.globalVolume=1;r.internalVolume=1;var i;r.isInitialize=new Promise(function(e){return i=e});r.internalLoad().then(function(){if(!r.isDispose){r.initialize();i()}});return r}__extends(t,e);t.prototype.dispose=function(){this.isDispose=!0};t.prototype.bindMethods=function(){this.onComplete=this.onComplete.bind(this)};t.prototype.initialize=function(){};t.prototype.dispatchState=function(e,t){void 0===t&&(t={});this.trigger(e,Object.assign(t,this.getState()));return this};t.prototype.launchAfterInitialization=function(e){var t=this;this.isInitialize.then(function(){t.isValidTrack()&&e(null)})};t.prototype.isValidTrack=function(){return!0};t.prototype.play=function(){if(this._state!==n.Play){this._state=n.Play;this.applyPlay();this.onProgress();return this.dispatchState(t.Event.STATE_PLAY).dispatchState(t.Event.STATE)}};t.prototype.pause=function(){if(this._state!==n.Pause){this._state=n.Pause;this.applyPause();this._fadeEffect=null;return this.dispatchState(t.Event.STATE_PAUSE).dispatchState(t.Event.STATE)}};t.prototype.stop=function(){if(this._state!==n.Stop){this._state=n.Stop;this.applyStop();this._fadeEffect=null;return this.dispatchState(t.Event.STATE_STOP).dispatchState(t.Event.STATE)}};t.prototype.position=function(e){var r=this,n=this.currentTimePosition;this.applyPosition(e);this._fadeEffect=null;this.launchAfterInitialization(function(){r.dispatchState(t.Event.POSITION,{fromPosition:n});r.dispatchState(t.Event.PROGRESS,{fromPosition:n})});return this};t.prototype.setGlobalVolume=function(e){this.globalVolume=e;this.applyVolume(this.globalVolume*this.internalVolume);return this};t.prototype.fadeIn=function(e,t){var r=this;this._fadeEffect={attribute:"volume",complete:function(){r._fadeEffect=null;t&&t()},ease:o.Linear,end:this.currentTimePosition+e,start:this.currentTimePosition,endValue:1,startValue:this.volume};this.play();return this};t.prototype.fadeOut=function(e,t){var r=this;this._fadeEffect={attribute:"volume",complete:function(){r._fadeEffect=null;r.pause();t&&t()},ease:o.Linear,end:this.currentTimePosition+e,start:this.currentTimePosition,endValue:0,startValue:this.volume};return this};Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this._state===n.Play},enumerable:!0,configurable:!0});t.prototype.setEffect=function(e,t){this._effectsByName[e]&&this.removeEffect(e);this._effectsByName[e]=t;this._effects.push(t);this._effects.sort(function(e,t){return e.start<0&&t.start<0?t.start-e.start:e.start<0?1:t.start<0?-1:e.start-t.start});return this};t.prototype.getEffect=function(e){return this._effectsByName[e]};t.prototype.removeEffect=function(e){this._effects.splice(this._effects.indexOf(this._effectsByName[e]),1);delete this._effectsByName[e];return this};t.prototype.onProgress=function(){var e=this;this._state===n.Play&&this.launchAfterInitialization(function(){var t=e.currentTimePosition,r=e._effects.reduce(function(r,n){var i=n.start<0?e.duration+n.start:n.start,o=n.end<=0?e.duration+n.end:n.end;i<=t&&t<o?r[n.attribute]=a[n.ease](i,o,t,n.startValue,n.endValue):o<=t&&(r[n.attribute]=n.endValue);return r},{});if(e._fadeEffect)if(e._fadeEffect.end<t){r[e._fadeEffect.attribute]=e._fadeEffect.endValue;setTimeout(e._fadeEffect.complete,1)}else r[e._fadeEffect.attribute]=a[e._fadeEffect.ease](e._fadeEffect.start,e._fadeEffect.end,t,e._fadeEffect.startValue,e._fadeEffect.endValue);Object.keys(r).forEach(function(t){e[t]!==r[t]&&(e[t]=r[t])})})};t.prototype.onComplete=function(){this._state=n.Stop;this._fadeEffect=null;this.dispatchState(t.Event.COMPLETE)};Object.defineProperty(t.prototype,"volume",{get:function(){return this.internalVolume},set:function(e){this.internalVolume=e;this.applyVolume(this.internalVolume*this.globalVolume)},enumerable:!0,configurable:!0});t.Event={COMPLETE:"track:complete",POSITION:"track:position",PROGRESS:"track:progress",STATE:"track:state",STATE_PLAY:"track:state:play",STATE_PAUSE:"track:state:pause",STATE_STOP:"track:state:stop",LOADED:"track:loaded"};return t}(i.default);t.Track=s;t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser/track/mediaelement",["require","exports","../../capabilities","../../track","../mediaelement"],e)}(function(e,t){"use strict";
4Object.defineProperty(t,"__esModule",{value:!0});e("../../capabilities");var r=e("../../track"),n=e("../mediaelement"),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.internalLoad=function(){var e=this;return n.newInstance().then(function(t){if(e.isDispose)n.deleteInstance(t);else{e._track=t;e.previousTimePosition=0}})};t.prototype.dispose=function(){if(this._track){this._track.removeEventListener("timeupdate",this.onProgress);this._track.removeEventListener("ended",this.onComplete);this._track.removeEventListener("canplaythrough",this.onLoaded);n.deleteInstance(this._track);this._track=null}e.prototype.dispose.call(this)};t.prototype.bindMethods=function(){e.prototype.bindMethods.call(this);this.onProgress=this.onProgress.bind(this);this.onLoaded=this.onLoaded.bind(this)};t.prototype.initialize=function(){e.prototype.initialize.call(this);this._track.autoplay=!1;this._track.src=this.infos.streamUrl;this._track.addEventListener("timeupdate",this.onProgress);this._track.addEventListener("ended",this.onComplete);this._track.addEventListener("canplaythrough",this.onLoaded)};t.prototype.isValidTrack=function(){return e.prototype.isValidTrack.call(this)&&!!this._track};Object.defineProperty(t.prototype,"track",{get:function(){return this._track},enumerable:!0,configurable:!0});t.prototype.applyPlay=function(){var e=this;this.launchAfterInitialization(function(){e._track.play()});return this};t.prototype.applyPause=function(){var e=this;this.launchAfterInitialization(function(){e._track.pause()});return this};t.prototype.applyStop=function(){var e=this;this.launchAfterInitialization(function(){e._track.pause();e.applyPosition(0)});return this};t.prototype.applyPosition=function(e){var t=this;this.launchAfterInitialization(function(){
5t._track.currentTime=e});return this};Object.defineProperty(t.prototype,"duration",{get:function(){return this._track?this._track.duration:0},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"currentTimePosition",{get:function(){return this._track?this._track.currentTime:0},enumerable:!0,configurable:!0});t.prototype.applyVolume=function(e){var t=this;this.launchAfterInitialization(function(){t._track.volume=e});return this};t.prototype.getState=function(){return{duration:this._track?this._track.duration:0,position:this._track?this._track.currentTime:0,state:this.state}};t.prototype.onProgress=function(){var t=this;e.prototype.onProgress.call(this);this.launchAfterInitialization(function(){if(t.previousTimePosition!==t.track.currentTime){t.dispatchState(r.Track.Event.PROGRESS);t.previousTimePosition=t.track.currentTime}})};t.prototype.onLoaded=function(){this.dispatchState(r.Track.Event.LOADED)};return t}(r.Track);t.TrackMediaElement=i;t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser/track/webaudio",["require","exports","./mediaelement","../webaudio"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./mediaelement"),n=__importStar(e("../webaudio")),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.dispose=function(){if(this.isDispose)throw new Error("Already disposed!");this.firstDispose=new Error;if(this.gainNode){this.gainNode.disconnect();this.gainNode=null}if(this.audioSource){this.audioSource.disconnect();this.audioSource=null}e.prototype.dispose.call(this)};t.prototype.initialize=function(){e.prototype.initialize.call(this);this.track.crossOrigin="anonymous";this.audioSource=n.createFromMediaElement(this.track);this.gainNode=n.createGainNode();this.audioSource.connect(this.gainNode);this.context=n.getContext();this.gainNode.connect(this.context.destination)};t.prototype.applyVolume=function(e){var t=this;this.launchAfterInitialization(function(){t.gainNode.gain.value=e||0});return this};return t}(r.TrackMediaElement);t.TrackWebAudio=i;t.default=i});var __read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},__importStar=this&&this.__importStar||function(e){if(e&&e.__esMo
5dule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/browser-register",["require","exports","./capabilities","./browser/microsound","./browser/mediaelement","./browser/webaudio","./track/factory","./browser/track/mediaelement","./browser/track/webaudio"],e)}(function(e,t){"use strict";function r(){if(!h){h=!0;c.addMediaAdapter({isEnabled:l.isEnabled,classDefinition:d.default});c.addMediaAdapter({isEnabled:u.isEnabled,classDefinition:p.default});document.removeEventListener("click",r);l.isEnabled()&&l.createPool(f.trackPool)}}function n(e){Object.assign(f,e)}function i(e,t){t.volume=1;e.Volume=e.Volume&&1===t.volume;t.volume=0;e.Volume=e.Volume&&0===t.volume;return e}function o(e,t,r){return new Promise(function(n){var i=function(){t.removeEventListener("ended",o);r.removeEventListener("ended",a);t.removeEventListener("error",a);r.removeEventListener("error",a)};t.src=s.MicroSound;t.play();var o=function(){e.MultiTrack=!0;i();n(e)};t.addEventListener("ended",o);r.src=s.MicroSound;r.play();var a=function(){i();n(e)};r.addEventListener("ended",a);t.addEventListener("error",a);r.addEventListener("error",a)})}Object.defineProperty(t,"__esModule",{value:!0});var a=__importStar(e("./capabilities")),s=e("./browser/microsound"),l=e("./browser/mediaelement"),u=e("./browser/webaudio"),c=e("./track/factory"),d=__importDefault(e("./browser/track/mediaelement")),p=__importDefault(e("./browser/track/webaudio")),f={trackPool:5},h=!1;t.createWebEnvironment=r;document.addEventListener("click",r);t.initialize=n;a.initialize(new Promise(function(e){var t,r;Promise.all([l.newInstance(),l.newInstance()]).then(function(e){var n=__read(e,2),i=n[0],o=n[1];t=i;r=o;return a.getDefault()}).then(function(e){return i(e,t)}).then(function(e){return e.Volume?o(e,t,r):e}).then(function(n){l.deleteInstance(t);l.deleteInstance(r);e(n)})}));t.default=n});(function(){function e(e){function t(t,r,n,i,o,a){for(;o>=0&&o<a;o+=e){var s=i?i[o]:o;n=r(n,t[s],s,t)}return n}return function(r,n,i,o){n=_(n,o,4);var a=!T(r)&&v.keys(r),s=(a||r).length,l=e>0?0:s-1;if(arguments.length<3){i=r[a?a[l]:l];l+=e}return t(r,n,i,a,l,s)}}function t(e){return function(t,r,n){r=b(r,n);for(var i=k(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(r(t[o],o,t))return o;return-1}}function r(e,t,r){return function(n,i,o){var a=0,s=k(n);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(r&&o&&s){o=r(n,i);return n[o]===i?o:-1}if(i!==i){o=t(c.call(n,a,s),v.isNaN);return o>=0?o+a:-1}for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(n[o]===i)return o;return-1}}function n(e,t){var r=j.length,n=e.constructor,i=v.isFunction(n)&&n.prototype||s,o="constructor";v.has(e,o)&&!v.contains(t,o)&&t.push(o);for(;r--;){o=j[r];o in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)}}var i=this,o=i._,a=Array.prototype,s=Object.prototype,l=Function.prototype,u=a.push,c=a.slice,d=s.toString,p=s.hasOwnProperty,f=Array.isArray,h=Object.keys,m=l.bind,y=Object.create,g=function(){},v=function(e){if(e instanceof v)return e;if(!(this instanceof v))return new v(e);this._wrapped=e};if("undefined"!=typeof exports){"undefined"!=typeof module&&module.exports&&(exports=module.exports=v);exports._=v}else i._=v;v.VERSION="1.8.3";var _=function(e,t,r){if(void 0===t)return e;switch(null==r?3:r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)};case 4:return function(r,n,i,o){return e.call(t,r,n,i,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,r){return null==e?v.identity:v.isFunction(e)?_(e,t,r):v.isObject(e)?v.matcher(e):v.property(e)};v.iteratee=function(e,t){return b(e,t,1/0)};var w=function(e,t){return function(r){var n=arguments.length;if(n<2||null==r)return r;for(var i=1;i<n;i++)for(var o=arguments[i],a=e(o),s=a.length,l=0;l<s;l++){var u=a[l];t&&void 0!==r[u]||(r[u]=o[u])}return r}},x=function(e){if(!v.isObject(e))return{};if(y)return y(e);g.prototype=e;var t=new g;g.prototype=null;return t},M=function(e){return function(t){return null==t?void 0:t[e]}},S=Math.pow(2,53)-1,k=M("length"),T=function(e){var t=k(e);return"number"==typeof t&&t>=0&&t<=S};v.each=v.forEach=function(e,t,r){t=_(t,r);var n,i;if(T(e))for(n=0,i=e.length;n<i;n++)t(e[n],n,e);else{var o=v.keys(e);for(n=0,i=o.length;n<i;n++)t(e[o[n]],o[n],e)}return e};v.map=v.collect=function(e,t,r){t=b(t,r);for(var n=!T(e)&&v.keys(e),i=(n||e).length,o=Array(i),a=0;a<i;a++){var s=n?n[a]:a;o[a]=t(e[s],s,e)}return o};v.reduce=v.foldl=v.inject=e(1);v.reduceRight=v.foldr=e(-1);v.find=v.detect=function(e,t,r){var n;n=T(e)?v.findIndex(e,t,r):v.findKey(e,t,r);if(void 0!==n&&-1!==n)return e[n]};v.filter=v.select=function(e,t,r){var n=[];t=b(t,r);v.each(e,function(e,r,i){t(e,r,i)&&n.push(e)});return n};v.reject=function(e,t,r){return v.filter(e,v.negate(b(t)),r)};v.every=v.all=function(e,t,r){t=b(t,r);for(var n=!T(e)&&v.keys(e),i=(n||e).length,o=0;o<i;o++){var a=n?n[o]:o;if(!t(e[a],a,e))return!1}return!0};v.some=v.any=function(e,t,r){t=b(t,r);for(var n=!T(e)&&v.keys(e),i=(n||e).length,o=0;o<i;o++){var a=n?n[o]:o;if(t(e[a],a,e))return!0}return!1};v.contains=v.includes=v.include=function(e,t,r,n){T(e)||(e=v.values(e));("number"!=typeof r||n)&&(r=0);return v.indexOf(e,t,r)>=0};v.invoke=function(e,t){var r=c.call(arguments,2),n=v.isFunction(t);return v.map(e,function(e){var i=n?t:e[t];return null==i?i:i.apply(e,r)})};v.pluck=function(e,t){return v.map(e,v.property(t))};v.where=function(e,t){return v.filter(e,v.matcher(t))};v.findWhere=function(e,t){return v.find(e,v.matcher(t))};v.max=function(e,t,r){var n,i,o=-1/0,a=-1/0;
5if(null==t&&null!=e){e=T(e)?e:v.values(e);for(var s=0,l=e.length;s<l;s++){n=e[s];n>o&&(o=n)}}else{t=b(t,r);v.each(e,function(e,r,n){i=t(e,r,n);if(i>a||i===-1/0&&o===-1/0){o=e;a=i}})}return o};v.min=function(e,t,r){var n,i,o=1/0,a=1/0;if(null==t&&null!=e){e=T(e)?e:v.values(e);for(var s=0,l=e.length;s<l;s++){n=e[s];n<o&&(o=n)}}else{t=b(t,r);v.each(e,function(e,r,n){i=t(e,r,n);if(i<a||i===1/0&&o===1/0){o=e;a=i}})}return o};v.shuffle=function(e){for(var t,r=T(e)?e:v.values(e),n=r.length,i=Array(n),o=0;o<n;o++){t=v.random(0,o);t!==o&&(i[o]=i[t]);i[t]=r[o]}return i};v.sample=function(e,t,r){if(null==t||r){T(e)||(e=v.values(e));return e[v.random(e.length-1)]}return v.shuffle(e).slice(0,Math.max(0,t))};v.sortBy=function(e,t,r){t=b(t,r);return v.pluck(v.map(e,function(e,r,n){return{value:e,index:r,criteria:t(e,r,n)}}).sort(function(e,t){var r=e.criteria,n=t.criteria;if(r!==n){if(r>n||void 0===r)return 1;if(r<n||void 0===n)return-1}return e.index-t.index}),"value")};var A=function(e){return function(t,r,n){var i={};r=b(r,n);v.each(t,function(n,o){var a=r(n,o,t);e(i,n,a)});return i}};v.groupBy=A(function(e,t,r){v.has(e,r)?e[r].push(t):e[r]=[t]});v.indexBy=A(function(e,t,r){e[r]=t});v.countBy=A(function(e,t,r){v.has(e,r)?e[r]++:e[r]=1});v.toArray=function(e){return e?v.isArray(e)?c.call(e):T(e)?v.map(e,v.identity):v.values(e):[]};v.size=function(e){return null==e?0:T(e)?e.length:v.keys(e).length};v.partition=function(e,t,r){t=b(t,r);var n=[],i=[];v.each(e,function(e,r,o){(t(e,r,o)?n:i).push(e)});return[n,i]};v.first=v.head=v.take=function(e,t,r){if(null!=e)return null==t||r?e[0]:v.initial(e,e.length-t)};v.initial=function(e,t,r){return c.call(e,0,Math.max(0,e.length-(null==t||r?1:t)))};v.last=function(e,t,r){if(null!=e)return null==t||r?e[e.length-1]:v.rest(e,Math.max(0,e.length-t))};v.rest=v.tail=v.drop=function(e,t,r){return c.call(e,null==t||r?1:t)};v.compact=function(e){return v.filter(e,v.identity)};var E=function(e,t,r,n){for(var i=[],o=0,a=n||0,s=k(e);a<s;a++){var l=e[a];if(T(l)&&(v.isArray(l)||v.isArguments(l))){t||(l=E(l,t,r));var u=0,c=l.length;i.length+=c;for(;u<c;)i[o++]=l[u++]}else r||(i[o++]=l)}return i};v.flatten=function(e,t){return E(e,t,!1)};v.without=function(e){return v.difference(e,c.call(arguments,1))};v.uniq=v.unique=function(e,t,r,n){if(!v.isBoolean(t)){n=r;r=t;t=!1}null!=r&&(r=b(r,n));for(var i=[],o=[],a=0,s=k(e);a<s;a++){var l=e[a],u=r?r(l,a,e):l;if(t){a&&o===u||i.push(l);o=u}else if(r){if(!v.contains(o,u)){o.push(u);i.push(l)}}else v.contains(i,l)||i.push(l)}return i};v.union=function(){return v.uniq(E(arguments,!0,!0))};v.intersection=function(e){for(var t=[],r=arguments.length,n=0,i=k(e);n<i;n++){var o=e[n];if(!v.contains(t,o)){for(var a=1;a<r&&v.contains(arguments[a],o);a++);a===r&&t.push(o)}}return t};v.difference=function(e){var t=E(arguments,!0,!0,1);return v.filter(e,function(e){return!v.contains(t,e)})};v.zip=function(){return v.unzip(arguments)};v.unzip=function(e){for(var t=e&&v.max(e,k).length||0,r=Array(t),n=0;n<t;n++)r[n]=v.pluck(e,n);return r};v.object=function(e,t){for(var r={},n=0,i=k(e);n<i;n++)t?r[e[n]]=t[n]:r[e[n][0]]=e[n][1];return r};v.findIndex=t(1);v.findLastIndex=t(-1);v.sortedIndex=function(e,t,r,n){r=b(r,n,1);for(var i=r(t),o=0,a=k(e);o<a;){var s=Math.floor((o+a)/2);r(e[s])<i?o=s+1:a=s}return o};v.indexOf=r(1,v.findIndex,v.sortedIndex);v.lastIndexOf=r(-1,v.findLastIndex);v.range=function(e,t,r){if(null==t){t=e||0;e=0}r=r||1;for(var n=Math.max(Math.ceil((t-e)/r),0),i=Array(n),o=0;o<n;o++,e+=r)i[o]=e;return i};var P=function(e,t,r,n,i){if(!(n instanceof t))return e.apply(r,i);var o=x(e.prototype),a=e.apply(o,i);return v.isObject(a)?a:o};v.bind=function(e,t){if(m&&e.bind===m)return m.apply(e,c.call(arguments,1));if(!v.isFunction(e))throw new TypeError("Bind must be called on a function");var r=c.call(arguments,2),n=function(){return P(e,n,t,this,r.concat(c.call(arguments)))};return n};v.partial=function(e){var t=c.call(arguments,1),r=function(){for(var n=0,i=t.length,o=Array(i),a=0;a<i;a++)o[a]=t[a]===v?arguments[n++]:t[a];for(;n<arguments.length;)o.push(arguments[n++]);return P(e,r,this,this,o)};return r};v.bindAll=function(e){var t,r,n=arguments.length;if(n<=1)throw new Error("bindAll must be passed function names");for(t=1;t<n;t++){r=arguments[t];e[r]=v.bind(e[r],e)}return e};v.memoize=function(e,t){var r=function(n){var i=r.cache,o=""+(t?t.apply(this,arguments):n);v.has(i,o)||(i[o]=e.apply(this,arguments));return i[o]};r.cache={};return r};v.delay=function(e,t){var r=c.call(arguments,2);return setTimeout(function(){return e.apply(null,r)},t)};v.defer=v.partial(v.delay,v,1);v.throttle=function(e,t,r){var n,i,o,a=null,s=0;r||(r={});var l=function(){s=!1===r.leading?0:v.now();a=null;o=e.apply(n,i);a||(n=i=null)};return function(){var u=v.now();s||!1!==r.leading||(s=u);var c=t-(u-s);n=this;i=arguments;if(c<=0||c>t){if(a){clearTimeout(a);a=null}s=u;o=e.apply(n,i);a||(n=i=null)}else a||!1===r.trailing||(a=setTimeout(l,c));return o}};v.debounce=function(e,t,r){var n,i,o,a,s,l=function(){var u=v.now()-a;if(u<t&&u>=0)n=setTimeout(l,t-u);else{n=null;if(!r){s=e.apply(o,i);n||(o=i=null)}}};return function(){o=this;i=arguments;a=v.now();var u=r&&!n;n||(n=setTimeout(l,t));if(u){s=e.apply(o,i);o=i=null}return s}};v.wrap=function(e,t){return v.partial(t,e)};v.negate=function(e){return function(){return!e.apply(this,arguments)}};v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}};v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}};v.before=function(e,t){var r;return function(){--e>0&&(r=t.apply(this,arguments));e<=1&&(t=null);return r}};v.once=v.partial(v.before,2);var O=!{toString:null}.propertyIsEnumerable("toString"),j=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleStr
5ing"];v.keys=function(e){if(!v.isObject(e))return[];if(h)return h(e);var t=[];for(var r in e)v.has(e,r)&&t.push(r);O&&n(e,t);return t};v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var r in e)t.push(r);O&&n(e,t);return t};v.values=function(e){for(var t=v.keys(e),r=t.length,n=Array(r),i=0;i<r;i++)n[i]=e[t[i]];return n};v.mapObject=function(e,t,r){t=b(t,r);for(var n,i=v.keys(e),o=i.length,a={},s=0;s<o;s++){n=i[s];a[n]=t(e[n],n,e)}return a};v.pairs=function(e){for(var t=v.keys(e),r=t.length,n=Array(r),i=0;i<r;i++)n[i]=[t[i],e[t[i]]];return n};v.invert=function(e){for(var t={},r=v.keys(e),n=0,i=r.length;n<i;n++)t[e[r[n]]]=r[n];return t};v.functions=v.methods=function(e){var t=[];for(var r in e)v.isFunction(e[r])&&t.push(r);return t.sort()};v.extend=w(v.allKeys);v.extendOwn=v.assign=w(v.keys);v.findKey=function(e,t,r){t=b(t,r);for(var n,i=v.keys(e),o=0,a=i.length;o<a;o++){n=i[o];if(t(e[n],n,e))return n}};v.pick=function(e,t,r){var n,i,o={},a=e;if(null==a)return o;if(v.isFunction(t)){i=v.allKeys(a);n=_(t,r)}else{i=E(arguments,!1,!1,1);n=function(e,t,r){return t in r};a=Object(a)}for(var s=0,l=i.length;s<l;s++){var u=i[s],c=a[u];n(c,u,a)&&(o[u]=c)}return o};v.omit=function(e,t,r){if(v.isFunction(t))t=v.negate(t);else{var n=v.map(E(arguments,!1,!1,1),String);t=function(e,t){return!v.contains(n,t)}}return v.pick(e,t,r)};v.defaults=w(v.allKeys,!0);v.create=function(e,t){var r=x(e);t&&v.extendOwn(r,t);return r};v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e};v.tap=function(e,t){t(e);return e};v.isMatch=function(e,t){var r=v.keys(t),n=r.length;if(null==e)return!n;for(var i=Object(e),o=0;o<n;o++){var a=r[o];if(t[a]!==i[a]||!(a in i))return!1}return!0};var D=function(e,t,r,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof v&&(e=e._wrapped);t instanceof v&&(t=t._wrapped);var i=d.call(e);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(v.isFunction(a)&&a instanceof a&&v.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];n=n||[];for(var l=r.length;l--;)if(r[l]===e)return n[l]===t;r.push(e);n.push(t);if(o){l=e.length;if(l!==t.length)return!1;for(;l--;)if(!D(e[l],t[l],r,n))return!1}else{var u,c=v.keys(e);l=c.length;if(v.keys(t).length!==l)return!1;for(;l--;){u=c[l];if(!v.has(t,u)||!D(e[u],t[u],r,n))return!1}}r.pop();n.pop();return!0};v.isEqual=function(e,t){return D(e,t)};v.isEmpty=function(e){return null==e||(T(e)&&(v.isArray(e)||v.isString(e)||v.isArguments(e))?0===e.length:0===v.keys(e).length)};v.isElement=function(e){return!(!e||1!==e.nodeType)};v.isArray=f||function(e){return"[object Array]"===d.call(e)};v.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e};v.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){v["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}});v.isArguments(arguments)||(v.isArguments=function(e){return v.has(e,"callee")});"function"!=typeof/./&&"object"!=typeof Int8Array&&(v.isFunction=function(e){return"function"==typeof e||!1});v.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))};v.isNaN=function(e){return v.isNumber(e)&&e!==+e};v.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)};v.isNull=function(e){return null===e};v.isUndefined=function(e){return void 0===e};v.has=function(e,t){return null!=e&&p.call(e,t)};v.noConflict=function(){i._=o;return this};v.identity=function(e){return e};v.constant=function(e){return function(){return e}};v.noop=function(){};v.property=M;v.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}};v.matcher=v.matches=function(e){e=v.extendOwn({},e);return function(t){return v.isMatch(t,e)}};v.times=function(e,t,r){var n=Array(Math.max(0,e));t=_(t,r,1);for(var i=0;i<e;i++)n[i]=t(i);return n};v.random=function(e,t){if(null==t){t=e;e=0}return e+Math.floor(Math.random()*(t-e+1))};v.now=Date.now||function(){return(new Date).getTime()};
5var C={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},L=v.invert(C),I=function(e){var t=function(t){return e[t]},r="(?:"+v.keys(e).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(e){e=null==e?"":""+e;return n.test(e)?e.replace(i,t):e}};v.escape=I(C);v.unescape=I(L);v.result=function(e,t,r){var n=null==e?void 0:e[t];void 0===n&&(n=r);return v.isFunction(n)?n.call(e):n};var R=0;v.uniqueId=function(e){var t=++R+"";return e?e+t:t};v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Y=/(.)^/,N={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},F=/\\|'|\r|\n|\u2028|\u2029/g,W=function(e){return"\\"+N[e]};v.template=function(e,t,r){!t&&r&&(t=r);t=v.defaults({},t,v.templateSettings);var n=RegExp([(t.escape||Y).source,(t.interpolate||Y).source,(t.evaluate||Y).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(n,function(t,r,n,a,s){o+=e.slice(i,s).replace(F,W);i=s+t.length;r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='");return t});o+="';\n";t.variable||(o="with(obj||{}){\n"+o+"}\n");o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(e){e.source=o;throw e}var s=function(e){return a.call(this,e,v)};s.source="function("+(t.variable||"obj")+"){\n"+o+"}";return s};v.chain=function(e){var t=v(e);t._chain=!0;return t};var U=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){v.each(v.functions(e),function(t){var r=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];u.apply(e,arguments);return U(this,r.apply(v,e))}})};v.mixin(v);v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];v.prototype[e]=function(){var r=this._wrapped;t.apply(r,arguments);"shift"!==e&&"splice"!==e||0!==r.length||delete r[0];return U(this,r)}});v.each(["concat","join","slice"],function(e){var t=a[e];v.prototype[e]=function(){return U(this,t.apply(this._wrapped,arguments))}});v.prototype.value=function(){return this._wrapped};v.prototype.valueOf=v.prototype.toJSON=v.prototype.value;v.prototype.toString=function(){return""+this._wrapped};"function"==typeof define&&define.amd&&define("underscore",[],function(){return v})}).call(this);define("underscore/underscore",function(){});!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function r(e){var t=!!e&&"length"in e&&e.length,r=ie.type(e);return"function"!==r&&!ie.isWindow(e)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e)}function n(e,t,r){if(ie.isFunction(t))return ie.grep(e,function(e,n){return!!t.call(e,n,e)!==r});if(t.nodeType)return ie.grep(e,function(e){return e===t!==r});if("string"==typeof t){if(he.test(t))return ie.filter(t,e,r);t=ie.filter(t,e)}return ie.grep(e,function(e){return Z.call(t,e)>-1!==r})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t={};ie.each(e.match(_e)||[],function(e,r){t[r]=!0});return t}function a(){G.removeEventListener("DOMContentLoaded",a);e.removeEventListener("load",a);ie.ready()}function s(){this.expando=ie.expando+s.uid++}function l(e,t,r){var n;if(void 0===r&&1===e.nodeType){n="data-"+t.replace(Te,"-$&").toLowerCase();r=e.getAttribute(n);if("string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:ke.test(r)?ie.parseJSON(r):r)}catch(e){}Se.set(e,t,r)}else r=void 0}return r}function u(e,t,r,n){var i,o=1,a=20,s=n?function(){return n.cur()}:function(){return ie.css(e,t,"")},l=s(),u=r&&r[3]||(ie.cssNumber[t]?"":"px"),c=(ie.cssNumber[t]||"px"!==u&&+l)&&Ee.exec(ie.css(e,t));if(c&&c[3]!==u){u=u||c[3];r=r||[];c=+l||1;do{o=o||".5";c/=o;ie.style(e,t,c+u)}while(o!==(o=s()/l)&&1!==o&&--a)}if(r){c=+c||+l||0;i=r[1]?c+(r[1]+1)*r[2]:+r[2];if(n){n.unit=u;n.start=c;n.end=i}}return i}function c(e,t){var r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ie.nodeName(e,t)?ie.merge([e],r):r}function d(e,t){for(var r=0,n=e.length;r<n;r++)Me.set(e[r],"globalEval",!t||Me.get(t[r],"globalEval"))}function p(e,t,r,n,i){for(var o,a,s,l,u,p,f=t.createDocumentFragment(),h=[],m=0,y=e.length;m<y;m++){o=e[m];if(o||0===o)if("object"===ie.type(o))ie.merge(h,o.nodeType?[o]:o);else if(Ie.test(o)){a=a||f.appendChild(t.createElement("div"));s=(De.exec(o)||["",""])[1].toLowerCase();l=Le[s]||Le._default;a.innerHTML=l[1]+ie.htmlPrefilter(o)+l[2];p=l[0];for(;p--;)a=a.lastChild;ie.merge(h,a.childNodes);a=f.firstChild;a.textContent=""}else h.push(t.createTextNode(o))}f.textContent="";m=0;for(;o=h[m++];)if(n&&ie.inArray(o,n)>-1)i&&i.push(o);else{u=ie.contains(o.ownerDocument,o);a=c(f.appendChild(o),"script");u&&d(a);if(r){p=0;for(;o=a[p++];)Ce.test(o.type||"")&&r.push(o)}}return f}function f(){return!0}function h(){return!1}function m(){try{return G.activeElement}catch(e){}}function y(e,t,r,n,i,o){var a,s;if("object"==typeof t){if("string"!=typeof r){n=n||r;r=void 0}for(s in t)y(e,s,r,n,t[s],o);return e}if(null==n&&null==i){i=r;n=r=void 0}else if(null==i)if("string"==typeof r){i=n;n=void 0}else{i=n;n=r;r=void 0}if(!1===i)i=h;else if(!i)return e;if(1===o){a=i;i=function(e){ie().off(e);return a.apply(this,arguments)};i.guid=a.guid||(a.guid=ie.guid++)}return e.each(function(){ie.event.add(this,t,i,n,r)})}function g(e,t){return ie.nodeName(e,"table")&&ie.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function v(e){e.type=(null!==e.getAttribute("type"))+"/"+e.type;return e}function _(e){var t=qe.exec(e.type);t?e.type=t[1]:e.removeAttribute("type");return e}function b(e,t){var r,n,i,o,a,s,l,u;if(1===t.nodeType){if(Me.hasData(e)){o=Me.access(e);a=Me.set(t,o);u=o.events;if(u){delete a.handle;a.events={};for(i in u)for(r=0,n=u[i].length;r<n;r++)ie.event.add(t,i,u[i][r])}}if(Se.hasData(e)){s=Se.access(e);l=ie.extend({},s);Se.set(t,l)}}}
5function w(e,t){var r=t.nodeName.toLowerCase();"input"===r&&je.test(e.type)?t.checked=e.checked:"input"!==r&&"textarea"!==r||(t.defaultValue=e.defaultValue)}function x(e,t,r,n){t=Q.apply([],t);var i,o,a,s,l,u,d=0,f=e.length,h=f-1,m=t[0],y=ie.isFunction(m);if(y||f>1&&"string"==typeof m&&!ne.checkClone&&Ue.test(m))return e.each(function(i){var o=e.eq(i);y&&(t[0]=m.call(this,i,o.html()));x(o,t,r,n)});if(f){i=p(t,e[0].ownerDocument,!1,e,n);o=i.firstChild;1===i.childNodes.length&&(i=o);if(o||n){a=ie.map(c(i,"script"),v);s=a.length;for(;d<f;d++){l=i;if(d!==h){l=ie.clone(l,!0,!0);s&&ie.merge(a,c(l,"script"))}r.call(e[d],l,d)}if(s){u=a[a.length-1].ownerDocument;ie.map(a,_);for(d=0;d<s;d++){l=a[d];Ce.test(l.type||"")&&!Me.access(l,"globalEval")&&ie.contains(u,l)&&(l.src?ie._evalUrl&&ie._evalUrl(l.src):ie.globalEval(l.textContent.replace(He,"")))}}}}return e}function M(e,t,r){for(var n,i=t?ie.filter(t,e):e,o=0;null!=(n=i[o]);o++){r||1!==n.nodeType||ie.cleanData(c(n));if(n.parentNode){r&&ie.contains(n.ownerDocument,n)&&d(c(n,"script"));n.parentNode.removeChild(n)}}return e}function S(e,t){var r=ie(t.createElement(e)).appendTo(t.body),n=ie.css(r[0],"display");r.detach();return n}function k(e){var t=G,r=Be[e];if(!r){r=S(e,t);if("none"===r||!r){Ve=(Ve||ie("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement);t=Ve[0].contentDocument;t.write();t.close();r=S(e,t);Ve.detach()}Be[e]=r}return r}function T(e,t,r){var n,i,o,a,s=e.style;r=r||$e(e);a=r?r.getPropertyValue(t)||r[t]:void 0;""!==a&&void 0!==a||ie.contains(e.ownerDocument,e)||(a=ie.style(e,t));if(r&&!ne.pixelMarginRight()&&Ke.test(a)&&ze.test(t)){n=s.width;i=s.minWidth;o=s.maxWidth;s.minWidth=s.maxWidth=s.width=a;a=r.width;s.width=n;s.minWidth=i;s.maxWidth=o}return void 0!==a?a+"":a}function A(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function E(e){if(e in tt)return e;for(var t=e[0].toUpperCase()+e.slice(1),r=et.length;r--;){e=et[r]+t;if(e in tt)return e}}function P(e,t,r){var n=Ee.exec(t);return n?Math.max(0,n[2]-(r||0))+(n[3]||"px"):t}function O(e,t,r,n,i){for(var o=r===(n?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2){"margin"===r&&(a+=ie.css(e,r+Pe[o],!0,i));if(n){"content"===r&&(a-=ie.css(e,"padding"+Pe[o],!0,i));"margin"!==r&&(a-=ie.css(e,"border"+Pe[o]+"Width",!0,i))}else{a+=ie.css(e,"padding"+Pe[o],!0,i);"padding"!==r&&(a+=ie.css(e,"border"+Pe[o]+"Width",!0,i))}}return a}function j(t,r,n){var i=!0,o="width"===r?t.offsetWidth:t.offsetHeight,a=$e(t),s="border-box"===ie.css(t,"boxSizing",!1,a);G.msFullscreenElement&&e.top!==e&&t.getClientRects().length&&(o=Math.round(100*t.getBoundingClientRect()[r]));if(o<=0||null==o){o=T(t,r,a);(o<0||null==o)&&(o=t.style[r]);if(Ke.test(o))return o;i=s&&(ne.boxSizingReliable()||o===t.style[r]);o=parseFloat(o)||0}return o+O(t,r,n||(s?"border":"content"),i,a)+"px"}function D(e,t){for(var r,n,i,o=[],a=0,s=e.length;a<s;a++){n=e[a];if(n.style){o[a]=Me.get(n,"olddisplay");r=n.style.display;if(t){o[a]||"none"!==r||(n.style.display="");""===n.style.display&&Oe(n)&&(o[a]=Me.access(n,"olddisplay",k(n.nodeName)))}else{i=Oe(n);"none"===r&&i||Me.set(n,"olddisplay",i?r:ie.css(n,"display"))}}}for(a=0;a<s;a++){n=e[a];n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[a]||"":"none"))}return e}function C(e,t,r,n,i){return new C.prototype.init(e,t,r,n,i)}function L(){e.setTimeout(function(){rt=void 0});return rt=ie.now()}function I(e,t){var r,n=0,i={height:e};t=t?1:0;for(;n<4;n+=2-t){r=Pe[n];i["margin"+r]=i["padding"+r]=e}t&&(i.opacity=i.width=e);return i}function R(e,t,r){for(var n,i=(F.tweeners[t]||[]).concat(F.tweeners["*"]),o=0,a=i.length;o<a;o++)if(n=i[o].call(r,t,e))return n}function Y(e,t,r){var n,i,o,a,s,l,u,c,d=this,p={}
5,f=e.style,h=e.nodeType&&Oe(e),m=Me.get(e,"fxshow");if(!r.queue){s=ie._queueHooks(e,"fx");if(null==s.unqueued){s.unqueued=0;l=s.empty.fire;s.empty.fire=function(){s.unqueued||l()}}s.unqueued++;d.always(function(){d.always(function(){s.unqueued--;ie.queue(e,"fx").length||s.empty.fire()})})}if(1===e.nodeType&&("height"in t||"width"in t)){r.overflow=[f.overflow,f.overflowX,f.overflowY];u=ie.css(e,"display");c="none"===u?Me.get(e,"olddisplay")||k(e.nodeName):u;"inline"===c&&"none"===ie.css(e,"float")&&(f.display="inline-block")}if(r.overflow){f.overflow="hidden";d.always(function(){f.overflow=r.overflow[0];f.overflowX=r.overflow[1];f.overflowY=r.overflow[2]})}for(n in t){i=t[n];if(it.exec(i)){delete t[n];o=o||"toggle"===i;if(i===(h?"hide":"show")){if("show"!==i||!m||void 0===m[n])continue;h=!0}p[n]=m&&m[n]||ie.style(e,n)}else u=void 0}if(ie.isEmptyObject(p))"inline"===("none"===u?k(e.nodeName):u)&&(f.display=u);else{m?"hidden"in m&&(h=m.hidden):m=Me.access(e,"fxshow",{});o&&(m.hidden=!h);h?ie(e).show():d.done(function(){ie(e).hide()});d.done(function(){var t;Me.remove(e,"fxshow");for(t in p)ie.style(e,t,p[t])});for(n in p){a=R(h?m[n]:0,n,d);if(!(n in m)){m[n]=a.start;if(h){a.end=a.start;a.start="width"===n||"height"===n?1:0}}}}}function N(e,t){var r,n,i,o,a;for(r in e){n=ie.camelCase(r);i=t[n];o=e[r];if(ie.isArray(o)){i=o[1];o=e[r]=o[0]}if(r!==n){e[n]=o;delete e[r]}a=ie.cssHooks[n];if(a&&"expand"in a){o=a.expand(o);delete e[n];for(r in o)if(!(r in e)){e[r]=o[r];t[r]=i}}else t[n]=i}}function F(e,t,r){var n,i,o=0,a=F.prefilters.length,s=ie.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=rt||L(),r=Math.max(0,u.startTime+u.duration-t),n=r/u.duration||0,o=1-n,a=0,l=u.tweens.length;a<l;a++)u.tweens[a].run(o);s.notifyWith(e,[u,o,r]);if(o<1&&l)return r;s.resolveWith(e,[u]);return!1},u=s.promise({elem:e,props:ie.extend({},t),opts:ie.extend(!0,{specialEasing:{},easing:ie.easing._default},r),originalProperties:t,originalOptions:r,startTime:rt||L(),duration:r.duration,tweens:[],createTween:function(t,r){var n=ie.Tween(e,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);u.tweens.push(n);return n},stop:function(t){var r=0,n=t?u.tweens.length:0;if(i)return this;i=!0;for(;r<n;r++)u.tweens[r].run(1);if(t){s.notifyWith(e,[u,1,0]);s.resolveWith(e,[u,t])}else s.rejectWith(e,[u,t]);return this}}),c=u.props;N(c,u.opts.specialEasing);for(;o<a;o++){n=F.prefilters[o].call(u,e,c,u.opts);if(n){ie.isFunction(n.stop)&&(ie._queueHooks(u.elem,u.opts.queue).stop=ie.proxy(n.stop,n));return n}}ie.map(c,R,u);ie.isFunction(u.opts.start)&&u.opts.start.call(e,u);ie.fx.timer(ie.extend(l,{elem:e,anim:u,queue:u.opts.queue}))
6;return u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function W(e){return e.getAttribute&&e.getAttribute("class")||""}function U(e){return function(t,r){if("string"!=typeof t){r=t;t="*"}var n,i=0,o=t.toLowerCase().match(_e)||[];if(ie.isFunction(r))for(;n=o[i++];)if("+"===n[0]){n=n.slice(1)||"*";(e[n]=e[n]||[]).unshift(r)}else(e[n]=e[n]||[]).push(r)}}function q(e,t,r,n){function i(s){var l;o[s]=!0;ie.each(e[s]||[],function(e,s){var u=s(t,r,n);if("string"==typeof u&&!a&&!o[u]){t.dataTypes.unshift(u);i(u);return!1}if(a)return!(l=u)});return l}var o={},a=e===St;return i(t.dataTypes[0])||!o["*"]&&i("*")}function H(e,t){var r,n,i=ie.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);n&&ie.extend(!0,e,n);return e}function V(e,t,r){for(var n,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];){l.shift();void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"))}if(n)for(i in s)if(s[i]&&s[i].test(n)){l.unshift(i);break}if(l[0]in r)o=l[0];else{for(i in r){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o){o!==l[0]&&l.unshift(o);return r[o]}}function B(e,t,r,n){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();for(;o;){e.responseFields[o]&&(r[e.responseFields[o]]=t);!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType));l=o;o=c.shift();if(o)if("*"===o)o=l;else if("*"!==l&&l!==o){a=u[l+" "+o]||u["* "+o];if(!a)for(i in u){s=i.split(" ");if(s[1]===o){a=u[l+" "+s[0]]||u["* "+s[0]];if(a){if(!0===a)a=u[i];else if(!0!==u[i]){o=s[0];c.unshift(s[1])}break}}}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}}return{state:"success",data:t}}function z(e,t,r,n){var i;if(ie.isArray(t))ie.each(t,function(t,i){r||Et.test(e)?n(e,i):z(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,n)});else if(r||"object"!==ie.type(t))n(e,t);else for(i in t)z(e+"["+i+"]",t[i],r,n)}function K(e){return ie.isWindow(e)?e:9===e.nodeType&&e.defaultView}
6var $=[],G=e.document,J=$.slice,Q=$.concat,X=$.push,Z=$.indexOf,ee={},te=ee.toString,re=ee.hasOwnProperty,ne={},ie=function(e,t){return new ie.fn.init(e,t)},oe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,se=/-([\da-z])/gi,le=function(e,t){return t.toUpperCase()};ie.fn=ie.prototype={jquery:"2.2.3",constructor:ie,selector:"",length:0,toArray:function(){return J.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:J.call(this)},pushStack:function(e){var t=ie.merge(this.constructor(),e);t.prevObject=this;t.context=this.context;return t},each:function(e){return ie.each(this,e)},map:function(e){return this.pushStack(ie.map(this,function(t,r){return e.call(t,r,t)}))},slice:function(){return this.pushStack(J.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,r=+e+(e<0?t:0);return this.pushStack(r>=0&&r<t?[this[r]]:[])},end:function(){return this.prevObject||this.constructor()},push:X,sort:$.sort,splice:$.splice};ie.extend=ie.fn.extend=function(){var e,t,r,n,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;if("boolean"==typeof a){u=a;a=arguments[s]||{};s++}
6"object"==typeof a||ie.isFunction(a)||(a={});if(s===l){a=this;s--}for(;s<l;s++)if(null!=(e=arguments[s]))for(t in e){r=a[t];n=e[t];if(a!==n)if(u&&n&&(ie.isPlainObject(n)||(i=ie.isArray(n)))){if(i){i=!1;o=r&&ie.isArray(r)?r:[]}else o=r&&ie.isPlainObject(r)?r:{};a[t]=ie.extend(u,o,n)}else void 0!==n&&(a[t]=n)}return a};ie.extend({expando:"jQuery"+("2.2.3"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ie.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!ie.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==ie.type(e)||e.nodeType||ie.isWindow(e))return!1;if(e.constructor&&!re.call(e,"constructor")&&!re.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||re.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ee[te.call(e)]||"object":typeof e},globalEval:function(e){var t,r=eval;e=ie.trim(e);if(e)if(1===e.indexOf("use strict")){t=G.createElement("script");t.text=e;G.head.appendChild(t).parentNode.removeChild(t)}else r(e)},camelCase:function(e){return e.replace(ae,"ms-").replace(se,le)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(r(e)){n=e.length;for(;i<n&&!1!==t.call(e[i],i,e[i]);i++);}else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(oe,"")},makeArray:function(e,t){var n=t||[];null!=e&&(r(Object(e))?ie.merge(n,"string"==typeof e?[e]:e):X.call(n,e));return n},inArray:function(e,t,r){return null==t?-1:Z.call(t,e,r)},merge:function(e,t){for(var r=+t.length,n=0,i=e.length;n<r;n++)e[i++]=t[n];e.length=i;return e},grep:function(e,t,r){for(var n,i=[],o=0,a=e.length,s=!r;o<a;o++){n=!t(e[o],o);n!==s&&i.push(e[o])}return i},map:function(e,t,n){var i,o,a=0,s=[];if(r(e)){i=e.length;for(;a<i;a++){o=t(e[a],a,n);null!=o&&s.push(o)}}else for(a in e){o=t(e[a],a,n);null!=o&&s.push(o)}return Q.apply([],s)},guid:1,proxy:function(e,t){var r,n,i;if("string"==typeof t){r=e[t];t=e;e=r}if(ie.isFunction(e)){n=J.call(arguments,2);i=function(){return e.apply(t||this,n.concat(J.call(arguments)))};i.guid=e.guid=e.guid||ie.guid++;return i}},now:Date.now,support:ne});"function"==typeof Symbol&&(ie.fn[Symbol.iterator]=$[Symbol.iterator]);ie.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ee["[object "+t+"]"]=t.toLowerCase()});var ue=function(e){function t(e,t,r,n){var i,o,a,s,u,d,p,f,h=t&&t.ownerDocument,m=t?t.nodeType:9;r=r||[];if("string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return r;if(!n){(t?t.ownerDocument||t:N)!==O&&P(t);t=t||O;if(D){if(11!==m&&(d=me.exec(e)))if(i=d[1]){if(9===m){if(!(a=t.getElementById(i)))return r;if(a.id===i){r.push(a);return r}}else if(h&&(a=h.getElementById(i))&&R(t,a)&&a.id===i){r.push(a);return r}}else{if(d[2]){J.apply(r,t.getElementsByTagName(e));return r}if((i=d[3])&&_.getElementsByClassName&&t.getElementsByClassName){J.apply(r,t.getElementsByClassName(i));return r}}if(_.qsa&&!H[e+" "]&&(!C||!C.test(e))){if(1!==m){h=t;f=e}else if("object"!==t.nodeName.toLowerCase()){(s=t.getAttribute("id"))?s=s.replace(ge,"\\$&"):t.setAttribute("id",s=Y);p=M(e);o=p.length;u=ce.test(s)?"#"+s:"[id='"+s+"']";for(;o--;)p[o]=u+" "+c(p[o]);f=p.join(",");h=ye.test(e)&&l(t.parentNode)||t}if(f)try{J.apply(r,h.querySelectorAll(f));return r}catch(e){}finally{s===Y&&t.removeAttribute("id")}}}}return k(e.replace(oe,"$1"),t,r,n)}function r(){function e(r,n){t.push(r+" ")>b.cacheLength&&delete e[t.shift()];return e[r+" "]=n}var t=[];return e}function n(e){e[Y]=!0;return e}function i(e){var t=O.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function o(e,t){for(var r=e.split("|"),n=r.length;n--;)b.attrHandle[r[n]]=t}function a(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||B)-(~e.sourceIndex||B);if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function s(e){return n(function(t){t=+t;return n(function(r,n){for(var i,o=e([],r.length,t),a=o.length;a--;)r[i=o[a]]&&(r[i]=!(n[i]=r[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function c(e){for(var t=0,r=e.length,n="";t<r;t++)n+=e[t].value;return n}function d(e,t,r){var n=t.dir,i=r&&"parentNode"===n,o=W++;return t.first?function(t,r,o){for(;t=t[n];)if(1===t.nodeType||i)return e(t,r,o)}:function(t,r,a){var s,l,u,c=[F,o];if(a){for(;t=t[n];)if((1===t.nodeType||i)&&e(t,r,a))return!0}else for(;t=t[n];)if(1===t.nodeType||i){u=t[Y]||(t[Y]={});l=u[t.uniqueID]||(u[t.uniqueID]={});if((s=l[n])&&s[0]===F&&s[1]===o)return c[2]=s[2];l[n]=c;if(c[2]=e(t,r,a))return!0}}}function p(e){return e.length>1?function(t,r,n){for(var i=e.length;i--;)if(!e[i](t,r,n))return!1;return!0}:e[0]}function f(e,r,n){for(var i=0,o=r.length;i<o;i++)t(e,r[i],n);return n}function h(e,t,r,n,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)if((o=e[s])&&(!r||r(o,n,i))){a.push(o);u&&t.push(s)}return a}function m(e,t,r,i,o,a){i&&!i[Y]&&(i=m(i));o&&!o[Y]&&(o=m(o,a));return n(function(n,a,s,l){var u,c,d,p=[],m=[],y=a.length,g=n||f(t||"*",s.nodeType?[s]:s,[]),v=!e||!n&&t?g:h(g,p,e,s,l),_=r?o||(n?e:y||i)?[]:a:v;r&&r(v,_,s,l);
6if(i){u=h(_,m);i(u,[],s,l);c=u.length;for(;c--;)(d=u[c])&&(_[m[c]]=!(v[m[c]]=d))}if(n){if(o||e){if(o){u=[];c=_.length;for(;c--;)(d=_[c])&&u.push(v[c]=d);o(null,_=[],u,l)}c=_.length;for(;c--;)(d=_[c])&&(u=o?X(n,d):p[c])>-1&&(n[u]=!(a[u]=d))}}else{_=h(_===a?_.splice(y,_.length):_);o?o(null,a,_,l):J.apply(a,_)}})}function y(e){for(var t,r,n,i=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,l=d(function(e){return e===t},a,!0),u=d(function(e){return X(t,e)>-1},a,!0),f=[function(e,r,n){var i=!o&&(n||r!==T)||((t=r).nodeType?l(e,r,n):u(e,r,n));t=null;return i}];s<i;s++)if(r=b.relative[e[s].type])f=[d(p(f),r)];else{r=b.filter[e[s].type].apply(null,e[s].matches);if(r[Y]){n=++s;for(;n<i&&!b.relative[e[n].type];n++);return m(s>1&&p(f),s>1&&c(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),r,s<n&&y(e.slice(s,n)),n<i&&y(e=e.slice(n)),n<i&&c(e))}f.push(r)}return p(f)}function g(e,r){var i=r.length>0,o=e.length>0,a=function(n,a,s,l,u){var c,d,p,f=0,m="0",y=n&&[],g=[],v=T,_=n||o&&b.find.TAG("*",u),w=F+=null==v?1:Math.random()||.1,x=_.length;u&&(T=a===O||a||u);for(;m!==x&&null!=(c=_[m]);m++){if(o&&c){d=0;if(!a&&c.ownerDocument!==O){P(c);s=!D}for(;p=e[d++];)if(p(c,a||O,s)){l.push(c);break}u&&(F=w)}if(i){(c=!p&&c)&&f--;n&&y.push(c)}}f+=m;if(i&&m!==f){d=0;for(;p=r[d++];)p(y,g,a,s);if(n){if(f>0)for(;m--;)y[m]||g[m]||(g[m]=$.call(l));g=h(g)}J.apply(l,g);u&&!n&&g.length>0&&f+r.length>1&&t.uniqueSort(l)}if(u){F=w;T=v}return y};return i?n(a):a}var v,_,b,w,x,M,S,k,T,A,E,P,O,j,D,C,L,I,R,Y="sizzle"+1*new Date,N=e.document,F=0,W=0,U=r(),q=r(),H=r(),V=function(e,t){e===t&&(E=!0);return 0},B=1<<31,z={}.hasOwnProperty,K=[],$=K.pop,G=K.push,J=K.push,Q=K.slice,X=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",ne=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ue=new RegExp(ne),ce=new RegExp("^"+te+"$"),de={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ne),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,ge=/'|\\/g,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),_e=function(e,t,r){var n="0x"+t-65536;return n!==n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},be=function(){P()};try{J.apply(K=Q.call(N.childNodes),N.childNodes);K[N.childNodes.length].nodeType}catch(e){J={apply:K.length?function(e,t){G.apply(e,Q.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}_=t.support={};x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName};P=t.setDocument=function(e){var t,r,n=e?e.ownerDocument||e:N;if(n===O||9!==n.nodeType||!n.documentElement)return O;O=n;j=O.documentElement;D=!x(O);(r=O.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",be,!1):r.attachEvent&&r.attachEvent("onunload",be));_.attributes=i(function(e){e.className="i";return!e.getAttribute("className")});_.getElementsByTagName=i(function(e){e.appendChild(O.createComment(""));return!e.getElementsByTagName("*").length});_.getElementsByClassName=he.test(O.getElementsByClassName);_.getById=i(function(e){j.appendChild(e).id=Y;return!O.getElementsByName||!O.getElementsByName(Y).length});if(_.getById){b.find.ID=function(e,t){if(void 0!==t.getElementById&&D){var r=t.getElementById(e);return r?[r]:[]}};b.filter.ID=function(e){var t=e.replace(ve,_e);return function(e){return e.getAttribute("id")===t}}}else{delete b.find.ID;b.filter.ID=function(e){var t=e.replace(ve,_e);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}}}b.find.TAG=_.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,n=[],i=0,o=t.getElementsByTagName(e);
6if("*"===e){for(;r=o[i++];)1===r.nodeType&&n.push(r);return n}return o};b.find.CLASS=_.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&D)return t.getElementsByClassName(e)};L=[];C=[];if(_.qsa=he.test(O.querySelectorAll)){i(function(e){j.appendChild(e).innerHTML="<a id='"+Y+"'></a><select id='"+Y+"-\r\\' msallowcapture=''><option selected=''></option></select>";e.querySelectorAll("[msallowcapture^='']").length&&C.push("[*^$]="+ee+"*(?:''|\"\")");e.querySelectorAll("[selected]").length||C.push("\\["+ee+"*(?:value|"+Z+")");e.querySelectorAll("[id~="+Y+"-]").length||C.push("~=");e.querySelectorAll(":checked").length||C.push(":checked");e.querySelectorAll("a#"+Y+"+*").length||C.push(".#.+[+~]")});i(function(e){var t=O.createElement("input");t.setAttribute("type","hidden");e.appendChild(t).setAttribute("name","D");e.querySelectorAll("[name=d]").length&&C.push("name"+ee+"*[*^$|!~]?=");e.querySelectorAll(":enabled").length||C.push(":enabled",":disabled");e.querySelectorAll("*,:x");C.push(",.*:")})}(_.matchesSelector=he.test(I=j.matches||j.webkitMatchesSelector||j.mozMatchesSelector||j.oMatchesSelector||j.msMatchesSelector))&&i(function(e){_.disconnectedMatch=I.call(e,"div");I.call(e,"[s!='']:x");L.push("!=",ne)});C=C.length&&new RegExp(C.join("|"));L=L.length&&new RegExp(L.join("|"));t=he.test(j.compareDocumentPosition);R=t||he.test(j.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1};V=t?function(e,t){if(e===t){E=!0;return 0}var r=!e.compareDocumentPosition-!t.compareDocumentPosition;if(r)return r;r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1;return 1&r||!_.sortDetached&&t.compareDocumentPosition(e)===r?e===O||e.ownerDocument===N&&R(N,e)?-1:t===O||t.ownerDocument===N&&R(N,t)?1:A?X(A,e)-X(A,t):0:4&r?-1:1}:function(e,t){if(e===t){E=!0;return 0}var r,n=0,i=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!i||!o)return e===O?-1:t===O?1:i?-1:o?1:A?X(A,e)-X(A,t):0;if(i===o)return a(e,t);r=e;for(;r=r.parentNode;)s.unshift(r);r=t;for(;r=r.parentNode;)l.unshift(r);for(;s[n]===l[n];)n++;return n?a(s[n],l[n]):s[n]===N?-1:l[n]===N?1:0};return O};t.matches=function(e,r){return t(e,null,null,r)};t.matchesSelector=function(e,r){(e.ownerDocument||e)!==O&&P(e);r=r.replace(le,"='$1']");if(_.matchesSelector&&D&&!H[r+" "]&&(!L||!L.test(r))&&(!C||!C.test(r)))try{var n=I.call(e,r);if(n||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return t(r,O,null,[e]).length>0};t.contains=function(e,t){(e.ownerDocument||e)!==O&&P(e);return R(e,t)};t.attr=function(e,t){(e.ownerDocument||e)!==O&&P(e);var r=b.attrHandle[t.toLowerCase()],n=r&&z.call(b.attrHandle,t.toLowerCase())?r(e,t,!D):void 0;return void 0!==n?n:_.attributes||!D?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null};t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};t.uniqueSort=function(e){var t,r=[],n=0,i=0;E=!_.detectDuplicates;A=!_.sortStable&&e.slice(0);e.sort(V);if(E){for(;t=e[i++];)t===e[i]&&(n=r.push(i));for(;n--;)e.splice(r[n],1)}A=null;return e};w=t.getText=function(e){var t,r="",n=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=w(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[n++];)r+=w(t);return r};b=t.selectors={cacheLength:50,createPseudo:n,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(ve,_e);e[3]=(e[3]||e[4]||e[5]||"").replace(ve,_e);"~="===e[2]&&(e[3]=" "+e[3]+" ");return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if("nth"===e[1].slice(0,3)){e[3]||t.error(e[0]);e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3]));e[5]=+(e[7]+e[8]||"odd"===e[3])}else e[3]&&t.error(e[0]);return e},PSEUDO:function(e){var t,r=!e[6]&&e[2];if(de.CHILD.test(e[0]))return null;if(e[3])e[2]=e[4]||e[5]||"";else if(r&&ue.test(r)&&(t=M(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)){e[0]=e[0].slice(0,t);e[2]=r.slice(0,t)}return e.slice(0,3)}},filter:{TAG:function(e){var t=e.replace(ve,_e).toLowerCase();return"*"===e?function(){return!0}
6:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,r,n){return function(i){var o=t.attr(i,e);if(null==o)return"!="===r;if(!r)return!0;o+="";return"="===r?o===n:"!="===r?o!==n:"^="===r?n&&0===o.indexOf(n):"*="===r?n&&o.indexOf(n)>-1:"$="===r?n&&o.slice(-n.length)===n:"~="===r?(" "+o.replace(ie," ")+" ").indexOf(n)>-1:"|="===r&&(o===n||o.slice(0,n.length+1)===n+"-")}},CHILD:function(e,t,r,n,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===n&&0===i?function(e){return!!e.parentNode}:function(t,r,l){var u,c,d,p,f,h,m=o!==a?"nextSibling":"previousSibling",y=t.parentNode,g=s&&t.nodeName.toLowerCase(),v=!l&&!s,_=!1;if(y){if(o){for(;m;){p=t;for(;p=p[m];)if(s?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}h=[a?y.firstChild:y.lastChild];if(a&&v){p=y;d=p[Y]||(p[Y]={});c=d[p.uniqueID]||(d[p.uniqueID]={});u=c[e]||[];f=u[0]===F&&u[1];_=f&&u[2];p=f&&y.childNodes[f];for(;p=++f&&p&&p[m]||(_=f=0)||h.pop();)if(1===p.nodeType&&++_&&p===t){c[e]=[F,f,_];break}}else{if(v){p=t;d=p[Y]||(p[Y]={});c=d[p.uniqueID]||(d[p.uniqueID]={});u=c[e]||[];f=u[0]===F&&u[1];_=f}if(!1===_)for(;p=++f&&p&&p[m]||(_=f=0)||h.pop();)if((s?p.nodeName.toLowerCase()===g:1===p.nodeType)&&++_){if(v){d=p[Y]||(p[Y]={});c=d[p.uniqueID]||(d[p.uniqueID]={});c[e]=[F,_]}if(p===t)break}}_-=i;return _===n||_%n==0&&_/n>=0}}},PSEUDO:function(e,r){var i,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);if(o[Y])return o(r);if(o.length>1){i=[e,e,"",r];return b.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,i=o(e,r),a=i.length;a--;){n=X(e,i[a]);e[n]=!(t[n]=i[a])}}):function(e){return o(e,0,i)}}return o}},pseudos:{not:n(function(e){var t=[],r=[],i=S(e.replace(oe,"$1"));return i[Y]?n(function(e,t,r,n){for(var o,a=i(e,null,n,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,n,o){t[0]=e;i(t,null,o,r);t[0]=null;return!r.pop()}}),has:n(function(e){return function(r){return t(e,r).length>0}}),contains:n(function(e){e=e.replace(ve,_e);return function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:n(function(e){ce.test(e||"")||t.error("unsupported lang: "+e);e=e.replace(ve,_e).toLowerCase();return function(t){var r;do{if(r=D?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){r=r.toLowerCase();return r===e||0===r.indexOf(e+"-")}}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===j},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){e.parentNode&&e.parentNode.selectedIndex;return!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,r){return[r<0?r+t:r]}),even:s(function(e,t){for(var r=0;r<t;r+=2)e.push(r);return e}),odd:s(function(e,t){for(var r=1;r<t;r+=2)e.push(r);return e}),lt:s(function(e,t,r){for(var n=r<0?r+t:r;--n>=0;)e.push(n);return e}),gt:s(function(e,t,r){for(var n=r<0?r+t:r;++n<t;)e.push(n);return e})}};b.pseudos.nth=b.pseudos.eq;for(v in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[v]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(v);for(v in{submit:!0,reset:!0}
6)b.pseudos[v]=function(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}(v);u.prototype=b.filters=b.pseudos;b.setFilters=new u;M=t.tokenize=function(e,r){var n,i,o,a,s,l,u,c=q[e+" "];if(c)return r?0:c.slice(0);s=e;l=[];u=b.preFilter;for(;s;){if(!n||(i=ae.exec(s))){i&&(s=s.slice(i[0].length)||s);l.push(o=[])}n=!1;if(i=se.exec(s)){n=i.shift();o.push({value:n,type:i[0].replace(oe," ")});s=s.slice(n.length)}for(a in b.filter)if((i=de[a].exec(s))&&(!u[a]||(i=u[a](i)))){n=i.shift();o.push({value:n,type:a,matches:i});s=s.slice(n.length)}if(!n)break}return r?s.length:s?t.error(e):q(e,l).slice(0)};S=t.compile=function(e,t){var r,n=[],i=[],o=H[e+" "];if(!o){t||(t=M(e));r=t.length;for(;r--;){o=y(t[r]);o[Y]?n.push(o):i.push(o)}o=H(e,g(i,n));o.selector=e}return o};k=t.select=function(e,t,r,n){var i,o,a,s,u,d="function"==typeof e&&e,p=!n&&M(e=d.selector||e);r=r||[];if(1===p.length){o=p[0]=p[0].slice(0);if(o.length>2&&"ID"===(a=o[0]).type&&_.getById&&9===t.nodeType&&D&&b.relative[o[1].type]){t=(b.find.ID(a.matches[0].replace(ve,_e),t)||[])[0];if(!t)return r;d&&(t=t.parentNode);e=e.slice(o.shift().value.length)}i=de.needsContext.test(e)?0:o.length;for(;i--;){a=o[i];if(b.relative[s=a.type])break;if((u=b.find[s])&&(n=u(a.matches[0].replace(ve,_e),ye.test(o[0].type)&&l(t.parentNode)||t))){o.splice(i,1);e=n.length&&c(o);if(!e){J.apply(r,n);return r}break}}}(d||S(e,p))(n,t,!D,r,!t||ye.test(e)&&l(t.parentNode)||t);return r};_.sortStable=Y.split("").sort(V).join("")===Y;_.detectDuplicates=!!E;P();_.sortDetached=i(function(e){return 1&e.compareDocumentPosition(O.createElement("div"))});i(function(e){e.innerHTML="<a href='#'></a>";return"#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)});_.attributes&&i(function(e){e.innerHTML="<input/>";e.firstChild.setAttribute("value","");return""===e.firstChild.getAttribute("value")})||o("value",function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue});i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,r){var n;if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null});return t}(e);ie.find=ue;ie.expr=ue.selectors;ie.expr[":"]=ie.expr.pseudos;ie.uniqueSort=ie.unique=ue.uniqueSort;ie.text=ue.getText;ie.isXMLDoc=ue.isXML;ie.contains=ue.contains;var ce=function(e,t,r){for(var n=[],i=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ie(e).is(r))break;n.push(e)}return n},de=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r},pe=ie.expr.match.needsContext,fe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,he=/^.[^:#\[\.,]*$/;ie.filter=function(e,t,r){var n=t[0];r&&(e=":not("+e+")");return 1===t.length&&1===n.nodeType?ie.find.matchesSelector(n,e)?[n]:[]:ie.find.matches(e,ie.grep(t,function(e){return 1===e.nodeType}))};ie.fn.extend({find:function(e){var t,r=this.length,n=[],i=this;if("string"!=typeof e)return this.pushStack(ie(e).filter(function(){for(t=0;t<r;t++)if(ie.contains(i[t],this))return!0}));for(t=0;t<r;t++)ie.find(e,i[t],n);n=this.pushStack(r>1?ie.unique(n):n);n.selector=this.selector?this.selector+" "+e:e;return n},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&pe.test(e)?ie(e):e||[],!1).length}});var me,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(ie.fn.init=function(e,t,r){var n,i;if(!e)return this;r=r||me;if("string"==typeof e){n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e);if(!n||!n[1]&&t)return!t||t.jquery?(t||r).find(e):this.constructor(t).find(e);if(n[1]){t=t instanceof ie?t[0]:t;ie.merge(this,ie.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:G,!0));if(fe.test(n[1])&&ie.isPlainObject(t))for(n in t)ie.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}i=G.getElementById(n[2]);if(i&&i.parentNode){this.length=1;this[0]=i}this.context=G;this.selector=e;return this}if(e.nodeType){this.context=this[0]=e;this.length=1;return this}if(ie.isFunction(e))return void 0!==r.ready?r.ready(e):e(ie);if(void 0!==e.selector){this.selector=e.selector;this.context=e.context}return ie.makeArray(e,this)}).prototype=ie.fn;me=ie(G);var ge=/^(?:parents|prev(?:Until|All))/,ve={children:!0,contents:!0,next:!0,prev:!0};ie.fn.extend({has:function(e){var t=ie(e,this),r=t.length;return this.filter(function(){for(var e=0;e<r;e++)if(ie.contains(this,t[e]))return!0})},closest:function(e,t){for(var r,n=0,i=this.length,o=[],a=pe.test(e)||"string"!=typeof e?ie(e,t||this.context):0;n<i;n++)for(r=this[n];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(a?a.index(r)>-1:1===r.nodeType&&ie.find.matchesSelector(r,e))){o.push(r);break}return this.pushStack(o.length>1?ie.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?Z.call(ie(e),this[0]):Z.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ie.uniqueSort(ie.merge(this.get(),ie(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});ie.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ce(e,"parentNode")},parentsUntil:function(e,t,r){return ce(e,"parentNode",r)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ce(e,"nextSibling")},prevAll:function(e){return ce(e,"previousSibling")},nextUntil:function(e,t,r){return ce(e,"nextSibling",r)},prevUntil:function(e,t,r){return ce(e,"previousSibling",r)},siblings:function(e){return de((e.parentNode||{}).firstChild,e)},children:function(e){return de(e.firstChild)},contents:function(e){return e.contentDocument||ie.merge([],e.childNodes)}},function(e,t){ie.fn[e]=function(r,n){var i=ie.map(this,t,r);"Until"!==e.slice(-5)&&(n=r);n&&"string"==typeof n&&(i=ie.filter(n,i));if(this.length>1){ve[e]||ie.uniqueSort(i);ge.test(e)&&i.reverse()}return this.pushStack(i)}});var _e=/\S+/g;ie.Callbacks=function(e){e="string"==typeof e?o(e):ie.extend({},e);var t,r,n,i,a=[],s=[],l=-1,u=function(){i=e.once;n=t=!0;for(;s.length;l=-1){r=s.shift();for(;++l<a.length;)if(!1===a[l].apply(r[0],r[1])&&e.stopOnFalse){l=a.length;r=!1}}e.memory||(r=!1);t=!1;i&&(a=r?[]:"")},c={add:function(){if(a){if(r&&!t){l=a.length-1;s.push(r)}!function t(r){ie.each(r,function(r,n){ie.isFunction(n)?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==ie.type(n)&&t(n)})}(arguments);r&&!t&&u()}return this},remove:function(){ie.each(arguments,function(e,t){for(var r;(r=ie.inArray(t,a,r))>-1;){a.splice(r,1);r<=l&&l--}});return this},has:function(e){return e?ie.inArray(e,a)>-1:a.length>0},empty:function(){a&&(a=[]);return this},disable:function(){i=s=[];a=r="";return this},disabled:function(){return!a},lock:function(){i=s=[];r||(a=r="");return this},locked:function(){return!!i},fireWith:function(e,r){if(!i){r=r||[];r=[e,r.slice?r.slice():r];s.push(r);t||u()}return this},fire:function(){c.fireWith(this,arguments);return this},fired:function(){return!!n}};return c};ie.extend({Deferred:function(e){var t=[["resolve","done",ie.Callbacks("once memory"),"resolved"],["reject","fail",ie.Callbacks("once memory"),"rejected"],["notify","progress",ie.Callbacks("memory")]],r="pending",n={state:function(){return r},always:function(){i.done(arguments).fail(arguments);return this},then:function(){var e=arguments;return ie.Deferred(function(r){ie.each(t,function(t,o){var a=ie.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&ie.isFunction(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[o[0]+"With"](this===n?r.promise():this,a?[e]:arguments)})});e=null}).promise()},promise:function(e){return null!=e?ie.extend(e,n):n}},i={};n.pipe=n.then;ie.each(t,function(e,o){var a=o[2],s=o[3];n[o[1]]=a.add;s&&a.add(function(){r=s},t[1^e][2].disable,t[2][2].lock);i[o[0]]=function(){i[o[0]+"With"](this===i?n:this,arguments);return this};i[o[0]+"With"]=a.fireWith});n.promise(i);e&&e.call(i,i);return i},when:function(e){var t,r,n,i=0,o=J.call(arguments),a=o.length,s=1!==a||e&&ie.isFunction(e.promise)?a:0,l=1===s?e:ie.Deferred(),u=function(e,r,n){return function(i){r[e]=this;
6n[e]=arguments.length>1?J.call(arguments):i;n===t?l.notifyWith(r,n):--s||l.resolveWith(r,n)}};if(a>1){t=new Array(a);r=new Array(a);n=new Array(a);for(;i<a;i++)o[i]&&ie.isFunction(o[i].promise)?o[i].promise().progress(u(i,r,t)).done(u(i,n,o)).fail(l.reject):--s}s||l.resolveWith(n,o);return l.promise()}});var be;ie.fn.ready=function(e){ie.ready.promise().done(e);return this};ie.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ie.readyWait++:ie.ready(!0)},ready:function(e){if(!0===e?!--ie.readyWait:!ie.isReady){ie.isReady=!0;if(!(!0!==e&&--ie.readyWait>0)){be.resolveWith(G,[ie]);if(ie.fn.triggerHandler){ie(G).triggerHandler("ready");ie(G).off("ready")}}}}});ie.ready.promise=function(t){if(!be){be=ie.Deferred();if("complete"===G.readyState||"loading"!==G.readyState&&!G.documentElement.doScroll)e.setTimeout(ie.ready);else{G.addEventListener("DOMContentLoaded",a);e.addEventListener("load",a)}}return be.promise(t)};ie.ready.promise();var we=function(e,t,r,n,i,o,a){var s=0,l=e.length,u=null==r;if("object"===ie.type(r)){i=!0;for(s in r)we(e,t,s,r[s],!0,o,a)}else if(void 0!==n){i=!0;ie.isFunction(n)||(a=!0);if(u)if(a){t.call(e,n);t=null}else{u=t;t=function(e,t,r){return u.call(ie(e),r)}}if(t)for(;s<l;s++)t(e[s],r,a?n:n.call(e[s],s,t(e[s],r)))}return i?e:u?t.call(e):l?t(e[0],r):o},xe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};s.uid=1;s.prototype={register:function(e,t){var r=t||{}
7;e.nodeType?e[this.expando]=r:Object.defineProperty(e,this.expando,{value:r,writable:!0,configurable:!0});return e[this.expando]},cache:function(e){if(!xe(e))return{};var t=e[this.expando];if(!t){t={};xe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))}return t},set:function(e,t,r){var n,i=this.cache(e);if("string"==typeof t)i[t]=r;else for(n in t)i[n]=t[n];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,r){var n;if(void 0===t||t&&"string"==typeof t&&void 0===r){n=this.get(e,t);return void 0!==n?n:this.get(e,ie.camelCase(t))}this.set(e,t,r);return void 0!==r?r:t},remove:function(e,t){var r,n,i,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{if(ie.isArray(t))n=t.concat(t.map(ie.camelCase));else{i=ie.camelCase(t);if(t in o)n=[t,i];else{n=i;n=n in o?[n]:n.match(_e)||[]}}r=n.length;for(;r--;)delete o[n[r]]}(void 0===t||ie.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ie.isEmptyObject(t)}};var Me=new s,Se=new s,ke=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Te=/[A-Z]/g;ie.extend({hasData:function(e){return Se.hasData(e)||Me.hasData(e)},data:function(e,t,r){return Se.access(e,t,r)},removeData:function(e,t){Se.remove(e,t)},_data:function(e,t,r){return Me.access(e,t,r)},_removeData:function(e,t){Me.remove(e,t)}});ie.fn.extend({data:function(e,t){var r,n,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length){i=Se.get(o);if(1===o.nodeType&&!Me.get(o,"hasDataAttrs")){r=a.length;for(;r--;)if(a[r]){n=a[r].name;if(0===n.indexOf("data-")){n=ie.camelCase(n.slice(5));l(o,n,i[n])}}Me.set(o,"hasDataAttrs",!0)}}return i}return"object"==typeof e?this.each(function(){Se.set(this,e)}):we(this,function(t){var r,n;if(o&&void 0===t){r=Se.get(o,e)||Se.get(o,e.replace(Te,"-$&").toLowerCase());if(void 0!==r)return r;n=ie.camelCase(e);r=Se.get(o,n);if(void 0!==r)return r;r=l(o,n,void 0);if(void 0!==r)return r}else{n=ie.camelCase(e);this.each(function(){var r=Se.get(this,n);Se.set(this,n,t);e.indexOf("-")>-1&&void 0!==r&&Se.set(this,e,t)})}},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Se.remove(this,e)})}});ie.extend({queue:function(e,t,r){var n;if(e){t=(t||"fx")+"queue";n=Me.get(e,t);r&&(!n||ie.isArray(r)?n=Me.access(e,t,ie.makeArray(r)):n.push(r));return n||[]}},dequeue:function(e,t){t=t||"fx";var r=ie.queue(e,t),n=r.length,i=r.shift(),o=ie._queueHooks(e,t),a=function(){ie.dequeue(e,t)};if("inprogress"===i){i=r.shift();n--}if(i){"fx"===t&&r.unshift("inprogress");delete o.stop;i.call(e,a,o)}!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return Me.get(e,r)||Me.access(e,r,{empty:ie.Callbacks("once memory").add(function(){Me.remove(e,[t+"queue",r])})})}});ie.fn.extend({queue:function(e,t){var r=2;if("string"!=typeof e){t=e;e="fx";r--}return arguments.length<r?ie.queue(this[0],e):void 0===t?this:this.each(function(){var r=ie.queue(this,e,t);ie._queueHooks(this,e);"fx"===e&&"inprogress"!==r[0]&&ie.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ie.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,n=1,i=ie.Deferred(),o=this,a=this.length,s=function(){--n||i.resolveWith(o,[o])};if("string"!=typeof e){t=e;e=void 0}e=e||"fx";
7for(;a--;){r=Me.get(o[a],e+"queueHooks");if(r&&r.empty){n++;r.empty.add(s)}}s();return i.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ee=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),Pe=["Top","Right","Bottom","Left"],Oe=function(e,t){e=t||e;return"none"===ie.css(e,"display")||!ie.contains(e.ownerDocument,e)},je=/^(?:checkbox|radio)$/i,De=/<([\w:-]+)/,Ce=/^$|\/(?:java|ecma)script/i,Le={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Le.optgroup=Le.option;Le.tbody=Le.tfoot=Le.colgroup=Le.caption=Le.thead;Le.th=Le.td;var Ie=/<|&#?\w+;/;!function(){var e=G.createDocumentFragment(),t=e.appendChild(G.createElement("div")),r=G.createElement("input");r.setAttribute("type","radio");r.setAttribute("checked","checked");r.setAttribute("name","t");t.appendChild(r);ne.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked;t.innerHTML="<textarea>x</textarea>";ne.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Re=/^key/,Ye=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ne=/^([^.]*)(?:\.(.+)|)/;ie.event={global:{},add:function(e,t,r,n,i){var o,a,s,l,u,c,d,p,f,h,m,y=Me.get(e);if(y){if(r.handler){o=r;r=o.handler;i=o.selector}r.guid||(r.guid=ie.guid++);(l=y.events)||(l=y.events={});(a=y.handle)||(a=y.handle=function(t){return void 0!==ie&&ie.event.triggered!==t.type?ie.event.dispatch.apply(e,arguments):void 0});t=(t||"").match(_e)||[""];u=t.length;for(;u--;){s=Ne.exec(t[u])||[];f=m=s[1];h=(s[2]||"").split(".").sort();if(f){d=ie.event.special[f]||{};f=(i?d.delegateType:d.bindType)||f;d=ie.event.special[f]||{};c=ie.extend({type:f,origType:m,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&ie.expr.match.needsContext.test(i),namespace:h.join(".")},o);if(!(p=l[f])){p=l[f]=[];p.delegateCount=0;d.setup&&!1!==d.setup.call(e,n,h,a)||e.addEventListener&&e.addEventListener(f,a)}if(d.add){d.add.call(e,c);c.handler.guid||(c.handler.guid=r.guid)}i?p.splice(p.delegateCount++,0,c):p.push(c);ie.event.global[f]=!0}}}},remove:function(e,t,r,n,i){var o,a,s,l,u,c,d,p,f,h,m,y=Me.hasData(e)&&Me.get(e);if(y&&(l=y.events)){t=(t||"").match(_e)||[""];u=t.length;for(;u--;){s=Ne.exec(t[u])||[];f=m=s[1];h=(s[2]||"").split(".").sort();if(f){d=ie.event.special[f]||{};f=(n?d.delegateType:d.bindType)||f;p=l[f]||[];s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)");a=o=p.length;for(;o--;){c=p[o];if((i||m===c.origType)&&(!r||r.guid===c.guid)&&(!s||s.test(c.namespace))&&(!n||n===c.selector||"**"===n&&c.selector)){p.splice(o,1);c.selector&&p.delegateCount--;d.remove&&d.remove.call(e,c)}}if(a&&!p.length){d.teardown&&!1!==d.teardown.call(e,h,y.handle)||ie.removeEvent(e,f,y.handle);delete l[f]}}else for(f in l)ie.event.remove(e,f+t[u],r,n,!0)}ie.isEmptyObject(l)&&Me.remove(e,"handle events")}},dispatch:function(e){e=ie.event.fix(e);var t,r,n,i,o,a=[],s=J.call(arguments),l=(Me.get(this,"events")||{})[e.type]||[],u=ie.event.special[e.type]||{};s[0]=e;e.delegateTarget=this;if(!u.preDispatch||!1!==u.preDispatch.call(this,e)){a=ie.event.handlers.call(this,e,l);t=0;for(;(i=a[t++])&&!e.isPropagationStopped();){e.currentTarget=i.elem;r=0;for(;(o=i.handlers[r++])&&!e.isImmediatePropagationStopped();)if(!e.rnamespace||e.rnamespace.test(o.namespace)){e.handleObj=o;e.data=o.data;n=((ie.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s);if(void 0!==n&&!1===(e.result=n)){e.preventDefault();e.stopPropagation()}}}u.postDispatch&&u.postDispatch.call(this,e);return e.result}},handlers:function(e,t){var r,n,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){n=[];for(r=0;r<s;r++){o=t[r];i=o.selector+" ";void 0===n[i]&&(n[i]=o.needsContext?ie(i,this).index(l)>-1:ie.find(i,this,null,[l]).length);n[i]&&n.push(o)}n.length&&a.push({elem:l,handlers:n})}s<t.length&&a.push({elem:this,handlers:t.slice(s)});return a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{}
7,keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode);return e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var r,n,i,o=t.button;if(null==e.pageX&&null!=t.clientX){r=e.target.ownerDocument||G;n=r.documentElement;i=r.body;e.pageX=t.clientX+(n&&n.scrollLeft||i&&i.scrollLeft||0)-(n&&n.clientLeft||i&&i.clientLeft||0);e.pageY=t.clientY+(n&&n.scrollTop||i&&i.scrollTop||0)-(n&&n.clientTop||i&&i.clientTop||0)}e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0);return e}},fix:function(e){if(e[ie.expando])return e;var t,r,n,i=e.type,o=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=Ye.test(i)?this.mouseHooks:Re.test(i)?this.keyHooks:{});n=a.props?this.props.concat(a.props):this.props;e=new ie.Event(o);t=n.length;for(;t--;){r=n[t];e[r]=o[r]}e.target||(e.target=G);3===e.target.nodeType&&(e.target=e.target.parentNode);return a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==m()&&this.focus){this.focus();return!1}},delegateType:"focusin"},blur:{trigger:function(){if(this===m()&&this.blur){this.blur();return!1}},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&ie.nodeName(this,"input")){this.click();return!1}},_default:function(e){return ie.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}};ie.removeEvent=function(e,t,r){e.removeEventListener&&e.removeEventListener(t,r)};ie.Event=function(e,t){if(!(this instanceof ie.Event))return new ie.Event(e,t);if(e&&e.type){this.originalEvent=e;this.type=e.type;this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?f:h}else this.type=e;t&&ie.extend(this,t);this.timeStamp=e&&e.timeStamp||ie.now();this[ie.expando]=!0};ie.Event.prototype={constructor:ie.Event,isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=f;e&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=f;e&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=f;e&&e.stopImmediatePropagation();this.stopPropagation()}};
7ie.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ie.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,n=this,i=e.relatedTarget,o=e.handleObj;if(!i||i!==n&&!ie.contains(n,i)){e.type=o.origType;r=o.handler.apply(this,arguments);e.type=t}return r}}});ie.fn.extend({on:function(e,t,r,n){return y(this,e,t,r,n)},one:function(e,t,r,n){return y(this,e,t,r,n,1)},off:function(e,t,r){var n,i;if(e&&e.preventDefault&&e.handleObj){n=e.handleObj;ie(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler);return this}if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}if(!1===t||"function"==typeof t){r=t;t=void 0}!1===r&&(r=h);return this.each(function(){ie.event.remove(this,e,r,t)})}});var Fe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,We=/<script|<style|<link/i,Ue=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^true\/(.*)/,He=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ie.extend({htmlPrefilter:function(e){return e.replace(Fe,"<$1></$2>")},clone:function(e,t,r){var n,i,o,a,s=e.cloneNode(!0),l=ie.contains(e.ownerDocument,e);if(!(ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ie.isXMLDoc(e))){a=c(s);o=c(e);for(n=0,i=o.length;n<i;n++)w(o[n],a[n])}if(t)if(r){o=o||c(e);a=a||c(s);for(n=0,i=o.length;n<i;n++)b(o[n],a[n])}else b(e,s);a=c(s,"script");a.length>0&&d(a,!l&&c(e,"script"));return s},cleanData:function(e){for(var t,r,n,i=ie.event.special,o=0;void 0!==(r=e[o]);o++)if(xe(r)){if(t=r[Me.expando]){if(t.events)for(n in t.events)i[n]?ie.event.remove(r,n):ie.removeEvent(r,n,t.handle);r[Me.expando]=void 0}r[Se.expando]&&(r[Se.expando]=void 0)}}});ie.fn.extend({domManip:x,detach:function(e){return M(this,e,!0)},remove:function(e){return M(this,e)},text:function(e){return we(this,function(e){return void 0===e?ie.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return x(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){g(this,e).appendChild(e)}})},prepend:function(){return x(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=g(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return x(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return x(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)if(1===e.nodeType){ie.cleanData(c(e,!1));e.textContent=""}return this},clone:function(e,t){e=null!=e&&e;t=null==t?e:t;return this.map(function(){return ie.clone(this,e,t)})},html:function(e){return we(this,function(e){var t=this[0]||{},r=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!We.test(e)&&!Le[(De.exec(e)||["",""])[1].toLowerCase()]){e=ie.htmlPrefilter(e);try{for(;r<n;r++){t=this[r]||{};if(1===t.nodeType){ie.cleanData(c(t,!1));t.innerHTML=e}}t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return x(this,arguments,function(t){var r=this.parentNode;if(ie.inArray(this,e)<0){ie.cleanData(c(this));r&&r.replaceChild(t,this)}},e)}});ie.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ie.fn[e]=function(e){for(var r,n=[],i=ie(e),o=i.length-1,a=0;a<=o;a++){r=a===o?this:this.clone(!0);ie(i[a])[t](r);X.apply(n,r.get())}return this.pushStack(n)}});var Ve,Be={HTML:"block",BODY:"block"},ze=/^margin/,Ke=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),$e=function(t){var r=t.ownerDocument.defaultView;r&&r.opener||(r=e);return r.getComputedStyle(t)},Ge=function(e,t,r,n){var i,o,a={};for(o in t){a[o]=e.style[o];e.style[o]=t[o]}i=r.apply(e,n||[]);for(o in t)e.style[o]=a[o];return i},Je=G.documentElement;!function(){function t(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";s.innerHTML="";Je.appendChild(a);var t=e.getComputedStyle(s);
7r="1%"!==t.top;o="2px"===t.marginLeft;n="4px"===t.width;s.style.marginRight="50%";i="4px"===t.marginRight;Je.removeChild(a)}var r,n,i,o,a=G.createElement("div"),s=G.createElement("div");if(s.style){s.style.backgroundClip="content-box";s.cloneNode(!0).style.backgroundClip="";ne.clearCloneStyle="content-box"===s.style.backgroundClip;a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute";a.appendChild(s);ie.extend(ne,{pixelPosition:function(){t();return r},boxSizingReliable:function(){null==n&&t();return n},pixelMarginRight:function(){null==n&&t();return i},reliableMarginLeft:function(){null==n&&t();return o},reliableMarginRight:function(){var t,r=s.appendChild(G.createElement("div"));r.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0";r.style.marginRight=r.style.width="0";s.style.width="1px";Je.appendChild(a);t=!parseFloat(e.getComputedStyle(r).marginRight);Je.removeChild(a);s.removeChild(r);return t}})}}();var Qe=/^(none|table(?!-c[ea]).+)/,Xe={position:"absolute",visibility:"hidden",display:"block"},Ze={letterSpacing:"0",fontWeight:"400"},et=["Webkit","O","Moz","ms"],tt=G.createElement("div").style;ie.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=T(e,"opacity");return""===r?"1":r}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,r,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=ie.camelCase(t),l=e.style;t=ie.cssProps[s]||(ie.cssProps[s]=E(s)||s);a=ie.cssHooks[t]||ie.cssHooks[s];if(void 0===r)return a&&"get"in a&&void 0!==(i=a.get(e,!1,n))?i:l[t];o=typeof r;if("string"===o&&(i=Ee.exec(r))&&i[1]){r=u(e,t,i);o="number"}if(null!=r&&r===r){"number"===o&&(r+=i&&i[3]||(ie.cssNumber[s]?"":"px"));ne.clearCloneStyle||""!==r||0!==t.indexOf("background")||(l[t]="inherit");a&&"set"in a&&void 0===(r=a.set(e,r,n))||(l[t]=r)}}},css:function(e,t,r,n){var i,o,a,s=ie.camelCase(t);t=ie.cssProps[s]||(ie.cssProps[s]=E(s)||s);a=ie.cssHooks[t]||ie.cssHooks[s];a&&"get"in a&&(i=a.get(e,!0,r));void 0===i&&(i=T(e,t,n));"normal"===i&&t in Ze&&(i=Ze[t]);if(""===r||r){o=parseFloat(i);return!0===r||isFinite(o)?o||0:i}return i}});ie.each(["height","width"],function(e,t){ie.cssHooks[t]={get:function(e,r,n){if(r)return Qe.test(ie.css(e,"display"))&&0===e.offsetWidth?Ge(e,Xe,function(){return j(e,t,n)}):j(e,t,n)},set:function(e,r,n){var i,o=n&&$e(e),a=n&&O(e,t,n,"border-box"===ie.css(e,"boxSizing",!1,o),o);if(a&&(i=Ee.exec(r))&&"px"!==(i[3]||"px")){e.style[t]=r;
7r=ie.css(e,t)}return P(e,r,a)}}});ie.cssHooks.marginLeft=A(ne.reliableMarginLeft,function(e,t){if(t)return(parseFloat(T(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"});ie.cssHooks.marginRight=A(ne.reliableMarginRight,function(e,t){if(t)return Ge(e,{display:"inline-block"},T,[e,"marginRight"])});ie.each({margin:"",padding:"",border:"Width"},function(e,t){ie.cssHooks[e+t]={expand:function(r){for(var n=0,i={},o="string"==typeof r?r.split(" "):[r];n<4;n++)i[e+Pe[n]+t]=o[n]||o[n-2]||o[0];return i}};ze.test(e)||(ie.cssHooks[e+t].set=P)});ie.fn.extend({css:function(e,t){return we(this,function(e,t,r){var n,i,o={},a=0;if(ie.isArray(t)){n=$e(e);i=t.length;for(;a<i;a++)o[t[a]]=ie.css(e,t[a],!1,n);return o}return void 0!==r?ie.style(e,t,r):ie.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Oe(this)?ie(this).show():ie(this).hide()})}});ie.Tween=C;C.prototype={constructor:C,init:function(e,t,r,n,i,o){this.elem=e;this.prop=r;this.easing=i||ie.easing._default;this.options=t;this.start=this.now=this.cur();this.end=n;this.unit=o||(ie.cssNumber[r]?"":"px")},cur:function(){var e=C.propHooks[this.prop];return e&&e.get?e.get(this):C.propHooks._default.get(this)},run:function(e){var t,r=C.propHooks[this.prop];this.options.duration?this.pos=t=ie.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e;this.now=(this.end-this.start)*t+this.start;this.options.step&&this.options.step.call(this.elem,this.now,this);r&&r.set?r.set(this):C.propHooks._default.set(this);return this}};C.prototype.init.prototype=C.prototype;C.propHooks={_default:{get:function(e){var t;if(1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop])return e.elem[e.prop];t=ie.css(e.elem,e.prop,"");return t&&"auto"!==t?t:0},set:function(e){ie.fx.step[e.prop]?ie.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ie.cssProps[e.prop]]&&!ie.cssHooks[e.prop]?e.elem[e.prop]=e.now:ie.style(e.elem,e.prop,e.now+e.unit)}}};C.propHooks.scrollTop=C.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}};ie.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"};ie.fx=C.prototype.init;ie.fx.step={};var rt,nt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;ie.Animation=ie.extend(F,{tweeners:{"*":[function(e,t){var r=this.createTween(e,t);u(r.elem,e,Ee.exec(t),r);return r}]},tweener:function(e,t){if(ie.isFunction(e)){t=e;e=["*"]}else e=e.match(_e);for(var r,n=0,i=e.length;n<i;n++){r=e[n];F.tweeners[r]=F.tweeners[r]||[];F.tweeners[r].unshift(t)}},prefilters:[Y],prefilter:function(e,t){t?F.prefilters.unshift(e):F.prefilters.push(e)}});ie.speed=function(e,t,r){var n=e&&"object"==typeof e?ie.extend({},e):{complete:r||!r&&t||ie.isFunction(e)&&e,duration:e,easing:r&&t||t&&!ie.isFunction(t)&&t};n.duration=ie.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in ie.fx.speeds?ie.fx.speeds[n.duration]:ie.fx.speeds._default;null!=n.queue&&!0!==n.queue||(n.queue="fx");n.old=n.complete;n.complete=function(){ie.isFunction(n.old)&&n.old.call(this);n.queue&&ie.dequeue(this,n.queue)};return n};ie.fn.extend({fadeTo:function(e,t,r,n){return this.filter(Oe).css("opacity",0).show().end().animate({opacity:t},e,r,n)},animate:function(e,t,r,n){var i=ie.isEmptyObject(e),o=ie.speed(t,r,n),a=function(){var t=F(this,ie.extend({},e),o);(i||Me.get(this,"finish"))&&t.stop(!0)};a.finish=a;return i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,r){var n=function(e){var t=e.stop;delete e.stop;t(r)};if("string"!=typeof e){r=t;t=e;e=void 0}t&&!1!==e&&this.queue(e||"fx",[]);return this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ie.timers,a=Me.get(this);if(i)a[i]&&a[i].stop&&n(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&n(a[i]);for(i=o.length;i--;)if(o[i].elem===this&&(null==e||o[i].queue===e)){o[i].anim.stop(r);t=!1;o.splice(i,1)}!t&&r||ie.dequeue(this,e)})},finish:function(e){!1!==e&&(e=e||"fx");return this.each(function(){var t,r=Me.get(this),n=r[e+"queue"],i=r[e+"queueHooks"],o=ie.timers,a=n?n.length:0;r.finish=!0;ie.queue(this,e,[]);i&&i.stop&&i.stop.call(this,!0);for(t=o.length;t--;)if(o[t].elem===this&&o[t].queue===e){o[t].anim.stop(!0);o.splice(t,1)}for(t=0;t<a;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete r.finish})}});ie.each(["toggle","show","hide"],function(e,t){var r=ie.fn[t];ie.fn[t]=function(e,n,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(I(t,!0),e,n,i)}});ie.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ie.fn[e]=function(e,r,n){return this.animate(t,e,r,n)}});ie.timers=[];ie.fx.tick=function(){var e,t=0,r=ie.timers;rt=ie.now();for(;t<r.length;t++){e=r[t];e()||r[t]!==e||r.splice(t--,1)}r.length||ie.fx.stop();rt=void 0};ie.fx.timer=function(e){ie.timers.push(e);e()?ie.fx.start():ie.timers.pop()};ie.fx.interval=13;ie.fx.start=function(){nt||(nt=e.setInterval(ie.fx.tick,ie.fx.interval))};ie.fx.stop=function(){e.clearInterval(nt);nt=null};ie.fx.speeds={slow:600,fast:200,_default:400};ie.fn.delay=function(t,r){t=ie.fx?ie.fx.speeds[t]||t:t;r=r||"fx";return this.queue(r,function(r,n){var i=e.setTimeout(r,t);n.stop=function(){e.clearTimeout(i)}})};!function(){var e=G.createElement("input"),t=G.createElement("select"),r=t.appendChild(G.createElement("option"));e.type="checkbox";ne.checkOn=""!==e.value;ne.optSelected=r.selected;t.disabled=!0;ne.optDisabled=!r.disabled;e=G.createElement("input");e.value="t";e.type="radio";ne.radioValue="t"===e.value}();var at,st=ie.expr.attrHandle;ie.fn.extend({attr:function(e,t){return we(this,ie.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ie.removeAttr(this,e)})}});ie.extend({attr:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if(void 0===e.getAttribute)return ie.prop(e,t,r);if(1!==o||!ie.isXMLDoc(e)){t=t.toLowerCase();i=ie.attrHooks[t]||(ie.expr.match.bool.test(t)?at:void 0)}if(void 0!==r){if(null===r){ie.removeAttr(e,t);return}if(i&&"set"in i&&void 0!==(n=i.set(e,r,t)))return n;e.setAttribute(t,r+"");return r}if(i&&"get"in i&&null!==(n=i.get(e,t)))return n;n=ie.find.attr(e,t);return null==n?void 0:n}},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&"radio"===t&&ie.nodeName(e,"input")){var r=e.value;e.setAttribute("type",t);r&&(e.value=r);return t}}}},removeAttr:function(e,t){var r,n,i=0,o=t&&t.match(_e);if(o&&1===e.nodeType)for(;r=o[i++];){n=ie.propFix[r]||r;ie.expr.match.bool.test(r)&&(e[n]=!1);e.removeAttribute(r)}}});at={set:function(e,t,r){!1===t?ie.removeAttr(e,r):e.setAttribute(r,r);return r}};ie.each(ie.expr.match.bool.source.match(/\w+/g),function(e,t){var r=st[t]||ie.find.attr;st[t]=function(e,t,n){var i,o;if(!n){o=st[t];st[t]=i;i=null!=r(e,t,n)?t.toLowerCase():null;st[t]=o}return i}});var lt=/^(?:input|select|textarea|button)$/i,ut=/^(?:a|area)$/i;ie.fn.extend({prop:function(e,t){return we(this,ie.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ie.propFix[e]||e]})}});ie.extend({prop:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if(1!==o||!ie.isXMLDoc(e)){t=ie.propFix[t]||t;i=ie.propHooks[t]}return void 0!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:e[t]=r:i&&"get"in i&&null!==(n=i.get(e,t))?n:e[t]}},propHooks:{tabIndex:{get:function(e){var t=ie.find.attr(e,"tabindex");return t?parseInt(t,10):lt.test(e.nodeName)||ut.test(e.nodeName)&&e.href?
70:-1}}},propFix:{for:"htmlFor",class:"className"}});ne.optSelected||(ie.propHooks.selected={get:function(e){var t=e.parentNode;t&&t.parentNode&&t.parentNode.selectedIndex;return null},set:function(e){var t=e.parentNode;if(t){t.selectedIndex;t.parentNode&&t.parentNode.selectedIndex}}});ie.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ie.propFix[this.toLowerCase()]=this});var ct=/[\t\r\n\f]/g;ie.fn.extend({addClass:function(e){var t,r,n,i,o,a,s,l=0;if(ie.isFunction(e))return this.each(function(t){ie(this).addClass(e.call(this,t,W(this)))});if("string"==typeof e&&e){t=e.match(_e)||[];for(;r=this[l++];){i=W(r);n=1===r.nodeType&&(" "+i+" ").replace(ct," ");if(n){a=0;for(;o=t[a++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");s=ie.trim(n);i!==s&&r.setAttribute("class",s)}}}return this},removeClass:function(e){var t,r,n,i,o,a,s,l=0;if(ie.isFunction(e))return this.each(function(t){ie(this).removeClass(e.call(this,t,W(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e){t=e.match(_e)||[];for(;r=this[l++];){i=W(r);n=1===r.nodeType&&(" "+i+" ").replace(ct," ");
7if(n){a=0;for(;o=t[a++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");s=ie.trim(n);i!==s&&r.setAttribute("class",s)}}}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):ie.isFunction(e)?this.each(function(r){ie(this).toggleClass(e.call(this,r,W(this),t),t)}):this.each(function(){var t,n,i,o;if("string"===r){n=0;i=ie(this);o=e.match(_e)||[];for(;t=o[n++];)i.hasClass(t)?i.removeClass(t):i.addClass(t)}else if(void 0===e||"boolean"===r){t=W(this);t&&Me.set(this,"__className__",t);this.setAttribute&&this.setAttribute("class",t||!1===e?"":Me.get(this,"__className__")||"")}})},hasClass:function(e){var t,r,n=0;t=" "+e+" ";for(;r=this[n++];)if(1===r.nodeType&&(" "+W(r)+" ").replace(ct," ").indexOf(t)>-1)return!0;return!1}});var dt=/\r/g,pt=/[\x20\t\r\n\f]+/g;ie.fn.extend({val:function(e){var t,r,n,i=this[0];if(arguments.length){n=ie.isFunction(e);return this.each(function(r){var i;if(1===this.nodeType){i=n?e.call(this,r,ie(this).val()):e;null==i?i="":"number"==typeof i?i+="":ie.isArray(i)&&(i=ie.map(i,function(e){return null==e?"":e+""}));t=ie.valHooks[this.type]||ie.valHooks[this.nodeName.toLowerCase()];t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i)}})}if(i){t=ie.valHooks[i.type]||ie.valHooks[i.nodeName.toLowerCase()];if(t&&"get"in t&&void 0!==(r=t.get(i,"value")))return r;r=i.value;return"string"==typeof r?r.replace(dt,""):null==r?"":r}}});ie.extend({valHooks:{option:{get:function(e){var t=ie.find.attr(e,"value");return null!=t?t:ie.trim(ie.text(e)).replace(pt," ")}},select:{get:function(e){for(var t,r,n=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:n.length,l=i<0?s:o?i:0;l<s;l++){r=n[l];if((r.selected||l===i)&&(ne.optDisabled?!r.disabled:null===r.getAttribute("disabled"))&&(!r.parentNode.disabled||!ie.nodeName(r.parentNode,"optgroup"))){t=ie(r).val();if(o)return t;a.push(t)}}return a}
7,set:function(e,t){for(var r,n,i=e.options,o=ie.makeArray(t),a=i.length;a--;){n=i[a];(n.selected=ie.inArray(ie.valHooks.option.get(n),o)>-1)&&(r=!0)}r||(e.selectedIndex=-1);return o}}}});ie.each(["radio","checkbox"],function(){ie.valHooks[this]={set:function(e,t){if(ie.isArray(t))return e.checked=ie.inArray(ie(e).val(),t)>-1}};ne.checkOn||(ie.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ft=/^(?:focusinfocus|focusoutblur)$/;ie.extend(ie.event,{trigger:function(t,r,n,i){var o,a,s,l,u,c,d,p=[n||G],f=re.call(t,"type")?t.type:t,h=re.call(t,"namespace")?t.namespace.split("."):[];a=s=n=n||G;if(3!==n.nodeType&&8!==n.nodeType&&!ft.test(f+ie.event.triggered)){if(f.indexOf(".")>-1){h=f.split(".");f=h.shift();h.sort()}u=f.indexOf(":")<0&&"on"+f;t=t[ie.expando]?t:new ie.Event(f,"object"==typeof t&&t);t.isTrigger=i?2:3;t.namespace=h.join(".");t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;t.result=void 0;t.target||(t.target=n);r=null==r?[t]:ie.makeArray(r,[t]);d=ie.event.special[f]||{};if(i||!d.trigger||!1!==d.trigger.apply(n,r)){if(!i&&!d.noBubble&&!ie.isWindow(n)){l=d.delegateType||f;ft.test(l+f)||(a=a.parentNode);for(;a;a=a.parentNode){p.push(a);s=a}s===(n.ownerDocument||G)&&p.push(s.defaultView||s.parentWindow||e)}o=0;for(;(a=p[o++])&&!t.isPropagationStopped();){t.type=o>1?l:d.bindType||f;c=(Me.get(a,"events")||{})[t.type]&&Me.get(a,"handle");c&&c.apply(a,r);c=u&&a[u];if(c&&c.apply&&xe(a)){t.result=c.apply(a,r);!1===t.result&&t.preventDefault()}}t.type=f;if(!i&&!t.isDefaultPrevented()&&(!d._default||!1===d._default.apply(p.pop(),r))&&xe(n)&&u&&ie.isFunction(n[f])&&!ie.isWindow(n)){s=n[u];s&&(n[u]=null);ie.event.triggered=f;n[f]();ie.event.triggered=void 0;s&&(n[u]=s)}return t.result}}},simulate:function(e,t,r){var n=ie.extend(new ie.Event,r,{type:e,isSimulated:!0});ie.event.trigger(n,null,t);n.isDefaultPrevented()&&r.preventDefault()}});ie.fn.extend({trigger:function(e,t){return this.each(function(){ie.event.trigger(e,t,this)})},triggerHandler:function(e,t){var r=this[0];if(r)return ie.event.trigger(e,t,r,!0)}});ie.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ie.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}});ie.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});ne.focusin="onfocusin"in e;ne.focusin||ie.each({focus:"focusin",blur:"focusout"},function(e,t){var r=function(e){ie.event.simulate(t,e.target,ie.event.fix(e))};ie.event.special[t]={setup:function(){var n=this.ownerDocument||this,i=Me.access(n,t);i||n.addEventListener(e,r,!0);Me.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=Me.access(n,t)-1;if(i)Me.access(n,t,i);else{n.removeEventListener(e,r,!0);Me.remove(n,t)}}}});var ht=e.location,mt=ie.now(),yt=/\?/;ie.parseJSON=function(e){return JSON.parse(e+"")};ie.parseXML=function(t){var r;if(!t||"string"!=typeof t)return null;try{r=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){r=void 0}r&&!r.getElementsByTagName("parsererror").length||ie.error("Invalid XML: "+t);return r};var gt=/#.*$/,vt=/([?&])_=[^&]*/,_t=/^(.*?):[ \t]*([^\r\n]*)$/gm,bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,wt=/^(?:GET|HEAD)$/,xt=/^\/\//,Mt={},St={},kt="*/".concat("*"),Tt=G.createElement("a");Tt.href=ht.href;ie.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ht.href,type:"GET",isLocal:bt.test(ht.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ie.parseJSON,"text xml":ie.parseXML},
8flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,ie.ajaxSettings),t):H(ie.ajaxSettings,e)},ajaxPrefilter:U(Mt),ajaxTransport:U(St),ajax:function(t,r){function n(t,r,n,s){var u,d,v,_,w,M=r;if(2!==b){b=2;l&&e.clearTimeout(l);i=void 0;a=s||"";x.readyState=t>0?4:0;u=t>=200&&t<300||304===t;n&&(_=V(p,x,n));_=B(p,_,x,u);if(u){if(p.ifModified){w=x.getResponseHeader("Last-Modified");w&&(ie.lastModified[o]=w);w=x.getResponseHeader("etag");
8w&&(ie.etag[o]=w)}if(204===t||"HEAD"===p.type)M="nocontent";else if(304===t)M="notmodified";else{M=_.state;d=_.data;v=_.error;u=!v}}else{v=M;if(t||!M){M="error";t<0&&(t=0)}}x.status=t;x.statusText=(r||M)+"";u?m.resolveWith(f,[d,M,x]):m.rejectWith(f,[x,M,v]);x.statusCode(g);g=void 0;c&&h.trigger(u?"ajaxSuccess":"ajaxError",[x,p,u?d:v]);y.fireWith(f,[x,M]);if(c){h.trigger("ajaxComplete",[x,p]);--ie.active||ie.event.trigger("ajaxStop")}}}if("object"==typeof t){r=t;t=void 0}r=r||{};var i,o,a,s,l,u,c,d,p=ie.ajaxSetup({},r),f=p.context||p,h=p.context&&(f.nodeType||f.jquery)?ie(f):ie.event,m=ie.Deferred(),y=ie.Callbacks("once memory"),g=p.statusCode||{},v={},_={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!s){s={};for(;t=_t.exec(a);)s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var r=e.toLowerCase();if(!b){e=_[r]=_[r]||e;v[e]=t}return this},overrideMimeType:function(e){b||(p.mimeType=e);return this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;i&&i.abort(t);n(0,t);return this}};m.promise(x).complete=y.add;x.success=x.done;x.error=x.fail;p.url=((t||p.url||ht.href)+"").replace(gt,"").replace(xt,ht.protocol+"//");p.type=r.method||r.type||p.method||p.type;p.dataTypes=ie.trim(p.dataType||"*").toLowerCase().match(_e)||[""];if(null==p.crossDomain){u=G.createElement("a");try{u.href=p.url;u.href=u.href;p.crossDomain=Tt.protocol+"//"+Tt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ie.param(p.data,p.traditional));q(Mt,p,r,x);if(2===b)return x;c=ie.event&&p.global;c&&0==ie.active++&&ie.event.trigger("ajaxStart");p.type=p.type.toUpperCase();p.hasContent=!wt.test(p.type);o=p.url;if(!p.hasContent){if(p.data){o=p.url+=(yt.test(o)?"&":"?")+p.data;delete p.data}!1===p.cache&&(p.url=vt.test(o)?o.replace(vt,"$1_="+mt++):o+(yt.test(o)?"&":"?")+"_="+mt++)}if(p.ifModified){ie.lastModified[o]&&x.setRequestHeader("If-Modified-Since",ie.lastModified[o]);ie.etag[o]&&x.setRequestHeader("If-None-Match",ie.etag[o])}(p.data&&p.hasContent&&!1!==p.contentType||r.contentType)&&x.setRequestHeader("Content-Type",p.contentType);x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+kt+"; q=0.01":""):p.accepts["*"]);for(d in p.headers)x.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,x,p)||2===b))return x.abort();w="abort";for(d in{success:1,error:1,complete:1})x[d](p[d]);i=q(St,p,r,x);if(i){x.readyState=1;c&&h.trigger("ajaxSend",[x,p]);if(2===b)return x;p.async&&p.timeout>0&&(l=e.setTimeout(function(){x.abort("timeout")},p.timeout));try{b=1;i.send(v,n)}catch(e){if(!(b<2))throw e;n(-1,e)}}else n(-1,"No Transport");return x},getJSON:function(e,t,r){return ie.get(e,t,r,"json")},getScript:function(e,t){return ie.get(e,void 0,t,"script")}});ie.each(["get","post"],function(e,t){ie[t]=function(e,r,n,i){if(ie.isFunction(r)){i=i||n;n=r;r=void 0}return ie.ajax(ie.extend({url:e,type:t,dataType:i,data:r,success:n},ie.isPlainObject(e)&&e))}});ie._evalUrl=function(e){return ie.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};ie.fn.extend({wrapAll:function(e){var t;if(ie.isFunction(e))return this.each(function(t){ie(this).wrapAll(e.call(this,t))});if(this[0]){t=ie(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)}return this},wrapInner:function(e){return ie.isFunction(e)?this.each(function(t){ie(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ie(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)})},wrap:function(e){var t=ie.isFunction(e);return this.each(function(r){ie(this).wrapAll(t?e.call(this,r):e)})},unwrap:function(){return this.parent().each(function(){ie.nodeName(this,"body")||ie(this).replaceWith(this.childNodes)}).end()}});ie.expr.filters.hidden=function(e){return!ie.expr.filters.visible(e)};ie.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var At=/%20/g,Et=/\[\]$/,Pt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;ie.param=function(e,t){var r,n=[],i=function(e,t){t=ie.isFunction(t)?t():null==t?"":t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};void 0===t&&(t=ie.ajaxSettings&&ie.ajaxSettings.traditional);if(ie.isArray(e)||e.jquery&&!ie.isPlainObject(e))ie.each(e,function(){i(this.name,this.value)});
8else for(r in e)z(r,e[r],t,i);return n.join("&").replace(At,"+")};ie.fn.extend({serialize:function(){return ie.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ie.prop(this,"elements");return e?ie.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ie(this).is(":disabled")&&jt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!je.test(e))}).map(function(e,t){var r=ie(this).val();return null==r?null:ie.isArray(r)?ie.map(r,function(e){return{name:t.name,value:e.replace(Pt,"\r\n")}}):{name:t.name,value:r.replace(Pt,"\r\n")}}).get()}});ie.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Dt={0:200,1223:204},Ct=ie.ajaxSettings.xhr();ne.cors=!!Ct&&"withCredentials"in Ct;ne.ajax=Ct=!!Ct;ie.ajaxTransport(function(t){var r,n;if(ne.cors||Ct&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();s.open(t.type,t.url,t.async,t.username,t.password);if(t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType);t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);r=function(e){return function(){if(r){r=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null;"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Dt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders())}}};s.onload=r();n=s.onerror=r("error");void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){r&&n()})};r=r("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(r)throw e}},abort:function(){r&&r()}}});ie.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){ie.globalEval(e);return e}}});ie.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1);e.crossDomain&&(e.type="GET")});ie.ajaxTransport("script",function(e){if(e.crossDomain){var t,r;return{send:function(n,i){t=ie("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",r=function(e){t.remove();r=null;e&&i("error"===e.type?404:200,e.type)});G.head.appendChild(t[0])},abort:function(){r&&r()}}}});var Lt=[],It=/(=)\?(?=&|$)|\?\?/;ie.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Lt.pop()||ie.expando+"_"+mt++;this[e]=!0;return e}});ie.ajaxPrefilter("json jsonp",function(t,r,n){var i,o,a,s=!1!==t.jsonp&&(It.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&It.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0]){i=t.jsonpCallback=ie.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback;s?t[s]=t[s].replace(It,"$1"+i):!1!==t.jsonp&&(t.url+=(yt.test(t.url)?"&":"?")+t.jsonp+"="+i);t.converters["script json"]=function(){a||ie.error(i+" was not called");return a[0]};t.dataTypes[0]="json";o=e[i];e[i]=function(){a=arguments};n.always(function(){void 0===o?ie(e).removeProp(i):e[i]=o;if(t[i]){t.jsonpCallback=r.jsonpCallback;Lt.push(i)}a&&ie.isFunction(o)&&o(a[0]);a=o=void 0});return"script"}});ie.parseHTML=function(e,t,r){if(!e||"string"!=typeof e)return null;if("boolean"==typeof t){r=t;t=!1}t=t||G;var n=fe.exec(e),i=!r&&[];if(n)return[t.createElement(n[1])];n=p([e],t,i);i&&i.length&&ie(i).remove();return ie.merge([],n.childNodes)};var Rt=ie.fn.load;ie.fn.load=function(e,t,r){if("string"!=typeof e&&Rt)return Rt.apply(this,arguments);var n,i,o,a=this,s=e.indexOf(" ");if(s>-1){n=ie.trim(e.slice(s));e=e.slice(0,s)}if(ie.isFunction(t)){r=t;t=void 0}else t&&"object"==typeof t&&(i="POST");a.length>0&&ie.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments;a.html(n?ie("<div>").append(ie.parseHTML(e)).find(n):e)}).always(r&&function(e,t){a.each(function(){r.apply(this,o||[e.responseText,t,e])})});return this};ie.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ie.fn[t]=function(e){return this.on(t,e)}});ie.expr.filters.animated=function(e){return ie.grep(ie.timers,function(t){return e===t.elem}).length};ie.offset={setOffset:function(e,t,r){var n,i,o,a,s,l,u,c=ie.css(e,"position"),d=ie(e),p={};"static"===c&&(e.style.position="relative");s=d.offset();
8o=ie.css(e,"top");l=ie.css(e,"left");u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1;if(u){n=d.position();a=n.top;i=n.left}else{a=parseFloat(o)||0;i=parseFloat(l)||0}ie.isFunction(t)&&(t=t.call(e,r,ie.extend({},s)));null!=t.top&&(p.top=t.top-s.top+a);null!=t.left&&(p.left=t.left-s.left+i);"using"in t?t.using.call(e,p):d.css(p)}};ie.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ie.offset.setOffset(this,e,t)});var t,r,n=this[0],i={top:0,left:0},o=n&&n.ownerDocument;if(o){t=o.documentElement;if(!ie.contains(t,n))return i;i=n.getBoundingClientRect();r=K(o);return{top:i.top+r.pageYOffset-t.clientTop,left:i.left+r.pageXOffset-t.clientLeft}}},position:function(){if(this[0]){var e,t,r=this[0],n={top:0,left:0};if("fixed"===ie.css(r,"position"))t=r.getBoundingClientRect();else{e=this.offsetParent();t=this.offset();ie.nodeName(e[0],"html")||(n=e.offset());n.top+=ie.css(e[0],"borderTopWidth",!0);n.left+=ie.css(e[0],"borderLeftWidth",!0)}return{top:t.top-n.top-ie.css(r,"marginTop",!0),left:t.left-n.left-ie.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===ie.css(e,"position");)e=e.offsetParent;return e||Je})}});ie.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var r="pageYOffset"===t;ie.fn[e]=function(n){return we(this,function(e,n,i){var o=K(e);if(void 0===i)return o?o[t]:e[n];o?o.scrollTo(r?o.pageXOffset:i,r?i:o.pageYOffset):e[n]=i},e,n,arguments.length)}});ie.each(["top","left"],function(e,t){ie.cssHooks[t]=A(ne.pixelPosition,function(e,r){if(r){r=T(e,t);return Ke.test(r)?ie(e).position()[t]+"px":r}})});ie.each({Height:"height",Width:"width"},function(e,t){ie.each({padding:"inner"+e,content:t,"":"outer"+e},function(r,n){ie.fn[n]=function(n,i){var o=arguments.length&&(r||"boolean"!=typeof n),a=r||(!0===n||!0===i?"margin":"border");return we(this,function(t,r,n){var i;if(ie.isWindow(t))return t.document.documentElement["client"+e];if(9===t.nodeType){i=t.documentElement;return Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])}return void 0===n?ie.css(t,r,a):ie.style(t,r,n,a)},t,o?n:void 0,o,null)}})});ie.fn.extend({bind:function(e,t,r){return this.on(e,null,t,r)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,r,n){return this.on(t,e,r,n)},undelegate:function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},size:function(){return this.length}});ie.fn.andSelf=ie.fn.addBack;"function"==typeof define&&define.amd&&define("jquery",[],function(){return ie});var Yt=e.jQuery,Nt=e.$;ie.noConflict=function(t){e.$===ie&&(e.$=Nt);t&&e.jQuery===ie&&(e.jQuery=Yt);return ie};t||(e.jQuery=e.$=ie);return ie});define("jquery/jquery",function(){});!function(e){var t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define("backbone/backbone",["underscore","jquery","exports"],function(r,n,i){t.Backbone=e(t,i,r,n)});else if("undefined"!=typeof exports){var r,n=require("underscore");try{r=require("jquery")}catch(e){}e(t,exports,n,r)}else t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}(function(e,t,r,n){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.3.3";t.$=n;t.noConflict=function(){e.Backbone=i;return this};t.emulateHTTP=!1;t.emulateJSON=!1;var a=function(e,t,n){switch(e){case 1:return function(){return r[t](this[n])};case 2:return function(e){return r[t](this[n],e)};case 3:return function(e,i){return r[t](this[n],l(e,this),i)};case 4:return function(e,i,o){return r[t](this[n],l(e,this),i,o)};default:return function(){var e=o.call(arguments);e.unshift(this[n]);return r[t].apply(r,e)}}},s=function(e,t,n){r.each(t,function(t,i){r[i]&&(e.prototype[i]=a(t,i,n))})},l=function(e,t){return r.isFunction(e)?e:r.isObject(e)&&!t._isModel(e)?u(e):r.isString(e)?function(t){return t.get(e)}:e},u=function(e){var t=r.matches(e);return function(e){return t(e.attributes)}},c=t.Events={},d=/\s+/,p=function(e,t,n,i,o){var a,s=0;if(n&&"object"==typeof n){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=r.keys(n);s<a.length;s++)t=p(e,t,a[s],n[a[s]],o)}else if(n&&d.test(n))for(a=n.split(d);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,n,i,o);return t};c.on=function(e,t,r){return f(this,e,t,r)};var f=function(e,t,r,n,i){e._events=p(h,e._events||{},t,r,{context:n,ctx:e,listening:i});if(i){(e._listeners||(e._listeners={}))[i.id]=i}return e};c.listenTo=function(e,t,n){if(!e)return this;var i=e._listenId||(e._listenId=r.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=r.uniqueId("l"));a=o[i]={obj:e,objId:i,id:s,listeningTo:o,count:0}}f(e,t,n,this,a);return this};var h=function(e,t,r,n){if(r){var i=e[t]||(e[t]=[]),o=n.context,a=n.ctx,s=n.listening;s&&s.count++;i.push({callback:r,context:o,ctx:o||a,listening:s})}return e};c.off=function(e,t,r){if(!this._events)return this;this._events=p(m,this._events,e,t,{context:r,listeners:this._listeners});return this};c.stopListening=function(e,t,n){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:r.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,n,this)}return this};var m=function(e,t,n,i){if(e){var o,a=0,s=i.context,l=i.listeners;if(t||n||s){for(var u=t?[t]:r.keys(e);a<u.length;a++){t=u[a];var c=e[t];if(!c)break;for(var d=[],p=0;p<c.length;p++){var f=c[p];if(n&&n!==f.callback&&n!==f.callback._callback||s&&s!==f.context)d.push(f);else{o=f.listening;if(o&&0==--o.count){delete l[o.id];delete o.listeningTo[o.objId]}}}d.length?e[t]=d:delete e[t]}return e}for(var h=r.keys(l);a<h.length;a++){o=l[h[a]];delete l[o.id];delete o.listeningTo[o.objId]}}};c.once=function(e,t,n){var i=p(y,{},e,t,r.bind(this.off,this));"string"==typeof e&&null==n&&(t=void 0);return this.on(i,t,n)};c.listenToOnce=function(e,t,n){var i=p(y,{},t,n,r.bind(this.stopListening,this,e));return this.listenTo(e,i)};var y=function(e,t,n,i){if(n){var o=e[t]=r.once(function(){i(t,o);n.apply(this,arguments)});o._callback=n}return e};c.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),r=Array(t),n=0;n<t;n++)r[n]=arguments[n+1];p(g,this._events,e,void 0,r);return this};var g=function(e,t,r,n){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice());i&&v(i,n);o&&v(o,[t].concat(n))}return e},v=function(e,t){var r,n=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++n<i;)(r=e[n]).callback.call(r.ctx);return;case 1:for(;++n<i;)(r=e[n]).callback.call(r.ctx,o);return;case 2:for(;++n<i;)(r=e[n]).callback.call(r.ctx,o,a);return;case 3:for(;++n<i;)(r=e[n]).callback.call(r.ctx,o,a,s);return;default:for(;++n<i;)(r=e[n]).callback.apply(r.ctx,t);return}};c.bind=c.on;c.unbind=c.off;r.extend(t,c);var _=t.Model=function(e,t){var n=e||{};t||(t={});this.cid=r.uniqueId(this.cidPrefix);this.attributes={};t.collection&&(this.collection=t.collection);t.parse&&(n=this.parse(n,t)||{});var i=r.result(this,"defaults");n=r.defaults(r.extend({},i,n),i);this.set(n,t);this.changed={};this.initialize.apply(this,arguments)};r.extend(_.prototype,c,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(e){return r.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return r.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!r.iteratee(e,this)(this.attributes)},set:function(e,t,n){if(null==e)return this;var i;if("object"==typeof e){i=e;n=t}else(i={})[e]=t;n||(n={});
8if(!this._validate(i,n))return!1;var o=n.unset,a=n.silent,s=[],l=this._changing;this._changing=!0;if(!l){this._previousAttributes=r.clone(this.attributes);this.changed={}}var u=this.attributes,c=this.changed,d=this._previousAttributes;for(var p in i){t=i[p];r.isEqual(u[p],t)||s.push(p);r.isEqual(d[p],t)?delete c[p]:c[p]=t;o?delete u[p]:u[p]=t}this.idAttribute in i&&(this.id=this.get(this.idAttribute));if(!a){s.length&&(this._pending=n);for(var f=0;f<s.length;f++)this.trigger("change:"+s[f],this,u[s[f]],n)}if(l)return this;if(!a)for(;this._pending;){n=this._pending;this._pending=!1;this.trigger("change",this,n)}this._pending=!1;this._changing=!1;return this},unset:function(e,t){return this.set(e,void 0,r.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,r.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!r.isEmpty(this.changed):r.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&r.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,n={};for(var i in e){var o=e[i];r.isEqual(t[i],o)||(n[i]=o)}return!!r.size(n)&&n},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return r.clone(this._previousAttributes)},fetch:function(e){e=r.extend({parse:!0},e);var t=this,n=e.success;e.success=function(r){var i=e.parse?t.parse(r,e):r;if(!t.set(i,e))return!1;n&&n.call(e.context,t,r,e);t.trigger("sync",t,r,e)};F(this,e);return this.sync("read",this,e)},save:function(e,t,n){var i;if(null==e||"object"==typeof e){i=e;n=t}else(i={})[e]=t;n=r.extend({validate:!0,parse:!0},n);var o=n.wait;if(i&&!o){if(!this.set(i,n))return!1}else if(!this._validate(i,n))return!1;var a=this,s=n.success,l=this.attributes;n.success=function(e){a.attributes=l;var t=n.parse?a.parse(e,n):e;o&&(t=r.extend({},i,t));if(t&&!a.set(t,n))return!1;s&&s.call(n.context,a,e,n);a.trigger("sync",a,e,n)};F(this,n);i&&o&&(this.attributes=r.extend({},l,i));var u=this.isNew()?"create":n.patch?"patch":"update";"patch"!==u||n.attrs||(n.attrs=i);var c=this.sync(u,this,n);this.attributes=l;return c},destroy:function(e){e=e?r.clone(e):{};var t=this,n=e.success,i=e.wait,o=function(){t.stopListening();t.trigger("destroy",t,t.collection,e)};e.success=function(r){i&&o();n&&n.call(e.context,t,r,e);t.isNew()||t.trigger("sync",t,r,e)};var a=!1;if(this.isNew())r.defer(e.success);else{F(this,e);a=this.sync("delete",this,e)}i||o();return a},url:function(){var e=r.result(this,"urlRoot")||r.result(this.collection,"url")||N();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},r.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=r.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;if(!n)return!0;this.trigger("invalid",this,n,r.extend(t,{validationError:n}));return!1}});s(_,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var b=t.Collection=function(e,t){t||(t={});t.model&&(this.model=t.model);void 0!==t.comparator&&(this.comparator=t.comparator);this._reset();this.initialize.apply(this,arguments);e&&this.reset(e,r.extend({silent:!0},t))},w={add:!0,remove:!0,merge:!0},x={add:!0,remove:!1},M=function(e,t,r){r=Math.min(Math.max(r,0),e.length);var n,i=Array(e.length-r),o=t.length;for(n=0;n<i.length;n++)i[n]=e[n+r];for(n=0;n<o;n++)e[n+r]=t[n];for(n=0;n<i.length;n++)e[n+o+r]=i[n]};r.extend(b.prototype,c,{model:_,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,r.extend({merge:!1},t,x))},remove:function(e,t){t=r.extend({},t);var n=!r.isArray(e);e=n?[e]:e.slice();var i=this._removeModels(e,t);if(!t.silent&&i.length){t.changes={added:[],merged:[],removed:i};this.trigger("update",this,t)}return n?i[0]:i}
8,set:function(e,t){if(null!=e){t=r.extend({},w,t);t.parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var n=!r.isArray(e);e=n?[e]:e.slice();var i=t.at;null!=i&&(i=+i);i>this.length&&(i=this.length);i<0&&(i+=this.length+1);var o,a,s=[],l=[],u=[],c=[],d={},p=t.add,f=t.merge,h=t.remove,m=!1,y=this.comparator&&null==i&&!1!==t.sort,g=r.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var v=this.get(o);if(v){if(f&&o!==v){var _=this._isModel(o)?o.attributes:o;t.parse&&(_=v.parse(_,t));v.set(_,t);u.push(v);y&&!m&&(m=v.hasChanged(g))}if(!d[v.cid]){d[v.cid]=!0;s.push(v)}e[a]=v}else if(p){o=e[a]=this._prepareModel(o,t);if(o){l.push(o);this._addReference(o,t);d[o.cid]=!0;s.push(o)}}}if(h){for(a=0;a<this.length;a++){o=this.models[a];d[o.cid]||c.push(o)}c.length&&this._removeModels(c,t)}var b=!1,x=!y&&p&&h;if(s.length&&x){b=this.length!==s.length||r.some(this.models,function(e,t){return e!==s[t]});this.models.length=0;M(this.models,s,0);this.length=this.models.length}else if(l.length){y&&(m=!0);M(this.models,l,null==i?this.length:i);this.length=this.models.length}m&&this.sort({silent:!0});if(!t.silent){for(a=0;a<l.length;a++){null!=i&&(t.index=i+a);o=l[a];o.trigger("add",o,this,t)}(m||b)&&this.trigger("sort",this,t);if(l.length||c.length||u.length){t.changes={added:l,removed:c,merged:u};this.trigger("update",this,t)}}return n?e[0]:e}},reset:function(e,t){t=t?r.clone(t):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],t);t.previousModels=this.models;this._reset();e=this.add(e,r.extend({silent:!0},t));t.silent||this.trigger("reset",this,t);return e},push:function(e,t){return this.add(e,r.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,r.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(e.attributes||e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){e<0&&(e+=this.length);return this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var n=t.length;r.isFunction(t)&&(t=r.bind(t,this));1===n||r.isString(t)?this.models=this.sortBy(t):this.models.sort(t);e.silent||this.trigger("sort",this,e);return this},pluck:function(e){return this.map(e+"")},fetch:function(e){e=r.extend({parse:!0},e);var t=e.success,n=this;e.success=function(r){var i=e.reset?"reset":"set";n[i](r,e);t&&t.call(e.context,n,r,e);n.trigger("sync",n,r,e)};F(this,e);return this.sync("read",this,e)},create:function(e,t){t=t?r.clone(t):{};var n=t.wait;e=this._prepareModel(e,t);if(!e)return!1;n||this.add(e,t);var i=this,o=t.success;t.success=function(e,t,r){n&&i.add(e,r);o&&o.call(r.context,e,t,r)};e.save(null,t);return e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(e,t){if(this._isModel(e)){e.collection||(e.collection=this);return e}t=t?r.clone(t):{};t.collection=this;var n=new this.model(e,t);if(!n.validationError)return n;this.trigger("invalid",this,n.validationError,t);return!1},_removeModels:function(e,t){for(var r=[],n=0;n<e.length;n++){var i=this.get(e[n]);if(i){var o=this.indexOf(i);this.models.splice(o,1);this.length--;delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a];if(!t.silent){t.index=o;i.trigger("remove",i,this,t)}r.push(i);this._removeReference(i,t)}}return r},_isModel:function(e){return e instanceof _},_addReference:function(e,t){this._byId[e.cid]=e;var r=this.modelId(e.attributes);null!=r&&(this._byId[r]=e);e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var r=this.modelId(e.attributes);null!=r&&delete this._byId[r];this===e.collection&&delete e.collection;e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,r,n){if(t){if(("add"===e||"remove"===e)&&r!==this)return;"destroy"===e&&this.remove(t,n);if("change"===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);if(i!==o){null!=i&&delete this._byId[i];null!=o&&(this._byId[o]=t)}}}this.trigger.apply(this,arguments)}});
8s(b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var S=t.View=function(e){this.cid=r.uniqueId("view");r.extend(this,r.pick(e,T));this._ensureElement();this.initialize.apply(this,arguments)},k=/^(\S+)\s*(.*)$/,T=["model","collection","el","id","attributes","className","tagName","events"];r.extend(S.prototype,c,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){this._removeElement();this.stopListening();return this},_removeElement:function(){this.$el.remove()},setElement:function(e){this.undelegateEvents();this._setElement(e);this.delegateEvents();return this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e);this.el=this.$el[0]},delegateEvents:function(e){e||(e=r.result(this,"events"));if(!e)return this;this.undelegateEvents();for(var t in e){var n=e[t];r.isFunction(n)||(n=this[n]);if(n){var i=t.match(k);this.delegate(i[1],i[2],r.bind(n,this))}}return this},delegate:function(e,t,r){this.$el.on(e+".delegateEvents"+this.cid,t,r);return this},undelegateEvents:function(){this.$el&&this.$el.off(".delegateEvents"+this.cid);return this},undelegate:function(e,t,r){this.$el.off(e+".delegateEvents"+this.cid,t,r);return this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(r.result(this,"el"));else{var e=r.extend({},r.result(this,"attributes"));this.id&&(e.id=r.result(this,"id"));this.className&&(e.class=r.result(this,"className"));this.setElement(this._createElement(r.result(this,"tagName")));this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}});t.sync=function(e,n,i){var o=A[e];r.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};i.url||(a.url=r.result(n,"url")||N());if(null==i.data&&n&&("create"===e||"update"===e||"patch"===e)){a.contentType="application/json";a.data=JSON.stringify(i.attrs||n.toJSON(i))}if(i.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST";i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",o);if(s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var l=i.error;i.error=function(e,t,r){i.textStatus=t;i.errorThrown=r;l&&l.call(i.context,e,t,r)};var u=i.xhr=t.ajax(r.extend(a,i));n.trigger("request",n,u,i);return u};var A={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var E=t.Router=function(e){e||(e={});e.routes&&(this.routes=e.routes);this._bindRoutes();this.initialize.apply(this,arguments)},P=/\((.*?)\)/g,O=/(\(\?)?:\w+/g,j=/\*\w+/g,D=/[\-{}\[\]+?.,\\\^$|#\s]/g;r.extend(E.prototype,c,{initialize:function(){},route:function(e,n,i){r.isRegExp(e)||(e=this._routeToRegExp(e));if(r.isFunction(n)){i=n;n=""}i||(i=this[n]);var o=this;t.history.route(e,function(r){var a=o._extractParameters(e,r);if(!1!==o.execute(i,a,n)){o.trigger.apply(o,["route:"+n].concat(a));o.trigger("route",n,a);t.history.trigger("route",o,n,a)}});return this},execute:function(e,t,r){e&&e.apply(this,t)},navigate:function(e,r){t.history.navigate(e,r);return this},_bindRoutes:function(){if(this.routes){this.routes=r.result(this,"routes");for(var e,t=r.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){e=e.replace(D,"\\$&").replace(P,"(?:$1)?").replace(O,function(e,t){return t?e:"([^/?]+)"}).replace(j,"([^?]*?)");return new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return r.map(n,function(e,t){return t===n.length-1?e||null:e?decodeURIComponent(e):null})}});var C=t.History=function(){this.handlers=[];this.checkUrl=r.bind(this.checkUrl,this);if("undefined"!=typeof window){this.location=window.location;this.history=window.history}},L=/^[#\/]|\s+$/g,I=/^\/+|\/+$/g,R=/#.*$/;C.started=!1;r.extend(C.prototype,c,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash());return e.replace(L,"")},start:function(e){if(C.started)throw new Error("Backbone.history has already been started");C.started=!0;this.options=r.extend({root:"/"},this.options,e);this.root=this.options.root;this._wantsHashChange=!1!==this.options.hashChange;this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7);this._useHashChange=this._wantsHashChange&&this._hasHashChange;this._wantsPushState=!!this.options.pushState;
8this._hasPushState=!(!this.history||!this.history.pushState);this._usePushState=this._wantsPushState&&this._hasPushState;this.fragment=this.getFragment();this.root=("/"+this.root+"/").replace(I,"/");if(this._wantsHashChange&&this._wantsPushState){
9if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";this.location.replace(t+"#"+this.getPath());return!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe");this.iframe.src="javascript:0";this.iframe.style.display="none";this.iframe.tabIndex=-1;var n=document.body,i=n.insertBefore(this.iframe,n.firstChild).contentWindow;i.document.open();i.document.close();i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval));if(!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1);if(this.iframe){document.body.removeChild(this.iframe);this.iframe=null}this._checkUrlInterval&&clearInterval(this._checkUrlInterval);C.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow));if(t===this.fragment)return!1;this.iframe&&this.navigate(t);this.loadUrl()},loadUrl:function(e){if(!this.matchRoot())return!1;e=this.fragment=this.getFragment(e);return r.some(this.handlers,function(t){if(t.route.test(e)){t.callback(e);return!0}})},navigate:function(e,t){if(!C.started)return!1;t&&!0!==t||(t={trigger:!!t});e=this.getFragment(e||"");var r=this.root;""!==e&&"?"!==e.charAt(0)||(r=r.slice(0,-1)||"/");var n=r+e;e=this.decodeFragment(e.replace(R,""));if(this.fragment!==e){this.fragment=e;if(this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace);if(this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;if(!t.replace){i.document.open();i.document.close()}this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,r){if(r){var n=e.href.replace(/(javascript:|#).*$/,"");e.replace(n+"#"+t)}else e.hash="#"+t}});t.history=new C;var Y=function(e,t){var n,i=this;n=e&&r.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)};r.extend(n,i,t);n.prototype=r.create(i.prototype,e);n.prototype.constructor=n;n.__super__=i.prototype;return n};_.extend=b.extend=E.extend=S.extend=C.extend=Y;var N=function(){throw new Error('A "url" property or function must be specified')},F=function(e,t){var r=t.error;t.error=function(n){r&&r.call(t.context,e,n,t);e.trigger("error",e,n,t)}};return t});define("backbone",["backbone/backbone"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/adapter",["require","exports","backbone","jquery","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("backbone"),i=e("jquery"),o=e("underscore");!function(e){var t=function(){function e(e){void 0===e&&(e={data:null,type:"GET",url:""});this.options=this.formatOptions(e)}e.prototype.formatOptions=function(e){return e};e.prototype.formatResponse=function(e){return e};e.prototype.setRequestHeader=function(e,t){return this};return e}();e.Request=t;var r=function(){function e(e){void 0===e&&(e={});this.options=this.formatOptions(e);this.requestBind=this.getRequestInstance.bind(this)}e.prototype.formatOptions=function(e){return e};e.prototype.load=function(){n.ajax=this.requestBind};e.prototype.getRequestInstance=function(e){void 0===e&&(e={data:null,type:"GET",url:""});return new t(e)};return e}();e.Adapter=r;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getRequestInstance=function(e){void 0===e&&(e={data:null,type:"GET",url:""});return new s(e)};return t}(r);e.DefaultAdapter=a;var s=function(e){function t(t){var r=e.call(this,t)||this;r.requestList=[];var n=[],o=[],a=null;if(t.success){a=t.success;t.success=function(e,t,i){o.push({response:e,position:r.requestList.indexOf(i)});r.dispatchResult(n,o,a,null)}}if(t.error){var s=t.error;t.error=function(e,t,i){"responseJSON"in e?n.push({errorThrown:e.responseJSON,position:r.requestList.indexOf(e)}):n.push({errorThrown:i,position:r.requestList.indexOf(e)});r.dispatchResult(n,o,a,s)}}if(t.data instanceof Array){var l=i.extend({},t);t.data.forEach(function(e){l.data=e;r.doRequest(l)})}else r.doRequest(t);return r}__extends(t,e);t.prototype.doRequest=function(e){this.requestList.push(i.ajax(e))};t.prototype.setRequestHeader=function(e,t){this.requestList.forEach(function(r){r.setRequestHeader(e,t)});return this};t.prototype.formatOptions=function(t){t=e.prototype.formatOptions.call(this,t);if(t.data instanceof Array){this.originalData=t.data;var r=[],n={};t.data.forEach(function(e){var t=Object.keys(e);if(t.length>1)r.push(o.extend({},e));else{var i=t[0];i in n||(n[i]=[]);var a=e[i];
9a instanceof Array?n[i].splice.apply(n[i],[n[i].length,0].concat(a)):n[i].push(a)}});for(var i in n){var a={};a[i]=o.uniq(n[i].sort(),!0);r.push(a)}t.data=r}else"string"==typeof t.data?this.originalData=t.data.substr(0):this.originalData=o.extend({},t.data);return t};t.prototype.dispatchResult=function(e,t,r,n){if(e.length+t.length>=this.requestList.length)if(e.length){e.sort(function(e,t){return e.position-t.position});n(this,"",e.map(function(e){return e.errorThrown}))}else if(this.options.data instanceof Array){t.sort(function(e,t){return e.position-t.position});r(o.flatten(t.map(function(e){return e.response})))}else r(t[0].response)};return t}(t);e.DefaultRequest=s}(r=t.Adapter||(t.Adapter={}));t.default=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/collection",["require","exports","backbone","underscore","./ribs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("backbone"),n=e("underscore"),i=e("./ribs"),o=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.collectionSource=null;n._isRange=!1;n._currentRange=0;n._lengthRange=5;n.isCircularRange=!1;n.isClose=!1;n.options.adapter?n.adapter=r.adapter:n.adapter=new i.Adapter.DefaultAdapter;return n}__extends(t,e);t.prototype.initialize=function(e,t){this.options=t||{};this.onInitialize&&this.onInitialize(t)};t.prototype.batchSave=function(){};t.prototype.sync=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.adapter.load();return e.prototype.sync.apply(this,t)};t.prototype.getFilteredCollection=function(e,t){var r=this,n=new i.Collection;null===this.collectionSource?n.collectionSource=this:n.collectionSource=this.collectionSource;n.add(this.getFilteredModels(this.models,e,t));var o=function(i,o,a){var s=r.getFilteredModels(i,e,t);n.add(s,a)};this.listenTo(this,"add",o);var a=function(e,t,r){n.remove(e,r)};this.listenTo(this,"remove",a);var s=function(i,o){var a=r.getFilteredModels(i.models,e,t);n.reset.call(n,a,o)};this.listenTo(this,"reset",s);n.listenTo(n,"close:collection",function(){r.stopListening(r,"add",o);r.stopListening(r,"remove",a);
9r.stopListening(r,"reset",s)});return n};t.prototype.getRange=function(e,r){var i=this,o=new t([],this.options);null===this.collectionSource?o.collectionSource=this:o.collectionSource=this.collectionSource;o._isRange=!0;o.isCircularRange=this.isCircularRange;o._currentRange=e;o._lengthRange=r;o.set(this.getRangeOfCollection(this,e,r));var a=n.debounce(function(){o.set(this.getRangeOfCollection(this,e,r))}.bind(this),16);this.listenTo(this,"update sync reset sort",a);o.listenTo(o,"close:collection",function(){i.stopListening(i,"update sync reset sort",a)});return o};t.prototype.setIsCircularRange=function(e){this.isCircularRange=!0;return this};t.prototype.rangeNext=function(){if(!this._isRange)return this;++this._currentRange>=this.collectionSource.length&&(this._currentRange=0);this.nextRange.call(this);return this};t.prototype.rangeNextPage=function(){if(!this._isRange)return this;(this._currentRange+=this._lengthRange)>=this.collectionSource.length&&(this._currentRange=0);this.nextRange.call(this);return this};t.prototype.rangeGoTo=function(e,t){if(!this._isRange)return this;void 0!==t&&(this._lengthRange=t);(this._currentRange=e)>=this.collectionSource.length?this._currentRange=0:this._currentRange<0&&(this.isCircularRange?this._currentRange+=this.collectionSource.length:this._currentRange=0);this.nextRange.call(this);return this};t.prototype.setRangeLength=function(e){if(!this._isRange)return this;this._lengthRange=Math.max(e,0);this.nextRange.call(this);return this};t.prototype.getFilteredModels=function(e,t,i){e instanceof Array||(e=[e]);var o,a=new r.Collection(e);o=t?a.where(t):e;var s;s=i?a.where(i):[];return n.filter(o,function(e){return-1===s.indexOf(e)})};t.prototype.getRangeOfCollection=function(e,t,r){return e.length<t?[]:e.models.slice(t,t+r)};t.prototype.nextRange=function(){var e=this.getRangeOfCollection(this.collectionSource,this._currentRange,this._lengthRange);this._currentRange+this._lengthRange>=this.collectionSource.length&&(e=e.concat(this.getRangeOfCollection(this.collectionSource,0,this._lengthRange-(this.collectionSource.length-this._currentRange))));this.reset(e)};t.prototype.close=function(){var e=this;this.isClose=!0;this.trigger("close:collection",this);this.trigger("close",this);this.models&&this.models.forEach(function(t){"close"in t&&t.collection===e&&t.close()})};Object.defineProperty(t.prototype,"length",{get:function(){return this.models?this.models.length:0},enumerable:!0,configurable:!0});t.prototype._removeModels=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=this.get(e[n]);if(i){var o=this.indexOf(i);this.models.splice(o,1);delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a];if(!t.silent){t.index=o;i.trigger("remove",i,this,t)}r.push(i);this._removeReference(i,t)}}return r};return t}(r.Collection);t.Collection=o;t.default=o});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/container",["require","exports","underscore","jquery"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("underscore"),i=e("jquery");!function(e){function t(e,t){if(void 0!==e){return s(l[e],e,t)}var r=[];n.each(l,function(e,n){var i=s(e,n,t);i instanceof Promise&&r.push(i)});if(r.length)return Promise.all(r)}function r(e,t){void 0===l[e]&&(l[e]=[]);l[e].push(t)}function o(e,t){if(void 0!==l[e]){var r=l[e].indexOf(t);r>-1&&l[e].splice(r,1)}}function a(e){var t=l[e];n.each(t,function(e){e.close()});delete l[e]}function s(e,t,r){var o=[],a=u.find(t);if(0===a.length){a=u.filter(t);0===a.length&&(a=i())}n.each(e,function(e){var t=function(e){void 0!==r&&n.has(r,"insertMode")&&"prepend"===r.insertMode?a.prepend(e):a.append(e)},i=e.create();i instanceof Promise?o.push(i.then(t)):t(i)});if(o.length)return Promise.all(o)}var l={},u=i("body");e.dispatch=t;e.add=r;e.remove=o;e.clear=a}(r=t.Container||(t.Container={}));t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/controller",["require","exports","backbone","underscore"],e)}(function(e,t){"use strict";
9Object.defineProperty(t,"__esModule",{value:!0});var r=e("backbone"),n=e("underscore"),i=function(){function e(e,t,i){this.options=e||{};this.router=i||new r.Router;this.configuration=t||{};this.initialize(e,t,i);n.extend(this,r.Events)}Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},set:function(e){this._promise=e},enumerable:!0,configurable:!0});e.prototype.clear=function(){};e.prototype.initialize=function(e,t,r){this.onInitialize(this.options,t,this.router)};e.prototype.onInitialize=function(e,t,r){};e.prototype.create=function(e){return null};e.extend=function(){return r.Model.extend.apply(this,arguments)};return e}();t.Controller=i;t.default=i});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/eventsManager",["require","exports","backbone","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("backbone"),n=e("underscore"),i=function(){function e(){this.constants={ROUTER_PREROUTE:"router:preRoute",ROUTER_POSTROUTE:"router:postRoute"}}return e}();t.EventsManager=n.extend(new i,r.Events);t.default=t.EventsManager});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/model",["require","exports","backbone","jquery","underscore","./ribs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("backbone"),n=e("jquery"),i=e("underscore"),o=e("./ribs"),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.options.adapter?n.adapter=r.adapter:n.adapter=new o.Adapter.DefaultAdapter;n.isClose=!1;return n}__extends(t,e);t.prototype.initialize=function(e,t){var r={virtualAttributes:[]};this.options=n.extend(r,t||{});this.lastModelTriggered=null;this.on("destroy",this.onDestroy,this);this.onInitializeStart&&this.onInitializeStart();this.onInitialize&&this.onInitialize()};t.prototype.onDestroy=function(){!1!==this.options.closeModelOnDestroy&&this.close()};t.prototype.close=function(){this.off("destroy",this.onDestroy,this);this.clear({silent:!0});this.isClose=!0;this.trigger("close:model",this);this.trigger("close",this);this.stopListening();this.trigger("destroy",this,this.collection,{})};t.prototype.sync=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.adapter.load();return e.prototype.sync.apply(this,t)};t.prototype.get=function(e){return"function"==typeof this[e]?this[e]():r.Model.prototype.get.call(this,e)};t.prototype.set=function(t,r){return e.prototype.set.call(this,t,r)};t.prototype.toJSON=function(){var e=this,t=r.Model.prototype.toJSON.call(this);i.has(this.options,"virtualAttributes")&&i.each(this.options.virtualAttributes,function(r){if(!i.has(r,"key"))throw'virtual attribute "key" missing';var n=r.key;if(!i.isFunction(e[n]))throw"virtual attribute function missing";t[n]=e[n].call(e)});return t};t.prototype.getModelProjection=function(e,r,n){var o=this;void 0===e&&(e=t);void 0===r&&(r=!1);void 0===n&&(n=!1);var a=new e(this.attributes);a.id=a.cid;var s=function(){o.lastModelTriggered!==a&&a.set(o.changed)};this.listenTo(this,"change",s);a.listenTo(a,"close:model",function(){o.stopListening(o,"change",s)});if(!0===n){var l=function(){var e={};i.each(a.changed,function(t,r){r in this.attributes&&(e[r]=t)}.bind(o));o.lastModelTriggered=a;o.set(e);o.lastModelTriggered=null};this.listenTo(a,"change",l);a.listenTo(a,"close:model",function(){o.stopListening(a,"change",l)})}if(!0!==r){var u=function(){a.destroy()};this.listenTo(this,"destroy",u);a.listenTo(a,"close:model",function(){o.stopListening(o,"destroy",u)})}this.modelSource?a.modelSource=this.modelSource:a.modelSource=this;return a};return t}(r.Model);t.Model=a;t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/router",["require","exports","./eventsManager","backbone","underscore"],e)}(function(e,t){"use strict";
9Object.defineProperty(t,"__esModule",{value:!0});var r=e("./eventsManager"),n=e("backbone"),i=e("underscore"),o=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.initialize=function(){};t.prototype.route=function(e,t,r){var o=this;i.isRegExp(e)||(e=this._routeToRegExp(e));if(i.isFunction(t)){r=t;t=""}r||(r=this[t]);n.history.route(e,function(i){var a=o._extractParameters(e,i);o.execute(r,a,t,function(e){if(e){o.trigger.apply(o,["route:"+t].concat(a));o.trigger("route",t,a);n.history.trigger("route",o,t,a)}})});return this};t.prototype.execute=function(e,t,n,i){r.default.trigger(r.default.constants.ROUTER_PREROUTE,{routeArguments:t,routeName:n});e&&e.apply(this,t);r.default.trigger(r.default.constants.ROUTER_POSTROUTE,{routeArguments:t,routeName:n});if(void 0===i)return!0;i(!0)};t.prototype.getCurrentRoute=function(){return n.history.fragment};return t}(n.Router);t.Router=o;t.default=o});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/viewHelper",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){function t(e,t){i[e]=t}function r(e){delete i[e]}function n(){return i}var i={};e.add=t;e.remove=r;e.get=n}(r=t.ViewHelper||(t.ViewHelper={}));t.default=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("FSPromise/FSPromise",["require","exports"],e)}(function(e,t){"use strict";function r(e){o=e}Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){var r=e.call(this,t)||this;r.name="FSPromiseCancelError";return r}__extends(t,e);return t}(Error);t.FSPromiseError=n;var i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);return t}(n);t.FSPromiseCancelError=i;var o=!1,a="object"==typeof global;t.setAsync=r;var s=function(){function e(e){var t=this;this._isAbort=!1;this.internalPromise=new Promise(function(r,n){var i=function(){try{e(function(e){if(t._isAbort)return n(t._abortError);r(e)},function(e){n(e)})}catch(e){n(e)}};o?a?process.nextTick(i):setTimeout(i,0):i()});this.internalPromise.catch(function(e){})}e.prototype.then=function(t,r){var n=this,i=new e(function(e,i){var s=function(){n.internalPromise.then(function(o){if(n._isAbort){i(n._abortError);r&&r(n._abortError)}else if(t)try{var a=t(o);e(a)}catch(e){i(e)}else e(o)},function(t){if(n._isAbort){i(n._abortError);r&&r(n._abortError)}else if(r)try{var o=r(t);e(o)}catch(e){i(e)}else i(t)})};o?a?process.nextTick(s):setTimeout(s,0):s()});i.parentPromise=this;return i};e.prototype.catch=function(e){return this.then(null,e)};e.prototype.finally=function(e){this.internalPromise.then(function(){e()},function(){e()});return this};e.prototype.abort=function(){this._abort(new i("Cancel"))};e.prototype._abort=function(e){this._abortError=e;this._isAbort=!0;this.parentPromise&&this.parentPromise._abort(this._abortError)};Object.defineProperty(e.prototype,"isAbort",{get:function(){return this._isAbort},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"abortError",{get:function(){return this._abortError},enumerable:!0,configurable:!0});e.resolve=function(t){return new e(function(e,r){e(t)})};e.reject=function(t){return new e(function(e,r){r(t)})};e.all=function(t){var r=new e(function(e,n){var i=function(){Promise.all(t).then(function(t){r._isAbort?n(r._abortError):e(t)},function(e){n(r._isAbort?r._abortError:e)})};o?a?process.nextTick(i):setTimeout(i,0):i()});return r};e.race=function(t){var r=new e(function(e,n){var i=function(){Promise.race(t).then(function(t){r._isAbort?n(r._abortError):e(t)},function(e){n(r._isAbort?r._abortError:e)})};o?a?process.nextTick(i):setTimeout(i,0):i()});return r};return e}();t.FSPromise=s;t.default=s});
9define("FSPromise",["FSPromise/FSPromise"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/view",["require","exports","./viewHelper","./container","backbone","jquery","underscore","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./viewHelper"),n=e("./container"),i=e("backbone"),o=e("jquery"),a=e("underscore"),s=e("FSPromise"),l=s.FSPromise,u=function(e){function t(t){var r=e.call(this,t)||this;r.isDispatch=!1;return r}__extends(t,e);t.prototype.initialize=function(e){this.pendingViewModel=[];this.waitingForSort=!1;this.waitingForUpdateCollection=!1;this.isCollectionRendered=!1;this.isSubviewRendered=!1;this.isCreating=!1;this.createPromise=null;this.isClose=!1;this.pendingViewModelPromise=[];this.options=o.extend({},t.defaultOptions,e||{});this.onInitializeStart();this.referenceModelView={};this.referenceModelView[this.options.listSelector]={};if(this.collection){this.listenTo(this.collection,"add",this.addModel);this.listenTo(this.collection,"remove",this.removeModel);this.listenTo(this.collection,"reset",this.reset);this.listenTo(this.collection,"sort",this.sortModel);this.listenTo(this.collection,"update",this.updateCollection)}this.model&&this.listenTo(this.model,"destroy",this.close);this.removeModelCallback=this.removeModel.bind(this);this.destroyViewCallback=this.onDestroySubView.bind(this);this.onInitialize()};t.prototype.render=function(){var e=this;this.onRenderStart();this.isCollectionRendered=!1;this.isSubviewRendered=!1;var t=this.htmlize(),r=function(t){if(e.isClose)return e;e.setElement(t);e.model&&e.options.reRenderOnChange&&e.listenTo(e.model,"change",e.reRenderModelView);e.onRender();e.isDispatch=!0;e.lastRenderPromise=null;if(e.pendingViewModelPromise.length)return l.all(e.pendingViewModelPromise).then(function(){e.onRenderAll();return e});if(e.waitingForUpdateCollection){e._updateCollection();e.waitingForUpdateCollection=!1}e.onRenderAll();return e};if(t instanceof l){this.lastRenderPromise&&this.lastRenderPromise.abort();this.lastRenderPromise=t;return t.then(r)}return r(t)};t.prototype.reRenderModelView=function(){var e=this;this.onRenderStart();this.$previousEl=this.$el;var t=this.htmlize(),r=function(t){if(e.isClose)return e;e.$previousEl.replaceWith(t);e.$previousEl=null;e.setElement(t);e.onRender();e.lastRenderPromise=null;e.onRenderAll();return e};if(t instanceof l){this.lastRenderPromise&&this.lastRenderPromise.abort();this.lastRenderPromise=t;return t.then(r)}return r(t)};t.prototype.htmlizeView=function(){var e,t={},n={_view:this};e=this.model?a.keys(this.options.templateVariables).length>0?o.extend(t,r.default.get(),this.options.templateVariables,this.getModelAsJson(),n):o.extend(t,r.default.get(),this.getModelAsJson(),n):a.keys(this.options.templateVariables).length>0?o.extend(t,r.default.get(),this.options.templateVariables,n):o.extend(t,r.default.get(),n);var i=this.template(e);return i instanceof l?i:o(i)};t.prototype.htmlize=function(){var e=this,t=this.htmlizeView(),r=function(t){e.isCollectionRendered=!0;if(e.collection&&e.collection.models.length>0){if(e.pendingViewModelPromise)for(;e.pendingViewModelPromise.length;){var r=e.pendingViewModelPromise.pop();r&&"abort"in r&&r.abort()}if(e.updatePromise){e.updatePromise.abort();e.updatePromise=null}var n=[];e.collection.models.forEach(function(t){n.push(e.addModel(t))});var i=t.find(e.options.listSelector);0===i.length&&0===(i=t.filter(e.options.listSelector)).length&&(i=o());e.isCollectionRendered=!1;return l.all(n).then(function(){e.isCollectionRendered=!0;e.updateCollection(i);return t})}return t},n=function(t){e.isSubviewRendered=!0;var r=[];a.each(e.referenceModelView,function(t,n){n!==e.options.listSelector&&a.each(t,function(t){e.prepareAddedView(t);r.push(t.create())})});var n=null;r.length&&(e.options.subviewAsyncRender?a.each(e.referenceModelView,function(r,n){n!==e.options.listSelector&&e._addView(n,Object.keys(r).map(function(e){return r[e]}),t)}):n=l.all(r).then(function(){var r=[];a.each(e.referenceModelView,function(n,i){i!==e.options.listSelector&&r.push(e._addView(i,Object.keys(n).map(function(e){return n[e]}),t))});return r.length?l.all(r).then(function(){return t}):t}));return null!==n?n:t};if(t instanceof l)return t.then(r).then(n);var i=r(t);return i instanceof l?i.then(n):n(i)};t.prototype.getModelAsJson=function(){var e;this.model&&(e=this.model.toJSON());return e};t.prototype.getCollectionAsJson=function(){var e;this.collection&&(e=this.collection.toJSON());return e};t.prototype.close=function(){var e=this;this.isClose=!0;this.onCloseStart();if(this.lastRenderPromise){this.lastRenderPromise.abort();this.lastRenderPromise=null}if(this.pendingViewModel.length){this.pendingViewModel.splice(0,this.pendingViewModel.length);this.pendingViewModel=null}if(this.pendingViewModelPromise.length){for(;this.pendingViewModelPromise.length;){var t=this.pendingViewModelPromise.pop();"abort"in t&&t.abort()}this.pendingViewModelPromise=null}if(this.updatePromise){"abort"in this.updatePromise&&this.updatePromise.abort();this.updatePromise=null}this.$previousEl=null;if(this.createPromise){"abort"in this.createPromise&&this.createPromise.abort();this.createPromise=null}this.trigger("close",this);this.remove();this.unbind();this.stopListening();if(this.collection){"close"in this.collection&&(!this.options||!1!==this.options.closeCollectionOnClose)&&this.collection.close();this.collection=null}if(null!==this.referenceModelView){a.each(this.referenceModelView,function(t,r){a.each(t,function(t,n){delete e.referenceModelView[r][n];e.onModelRemoved(t);t.stopListening(t,"close",e.destroyViewCallback);t.close()})});this.referenceModelView=null}if(this.model){if(this.options){!0===this.options.removeModelOnClose&&!0==!!this.collection&&this.collection.remove(this.model);!1!==this.options.closeModelOnClose&&"close"in this.model&&this.model.close()}else"close"in this.model&&this.model.close();this.model=null}this.onClose()};t.prototype.create=function(){var e=this;if(!0===this.isDispatch)return this.$el;if(!0===this.isCreating)return this.createPromise;var t=this.render();if(t instanceof l){this.isCreating=!0;return this.createPromise=t.then(function(t){e.isCreating=!1;return e.$el})}return this.$el};t.prototype.clear=function(){n.default.clear(this.options.listSelector)};t.prototype.empty=function(){var e=this;if(null!==this.referenceModelView){a.each(this.referenceModelView,function(t,r){a.each(t,function(t,n){delete e.referenceModelView[r][n];e.onModelRemoved(t);t.stopListening(t,"close",e.destroyViewCallback);t.close()})});this.referenceModelView={};"listSelector"in this.options&&(this.referenceModelView[this.options.listSelector]={})}};t.prototype.reset=function(e){this.removeUnusedModelView(e);a.each(e.models,function(e){this.addModel(e)}.bind(this));this.updateCollection()};t.prototype.removeUnusedModelView=function(e){e=e||this.collection;var t=this.referenceModelView[this.options.listSelector];t&&a.each(t,function(r,n){if(!e.get(n)){r.close();delete t[n]}})};t.prototype.addModel=function(e){var t=this;if(!1!==this.isCollectionRendered){this.options.listSelector in this.referenceModelView||(this.referenceModelView[this.options.listSelector]={});if(!(e.cid in this.referenceModelView[this.options.listSelector])){if(null===this.options.ModelView)throw new Error("a collection view needs a ModelView passed on instantiation through the options");var r=this.options.ModelView,n=this.formatModelViewOptions(o.extend({},this.options.ModelViewOptions,{model:e,parentView:this})),i=new r(n),a=i.create(),s=function(r){t.pendingViewModel.push(r);t.options.listSelector in t.referenceModelView||(t.referenceModelView[t.options.listSelector]={});t.referenceModelView[t.options.listSelector][e.cid]=i;t.onModelAdded(i);e.listenToOnce(e,"close:model",t.removeModelCallback);return r};if(a instanceof l){this.pendingViewModelPromise.push(a);return a.then(s)}return l.resolve(s(a))}var u=this.referenceModelView[this.options.listSelector][e.cid].$el;this.pendingViewModel.push(u)}};t.prototype.formatModelViewOptions=function(e){return e};t.prototype.removeModel=function(e){var t=this.referenceModelView[this.options.listSelector][e.cid];if(void 0===t)return t;e.stopListening(e,"close:model",this.removeModelCallback);delete this.referenceModelView[this.options.listSelector][e.cid];this.onModelRemoved(t);t.stopListening(t,"close",this.destroyViewCallback);t.isClose||t.close();return t};t.prototype.sortModel=function(e){var t=this;void 0===e&&(e=null);if(this.pendingViewModel.length||this.pendingViewModelPromise.length||!1===this.isDispatch)this.waitingForSort=!0;else{if(!(e instanceof o)||null===e){e=this.$el.find(this.options.listSelector);if(0===e.length){e=this.$el.filter(this.options.listSelector);if(0===e.length)return}}
9var r=e.css("display")||"";e.css("display","none");a.each(this.collection.models,function(r){var n=t.referenceModelView[t.options.listSelector][r.cid];e.append(n.$el)});e.css("display",r)}};t.prototype.updateCollection=function(e){var t=this;void 0===e&&(e=null);if(this.pendingViewModelPromise.length){if(this.updatePromise){this.updatePromise.abort();this.updatePromise=null}this.updatePromise=l.all(this.pendingViewModelPromise).then(function(){t.updatePromise=null;t.pendingViewModelPromise=[];t._updateCollection(e)})}else this._updateCollection(e)};t.prototype._updateCollection=function(e){void 0===e&&(e=null);if(!1!==this.isDispatch){if(null===e||!(e instanceof o)){e=this.$el.find(this.options.listSelector)
10;0===e.length&&0===(e=this.$el.filter(this.options.listSelector)).length&&(e=o())}var t=e.css("display")||"";e.css("display","none");e.append(this.pendingViewModel);this.pendingViewModel.splice(0,this.pendingViewModel.length);if(this.waitingForSort){this.sortModel(e);this.waitingForSort=!1}e.css("display",t)}else this.waitingForUpdateCollection=!0};t.prototype.addView=function(e,t){var r=this,n=this.$el.css("display")||"";this.$el.css("display","none");var i;if("string"!=typeof e){i={};a.each(e,function(e,t){i[t]=r._addView(t,e)})}else i=this._addView(e,t);this.$el.css("display",n);return i};t.prototype._addView=function(e,t,r){var n=this;void 0===r&&(r=this.$el);e in this.referenceModelView||(this.referenceModelView[e]={});var i=function(t){n.referenceModelView[e][t.cid]=t;if(!0===n.isDispatch||r!==n.$el){var i=r.find(e);0===i.length&&0===(i=r.filter(e)).length&&(i=o());i.append(t.$el);t.stopListening(t,"close",n.destroyViewCallback);t.listenToOnce(t,"close",n.destroyViewCallback);if(!1===t.isDispatch){var a=t.$el,s=t.create();if(s instanceof l)return s.then(function(e){a.parent().length>0&&a.replaceWith(e);return e});a.replaceWith(s);return s}return t.$el}};return t instanceof Array?t.map(i):i(t)};t.prototype.onDestroySubView=function(e){var t=this;a.each(this.referenceModelView,function(r,n){a.each(r,function(r,i){if(r===e){delete t.referenceModelView[n][i];t.onModelRemoved(r)}})})};t.prototype.prepareAddedView=function(e){return e};t.prototype.onInitialize=function(){};t.prototype.onInitializeStart=function(){};t.prototype.onRender=function(){};t.prototype.onRenderStart=function(){};t.prototype.onRenderAll=function(){};t.prototype.onModelAdded=function(e){};t.prototype.onModelRemoved=function(e){};t.prototype.onClose=function(){};t.prototype.onCloseStart=function(){};t.defaultOptions={removeModelOnClose:!0,reRenderOnChange:!1,listSelector:".list",templateVariables:{},ModelView:null,ModelViewOptions:{},closeModelOnClose:!0,closeCollectionOnClose:!0,subviewAsyncRender:!1};return t}(i.View);t.View=u;t.default=u});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("ribsjs/ribs",["require","exports","./adapter","./collection","./container","./controller","./eventsManager","./model","./router","./view","./viewHelper"],e)}(function(e,t){"use strict";function r(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0});r(e("./adapter"));r(e("./collection"));r(e("./container"));r(e("./controller"));r(e("./eventsManager"));r(e("./model"));r(e("./router"));r(e("./view"));r(e("./viewHelper"))});define("ribsjs",["ribsjs/ribs"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/error/error",["require","exports"],e)}(function(e,t){"use strict";
10Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(r,n){var i=e.call(this,r)||this;n&&"userData"in n&&n.userData&&"bundledModels"in n.userData&&delete n.userData.bundledModels;i.name="JamendoError";i.oMessage=r;i.options=n;i.oStack=i.stack;Object.setPrototypeOf(i,t.prototype);return i}__extends(t,e);t.prototype.toString=function(){return this.name+": "+this.message+"\n"+this.stack};t.prototype.toJSON=function(){return{name:this.name,message:this.message,options:this.options,stack:this.stack}};t.prototype.valueOf=function(){return this.toJSON()};return t}(Error);r.prototype["[util.inspect.custom]"]=function(){return this.toString()};t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/configuration/errorDefinitions",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NOT_FOUND:{httpCode:404,errorCode:0,message:"NOT_FOUND"},MOVED_PERMANENTLY:{httpCode:301,errorCode:0,message:"MOVED_PERMANENTLY"},UNKNOWN_SERVER_ERROR:{httpCode:500,errorCode:1,message:"UNKNOWN_SERVER_ERROR"},INVALID_ADAPTER:{httpCode:500,errorCode:0,message:"INVALID_ADAPTER"},TOKEN_INVALID:{httpCode:500,errorCode:12,message:"TOKEN_INVALID"},NOT_CONNECTED:{httpCode:401,errorCode:21,message:"NOT_CONNECTED"},CANT_GENERATE_TOKEN:{httpCode:401,errorCode:21,message:"CANT_GENERATE_TOKEN"},NO_NETWORK:{httpCode:0,errorCode:0,message:"NO_NETWORK"},"Jamendo Api Invalid User Error: Email provided is not valid.":{httpCode:400,errorCode:21,message:"FEEDBACK_METADATA_invalid_email"},"Jamendo Api Invalid User Error: User already exists.":{httpCode:500,errorCode:21,message:"_TKEY_WWW_SIGNUP_error-user-exists"},UPLOAD_SERVER_ERROR_need_login:{httpCode:500,errorCode:101,message:"UPLOAD_SERVER_ERROR_need_login"},UPLOAD_SERVER_ERROR_invalid_request:{httpCode:500,errorCode:102,message:"UPLOAD_SERVER_ERROR_invalid_request"},UPLOAD_SERVER_ERROR_access_token_expired:{httpCode:500,errorCode:103,message:"UPLOAD_SERVER_ERROR_access_token_expired"},OLD_BROWSER:{httpCode:425,errorCode:0,message:"OLD_BROWSER"}};t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/configuration/configuration",["require","exports","./bootLoader"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./bootLoader"),n={api:{clientApiEntryPoint:"api",chunkSize:200,maxRetryNumber:0,url:"",getUrl:function(e){return r.getValue(r.Properties.HostApi)+"/"+this.clientApiEntryPoint+"/"+e},methods:{albums:"albums",artists:"artists",charts:"charts",chartsTrack:"charts/track",chartsAlbum:"charts/album",chartsArtist:"charts/artist",contact:"contact",history:"history/player",favorite:"favorites",favoriteAlbum:"favorites/album",favoriteArtist:"favorites/artist",favoritePlaylist:"favorites/playlist",favoriteTrack:"favorites/track",favoriteUser:"favorites/user",legals:"legals",oauth:"oauth",oauthConnect:"oauth/connect",oauthGrant:"oauth/grant",oauthSocialMerge:"oauth/social/merge",oauthSocialReset:"oauth/social/reset",playlists:"playlists",playlistsFeatured:"playlists/featured",posts:"wallposts",postsback:"posts",radios:"radios",radiosPlanning:"radios/planning",reviews:"reviews",reviewsSentiment:"reviews/sentiment",search:"search",similars:"similarities",similarsAlbum:"similarities/album",similarsArtist:"similarities/artist",similarsTrack:"similarities/track",similarsAlbumBack:"similars/album",similarsArtistBack:"similars/artist",similarsTrackBack:"similars/track",static:"static",staticCountry:"static/country",template:"templates",track:"tracks",translation:"translate",translationback:"translations",user:"users",userAvatar:"users/avatar",userHero:"users/hero",artistHero:"artists/hero",userPassword:"users/password",tags:"tags",update:"update"}},notificationSystem:{hideUI:!1,debugLog:!1,maxDisplayedNotifications:99,disabled:!0,proxyPublisher:{hostname:"notif.jamendo.com",port:8080,reconnectTimeout:void 0,protocol:"https",notificationChannelName:void 0}},update:{liveUpdateStartAfterAppLaunch:15e4,crcCalculator:{cacheTimeout:6048e5,bug:"fix"},updateUrgency:{requestHeaderName:"X-Jam-Version",responseHeaderName:"X-Jam-Update-Urgency",responseHeaderValues:{mandatory:"M",recommended:"R"},currentVersion:parseInt("288174867"),recommendedVersion:parseInt("288174867"),mandatoryVersion:1,versionRadix:36,udpateRecommendedOverlayInterval:600}},application:{websiteName:"Jamendo Music",websiteLogo:"https://images.jamendo.com/logo/logo-hd-jamendo-music.jpg",deploymentEnvironment:"production",websiteProtocol:"https://",websiteHostname:"www.jamendo.com",appStoreLinks:{android:"https://play.google.com/store/apps/details?id=com.jamendo&hl=en",ios:"https://itunes.apple.com/us/app/jamendo/id319042726?mt=8"},acceptedLanguages:["en","fr","de","es","it","pl","pt","ru"],featuredRadio:["bestof","pop","rock","electro","hiphop","indie","jazz","classical","folk","lounge","country","relaxation"],musicForVideosPlaylistId:500305299,chartsFilter:{BestOf:"bestOf",Trending:"trending",Latest:"latest"},artistsFilter:{MostPopular:"mostpopular",Latest:"latest"},reviewsFilter:{MostPopular:"mostpopular",Latest:"latest"},countriesFilter:["FRA","RUS","ITA","USA","DEU","ESP","GBR","UKR","POL","BRA"],reviewsMaxChars:250,biographyMaxChars:2e3,formatStream:["ogg","mp3","mp32","mp33"],formatStreamType:{ogg:"audio/ogg",mp3:"audio/mp3",mp32:"audio/mp3",mp33:"audio/mp3"},favorites:{delayRequest:0},templates:{delayRequest:0},facebookAppId:113060231172,community:{artistLimit:10,albumLimit:10,trackLimit:10},shortUrl:{album:"https://jamendo.com/album/%s",artist:"https://jamendo.com/artist/%s",community:"https://jamendo.com/community/%s",playlist:"https://jamendo.com/playlist/p%s",radio:"https://jamendo.com/radios/%s",retrospective:"https://www.jamendo.com%s",track:"https://jamendo.com/track/%s"},playlist:{requestLimit:8,maxTracksPerPlaylist:200},guiMessages:{disappearAfter:5e3},reviewAnswersToLoadOnMoreButtonClick:10,pageTitle:[{type:"part",partName:"UnreadNotificationCount",renderer:function(e){return e>99?"(99+)":e>0?"("+e+")":""}},{type:"static",text:" ",shouldRender:function(e){return e("UnreadNotificationCount")>0}},{type:"part",partName:"MainTitle",renderer:function(e,t){var r=(t("SiteName")||"").trim();0===(e||"").trim().length&&0===r.length&&(e="Jamendo Music");return e}},{type:"static",text:" | ",shouldRender:function(e){return e("MainTitle")&&e("MainTitle").trim().length>0&&e("SiteName")&&e("SiteName").trim().length>0}},{type:"part",partName:"SiteName",renderer:function(e){return e}}],player:{highBandwidth:60},getLocales:function(){return this.acceptedLanguages.map(function(e){return"pt"===e?"pt_BR":"en"===e?"en_US":e.toLowerCase()+"_"+e.toUpperCase()})},legacyUserAuthDeprecatedAfter:1396359e6},inStoreFreeTrial:{durationInWeeks:2},client:{user:{avatar:{size:{height:600,width:600}},preference:{defaultMusicEncodage:"mp3"}},view:{minimumDistanceToSwipe:50}},controller:{search:{formDelayThrottle:250,countElementsPerCategory:10}},cookies:{application:{name:"jamapplication",duration:7},connection:{name:"jammusicconnection",duration:1},feedback:{name:"jammusicfeedback",duration:1},lang:{name:"jammusiclang",duration:30},me:{name:"jammusicme",duration:1},message:{name:"jammusicmessage",duration:1},session:{name:"jammusicsession",duration:365},social:{name:"jammusicsocial",duration:1},toast:{name:"jammusictoast",duration:1},cookieBanner:{name:"jamAcceptCookie",duration:9999},welcomeVersion:{name:"jamversion",duration:1}},history:{defaultTrackFormat:"mp31",contextName:"jamendo-browser",contextVersion:"master"},indexedDb:{object:{isActive:!0,deleteInLoad:!1,options:{prefix:"production:object:",dbName:"jamendomusic",dbVersion:parseInt("994137531")/1e3},expire:{default:3e5,short:18e5,medium:72e5,long:36e6,infinity:Number.POSITIVE_INFINITY},timeout:1e3}},server:{protocol:"https",checkH:"X-Jam-Call",requestDelayTimeout:2e4},social:{facebook:{appId:"113060231172",appNamespace:"jamendomusic",avatarUrl:"https://graph.facebook.com/%s/picture?height=196&width=196&type=large"},google:{clientId:"1028708766187.apps.googleusercontent.com",userUrl:""},twitter:{consumerKey:"tvpGs8xW7WjDBktr5Oqfw",siteUrl:"https://api.twitter.com/oauth",authorizeUrl:"https://api.twitter.com/oauth/authenticate"},reddit:{callbackUrl:"http://local.www2.jamendo.com/oauth/reddit/redirect",clientId:"0pvPL6Z92ycerQ",clientSecret:"CPe0THjFzAgpTsgwNKmrLatUxx4",userUrl:""},apple:{clientId:"com.jamendo.music.appleid-signin",clientIdMobile:"lu.nfs.jamendoplayer",scope:"name email",state:"oauth-apple",signInBtnUri:"https://appleid.cdn-apple.com/appleid/button?type=sign-in&height=64&width=268&color=black&border=true&border_radius=5",signUpBtnUri:"https://appleid.cdn-apple.com/appleid/button?type=sign-up&height=32&width=375&color=black&border=true&border_radius=3",redirectUri:"https://www.jamendo.com/oauth/apple/redirect"}}
10,views:{helpers:{translate:{keyIfNull:!0}}},abTesting:{optimize:{id:"GTM-PW5RK8",bug:"fix"}},tracker:{endpoint:"https://stats-api.jamendo.com/",monitoring:{search:{minimumResult:15},resources:{notificationSystem:{duration:1e4}}}}};t.default=n});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("chrisweb-utilities/utilities",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(t){function r(e,t,r,n){if(null===document.getElementById("log")){var i=document.createElement("div");i.id="log";i.style.cssText="position: absolute; overflow: scroll; left: 0; bottom: 0; padding: 0; margin: 0; border: 0; z-index: 999999; width: 100%; height: 20%; background-color: #fff;";document.body.appendChild(i)}for(var o=0;o<t;o++){var a=document.createElement("span");a.style.cssText="color: #"+r+"; background-color: #"+n+";";var s=document.createTextNode(e[o]);a.appendChild(s);document.getElementById("log").appendChild(a);var l=document.createElement("br");document.getElementById("log").appendChild(l)}}function n(t,r,n){try{for(var i=e("winston"),o=0;o<r;o++)switch(n){case"red":i.error(t[o]);break;case"yellow":i.warn(t[o]);break;default:i.info(t[o])}}catch(e){}}function i(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];if("undefined"!=typeof console){var l=s(e),u=l.objects,c=l.fontColor,d=l.backgroundColor,p=u.length;if("undefined"==typeof window){if(void 0!==t.logVerbose&&!0===t.logVerbose)for(var f=a(c,d),h=0;h<p;h++)"string"==typeof u[h]?console.log(f.background+f.font+u[h]+f.reset):console.log(u[h]);(void 0!==t.logSpecial&&!0===t.logSpecial||"red"===c)&&n(u,p,c)}else{var f=o(c,d);if(void 0!==t.logVerbose&&!0===t.logVerbose)for(var m=0;m<p;m++)"string"==typeof u[m]?console.log("%c"+u[m],"background: #"+f.background+"; color: #"+f.font):console.log(u[m]);void 0!==t.logSpecial&&!0===t.logSpecial&&r(u,p,f.font,f.background)}}}function o(e,t){var r,n,i={red:"FF0000",green:"00FF00",yellow:"FFFF00",blue:"0000FF",magenta:"FF00FF",cyan:"00FFFF",white:"FFFFFF",black:"000000"};if(void 0===e||"default"===e)r=i.black;else{if(void 0===i[e])throw"unknown fontColor in utilities console log";r=i[e]}if(void 0===t||"default"===t)n=i.white;else{if(void 0===i[t])throw"unknown fontColor in utilities console log";n=i[t]}return{font:r,background:n}}function a(e,t){var r,n,i={black:"�[40m",red:"�[41m",green:"�[42m",yellow:"�[43m",blue:"�[44m",magenta:"�[45m",cyan:"�[46m",white:"�[47m"},o={black:"�[30m",red:"�[31m",green:"�[32m",yellow:"�[33m",blue:"�[34m",magenta:"�[35m",cyan:"�[36m",white:"�[37m"};if(void 0===e||"default"===e)r=o.white;else{if(void 0===o[e])throw"unknown font color in utilities console log";r=o[e]}if(void 0===t||"default"===t)n=i.black;else{if(void 0===i[t])throw"unknown background color in utilities console log";n=i[t]}return{font:r,background:n,reset:"�[0m"}}
10function s(e){for(var r=[],n=t.logFontColor,i=t.logBackgroundColor,o=e.length,a=0;a<o;a++){var s=e[a];"string"==typeof s?"fontColor:"===s.substr(0,10)?n=s.substr(10,s.length).trim():"backgroundColor:"===s.substr(0,16)?i=s.substr(16,s.length).trim():r.push(s):r.push(s)}return{objects:r,fontColor:n,backgroundColor:i}}function l(e,t){void 0===t&&(t=!1);if(!1===t)e=e.replace(/<[^>]*>?/g,"");else{e=e.replace(/<[^>]*>[^>]*<\/[^>]*>?/g,"");e=e.replace(/<[^>]*>?/g,"")}return e}function u(e,t,r){var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"};if(void 0===t||!0===t){var i={"&lsquo;":"‘","&rsquo;":"’","&sbquo;":"‚","&ldquo;":"“","&rdquo;":"”","&bdquo;":"„","&dagger;":"†","&Dagger;":"‡","&permil;":"‰","&lsaquo;":"‹","&rsaquo;":"›","&ndash;":"-","&mdash;":"—","&nbsp;":" ","&iexcl;":"¡","&cent;":"¢","&pound;":"£","&curren;":"¤","&yen;":"¥","&brvbar;":"¦","&brkbar;":"¦","&sect;":"§","&uml;":"¨","&die;":"¨","&copy;":"©","&ordf;":"ª","&laquo;":"«","&not;":"¬","&shy;":" ","&reg;":"®","&macr;":"¯","&hibar;":"¯","&deg;":"°","&plusmn;":"±","&sup2;":"²","&sup3;":"³","&acute;":"´","&micro;":"µ","&para;":"¶","&middot;":"·","&cedil;":"¸","&sup1;":"¹","&ordm;":"º","&raquo;":"»","&frac14;":"¼","&frac12;":"½","&frac34;":"¾","&iquest;":"¿"};for(var o in i)n[o]=i[o]}if(void 0!==r)for(var o in r)n[o]=r[o];var a=function(e){return n[e]},s=Object.keys(n),u="(?:"+s.join("|")+")",c=RegExp(u),d=RegExp(u,"g");e=null==e?"":""+e;return l(c.test(e)?e.replace(d,a):e,!1)}function c(){for(var e=[],t="0123456789abcdef",r=0;r<36;r++)e[r]=t.substr(Math.floor(16*Math.random()),1);e[14]="4";e[19]=t.substr(3&e[19]|8,1);e[8]=e[13]=e[18]=e[23]="-";return e.join("")}function d(e,t){if("string"==typeof e&&e.length>0){var r=void 0;if(void 0!==t){var n=RegExp("[^a-z0-9"+t+"]","gi");r=e.replace(n,"")}else r=e.replace(/[^a-z0-9]/gi,"");return r}return!1}function p(e){return decodeURIComponent(e.replace("/+/g"," "))}function f(e){return encodeURIComponent(e)}function h(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1);return e}function m(e){return e.charAt(0).toUpperCase()+e.slice(1)}function y(e){if(void 0===e){if(void 0===window)throw"you must provide a query to parse";e=window.location.search.substring(1)}var t=/([^&=]+)=?([^&]*)/g,r={},n=t.exec(e);if(n)for(var i=0;i<=n.length;i++){var o=n[i];r[p(o[1])]=p(o[2])}return r}function g(e,t){if("string"!=typeof e)throw"input is not a string";return e.indexOf(t)>-1}function v(e,t,r){var n=0,i=0;0===r&&(r=1);for(;n<r&&-1!==i;){i=e.indexOf(t,i+1);n++}return i}function _(){return"object"==typeof global}function b(){return!_()}function w(e,t){var r=e;"string"==typeof e&&"object"==typeof t&&(r=e.replace(/\b\w+?\b/g,function(e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:e}));return r}function x(e,t){t||(t=window.location.href);e=e.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),n=r.exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}function M(e,t,r){var n=new RegExp("\\b("+t+"=).*?(&|$)");return e.search(n)>=0?e.replace(n,"$1"+r+"$2"):e+(e.indexOf("?")>0?"&":"?")+t+"="+r}t.version="0.0.4";t.logFontColor="default";
10t.logBackgroundColor="default";t.logSpecial=!1;t.logVerbose=!0;t.htmlLog=r;t.fileLog=n;t.log=i;t.removeElements=l;t.safeUnescape=u;t.generateUUID=c;t.filterAlphaNumericPlus=d;t.decodeUri=p;t.encodeUri=f;t.arrayRemove=h;t.capitaliseFirstLetter=m;t.getUrlParameters=y;t.stringContains=g;t.getSubstringIndex=v;t.isServer=_;t.isClient=b;t.replacePlaceholders=w;t.getUrlParameterByName=x;t.replaceUrlParameter=M}(r=t.utilities||(t.utilities={}));t.default=r});define("chrisweb-utilities",["chrisweb-utilities/utilities"],function(e){return e});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/array",["require","exports","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("underscore");!function(e){!function(e){!function(e){function t(e,t){for(var r=e.concat(t),i=0;i<r.length;i++)for(var o=i+1;o<r.length;o++)if(n.isEqual(r[i],r[o])){r.splice(o,1);o--}return r}function r(e,t){for(var r=0;r<e.length;r++){var i=function(r){if(-1===n.findIndex(t,function(t){return n.isEqual(t,e[r])}))return{value:!1}}(r);if("object"==typeof i)return i.value}return!0}function i(e,t){var r=[[]],n=0,i=0;e.map(function(e,o){var a=JSON.stringify(e).length;if(a+i>t){n++;i=0;r.push([])}i+=a;r[n].push(e)});return r}e.arrayUnion=t;e.arrayContainsAnotherArray=r;e.chunk=i}(e.Array||(e.Array={}))}(e.Utilities||(e.Utilities={}))}(r||(r={}));t.default=r.Utilities.Array});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/object",["require","exports","underscore","ribsjs","jquery","FSPromise"],e)}(function(e,t){"use strict";function r(e){e&&Object.keys(e).map(function(t){if(e.hasOwnProperty(t)){e[t]=null;delete e[t]}})}function n(e,t){void 0===t&&(t=[]);e&&Object.keys(e).map(function(r){if(e.hasOwnProperty(r))if(e[r]instanceof Array){var o=e[r];e[r]=null;delete e[r];-1===t.indexOf(r)&&i(o,t)}else if(e[r]instanceof Function||!(e[r]instanceof Object)||e[r]instanceof u){e[r]=null;delete e[r]}else{var a=e[r];e[r]=null;delete e[r];-1===t.indexOf(r)&&n(a,t)}})}function i(e,t){void 0===t&&(t=[]);if(e)for(;e.length;){var r=e.pop();r instanceof Array?i(r,t):"object"==typeof r&&n(r,t)}}function o(e,t){void 0===t&&(t=[]);d.resolve().then(function(){n(e,t)})}function a(e){e instanceof l.Model?e.close():e instanceof l.Collection?e.close():e instanceof Array&&s.clone(e).forEach(a)}Object.defineProperty(t,"__esModule",{value:!0});var s=e("underscore"),l=e("ribsjs"),u=e("jquery"),c=e("FSPromise"),d=c.FSPromise;t.cleanObject=r;t.cleanObjectRecursively=n;t.cleanArrayRecursively=i;t.asyncCleanObjectRecursively=o;t.closeModel=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/model/model",["require","exports","ribsjs","../utilities/object"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("../utilities/object"),i=function(e){function t(t,r){var n=this;r&&r.data&&r.xhr&&(r={});n=e.call(this,t,r)||this;return n}__extends(t,e);t.prototype.close=function(){e.prototype.close.call(this);n.cleanObject(this);this.isClose=!0};return t}(r.Model);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/abstractManager",["require","exports","underscore","ribsjs","FSEventDispatcher","FSPromise","../library/error/error","../configuration/errorDefinitions","../configuration/configuration","chrisweb-utilities","../library/utilities/array","../library/model/model"],e)}(function(e,t){"use strict";
10Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("FSEventDispatcher"),o=e("FSPromise"),a=o.FSPromise,s=e("../library/error/error"),l=e("../configuration/errorDefinitions"),u=e("../configuration/configuration"),c=e("chrisweb-utilities"),d=e("../library/utilities/array"),p=e("../library/model/model");t.referencesManager={};var f=function(e){function t(t){var r=e.call(this)||this;r.collection=new n.Collection;r.fetcherPlugins=[];r.table=t;return r}__extends(t,e);t.prototype.addFetcher=function(e){this.fetcherPlugins.push(e)};t.prototype.preFetchHook=function(e){return a.resolve(e)};t.prototype.postFetchHook=function(e){return a.resolve(e)};t.prototype.fetch=function(e){var t=this,r=this.preFetchHook(e);this.fetcherPlugins.forEach(function(e){r=r.then(function(t){return e.preFetchHook(t).then(function(t){return e.fetch(t).then(function(t){return e.postFetchHook(t)})})})});return r.then(function(e){return t.postFetchHook(e).then(function(e){return t.fetchedAll(e)})})};t.prototype.fetchedAll=function(e){if(c.default.isServer()&&!e.options.noBundle){this.bundleModels(e);this.bundleQuerys(e)}var t=[];this.fetcherPlugins.forEach(function(r){t.push(r.fetchedAll(e))});return a.all(t).then(function(){return e})};t.prototype.remove=function(e){var t=this,r=this.preRemoveHook(e);this.fetcherPlugins.forEach(function(e){r=r.then(function(t){return e.preRemoveHook(t).then(function(t){return e.remove(t).then(function(t){return e.postRemoveHook(t)})})})});return r.then(function(e){return t.postRemoveHook(e).then(function(e){return t.removedAll(e)})})};t.prototype.preRemoveHook=function(e){return a.resolve(e)};t.prototype.postRemoveHook=function(e){return a.resolve(e)};t.prototype.removedAll=function(e){var t=this.fetcherPlugins.map(function(t){return t.removedAll(e)});return a.all(t).then(function(){return e})};t.prototype.updateModel=function(e){var t=this.fetcherPlugins.map(function(t){return"function"==typeof t.updateModel?t.updateModel(e):a.resolve(void 0)});return a.all(t)};t.prototype.bundleModels=function(e){e.options.userData.bundledModels||(e.options.userData.bundledModels={});var t=e.options.userData.bundledModels||{};t[this.table]||(t[this.table]={models:[],query:[]});t[this.table].models=r.union(t[this.table].models,e.modelsAlreadyFetched)};t.prototype.bundleQuerys=function(e){};return t}(i.default);t.ADataFetcher=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.bundleQuerys=function(e){var t=this,r=e.options.userData.bundledModels;e.dataOfModelsNotFetched.forEach(function(n){r[t.table].query.push({data:n,model:"["+e.modelsAlreadyFetched.map(function(e){return JSON.stringify(e.toJSON())}).join(",")+"]",options:{dataParameters:e.options.dataParameters}})})};return t}(f);t.ADataFetcherQueryBundler=h;var m=function(e){function n(){var r=e.call(this)||this;r.attachFetcher();r.requestQueue=[];r.options={projection:p.default,keepAlive:!1,twoWay:!1,fetchById:!1,userData:null};t.referencesManager[r.NAME]=r;return r}__extends(n,e);Object.defineProperty(n.prototype,"NAME",{get:function(){return"AbstractManager"},enumerable:!0,configurable:!0});n.prototype.attachFetcher=function(){this.fetcher=new f(this.NAME)};n.prototype.findPendingRequest=function(e,t){var n=null,i=t||1===e.length&&(r.isEmpty(e[0])||Object.keys(e[0]).length>1);if(!i)for(var o=0;o<this.requestQueue.length;o++){var a=this.requestQueue[o];if(!1===a.isLock)return this.requestQueue[o]}if(!n){n={dataQueue:[],promiseQueue:[],fetchPromise:null,remainingDispatch:0,queuePromise:null,isLock:i};this.requestQueue.unshift(n)}return n};n.prototype.add=function(e){return this.fetcher.collection.add(e)};n.prototype.get=function(e,t){t=r.extend({},this.options,t,{fetchById:!0});return this.getByAttribute({id:e},t)};n.prototype.getByAttribute=function(e,t){var n=this;t=r.extend({},this.options,t);var i=[];e instanceof Array||(e=[e]);e.forEach(function(e){if(e.id instanceof Array)e.id.forEach(function(t){var n=r.clone(e);n.id=isNaN(t)?t:parseInt(t,10);i.push(n)});else{if("id"in e){var t=e.id;e.id=isNaN(t)?t:parseInt(t,10)}i.push(e)}});var o=this.findPendingRequest(i,t.autolock);o.promiseQueue.push(new a(function(e,t){o.dataQueue=d.default.arrayUnion(o.dataQueue,i);o.remainingDispatch+=1;e()}));o.queuePromise||(o.queuePromise=new a(function(e,t){setTimeout(e,0)}).then(function(){o.isLock=!0;return a.all(o.promiseQueue).then(function(){return n.preFetchRequest()})}).then(function(){if(o.fetchPromise)return o.fetchPromise;if(t.fetchById){var e=d.default.chunk(o.dataQueue,u.default.api.chunkSize);o.fetchPromise=a.all(e.map(function(e,r){var i={modelsAlreadyFetched:[],dataOfModelsNotFetched:e,options:t};return n.fetcher.fetch(i)})).then(function(e){var r=function(e,t,r,n){e.modelsAlreadyFetched.push.apply(e.modelsAlreadyFetched,t.modelsAlreadyFetched);return e};return e.reduce(r,{modelsAlreadyFetched:[],dataOfModelsNotFetched:[],options:t})})}else o.fetchPromise=n.fetcher.fetch({modelsAlreadyFetched:[],dataOfModelsNotFetched:o.dataQueue,options:t});return o.fetchPromise}));return new a(function(e,a){o.queuePromise.then(function(a){o.remainingDispatch-=1;o.remainingDispatch||(n.requestQueue=r(n.requestQueue).without(o));var s=[];
10i.forEach(function(e,n){a.modelsAlreadyFetched.forEach(function(n){n&&r.isMatch(n.attributes,e)&&s.push(n.getModelProjection(t.projection,t.keepAlive,t.twoWay))})});e(s)}).catch(function(e){if(!(e instanceof s.default)){var t=new s.default(e.message,{originalErrorStack:e.stack,userData:n.options.userData});"constructor"in e||(t.options.originalErrorType=e.constructor.name);e=t}n.requestQueue=r(n.requestQueue).without(o);l.default.UNKNOWN_SERVER_ERROR.message;"No Transport"===e.message&&l.default.INVALID_ADAPTER.message;a(e)})})};n.prototype.preFetchRequest=function(){return a.resolve()};n.get=function(e){return t.referencesManager[e]};n.prototype.update=function(e,t,r){var n=this;if("success"in r){var i=r.success;r.success=function(e,t,o){n.fetcher.fetchedAll({modelsAlreadyFetched:[e],options:r,dataOfModelsNotFetched:[]}).then(function(){i(e,t,o)}).catch(function(){i(e,t.savedOptions)})}}this.fetcher.updateModel(e).then(function(){n.saveModel(e,t,r)}).catch(function(e){throw new s.default(e)})};n.prototype.saveModel=function(e,t,r){e.modelSource?e.modelSource.save(t,r):e.save(t,r)};return n}(i.default);t.ADataManager=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/albums",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"album"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new r.ADataFetcherQueryBundler(this.NAME)};t.prototype.saveModel=function(e,t,r){r.success(e,void 0,r)};return t}(r.ADataManager);t.AlbumsManager=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/artists",["require","exports","./abstractManager","chrisweb-utilities","underscore","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("chrisweb-utilities"),i=e("underscore"),o=e("FSPromise"),a=o.FSPromise,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.preFetchHook=function(e){n.default.isClient()&&(e.options.dataParameters=i.extend({noPopular:!0},e.options.dataParameters));return a.resolve(e)}
11;return t}(r.ADataFetcherQueryBundler),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"artist"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new s(this.NAME)};t.prototype.saveModel=function(e,t,r){r.success(e,void 0,r)};return t}(r.ADataManager);t.ArtistsManager=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/charts",["require","exports","underscore","./abstractManager","../configuration/configuration","FSPromise"],e)}(function(e,t){"use strict";
11Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./abstractManager"),i=e("../configuration/configuration"),o=e("FSPromise"),a=o.FSPromise,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"charts"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new n.ADataFetcherQueryBundler(this.NAME)};t.prototype.getUrlApi=function(e){return i.default.api.getUrl(i.default.api.methods["charts"+e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()])};t.prototype.getByAttribute=function(t,n){n=r.extend({},this.options,n);if("type"in t||n.dataParameters&&"type"in n.dataParameters){var i="type"in t?t.type:n.dataParameters.type;n=r.extend({url:this.getUrlApi(i)},n)}return e.prototype.getByAttribute.call(this,t,n)};t.prototype.preFetchRequest=function(){return new a(function(e,t){setTimeout(e,i.default.application.favorites.delayRequest)})};t.prototype.findPendingRequest=function(e){var t=null;if("id"in e[0]&&"type"in e[0])for(var r=e[0].type,n=0;n<this.requestQueue.length;n++){var i=this.requestQueue[n];if(!1===i.isLock&&(0===i.dataQueue.length||i.dataQueue[0].type===r))return this.requestQueue[n]}if(!t){t={dataQueue:[],promiseQueue:[],fetchPromise:null,remainingDispatch:0,queuePromise:null,isLock:!1};this.requestQueue.unshift(t)}return t};return t}(n.ADataManager);t.ChartsManager=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/favorites",["require","exports","./abstractManager","underscore","../configuration/configuration","../library/model/model","FSPromise","../library/error/error"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("underscore"),i=e("../configuration/configuration"),o=e("../library/model/model"),a=e("FSPromise"),s=a.FSPromise,l=e("../library/error/error"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.bundleModels=function(t){e.prototype.bundleModels.call(this,t);var r=t.options.userData.bundledModels,i=t.dataOfModelsNotFetched.filter(function(e){return!!e.id&&!!e.userId}).map(function(e){return new o.default({favorite:0,id:e.id,type:e.type,userId:e.userId})});r[this.table].models=n.union(r[this.table].models,i)};t.prototype.bundleQuerys=function(e){var t=this,r=e.options.userData.bundledModels;e.dataOfModelsNotFetched.forEach(function(n){n.id||r[t.table].query.push({data:n,model:"["+e.modelsAlreadyFetched.map(function(e){return JSON.stringify(e.toJSON())}).join(",")+"]",options:{dataParameters:e.options.dataParameters,url:"/"+n.type}})})};return t}(r.ADataFetcher),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"favorite"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new u(this.NAME)};t.prototype.getUrlApi=function(e){return i.default.api.getUrl(i.default.api.methods["favorite"+e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()])};t.prototype.addFavorite=function(e,t){var r=this,i=t.success;t.success=function(e,t,n){r.fetcher.fetchedAll({modelsAlreadyFetched:[e],dataOfModelsNotFetched:[],options:n}).then(function(){i&&i(e,t,n)}).catch(function(e){var t=new l.default("Error during fetching all data for favorites",{userData:n.userData}),r=!1;if("stack"in e){t.options.originalErrorStack=e.stack;r=!0}if("constructor"in e){t.options.originalErrorType=e.constructor.name;r=!0}r||(t.options.details=e);console.error(t)})};return this.fetcher.collection.create(e,n.extend({url:this.getUrlApi(e.type),wait:!0,clearCache:e.type},t))};t.prototype.update=function(r,i,o){var a=this,s=o.success;o.success=function(e,n,o){var l=i.favorite?t.Event.AddedFavorite:t.Event.RemovedFavorite;a.trigger(l,r);s&&s(e,n,o)};e.prototype.update.call(this,r,i,n.extend({clearCache:r.get("type")},o))};t.prototype.getByAttribute=function(t,r){r=n.extend({},this.options,r);if("type"in t||r.dataParameters&&"type"in r.dataParameters){var i="type"in t?t.type:r.dataParameters.type;r=n.extend({url:this.getUrlApi(i)},r)}return e.prototype.getByAttribute.call(this,t,r)};t.prototype.preFetchRequest=function(){return new s(function(e,t){setTimeout(e,i.default.application.favorites.delayRequest)})};t.prototype.findPendingRequest=function(e){var t=null;if("id"in e[0]&&"type"in e[0])for(var r=e[0].type,n=0;n<this.requestQueue.length;n++){var i=this.requestQueue[n];if(!1===i.isLock&&(0===i.dataQueue.length||i.dataQueue[0].type===r))return this.requestQueue[n]}if(!t){t={dataQueue:[],promiseQueue:[],fetchPromise:null,remainingDispatch:0,queuePromise:null,isLock:!1};this.requestQueue.unshift(t)}return t};t.Event={AddedFavorite:"addedFavorite",RemovedFavorite:"removedFavorite"};return t}(r.ADataManager);t.FavoritesManager=c});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("moment/moment-with-locales",t):e.moment=t()}(this,function(){"use strict";function e(){return gi.apply(null,arguments)}function t(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e){var t;for(t in e)return!1;return!0}function i(e){return void 0===e}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function s(e,t){var r,n=[];for(r=0;r<e.length;++r)n.push(t(e[r],r));return n}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var r in t)l(t,r)&&(e[r]=t[r]);l(t,"toString")&&(e.toString=t.toString);l(t,"valueOf")&&(e.valueOf=t.valueOf);return e}function c(e,t,r,n){return gt(e,t,r,n,!0).utc()}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invali
11dFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function p(e){null==e._pf&&(e._pf=d());return e._pf}function f(e){if(null==e._isValid){var t=p(e),r=_i.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour);if(null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function h(e){var t=c(NaN);null!=e?u(p(t),e):p(t).userInvalidated=!0;return t}function m(e,t){var r,n,o;i(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject);i(t._i)||(e._i=t._i);i(t._f)||(e._f=t._f);i(t._l)||(e._l=t._l);i(t._strict)||(e._strict=t._strict);i(t._tzm)||(e._tzm=t._tzm);i(t._isUTC)||(e._isUTC=t._isUTC);i(t._offset)||(e._offset=t._offset);i(t._pf)||(e._pf=p(t));i(t._locale)||(e._locale=t._locale);if(bi.length>0)for(r=0;r<bi.length;r++){n=bi[r];o=t[n];i(o)||(e[n]=o)}return e}function y(t){m(this,t);this._d=new Date(null!=t._d?t._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));if(!1===wi){wi=!0;e.updateOffset(this);wi=!1}}function g(e){return e instanceof y||null!=e&&null!=e._isAMomentObject}function v(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function _(e){var t=+e,r=0;0!==t&&isFinite(t)&&(r=v(t));return r}function b(e,t,r){var n,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(n=0;n<i;n++)(r&&e[n]!==t[n]||!r&&_(e[n])!==_(t[n]))&&a++;return a+o}function w(t){!1===e.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function x(t,r){var n=!0;return u(function(){null!=e.deprecationHandler&&e.deprecationHandler(null,t);if(n){for(var i,o=[],a=0;a<arguments.length;a++){i="";if("object"==typeof arguments[a]){i+="\n["+a+"] ";for(var s in arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[a];o.push(i)}w(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack);n=!1}return r.apply(this,arguments)},r)}function M(t,r){null!=e.deprecationHandler&&e.deprecationHandler(t,r);if(!xi[t]){w(r);xi[t]=!0}}function S(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function k(e){var t,r;for(r in e){t=e[r];S(t)?this[r]=t:this["_"+r]=t}this._config=e;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function T(e,t){var n,i=u({},e);for(n in t)if(l(t,n))if(r(e[n])&&r(t[n])){i[n]={};u(i[n],e[n]);u(i[n],t[n])}else null!=t[n]?i[n]=t[n]:delete i[n];for(n in e)l(e,n)&&!l(t,n)&&r(e[n])&&(i[n]=u({},i[n]));return i}function A(e){null!=e&&this.set(e)}function E(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return S(n)?n.call(t,r):n}function P(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];if(t||!r)return t;this._longDateFormat[e]=r.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)});return this._longDateFormat[e]}function O(){return this._invalidDate}function j(e){return this._ordinal.replace("%d",e)}function D(e,t,r,n){var i=this._relativeTime[r];return S(i)?i(e,t,r,n):i.replace(/%d/i,e)}function C(e,t){var r=this._relativeTime[e>0?"future":"past"];return S(r)?r(t):r.replace(/%s/i,t)}function L(e,t){var r=e.toLowerCase();Oi[r]=Oi[r+"s"]=Oi[t]=e}function I(e){return"string"==typeof e?Oi[e]||Oi[e.toLowerCase()]:void 0}function R(e){var t,r,n={};for(r in e)if(l(e,r)){t=I(r);t&&(n[t]=e[r])}return n}function Y(e,t){ji[e]=t}function N(e){var t=[];for(var r in e)t.push({unit:r,priority:ji[r]});t.sort(function(e,t){return e.priority-t.priority});return t}function F(t,r){return function(n){if(null!=n){U(this,t,n);e.updateOffset(this,r);return this}return W(this,t)}}function W(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function U(e,t,r){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](r)}function q(e){e=I(e);return S(this[e])?this[e]():this}function H(e,t){if("object"==typeof e){e=R(e);for(var r=N(e),n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit])}else{e=I(e);if(S(this[e]))return this[e](t)}return this}function V(e,t,r){var n=""+Math.abs(e),i=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}function B(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()});e&&(Ii[e]=i);t&&(Ii[t[0]]=function(){return V(i.apply(this,arguments),t[1],t[2])});r&&(Ii[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function K(e){var t,r,n=e.match(Di);for(t=0,r=n.length;t<r;t++)Ii[n[t]]?n[t]=Ii[n[t]]:n[t]=z(n[t]);return function(t){var i,o="";for(i=0;i<r;i++)o+=S(n[i])?n[i].call(t,e):n[i];return o}}function $(e,t){if(!e.isValid())return e.localeData().invalidDate();t=G(t,e.localeData());Li[t]=Li[t]||K(t);return Li[t](e)}function G(e,t){function r(e){return t.longDateFormat(e)||e}var n=5;Ci.lastIndex=0;for(;n>=0&&Ci.test(e);){e=e.replace(Ci,r);Ci.lastIndex=0;n-=1}return e}function J(e,t,r){Zi[e]=S(t)?t:function(e,n){return e&&r?r:t}}function Q(e,t){return l(Zi,e)?Zi[e](t._strict,t._locale):new RegExp(X(e))}function X(e){return Z(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,i){return t||r||n||i}))}function Z(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ee(e,t){var r,n=t;"string"==typeof e&&(e=[e]);o(t)&&(n=function(e,r){r[t]=_(e)});for(r=0;r<e.length;r++)eo[e[r]]=n}function te(e,t){ee(e,function(e,r,n,i){n._w=n._w||{};t(e,n._w,n,i)})}function re(e,t,r){null!=t&&l(eo,e)&&eo[e](t,r._a,r,e)}function ne(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function ie(e,r){return e?t(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||po).test(r)?"format":"standalone"][e.month()]:t(this._months)?this._months:this._months.standalone}function oe(e,r){return e?t(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[po.test(r)?"format":"standalone"][e.month()]:t(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ae(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(n=0;n<12;++n){o=c([2e3,n]);this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase();this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase()}}if(r){if("MMM"===t){i=co.call(this._shortMonthsParse,a);return-1!==i?i:null}i=co.call(this._longMonthsParse,a);return-1!==i?i:null}if("MMM"===t){i=co.call(this._shortMonthsParse,a);if(-1!==i)return i;i=co.call(this._longMonthsParse,a);return-1!==i?i:null}i=co.call(this._longMonthsParse,a);if(-1!==i)return i;i=co.call(this._shortMonthsParse,a);return-1!==i?i:null}function se(e,t,r){var n,i,o;if(this._monthsParseExact)return ae.call(this,e,t,r);if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[]}for(n=0;n<12;n++){i=c([2e3,n]);if(r&&!this._longMonthsParse[n]){this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i");this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")}if(!r&&!this._monthsParse[n]){o="^"+this.months(i,"")+"|^"+this.monthsShort(i,"");this._monthsParse[n]=new RegExp(o.replace(".",""),"i")}if(r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function le(e,t){var r;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=_(t);else{t=e.localeData().monthsParse(t);if(!o(t))return e}r=Math.min(e.date(),ne(e.year(),t));e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r);return e}function ue(t){if(null!=t){le(this,t);e.updateOffset(this,!0);return this}return W(this,"Month")}function ce(){return ne(this.year(),this.month())}function de(e){if(this._monthsParseExact){l(this,"_monthsRegex")||fe.call(this);return e?this._monthsShortStrictRegex:this._monthsShortRegex}l(this,"_monthsShortRegex")||(this._monthsShortRegex=mo);return this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex}function pe(e){if(this._monthsParseExact){l(this,"_monthsRegex")||fe.call(this);return e?this._monthsStrictRegex:this._monthsRegex}l(this,"_monthsRegex")||(this._monthsRegex=yo);return this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex}function fe(){function e(e,t){return t.length-e.length}var t,r,n=[],i=[],o=[];for(t=0;t<12;t++){r=c([2e3,t]);n.push(this.monthsShort(r,""));i.push(this.months(r,""));o.push(this.months(r,""));o.push(this.monthsShort(r,""))}n.sort(e);i.sort(e);o.sort(e);for(t=0;t<12;t++){n[t]=Z(n[t]);i[t]=Z(i[t])}for(t=0;t<24;t++)o[t]=Z(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function he(e){return me(e)?366:365}function me(e){return e%4==0&&e%100!=0||e%400==0}function ye(){return me(this.year())}function ge(e,t,r,n,i,o,a){var s=new Date(e,t,r,n,i,o,a);e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e);return s}function ve(e){var t=new Date(Date.UTC.apply(null,arguments));e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e);return t}function _e(e,t,r){var n=7+t-r;return-(7+ve(e,0,n).getUTCDay()-t)%7+n-1}function be(e,t,r,n,i){var o,a,s=(7+r-n)%7,l=_e(e,n,i),u=1+7*(t-1)+s+l;if(u<=0){o=e-1;a=he(o)+u}else if(u>he(e)){o=e+1;a=u-he(e)}else{o=e;a=u}return{year:o,dayOfYear:a}}function we(e,t,r){var n,i,o=_e(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;if(a<1){i=e.year()-1;n=a+xe(i,t,r)}else if(a>xe(e.year(),t,r)){n=a-xe(e.year(),t,r);i=e.year()+1}else{i=e.year();n=a}return{week:n,year:i}}function xe(e,t,r){var n=_e(e,t,r),i=_e(e+1,t,r);
11return(he(e)-n+i)/7}function Me(e){return we(e,this._week.dow,this._week.doy).week}function Se(){return this._week.dow}function ke(){return this._week.doy}function Te(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ae(e){var t=we(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ee(e,t){if("string"!=typeof e)return e;if(!isNaN(e))return parseInt(e,10);e=t.weekdaysParse(e);return"number"==typeof e?e:null}function Pe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Oe(e,r){return e?t(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(r)?"format":"standalone"][e.day()]:t(this._weekdays)?this._weekdays:this._weekdays.standalone}function je(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function De(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ce(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(n=0;n<7;++n){o=c([2e3,1]).day(n);this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase();this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase();this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase()}}if(r){if("dddd"===t){i=co.call(this._weekdaysParse,a);return-1!==i?i:null}if("ddd"===t){i=co.call(this._shortWeekdaysParse,a);return-1!==i?i:null}i=co.call(this._minWeekdaysParse,a);return-1!==i?i:null}if("dddd"===t){i=co.call(this._weekdaysParse,a);if(-1!==i)return i;i=co.call(this._shortWeekdaysParse,a);if(-1!==i)return i;i=co.call(this._minWeekdaysParse,a);return-1!==i?i:null}if("ddd"===t){i=co.call(this._shortWeekdaysParse,a);if(-1!==i)return i;i=co.call(this._weekdaysParse,a);if(-1!==i)return i;i=co.call(this._minWeekdaysParse,a);return-1!==i?i:null}i=co.call(this._minWeekdaysParse,a);if(-1!==i)return i;i=co.call(this._weekdaysParse,a);if(-1!==i)return i;i=co.call(this._shortWeekdaysParse,a);return-1!==i?i:null}function Le(e,t,r){var n,i,o;if(this._weekdaysParseExact)return Ce.call(this,e,t,r);if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[]}for(n=0;n<7;n++){i=c([2e3,1]).day(n);if(r&&!this._fullWeekdaysParse[n]){this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i");this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i");this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")}if(!this._weekdaysParse[n]){o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,"");this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")}if(r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Ie(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!=e){e=Ee(e,this.localeData());return this.add(e-t,"d")}return t}function Re(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ye(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Pe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ne(e){if(this._weekdaysParseExact){l(this,"_weekdaysRegex")||Ue.call(this);return e?this._weekdaysStrictRegex:this._weekdaysRegex}l(this,"_weekdaysRegex")||(this._weekdaysRegex=xo);return this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}function Fe(e){if(this._weekdaysParseExact){l(this,"_weekdaysRegex")||Ue.call(this);return e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Mo);return this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function We(e){if(this._weekdaysParseExact){l(this,"_weekdaysRegex")||Ue.call(this);return e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=So);return this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function Ue(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++){r=c([2e3,1]).day(t);n=this.weekdaysMin(r,"");i=this.weekdaysShort(r,"");o=this.weekdays(r,"");a.push(n);s.push(i);l.push(o);u.push(n);u.push(i);u.push(o)}a.sort(e);s.sort(e);l.sort(e);u.sort(e);for(t=0;t<7;t++){s[t]=Z(s[t]);l[t]=Z(l[t]);u[t]=Z(u[t])}this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function qe(){return this.hours()%12||12}function He(){return this.hours()||24}function Ve(e,t){B(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Be(e,t){return t._meridiemParse}function ze(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ke(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}function $e(e){return e?e.toLowerCase().replace("_","-"):e}function Ge(e){for(var t,r,n,i,o=0;o<e.length;){i=$e(e[o]).split("-");t=i.length;r=$e(e[o+1]);r=r?r.split("-"):null;for(;t>0;){n=Je(i.slice(0,t).join("-"));if(n)return n;if(r&&r.length>=t&&b(i,r,!0)>=t-1)break;t--}o++}return null}function Je(e){var t=null;if(!Po[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=ko._abbr;require("./locale/"+e);Qe(t)}catch(e){}return Po[e]}function Qe(e,t){var r;if(e){r=i(t)?et(e):Xe(e,t);r&&(ko=r)}return ko._abbr}function Xe(e,t){if(null!==t){var r=Eo;t.abbr=e;if(null!=Po[e]){M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");r=Po[e]._config}else if(null!=t.parentLocale){if(null==Po[t.parentLocale]){Oo[t.parentLocale]||(Oo[t.parentLocale]=[]);Oo[t.parentLocale].push({name:e,config:t});return null}r=Po[t.parentLocale]._config}Po[e]=new A(T(r,t));
11Oo[e]&&Oo[e].forEach(function(e){Xe(e.name,e.config)});Qe(e);return Po[e]}delete Po[e];return null}function Ze(e,t){if(null!=t){var r,n=Eo;null!=Po[e]&&(n=Po[e]._config);t=T(n,t);r=new A(t);r.parentLocale=Po[e];Po[e]=r;Qe(e)}else null!=Po[e]&&(null!=Po[e].parentLocale?Po[e]=Po[e].parentLocale:null!=Po[e]&&delete Po[e]);return Po[e]}function et(e){var r;e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr);if(!e)return ko;if(!t(e)){r=Je(e);if(r)return r;e=[e]}return Ge(e)}function tt(){return ki(Po)}function rt(e){var t,r=e._a;if(r&&-2===p(e).overflow){t=r[ro]<0||r[ro]>11?ro:r[no]<1||r[no]>ne(r[to],r[ro])?no:r[io]<0||r[io]>24||24===r[io]&&(0!==r[oo]||0!==r[ao]||0!==r[so])?io:r[oo]<0||r[oo]>59?oo:r[ao]<0||r[ao]>59?ao:r[so]<0||r[so]>999?so:-1;p(e)._overflowDayOfYear&&(t<to||t>no)&&(t=no);p(e)._overflowWeeks&&-1===t&&(t=lo);p(e)._overflowWeekday&&-1===t&&(t=uo);p(e).overflow=t}return e}function nt(e){var t,r,n,i,o,a,s=e._i,l=jo.exec(s)||Do.exec(s);if(l){p(e).iso=!0;for(t=0,r=Lo.length;t<r;t++)if(Lo[t][1].exec(l[1])){i=Lo[t][0];n=!1!==Lo[t][2];break}if(null==i){e._isValid=!1;return}if(l[3]){for(t=0,r=Io.length;t<r;t++)if(Io[t][1].exec(l[3])){o=(l[2]||" ")+Io[t][0];break}if(null==o){e._isValid=!1;return}}if(!n&&null!=o){e._isValid=!1;return}if(l[4]){if(!Co.exec(l[4])){e._isValid=!1;return}a="Z"}e._f=i+(o||"")+(a||"");ct(e)}else e._isValid=!1}function it(e){var t,r,n,i,o,a,s,l,u={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},c="YXWVUTSRQPONZABCDEFGHIKLM";t=e._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,"");r=Yo.exec(t);if(r){n=r[1]?"ddd"+(5===r[1].length?", ":" "):"";i="D MMM "+(r[2].length>10?"YYYY ":"YY ");o="HH:mm"+(r[4]?":ss":"");if(r[1]){var d=new Date(r[2]),f=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][d.getDay()];if(r[1].substr(0,3)!==f){p(e).weekdayMismatch=!0;e._isValid=!1;return}}switch(r[5].length){case 2:if(0===l)s=" +0000";else{l=c.indexOf(r[5][1].toUpperCase())-12;s=(l<0?" -":" +")+(""+l).replace(/^-?/,"0").match(/..$/)[0]+"00"}break;case 4:s=u[r[5]];break;default:s=u[" GMT"]}r[5]=s;e._i=r.splice(1).join("");a=" ZZ";e._f=n+i+o+a;ct(e);p(e).rfc2822=!0}else e._isValid=!1}function ot(t){var r=Ro.exec(t._i);if(null===r){nt(t);if(!1===t._isValid){delete t._isValid;it(t);if(!1===t._isValid){delete t._isValid;e.createFromInputFallback(t)}}}else t._d=new Date(+r[1])}function at(e,t,r){return null!=e?e:null!=t?t:r}function st(t){var r=new Date(e.now());return t._useUTC?[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()]:[r.getFullYear(),r.getMonth(),r.getDate()]}function lt(e){var t,r,n,i,o=[];if(!e._d){n=st(e);e._w&&null==e._a[no]&&null==e._a[ro]&&ut(e);if(null!=e._dayOfYear){i=at(e._a[to],n[to]);(e._dayOfYear>he(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0);r=ve(i,0,e._dayOfYear);e._a[ro]=r.getUTCMonth();e._a[no]=r.getUTCDate()}for(t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];if(24===e._a[io]&&0===e._a[oo]&&0===e._a[ao]&&0===e._a[so]){e._nextDay=!0;e._a[io]=0}e._d=(e._useUTC?ve:ge).apply(null,o);null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm);e._nextDay&&(e._a[io]=24)}}function ut(e){var t,r,n,i,o,a,s,l;t=e._w;if(null!=t.GG||null!=t.W||null!=t.E){o=1;a=4;r=at(t.GG,e._a[to],we(vt(),1,4).year);n=at(t.W,1);i=at(t.E,1);(i<1||i>7)&&(l=!0)}else{o=e._locale._week.dow;a=e._locale._week.doy;var u=we(vt(),o,a);r=at(t.gg,e._a[to],u.year);n=at(t.w,u.week);if(null!=t.d){i=t.d;(i<0||i>6)&&(l=!0)}else if(null!=t.e){i=t.e+o;(t.e<0||t.e>6)&&(l=!0)}else i=o}if(n<1||n>xe(r,o,a))p(e)._overflowWeeks=!0;else if(null!=l)p(e)._overflowWeekday=!0;else{s=be(r,n,i,o,a);e._a[to]=s.year;e._dayOfYear=s.dayOfYear}}function ct(t){if(t._f!==e.ISO_8601)if(t._f!==e.RFC_2822){t._a=[];p(t).empty=!0;var r,n,i,o,a,s=""+t._i,l=s.length,u=0;i=G(t._f,t._locale).match(Di)||[];for(r=0;r<i.length;r++){o=i[r];n=(s.match(Q(o,t))||[])[0];if(n){a=s.substr(0,s.indexOf(n));a.length>0&&p(t).unusedInput.push(a);s=s.slice(s.indexOf(n)+n.length);u+=n.length}if(Ii[o]){n?p(t).empty=!1:p(t).unusedTokens.push(o);re(o,n,t)}else t._strict&&!n&&p(t).unusedTokens.push(o)}p(t).charsLeftOver=l-u;s.length>0&&p(t).unusedInput.push(s);t._a[io]<=12&&!0===p(t).bigHour&&t._a[io]>0&&(p(t).bigHour=void 0);p(t).parsedDateParts=t._a.slice(0);p(t).meridiem=t._meridiem;t._a[io]=dt(t._locale,t._a[io],t._meridiem);lt(t);rt(t)}else it(t);else nt(t)}function dt(e,t,r){var n;if(null==r)return t;if(null!=e.meridiemHour)return e.meridiemHour(t,r);
11if(null!=e.isPM){n=e.isPM(r);n&&t<12&&(t+=12);n||12!==t||(t=0);return t}return t}function pt(e){var t,r,n,i,o;if(0!==e._f.length){for(i=0;i<e._f.length;i++){o=0;t=m({},e);null!=e._useUTC&&(t._useUTC=e._useUTC);t._f=e._f[i];ct(t);if(f(t)){o+=p(t).charsLeftOver;o+=10*p(t).unusedTokens.length;p(t).score=o;if(null==n||o<n){n=o;r=t}}}u(e,r||t)}else{p(e).invalidFormat=!0;e._d=new Date(NaN)}}function ft(e){if(!e._d){var t=R(e._i);e._a=s([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)});lt(e)}}function ht(e){var t=new y(rt(mt(e)));if(t._nextDay){t.add(1,"d");t._nextDay=void 0}return t}function mt(e){var r=e._i,n=e._f;e._locale=e._locale||et(e._l);if(null===r||void 0===n&&""===r)return h({nullInput:!0});"string"==typeof r&&(e._i=r=e._locale.preparse(r));if(g(r))return new y(rt(r));a(r)?e._d=r:t(n)?pt(e):n?ct(e):yt(e);f(e)||(e._d=null);return e}function yt(n){var l=n._i;if(i(l))n._d=new Date(e.now());else if(a(l))n._d=new Date(l.valueOf());else if("string"==typeof l)ot(n);else if(t(l)){n._a=s(l.slice(0),function(e){return parseInt(e,10)});lt(n)}else r(l)?ft(n):o(l)?n._d=new Date(l):e.createFromInputFallback(n)}function gt(e,i,o,a,s){var l={};if(!0===o||!1===o){a=o;o=void 0}(r(e)&&n(e)||t(e)&&0===e.length)&&(e=void 0);l._isAMomentObject=!0;l._useUTC=l._isUTC=s;l._l=o;l._i=e;l._f=i;l._strict=a;return ht(l)}function vt(e,t,r,n){return gt(e,t,r,n,!1)}function _t(e,r){var n,i;1===r.length&&t(r[0])&&(r=r[0]);if(!r.length)return vt();n=r[0];for(i=1;i<r.length;++i)r[i].isValid()&&!r[i][e](n)||(n=r[i]);return n}function bt(){return _t("isBefore",[].slice.call(arguments,0))}function wt(){return _t("isAfter",[].slice.call(arguments,0))}function xt(e){for(var t in e)if(-1===Uo.indexOf(t)||null!=e[t]&&isNaN(e[t]))return!1;for(var r=!1,n=0;n<Uo.length;++n)if(e[Uo[n]]){if(r)return!1;parseFloat(e[Uo[n]])!==_(e[Uo[n]])&&(r=!0)}return!0}function Mt(){return this._isValid}function St(){return Ht(NaN)}function kt(e){var t=R(e),r=t.year||0,n=t.quarter||0,i=t.month||0,o=t.week||0,a=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=xt(t);this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60;this._days=+a+7*o;this._months=+i+3*n+12*r;this._data={};this._locale=et();this._bubble()}function Tt(e){return e instanceof kt}function At(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Et(e,t){B(e,0,0,function(){var e=this.utcOffset(),r="+";if(e<0){e=-e;r="-"}return r+V(~~(e/60),2)+t+V(~~e%60,2)})}function Pt(e,t){var r=(t||"").match(e);if(null===r)return null;var n=r[r.length-1]||[],i=(n+"").match(qo)||["-",0,0],o=60*i[1]+_(i[2]);return 0===o?0:"+"===i[0]?o:-o}function Ot(t,r){var n,i;if(r._isUTC){n=r.clone();i=(g(t)||a(t)?t.valueOf():vt(t).valueOf())-n.valueOf();n._d.setTime(n._d.valueOf()+i);e.updateOffset(n,!1);return n}return vt(t).local()}function jt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Dt(t,r,n){var i,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){t=Pt(Ji,t);if(null===t)return this}else Math.abs(t)<16&&!n&&(t*=60);!this._isUTC&&r&&(i=jt(this));this._offset=t;this._isUTC=!0;null!=i&&this.add(i,"m");if(o!==t)if(!r||this._changeInProgress)$t(this,Ht(t-o,"m"),1,!1);else if(!this._changeInProgress){this._changeInProgress=!0;e.updateOffset(this,!0)
12;this._changeInProgress=null}return this}return this._isUTC?o:jt(this)}function Ct(e,t){if(null!=e){"string"!=typeof e&&(e=-e);this.utcOffset(e,t);return this}return-this.utcOffset()}function Lt(e){return this.utcOffset(0,e)}function It(e){if(this._isUTC){this.utcOffset(0,e);this._isUTC=!1;e&&this.subtract(jt(this),"m")}return this}function Rt(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Pt(Gi,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Yt(e){if(!this.isValid())return!1;e=e?vt(e).utcOffset():0;return(this.utcOffset()-e)%60==0}function Nt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ft(){if(!i(this._isDSTShifted))return this._isDSTShifted;var e={};m(e,this);e=mt(e);if(e._a){var t=e._isUTC?c(e._a):vt(e._a);this._isDSTShifted=this.isValid()&&b(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Wt(){return!!this.isValid()&&!this._isUTC}function Ut(){return!!this.isValid()&&this._isUTC}function qt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ht(e,t){var r,n,i,a=e,s=null;if(Tt(e))a={ms:e._milliseconds,d:e._days,M:e._months};else if(o(e)){a={};t?a[t]=e:a.milliseconds=e}else if(s=Ho.exec(e)){r="-"===s[1]?-1:1;a={y:0,d:_(s[no])*r,h:_(s[io])*r,m:_(s[oo])*r,s:_(s[ao])*r,ms:_(At(1e3*s[so]))*r}}else if(s=Vo.exec(e)){r="-"===s[1]?-1:1;a={y:Vt(s[2],r),M:Vt(s[3],r),w:Vt(s[4],r),d:Vt(s[5],r),h:Vt(s[6],r),m:Vt(s[7],r),s:Vt(s[8],r)}}else if(null==a)a={};else if("object"==typeof a&&("from"in a||"to"in a)){i=zt(vt(a.from),vt(a.to));a={};a.ms=i.milliseconds;a.M=i.months}n=new kt(a);Tt(e)&&l(e,"_locale")&&(n._locale=e._locale);return n}function Vt(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Bt(e,t){var r={milliseconds:0,months:0};r.months=t.month()-e.month()+12*(t.year()-e.year());e.clone().add(r.months,"M").isAfter(t)&&--r.months;r.milliseconds=+t-+e.clone().add(r.months,"M");return r}function zt(e,t){var r;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Ot(t,e);if(e.isBefore(t))r=Bt(e,t);else{r=Bt(t,e);r.milliseconds=-r.milliseconds;r.months=-r.months}return r}function Kt(e,t){return function(r,n){var i,o;if(null!==n&&!isNaN(+n)){M(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");o=r;r=n;n=o}r="string"==typeof r?+r:r;i=Ht(r,n);$t(this,i,e);return this}}function $t(t,r,n,i){var o=r._milliseconds,a=At(r._days),s=At(r._months);if(t.isValid()){i=null==i||i;o&&t._d.setTime(t._d.valueOf()+o*n);a&&U(t,"Date",W(t,"Date")+a*n);s&&le(t,W(t,"Month")+s*n);i&&e.updateOffset(t,a||s)}}function Gt(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Jt(t,r){var n=t||vt(),i=Ot(n,this).startOf("day"),o=e.calendarFormat(this,i)||"sameElse",a=r&&(S(r[o])?r[o].call(this,n):r[o]);return this.format(a||this.localeData().calendar(o,this,vt(n)))}function Qt(){return new y(this)}function Xt(e,t){var r=g(e)?e:vt(e);if(!this.isValid()||!r.isValid())return!1;t=I(i(t)?"millisecond":t);return"millisecond"===t?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()}function Zt(e,t){var r=g(e)?e:vt(e);if(!this.isValid()||!r.isValid())return!1;t=I(i(t)?"millisecond":t);return"millisecond"===t?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()}function er(e,t,r,n){n=n||"()";return("("===n[0]?this.isAfter(e,r):!this.isBefore(e,r))&&(")"===n[1]?this.isBefore(t,r):!this.isAfter(t,r))}function tr(e,t){var r,n=g(e)?e:vt(e);if(!this.isValid()||!n.isValid())return!1;t=I(t||"millisecond");if("millisecond"===t)return this.valueOf()===n.valueOf();r=n.valueOf();return this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()}function rr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function nr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function ir(e,t,r){var n,i,o,a;if(!this.isValid())return NaN;n=Ot(e,this);if(!n.isValid())return NaN;i=6e4*(n.utcOffset()-this.utcOffset());t=I(t);if("year"===t||"month"===t||"quarter"===t){a=or(this,n);"quarter"===t?a/=3:"year"===t&&(a/=12)}else{o=this-n;a="second"===t?o/1e3:"minute"===t?o/6e4:"hour"===t?o/36e5:"day"===t?(o-i)/864e5:"week"===t?(o-i)/6048e5:o}return r?a:v(a)}function or(e,t){var r,n,i=12*(t.year()-e.year())+(t.month()-e.month()),o=e.clone().add(i,"months");if(t-o<0){r=e.clone().add(i-1,"months");n=(t-o)/(o-r)}else{r=e.clone().add(i+1,"months");n=(t-o)/(r-o)}return-(i+n)||0}function ar(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function sr(){if(!this.isValid())return null;var e=this.clone().utc();return e.year()<0||e.year()>9999?$(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):S(Date.prototype.toISOString)?this.toDate().toISOString():$(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}
12function lr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";if(!this.isLocal()){e=0===this.utcOffset()?"moment.utc":"moment.parseZone";t="Z"}var r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(r+n+"-MM-DD[T]HH:mm:ss.SSS"+i)}function ur(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var r=$(this,t);return this.localeData().postformat(r)}function cr(e,t){return this.isValid()&&(g(e)&&e.isValid()||vt(e).isValid())?Ht({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function dr(e){return this.from(vt(),e)}function pr(e,t){return this.isValid()&&(g(e)&&e.isValid()||vt(e).isValid())?Ht({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fr(e){return this.to(vt(),e)}function hr(e){var t;if(void 0===e)return this._locale._abbr;t=et(e);null!=t&&(this._locale=t);return this}function mr(){return this._locale}function yr(e){e=I(e);switch(e){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}"week"===e&&this.weekday(0);"isoWeek"===e&&this.isoWeekday(1);"quarter"===e&&this.month(3*Math.floor(this.month()/3));return this}function gr(e){e=I(e);if(void 0===e||"millisecond"===e)return this;"date"===e&&(e="day");return this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms")}function vr(){return this._d.valueOf()-6e4*(this._offset||0)}function _r(){return Math.floor(this.valueOf()/1e3)}function br(){return new Date(this.valueOf())}function wr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function xr(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Mr(){return this.isValid()?this.toISOString():null}function Sr(){return f(this)}function kr(){return u({},p(this))}function Tr(){return p(this).overflow}function Ar(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Er(e,t){B(0,[e,e.length],0,t)}function Pr(e){return Cr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Or(e){return Cr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function jr(){return xe(this.year(),1,4)}function Dr(){var e=this.localeData()._week;return xe(this.year(),e.dow,e.doy)}function Cr(e,t,r,n,i){var o;if(null==e)return we(this,n,i).year;o=xe(e,n,i);t>o&&(t=o);return Lr.call(this,e,t,r,n,i)}function Lr(e,t,r,n,i){var o=be(e,t,r,n,i),a=ve(o.year,0,o.dayOfYear);this.year(a.getUTCFullYear());this.month(a.getUTCMonth());this.date(a.getUTCDate());return this}function Ir(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Rr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Yr(e,t){t[so]=_(1e3*("0."+e))}function Nr(){return this._isUTC?"UTC":""}function Fr(){return this._isUTC?"Coordinated Universal Time":""}function Wr(e){return vt(1e3*e)}function Ur(){return vt.apply(null,arguments).parseZone()}function qr(e){return e}function Hr(e,t,r,n){var i=et(),o=c().set(n,t);return i[r](o,e)}function Vr(e,t,r){if(o(e)){t=e;e=void 0}e=e||"";if(null!=t)return Hr(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=Hr(e,n,r,"month");return i}function Br(e,t,r,n){if("boolean"==typeof e){if(o(t)){r=t;t=void 0}t=t||""}else{t=e;r=t;e=!1;if(o(t)){r=t;t=void 0}t=t||""}var i=et(),a=e?i._week.dow:0;if(null!=r)return Hr(t,(r+a)%7,n,"day");var s,l=[];for(s=0;s<7;s++)l[s]=Hr(t,(s+a)%7,n,"day");return l}function zr(e,t){return Vr(e,t,"months")}function Kr(e,t){return Vr(e,t,"monthsShort")}function $r(e,t,r){return Br(e,t,r,"weekdays")}function Gr(e,t,r){return Br(e,t,r,"weekdaysShort")}function Jr(e,t,r){return Br(e,t,r,"weekdaysMin")}function Qr(){var e=this._data;this._milliseconds=ta(this._milliseconds);this._days=ta(this._days);this._months=ta(this._months);e.milliseconds=ta(e.milliseconds);e.seconds=ta(e.seconds);e.minutes=ta(e.minutes);e.hours=ta(e.hours);e.months=ta(e.months);e.years=ta(e.years);return this}function Xr(e,t,r,n){var i=Ht(t,r);e._milliseconds+=n*i._milliseconds;e._days+=n*i._days;e._months+=n*i._months;return e._bubble()}function Zr(e,t){return Xr(this,e,t,1)}function en(e,t){return Xr(this,e,t,-1)}function tn(e){return e<0?Math.floor(e):Math.ceil(e)}function rn(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;if(!(o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0)){o+=864e5*tn(on(s)+a);a=0;s=0}l.milliseconds=o%1e3;e=v(o/1e3);l.seconds=e%60;t=v(e/60);l.minutes=t%60;r=v(t/60);l.hours=r%24;a+=v(r/24);i=v(nn(a));s+=i;a-=tn(on(i));n=v(s/12);s%=12;l.days=a;l.months=s;l.years=n;return this}function nn(e){return 4800*e/146097}function on(e){return 146097*e/4800}function an(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;e=I(e);
12if("month"===e||"year"===e){t=this._days+n/864e5;r=this._months+nn(t);return"month"===e?r:r/12}t=this._days+Math.round(on(this._months));switch(e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function sn(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12):NaN}function ln(e){return function(){return this.as(e)}}function un(e){e=I(e);return this.isValid()?this[e+"s"]():NaN}function cn(e){return function(){return this.isValid()?this._data[e]:NaN}}function dn(){return v(this.days()/7)}function pn(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function fn(e,t,r){var n=Ht(e).abs(),i=ga(n.as("s")),o=ga(n.as("m")),a=ga(n.as("h")),s=ga(n.as("d")),l=ga(n.as("M")),u=ga(n.as("y")),c=i<=va.ss&&["s",i]||i<va.s&&["ss",i]||o<=1&&["m"]||o<va.m&&["mm",o]||a<=1&&["h"]||a<va.h&&["hh",a]||s<=1&&["d"]||s<va.d&&["dd",s]||l<=1&&["M"]||l<va.M&&["MM",l]||u<=1&&["y"]||["yy",u];c[2]=t;c[3]=+e>0;c[4]=r;return pn.apply(null,c)}function hn(e){if(void 0===e)return ga;if("function"==typeof e){ga=e;return!0}return!1}function mn(e,t){if(void 0===va[e])return!1;if(void 0===t)return va[e];va[e]=t;"s"===e&&(va.ss=t-1);return!0}function yn(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),r=fn(this,!e,t);e&&(r=t.pastFuture(+this,r));return t.postformat(r)}function gn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n=_a(this._milliseconds)/1e3,i=_a(this._days),o=_a(this._months);e=v(n/60);t=v(e/60);n%=60;e%=60;r=v(o/12);o%=12;var a=r,s=o,l=i,u=t,c=e,d=n,p=this.asSeconds();return p?(p<0?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(l?l+"D":"")+(u||c||d?"T":"")+(u?u+"H":"")+(c?c+"M":"")+(d?d+"S":""):"P0D"}function vn(e,t){var r=e.split("_");return t%10==1&&t%100!=11?r[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?r[1]:r[2]}function _n(e,t,r){var n={mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===r?t?"хвіліна":"хвіліну":"h"===r?t?"гадзіна":"гадзіну":e+" "+vn(n[r],+e)}function bn(e,t,r){return e+" "+Mn({mm:"munutenn",MM:"miz",dd:"devezh"}[r],e)}function wn(e){switch(xn(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function xn(e){return e>9?xn(e%10):e}function Mn(e,t){return 2===t?Sn(e):e}function Sn(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}function kn(e,t,r){var n=e+" ";switch(r){case"m":return t?"jedna minuta":"jedne minute";case"mm":n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";return n;case"h":return t?"jedan sat":"jednog sata";case"hh":n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";return n;case"dd":n+=1===e?"dan":"dana";return n;case"MM":n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";return n;case"yy":n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina";return n}}function Tn(e){return e>1&&e<5&&1!=~~(e/10)}function An(e,t,r,n){var i=e+" ";switch(r){case"s":return t||n?"pár sekund":"pár sekundami";case"m":return t?"minuta":n?"minutu":"minutou";case"mm":return t||n?i+(Tn(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?i+(Tn(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||n?"den":"dnem";case"dd":return t||n?i+(Tn(e)?"dny":"dní"):i+"dny";case"M":return t||n?"měsíc":"měsícem";case"MM":return t||n?i+(Tn(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||n?"rok":"rokem";case"yy":return t||n?i+(Tn(e)?"roky":"let"):i+"lety"}}function En(e,t,r,n){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[r][0]:i[r][1]}function Pn(e,t,r,n){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[r][0]:i[r][1]}function On(e,t,r,n){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[r][0]:i[r][1]}function jn(e,t,r,n){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[r][2]?i[r][2]:i[r][1]:n?i[r][0]:i[r][1]}function Dn(e,t,r,n){var i="";switch(r){case"s":return n?"muutaman sekunnin":"muutama sekunti";case"m":return n?"minuutin":"minuutti";case"mm":i=n?"minuutin":"minuuttia";break;case"h":return n?"tunnin":"tunti";case"hh":i=n?"tunnin":"tuntia";break;case"d":return n?"päivän":"päivä";case"dd":i=n?"päivän":"päivää";break;case"M":return n?"kuukauden":"kuukausi";case"MM":i=n?"kuukauden":"kuukautta";break;case"y":return n?"vuoden":"vuosi";case"yy":i=n?"vuoden":"vuotta"}i=Cn(e,n)+" "+i;return i}function Cn(e,t){return e<10?t?Ja[e]:Ga[e]:e}function Ln(e,t,r,n){var i={s:["thodde secondanim","thodde second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka horan","ek hor"],hh:[e+" horanim",e+" hor"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?i[r][0]:i[r][1]}function In(e,t,r){var n=e+" ";switch(r){case"m":return t?"jedna minuta":"jedne minute";case"mm":n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";return n;case"h":return t?"jedan sat":"jednog sata";case"hh":n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";return n;case"dd":n+=1===e?"dan":"dana";return n;case"MM":n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";return n;case"yy":n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina";return n}}function Rn(e,t,r,n){var i=e;switch(r){case"s":return n||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(n||t?" perc":" perce");case"mm":return i+(n||t?" perc":" perce");case"h":return"egy"+(n||t?" óra":" órája");case"hh":return i+(n||t?" óra":" órája");case"d":return"egy"+(n||t?" nap":" napja");case"dd":return i+(n||t?" nap":" napja");case"M":return"egy"+(n||t?" hónap":" hónapja");case"MM":return i+(n||t?" hónap":" hónapja");case"y":return"egy"+(n||t?" év":" éve");case"yy":return i+(n||t?" év":" éve")}return""}function Yn(e){return(e?"":"[múlt] ")+"["+as[this.day()]+"] LT[-kor]"}function Nn(e){return e%100==11||e%10!=1}function Fn(e,t,r,n){var i=e+" ";switch(r){case"s":return t||n?"nokkrar sekúndur":"nokkrum sekúndum";
12case"m":return t?"mínúta":"mínútu";case"mm":return Nn(e)?i+(t||n?"mínútur":"mínútum"):t?i+"mínúta":i+"mínútu";case"hh":return Nn(e)?i+(t||n?"klukkustundir":"klukkustundum"):i+"klukkustund";case"d":return t?"dagur":n?"dag":"degi";case"dd":return Nn(e)?t?i+"dagar":i+(n?"daga":"dögum"):t?i+"dagur":i+(n?"dag":"degi");case"M":return t?"mánuður":n?"mánuð":"mánuði";case"MM":return Nn(e)?t?i+"mánuðir":i+(n?"mánuði":"mánuðum"):t?i+"mánuður":i+(n?"mánuð":"mánuði");case"y":return t||n?"ár":"ári";case"yy":return Nn(e)?i+(t||n?"ár":"árum"):i+(t||n?"ár":"ári")}}function Wn(e,t,r,n){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[r][0]:i[r][1]}function Un(e){return Hn(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e}function qn(e){return Hn(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e}function Hn(e){e=parseInt(e,10);if(isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,r=e/10;return Hn(0===t?r:t)}if(e<1e4){for(;e>=10;)e/=10;return Hn(e)}e/=1e3;return Hn(e)}function Vn(e,t,r,n){return t?"kelios sekundės":n?"kelių sekundžių":"kelias sekundes"}function Bn(e,t,r,n){return t?Kn(r)[0]:n?Kn(r)[1]:Kn(r)[2]}function zn(e){return e%10==0||e>10&&e<20}function Kn(e){return ds[e].split("_")}function $n(e,t,r,n){var i=e+" ";return 1===e?i+Bn(e,t,r[0],n):t?i+(zn(e)?Kn(r)[1]:Kn(r)[0]):n?i+Kn(r)[1]:i+(zn(e)?Kn(r)[1]:Kn(r)[2])}function Gn(e,t,r){return r?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function Jn(e,t,r){return e+" "+Gn(ps[r],e,t)}function Qn(e,t,r){return Gn(ps[r],e,t)}function Xn(e,t){return t?"dažas sekundes":"dažām sekundēm"}function Zn(e,t,r,n){var i="";if(t)switch(r){case"s":i="काही सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(r){case"s":i="काही सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}function ei(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function ti(e,t,r){var n=e+" ";switch(r){case"m":return t?"minuta":"minutę";case"mm":return n+(ei(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return n+(ei(e)?"godziny":"godzin");case"MM":return n+(ei(e)?"miesiące":"miesięcy");case"yy":return n+(ei(e)?"lata":"lat")}}function ri(e,t,r){var n={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},i=" ";(e%100>=20||e>=100&&e%100==0)&&(i=" de ");return e+i+n[r]}function ni(e,t){var r=e.split("_");return t%10==1&&t%100!=11?r[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?r[1]:r[2]}function ii(e,t,r){var n={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===r?t?"минута":"минуту":e+" "+ni(n[r],+e)}function oi(e){return e>1&&e<5}function ai(e,t,r,n){var i=e+" ";switch(r){case"s":return t||n?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":n?"minútu":"minútou";case"mm":return t||n?i+(oi(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?i+(oi(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||n?"deň":"dňom";case"dd":return t||n?i+(oi(e)?"dni":"dní"):i+"dňami";case"M":return t||n?"mesiac":"mesiacom";case"MM":return t||n?i+(oi(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||n?"rok":"rokom";case"yy":return t||n?i+(oi(e)?"roky":"rokov"):i+"rokmi"}}function si(e,t,r,n){var i=e+" ";switch(r){case"s":return t||n?"nekaj sekund":"nekaj sekundami";case"m":return t?"ena minuta":"eno minuto";case"mm":i+=1===e?t?"minuta":"minuto":2===e?t||n?"minuti":"minutama":e<5?t||n?"minute":"minutami":t||n?"minut":"minutami";return i;case"h":return t?"ena ura":"eno uro";case"hh":i+=1===e?t?"ura":"uro":2===e?t||n?"uri":"urama":e<5?t||n?"ure":"urami":t||n?"ur":"urami";return i;case"d":return t||n?"en dan":"enim dnem";case"dd":i+=1===e?t||n?"dan":"dnem":2===e?t||n?"dni":"dnevoma":t||n?"dni":"dnevi";return i;case"M":return t||n?"en mesec":"enim mesecem";case"MM":i+=1===e?t||n?"mesec":"mesecem":2===e?t||n?"meseca":"mesecema":e<5?t||n?"mesece":"meseci":t||n?"mesecev":"meseci";return i;case"y":return t||n?"eno leto":"enim letom";case"yy":i+=1===e?t||n?"leto":"letom":2===e?t||n?"leti":"letoma":e<5?t||n?"leta":"leti":t||n?"let":"leti";return i}}function li(e){var t=e;t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq";return t}function ui(e){var t=e;t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret";return t}function ci(e,t,r,n){var i=di(e);switch(r){case"mm":return i+" tup";
12case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}function di(e){var t=Math.floor(e%1e3/100),r=Math.floor(e%100/10),n=e%10,i="";t>0&&(i+=Us[t]+"vatlh");r>0&&(i+=(""!==i?" ":"")+Us[r]+"maH");n>0&&(i+=(""!==i?" ":"")+Us[n]);return""===i?"pagh":i}function pi(e,t,r,n){var i={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return n?i[r][0]:t?i[r][0]:i[r][1]}function fi(e,t){var r=e.split("_");return t%10==1&&t%100!=11?r[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?r[1]:r[2]}function hi(e,t,r){var n={mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===r?t?"хвилина":"хвилину":"h"===r?t?"година":"годину":e+" "+fi(n[r],+e)}function mi(e,t){var r={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return e?r[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:r.nominative}function yi(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var gi,vi;vi=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),r=t.length>>>0,n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};var _i=vi,bi=e.momentProperties=[],wi=!1,xi={};e.suppressDeprecationWarnings=!1;e.deprecationHandler=null;var Mi;Mi=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)l(e,t)&&r.push(t);return r};var Si,ki=Mi,Ti={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ai={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ei=/\d{1,2}/,Pi={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Oi={},ji={},Di=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ci=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Li={},Ii={},Ri=/\d/,Yi=/\d\d/,Ni=/\d{3}/,Fi=/\d{4}/,Wi=/[+-]?\d{6}/,Ui=/\d\d?/,qi=/\d\d\d\d?/,Hi=/\d\d\d\d\d\d?/,Vi=/\d{1,3}/,Bi=/\d{1,4}/,zi=/[+-]?\d{1,6}/,Ki=/\d+/,$i=/[+-]?\d+/,Gi=/Z|[+-]\d\d:?\d\d/gi,Ji=/Z|[+-]\d\d(?::?\d\d)?/gi,Qi=/[+-]?\d+(\.\d{1,3})?/,Xi=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Zi={},eo={},to=0,ro=1,no=2,io=3,oo=4,ao=5,so=6,lo=7,uo=8;Si=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};var co=Si;B("M",["MM",2],"Mo",function(){return this.month()+1});B("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});B("MMMM",0,0,function(e){return this.localeData().months(this,e)});L("month","M");Y("month",8);J("M",Ui);J("MM",Ui,Yi);J("MMM",function(e,t){return t.monthsShortRegex(e)});J("MMMM",function(e,t){return t.monthsRegex(e)});ee(["M","MM"],function(e,t){t[ro]=_(e)-1});ee(["MMM","MMMM"],function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);null!=i?t[ro]=i:p(r).invalidMonth=e});var po=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fo="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ho="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mo=Xi,yo=Xi;B("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e});B(0,["YY",2],0,function(){return this.year()%100});B(0,["YYYY",4],0,"year");B(0,["YYYYY",5],0,"year");B(0,["YYYYYY",6,!0],0,"year");L("year","y");Y("year",1);J("Y",$i);J("YY",Ui,Yi);J("YYYY",Bi,Fi);J("YYYYY",zi,Wi);J("YYYYYY",zi,Wi);ee(["YYYYY","YYYYYY"],to);ee("YYYY",function(t,r){r[to]=2===t.length?e.parseTwoDigitYear(t):_(t)});ee("YY",function(t,r){r[to]=e.parseTwoDigitYear(t)});ee("Y",function(e,t){t[to]=parseInt(e,10)});e.parseTwoDigitYear=function(e){return _(e)+(_(e)>68?1900:2e3)};var go=F("FullYear",!0);B("w",["ww",2],"wo","week");B("W",["WW",2],"Wo","isoWeek");L("week","w");L("isoWeek","W");Y("week",5);Y("isoWeek",5);J("w",Ui);J("ww",Ui,Yi);J("W",Ui);J("WW",Ui,Yi);te(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=_(e)});var vo={dow:0,doy:6};B("d",0,"do","day");B("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});B("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});B("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});B("e",0,0,"weekday");B("E",0,0,"isoWeekday");L("day","d");L("weekday","e");L("isoWeekday","E");Y("day",11);Y("weekday",11);Y("isoWeekday",11);J("d",Ui);J("e",Ui);J("E",Ui);J("dd",function(e,t){return t.weekdaysMinRegex(e)});J("ddd",function(e,t){return t.weekdaysShortRegex(e)});J("dddd",function(e,t){return t.weekdaysRegex(e)});te(["dd","ddd","dddd"],function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:p(r).invalidWeekday=e});te(["d","e","E"],function(e,t,r,n){t[n]=_(e)});var _o="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bo="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xo=Xi,Mo=Xi,So=Xi;B("H",["HH",2],0,"hour");B("h",["hh",2],0,qe);B("k",["kk",2],0,He);B("hmm",0,0,function(){return""+qe.apply(this)+V(this.minutes(),2)}
12);B("hmmss",0,0,function(){return""+qe.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)});B("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)});B("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)});Ve("a",!0);Ve("A",!1);L("hour","h");Y("hour",13);J("a",Be);J("A",Be);J("H",Ui);J("h",Ui);J("k",Ui);J("HH",Ui,Yi);J("hh",Ui,Yi);J("kk",Ui,Yi);J("hmm",qi);J("hmmss",Hi);J("Hmm",qi);J("Hmmss",Hi);ee(["H","HH"],io);ee(["k","kk"],function(e,t,r){var n=_(e);t[io]=24===n?0:n});ee(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e);r._meridiem=e});ee(["h","hh"],function(e,t,r){t[io]=_(e);p(r).bigHour=!0});ee("hmm",function(e,t,r){var n=e.length-2;t[io]=_(e.substr(0,n));t[oo]=_(e.substr(n));p(r).bigHour=!0});ee("hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[io]=_(e.substr(0,n));t[oo]=_(e.substr(n,2));t[ao]=_(e.substr(i));p(r).bigHour=!0});ee("Hmm",function(e,t,r){var n=e.length-2;t[io]=_(e.substr(0,n));t[oo]=_(e.substr(n))});ee("Hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[io]=_(e.substr(0,n));t[oo]=_(e.substr(n,2));t[ao]=_(e.substr(i))});var ko,To=/[ap]\.?m?\.?/i,Ao=F("Hours",!0),Eo={calendar:Ti,longDateFormat:Ai,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:Ei,relativeTime:Pi,months:fo,monthsShort:ho,week:vo,weekdays:_o,weekdaysMin:wo,weekdaysShort:bo,meridiemParse:To},Po={},Oo={},jo=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Do=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Co=/Z|[+-]\d\d(?::?\d\d)?/,Lo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Io=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ro=/^\/?Date\((\-?\d+)/i,Yo=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;e.createFromInputFallback=x("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});e.ISO_8601=function(){};e.RFC_2822=function(){};var No=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=vt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:h()}),Fo=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=vt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:h()}),Wo=function(){return Date.now?Date.now():+new Date},Uo=["year","quarter","month","week","day","hour","minute","second","millisecond"];Et("Z",":");Et("ZZ","");J("Z",Ji);J("ZZ",Ji);ee(["Z","ZZ"],function(e,t,r){r._useUTC=!0;r._tzm=Pt(Ji,e)});var qo=/([\+\-]|\d\d)/gi;e.updateOffset=function(){}
13;var Ho=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Vo=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ht.fn=kt.prototype;
13Ht.invalid=St;var Bo=Kt(1,"add"),zo=Kt(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ko=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});B(0,["gg",2],0,function(){return this.weekYear()%100});B(0,["GG",2],0,function(){return this.isoWeekYear()%100});Er("gggg","weekYear");Er("ggggg","weekYear");Er("GGGG","isoWeekYear");Er("GGGGG","isoWeekYear");L("weekYear","gg");L("isoWeekYear","GG");Y("weekYear",1);Y("isoWeekYear",1);J("G",$i);J("g",$i);J("GG",Ui,Yi);J("gg",Ui,Yi);J("GGGG",Bi,Fi);J("gggg",Bi,Fi);J("GGGGG",zi,Wi);J("ggggg",zi,Wi);te(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=_(e)});te(["gg","GG"],function(t,r,n,i){r[i]=e.parseTwoDigitYear(t)});B("Q",0,"Qo","quarter");L("quarter","Q");Y("quarter",7);J("Q",Ri);ee("Q",function(e,t){t[ro]=3*(_(e)-1)});B("D",["DD",2],"Do","date");L("date","D");Y("date",9);J("D",Ui);J("DD",Ui,Yi);J("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ee(["D","DD"],no);ee("Do",function(e,t){t[no]=_(e.match(Ui)[0],10)});var $o=F("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear");L("dayOfYear","DDD");Y("dayOfYear",4);J("DDD",Vi);J("DDDD",Ni);ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=_(e)});B("m",["mm",2],0,"minute");L("minute","m");Y("minute",14);J("m",Ui);J("mm",Ui,Yi);ee(["m","mm"],oo);var Go=F("Minutes",!1);B("s",["ss",2],0,"second");L("second","s");Y("second",15);J("s",Ui);J("ss",Ui,Yi);ee(["s","ss"],ao);var Jo=F("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)});B(0,["SS",2],0,function(){return~~(this.millisecond()/10)});B(0,["SSS",3],0,"millisecond");B(0,["SSSS",4],0,function(){return 10*this.millisecond()});B(0,["SSSSS",5],0,function(){return 100*this.millisecond()});B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()});B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()});B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()});B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()});L("millisecond","ms");Y("millisecond",16);J("S",Vi,Ri);J("SS",Vi,Yi);J("SSS",Vi,Ni);var Qo;for(Qo="SSSS";Qo.length<=9;Qo+="S")J(Qo,Ki);for(Qo="S";Qo.length<=9;Qo+="S")ee(Qo,Yr);var Xo=F("Milliseconds",!1);B("z",0,0,"zoneAbbr");B("zz",0,0,"zoneName");var Zo=y.prototype;Zo.add=Bo;Zo.calendar=Jt;Zo.clone=Qt;Zo.diff=ir;Zo.endOf=gr;Zo.format=ur;Zo.from=cr;Zo.fromNow=dr;Zo.to=pr;Zo.toNow=fr;Zo.get=q;Zo.invalidAt=Tr;Zo.isAfter=Xt;Zo.isBefore=Zt;Zo.isBetween=er;Zo.isSame=tr;Zo.isSameOrAfter=rr;Zo.isSameOrBefore=nr;Zo.isValid=Sr;Zo.lang=Ko;Zo.locale=hr;Zo.localeData=mr;Zo.max=Fo;Zo.min=No;Zo.parsingFlags=kr;Zo.set=H;Zo.startOf=yr;Zo.subtract=zo;Zo.toArray=wr;Zo.toObject=xr;Zo.toDate=br;Zo.toISOString=sr;Zo.inspect=lr;Zo.toJSON=Mr;Zo.toString=ar;Zo.unix=_r;Zo.valueOf=vr;Zo.creationData=Ar;Zo.year=go;Zo.isLeapYear=ye;Zo.weekYear=Pr;Zo.isoWeekYear=Or;Zo.quarter=Zo.quarters=Ir;Zo.month=ue;Zo.daysInMonth=ce;Zo.week=Zo.weeks=Te;Zo.isoWeek=Zo.isoWeeks=Ae;Zo.weeksInYear=Dr;Zo.isoWeeksInYear=jr;Zo.date=$o;Zo.day=Zo.days=Ie;Zo.weekday=Re;Zo.isoWeekday=Ye;Zo.dayOfYear=Rr;Zo.hour=Zo.hours=Ao;Zo.minute=Zo.minutes=Go;Zo.second=Zo.seconds=Jo;Zo.millisecond=Zo.milliseconds=Xo;Zo.utcOffset=Dt;Zo.utc=Lt;Zo.local=It;Zo.parseZone=Rt;Zo.hasAlignedHourOffset=Yt;Zo.isDST=Nt;Zo.isLocal=Wt;Zo.isUtcOffset=Ut;Zo.isUtc=qt;Zo.isUTC=qt;Zo.zoneAbbr=Nr;Zo.zoneName=Fr;Zo.dates=x("dates accessor is deprecated. Use date instead.",$o);Zo.months=x("months accessor is deprecated. Use month instead",ue);Zo.years=x("years accessor is deprecated. Use year instead",go);Zo.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ct);Zo.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ft);var ea=A.prototype;ea.calendar=E;ea.longDateFormat=P;ea.invalidDate=O;ea.ordinal=j;ea.preparse=qr;ea.postformat=qr;ea.relativeTime=D;ea.pastFuture=C;ea.set=k;ea.months=ie;ea.monthsShort=oe;ea.monthsParse=se;ea.monthsRegex=pe;ea.monthsShortRegex=de;ea.week=Me;ea.firstDayOfYear=ke;ea.firstDayOfWeek=Se;ea.weekdays=Oe;ea.weekdaysMin=De;ea.weekdaysShort=je;ea.weekdaysParse=Le;ea.weekdaysRegex=Ne;ea.weekdaysShortRegex=Fe;ea.weekdaysMinRegex=We;ea.isPM=ze;ea.meridiem=Ke;Qe("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===_(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}});e.lang=x("moment.lang is deprecated. Use moment.locale instead.",Qe);e.langData=x("moment.langData is deprecated. Use moment.localeData instead.",et);var ta=Math.abs,ra=ln("ms"),na=ln("s"),ia=ln("m"),oa=ln("h"),aa=ln("d"),sa=ln("w"),la=ln("M"),ua=ln("y"),ca=cn("milliseconds"),da=cn("seconds"),pa=cn("minutes"),fa=cn("hours"),ha=cn("days"),ma=cn("months"),ya=cn("years"),ga=Math.round,va={ss:44,s:45,m:45,h:22,d:26,M:11},_a=Math.abs,ba=kt.prototype;ba.isValid=Mt;ba.abs=Qr;ba.add=Zr;ba.subtract=en;ba.as=an;ba.asMilliseconds=ra;ba.asSeconds=na;ba.asMinutes=ia;ba.asHours=oa;ba.asDays=aa;ba.asWeeks=sa;ba.asMonths=la;ba.asYears=ua;ba.valueOf=sn;ba._bubble=rn;ba.get=un;ba.milliseconds=ca;ba.seconds=da;ba.minutes=pa;ba.hours=fa;ba.days=ha;ba.weeks=dn;ba.months=ma;ba.years=ya;ba.humanize=yn;ba.toISOString=gn;ba.toString=gn;ba.toJSON=gn;ba.locale=hr;ba.localeData=mr;ba.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gn);ba.lang=Ko;B("X",0,0,"unix");B("x",0,0,"valueOf");J("x",$i);J("X",Qi);ee("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e,10))});ee("x",function(e,t,r){r._d=new Date(_(e))});e.version="2.18.1";!function(e){gi=e}(vt);e.fn=Zo;e.min=bt;e.max=wt;e.now=Wo;e.utc=c;e.unix=Wr;e.months=zr;e.isDate=a;e.locale=Qe;
vendor: 27,074 bytes, line 13
13e.invalid=h;e.duration=Ht;e.isMoment=g;e.weekdays=$r;e.parseZone=Ur;e.localeData=et;e.isDuration=Tt;e.monthsShort=Kr;e.weekdaysMin=Jr;e.defineLocale=Xe;e.updateLocale=Ze;e.locales=tt;e.weekdaysShort=Gr;e.normalizeUnits=I;e.relativeTimeRounding=hn;e.relativeTimeThreshold=mn;e.calendarFormat=Gt;e.prototype=Zo;e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,r){return e<12?r?"vm":"VM":r?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}});e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});var wa={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},xa=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},Ma={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},Sa=function(e){return function(t,r,n,i){var o=xa(t),a=Ma[e][xa(t)];2===o&&(a=a[r?0:1]);return a.replace(/%d/i,t)}},ka=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:ka,monthsShort:ka,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:Sa("s"),m:Sa("m"),mm:Sa("m"),h:Sa("h"),hh:Sa("h"),d:Sa("d"),dd:Sa("d"),M:Sa("M"),MM:Sa("M"),y:Sa("y"),yy:Sa("y")},preparse:function(e){return e.replace(/\u200f/g,"").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return wa[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}});e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});var Ta={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},Aa={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return Aa[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Ta[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}});e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});var Ea={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},Pa={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},Oa=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},ja={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},Da=function(e){return function(t,r,n,i){var o=Oa(t),a=ja[e][Oa(t)];2===o&&(a=a[r?0:1]);return a.replace(/%d/i,t)}},Ca=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"];e.defineLocale("ar",{months:Ca,monthsShort:Ca,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:Da("s"),m:Da("m"),mm:Da("m"),h:Da("h"),hh:Da("h"),d:Da("d"),dd:Da("d"),M:Da("M"),MM:Da("M"),y:Da("y"),yy:Da("y")},preparse:function(e){return e.replace(/\u200f/g,"").replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return Pa[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Ea[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}});var La={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,r){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var t=e%10,r=e%100-t,n=e>=100?100:null;return e+(La[t]||La[r]||La[n])},week:{dow:1,doy:7}});e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:_n,mm:_n,h:_n,hh:_n,d:"дзень",dd:_n,M:"месяц",MM:_n,y:"год",yy:_n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&r<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});var Ia={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},Ra={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return Ra[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ia[e]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){12===e&&(e=0);return"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,r){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});var Ya={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},Na={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return Na[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ya[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){12===e&&(e=0);return"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,r){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:bn,h:"un eur",hh:"%d eur",d:"un devezh",dd:bn,M:"ur miz",MM:bn,y:"ur bloaz",yy:wn},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}});e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:kn,mm:kn,h:kn,hh:kn,d:"dan",dd:kn,M:"mjesec",MM:kn,y:"godinu",yy:kn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"[el] D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"[el] D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"[el] dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%
13d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var r=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";"w"!==t&&"W"!==t||(r="a");return e+r},week:{dow:1,doy:4}});var Fa="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),Wa="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");e.defineLocale("cs",{months:Fa,monthsShort:Wa,monthsParse:function(e,t){var r,n=[];for(r=0;r<12;r++)n[r]=new RegExp("^"+e[r]+"$|^"+t[r]+"$","i");return n}(Fa,Wa),shortMonthsParse:function(e){var t,r=[];for(t=0;t<12;t++)r[t]=new RegExp("^"+e[t]+"$","i");return r}(Wa),longMonthsParse:function(e){var t,r=[];for(t=0;t<12;t++)r[t]=new RegExp("^"+e[t]+"$","i");return r}(Fa),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:An,m:An,mm:An,h:An,hh:An,d:An,dd:An,M:An,MM:An,y:An,yy:An},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}});e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,r="",n=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];t>20?r=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(r=n[t]);return e+r},week:{dow:1,doy:4}});e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),
14weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:En,mm:"%d Minuten",h:En,hh:"%d Stunden",d:En,dd:En,M:En,MM:En,y:En,yy:En},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH.mm",LLLL:"dddd, D. MMMM YYYY HH.mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:Pn,mm:"%d Minuten",h:Pn,hh:"%d Stunden",d:Pn,dd:Pn,M:Pn,MM:Pn,y:Pn,yy:Pn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:On,mm:"%d Minuten",h:On,hh:"%d Stunden",d:On,dd:On,M:On,MM:On,y:On,yy:On},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Ua=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],qa=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:Ua,monthsShort:Ua,weekdays:qa,weekdaysShort:qa,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,r){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",
vendor: 11,475 bytes, line 14
14s:"ސިކުންތުކޮޅެއް",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}});e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,r){return e>11?r?"μμ":"ΜΜ":r?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var r=this._calendarEl[e],n=t&&t.hours();S(r)&&(r=r.apply(t));return r.replace("{}",n%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}});e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}});e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}});e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}});e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}});e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}});e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,r){return e>11?r?"p.t.m.":"P.T.M.":r?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var Ha="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Va="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Va[e.month()]:Ha[e.month()]:Ha},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});var Ba="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),za="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?za[e.month()]:Ba[e.month()]:Ba},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%
14d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:jn,m:jn,mm:jn,h:jn,hh:jn,d:jn,dd:"%d päeva",M:jn,MM:jn,y:jn,yy:jn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Ka={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},$a={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,r){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return $a[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Ka[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});var Ga="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),Ja=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",Ga[7],Ga[8],Ga[9]];e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_t
14i_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:Dn,m:Dn,mm:Dn,h:Dn,hh:Dn,d:Dn,dd:Dn,M:Dn,MM:Dn,y:Dn,yy:Dn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}});e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var Qa="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),Xa="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Xa[e.month()]:Qa[e.month()]:Qa},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});var Za=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],es=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],ts=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],rs=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],ns=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"];e.defineLocale("gd",{months:Za,monthsShort:es,monthsParseExact:!0,weekdays:ts,weekdaysShort:rs,weekdaysMin:ns,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] 
14LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}});e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:Ln,m:Ln,mm:Ln,h:Ln,hh:Ln,d:Ln,dd:Ln,M:Ln,MM:Ln,y:Ln,yy:Ln},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){12===e&&(e=0);return"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}});e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,r){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?r?'לפנה"צ':"לפני הצהריים":e<18?r?'אחה"צ':"אחרי הצהריים":"בערב"}});var is={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},os={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"}
vendor: 8,483 bytes, lines 14-15
14,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return os[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return is[e]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){12===e&&(e=0)
15;return"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:In,mm:In,h:In,hh:In,d:"dan",dd:In,M:"mjesec",MM:In,y:"godinu",yy:In},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var as="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,r){return e<12?!0===r?"de":"DE":!0===r?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return Yn.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return Yn.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:Rn,m:Rn,mm:Rn,h:Rn,hh:Rn,d:Rn,dd:Rn,M:Rn,MM:Rn,y:Rn,yy:Rn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}});e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){12===e&&(e=0);return"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:Fn,m:Fn,mm:Fn,h:"klukkustund",hh:Fn,d:Fn,dd:Fn,M:Fn,MM:Fn,y:Fn,yy:Fn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%
15d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});e.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 HH:mm dddd",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日 HH:mm dddd"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,r){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){12===e&&(e=0);return"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის უკან"):/წელი/.test(e)?e.replace(/წელი$/,"წლის უკან"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});var ss={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%
15d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var t=e%10,r=e>=100?100:null;return e+(ss[e]||ss[t]||ss[r])},week:{dow:1,doy:7}});e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}});var ls={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},us={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(e){return us[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return ls[e]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){12===e&&(e=0);return"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}});e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%
15d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,r){return e<12?"오전":"오후"}});var cs={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кече саат] LT",lastWeek:"[Өткен аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%
15d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var t=e%10,r=e>=100?100:null;return e+(cs[e]||cs[t]||cs[r])},week:{dow:1,doy:7}});e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:Un,past:qn,s:"e puer Sekonnen",m:Wn,mm:"%d Minutten",h:Wn,hh:"%d Stonnen",d:Wn,dd:"%d Deeg",M:Wn,MM:"%d Méint",y:Wn,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,r){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});var ds={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:Vn,m:Bn,mm:$n,h:Bn,hh:$n,d:Bn,dd:$n,M:Bn,MM:$n,y:Bn,yy:$n},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var ps={m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_die
15nām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:Xn,m:Qn,mm:Jn,h:Qn,hh:Jn,d:Qn,dd:Jn,M:Qn,MM:Jn,y:Qn,yy:Jn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var fs={words:{m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,r){var n=fs.words[r];return 1===r.length?t?n[0]:n[1]:e+" "+fs.correctGrammaticalCase(e,n)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",m:fs.translate,mm:fs.translate,h:fs.translate,hh:fs.translate,d:"dan",dd:fs.translate,M:"mjesec",MM:fs.translate,y:"godinu",yy:fs.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%
15d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&r<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){12===e&&(e=0);return"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,r){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});var hs={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},ms={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"}
15,calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:Zn,m:Zn,mm:Zn,h:Zn,hh:Zn,d:Zn,dd:Zn,M:Zn,MM:Zn,y:Zn,yy:Zn},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return ms[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return hs[e]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){12===e&&(e=0);return"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){12===e&&(e=0);return"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){12===e&&(e=0);return"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});var ys={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},gs={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",
16lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနညá€
16ºá€¸á€„ယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return gs[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return ys[e]})},week:{dow:1,doy:4}});e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i gÃ¥r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en mÃ¥ned",MM:"%d mÃ¥neder",y:"ett Ã¥r",yy:"%d Ã¥r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var vs={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},_s={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return _s[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return vs[e]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){12===e&&(e=0);return"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,r){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});var bs="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),ws="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),xs=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],Ms=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?ws[e.month()]:bs[e.month()]:bs},monthsRegex:Ms,monthsShortRegex:Ms,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:xs,longMonthsParse:xs,shortMonthsParse:xs,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});var Ss="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),ks="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Ts=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],As=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?ks[e.month()]:Ss[e.month()]:Ss},monthsRegex:As,monthsShortRegex:As,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:Ts,longMonthsParse:Ts,shortMonthsParse:Ts,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_mÃ¥ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mÃ¥n_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_mÃ¥_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I gÃ¥r klokka] LT",lastWeek:"[FøregÃ¥ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein mÃ¥nad",MM:"%d mÃ¥nader",y:"eit Ã¥r",yy:"%d Ã¥r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Es={1:"à©§",2:"੨",3:"à©©",4:"੪",5:"à©«",6:"੬",7:"à©­",8:"à©®",9:"੯",0:"੦"},Ps={"à©§":"1","੨":"2","à©©":"3","੪":"4","à©«":"5","੬":"6","à©­":"7","à©®":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(e){return Ps[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Es[e]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){12===e&&(e=0);return"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});
16var Os="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),js="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");e.defineLocale("pl",{months:function(e,t){return e?""===t?"("+js[e.month()]+"|"+Os[e.month()]+")":/D MMMM/.test(t)?js[e.month()]:Os[e.month()]:Os},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:ti,mm:ti,h:ti,hh:ti,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:ti,y:"rok",yy:ti},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"});e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:ri,h:"o oră",hh:ri,d:"o zi",dd:ri,M:"o lună",MM:ri,y:"un an",yy:ri},week:{dow:1,doy:7}});var Ds=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:Ds,longMonthsParse:Ds,shortMonthsParse:Ds,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|ок
vendor: 9,900 bytes, line 16
16т\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:ii,mm:ii,h:"час",hh:ii,d:"день",dd:ii,M:"месяц",MM:ii,y:"год",yy:ii},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}});var Cs=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],Ls=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:Cs,monthsShort:Cs,weekdays:Ls,weekdaysShort:Ls,weekdaysMin:Ls,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,r){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,r){return e>11?r?"ප.ව.":"පස් වරු":r?"පෙ.ව.":"පෙර වරු"}});var Is="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),Rs="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");e.defineLocale("sk",{months:Is,monthsShort:Rs,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:ai,m:ai,mm:ai,h:ai,hh:ai,d:ai,dd:ai,M:ai,MM:ai,y:ai,yy:ai},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:si,m:si,mm:si,h:si,hh:si,d:si,dd:si,M:si,MM:si,y:si,yy:si},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,r){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Ys={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,r){var n=Ys.words[r];return 1===r.length?t?n[0]:n[1]:e+" "+Ys.correctGrammaticalCase(e,n)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_ок
16тобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:Ys.translate,mm:Ys.translate,h:Ys.translate,hh:Ys.translate,d:"дан",dd:Ys.translate,M:"месец",MM:Ys.translate,y:"годину",yy:Ys.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Ns={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,r){var n=Ns.words[r];return 1===r.length?t?n[0]:n[1]:e+" "+Ns.correctGrammaticalCase(e,n)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:Ns.translate,mm:Ns.translate,h:Ns.translate,hh:Ns.translate,d:"dan",dd:Ns.translate,M:"mesec",MM:Ns.translate,y:"godinu",yy:Ns.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%
16d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,r){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){12===e&&(e=0);return"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}});e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});var Fs={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},Ws={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(e){return Ws[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Fs[e]})}
vendor: 6,325 bytes, lines 16-17
16,meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,r){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){12===e&&(e=0);return"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}});e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},
17calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){12===e&&(e=0);return"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}});e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sext_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Sex_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",m:"minutu ida",mm:"minutus %d",h:"horas ida",hh:"horas %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}});e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,r){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%
17d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});var Us="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:li,past:ui,s:"puS lup",m:"wa’ tup",mm:ci,h:"wa’ rep",hh:ci,d:"wa’ jaj",dd:ci,M:"wa’ jar",MM:ci,y:"wa’ DIS",yy:ci},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var qs={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},dayOfMonthOrdinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(e){if(0===e)return e+"'ıncı";var t=e%10,r=e%100-t,n=e>=100?100:null;return e+(qs[t]||qs[r]||qs[n])},week:{dow:1,doy:7}});e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,r){return e>11?r?"d'o":"D'O":r?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:pi,m:pi,mm:pi,h:pi,hh:pi,d:pi,dd:pi,M:pi,MM:pi,y:pi,yy:pi},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibr
17ir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:mi,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:yi("[Сьогодні "),nextDay:yi("[Завтра "),lastDay:yi("[Вчора "),nextWeek:yi("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return yi("[Минулої] dddd [").call(this);case 1:case 2:case 4:return yi("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:hi,mm:hi,h:"годину",hh:hi,d:"день",dd:hi,M:"місяць",MM:hi,y:"рік",yy:hi},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});var Hs=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],Vs=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:Hs,monthsShort:Hs,weekdays:Vs,weekdaysShort:Vs,weekdaysMin:Vs,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,r){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%
17d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,r){return e<12?r?"sa":"SA":r?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~út
17é",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}});e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){12===e&&(e=0);return"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){12===e&&(e=0);return"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%
17d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){12===e&&(e=0);return"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});e.locale("en");return e});define("moment",["moment/moment-with-locales"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/history",["require","exports","ribsjs","underscore","../../configuration/configuration","../../library/model/model"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("underscore"),i=e("../../configuration/configuration"),o=e("../../library/model/model"),a=function(e){function t(r,o){var a=e.call(this,n.extend({trackFormat:i.default.history.defaultTrackFormat,contextName:i.default.history.contextName,contextVersion:i.default.history.contextVersion},r),o)||this;a.adapter=new t.Adapter(n.extend(t.AdapterOptions,{model:a}));a.url=t.url;return a}__extends(t,e);t.prototype.parse=function(e){return e instanceof Array?e[0]:e};t.prototype.save=function(t,r){r=n.extend({},this.options,r);e.prototype.save.call(this,t,r)};t.Adapter=r.Adapter.DefaultAdapter;t.AdapterOptions={};t.url="";return t}(o.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/history",["require","exports","./abstractManager","ribsjs","underscore","moment","../configuration/configuration","chrisweb-utilities","../models/manager/history"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("ribsjs"),i=n.EventsManager,o=e("underscore"),a=e("moment"),s=e("../configuration/configuration"),l=e("chrisweb-utilities"),u=e("../models/manager/history"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"history"},enumerable:!0,configurable:!0});t.prototype.getUrlApi=function(){return s.default.api.getUrl(s.default.api.methods.history)};t.prototype.addNewPlayEvent=function(e,t){this.add(new u.default({trackId:e,event:"play",eventDate:a().unix()}),t)};t.prototype.addNewListen30Event=function(e,t,r){i.trigger("STATS:PLAYER:PLAY30",{id:e,name:r});var n={id:t.id,type:t.type,listTitle:t.listTitle};this.add(new u.default({trackId:e,event:"listen-30",eventDate:a().unix(),contextData:{origin:n}}),{userData:this.options.userData})};t.prototype.add=function(e,t){var r=this;e instanceof Array&&(e=e[0]);var n=o.extend({trackFormat:s.default.history.defaultTrackFormat,contextName:s.default.history.contextName,contextVersion:s.default.history.contextVersion},e.attributes);if(l.default.isServer()){var i=t.success;t.success=function(e,t,n){r.fetcher.collection.remove(e);
17i&&i(e,t,n)}}return this.fetcher.collection.create(n,o.extend({url:this.getUrlApi(),wait:!0,type:"POST"},t))};return t}(r.ADataManager);t.HistoryManager=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/legals",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){var t=e.call(this)||this;t.options.defaultLanguage="en";return t}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"legal"},enumerable:!0,configurable:!0});return t}(r.ADataManager);t.LegalsManager=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/localization",["require","exports","./abstractManager","../configuration/configuration"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("../configuration/configuration"),i=function(e){function t(){var t=e.call(this)||this;t.options.fetchById=!0;t.options.defaultLanguage=n.default.application.acceptedLanguages[0];return t}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"translation"},enumerable:!0,configurable:!0});return t}(r.ADataManager);t.LocalizationManager=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/notifications",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"notifications"},enumerable:!0,configurable:!0});
17t.Event={GenericNotifications:"genericNotifications",FollowerNotifications:"followerNotifications"};return t}(r.ADataManager);t.NotificationManager=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/posts",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"posts"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new r.ADataFetcherQueryBundler(this.NAME)};return t}(r.ADataManager);t.PostsManager=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/playlist",["require","exports","../../library/model/model","ribsjs","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/model/model"),n=e("ribsjs"),i=e("underscore"),o=function(e){function t(r,n){var o=e.call(this,r,n)||this;o.adapter=new t.Adapter(i.extend(t.AdapterOptions,{model:o}));o.url=t.url;return o}__extends(t,e);t.prototype.parse=function(e){return e instanceof Array?e[0]:e};t.prototype.save=function(t,r){r=i.extend({},this.options,r);e.prototype.save.call(this,t,r)};t.Adapter=n.Adapter.DefaultAdapter;t.AdapterOptions={};t.url="";return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/playlists",["require","exports","./abstractManager","../configuration/configuration","underscore","../models/manager/playlist","../library/error/error","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("../configuration/configuration"),i=e("underscore"),o=e("../models/manager/playlist"),a=e("../library/error/error"),s=e("FSPromise"),l=s.FSPromise,u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"playlist"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new r.ADataFetcherQueryBundler(this.NAME)};t.prototype.getFeatured=function(e){return this.getByAttribute({},i.extend({},this.options,e,{url:n.default.api.getUrl(n.default.api.methods.playlistsFeatured)}))};t.prototype.getUrlApi=function(){return n.default.api.getUrl(n.default.api.methods.playlists)};t.prototype.addSafe=function(e,t){var r=this;return new l(function(n,o){var s=i.extend({},t,{url:r.getUrlApi(),wait:!0,success:function(e,t,i){r.fetcher.fetchedAll({dataOfModelsNotFetched:[],modelsAlreadyFetched:[e],options:i}).catch(function(e){var t=new a.default("Error during fetching all data for playlist",{userData:i.userData}),r=!1;if("stack"in e){t.options.originalErrorStack=e.stack;r=!0}if("constructor"in e){t.options.originalErrorType=e.constructor.name;r=!0}r||(t.options.details=e);console.error(t)});n(e.clone())},error:function(e,t,r){o(r.errorThrown[0])},type:"POST"});r.fetcher.collection.create(e,s)})};t.prototype.remove=function(e,t){var r=this;return this.get(e.id,{projection:o.default,userData:t.userData}).then(function(e){return new l(function(n,o){var s=e[0],l=i.extend({},t,{url:r.getUrlApi()+"/"+s.modelSource.id,wait:!0,patch:!0,type:"DELETE",success:function(e,t,i){n(e);r.fetcher.remove({
18modelsToRemove:[e],options:i})},error:function(e,r,n){o(new a.default("Delete playlist error",{model:e,xhr:r,response:n,userData:t.userData}))}});s.destroy(l)})})};t.prototype.update=function(t,r){var n=this;return this.get(t.id,{projection:o.default,userData:r.userData}).then(function(o){return new l(function(s,l){var u=o[0];t.previousNbTracks=u.get("tracks").length;var c=i.extend({url:n.getUrlApi(),wait:!0,patch:!0},r,{success:function(e,t,r){n.fetcher.collection.remove(u);u.close();n.fetcher.fetchedAll({modelsAlreadyFetched:[e],dataOfModelsNotFetched:[],options:r}).then(function(){s(e)})},error:function(e,t,n){l(new a.default("Update playlist error",{model:e,xhr:t,response:n,userData:r.userData}))},type:"PATCH"});e.prototype.update.call(n,u,t,c)})})};return t}(r.ADataManager);t.PlaylistsManager=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/collection/collection",["require","exports","ribsjs","../utilities/object","../model/model"],e)}(function(e,t){"use strict";
18Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("../utilities/object"),i=e("../model/model"),o=function(e){function t(t,r){void 0===r&&(r={});var n=e.call(this,t,r)||this;"url"in r&&(n.url=r.url);n.model="model"in r?r.model:i.default;return n}__extends(t,e);t.prototype.close=function(){e.prototype.close.call(this);n.cleanObject(this)};return t}(r.Collection);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/radios",["require","exports","./abstractManager","ribsjs","FSPromise","../library/error/error","../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("ribsjs"),i=e("FSPromise"),o=i.FSPromise,a=e("../library/error/error"),s=e("../library/collection/collection"),l=function(e){function t(){var t=e.call(this)||this;t.planningCollection=new n.Collection;return t}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"radio"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new r.ADataFetcherQueryBundler(this.NAME)};t.prototype.getPlanning=function(e){var t=this;return new o(function(r,n){t.planningCollection.fetch({data:{radioId:e},error:function(e,t,r){n(r.errorThrown.length>0?new a.default(r.errorThrown.map(function(e){return e}).join("\n")):new a.default("error fetching radio planning, status: "+t.status))},success:function(e,t,n){r(new s.default(t))},dataParameters:{limit:1e3}})})};return t}(r.ADataManager);t.RadiosManager=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/structuredData",["require","exports"],e)}(function(e,t){"use strict";function r(e,t,r){return 2===arguments.length?__assign({type:e},t):__assign({type:e,context:t},r)}Object.defineProperty(t,"__esModule",{value:!0});t.IStructuredDataEntity=r;var n=function(){function e(){}e.implement=function(t,r){return function(e){function n(n){var i=e.call(this)||this;i.type=t;i.context=r;i.applyData(n);return i}__extends(n,e);return n}(e)};e.prototype.applyData=function(e){for(var t in e)"function"!=typeof this[t]&&"type"!==t&&"context"!==t&&(this[t]=e[t])};return e}();t.StructuredDataEntity=n;t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/google/comment",["require","exports","../structuredData"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../structuredData");t.Comment=r.StructuredDataEntity.implement("Comment","http://schema.org");t.default=t.Comment});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/google/pers
18on",["require","exports","../structuredData"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../structuredData");t.Person=r.StructuredDataEntity.implement("Person","http://schema.org");t.default=t.Person});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/configuration/routesDefinitions",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={welcome:{path:"",callback:function(){return{controller:"welcome/index",params:{},method:"get"}}},homepage:{path:"start",callback:function(){return{controller:"homepage/index",params:{},method:"get"}}},retrospective2015:{path:"2015-in-review",callback:function(){return{controller:"retrospective/index",params:{name:"2015"},method:"get"}}},retrospective2016:{path:"2016-in-review",callback:function(){return{controller:"retrospective/index",params:{name:"2016"},method:"get"}}},retrospective2017:{path:"2017-in-review",callback:function(){return{controller:"retrospective/index",params:{name:"2017"},method:"get"}}},retrospective2018:{path:"2018-in-review",callback:function(){return{controller:"retrospective/index",params:{name:"2018"},method:"get"}}},retrospective2019:{path:"2019-in-review",callback:function(){return{controller:"retrospective/index",params:{name:"2019"},method:"get"}}},about:{path:"about",callback:function(){return{controller:"about/index",params:{},method:"get"}}},apps:{path:"apps",callback:function(){return{controller:"apps/index",params:{},method:"get"}}},album:{path:"album",requiredParams:["id"],optionalParams:["name","subpage"],callback:function(e,t,r){void 0===r&&(r="");return{controller:"albums/index",params:{id:parseInt(e),name:t,subpage:r},method:"get"}}},artist:{path:"artist",requiredParams:["id"],optionalParams:["name","subpage"],callback:function(e,t,r){void 0===r&&(r="");return{controller:"artists/index",params:{id:parseInt(e),name:t,subpage:r},method:"get"}}},blog:{path:"blog",optionalParams:["subpage"],callback:function(e){void 0===e&&(e="");return{controller:"blog/index",params:{subpage:e},method:"get"}}},community:{path:"community",requiredParams:["name"],optionalParams:["subpage"],callback:function(e,t){void 0===t&&(t="");return{controller:"communities/index",params:{name:e,subpage:t},method:"get"}}},contact:{path:"contact",optionalParams:["category","type","id"],callback:function(e,t,r){void 0===e&&(e="");void 0===t&&(t="");void 0===r&&(r="");return{controller:"contact/index",params:{category:e,type:t,id:parseInt(r)},method:"get"}}},explore:{path:"explore",optionalParams:["subpage"],callback:function(e){void 0===e&&(e="");return{controller:"explore/index",params:{subpage:e},method:"get"}}},faq:{path:"faq",callback:function(){return{controller:"faq/index",params:{},method:"get"}}},jobs:{path:"jobs",optionalParams:["subpage"],callback:function(e){void 0===e&&(e="");return{controller:"jobs/index",params:{subpage:e},method:"get"}}},legal:{path:"legal",optionalParams:["subpage"],callback:function(e){void 0===e&&(e="");return{controller:"legal/index",params:{subpage:e},method:"get"}}},cookies:{path:"cookies",callback:function(){return{controller:"cookies/index",params:{},method:"get"}}},playlist:{path:"playlist",requiredParams:["id"],optionalParams:["name","subpage"],callback:function(e,t,r){void 0===r&&(r="");return{controller:"playlists/index",params:{id:parseInt(e),name:t,subpage:r},method:"get"}}},post:{path:"post",requiredParams:["id"],callback:function(e){return{controller:"post/index",params:{id:parseInt(e)},method:"get"}}},radios:{path:"radios",optionalParams:["subpage"],callback:function(e){return{controller:e?"radios/index":"radios/radios",params:{subpage:e},method:"get"}}},search:{path:"search",optionalParams:["type"],callback:function(e){return{controller:"search/index",params:{type:e},method:"get"}}},track:{path:"track",requiredParams:["id"],optionalParams:["name","subpage"],callback:function(e,t,r){void 0===r&&(r="");return{controller:"tracks/index",params:{id:parseInt(e),name:t,subpage:r},method:"get"}}},user:{path:"user",requiredParams:["id"],optionalParams:["name","subpage"],callback:function(e,t,r){void 0===r&&(r="");return{controller:"user/index",params:{id:parseInt(e),name:t,subpage:r},method:"get"}}},settings:{path:"settings",callback:function(){return{controller:"user/index",params:{subpage:"settings"},method:"get"}}},notFound:{path:"404",callback:function(){return{controller:"error/index",params:{code:"404"},method:"get"}}},serverError:{path:"500",callback:function(){return{controller:"error/index",params:{code:"500"},method:"get"}}}};t.default=r});!function(e){"use strict";var t={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"Ae","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"Oe","Ő":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"Ue","Ű":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"ae","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"oe","ő":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"ue","ű":"u","ý":"y","þ":"th","ÿ":"y","ẞ":"SS","ا":"a","أ":"a","إ":"i","آ":"aa","ؤ":"u","ئ":"e","ء":"a","ب":"b","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ي":"y","ى":"a","ة":"h","ﻻ":"la","ﻷ":"laa","ﻹ":"lai","ﻵ":"laa","گ":"g","چ":"ch","پ":"p","ژ":"zh","ک":"k","ی":"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","က":"k","ခ":"kh","ဂ":"g","ဃ":"ga","င":"ng","စ":"s","ဆ":"sa","ဇ":"z","စျ":"za","ည":"ny","ဋ":"t","ဌ":"ta","ဍ":"d","ဎ":"da","ဏ":"na","တ":"t","ထ":"ta","ဒ":"d","ဓ":"da","န":"n","ပ":"p","ဖ":"pa","ဗ"
18:"b","ဘ":"ba","မ":"m","ယ":"y","ရ":"ya","လ":"l","ဝ":"w","သ":"th","ဟ":"h","ဠ":"la","အ":"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h","ဧ":"e","၏":"-e","ဣ":"i","ဤ":"-i","ဉ":"u","ဦ":"-u","ဩ":"aw","သြော":"aw","ဪ":"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"","č":"c","ď":"d","ě":"e","ň":"n","ř":"r","Å¡":"s","Å¥":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Å ":"S","Ť":"T","Å®":"U","Ž":"Z","ހ":"h","ށ":"sh","ނ":"n","ރ":"r","ބ":"b","ޅ":"lh","ކ":"k","އ":"a","ވ":"v","މ":"m","ފ":"f","ދ":"dh","ތ":"th","ލ":"l","ގ":"g","ޏ":"gn","ސ":"s","ޑ":"d","ޒ":"z","ޓ":"t","ޔ":"y","ޕ":"p","ޖ":"j","ޗ":"ch","ޘ":"tt","ޙ":"hh","ޚ":"kh","ޛ":"th","ޜ":"z","ޝ":"sh","ޞ":"s","ޟ":"d","Þ ":"t","Þ¡":"z","Þ¢":"a","Þ£":"gh","Þ¤":"q","Þ¥":"w","Þ¦":"a","Þ§":"aa","Þ¨":"i","Þ©":"ee","Þª":"u","Þ«":"oo","Þ¬":"e","Þ­":"ey","Þ®":"o","Þ¯":"oa","Þ°":"","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"p","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","α":"a","β":"v","γ":"g","δ":"d","ε":"e","ζ":"z","η":"i","θ":"th","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"ks","ο":"o","π":"p","ρ":"r","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"o","ά":"a","έ":"e","ί":"i","ό":"o","ύ":"y","ή":"i","ώ":"o","ς":"s","ϊ":"i","ΰ":"y","ϋ":"y","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"I","Θ":"TH","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"KS","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Î¥":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"O","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"I","Ώ":"O","Ϊ":"I","Ϋ":"Y","ā":"a","ē":"e","Ä£":"g","Ä«":"i","Ä·":"k","ļ":"l","ņ":"n","Å«":"u","Ā":"A","Ē":"E","Ä¢":"G","Ī":"I","Ķ":"k","Ä»":"L","Ņ":"N","Ū":"U","Ќ":"Kj","ќ":"kj","Љ":"Lj","љ":"lj","Њ":"Nj","њ":"nj","Тс":"Ts","тс":"ts","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ś":"S","Ź":"Z","Å»":"Z","Є":"Ye","І":"I","Ї":"Yi","Ґ":"G","є":"ye","і":"i","ї":"yi","ґ":"g","ă":"a","Ă":"A","ș":"s","Ș":"S","ț":"t","Ț":"T","Å£":"t","Å¢":"T","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"yo","ж":"zh","з":"z","и":"i","й":"i","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"kh","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ё":"Yo","Ж":"Zh","З":"Z","И":"I","Й":"I","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Ð¥":"Kh","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","ђ":"dj","ј":"j","ћ":"c","џ":"dz","Ђ":"Dj","Ј":"j","Ћ":"C","Џ":"Dz","ľ":"l","ĺ":"l","ŕ":"r","Ľ":"L","Ĺ":"L","Ŕ":"R","ş":"s","Ş":"S","ı":"i","İ":"I","ğ":"g","Ğ":"G","ả":"a","Ả":"A","ẳ":"a","Ẳ":"A","ẩ":"a","Ẩ":"A","đ":"d","Đ":"D","ẹ":"e","Ẹ":"E","ẽ":"e","Ẽ":"E","ẻ":"e","Ẻ":"E","ế":"e","Ế":"E","ề":"e","Ề":"E","ệ":"e","Ệ":"E","ễ":"e","Ễ":"E","ể":"e","Ể":"E","ỏ":"o","ọ":"o","Ọ":"o","ố":"o","Ố":"O","ồ":"o","Ồ":"O","ổ":"o","Ổ":"O","ộ":"o","Ộ":"O","ỗ":"o","Ỗ":"O","Æ¡":"o","Æ ":"O","ớ":"o","Ớ":"O","ờ":"o","Ờ":"O","ợ":"o","Ợ":"O","ỡ":"o","á» ":"O","Ở":"o","ở":"o","ị":"i","Ị":"I","Ä©":"i","Ĩ":"I","ỉ":"i","Ỉ":"i","á»§":"u","Ủ":"U","ụ":"u","Ụ":"U","Å©":"u","Ũ":"U","ư":"u","Ư":"U","ứ":"u","Ứ":"U","ừ":"u","Ừ":"U","á»±":"u","á»°":"U","ữ":"u","á»®":"U","á»­":"u","Ử":"ư","á»·":"y","á»¶":"y","ỳ":"y","Ỳ":"Y","ỵ":"y","á»´":"Y","ỹ":"y","Ỹ":"Y","ạ":"a","Ạ":"A","ấ":"a","Ấ":"A","ầ":"a","Ầ":"A","ậ":"a","Ậ":"A","ẫ":"a","Ẫ":"A","ắ":"a","Ắ":"A","ằ":"a","Ằ":"A","ặ":"a","Ặ":"A","ẵ":"a","Ẵ":"A","“":'"',"”":'"',"‘":"'","’":"'","∂":"d","ƒ":"f","™":"(TM)","©":"(C)","œ":"oe","Œ":"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o","º":"o","ª":"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","â
18‚£":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","Â¥":"CNY","元":"CNY","円":"YEN","ï·¼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN","лв":"BGN","៛":"KHR","₡":"CRC","₸":"KZT","ден":"MKD","zł":"PLN","₽":"RUB","₾":"GEL"},r=["်","Þ°"],n={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{"ç":"c","ə":"e","ğ":"g","ı":"i","ö":"o","ş":"s","ü":"u","Ç":"C","Ə":"E","Ğ":"G","İ":"I","Ö":"O","Ş":"S","Ü":"U"},cs:{"č":"c","ď":"d","ě":"e","ň":"n","ř":"r","Å¡":"s","Å¥":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Å ":"S","Ť":"T","Å®":"U","Ž":"Z"},fi:{"ä":"a","Ä":"A","ö":"o","Ö":"O"},hu:{"ä":"a","Ä":"A","ö":"o","Ö":"O","ü":"u","Ü":"U","ű":"u","Ű":"U"},lt:{"ą":"a","č":"c","ę":"e","ė":"e","į":"i","Å¡":"s","ų":"u","Å«":"u","ž":"z","Ą":"A","Č":"C","Ę":"E","Ė":"E","Ä®":"I","Å ":"S","Ų":"U","Ū":"U"},lv:{"ā":"a","č":"c","ē":"e","Ä£":"g","Ä«":"i","Ä·":"k","ļ":"l","ņ":"n","Å¡":"s","Å«":"u","ž":"z","Ā":"A","Č":"C","Ē":"E","Ä¢":"G","Ī":"i","Ķ":"k","Ä»":"L","Ņ":"N","Å ":"S","Ū":"u","Ž":"Z"},pl:{"ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"e","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Å»":"Z"},sk:{"ä":"a","Ä":"A"},sr:{"љ":"lj","њ":"nj","Љ":"Lj","Њ":"Nj","đ":"dj","Đ":"Dj"},tr:{"Ü":"U","Ö":"O","ü":"u","ö":"o"}},o={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},a=[";","?",":","@","&","=","+","$",",","/"].join(""),s=[";","?",":","@","&","=","+","$",","].join(""),l=[".","!","~","*","'","(",")"].join(""),u=function(e,u){var c,f,h,m,y,g,v,_,b,w,x,M,S,k,T="-",A="",E="",P=!0,O={},j="";if("string"!=typeof e)return"";"string"==typeof u&&(T=u);v=o.en;_=i.en;if("object"==typeof u){c=u.maintainCase||!1;O=u.custom&&"object"==typeof u.custom?u.custom:O;h=+u.truncate>1&&u.truncate||!1;m=u.uric||!1;y=u.uricNoSlash||!1;g=u.mark||!1;P=!1!==u.symbols&&!1!==u.lang;T=u.separator||T;m&&(j+=a);y&&(j+=s);g&&(j+=l);v=u.lang&&o[u.lang]&&P?o[u.lang]:P?o.en:{};_=u.lang&&i[u.lang]?i[u.lang]:!1===u.lang||!0===u.lang?{}:i.en;if(u.titleCase&&"number"==typeof u.titleCase.length&&Array.prototype.toString.call(u.titleCase)){u.titleCase.forEach(function(e){O[e+""]=e+""});f=!0}else f=!!u.titleCase;u.custom&&"number"==typeof u.custom.length&&Array.prototype.toString.call(u.custom)&&u.custom.forEach(function(e){O[e+""]=e+""});Object.keys(O).forEach(function(t){var r;r=t.length>1?new RegExp("\\b"+d(t)+"\\b","gi"):new RegExp(d(t),"gi");e=e.replace(r,O[t])});for(x in O)j+=x}j+=T;j=d(j);e=e.replace(/(^\s+|\s+$)/g,"");S=!1;k=!1;for(w=0,M=e.length;w<M;w++){x=e[w];if(p(x,O))S=!1;else if(_[x]){x=S&&_[x].match(/[A-Za-z0-9]/)?" "+_[x]:_[x];S=!1}else if(x in t){if(w+1<M&&r.indexOf(e[w+1])>=0){E+=x;x=""}else if(!0===k){x=n[E]+t[x];E=""}else x=S&&t[x].match(/[A-Za-z0-9]/)?" "+t[x]:t[x];S=!1;k=!1}else if(x in n){E+=x;x="";w===M-1&&(x=n[E]);k=!0}else if(!v[x]||m&&-1!==a.indexOf(x)||y&&-1!==s.indexOf(x)){if(!0===k){x=n[E]+x;E="";k=!1}else S&&(/[A-Za-z0-9]/.test(x)||A.substr(-1).match(/A-Za-z0-9]/))&&(x=" "+x);S=!1}else{x=S||A.substr(-1).match(/[A-Za-z0-9]/)?T+v[x]:v[x];x+=void 0!==e[w+1]&&e[w+1].match(/[A-Za-z0-9]/)?T:"";S=!0}A+=x.replace(new RegExp("[^\\w\\s"+j+"_-]","g"),T)}f&&(A=A.replace(/(\w)(\S*)/g,function(e,t,r){var n=t.toUpperCase()+(null!==r?r:"");return Object.keys(O).indexOf(n.toLowerCase())<0?n:n.toLowerCase()}));A=A.replace(/\s+/g,T).replace(new RegExp("\\"+T+"+","g"),T).replace(new RegExp("(^\\"+T+"+|\\"+T+"+$)","g"),"");if(h&&A.length>h){b=A.charAt(h)===T;A=A.slice(0,h);b||(A=A.slice(0,A.lastIndexOf(T)))}c||f||(A=A.toLowerCase());return A},c=function(e){return function(t){return u(t,e)}},d=function(e){return e.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},p=function(e,t){for(var r in t)if(t[r]===e)return!0};if("undefined"!=typeof module&&module.exports){module.exports=u;module.exports.createSlug=c}else if(void 0!==define&&define.amd)define("speakingurl/speakingurl",[],function(){return u});else try{if(e.getSlug||e.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";e.getSlug=u;e.createSlug=c}catch(e){}}(this);define("speakingurl",["speakingurl/speakingurl"],function(e){return e});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/route",["require","exports","underscore","chrisweb-utilities","../../configuration/routesDefinitions","../../configuration/configuration","speakingurl"],e)}(function(e,t){"use strict";
18Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("underscore"),i=e("chrisweb-utilities"),o=e("../../configuration/routesDefinitions"),a=e("../../configuration/configuration"),s=e("speakingurl");!function(e){!function(e){!function(e){function t(e,t,r){void 0===t&&(t={});void 0===r&&(r={});var n=o.default[e],a="/"+n.path;n.requiredParams&&n.requiredParams.forEach(function(e){var r="name"===e?s(t[e]):t[e];a+="/"+r});n.optionalParams&&n.optionalParams.forEach(function(e){if(e in t)if("name"===e){var r=i.default.safeUnescape(t.name);""===s(r)?a+="/_":a+="/"+s(r)}else a+="/"+t[e]});return a+l(r)}function r(e,r,n){void 0===r&&(r={});void 0===n&&(n={});return a.default.application.websiteProtocol+(a.default.application.websiteHostname+"/"+t(e,r,n)).replace(/\/+/g,"/")}function l(e){var t=Object.keys(e).map(function(t){return e[t]instanceof Array?e[t].map(function(e){return t+"[]="+e}).join("&"):t+"="+e[t]}).join("&");return t.length?"?"+t:""}function u(){var e={};n.values(o.default).forEach(function(t){var r=t.path;t.requiredParams&&t.requiredParams.forEach(function(e){r+="/:"+e});t.optionalParams&&t.optionalParams.forEach(function(e){i.default.isClient()?r+="(/:"+e+")":r+="/:"+e+"?"});e[r]=t.callback});return e}function c(e){void 0===e&&(e=window.location.href);var t=e.split("?");if(t.length<2)return{};var r=t[1].split("&"),n={};r.forEach(function(e){var t=e.split("=");n[t[0]]=t[1]});return n}n.keys(o.default).map(function(e){return e.split("/")});e.Events={InternalNavigation:"internalnavigation"};e.getUrl=t;e.getFullUrl=r;e.objectToQueryParams=l;e.getRoutes=u;e.getParams=c}(e.Route||(e.Route={}))}(e.Utilities||(e.Utilities={}))}(r||(r={}));t.default=r.Utilities.Route});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/user",["require","exports","ribsjs","underscore","../../library/model/model","../../library/structuredData/google/person","../../library/utilities/route","chrisweb-utilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("underscore"),i=e("../../library/model/model"),o=e("../../library/structuredData/google/person"),a=e("../../library/utilities/route"),s=e("chrisweb-utilities"),l=function(e){function t(r,i){void 0===r&&(r={});var o=e.call(this,r,i)||this;o.adapter=new t.Adapter(n.extend(t.AdapterOptions,{model:o}));o.url=i&&"url"in i?i.url:t.url;return o}__extends(t,e);t.generateStructuredData=function(e,t){void 0===t&&(t=0);var r=a.default.getFullUrl("user",{id:e.get("id")});return new o.Person({identifier:r,url:r})};t.prototype.initialize=function(t,r){e.prototype.initialize.call(this,t,r);this.addFallbackSubscriptionSettings()};t.prototype.save=function(t,r){if(s.utilities.isServer())for(var n=[this.attributes,t||{}],i=0,o=n;i<o.length;i++){var a=o[i];delete a.newsletter;a.newsletterPreferences||(a.newsletterPreferences=[])}e.prototype.save.call(this,t,r)};t.prototype.addFallbackSubscriptionSettings=function(){var e=null===this.get("newsletterPreferences")?null:this.get("newsletterPreferences")||[];"null"===e&&(e=null);this.set("newsletterPreferences",e)};t.prototype.cleanupNewsletterPreferencesArray=function(){var e=this.get("newsletterPreferences");if(e instanceof Array){for(var t=e.indexOf("");-1!==t;){e.splice(t,1);t=e.indexOf("")}0===e.length&&this.set("newsletterPreferences",null)}};t.Adapter=r.Adapter.DefaultAdapter;t.AdapterOptions={};t.url="";return t}(i.default);t.User=l;t.default=l});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/schema.org/IDuration",["require","exports","moment"],e)}(function(e,t){"use strict";function r(e){return n.duration(e).toISOString()}
18Object.defineProperty(t,"__esModule",{value:!0});var n=e("moment");t.IDuration=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/google/musicRecording",["require","exports","../structuredData"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../structuredData");t.MusicRecording=r.StructuredDataEntity.implement("MusicRecording","http://schema.org");t.default=t.MusicRecording});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/google/musicAlbum",["require","exports","../structuredData"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../structuredData");t.MusicAlbum=r.StructuredDataEntity.implement("MusicAlbum","http://schema.org");t.default=t.MusicAlbum});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/schema.org/IDateTime",["require","exports"],e)}(function(e,t){"use strict";function r(e){e instanceof Date||(e=new Date(e));return e.toISOString()}Object.defineProperty(t,"__esModule",{value:!0});t.IDateTime=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/google/musicGroup",["require","exports","../structuredData"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../structuredData");t.MusicGroup=r.StructuredDataEntity.implement("MusicGroup","http://schema.org");t.default=t.MusicGroup});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/google/listenAction",["require","exports","../structuredData"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../structuredData");t.ListenAction=r.StructuredDataEntity.implement("ListenAction","http://schema.org");t.default=t.ListenAction});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/google/entryPoint",["require","exports","../structuredData"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../structuredData");t.EntryPoint=r.StructuredDataEntity.implement("EntryPoint","http://schema.org");t.default=t.EntryPoint});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)
19}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/artist",["require","exports","ribsjs","underscore","../../library/model/model","../../library/structuredData/google/musicGroup","../../library/utilities/route","../../library/structuredData/google/listenAction","../../library/structuredData/google/entryPoint"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("underscore"),i=e("../../library/model/model"),o=e("../../library/structuredData/google/musicGroup"),a=e("../../library/utilities/route"),s=e("../../library/structuredData/google/listenAction"),l=e("../../library/structuredData/google/entryPoint"),u=function(e){function t(r,i){void 0===r&&(r={});var o=e.call(this,r,i)||this;o.adapter=new t.Adapter(n.extend(t.AdapterOptions,{model:o}));o.url=i&&"url"in i?i.url:t.url;return o}__extends(t,e);t.generateStructuredData=function(e){var t=e.get("description")&&e.get("description").en?e.get("description").en:void 0,r=[];e.get("cover")&&e.get("cover").small&&e.get("cover").small.size600&&r.push(e.get("
19cover").small.size600);e.get("cover")&&e.get("cover").big&&e.get("cover").big.size600&&r.push(e.get("cover").big.size600);var n=a.default.getFullUrl("artist",{id:e.get("id")}),i=[];e.get("homepage")&&i.push(e.get("homepage"));e.get("facebookPage")&&i.push("https://www.facebook.com/"+e.get("facebookPage"));e.get("googlePage")&&i.push("https://plus.google.com/"+e.get("googlePage"));e.get("instagramPage")&&i.push("https://www.instagram.com/"+e.get("instagramPage"));return new o.MusicGroup({identifier:n,name:e.get("name"),description:t,image:r,url:n,sameAs:i,potentialAction:new s.ListenAction({expectsAcceptanceOf:[],target:[new l.EntryPoint({url:n,inLanguage:"USD",actionPlatform:["http://schema.org/DesktopWebPlatform","http://schema.org/IOSPlatform","http://schema.org/AndroidPlatform"]})]})})};t.Adapter=r.Adapter.DefaultAdapter;t.AdapterOptions={};t.url="";return t}(i.default);t.Artist=u;t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/album",["require","exports","../../library/model/model","../../library/utilities/route","../../library/structuredData/google/musicAlbum","../../library/structuredData/schema.org/IDateTime","./artist","./track"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/model/model"),n=e("../../library/utilities/route"),i=e("../../library/structuredData/google/musicAlbum"),o=e("../../library/structuredData/schema.org/IDateTime"),a=e("./artist"),s=e("./track"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.generateStructuredData=function(e,t){void 0===t&&(t=1);var r=n.default.getFullUrl("album",{id:e.get("id")}),l=new i.MusicAlbum({identifier:r,url:1&t?r:void 0});if(1&t){l.name=e.get("name");l.description=e.get("description")&&e.get("description").en?e.get("description").en:void 0;e.get("tracks")&&(l.numTracks=e.get("tracks").length);var u=[];e.get("cover")&&e.get("cover").small&&e.get("cover").small.size600&&u.push(e.get("cover").small.size600);e.get("cover")&&e.get("cover").big&&e.get("cover").big.size600&&u.push(e.get("cover").big.size600);e.get("dateCreated")&&o.IDateTime(1e3*e.get("dateCreated")),e.get("dateReleased")&&o.IDateTime(1e3*e.get("dateReleased")),e.get("dateUpdated")&&o.IDateTime(1e3*e.get("dateUpdated"))}2&t&&e.get("artist")&&(l.byArtist=a.Artist.generateStructuredData(e.get("artist")));4&t&&e.get("tracks")&&(l.tracks=e.get("tracks").map(function(e){return new s.Track(e)}).map(function(e){return s.Track.generateStructuredData(e)}));return l};return t}(r.default);t.Album=l;t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/track",["require","exports","../../library/model/model","../../library/utilities/route","../../library/structuredData/schema.org/IDuration","../../library/structuredData/google/musicRecording","./album","./artist"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/model/model"),n=e("../../library/utilities/route"),i=e("../../library/structuredData/schema.org/IDuration"),o=e("../../library/structuredData/google/musicRecording"),a=e("./album"),s=e("./artist"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.generateStructuredData=function(e,t){void 0===t&&(t=1);var r=n.default.getFullUrl("track",{id:e.get("id")}),l=1&t&&e.get("description")&&e.get("description").en?e.get("description").en:void 0,u=new o.MusicRecording({identifier:r,name:1&t?e.get("name"):void 0,description:l,url:1&t?r:void 0,duration:1&t&&e.get("duration")?i.IDuration(e.get("duration")):void 0});2&t&&e.get("artist")&&(u.byArtist=s.Artist.generateStructuredData(e.get("artist")));4&t&&e.get("album")&&(u.inAlbum=[a.default.generateStructuredData(e.get("album"))]);return u};return t}(r.default);t.Track=l;t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/review",["require","exports","../../library/model/model","ribsjs","underscore","../../library/structuredData/google/comment","./user","./track","./album"],e)}(function(e,t){"use strict";
19Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/model/model"),n=e("ribsjs"),i=e("underscore"),o=e("../../library/structuredData/google/comment"),a=e("./user"),s=e("./track"),l=e("./album"),u=function(e){function t(r,n){var o=e.call(this,r,n)||this;o.adapter=new t.Adapter(i.extend(t.AdapterOptions,{model:o}));o.url=t.url;return o}__extends(t,e);t.prototype.parse=function(e){return e instanceof Array?e[0]:e};t.prototype.save=function(t,r){r=i.extend({},this.options,r);e.prototype.save.call(this,t,r)};t.generateStructuredData=function(e,r){void 0===r&&(r=0);var n=new o.default({upvoteCount:e.get("agreeCnt")||0,downvoteCount:e.get("disagreeCnt")||0});1&r&&e.get("authorModel")&&(n.author=a.User.generateStructuredData(e.get("authorModel"),0));if(2&r&&e.get("parentItem")&&e.get("parentItemType")){var i=void 0;switch((e.get("parentItemType")||"").toString().toLowerCase()){default:i=void 0;break;case"track":i=s.Track.generateStructuredData(e.get("parentItem"),0);break;case"album":i=l.Album.generateStructuredData(e.get("parentItem"),0);break;case"review":i=t.generateStructuredData(e.get("parentItem"))}n.about=i}return n};t.Adapter=n.Adapter.DefaultAdapter;t.AdapterOptions={};t.url="";return t}(r.default);t.Review=u;t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/reviews",["require","exports","underscore","./abstractManager","../library/error/error","../configuration/configuration","../models/manager/review"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./abstractManager"),i=e("../library/error/error"),o=e("../configuration/configuration"),a=e("../models/manager/review"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"reviews"},enumerable:!0,configurable:!0});t.prototype.getUrlApi=function(){return o.default.api.getUrl(o.default.api.methods.reviews)};t.prototype.addReviews=function(e,t){var n=this,o=t.success,a=t.error;t.success=function(e,t,r){n.fetcher.fetchedAll({modelsAlreadyFetched:[e],dataOfModelsNotFetched:[],options:r}).then(function(){o&&o(e,t,r)}).catch(function(e){var t=new i.default("Error during fetching all data for reviews",{userData:r.userData}),n=!1;if("stack"in e){t.options.originalErrorStack=e.stack;n=!0}if("constructor"in e){t.options.originalErrorType=e.constructor.name;n=!0}n||(t.options.details=e);console.error(t);a&&a(t)})};return this.fetcher.collection.create(e,r.extend({wait:!0,type:"POST"},t))};t.prototype.remove=function(e,t){var n=this,o=t.userData,s=e.id,l={id:e.id,joinId:e.joinId,type:e.type};return this.getByAttribute(l,{userData:o,projection:a.default,dataParameters:{limit:200}}).then(function(e){return new Promise(function(a,u){var c=e.filter(function(e){return e.get("id")===s})[0];n.fetcher.collection.remove(c);var d=r.extend({},t,{url:n.getUrlApi()+"/"+c.modelSource.id,wait:!0,patch:!0,type:"DELETE",success:function(e,t,r){return a(e)},error:function(e,t,r){u(new i.default("Delete review error",{model:e,xhr:t,response:r,userData:o}))}});d.data=l;d.processData=!0;c.destroy(d)})})};return t}(n.ADataManager);t.ReviewsManager=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/search",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";
19Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.bundleModels=function(e){e.options.userData.bundledModels||(e.options.userData.bundledModels={});var t=e.options.userData.bundledModels||{};t[this.table]||(t[this.table]={models:[],query:[]})};return t}(r.ADataFetcherQueryBundler),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"search"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new n(this.NAME)};return t}(r.ADataManager);t.SearchManager=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/sentiment",["require","exports","ribsjs","underscore","../../library/model/model"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("underscore"),i=e("../../library/model/model"),o=function(e){function t(r,i){var o=e.call(this,r,i)||this;o.adapter=new t.Adapter(n.extend(t.AdapterOptions,{model:o}));o.url=t.url;return o}__extends(t,e);t.prototype.parse=function(e){return e instanceof Array?e[0]:e};t.prototype.save=function(t,r){r=n.extend({},this.options,r);e.prototype.save.call(this,t,r)};t.prototype.isNew=function(){return!this.get("agreeDate")};t.Adapter=r.Adapter.DefaultAdapter;t.AdapterOptions={};t.url="";return t}(i.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/sentiment",["require","exports","./abstractManager","../models/manager/sentiment"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("../models/manager/sentiment"),i=function(e){function t(){var t=e.call(this)||this;t.options.projection=n.default;return t}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"sentiment"},enumerable:!0,configurable:!0});t.prototype.update=function(t,r,n){var i=this,o=n.success;n.success=function(e,t,r){i.fetcher.fetchedAll({modelsAlreadyFetched:[e],options:n,dataOfModelsNotFetched:[]}).then(function(){o&&o(e,t,r)}).catch(function(){o&&o(e,t.savedOptions)})};e.prototype.update.call(this,t,r,n)};return t}(r.ADataManager);t.SentimentManager=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/similars",["require","exports","underscore","./abstractManager","../configuration/configuration","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./abstractManager"),i=e("../configuration/configuration"),o=e("FSProm
19ise"),a=o.FSPromise,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"similar"},enumerable:!0,configurable:!0});t.prototype.getUrlApi=function(e){return i.default.api.getUrl(i.default.api.methods["similars"+e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()])};t.prototype.getByAttribute=function(t,n){n=r.extend({},this.options,n);if("type"in t||n.dataParameters&&"type"in n.dataParameters){var i="type"in t?t.type:n.dataParameters.type;n=r.extend({url:this.getUrlApi(i)},n)}return e.prototype.getByAttribute.call(this,t,n)};t.prototype.preFetchRequest=function(){return new a(function(e,t){setTimeout(e,i.default.application.favorites.delayRequest)})};t.prototype.findPendingRequest=function(e){var t=null;if("id"in e[0]&&"type"in e[0])for(var r=e[0].type,n=0;n<this.requestQueue.length;n++){var i=this.requestQueue[n];if(!1===i.isLock&&(0===i.dataQueue.length||i.dataQueue[0].type===r))return this.requestQueue[n]}if(!t){t={dataQueue:[],promiseQueue:[],fetchPromise:null,remainingDispatch:0,queuePromise:null,isLock:!1};this.requestQueue.unshift(t)}return t};return t}(n.ADataManager);t.SimilarsManager=s});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/user",["require","exports","../../configuration/configuration"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("../../configuration/configuration");!function(e){function t(e){return e&&"cookie"in e?e.cookie.get(n.default.cookies.lang.name):"documentElement"in document&&document.documentElement.lang?document.documentElement.lang:n.default.application.acceptedLanguages[0]}function r(e){var t=!0;void 0!==e&&"session"in e&&e.session.get("me")||(t=!1);return t}e.getUserLanguage=t;e.getIsLogged=r}(r||(r={}));t.default=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/static",["require","exports","underscore","./abstractManager","../configuration/configuration","../library/utilities/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./abstractManager"),i=e("../configuration/configuration"),o=e("../library/utilities/user"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"static"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new n.ADataFetcherQueryBundler(this.NAME)};t.prototype.getByAttribute=function(t,n){void 0===n&&(n=this.options);if("type"in t&&!("url"in n))switch(t.type){case"country":n.url=i.default.api.getUrl(i.default.api.methods.staticCountry);n.fetchById=!0}"lang"in t||(t.lang=o.default.getUserLanguage(n.userData)||i.default.application.acceptedLanguages[0]);return e.prototype.getByAttribute.call(this,t,r.extend({fetchById:!0},n))};return t}(n.ADataManager);t.StaticManager=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/stats",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";
19Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"stat"},enumerable:!0,configurable:!0});return t}(r.ADataManager);t.StatsManager=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/template",["require","exports","./abstractManager","../configuration/configuration","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=e("../configuration/configuration"),i=e("FSPromise"),o=i.FSPromise,a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"template"},enumerable:!0,configurable:!0});t.prototype.preFetchRequest=function(){return new o(function(e,t){setTimeout(e,n.default.application.templates.delayRequest)})};return t}(r.ADataManager);t.TemplateManager=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/tracks",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"track"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new r.ADataFetcherQueryBundler(this.NAME)};t.prototype.saveModel=function(e,t,r){r.success(e,void 0,r)};return t}(r.ADataManager);t.TracksManager=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/user",["require","exports","./abstractManager","underscore","FSPromise","../models/manager/user","../configuration/configuration","../library/error/error","../library/utilities/user","../configuration/errorDefinitions"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=(e("underscore"),e("FSPromise")),i=n.FSPromise,o=e("../models/manager/user"),a=e("../configuration/configuration"),s=e("../library/error/error"),l=e("../library/utilities/user"),u=e("../configuration/errorDefinitions"),c=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;r.SignInErrorIdentifier=t.SignInErrorIdentifier;return r}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"user"},enumerable:!0,configurable:!0});t.prototype.fetchUserData=function(e){var t=this;void 0===e&&(e={});return new i(function(r,n){t.fetcher.collection.fetch({data:e,success:function(e,t,n){r(e)},error:function(e,t,r){n(t)}})})};t.prototype.isLogged=function(){return new i(function(e,t){})};t.prototype.signIn=function(e,r,n){var s=this;void 0===n&&(n=!0);return new i(function(i,l){var u=new o.default;u.save(e,{url:a.default.api.getUrl(a.default.api.methods.oauthGrant),success:function(e,o){u.unset("password",{silent:!0});r.set("me",u.toJSON());u.set("notifSystemSessionToken",o.notifSystemSessionToken);n&&s.trigger(t.Event.UserConnected,u);i(u)},error:function(e,r,n){var i,o=r&&r.responseJSON?r.responseJSON.error:void 0;switch(o){default:i=n.errorThrown instanceof Array?n.errorThrown[0]:n.errorThrown;break;case-5:i=t.SignInErrorIdentifier.InvalidUsername;break;case-6:i=t.SignInErrorIdentifier.InvalidPassword}l({error:i})},wait:!0})})};t.prototype.createUser=function(e,r,n,a){var s=this;void 0===a&&(a=l.default.getUserLanguage(n));return new i(function(i,l){var c=new o.default({idstr:e,password:r,lang:a});c.parse=function(e){return e instanceof Array?e[0]:e};c.save(null,{success:function(){var e=c.get("error");
19if(void 0===e||null===e){c.unset("password",{silent:!0});if(n.session){n.session.set("me",c.toJSON());s.trigger(t.Event.UserConnected,c)}s.fetcher.fetchedAll({dataOfModelsNotFetched:[],modelsAlreadyFetched:[c],options:{userData:n}});i(c)}else l({error:e})},error:function(e,t,r){l("errorList"in t?{error:{code:t.errorList[0].code,message:t.errorList[0].message}}:"responseJSON"in t?{error:{code:t.responseJSON.code,message:t.responseJSON.message}}:"errorThrown"in r?{error:r.errorThrown[0]&&r.errorThrown[0].options?{code:r.errorThrown[0].options.code,message:r.errorThrown[0].message}:{code:"???",message:"???"}}:{error:{code:-1,message:u.default.UNKNOWN_SERVER_ERROR.message}})},userData:n})})};t.prototype.socialMerge=function(e,r){var n=this;return new i(function(i,s){var l=new o.default;l.save({password:e},{url:a.default.api.getUrl(a.default.api.methods.oauthSocialMerge),success:function(){l.unset("password",{silent:!0});r.session.set("me",l.toJSON());n.trigger(t.Event.UserConnected,l);i(l)},error:function(e,t,r){s(r.errorThrown?r.errorThrown[0]||{error:0}:{error:0})}})})};t.prototype.socialReset=function(e){var r=this;return new i(function(n,i){var s=new o.default;s.save({reset:!0},{url:a.default.api.getUrl(a.default.api.methods.oauthSocialReset),success:function(){s.unset("reset",{silent:!0});e.session.set("me",s.toJSON());r.trigger(t.Event.UserConnected,s);n(s)},error:function(e,t,r){i(r.errorThrown?r.errorThrown[0]||{error:0}:{error:0})}})})};t.prototype.passwordRecovery=function(e){return new i(function(t,r){var n=new o.default;n.parse=function(e){return e instanceof Array?e[0]:e};n.save({email:e},{url:a.default.api.getUrl(a.default.api.methods.userPassword),success:function(){var e=n.get("status");if(0!==e)return r({error:e});t(n)},error:function(){r({error:0})}})})};t.prototype.logout=function(e){var r=this;return new i(function(n,i){var s=new o.default({id:"delete"},{url:a.default.api.getUrl(a.default.api.methods.oauthGrant),closeModelOnDestroy:!1});s.destroy({url:a.default.api.getUrl(a.default.api.methods.oauthGrant),success:function(o,a,l){var u=s.get("error");if(void 0!==u)return i({error:u});e.delete("me");r.trigger(t.Event.UserDisconnected,s);n()},error:function(e,t,r){i({error:r.textStatus})}})})};t.prototype.delete=function(e,r){var n=this;return new i(function(i,o){var a=e.clone(),l=e.get("id");e.destroy({success:function(e,o,s){n.fetcher.fetchedAll({modelsAlreadyFetched:[a],options:{userData:r},dataOfModelsNotFetched:[]}).then(function(){a.close()});n.trigger(t.Event.UserDeleted,l);i(o)},error:function(e,t,n){var i=new s.default(u.default.UNKNOWN_SERVER_ERROR.message,{userData:r});o(i)},userData:r,wait:!0})})};t.prototype.update=function(t,r,n){var i=this,a=n.success;r.newsletterPreferences||(r.newsletterPreferences=[]);n.success=function(e,r,s){i.fetcher.fetchedAll({modelsAlreadyFetched:[e],options:n,dataOfModelsNotFetched:[]}).then(function(){t instanceof o.default&&t.cleanupNewsletterPreferencesArray();a(e,r,s)}).catch(function(){a(e,r.savedOptions)})};e.prototype.update.call(this,t,r,n)};t.Event={UserConnected:"userconnected",UserDisconnected:"userdisconnected",UserUpdated:"userupdated",UserDeleted:"userdeleted",UserAvatar:"useravatar",UserDispname:"userdispname"};t.SignInErrorIdentifier={Unathorized:"unauthorized",InvalidUsername:"invalid_username",InvalidPassword:"invalid_password"};return t}(r.ADataManager);t.UserManager=c});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/image",["require","exports","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("FSPromise"),i=n.FSPromise;!function(e){!function(e){!function(e){function t(e,t){void 0===t&&(t="images.jamendo.com");switch(t){case"images.jamendo.com":return"https://"+t+"/"+e.trim();case"imgjam":return"https://images.jamendo.com/"+e.trim();default:return e}}
19function r(e){var t=e.split("?du=");return t[0].replace(/&amp;/g,"&")+(t.length>1?"?du="+Date.now():"")}function n(e){return new i(function(t,r){var n=document.createElement("img");n.onload=function(){t(o(n))};n.onerror=r;n.src=e})}function o(e,t,r){void 0===t&&(t="image/jpeg");void 0===r&&(r=!0);var n=document.createElement("canvas");if(!0===r){n.width=e.naturalWidth;n.height=e.naturalHeight}else{n.width=e.width;n.height=e.height}n.getContext("2d").drawImage(e,0,0);return n.toDataURL(t).replace(/^data:image\/(png|jpg|jpeg);base64,/,"")}function a(e,t){for(var r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new Blob([a],{type:n})}e.getImageUrl=t;e.getUpdatedImage=r;e.getImageDataFromUrl=n;e.getImageData=o;e.dataURLtoFile=a}(e.Image||(e.Image={}))}(e.Utilities||(e.Utilities={}))}(r||(r={}));t.default=r.Utilities.Image});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/tags",["require","exports","underscore","./abstractManager","../configuration/configuration","../library/model/model","FSPromise","speakingurl","../library/utilities/image"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./abstractManager"),i=e("../configuration/configuration"),o=e("../library/model/model"),a=e("FSPromise"),s=a.FSPromise,l=e("speakingurl"),u=e("../library/utilities/image"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"tags"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new n.ADataFetcherQueryBundler(this.NAME)};t.prototype.getUrlApi=function(){return i.default.api.getUrl(i.default.api.methods.tags)};t.prototype.getByAttribute=function(n,i){return"name"in n&&r.values(t.allGenreName).map(function(e){return l(e)}).indexOf(l(n.name))>-1?s.resolve([this.getAllGenreTagModel(i.dataParameters.lang)]):e.prototype.getByAttribute.call(this,n,i)};t.prototype.getAllGenreTagModel=function(e){var r=t.AllGenreTagModel.getModelProjection(this.options.projection,this.options.keepAlive,!1);r.set({lang:e,name:this.getAllGenreTagName(e)});return r};t.prototype.getAllGenreTagName=function(e){return t.allGenreName[e]||t.allGenreName.en};t.prototype.getAllCountriesName=function(e){return t.allCountriesName[e]||t.allCountriesName.en};t.AllGenreTagModel=new o.default({id:0,idstr:"all",category:"genre",featuredRank:102,cover:{"tile-xs":u.default.getImageUrl("jamendomusic/communities/community-allgenres-tile-xs.jpg"),"tile-sm":u.default.getImageUrl("jamendomusic/communities/community-allgenres-tile-sm.jpg"),
20"hero-xs":u.default.getImageUrl("jamendomusic/communities/community-allgenres-hero-xs.jpg"),"hero-s":u.default.getImageUrl("jamendomusic/communities/community-allgenres-hero-s.jpg"),"hero-m":u.default.getImageUrl("jamendomusic/communities/community-allgenres-hero-m.jpg"),"hero-l":u.default.getImageUrl("jamendomusic/communities/community-allgenres-hero-l.jpg"),"hero-xl":u.default.getImageUrl("jamendomusic/communities/community-allgenres-hero-xl.jpg")}});t.allGenreName={en:"All genres",fr:"Tous les genres",de:"Alle Musikrichtungen",es:"Todos los géneros",it:"Tutti i generi",pl:"Wszystkie gatunki",ru:"Все жанры",pt:"Todos os gêneros"};t.allCountriesName={en:"All countries",fr:"Tous les pays",de:"Alle Länder",es:"Todos los países",it:"Tutti i paesi",pl:"Wszystkie kraje",ru:"Все страны",pt:"Todos os países"};return t}(n.ADataManager);t.TagsManager=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/update",["require","exports","./abstractManager"],e)}(function(e,t){"use strict";
20Object.defineProperty(t,"__esModule",{value:!0});var r=e("./abstractManager"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);Object.defineProperty(t.prototype,"NAME",{get:function(){return"update"},enumerable:!0,configurable:!0});t.prototype.attachFetcher=function(){this.fetcher=new r.ADataFetcherQueryBundler(this.NAME)};return t}(r.ADataManager);t.UpdateManager=n});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/manager",["require","exports","./abstractManager","./albums","./artists","./charts","./favorites","./history","./legals","./localization","./notifications","./posts","./playlists","./radios","./reviews","./search","./sentiment","./similars","./static","./stats","./template","./tracks","./user","./tags","./update"],e)}(function(e,t){"use strict";function r(e,t,r){return n.referencesManager[e].get(t,r)}Object.defineProperty(t,"__esModule",{value:!0});var n=e("./abstractManager"),i=e("./albums"),o=e("./artists"),a=e("./charts"),s=e("./favorites"),l=e("./history"),u=e("./legals"),c=e("./localization"),d=e("./notifications"),p=e("./posts"),f=e("./playlists"),h=e("./radios"),m=e("./reviews"),y=e("./search"),g=e("./sentiment"),v=e("./similars"),_=e("./static"),b=e("./stats"),w=e("./template"),x=e("./tracks"),M=e("./user"),S=e("./tags"),k=e("./update");t.AlbumsManager=new i.AlbumsManager;t.ArtistsManager=new o.ArtistsManager;t.ChartsManager=new a.ChartsManager;t.FavoritesManager=new s.FavoritesManager;t.HistoryManager=new l.HistoryManager;t.LegalsManager=new u.LegalsManager;t.LocalizationManager=new c.LocalizationManager;t.NotificationsManager=new d.NotificationManager;t.PostsManager=new p.PostsManager;t.PlaylistsManager=new f.PlaylistsManager;t.RadiosManager=new h.RadiosManager;t.ReviewsManager=new m.ReviewsManager;t.SearchManager=new y.SearchManager;t.SentimentManager=new g.SentimentManager;t.SimilarsManager=new v.SimilarsManager;t.StaticManager=new _.StaticManager;t.StatsManager=new b.StatsManager;t.TemplateManager=new w.TemplateManager;t.TracksManager=new x.TracksManager;t.UserManager=new M.UserManager;t.TagsManager=new S.TagsManager;t.UpdateManager=new k.UpdateManager;t.getInclude=r});!function(e,t){"function"==typeof define&&define.amd?define("jamtracker/dist/jamstats",[],t):"object"==typeof exports&&exports&&!exports.nodeType?"object"==typeof module&&module&&module.exports?module.exports=t():exports.default=t():"function"==typeof YUI&&YUI.add?YUI.add("JamStats",function(e){e.default=t()}):e.JamStats=t()}(function(){try{return Function("return this")()||(0,eval)("this")}catch(e){return self}}(),function(){var e,t,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};!function(e){var t;!function(e){var t;!function(e){"function"!=typeof Object.keys&&(Object.keys=function(e){var t=[];for(var r in e)t.push(r);return t});"function"!=typeof Object.assign&&(Object.assign=function(e,t){Object.keys(t).forEach(function(r){e[r]=t[r]});return e});"function"!=typeof Array.prototype.map&&(Array.prototype.map=function(e){for(var t=[],r=0;r<this.length;++r)t.push(e(this[r],r,this));return t});"function"!=typeof Array.prototype.forEach&&(Array.prototype.forEach=function(e){this.map(e)});"function"!=typeof Array.prototype.filter&&(Array.prototype.filter=function(e){for(var t=[],r=0;r<this.length;++r){e(this[r],r,this)&&t.push(this[r])}return t});"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){for(var r=0;r<this.length;++r)t=e(t,this[r],r,this);return t});"function"!=typeof Array.prototype.find&&(Array.prototype.find=function(e){for(var t=0;t<this.length;++t){var r=e(this[t],t,this);if(r)return r}});"function"!=typeof Array.isArray&&(Array.isArray=function(e){return e instanceof Array});"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\W*(.*?)\W*$/g,"$1")})}(t||(t={}))}(t||(t={}))}(t||(t={}));var t;!function(e){var t;!function(e){var t;!function(e){var t;!function(e){e.Pending="pending";e.Resolved="resolved";e.Rejected="rejected"}(t||(t={}));var n=function(){function e(e){this.executor=e;this.state=t.Pending;this.subPromiseStack=[];this.execute()}e.prototype.triggerResult=function(){for(;this.subPromiseStack.length;){this.subPromiseStack.shift()._execute()}};e.prototype.execute=function(){this._execute()};e.prototype._execute=function(){var e=this;try{this.executor(function(r){e.state=t.Resolved;e.value=r;e.triggerResult()},function(r){e.state=t.Rejected;e.value=r;e.triggerResult()})}catch(e){this.state=t.Rejected;this.value=e;this.triggerResult()}};e.prototype._createSubPromise=function(r,n){var o=this,a=new i(function(i,a){var s,l;if(o.state===t.Resolved){s=r;l=i}else{s=n;l=a}try{if(s){var u=s(o.value);if(u instanceof e)return u.then(i,a);i(u)}else l(o.value)}catch(e){a(e)}});this.state!==t.Pending?a._execute():this.subPromiseStack.push(a);return a};e.prototype.then=function(e,t){return this._createSubPromise(e,t)};e.prototype.catch=function(e){return this._createSubPromise(null,e)};e.prototype.toString=function(){return"[object Promise]"};e.all=function(t){return new e(function(r,n){var i=[],o=0,a=0;t.forEach(function(t,s){if(t instanceof e){++o;t.then(function(e){i[s]=e;++a>=o&&r(i)},n)}else i[s]=t});o||r(i)})};e.resolve=function(t){return new e(function(e){e(t)})};return e}(),i=function(e){return function(e){function t(t){return e.call(this,t)||this}r(t,e);t.prototype.execute=function(){};return t}(e)}(n);void 0===window.Promise&&(window.Promise=n)}(t||(t={}))}(t||(t={}))}(t||(t={}));var t;!function(e){!function(t){var r;!function(e){e.Delete="delete";e.Head="head";e.Get="get";e.Options="options";e.Patch="patch";e.Post="post";e.Put="put"}(r=t.Method||(t.Method={}));var n=function(){function t(){this.host={protocol:"",hostname:"localhost",port:"",pathname:"/"};this.data={};this.header={};this.method=r.Get;this.buildUrl()}t.prototype.buildUrl=function(){this.host.url=this.host.protocol+"//"+this.host.hostname+(this.host.port?":"+this.host.port:"")+this.host.pathname};t.prototype.url=function(t){this.host.url=t;var r=e.Utils.Url.parse_url(t);this.host.hostname=r.host;this.host.pathname=r.path;this.host.port=r.port;this.host.protocol=r.scheme;return this};t.prototype.protocol=function(e){e&&(e+="file"===e?":/":":");this.host.protocol=e;this.buildUrl();return this};t.prototype.hostname=function(e){this.host.hostname=e;this.buildUrl();return this};t.prototype.port=function(e){this.host.port=e.toString();this.buildUrl();return this};t.prototype.pathname=function(e){this.host.pathname=e;this.buildUrl();return this};t.prototype.setData=function(e,t){"string"!=typeof e&&void 0===t?this.data=e:this.data[e]=t;return this};t.prototype.replaceData=function(e){this.data=Object.assign({},e);return this};t.prototype.setHeader=function(e,t){this.header[e]=t;return this};t.prototype.setMethod=function(e){this.method=e;return this};return t}();t.ATransport=n}(e.Transport||(e.Transport={}))}(t||(t={}));var t;!function(e){var t=Array;!function(e){!function(e){function r(e){return t.isArray(e)}function n(e){return null===e}function i(e){return typeof e==d}function o(e){return n(e)||i(e)}function a(e){return!r(e)&&!o(e)&&typeof e===p}function s(e,t){return typeof e==typeof t}function l(e,t,n){var i;void 0===n&&(n=!0);if(!e||!s(e,t)){if(n){if(r(t))return t.slice();if(a(t))return u({},t)}return t}if(!r(e)&&!a(e))return t;if(r(e)){if(!r(t))return t;n&&(e=e.slice());(i=e).push.apply(i,t);return e}n&&(e=u({},e));for(var o in t)e[o]=l(e[o],t[o],n);return e}function u(e,t,r){void 0===r&&(r=!0);for(var n in t)r&&void 0===t[n]||(e[n]=t[n]);return e}function c(e){var t={};for(var n in e){var i=e[n];r(i)?t[n]=i.slice():a(i)?t[n]=u({},i,!1):t[n]=i}return t}var d="undefined",p=typeof{};e.mergeObjectRecursiverly=l;e.mergeObject=u;e.cloneObject=c}(e.Object||(e.Object={}))}(e.Utils||(e.Utils={}))}(t||(t={}));var t;!function(e){function n(t){Object.assign(i,t);e.Storage.initialize(i);return i}var i={domain:"",secure:!1,host:" "};e.initialize=n;var o=function(){function e(e,t){void 0===t&&(t=[]);this.data=e;this.transports=t}e.prototype.createTracker=function(t){void 0===t&&(t={});var r=e._createTracker(Object.assign(Object.create(this.data),t),this.transports);r.prototype=this.__proto__||Object.getPrototypeOf(this);return r};e.prototype.setAttribute=function(e,r,n){void 0===n&&(n=!0);
20this.data[e]=n?t.Utils.Object.mergeObjectRecursiverly(this.data[e],r):r;return this};e.prototype.setAttributes=function(e,r){void 0===r&&(r=!0);if(r)this.data=t.Utils.Object.mergeObjectRecursiverly(this.data,e);else for(var n in e)this.data[n]=e[n];return this};e.prototype.getAttribute=function(e){return this.data[e]};e.prototype.send=function(e,t){void 0===e&&(e={});void 0===t&&(t=!0);var r=(this.generateData(e,t),[]);return r.length?Promise.all(r):new Promise(function(){})};e.prototype.prepare=function(e){var t=this;return function(r){void 0===r&&(r={});var n=t.createTracker(),i=new n;i.setAttributes(e);return i.send(r)}};e.prototype.generateData=function(e,r){void 0===e&&(e={});void 0===r&&(r=!0);var n={};t.Utils.Object.mergeObject(n,t.Utils.Object.cloneObject(this.data));n=r?t.Utils.Object.mergeObjectRecursiverly(n,e):t.Utils.Object.mergeObject(n,e);return n};e.prototype.addTransport=function(e){var t;e instanceof Array?(t=this.transports).push.apply(t,e):this.transports.push(e);return this};e.prototype.setTransport=function(e){this.transports.splice(0,this.transports.length);this.addTransport(e);return this};e._createTracker=function(t,n){return function(e){function i(){return e.call(this,Object.create(t),Object.create(n))||this}r(i,e);return i}(e)};e.createTracker=function(){return this._createTracker({},[])};return e}();e.ATracker=o}(t||(t={}));var e;!function(e){!function(e){function t(e){e.prototype.setEntity=function(e){return this.setAttribute("entity",e)};e.prototype.setEntityId=function(e){return this.setAttribute("entityId",e)};return e}function r(e){e.prototype.setFrom=function(e){return this.setAttribute("from",e)};e.prototype.setFromId=function(e){return this.setAttribute("fromId",e)};return e}function n(e){e.prototype.setUserId=function(e){return this.setAttribute("userId",e)};return e}function i(e){e.prototype.setSelector=function(e){return this.setAttribute("custom",{selector:e})};e.prototype.setScrollY=function(e){return this.setAttribute("custom",{scrollY:e})};return e}e.SchemaEntity=t;e.SchemaComponent=r;e.SchemaUser=n;e.SchemaDOMInfo=i}(e.Decorator||(e.Decorator={}))}(e||(e={}));var t;!function(e){!function(e){function t(e){o=e}function r(e,t){return e+"-"+t}function n(e){var t=document.cookie.split(";"),r=e.length,n=t.find(function(t){return t.trim().substr(0,r)===e});return n?n.trim().split("=")[1]:null}function i(e,t){document.cookie=e+"="+t+";domain="+o.domain+(o.secure?";secure="+o.secure.toString():"");return n(e)===t}var o;e.initialize=t;e.Session={getItem:function(e){var t=r("session",e);return sessionStorage.getItem(t)||localStorage.getItem(t)||n(t)},setItem:function(e,t){var n=r("session",e);"undefined"!=typeof sessionStorage?sessionStorage.setItem(n,t):"undefined"!=typeof localStorage?localStorage.setItem(n,t):i(n,t)}};e.Local={getItem:function(e){var t=r("local",e);return localStorage.getItem(t)||sessionStorage.getItem(t)||n(t)},setItem:function(e,t){var n=r("local",e);"undefined"!=typeof localStorage?localStorage.setItem(n,t):"undefined"!=typeof sessionStorage?sessionStorage.setItem(n,t):i(n,t)}};e.Global={getItem:function(e){var t=r("global",e);return n(t)||localStorage.getItem(t)||sessionStorage.getItem(t)},setItem:function(e,t){var n=r("global",e);i(n,t)||("undefined"!=typeof localStorage?localStorage.setItem(n,t):"undefined"!=typeof sessionStorage&&sessionStorage.setItem(n,t))}}}(e.Storage||(e.Storage={}))}(t||(t={}));var e,i=t;!function(e){function t(t,r,n){var i=e.Tracker.initialize({domain:n.domain,secure:n.secure,host:n.host,monitoring:n.monitoring||{rules:[]}});e.Performance.initialize(i);e.baseTracker.setAttribute("source",t);e.baseTracker.setAttribute("application",r);e.baseTracker.setTransport(n.transports);var a={status:e.Tracker.Navigation.getNavigationStatus(),timing:e.Tracker.Navigation.getNavigationTime(),origin:e.Tracker.Navigation.getOrigin()},s={navigationStatus:a,hash:e.Tracker.User.Fingerprint.getFingerprint()},l=e.Tracker.Storage.Global.getItem("app_hash");l&&(s.sessionId=l);e.baseTracker.send({action:o.Connect,uri:location.pathname,custom:s}).then(function(t){var r=JSON.parse(t[0]);e.Tracker.Storage.Global.setItem("app_hash",r.sessionId);e.baseTracker.setAttribute("custom",{navigationId:r.navigationId});e.Performance.start()})}e.Tracker=i;var o;!function(e){e.Connect="connect"}(o=e.EBaseAction||(e.EBaseAction={}));var a=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setUri=function(e){return this.setAttribute("uri",e)};i=n([e.Decorator.SchemaUser],i);return i}(e.Tracker.ATracker.createTracker());e.BaseTracker=a;e.baseTracker=new a;e.Initialize=t}(e||(e={}));var e;!function(e){!function(t){!function(e){e.Issue="monitoringissue";e.Resolve="monitoringresolve"}(t.EMonitoringAction||(t.EMonitoringAction={}));!function(e){e.Critical="critical";e.Warning="warning";e.Notice="notice"}(t.EMonitoringOrigin||(t.EMonitoringOrigin={}));var i=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setMonitoringDetails=function(e){return this.setAttribute("custom",{monitoring:e})};i.prototype.setOrigin=function(e){return this.setAttribute("origin",e)};i.prototype.setAction=function(e){return this.setAttribute("action",e)};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaComponent],i);return i}(e.baseTracker.createTracker({}));t.MonitoringTracker=i}(e.Monitoring||(e.Monitoring={}))}(e||(e={}));var e;!function(e){!function(t){var i;!function(e){e.Navigate="navigate"}(i=t.ENavigationAction||(t.ENavigationAction={}));!function(e){e.Manual="manual";e.Redirection="redirection";e.History="history"}(t.ENavigationOrigin||(t.ENavigationOrigin={}));var o=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setNavigationId=function(e){return this.setAttribute("custom",{navigationId:e})};i.prototype.setOrigin=function(e){return this.setAttribute("origin",e)};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaUser,e.Decorator.SchemaComponent,e.Decorator.SchemaDOMInfo],i);return i}(e.baseTracker.createTracker({action:i.Navigate}));t.NavigationTracker=o}(e.Navigation||(e.Navigation={}))}(e||(e={}));var e;!function(e){!function(t){var i;!function(e){e.Play="play"}(i=t.EPlayAction||(t.EPlayAction={}));!function(e){e.First="first";e.Autonext="autonext";
20e.Skip="skip";e.Prev="prev";e.Select="select";e.Resume="resume"}(t.EPlayOrigin||(t.EPlayOrigin={}));var o=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setAction=function(e){return this.setAttribute("action",e)};i.prototype.setOrigin=function(e){return this.setAttribute("origin",e)};i.prototype.setTracklistId=function(e){return this.setAttribute("custom",{tracklistId:e})};i.prototype.setFormat=function(e){return this.setAttribute("custom",{format:e})};i.prototype.setTrackNo=function(e){return this.setAttribute("custom",{trackNo:e})};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaUser,e.Decorator.SchemaComponent],i);return i}(e.baseTracker.createTracker({action:i.Play}));t.PlayTracker=o;var a;!function(e){e.Listen="listen"}(a=t.EListenAction||(t.EListenAction={}));var s=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setAction=function(e){return this.setAttribute("action",e)};i.prototype.setPlayId=function(e){return this.setAttribute("custom",{playId:e})};i.prototype.setSample=function(e,t){return this.setAttribute("custom",{sample:void 0}).setAttribute("custom",{sample:[{start:e,end:t}]},!0)};i=n([e.Decorator.SchemaEntity],i);return i}(e.baseTracker.createTracker({action:a.Listen}));t.ListenTracker=s}(e.Player||(e.Player={}))}(e||(e={}));var e;!function(e){!function(t){var i;!function(e){e.Search="search";e.Result="search_result"}(i=t.ESearchAction||(t.ESearchAction={}));var o=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setSearchId=function(e){return this.setAttribute("custom",{searchId:e})};i.prototype.setSearchResultId=function(e){return this.setAttribute("custom",{searchResultId:e})};i=n([e.Decorator.SchemaEntity],i);return i}(e.baseTracker.createTracker({action:i.Search}));t.SearchTracker=o}(e.Search||(e.Search={}))}(e||(e={}));var e;!function(e){!function(t){var i;!function(e){e.Download="download";e.Like="like";e.AddToPlaylist="addtoplaylist";e.Share="share"}(i=t.ESocialAction||(t.ESocialAction={}));!function(e){e.Facebook="facebook";e.Google="google";e.Twitter="twitter";e.LinkedIn="linkedin";e.Reddit="reddit"}(t.ESocialNetwork||(t.ESocialNetwork={}));!function(e){e.CurrentlyPlayed="currently_played";e.CurrentTracklist="current_tracklist";e.NextTracklist="next_tracklist";e.DailyHistory="daily_history";e.WeeklyHistory="weekly_history"}(t.EPlayerState||(t.EPlayerState={}));var o=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setPlayerState=function(e){this.setAttribute("custom",{playerState:e})};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaUser,e.Decorator.SchemaComponent],i);return i}(e.baseTracker.createTracker());t.SocialTracker=o;var a=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setPlayerState=function(e){this.setAttribute("custom",{playerState:e})};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaUser,e.Decorator.SchemaComponent],i);return i}(e.baseTracker.createTracker({action:i.Like}));t.LikeTracker=a;var s=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setPlayerState=function(e){this.setAttribute("custom",{playerState:e})};i.prototype.setProvider=function(e){this.setAttribute("custom",{to:e})};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaUser,e.Decorator.SchemaComponent],i);return i}(e.baseTracker.createTracker({action:i.Share}));t.ShareTracker=s;var l=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setPlayerState=function(e){this.setAttribute("custom",{playerState:e})};i.prototype.setPlaylist=function(e){this.setAttribute("custom",{playlistId:e})};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaUser,e.Decorator.SchemaComponent],i);return i}(e.baseTracker.createTracker({action:i.AddToPlaylist}));t.AddtoplaylistTracker=l;var u=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}r(i,t);i.prototype.setPlayerState=function(e){return this.setAttribute("custom",{playerState:e})};i.prototype.setFormat=function(e){return this.setAttribute("custom",{format:e})};i=n([e.Decorator.SchemaEntity,e.Decorator.SchemaUser,e.Decorator.SchemaComponent],i);return i}(e.baseTracker.createTracker({action:i.Download}));t.DownloadTracker=u}(e.Social||(e.Social={}))}(e||(e={}));var t;!function(e){!function(e){void 0===window.performance&&(window.performance={})}(e.Polyfill||(e.Polyfill={}))}(t||(t={}));var t;!function(e){!function(e){var t;!function(e){void 0===window.performance.getEntries&&(window.performance.getEntries=function(){return[]});void 0===window.performance.clearResourceTimings&&(window.performance.clearResourceTimings=function(){})}(t||(t={}))}(e.Polyfill||(e.Polyfill={}))}(t||(t={}));var e;!function(e){!function(t){function r(e){d=Object.assign({monitoring:{rules:[]}},e)}function n(){performance.onresourcetimingbufferfull=o;c()}function i(e){for(var t=0,r=d.monitoring.rules.length;t<r;++t){var n=d.monitoring.rules[t],i=n(e);if(!1!==i)return i}return!1}function o(){var t=performance.getEntries().filter(function(e){a(e);var t=e.name+"-"+e.initiatorType+"-"+e.entryType+"-"+e.duration+"-"+e.startTime;return!f[t]&&e.name.includes(d.domain)&&!e.name.includes(d.host)});performance.clearResourceTimings();t.filter(function(t){if(t.duration>(i(t)||p[t.initiatorType]||p.default)){var r=u(t);f[r]=!0;m.send({origin:e.Monitoring.EMonitoringOrigin.Warning,custom:{monitoring:{type:"RequestTooLong",value:t.duration,details:JSON.stringify(t)}}})}});s()}function a(e){if(e.transferSize&&("navigation"!==e.initiatorType||!h[u(e)])){var t=e.transferSize/(e.responseEnd-e.responseStart)*1e3/1024;y.push({kbps:t,date:Date.now()});"navigation"===e.initiatorType&&(h[u(e)]=!0)}}function s(){var e=Date.now();y=y.filter(function(t){return e-t.date<1e4});g=y.length>10?y.reduce(function(e,t){return e+t.kbps},0)/y.length:g}function l(){return g}function u(e){return e.name+"-"+e.initiatorType+"-"+e.entryType+"-"+e.duration+"-"+e.startTime}function c(){o();setTimeout(function(){c()},3e3)}var d,p={navigation:3e3,script:600,default:300},f={},h={};t.initialize=r;var m=new e.Monitoring.MonitoringTracker;m.setAction(e.Monitoring.EMonitoringAction.Issue);t.start=n;var y=[],g=0;t.getLatestEstimateBandwidth=l}(e.Performance||(e.Performance={}))}(e||(e={}));var t;!function(e){var t=setTimeout,r=setInterval;!function(e){function n(e){e instanceof Function?e():e&&e.send()}function i(e,r){var i=t(function(){n(e)},r);return function(){clearTimeout(i)}}function o(e,t){var i=r(function(){n(e)},t);return function(){clearInterval(i)}}function a(e,t){l(e,null,t)}function s(e,t,n){var i=r(function(){a(e(),t)},n);return function(){clearInterval(i)}}function l(e,t,r){var i=function(e){n(e?t:r)};e instanceof Promise?e.then(i):i(e)}e.setTimeout=i;e.setInterval=o;e.assert=a;e.periodicAssert=s;e.ifElse=l}(e.Monitoring||(e.Monitoring={}))}(t||(t={}));var t;!function(e){!function(e){var t;!function(e){void 0===window.performance.navigation&&(window.performance.navigation={navigation:{redirectCount:0,type:-1}})}(t||(t={}))}(e.Polyfill||(e.Polyfill={}))}(t||(t={}));var t;!function(e){!function(e){var t;!function(e){var t=window.performance;void 0===t.timing&&(t.timing={connectEnd:0,connectStart:0,domComplete:0,domContentLoadedEventEnd:0,domContentLoadedEventStart:0,domInteractive:0,domLoading:0,domainLookupEnd:0,domainLookupStart:0,fetchStart:0,loadEventEnd:0,loadEventStart:0,navigationStart:0,redirectEnd:0,redirectStart:0,requestStart:0,responseEnd:0,responseStart:0,secureConnectionStart:0,unloadEventEnd:0,unloadEventStart:0});t.timeOrigin||(t.timeOrigin=t.timing.navigationStart)}(t||(t={}))}(e.Polyfill||(e.Polyfill={}))}(t||(t={}));var t;!function(e){!function(e){function t(){return{redirectCount:performance.navigation.redirectCount,type:o[performance.navigation.type]}}function r(e){var t=performance.timeOrigin;return Math.max((performance.timing[e]||0)-t,0)}function n(){return{redirectStart:r("redirectStart"),redirectEnd:r("redirectEnd"),navigationStart:r("navigationStart"),unloadEventStart:r("unloadEventStart"),unloadEventEnd:r("unloadEventEnd"),domainLookupStart:r("domainLookupStart"),connectStart:r("connectStart"),domainLookupEnd:r("domainLookupEnd"),secureConnectionStart:r("secureConnectionStart"),connectEnd:r("connectEnd"),requestStart:r("requestStart"),responseStart:r("responseStart"),responseEnd:r("responseEnd"),fetchStart:r("fetchStart"),domLoading:r("domLoading"),domInteractive:r("domInteractive"),domContentLoadedEventStart:r("domContentLoadedEventStart"),domContentLoadedEventEnd:r("domContentLoadedEventEnd"),domComplete:r("domComplete"),loadEventStart:r("loadEventStart"),loadEventEnd:r("loadEventEnd")}}function i(){return document.referrer}var o;!function(e){e[e.Unknown=-1]="Unknown";e[e.Navigate=0]="Navigate";e[e.Reload=1]="Reload";e[e.BackForward=2]="BackForward";e[e.Reserved=255]="Reserved"}(o=e.NavigationType||(e.NavigationType={}));e.getNavigationStatus=t;e.getNavigationTime=n;e.getOrigin=i}(e.Navigation||(e.Navigation={}))}(t||(t={}));var t;!function(e){!function(e){!function(e){function t(e){return r(e).replace(/%20/g,"+")}function r(e){e+="";return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function n(e,n,i,o){function a(e,t){!0===t?t="1":!1===t&&(t="0");if(null!==t){if("object"==typeof t){var r=[];for(var n in t)null!==t[n]&&r.push(a(e+"["+n+"]",t[n]));return r.join(i)}if("function"!=typeof t)return s(e)+"="+s(t);throw new Error("There was an error processing for http_build_query().")}return""}void 0===n&&(n="");void 0===i&&(i="&");void 0===o&&(o="PHP_QUERY_RFC1738");var s="PHP_QUERY_RFC3986"===o?r:t;i||(i="&");var l=[];for(var u in e){var c=e[u];n&&!isNaN(u)&&(u=String(n)+u);var d=a(u,c);""!==d&&l.push(d)}return l.join(i)}function i(e,t){void 0===t&&(t=null);var r=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],n={php:new RegExp(["(?:([^:\\/?#]+):)?","(?:\\/\\/()(?:(?:()(?:([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?","()","(?:(()(?:(?:[^?#\\/]*\\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)"].join("")),strict:new RegExp(["(?:([^:\\/?#]+):)?","(?:\\/\\/((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?","((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)"].join("")),loose:new RegExp(["(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?","(?:\\/\\/\\/?)?","((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?)","(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))","(?:\\?([^#]*))?(?:#(.*))?)"].join(""))},i=n.php.exec(e),o={},a=r.length;if(!i)return o;for(;a--;)i[a]&&(o[r[a]]=i[a]);delete o.source;return o}e.urlencode=t;e.rawurlencode=r;e.http_build_query=n;e.parse_url=i}(e.Url||(e.Url={}))}(e.Utils||(e.Utils={}))}(t||(t={}));var t;!function(e){!function(t){var n;!function(e){e[e.Default=0]="Default";e[e.Json=1]="Json"}(n||(n={}));var i=function(t){function i(){var e=t.call(this)||this;e.contentType=n.Default;return e}r(i,t);i.prototype.send=function(e){var t=this;void 0===e&&(e={});return new Promise(function(r,n){var i=Object.assign({},t.data,e),o=new XMLHttpRequest;o.open(t.method.toUpperCase(),t.host.url,!0);Object.keys(t.header).forEach(function(e){o.setRequestHeader(e,t.header[e])});o.send(t.formatData(i));o.addEventListener("readystatechange",function(){if(o.readyState===XMLHttpRequest.DONE){if(!(o.status>=200&&o.status<=299))return n({type:"httpcode_"+o.status,message:o.statusText});r(o.responseText)}});o.addEventListener("error",function(e){n({status:e.type,message:e.message})})})};i.prototype.sendJson=function(e){void 0===e&&(e={});this.contentType=n.Json;return this.setHeader("Content-Type","application/json").send(e)};i.prototype.formatData=function(t){switch(this.contentType){case n.Json:return JSON.stringify(t);case n.Default:default:return e.Utils.Url.http_build_query(t)}};return i}(e.Transport.ATransport);t.TransportXMLHttpRequest=i}(e.Transport||(e.Transport={}))}(t||(t={}));var t;!function(e){var t=Array;!function(e){!function(e){function r(e){return t.isArray(e)||!!e&&typeof e.length===n}var n="number";e.isArrayLike=r}(e.Array||(e.Array={}))}(e.Utils||(e.Utils={}))}(t||(t={}));var t;!function(t){!function(t){!function(t){function r(t,i,o){return t.map(function(t){var a,s=t,l=null,u=o;Array.isArray(t)&&(a=t,s=a[0],l=a[1],u=a[2]);var c=n(s,i);return e.Tracker.Utils.Array.isArrayLike(c)&&l?Array.prototype.map.call(c,function(e){return r(l,e,u)}):btoa((null===c||void 0===c?"":c).toString())}).join(o)}function n(e,t){for(var r=e.split("."),n=0;n<r.length;++n){var i=r[n];if(null===t[i]||void 0===t[i])return null;t=t[i]}return t}function i(){return r(a,navigator,"%FA%")}var o=["description","enabledPlugin.filename","enabledPlugin.length","enabledPlugin.name","suffixes","type"],a=["language","languages",["mimeTypes",o,"%AC%"],"platform","vendor","vendorSub"];t.getFingerprint=i}(t.Fingerprint||(t.Fingerprint={}))}(t.User||(t.User={}))}(t||(t={}));return e});define("jamtracker",["jamtracker/dist/jamstats"],function(e){return e});!function(e){"function"==typeof define&&define.amd?define("jquery.cookie/jquery.cookie",["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){function t(e){return s.raw?e:encodeURIComponent(e)}function r(e){return s.raw?e:decodeURIComponent(e)}function n(e){return t(s.json?JSON.stringify(e):String(e))}function i(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{e=decodeURIComponent(e.replace(a," "));return s.json?JSON.parse(e):e}catch(e){}}function o(t,r){var n=s.raw?t:i(t);return e.isFunction(r)?r(n):n}var a=/\+/g,s=e.cookie=function(i,a,l){if(void 0!==a&&!e.isFunction(a)){l=e.extend({},s.defaults,l);if("number"==typeof l.expires){var u=l.expires,c=l.expires=new Date;c.setTime(+c+864e5*u)}return document.cookie=[t(i),"=",n(a),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var d=i?void 0:{},p=document.cookie?document.cookie.split("; "):[],f=0,h=p.length;f<h;f++){var m=p[f].split("="),y=r(m.shift()),g=m.join("=");if(i&&i===y){d=o(g,a);break}i||void 0===(g=o(g))||(d[y]=g)}return d};s.defaults={};e.removeCookie=function(t,r){if(void 0===e.cookie(t))return!1;e.cookie(t,"",e.extend({},r,{expires:-1}));return!e.cookie(t)}});define("jquery.cookie",["jquery.cookie/jquery.cookie"],function(e){return e});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/controller/controllerLoa
20der",["require","exports","chrisweb-utilities","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("chrisweb-utilities"),n=e("FSPromise"),i=n.FSPromise,o=function(){function t(){}Object.defineProperty(t.prototype,"router",{set:function(e){this._router=e},
21enumerable:!0,configurable:!0});t.prototype.load=function(t,n,o){var a=this;return new i(function(i,s){var l=o+"/controllers/"+t;if(r.default.isServer()){var u=e(l),c=u.default||u;a.currentController=new c(n,{},a._router);i(a.currentController)}else{if(a.currentController){a.currentController.off();a.currentController.promise=null;a.currentController.clear()}requirejs([l],function(e){var t=e.default||e;a.currentController=new t(n,{},a._router);i(a.currentController)},function(e){console.error({error:e,controllerPath:l});localStorage.setItem("firstLoad","no");localStorage.removeItem("bundlePath");location.reload()})}})};return t}();t.default=new o});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/deployment",["require","exports","../../configuration/configuration"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("../../configuration/configuration");!function(e){function t(e){return e===n.default.application.deploymentEnvironment}function r(){return n.default.application.deploymentEnvironment}e.isEnvironment=t;e.getEnvironment=r}(r=t.Deployment||(t.Deployment={}));t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/featuresCheck",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}e.prototype.featuresSupported=function(){return this.supportsAudioTag()&&this.supportsHistory()};e.prototype.supportsAudioTag=function(){var e=this.createElement("audio"),t=!1;try{if(t=!!e.canPlayType){t=new Boolean(t);t.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"");t.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,"");t.opus=e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"");t.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"");t.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,"")}}catch(e){return!1}return t};e.prototype.supportsHistory=function(){var e=navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)};e.prototype.createElement=function(e){return"function"!=typeof document.createElement?document.createElement(arguments[0]):document.createElement.apply(document,arguments)};return e}();t.default=r});var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)},__rest=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&(r[n[i]]=e[n[i]]);return r};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/structuredData/jsonld",["require","exports"],e)}(function(e,t){"use strict";function r(e){var t=e.identifier,n=e.type,i=e.context,o=__rest(e,["identifier","type","context"]);for(var a in o)o[a]instanceof Array?o[a]=o[a].map(function(e){return e&&e.type?r(e):e}):"object"==typeof o[a]&&null!==o[a]&&o[a].type&&(o[a]=r(o[a]));return __assign({"@id":t,"@type":n,"@context":i},o)}function n(e){return JSON.stringify(r(e))}
21Object.defineProperty(t,"__esModule",{value:!0});t.stringify=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/view",["require","exports","underscore","jquery","ribsjs","../../managers/manager","FSPromise","../../library/model/model","FSEventDispatcher","chrisweb-utilities","../utilities/object","../error/error","../structuredData/jsonld"],e)}(function(e,t){"use strict";function r(e){var t={};Object.keys(e).forEach(function(r){isNaN(e[r])?e[r]instanceof Function?t[r]="[Function "+e[r].name+"]":t[r]=e[r].toString():t[r]=e[r]});return t}Object.defineProperty(t,"__esModule",{value:!0});var n=e("underscore"),i=e("jquery"),o=e("ribsjs"),a=e("../../managers/manager"),s=e("FSPromise"),l=e("../../library/model/model"),u=s.FSPromise,c=e("FSEventDispatcher"),d=e("chrisweb-utilities"),p=e("../utilities/object"),f=e("../error/error"),h=e("../structuredData/jsonld"),m={},y=function(e){function t(s){var c=e.call(this,n.extend({userData:{}},s))||this;c.template=function(e){var t=c.getTemplateId(),s=function(t){c.templatePromises=[];c.domPromises=[];try{c.currentTemplateBuffer=t.function(e)}catch(n){throw new f.default(n.message,{templateId:c.getTemplateId(),tpl:t.tpl,dataKeys:r(e),userData:c.options.userData})}return c.templatePromises.length?u.all(c.templatePromises).then(function(){return i(c.currentTemplateBuffer)}):i(c.currentTemplateBuffer)};if(t in m){d.default.isServer()&&a.TemplateManager.fetcher.bundleModels({dataOfModelsNotFetched:[],modelsAlreadyFetched:[new l.default({id:t,template:m[t].tpl})],options:{userData:c.options.userData}});return u.resolve(1).then(function(){return s(m[t])})}return a.TemplateManager.get(t,{projection:o.Model,keepAlive:!1,twoWay:!1,userData:c.options.userData}).then(function(e){var r=e[0],i=r.get("template");m[t]={tpl:i,function:n.template(i)};r.close();return s(m[t])})};t.initialized||t.initialize();"context"in c.options&&n.extend(c.options.templateVariables,{context:c.options.context});c.debouncedReRenderModelView=n.debounce(e.prototype.reRenderModelView,200,!0).bind(c);return c}__extends(t,e);t.initialize=function(){t.initialized=!0;
21(c.default.Mediator.triggerResult(t.ViewEvents.PlatformEnvironment).join(" ")||"browser").split(" ").forEach(function(e){return i("body").attr("is-"+e,"true")})};t.prototype.getTemplateId=function(){return""};t.prototype.registerTemplatePromise=function(e){this.templatePromises.push(e)};t.prototype.registerDomPromise=function(e){this.domPromises.push(e)};t.prototype.create=function(){var t=e.prototype.create.call(this);return t instanceof u?t:u.resolve(t)};t.prototype.render=function(){var t,r=this;if("renderPromise"in this.options)t=this.options.renderPromise.then(function(){if(r.isClose)throw new s.FSPromiseCancelError;return e.prototype.render.call(r)});else{t=e.prototype.render.call(this);t instanceof u||(t=u.resolve(t))}return t.then(function(e){if(r.isClose)throw new s.FSPromiseCancelError;d.default.isClient()&&"picturefill"in window&&("HTMLPictureElement"in window&&"srcset"in document.createElement("img")||window.picturefill());return e}).catch(function(e){if(!(e instanceof s.FSPromiseCancelError)&&"FSPromiseCancelError"!==e.name){if(e instanceof f.default)e.options&&"userData"in e.options||(e.options=n.extend({userData:r.options.userData},e.options));else{var t=new f.default("View error",{originalErrorStack:e.stack,userData:r.options.userData});"options"in e&&(t.options.originalErrorOptions=e.options);"constructor"in e&&(t.options.originalErrorType=e.constructor.name);e instanceof SyntaxError&&(t.options.templateId=r.getTemplateId());e=t}console.error(e)}return r})};t.prototype.reRenderModelView=function(){return this.debouncedReRenderModelView()};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$el.data("viewInstance",this)};t.prototype.onRenderAll=function(){e.prototype.onRenderAll.call(this);this.initializeABTestingIfNecessary();this.renderStructuredDataIfNecessary()};t.prototype.htmlize=function(){var t=this,r=e.prototype.htmlize.call(this),n=function(e){if(t.domPromisesList){t.domPromisesList.forEach(function(e){e.abort()});t.domPromisesList=null}if(t.viewLoadedList)for(;t.viewLoadedList.length;)t.viewLoadedList.pop().close();if(t.domPromises&&t.domPromises.length){var r=[];t.domPromises.forEach(function(t){r.push(t(e))});t.domPromisesList=r;return u.all(r).then(function(r){t.domPromisesList=null;t.viewLoadedList=r;return e})}e.hammer&&t.options.useHammer&&e.hammer(t.options.hammerOptions);return e};return r instanceof u?r.then(n):n(r)};t.prototype.events=function(){return{}};t.prototype.setUserData=function(e){this.options.userData=e;return this};t.prototype.formatModelViewOptions=function(t){t=e.prototype.formatModelViewOptions.call(this,t);return n.extend(t,{userData:this.options.userData})};t.prototype.prepareAddedView=function(t){t=e.prototype.prepareAddedView.call(this,t);t.isClose||(t.options.userData=this.options.userData);return t};t.prototype.close=function(){if(this.isClose){console.warn(new f.default("view closed twice: "+this.constructor.name));console.warn(this.previousClose)}else{this.previousClose=new f.default("First close: "+this.constructor.name,{userData:this.options.userData});if(this.domPromisesList){for(;this.domPromisesList.length;)this.domPromisesList.pop().abort();this.domPromisesList=null}if(this.domPromises){for(;this.domPromises.length;)this.domPromises.splice(0,this.domPromises.length);this.domPromises=null}if(this.templatePromises)for(;this.templatePromises.length;)this.templatePromises.pop().abort();if(this.viewLoadedList){for(;this.viewLoadedList.length;)this.viewLoadedList.pop().close();this.viewLoadedList=null}this.observer&&this.observer.disconnect();e.prototype.close.call(this);var t=this.isClose,r=this.previousClose;p.cleanObject(this.options);p.cleanObject(this);this.isClose=t;this.previousClose=r}};t.prototype.initializeABTestingIfNecessary=function(){var e=this,r=this.$el.hasClass("js-abtesting-trigger-start");if(this.options.subviewAsyncRender&&r){this.observer=new MutationObserver(function(t){t.forEach(function(t){for(var r=0;r<t.addedNodes.length;++r){var n=i(t.addedNodes[r]);if(n.hasClass("js-abtesting-config")){e.$el.data("jamAbtestingVariation",n.data("jamAbtestingVariation"));n.remove()}}})});var n={attributes:!0,childList:!0,characterData:!0}
21;this.observer.observe(this.$el[0],n);var o=function(){if(e.$el&&e.$el.is(":visible"))return t.startABTesting();setTimeout(o,32)};o()}};t.prototype.renderStructuredDataIfNecessary=function(){if("function"==typeof this.generateStructuredData){var e=this.generateStructuredData();"object"==typeof e&&null!==e&&this.$el.append('<script type="application/ld+json">'+h.stringify(e)+"<\/script>")}};t.prototype.renderViewDebuggingHelpers=function(){};t.ViewEvents={PlatformEnvironment:"platformenvironment"};t.initialized=!1;t.startABTesting=n.throttle(function(){setTimeout(function(){window.dataLayer.push({event:"optimize.activate"})},0)},32);return t}(o.View);t.default=y});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/dialog/toast",["require","exports","ribsjs","../../configuration/configuration","../../managers/manager"],e)}(function(e,t){"use strict";function r(e,r,n){void 0===r&&(r=t.Delay.Long);void 0===n&&(n=t.Position.Bottom);"plugins"in window&&"toast"in window.plugins&&window.plugins.toast.show(e,r,n)}Object.defineProperty(t,"__esModule",{value:!0});var n=e("ribsjs"),i=n.EventsManager,o=e("../../configuration/configuration"),a=e("../../managers/manager");t.Delay={Long:"long",Short:"short"};t.Position={Bottom:"bottom",Center:"center",Top:"top"};t.show=r;i.on(i.constants.ROUTER_POSTROUTE,function(e){var t=e.userData,n=t.cookie.get(o.default.cookies.toast.name);if(n){t.cookie.delete(o.default.cookies.toast.name,{path:"/"});a.LocalizationManager.get(n,{userData:t}).then(function(e){var t=e[0]||{get:function(e){return""},close:function(){""}};r(t.get("translate")||n);t.close()})}})});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/pageTitle",["require","exports","../../configuration/configuration"],e)}(function(e,t){"use strict";function r(){var e=i.default.application.pageTitle.map(function(e){if("static"===e.type){var t=e,r=t.text;return(0,t.shouldRender)(function(e){return o[e]})?r:""}if("part"===e.type){var n=e,i=n.partName,a=n.renderer;if("function"!=typeof a){console.warn('page title part renderer for part "'+i+'" missing');return""}try{return a(o[i],function(e){return o[e]})||""}catch(e){console.warn('error rendering page title part "'+i+'":',e);return""}}}).join("");document.title=e}function n(e,t){o[e]=t;return{updatePageTitlePart:n,reRenderPageTitle:r}}Object.defineProperty(t,"__esModule",{value:!0});var i=e("../../configuration/configuration"),o={};t.reRenderPageTitle=r;t.updatePageTitlePart=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/loader",["require","exports","../../library/view/view","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=e("underscore"),i=function(e){function t(r,i){var o=e.call(this,{userData:r})||this;o.loadingStyle=n.defaults({},i,t.defaultLoadingStyle);return o}__extends(t,e);t.prototype.onInitializeStart=function(){this.options.model&&(this.options=n.extend(this.options,this.options.model.attributes));e.prototype.onInitializeStart.call(this)};t.prototype.getTemplateId=function(){var e;switch(this.loadingStyle.template){case t.LoaderTemplate.Action:e="/partials/loader/action";break;case t.LoaderTemplate.Li:e="/partials/loader/li";break;case t.LoaderTemplate.Div:default:e="/partials/loader/div"}return e};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.loadingStyle.block&&this.$el.addClass("loader--block");this.loadingStyle.invert&&this.$el.addClass("loader--invert");this.loadingStyle.page&&this.$el.addClass("page")};t.LoaderTemplate={Li:"li",Div:"div",Action:"action"};t.defaultLoadingStyle={block:!1,invert:!1,page:!1,template:t.LoaderTemplate.Div};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/loading",["require","exports","./view","../../views/partials/loader"],e)}(function(e,t){"use strict";
21Object.defineProperty(t,"__esModule",{value:!0});var r=e("./view"),n=e("../../views/partials/loader"),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.isRendering=!1;this.loaderView=new n.default(this.options.userData,this.options.loadingStyle);this.displayLoader()};t.prototype.displayLoader=function(){var e=this;this.stopLoader=!1;return this.loaderView.create().then(function(t){if(!e.stopLoader&&!e.isClose){e.events&&e.loaderView.delegateEvents(e.events());e.$el.replaceWith(t);e.setElement(t);e.isRendering&&(e.$loadingEl=t)}})};t.prototype.render=function(){this.$loadingEl=this.$el;this.isRendering=!0;return e.prototype.render.call(this)};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.isClose||!1===this.stopLoader&&(this.stopLoader=!0)};t.prototype.onRenderAll=function(){e.prototype.onRenderAll.call(this);this.isClose||this.onRenderProgressive()};t.prototype.onRenderProgressive=function(){this.isRendering=!1;if(this.$loadingEl){try{this.$loadingEl.replaceWith(this.$el)}catch(e){}this.$loadingEl=null}return this};t.prototype.close=function(){if(this.$loadingEl){this.$loadingEl.remove();this.$loadingEl=null}if(this.loaderView){this.loaderView.close();this.loaderView=null}e.prototype.close.call(this)};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/scrollable",["require","exports","underscore","jquery","./loading","chrisweb-utilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("./loading"),o=e("chrisweb-utilities"),a=function(e){function t(t){var r=e.call(this,t)||this;r.lastScroll=0;return r}__extends(t,e);t.prototype.onRender=function(){e.prototype.onRender.call(this);this.debouncedScroll=r.throttle(this.onScroll.bind(this),300);document.addEventListener("scroll",this.debouncedScroll,{passive:!0})};t.prototype.onScroll=function(e){var r=document.body;r.scrollTop+window.innerHeight===r.scrollHeight&&this.trigger(t.Events.REACH_BOTTOM);0===r.scrollTop&&this.trigger(t.Events.REACH_TOP);n(document).scrollTop()+window.innerHeight+1300>=r.scrollHeight&&this.trigger(t.Events.REACH_HALF);this.lastScroll=r.scrollTop};t.prototype.checkIfNeedMoreEntites=function(){var e=document.body,t=o.default.isClient();return!this.isClose&&t&&n(document).scrollTop()+window.innerHeight+1300>=e.scrollHeight};t.prototype.close=function(){document.removeEventListener("scroll",this.debouncedScroll,{passive:!0});e.prototype.close.call(this)};t.Events={REACH_BOTTOM:"scroll:bottom",REACH_TOP:"scroll:top",REACH_HALF:"scroll:half",SCROLL_DOWN:"scroll:down",SCROLL_UP:"scroll:up"};return t}(i.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/overlays",["require","exports","underscore","./scrollable","../../views/layout","ribsjs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./scrollable"),i=e("../../views/layout"),o=e("ribsjs"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-overlay-close":"onClickClose",keydown:"onEscape"})};
21t.prototype.onClickClose=function(e){this.close()};t.prototype.onEscape=function(e){27===e.keyCode&&this.onClickClose(e)};t.prototype.close=function(){e.prototype.close.call(this);o.EventsManager.trigger(t.Events.OVERLAY_CLOSE);i.default.getInstance().maybeHideOverlay()};t.Events=r.extend({OVERLAY_CLOSE:"overlay:close"},n.default.Events);return t}(n.default);t.default=a});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/form",["require","exports","jquery"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("jquery");!function(e){!function(e){!function(e){function t(e){if(e instanceof n)return t(e.serializeArray());var r={},i=/\[\]$/;e.forEach(function(e){if(i.test(e.name)){var t=e.name.replace(i,"");t in r||(r[t]=[]);r[t].push(e.value)}else r[e.name]=e.value});return r}e.extractDataFromForm=t}(e.Form||(e.Form={}))}(e.Utilities||(e.Utilities={}))}(r||(r={}));t.default=r.Utilities.Form});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/vendor/phpjs/strings/sprintf",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){!function(e){function t(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,i=t,o=0,a=function(e,t,r,n){r||(r=" ");var i=e.length>=t?"":new Array(1+t-e.length>>>0).join(r);return n?e+i:i+e},s=function(e,t,r,n,i,o){var s=n-e.length;s>0&&(e=r||!i?a(e,n,o,r):e.slice(0,t.length)+a("",s,"0",!0)+e.slice(t.length));return e},l=function(e,t,r,n,i,o,l){var u=e>>>0;r=r&&u&&{2:"0b",8:"0",16:"0x"}[t]||"";e=r+a(u.toString(t),o||0,"0",!1);return s(e,r,n,i,l)},u=function(e,t,r,n,i,o){null!=n&&(e=e.slice(0,n));return s(e,"",t,r,i,o)},c=function(e,t,r,n,c,d,p){var f,h,m,y,g;if("%%"===e)return"%";for(var v=!1,_="",b=!1,w=!1,x=" ",M=r.length,S=0;r&&S<M;S++)switch(r.charAt(S)){case" ":_=" ";break;case"+":_="+";break;case"-":v=!0;break;case"'":x=r.charAt(S+1);break;case"0":b=!0;x="0";break;case"#":w=!0}n=n?"*"===n?+i[o++]:"*"==n.charAt(0)?+i[n.slice(1,-1)]:+n:0;if(n<0){n=-n;v=!0}if(!isFinite(n))throw new Error("sprintf: (minimum-)width must be finite");d=d?"*"===d?+i[o++]:"*"==d.charAt(0)?+i[d.slice(1,-1)]:+d:"fFeE".indexOf(p)>-1?6:"d"===p?0:void 0;g=t?i[t.slice(0,-1)]:i[o++];switch(p){case"s":return u(String(g),v,n,d,b,x);case"c":return u(String.fromCharCode(+g),v,n,d,b);case"b":return l(g,2,w,v,n,d,b);case"o":return l(g,8,w,v,n,d,b);case"x":return l(g,16,w,v,n,d,b);case"X":return l(g,16,w,v,n,d,b).toUpperCase();case"u":return l(g,10,w,v,n,d,b);case"i":case"d":f=+g||0;f=Math.round(f-f%1);h=f<0?"-":_;g=h+a(String(Math.abs(f)),d,"0",!1);return s(g,h,v,n,b);case"e":case"E":case"f":case"F":case"g":case"G":f=+g;h=f<0?"-":_;m=["toExponential","toFixed","toPrecision"]["efg".indexOf(p.toLowerCase())];y=["toString","toUpperCase"]["eEfFgG".indexOf(p)%2];g=h+Math.abs(f)[m](d);return s(g,h,v,n,b)[y]();default:return e}};return e.replace(n,c)}e.sprintf=t}(e.strings||(e.strings={}))}(r||(r={}));t.default=r.strings.sprintf});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/vendor/phpjs/base/utf8_encode",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){function t(e){if(null===e||void 0===e)return"";var t,r,n=e+"",i="",o=0;t=r=0;o=n.length;for(var a=0;a<o;a++){var s=n.charCodeAt(a),l=null;if(s<128)r++;else if(s>127&&s<2048)l=String.fromCharCode(s>>6|192,63&s|128);else if(55296!=(63488&s))l=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128);else{if(55296!=(64512&s))throw new RangeError("Unmatched trail surrogate at "+a);var u=n.charCodeAt(++a);if(56320!=(64512&u))throw new RangeError("Unmatched lead surrogate at "+(a-1));s=((1023&s)<<10)+(1023&u)+65536;l=String.fromCharCode(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}if(null!==l){r>t&&(i+=n.slice(t,r));i+=l;t=r=a+1}}r>t&&(i+=n.slice(t,o));return i}e.utf8_encode=t}(r||(r={}));t.default=r.utf8_encode});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/vendor/phpjs/strings/sha1",["require","exports","../base/utf8_encode"],e)}(function(e,t){"use strict";
21Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("../base/utf8_encode");!function(e){!function(e){function t(e){var t,r,i,o,a,s,l,u,c,d=function(e,t){return e<<t|e>>>32-t},p=function(e){var t,r,n="";for(t=7;t>=0;t--){r=e>>>4*t&15;n+=r.toString(16)}return n},f=new Array(80),h=1732584193,m=4023233417,y=2562383102,g=271733878,v=3285377520;e=n.default(e);var _=e.length,b=[];for(r=0;r<_-3;r+=4){i=e.charCodeAt(r)<<24|e.charCodeAt(r+1)<<16|e.charCodeAt(r+2)<<8|e.charCodeAt(r+3);b.push(i)}switch(_%4){case 0:r=2147483648;break;case 1:r=e.charCodeAt(_-1)<<24|8388608;break;case 2:r=e.charCodeAt(_-2)<<24|e.charCodeAt(_-1)<<16|32768;break;case 3:r=e.charCodeAt(_-3)<<24|e.charCodeAt(_-2)<<16|e.charCodeAt(_-1)<<8|128}b.push(r);for(;b.length%16!=14;)b.push(0);b.push(_>>>29);b.push(_<<3&4294967295);for(t=0;t<b.length;t+=16){for(r=0;r<16;r++)f[r]=b[t+r];for(r=16;r<=79;r++)f[r]=d(f[r-3]^f[r-8]^f[r-14]^f[r-16],1);o=h;a=m;s=y;l=g;u=v;for(r=0;r<=19;r++){c=d(o,5)+(a&s|~a&l)+u+f[r]+1518500249&4294967295;u=l;l=s;s=d(a,30);a=o;o=c}for(r=20;r<=39;r++){c=d(o,5)+(a^s^l)+u+f[r]+1859775393&4294967295;u=l;l=s;s=d(a,30);a=o;o=c}for(r=40;r<=59;r++){c=d(o,5)+(a&s|a&l|s&l)+u+f[r]+2400959708&4294967295;u=l;l=s;s=d(a,30);a=o;o=c}for(r=60;r<=79;r++){c=d(o,5)+(a^s^l)+u+f[r]+3395469782&4294967295;u=l;l=s;s=d(a,30);a=o;o=c}h=h+o&4294967295;m=m+a&4294967295;y=y+s&4294967295;g=g+l&4294967295;v=v+u&4294967295}c=p(h)+p(m)+p(y)+p(g)+p(v);return c.toLowerCase()}e.sha1=t}(e.strings||(e.strings={}))}(r||(r={}));t.default=r.strings.sha1});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/vendor/phpjs/strings",["require","exports","./strings/sprintf","./strings/sha1"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("./strings/sprintf"),i=e("./strings/sha1");!function(e){!function(e){e.sprintf=n.default;e.sha1=i.default}(e.strings||(e.strings={}))}(r||(r={}));t.default=r.strings});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/vendor/phpjs/phpjs",["require","exports","./strings","./base/utf8_encode"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("./strings"),i=e("./base/utf8_encode");!function(e){e.strings=n.default;e.utf8_encode=i.default}(r||(r={}));t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/app",["require","exports","../../configuration/configuration"],e)}(function(e,t){"use strict";function r(){var e=navigator;e&&e.app?e.app.exitApp():e&&e.device&&e.device.exitApp()}function n(){if("object"!=typeof device)return s.Unknown;switch((device.platform||"").toLowerCase().trim().replace(/ +/g,"_")){default:return s.Unknown;case"android":return s.Android;case"ios":case"iphone":case"ipad":return s.iOS;case"blackberry":return s.Blackberry;case"wince":case"windows_phone":return s.WindowsPhone}}function i(){return"object"!=typeof device?"0":device.version||"0"}function o(e){void 0===e&&(e=n());switch(e){default:return;case s.Android:return a.default.application.appStoreLinks.android;case s.iOS:return a.default.application.appStoreLinks.ios}}Object.defineProperty(t,"__esModule",{value:!0});var a=e("../../configuration/configuration");t.closeApp=r;var s;!function(e){e[e.Unknown=0]="Unknown";e.Android="android";e.iOS="ios";e.WindowsPhone="windows_phone";e.Blackberry="blackberry"}(s=t.Platform||(t.Platform={}));t.getDevicePlatform=n;t.getDeviceVersion=i;t.getAppStoreLink=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/createaccount",["require","exports","../../../library/view/overlays","underscore","jquery","ribsjs","../../../managers/manager","../../../library/model/model","../../../library/utilities/form","../../../library/dialog/toast","../../../library/utilities/route","../../../vendor/phpjs/phpjs","FSEventDispatcher","../../../library/utilities/object","../../overlays","../../../configuration/configuration","../../../library/utilities/user","../../../library/utilities/app"],e)}(function(e,t){"use strict";
21Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("../../../library/view/overlays"),i=e("underscore"),o=e("jquery"),a=e("ribsjs"),s=a.EventsManager,l=e("../../../managers/manager"),u=e("../../../library/model/model"),c=e("../../../library/utilities/form"),d=e("../../../library/dialog/toast"),p=e("../../../library/utilities/route"),f=e("../../../vendor/phpjs/phpjs"),h=e("FSEventDispatcher"),m=e("../../../library/utilities/object"),y=e("../../overlays"),g=e("../../../configuration/configuration"),v=e("../../../library/utilities/user"),_=e("../../../library/utilities/app");!function(e){e[e.AlreadyExist=21]="AlreadyExist"}(r||(r={}));var b=function(e){
22function t(t){return e.call(this,i.extend({reRenderOnChange:!0,model:new u.default({clickAndAcceptTosAndPrivacy:""})},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/createaccount"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);"undefined"!=typeof AppleID&&AppleID.auth.init({clientId:g.default.social.apple.clientId,scope:g.default.social.apple.scope,redirectURI:g.default.social.apple.redirectUri,state:g.default.social.apple.state,usePopup:_.getDevicePlatform()!==_.Platform.Unknown})};t.prototype.onRender=function(){var t=this;e.prototype.onRender.call(this);var r=this.$el.find(".js-createaccount-apple");this.localizeSignUpWithAppleButton(r);_.getDevicePlatform()===_.Platform.iOS&&(!window.cordova.plugins.SignInWithApple||parseInt(_.getDeviceVersion())<13)&&r.addClass("hidden");l.LocalizationManager.get(["_TKEY_WWW_SIGNUP_click-and-accept-tos","_TKEY_WWW_TERMS_page-title","_TKEY_WWW_POLICY_page-title"],{userData:this.options.userData}).then(function(e){var r=e.map(function(e){return e.get("translate")}),n=r[0],i=r[1],o=r[2],a=f.default.strings.sprintf(n,'<a href="'+p.default.getUrl("legal",{subpage:"terms-of-use"})+'">'+i+"</a>",'<a href="'+p.default.getUrl("legal",{subpage:"privacy"})+'">'+o+"</a>");t.model.set({clickAndAcceptTosAndPrivacy:a});m.closeModel(e);t.$el.find("button[type=submit]").prop("disabled",!1)})};t.prototype.events=function(){return i.extend(e.prototype.events.call(this),{"click .js-createaccount-facebook":"onClickFacebook","click .js-createaccount-google":"onClickGoogle","click .js-createaccount-twitter":"onClickTwitter","click .js-createaccount-reddit":"onClickReddit","click .js-createaccount-apple":"onClickApple","submit .js-createaccount-form":"onSubmitForm","click .js-tos-privacy-link>a":"onClickTosPrivacy"})};t.prototype.onClickTosPrivacy=function(e){this.close()};t.prototype.onClickFacebook=function(e){s.trigger("STATS:ACCOUNT:CREATE",{type:"facebook"});-1===h.default.Mediator.triggerResult("facebookConnect",this.options.userData).indexOf(!1)&&(location.href=location.protocol+"//"+location.host+"/oauth/facebook")};t.prototype.onClickGoogle=function(e){s.trigger("STATS:ACCOUNT:CREATE",{type:"google"});-1===h.default.Mediator.triggerResult("googleConnect",this.options.userData).indexOf(!1)&&(location.href=location.protocol+"//"+location.host+"/oauth/google")};t.prototype.onClickTwitter=function(e){location.href=location.protocol+"//"+location.host+"/oauth/twitter"};t.prototype.onClickReddit=function(e){d.show("Coming soon!",d.Delay.Short,d.Position.Bottom)};t.prototype.internalServerErrorRedirect=function(){location.href=location.protocol+"//"+location.host+"/500"};t.prototype.localizeSignUpWithAppleButton=function(e){var t=v.default.getUserLanguage(this.options.userData);if(g.default.application.acceptedLanguages.includes(t)){var r=void 0;r="pt"===t?"pt_BR":"en"===t?"en_US":t.toLowerCase()+"_"+t.toUpperCase();e.css("background-image",'url("'+g.default.social.apple.signUpBtnUri+"&locale="+r+'")')}};t.prototype.signUpWithApple=function(){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(t){switch(t.label){case 0:if("undefined"==typeof AppleID){this.internalServerErrorRedirect();return[2]}t.label=1;case 1:t.trys.push([1,3,,4]);return[4,AppleID.auth.signIn()];case 2:t.sent();return[3,4];case 3:e=t.sent();"error"in e&&"popup_closed_by_user"!==e.error&&"user_trigger_new_signin_flow"!==e.error&&this.internalServerErrorRedirect();return[3,4];case 4:return[2]}})})};t.prototype.onClickApple=function(e){s.trigger("STATS:ACCOUNT:CREATE",{type:"apple"});-1===h.default.Mediator.triggerResult("appleConnect",this.options.userData).indexOf(!1)&&this.signUpWithApple()};t.prototype.onSubmitForm=function(e){var t=this;e.preventDefault();var n=o(e.currentTarget);n.find(".js-form-email").removeClass("has-error");n.find(".js-form-password").removeClass("has-error");n.find(".help-block").text("");n.find("button[type=submit]").prop("disabled",!0).addClass("is-active");var i=c.default.extractDataFromForm(n);l.UserManager.createUser(i.email,i.password,this.options.userData).then(function(e){y.default.add(y.default.DefinitionPath.LoginCreateAccountInformations,{callback:t.options.callback,userData:t.options.userData,model:e}).then(function(){t.close()})},function(e){n.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");var i=e.error.message,o=".js-feedback-block";switch(e.error.code){case r.AlreadyExist:n.find(".js-form-email").addClass("has-error");o=".js-form-email>p"}l.LocalizationManager.get(i,{userData:t.options.userData}).then(function(e){n.find(o).text(e[0].get("translate"));e[0].close()})});return!1};return t}(n.default);t.default=b});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/createaccount/confirm",["require","exports","../../../../library/view/overlays","ribsjs"],e)}(function(e,t){"use strict";
22Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../../library/view/overlays"),n=e("ribsjs"),i=n.EventsManager,o=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/createaccount/confirm"};t.prototype.onClose=function(){i.trigger("STATS:ACCOUNT:CREATE",{type:"email"});"callback"in this.options&&this.options.callback&&this.options.callback()};return t}(r.default);t.ConfirmView=o;t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/createaccount/informations",["require","exports","underscore","jquery","moment","../../../../managers/manager","../../../../library/view/overlays","../../../../library/utilities/form","../../../../library/utilities/user","../../../overlays"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("moment"),o=e("../../../../managers/manager"),a=e("../../../../library/view/overlays"),s=e("../../../../library/utilities/form"),l=e("../../../../library/utilities/user"),u=e("../../../overlays"),c=function(e){function t(t){return e.call(this,r.extend({ModelViewOptions:{templateVariables:{country:""}}},t))||this}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var n=l.default.getUserLanguage(this.options.userData);this.model.set(r.defaults(this.model.attributes,{userLanguage:n},t.DefaultUserSettings))};t.prototype.render=function(){var t=this;return o.StaticManager.getByAttribute({type:"country"},{userData:this.options.userData}).then(function(r){t.model.set("countries",r.map(function(e){return e.attributes}));return e.prototype.render.call(t)})};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"submit .js-createaccount-informations-form":"onSubmitForm"})};t.prototype.onSubmitForm=function(e){var t=this;e.preventDefault();var r=n(e.currentTarget),a=s.default.extractDataFromForm(r.serializeArray());r.find("button[type=submit]").prop("disabled",!0).addClass("is-active");r.find("#js-form-birthdate-feedback").text("");r.find("#js-form-feedback").text("");r.find("#js-form-birthdate").removeClass("has-error");a.birthdate=a.year+"-"+a.month+"-"+a.day;if(!i(a.birthdate,["YYYY-MM-DD"],!0).isValid()){r.find("#js-form-birthdate").addClass("has-error");o.LocalizationManager.get(["_TKEY_WWW_GENERIC_invalid-form","_TKEY_WWW_GENERIC_invalid-date"],{userData:this.options.userData}).then(function(e){var t=e[0],n=e[1];r.find("#js-form-feedback").text(t.get("translate"));r.find("#js-form-birthdate-feedback").text(n.get("translate"));t.close();n.close()});r.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");return!1}delete a.day;delete a.month;delete a.year;a.location={country:a.country,city:a.city};delete a.country;delete a.city;o.UserManager.update(this.model,a,{success:function(){t.options.userData.session.set("me",t.model.toJSON());o.UserManager.trigger("userupdated",t.model);t.close()},error:function(e){o.LocalizationManager.get("_TKEY_WWW_GENERIC_invalid-form",{userData:t.options.userData}).then(function(e){r.find("#js-form-feedback").text(e[0].get("translate"));e[0].close()});r.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");return!1},wait:!0,userData:this.options.userData})};t.prototype.getTemplateId=function(){return"/overlays/login/createaccount/informations"};t.prototype.onClose=function(){u.default.add(u.default.DefinitionPath.LoginCreateAccountSubscriptionSettings,{callback:this.options.callback,userData:this.options.userData})};t.DefaultUserSettings={birthdate:"2001-01-01"};return t}(a.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/users/sub
22scriptionSettingsForm",["require","exports","../../../library/view/view","../../../managers/manager","../../../library/dialog/toast","../../../managers/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/view"),n=e("../../../managers/manager"),i=e("../../../library/dialog/toast"),o=e("../../../managers/user"),a=["discounts","news","tips","surveys"],s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/users/subscriptionSettingsForm"};t.prototype.onInitialize=function(){this.options.templateVariables=__assign({},this.options.templateVariables,{newsletterPreferences:this.model.get("newsletterPreferences")||[],settingNames:a});e.prototype.onInitialize.call(this)};t.prototype.submit=function(e){var t=this;void 0===e&&(e=!1);var r=this.model,a=__assign({},r.attributes,{newsletterPreferences:[],newsletter:1});delete a.password;delete a.password_check;$(".js-subscription-setting-checkbox").each(function(e,t){var r=$(t);if(r.is(":checked")){var n=r.attr("name");a.newsletterPreferences.push(n)}});return new Promise(function(s,l){n.UserManager.update(r,a,{success:function(){r.unset("password",{silent:!0});r.unset("password_check",{silent:!0});delete a.password;delete a.password_check;if(!t.isClose||e){var l=t.options.userData.session.get("me");t.options.userData.session.set("me",__assign({},l,a));n.UserManager.trigger(o.UserManager.Event.UserUpdated,r);t.$el.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");n.LocalizationManager.get("_TKEY_WWW_SETTINGS_feedback-changes-saved",{userData:t.options.userData}).then(function(e){i.show(e[0].get("translate"));e[0].close()});s()}else s()},error:function(e,r,i){if(t.isClose)l(void 0);else{n.LocalizationManager.get("_TKEY_WWW_GENERIC_error-unknown",{userData:t.options.userData}).then(function(e){t.$el.find("#js-form-feedback").text(e[0].get("translate"));e[0].close()});l("_TKEY_WWW_GENERIC_error-unknown")}},wait:!0,userData:t.options.userData})})};return t}(r.default);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/user/subscriptionSettings",["require","exports","../../../library/view/overlays","../../partials/users/subscriptionSettingsForm","../../../models/manager/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("../../partials/users/subscriptionSettingsForm"),i=e("../../../models/manager/user"),o=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.events=function(){return __assign({},e.prototype.events.call(this),{"click .js-subscription-settings-form-submit":"onSubmitForm"})};t.prototype.getTemplateId=function(){return"/overlays/user/subscriptionSettings"};t.prototype.render=function(){this.form=new n.default(__assign({},this.options,{model:new i.default(this.options.userData.session.get("me"))}));this.addView(".js-subscription-settings-form-container",this.form);return e.prototype.render.call(this)};t.prototype.submitForm=function(){this.$(".js-subscription-settings-form-submit").prop("disabled",!0);return this.form.submit(!0)};t.prototype.onSubmitForm=function(e){var t=this;e.preventDefault();e.stopPropagation();
22this.submitForm().then(function(){return t.close()})};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/createaccount/signupSubscriptionSettings",["require","exports","../../user/subscriptionSettings","../../../overlays"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../user/subscriptionSettings"),n=e("../../../overlays"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/user/subscriptionSettings"};t.prototype.onClose=function(){n.default.add(n.default.DefinitionPath.LoginCreateAccountConfirm,{callback:this.options.callback,userData:this.options.userData})};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/pivot",["require","exports","./view","chrisweb-utilities","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./view"),n=e("chrisweb-utilities"),i=e("FSPromise"),o=i.FSPromise,a=function(e){function t(t,r){var n=e.call(this,r)||this;n.currentViewIndex=0;n.stateWidth=0;n.options.stateViews.forEach(function(e,r){e.view=new e.viewClass(n);e.name===t&&(n.currentViewIndex=r)});n.animate=!0;return n}__extends(t,e);t.prototype.setCurrentViewIndex=function(e){this.currentViewIndex=e;return this.options.stateViews[e].view.create()};t.prototype.render=function(){var t=this;return e.prototype.render.call(this).then(function(){t.$container=t.$el.find(t.options.containerSelector);var e=[];t.options.stateViews.forEach(function(r,n){t.$container.append(r.view.$el);if(t.options.forceRender){var i=r.view.$el;e.push(r.view.create().then(function(e){i.replaceWith(e)}))}});n.default.isClient()&&t.$container.velocity({translateX:t.currentViewIndex*t.stateWidth});return o.all(e).then(function(){return t.setCurrentViewIndex(t.currentViewIndex).then(function(){return t})})})};t.prototype.next=function(){this.currentViewIndex<this.options.stateViews.length-1?this.setCurrentViewIndex(this.currentViewIndex+1):this.options.isCircular&&this.setCurrentViewIndex(0)};t.prototype.previous=function(){this.currentViewIndex>0?this.setCurrentViewIndex(this.currentViewIndex-1):this.options.isCircular&&this.setCurrentViewIndex(this.options.stateViews.length-1)};t.prototype.onMoveTab=function(e){$.Velocity.hook(this.$container,"translateX",e.gesture.deltaX+"px")};t.prototype.onEndMoveTab=function(e){var t=this;if(this.animate){this.animate=!1;var r=e.gesture.deltaX;setTimeout(function(){var e=t.options.stateViews[t.currentViewIndex].view.el.offsetWidth;if(Math.abs(r)>e/2){r<0&&t.currentViewIndex<t.options.stateViews.length-1&&t.setCurrentViewIndex(t.currentViewIndex+1);r>0&&t.currentViewIndex>0&&t.setCurrentViewIndex(t.currentViewIndex-1)}t.$container.velocity({translateX:t.currentViewIndex*t.stateWidth});t.animate=!0},1e3/60)}};return t}(r.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/passwordrecovery/form",["require","exports","underscore","jquery","../../../../managers/manager","../../../../library/view/overlays","../../../../library/utilities/form","../../../overlays"],e)}(function(e,t){"use strict";
22Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("underscore"),i=e("jquery"),o=e("../../../../managers/manager"),a=e("../../../../library/view/overlays"),s=e("../../../../library/utilities/form"),l=e("../../../overlays");!function(e){e[e.AccountNotValid=1]="AccountNotValid";e[e.EmailNotExist=2]="EmailNotExist";e[e.InvalidEmail=3]="InvalidEmail"}(r||(r={}));var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/passwordrecovery/form"};t.prototype.events=function(){return n.extend({"submit .js-passwordrecovery-form":"onSubmitForm"},e.prototype.events.call(this))};t.prototype.onSubmitForm=function(e){var t=this;e.preventDefault();var n=i(e.currentTarget);n.find(".form-group").removeClass("has-error");n.find(".help-block").text("");n.find("button[type=submit]").prop("disabled",!0).addClass("is-active");var a=s.default.extractDataFromForm(n);o.UserManager.passwordRecovery(a.email).then(function(e){t.next();e.close()},function(e){n.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");n.find(".form-group").addClass("has-error");var i;switch(e.error){case r.EmailNotExist:i="_TKEY_WWW_ERROR_USER_no-account";break;case r.AccountNotValid:case r.InvalidEmail:default:i="_TKEY_WWW_ERROR_error-occured"}o.LocalizationManager.get(i,{userData:t.options.userData}).then(function(e){n.find(".help-block").text(e[0].get("translate"));e[0].close()})});return!1};t.prototype.next=function(){var e=this;l.default.add(l.default.DefinitionPath.LoginPasswordRecoverySuccess,{userData:this.options.userData}).then(function(){e.close()})};return t}(a.default);t.PasswordRecoveryFormView=u;t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/passwordrecovery/success",["require","exports","../../../../library/view/overlays"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../../library/view/overlays"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/passwordrecovery/success"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/passwordrecovery",["require","exports","../../../library/view/pivot","underscore","./passwordrecovery/form","./passwordrecovery/success"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("../../../library/view/pivot"),i=e("underscore"),o=e("./passwordrecovery/form"),a=e("./passwordrecovery/success");!function(e){!function(e){!function(e){!function(e){var t=function(e){function t(r){return e.call(this,t.View.Form,i.extend({containerSelector:".js-pivot-container",stateViews:[{name:t.View.Form,viewClass:o.default},{name:t.View.Success,viewClass:a.default}],isCircular:!1,forceRender:!0},r))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/passwordrecovery"};t.View={Form:"form",Success:"success"};return t}(n.default);e.PasswordRecoveryView=t}(e.Login||(e.Login={}))}(e.Overlays||(e.Overlays={}))}(e.Views||(e.Views={}))}(r||(r={}));t.default=r.Views.Overlays.Login.PasswordRecoveryView});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/passwordrecoveryoverlay",["require","exports","../../../library/view/overlays","./passwordrecovery"],e)}(function(e,t){"use strict";
22Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("./passwordrecovery"),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/passwordrecoveryoverlay"};t.prototype.render=function(){var t=this;return e.prototype.render.call(this).then(function(){return new n.default(t.options).create().then(function(e){t.$el.append(e);return t})})};return t}(r.default);t.PasswordRecoveryOverlayView=i;t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/redirection",["require","exports","ribsjs","underscore","../../../library/view/overlays","../../overlays","../../../library/utilities/user","../../../library/utilities/route"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("underscore"),i=e("../../../library/view/overlays"),o=e("../../overlays"),a=e("../../../library/utilities/user"),s=e("../../../library/utilities/route"),l=r.EventsManager,u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/redirection"};t.prototype.events=function(){return n.extend(e.prototype.events.call(this),{"click .js-close-modal":"onClickCloseModal","click .js-modal-overlay":"onClickOutsideModal","click .js-music-signin":"onClickMusicSignIn","click .js-licensing-signin":"onClickLicensingSignIn"})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$close=this.$el.find("#modal-redirection");this.$close.attr("fade","show")};t.prototype.closeModal=function(){this.$close.removeAttr("fade");this.close()};t.prototype.onClickCloseModal=function(e){this.closeModal()};t.prototype.onClickOutsideModal=function(e){this.closeModal()};t.prototype.onClickMusicSignIn=function(e){var t=this;a.default.getIsLogged(this.options.userData)?location.href=s.default.getUrl("homepage"):o.default.add(o.default.DefinitionPath.LoginSignin,{userData:this.options.userData,overlaySelector:this.options.overlaySelector,transparentBackground:this.options.transparentBackground,callback:function(){location.href=s.default.getUrl("homepage")}}).then(function(){t.closeModal()});l.trigger("STATS:SPLASH:REDIRECT",{type:"music"})};t.prototype.onClickLicensingSignIn=function(e){l.trigger("STATS:SPLASH:REDIRECT",{type:"licensing"})};return t}(i.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/signin",["require","exports","underscore","jquery","../../../managers/manager","../../../library/utilities/form","../../../library/dialog/toast","FSEventDispatcher","../../../library/view/overlays","../../overlays","../../../configuration/configuration","../../../library/utilities/user","../../../library/utilities/app"],e)}(function(e,t){"use strict";
22Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("../../../managers/manager"),o=e("../../../library/utilities/form"),a=e("../../../library/dialog/toast"),s=e("FSEventDispatcher"),l=e("../../../library/view/overlays"),u=e("../../overlays"),c=e("../../../configuration/configuration"),d=e("../../../library/utilities/user"),p=e("../../../library/utilities/app"),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/signin"};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-close-modal":"onClickCloseModal","click .js-modal-overlay":"onClickOutsideModal","click .js-signin-facebook":"onClickFacebook","click .js-signin-google":"onClickGoogle","click .js-signin-apple":"onClickApple","click .js-signin-forgot-password":"onClickForgotPassword","click .js-signin-create-account":"onClickCreateAccount","submit .js-signin-form":"onSubmitForm"})};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);"undefined"!=typeof AppleID&&AppleID.auth.init({clientId:c.default.social.apple.clientId,scope:c.default.social.apple.scope,redirectURI:c.default.social.apple.redirectUri,state:c.default.social.apple.state,usePopup:p.getDevicePlatform()!==p.Platform.Unknown})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$close=this.$el.find("#modal-login");this.$close.attr("fade","show");var t=this.$el.find(".js-signin-apple");this.localizeSignInWithAppleButton(t);p.getDevicePlatform()===p.Platform.iOS&&(!window.cordova.plugins.SignInWithApple||parseInt(p.getDeviceVersion())<13)&&t.addClass("hidden")};t.prototype.closeModal=function(){this.$close.removeAttr("fade");this.close()};t.prototype.onClickCloseModal=function(e){this.closeModal()};t.prototype.onClickOutsideModal=function(e){this.closeModal()};t.prototype.onClickFacebook=function(e){if(-1===s.default.Mediator.triggerResult("facebookConnect",this.options.userData).indexOf(!1)){this.closeModal();location.href=location.protocol+"//"+location.host+"/oauth/facebook"}};t.prototype.onClickGoogle=function(e){if(-1===s.default.Mediator.triggerResult("googleConnect",this.options.userData).indexOf(!1)){this.closeModal();location.href=location.protocol+"//"+location.host+"/oauth/google"}}
23;t.prototype.internalServerErrorRedirect=function(){location.href=location.protocol+"//"+location.host+"/500"};t.prototype.localizeSignInWithAppleButton=function(e){var t=d.default.getUserLanguage(this.options.userData);if(c.default.application.acceptedLanguages.includes(t)){var r=void 0;r="pt"===t?"pt_BR":"en"===t?"en_US":t.toLowerCase()+"_"+t.toUpperCase();e.css("background-image",'url("'+c.default.social.apple.signInBtnUri+"&locale="+r+'")')}};t.prototype.signInWithApple=function(){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(t){switch(t.label){case 0:if("undefined"==typeof AppleID){this.internalServerErrorRedirect();return[2]}t.label=1;case 1:t.trys.push([1,3,,4]);return[4,AppleID.auth.signIn()];case 2:t.sent();return[3,4];case 3:e=t.sent();"error"in e&&"popup_closed_by_user"!==e.error&&"user_trigger_new_signin_flow"!==e.error&&this.internalServerErrorRedirect();return[3,4];case 4:return[2]}})})};t.prototype.onClickApple=function(e){if(-1===s.default.Mediator.triggerResult("appleConnect",this.options.userData).indexOf(!1)){this.closeModal();this.signInWithApple()}};t.prototype.onClickForgotPassword=function(e){var t=this;u.default.add(u.default.DefinitionPath.LoginPasswordRecoveryForm,{userData:this.options.userData}).then(function(){t.closeModal()})};t.prototype.onClickCreateAccount=function(e){var t=this;u.default.add(u.default.DefinitionPath.LoginCreateAccount,{userData:this.options.userData}).then(function(){t.closeModal()})};t.prototype.onSubmitForm=function(e){var t=this;e.preventDefault();var r=n(e.currentTarget);r.find(".js-form-email").removeClass("has-error");r.find(".js-form-password").removeClass("has-error");r.find(".js-feedback-block").text("");r.find("#js-form-feedback").text("");r.find(".js-feedback-block, #js-form-feedback").addClass("has-error");r.find("button[type=submit]").prop("disabled",!0).addClass("is-active");var s=o.default.extractDataFromForm(r);i.UserManager.signIn({username:s.email,password:s.password},this.options.userData.session).then(function(e){"callback"in t.options&&t.options.callback();i.LocalizationManager.get("_TKEY_WWW_USER_feedback-connect",{userData:t.options.userData}).then(function(e){a.show(e[0].get("translate"));e[0].close()});e.close();t.closeModal()},function(e){r.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");var n,o=!1;switch(e.error.toLowerCase()){case i.UserManager.SignInErrorIdentifier.Unathorized:r.find(".js-form-email").addClass("has-error");r.find(".js-form-password").addClass("has-error");n="_TKEY_WWW_ERROR_USER_credentials";break;case i.UserManager.SignInErrorIdentifier.InvalidUsername:r.find(".js-form-email").addClass("has-error");n="_TKEY_WWW_ERROR_USER_Invalid-username";break;case i.UserManager.SignInErrorIdentifier.InvalidPassword:r.find(".js-form-password").addClass("has-error");n="_TKEY_WWW_ERROR_USER_Invalid-password";break;default:n="_TKEY_WWW_ERROR_error-occured";o=!0}i.LocalizationManager.get(n,{userData:t.options.userData}).then(function(e){var t=o?"#js-form-feedback":".js-feedback-block";r.find(t).addClass("has-error").text(e[0].get("translate"));e[0].close()})});return!1};return t}(l.default);t.default=f});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/login/loggedrequire",["require","exports","underscore","../../../library/view/overlays","../../overlays"],e)}(function(e,t){"use strict";
23Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/overlays"),i=e("../../overlays"),o=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/login/loggedrequire"};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-loggedrequired-signin":"onClickSignin","click .js-loggedrequired-create":"onClickCreate"})};t.prototype.onClickSignin=function(e){var t=this;i.default.add(i.default.DefinitionPath.LoginSignin,{callback:this.options.callback,userData:this.options.userData,overlaySelector:"#skeleton-overlay",transparentBackground:!0}).then(function(){t.close()})};t.prototype.onClickCreate=function(e){var t=this;i.default.add(i.default.DefinitionPath.LoginCreateAccount,{callback:this.options.callback,userData:this.options.userData}).then(function(){t.close()})};return t}(n.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/messages/item",["require","exports","../../library/view/view","../../configuration/configuration"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=e("../../configuration/configuration"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/messages/item"};t.prototype.events=function(){return{"click .messages_message_dismiss":"onClickClose"}};t.prototype.close=function(){clearTimeout(this.autoDisappearTimeout);e.prototype.close.call(this)};t.prototype.onRender=function(){var t=this;e.prototype.onRender.call(this);this.autoDisappearTimeout=setTimeout(function(){t.isClose||t.close()},n.default.application.guiMessages.disappearAfter)};t.prototype.onClickClose=function(e){this.close()};t.Status={Success:"is-success",Warning:"is-warning",Danger:"is-danger",Default:""};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/social/mergeaccount",["require","exports","../../../library/view/overlays","../../../configuration/configuration","underscore","../../../library/utilities/form","../../../managers/manager","../../../library/dialog/toast","../../../library/model/model","../../layout","../../messages/item"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("../../../configuration/configuration"),i=e("underscore"),o=e("../../../library/utilities/form"),a=e("../../../managers/manager"),s=e("../../../library/dialog/toast"),l=e("../../../library/model/model"),u=e("../../layout"),c=e("../../messages/item"),d=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/social/mergeaccount"};t.prototype.events=function(){return i.extend(e.prototype.events.call(this),{"submit .js-social-mergeaccount-form":"onSubmitForm","click .js-social-mergeaccount-reset":"onResetForm"})};t.prototype.onSubmitForm=function(e){e.preventDefault();var t=$(e.currentTarget),r=o.default.extractDataFromForm(t);this.onDoingRequest(a.UserManager.socialMerge(r.password,this.options.userData))};t.prototype.onResetForm=function(e){this.onDoingRequest(a.UserManager.socialReset(this.options.userData))};t.prototype.onDoingRequest=function(e){var t=this;this.$(".js-social-mergeaccount-reset").prop("disabled",!0);var r=this.$("js-social-mergeaccount-form");r.find("button[type=submit]").prop("disabled",!0);r.find(".js-social-mergeaccount-password").removeClass("has-error");r.find(".js-feedback-block").text();e.then(function(e){"callback"in t.options&&t.options.callback();a.LocalizationManager.get("_TKEY_WWW_USER_feedback-connect",{userData:t.options.userData}).then(function(e){s.show(e[0].get("translate"));e[0].close()});t.options.userData.cookie.delete(n.default.cookies.message.name);t.options.userData.cookie.delete(n.default.cookies.toast.name);t.options.userData.cookie.delete(n.default.cookies.me.name);e.close();t.close()},function(e){var i;switch(e.error){case-3:i="_TKEY_WWW_ERROR_USER_credentials";break;case-2:var o=!1,d=t.options.userData.cookie.get(n.default.cookies.message.name);if(d){o=!0;t.options.userData.cookie.delete(n.default.cookies.message.name);u.default.getInstance().addMessage(new c.default({model:new l.default({message:d.message,status:d.status})}));t.close()}var p=t.options.userData.cookie.get(n.default.cookies.toast.name);if(p){o=!0;t.options.userData.cookie.delete(n.default.cookies.toast.name);a.LocalizationManager.get(p,{userData:t.options.userData}).then(function(e){var n=e[0]||{get:function(e){""}};s.show(n.get("translate")||p);r.find("button[type=submit]").prop("disabled",!1);t.$(".js-social-mergeaccount-reset").prop("disabled",!1);e.length&&e[0].close()})}o||a.LocalizationManager.get("_TKEY_WWW_GENERIC_error-unknown",{userData:t.options.userData}).then(function(e){s.show(e[0].get("translate"));e[0].close();t.close()});return;case 0:case-1:default:a.LocalizationManager.get("_TKEY_WWW_GENERIC_error-unknown",{userData:t.options.userData}).then(function(e){s.show(e[0].get("translate"));e[0].close();t.close()});return}r.find("button[type=submit]").prop("disabled",!1);t.$(".js-social-mergeaccount-reset").prop("disabled",!1);r.find(".js-social-mergeaccount-password").addClass("has-error");a.LocalizationManager.get(i,{userData:t.options.userData}).then(function(e){r.find(".js-feedback-block").text(e[0].get("translate"));e[0].close()})});return!1};return t}(r.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/social/review",["require","exports","../../../library/view/overlays","../../../managers/manager","underscore","../../../library/utilities/form","../../../library/utilities/user","ribsjs"],e)}(function(e,t){"use strict";
23Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("../../../managers/manager"),i=e("underscore"),o=e("../../../library/utilities/form"),a=e("../../../library/utilities/user"),s=e("ribsjs"),l=s.EventsManager,u=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/social/review"};t.prototype.events=function(){return i.extend(e.prototype.events.call(this),{"click .js-review-rating":"onChangeReviewRating","submit .js-review-form":"onSubmitMessage"})};Object.defineProperty(t.prototype,"note",{get:function(){return this._note},set:function(e){for(var t=1;t<6;t++)t>e?this.$el.find("#contact-form-note-"+t).removeClass("is-on"):this.$el.find("#contact-form-note-"+t).addClass("is-on");this._note=e},enumerable:!0,configurable:!0});t.prototype.onChangeReviewRating=function(e){this.note=e.currentTarget.htmlFor.split("-").pop()};t.prototype.onSubmitMessage=function(e){e.preventDefault();e.stopPropagation();var t=$(e.currentTarget),r=o.default.extractDataFromForm(t);t.find(".js-form-note").removeClass("has-error");t.find(".help-block").text("");if(this.note){var i=a.default.getUserLanguage(this.options.userData),s=n.ReviewsManager.addReviews({joinId:this.model.get("id"),type:this.model.get("type"),title:r.title,note:this.note,reviewText:r.text,lang:i},{userData:this.options.userData});l.trigger("review:post",{review:s,id:this.model.get("id"),type:this.model.get("type")});l.trigger("STATS:REVIEW:WRITE",{id:this.model.get("id"),context:this.model.get("context"),name:this.model.get("name"),type:this.model.get("type")});this.close()}else{t.find(".js-form-note").addClass("has-error");n.LocalizationManager.get("_TKEY_WWW_ERROR_missing-fields",{userData:this.options.userData}).then(function(e){t.find(".js-form-note>p").text(e[0].get("translate"));e[0].close()})}};return t}(r.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/social/comment",["require","exports","../../../library/view/overlays","underscore","../../../library/utilities/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("underscore"),i=e("../../../library/utilities/user"),o=function(e){function t(t){var r=e.call(this,t)||this;r.Events={COMMENT_POST:"comment:post"};return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/social/comment"};t.prototype.events=function(){return n.extend(e.prototype.events.call(this),{"click .js-comment-rating":"onChangeCommentRating","submit .js-comment-form":"onSubmitMessage"})};t.prototype.onSubmitMessage=function(e){e.preventDefault();e.stopPropagation();i.default.getUserLanguage(this.options.userData);this.trigger(this.Events.COMMENT_POST,void 0);this.close()};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/social/deleteCommentConfirmation",["require","exports","ribsjs","../../../library/view/overlays","underscore"],e)}(function(e,t){"use strict";
23Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../../library/view/overlays"),o=e("underscore"),a=function(e){function t(t){var r=e.call(this,t)||this;r.Events={DELETE_CONFIRM:"comment:delete:confirm",DELETE_CANCEL:"comment:delete:cancel"};return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/social/deleteCommentConfirmation"};t.prototype.events=function(){return o.extend(e.prototype.events.call(this),{"click .js-delete-comment-cancel":"onCancel","click .js-delete-comment-confirm":"onConfirmDelete"})};t.prototype.onConfirmDelete=function(e){e.preventDefault();e.stopPropagation();this.trigger(this.Events.DELETE_CONFIRM);n.trigger("STATS:COMMENT:DELETE",{id:this.model.get("id")});this.close()};t.prototype.onCancel=function(e){"object"==typeof e&&null!==e&&e.preventDefault();this.trigger(this.Events.DELETE_CANCEL);this.close()};t.prototype.onClickClose=function(){this.onCancel();e.prototype.close.call(this)};return t}(i.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/component",["require","exports","./view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./view"),n=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.isActive=!1;return t}__extends(t,e);t.prototype.activateComponent=function(){var e=this;this.isActive=!0;this.$el.addClass("is-active").delay(800).queue(function(){e.isActive=!1;e.$el.removeClass("is-active").dequeue()})};t.Context={ALBUMPAGE:"album-page",ALBUMPAGEALL:"album-page-all",ARTISTPAGE:"artist-page",ARTISTPAGEALL:"artist-page-all",ARTISTPAGEPOPULAR:"artist-page-popular",ARTISTPAGEALBUMSPREVIEW:"artist-page-albums-preview",ARTISTPAGESINGLESPREVIEW:"artist-page-singles-preview",PLAYLISTPAGE:"playlist-page",TRACKPAGE:"track-page",TRACKPAGEALL:"track-page-all",COMMUNITYPAGE:"community-page",RADIOPAGE:"radio-page",MEFAVORITESPAGE:"me-favorites-page",CHARTPAGE:"chart-page",HOMEPAGE:"home-page",RETROSPECTIVESTATIC:"retrospective-static",MINIPLAYER:"mini-player",FULLPLAYER:"full-player",TRACKROW:"track-row",ALBUMITEM:"album-item",PLAYLISTITEM:"playlist-item",USERITEM:"user-item",SINGLEITEM:"single-item",WALLPOST:"wallpost",CHARTSALL:"charts-all",CHARTS:"charts",SEARCHPAGE:"search-page",SEARCHARTISTPAGE:"search-artist-page",SEARCHALBUMPAGE:"search-album-page",SEARCHTRACKPAGE:"search-track-page",SEARCHPLAYLISTPAGE:"search-playlist-page",SEARCHUSERPAGE:"search-user-page",USEROVERVIEWPAGE:"user-overview-page",USERPLAYLISTSPAGE:"user-playlists-page",USERFAVORITESPAGE:"user-favorites-page",USERACTIVITYPAGE:"user-activity-page",USERSETTINGSPAGE:"user-settings-page"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/loggedComponent",["require","exports","underscore","../../views/overlays","./component","FSPromise","../../managers/manager","../../managers/user","../utilities/user","../error/error"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("underscore"),i=e("../../views/overlays"),o=e("./component"),a=e("FSProm
23ise"),s=a.FSPromise,l=e("../../managers/manager"),u=e("../../managers/user"),c=e("../utilities/user"),d=e("../error/error");!function(e){e[e.Favorite=0]="Favorite";e[e.Playlist=-1]="Playlist"}(r||(r={}));var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.defaultIsLoggedOptions={openDialog:!0,dialogType:""};return t}__extends(t,e);t.prototype.onInitialize=function(){l.UserManager.on(u.UserManager.Event.UserConnected,this.onUserConnected,this);l.UserManager.on(u.UserManager.Event.UserDisconnected,this.onUserDisconnected,this)};t.prototype.close=function(){l.UserManager.off(u.UserManager.Event.UserConnected,this.onUserConnected,this);l.UserManager.off(u.UserManager.Event.UserDisconnected,this.onUserDisconnected,this);e.prototype.close.call(this)};t.prototype.isLogged=function(e){var t=this;void 0===e&&(e={});var r=n.extend({},this.defaultIsLoggedOptions,e);return new s(function(e,n){c.default.getIsLogged(t.options.userData)?e():!0===r.openDialog?i.default.add(i.default.DefinitionPath.LoginRequire,{callback:e,userData:t.options.userData,templateVariables:{dialogType:r.dialogType}}):n(new d.default("user not logged and not allowed to show login dialog"))})};t.prototype.onUserConnected=function(e){};t.prototype.onUserDisconnected=function(e){};return t}(o.default);t.default=p});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/download/button",["require","exports","ribsjs","../../../configuration/configuration","FSEventDispatcher","../../../library/view/loggedComponent","jamtracker"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../../configuration/configuration"),o=e("FSEventDispatcher"),a=e("../../../library/view/loggedComponent"),s=e("jamtracker"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/download/button"};t.prototype.events=function(){return{"click .js-overlay-download":"onClickDownload"}};t.prototype.onClickDownload=function(e){var r=this;if(!this.isActive){this.activateComponent();var a={dialogType:"download"};this.isLogged(a).then(function(){var e=r.options.userData.session.get("me")||{musicEncodage:i.default.client.user.preference.defaultMusicEncodage},a=e.musicEncodage,l="";l="ogg"===a?"ogg":"mp3";-1===o.default.Mediator.triggerResult(t.DownloadEvents.DownloadFile,r.model,l,r.options.userData).indexOf(!0)&&(location=r.model.get("download")[l]);var u=new s.Social.DownloadTracker,c=r.model.get("stats")||{};u.send({from:c.from,fromId:c.fromId,entity:r.model.get("type"),entityId:r.model.get("id").toString(),uri:""+r.options.userData.location.pathname+r.options.userData.location.search,custom:{format:l,variant:c.variant,selector:c.selector}});var d=$("#skeleton-overlay").find(">").data().viewInstance.getTemplateId(),p=d.indexOf("-V-")>-1?d.split("-").pop():"";n.trigger("STATS:DOWNLOAD:CLICK",{id:r.model.get("id"),name:r.model.get("name"),type:r.model.get("type"),context:r.model.get("context"),abTesting:p});r.trigger(t.DownloadEvents.DownloadFile)})}};t.DownloadEvents={DownloadFile:"downloadfile"};return t}(a.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/download/download",["require","exports","underscore","ribsjs","../../../library/view/overlays","../../components/download/button","../../../managers/manager"],e)}(function(e,t){"use strict";
23Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../library/view/overlays"),a=e("../../components/download/button"),s=e("../../../managers/manager"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/download/download"+(this.options.abTestingVariation?"-V-"+this.options.abTestingVariation.toUpperCase():"")};t.prototype.render=function(){var r=this,n=this.options.userData;return e.prototype.render.call(this).then(function(){var e=r.model.getModelProjection();e.set({stats:Object.assign({variant:r.options.abTestingVariation?"-V-"+r.options.abTestingVariation.toUpperCase():""},r.model.get("stats")||{})},{silent:!0});var o=new a.default({model:e,userData:n,closeModelOnClose:!1});r.addView(".js-download-button",o);o.on(a.default.DownloadEvents.DownloadFile,function(){r.tryUpdateTargetModelTracks().then(function(){i.trigger(t.Events.Download,{id:r.model.get("id"),type:r.model.get("type")});r.close()})});return r})};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-click-license":"onClickLicense"})};t.prototype.onClickLicense=function(e){this.close()};t.prototype.tryUpdateTargetModelTracks=function(){var e=this;return new Promise(function(t,r){e.loadTargetModel().then(function(r){var n=r.model,i=r.manager;n.get("stats").downloadedAll+=1;i.update(n,n.attributes,{userData:e.options.userData,success:function(){n.close();t()}})}).catch(t)})};t.prototype.loadTargetModel=function(){var e=this;return new Promise(function(t,r){var n;switch(e.model.get("type")){case"track":n=s.TracksManager;break;case"album":n=s.AlbumsManager;break;case"playlist":n=s.PlaylistsManager;break;default:r();return}n.get(e.model.get("id"),{fetchById:!0,userData:e.options.userData}).then(function(e){var r=e[0];return t({model:r,manager:n})}).catch(r)})};t.Events={Download:"download"};return t}(o.default);t.DownloadOverlayView=l;t.default=l});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/configuration/cssBreakpointsDefinitions",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={Album:{upTo:{768:2,1334:4},max:6},AlbumInCol:{upTo:{768:2,1646:4},max:6},Artist:{upTo:{768:2,1334:4},max:6},ArtistInCol:{upTo:{768:2,1646:4},max:6},Single:{upTo:{768:2,1334:4},max:6},Playlist:{upTo:{768:2,1334:4,1646:6},max:8},PlaylistInCol:{upTo:{768:2,1646:4},max:6},PlaylistRow:{max:5},Community:{upTo:{768:2,1334:4},max:6},CommunityNoPicture:{max:10},SearchBestResult:{max:1},Review:{max:5},ReviewAnswers:{max:2},Track:{max:5},FeaturedTrack:{upTo:{768:-1},max:1},DisplayReview:{upTo:{992:-1},max:1},DesktopDesign:{upTo:{1334:-1},max:1},InfiniteTrack:{max:20},Post:{upTo:{768:1,992:2,1646:3},max:4},Radio:{upTo:{768:2,1334:4},max:6},RadiosHome:{upTo:{768:4,992:6},max:6},Chart:{upTo:{768:2,1334:4},max:6},ChartWide:{upTo:{768:2,1334:4},max:6},Waveform:{upTo:{768:{waveMarginInPixel:32,waveHeightInPixel:48,peakWidthInPixel:1,spaceWidthInPixel:1,peaksNumber:120},992:{waveMarginInPixel:96,waveHeightInPixel:72,peakWidthInPixel:2,spaceWidthInPixel:1,peaksNumber:120},1334:{waveMarginInPixel:96,waveHeightInPixel:48,peakWidthInPixel:2,spaceWidthInPixel:1,peaksNumber:120}},max:{waveMarginInPixel:96,waveHeightInPixel:72,peakWidthInPixel:2,spaceWidthInPixel:1,peaksNumber:120}},Tag:{max:20},Notifications:{max:100},HotSelections:{upTo:{768:8,992:12},max:12},TheBestOfTheBest:{upTo:{768:1,992:2,1646:3},max:4},Search:{max:100}};t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/display",["require","exports","chrisweb-utilities","../../configuration/cssBreakpointsDefinitions","jquery"],e)}(function(e,t){"use strict";
23Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("chrisweb-utilities"),i=e("../../configuration/cssBreakpointsDefinitions"),o=e("jquery");!function(e){!function(e){!function(e){function t(e,t){void 0===t&&(t=!0);var r=0;if(t&&n.default.isClient()){var a=o(window).width();if(void 0!==i.default[e].upTo){var s=i.default[e].upTo;for(var l in s)if(a<parseInt(l)){r=s[l];break}}}0===r&&(r=i.default[e].max);return r}function r(){var e=i.default.Waveform.max;if(n.default.isClient()){var t=o(window).width(),r=i.default.Waveform.upTo;for(var a in r)t<parseInt(a)&&(e=r[a]);var s=(t-e.waveMarginInPixel)/(e.peakWidthInPixel+e.spaceWidthInPixel);e.peaksNumber=s}return e}e.EntityType={Album:"Album",AlbumInCol:"AlbumInCol",Track:"Track",Playlist:"Playlist",PlaylistInCol:"PlaylistInCol",Artist:"Artist",ArtistInCol:"ArtistInCol",Single:"Single",Post:"Post",Radio:"Radio",RadiosHome:"RadiosHome",ReviewAnswers:"ReviewAnswers",Community:"Community",CommunityNoPicture:"CommunityNoPicture",Chart:"Chart",ChartWide:"ChartWide",SearchBestResult:"SearchBestResult",Tag:"Tag",HotSelections:"HotSelections",TheBestOfTheBest:"TheBestOfTheBest",Search:"Search"};e.getMaxEntitiesCount=t;e.getWaveformDimension=r}(e.Display||(e.Display={}))}(e.Utilities||(e.Utilities={}))}(r||(r={}));t.default=r.Utilities.Display});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/scroll",["require","exports","ribsjs","./scrollable","../../library/model/model","FSPromise","chrisweb-utilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("./scrollable"),i=e("../../library/model/model"),o=e("FSPromise"),a=o.FSPromise,s=e("chrisweb-utilities"),l=function(e){function t(t){var r=e.call(this,t)||this;r.allowLoadingMoreEntities=!0;r.fetchingMore=!1;return r}__extends(t,e);t.prototype.onRender=function(){e.prototype.onRender.call(this);s.default.isClient()&&this.checkIfNeedMoreEntites()&&this.onNeedMoreEntities()};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.model||(this.model=new i.default({}));this.collection||(void 0!==this.comparator?this.collection=new r.Collection([],{comparator:this.comparator}):this.collection=new r.Collection)};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.getMoreRow=this.options.callback;this.on(n.default.Events.REACH_HALF,this.onNeedMoreEntities,this);this.listenTo(this.model,"change",this.onAttributeChange)};t.prototype.onAttributeChange=function(){var e=this.model.changedAttributes();this.options.idList in e&&this.onIdListChange()};t.prototype.onIdListChange=function(){var e=this,t=this.model.get(this.options.idList);if(t&&t.length>0&&!this.fetchingMore){this.fetchingMore=!0;this.getMoreRow(t.slice(0,this.sliceEnd)).then(function(t){e.fetchingMore=!1;e.isClose||e.collection.set(t)})}};t.prototype.notifyIsActiveSwipeView=function(){this.allowLoadingMoreEntities=!0};t.prototype.notifyIsInactiveSwipeView=function(){this.allowLoadingMoreEntities=!1};t.prototype.onNeedMoreEntities=function(){var e=this;if(this.allowLoadingMoreEntities){var t=this.model.get(this.options.idList);if(t&&this.collection&&this.collection.length<=t.length&&!this.fetchingMore){this.fetchingMore=!0;var r=t.slice(this.collection.length,this.sliceEnd);this.getMoreRow(r).then(function(t){if(!e.isClose){
24var r=e.collection.length;e.collection.add(t);e.collection.length>r?a.all([e.updatePromise]).then(function(){e.fetchingMore=!1;e.checkIfNeedMoreEntites()&&e.onNeedMoreEntities()}):e.fetchingMore=!1}})}}};Object.defineProperty(t.prototype,"sliceEnd",{get:function(){return Math.min(this.collection.length+this.options.entitiesPerRequest,this.model.get(this.options.idList).length)},enumerable:!0,configurable:!0});t.prototype.close=function(){this.off(n.default.Events.REACH_HALF,this.onNeedMoreEntities,this);this.stopListening(this.model,"change",this.onAttributeChange);e.prototype.close.call(this)};return t}(n.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/overlaysScroll",["require","exports","underscore","./scroll","chrisweb-utilities","../../views/layout"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./scroll"),i=e("chrisweb-utilities"),o=e("../../views/layout"),a=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-overlay-close":"onClickClose",keydown:"onEscape"})};t.prototype.onClickClose=function(e){this.close()};t.prototype.onEscape=function(e){27===e.keyCode&&this.onClickClose(e)};t.prototype.checkIfNeedMoreEntites=function(){var e=document.getElementById("skeleton-overlay"),t=i.default.isClient();return!this.isClose&&t&&$(document).scrollTop()+window.innerHeight+1300>=e.scrollHeight};t.prototype.close=function(){e.prototype.close.call(this);o.default.getInstance().maybeHideOverlay()};return t}(n.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/playlists/rowItem",["require","exports","underscore","../../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/view"),i=function(e){function t(t){var n=e.call(this,t)||this;r.defaults(n.options.templateVariables,{isCol:!1});return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/playlists/rowItem"};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{click:"onClickPlaylistRow"})};t.prototype.onClickPlaylistRow=function(){this.model.trigger("playlistRowClick",{playlistId:this.model.get("id")})};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/playlist/add",["require","exports","underscore","../../../managers/manager","ribsjs","../../messages/item","../../../library/dialog/toast","../../../library/model/model","FSPromise","../../../configuration/configuration","../../../library/utilities/display","../../../library/view/overlaysScroll","../../partials/playlists/rowItem","../../layout"],e)}(function(e,t){"use strict";
24Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../managers/manager"),i=e("ribsjs"),o=i.EventsManager,a=e("../../messages/item"),s=e("../../../library/dialog/toast"),l=e("../../../library/model/model"),u=e("FSPromise"),c=u.FSPromise,d=e("../../../configuration/configuration"),p=e("../../../library/utilities/display"),f=e("../../../library/view/overlaysScroll"),h=e("../../partials/playlists/rowItem"),m=e("../../layout"),y=function(e){function t(t){var n=e.call(this,r.extend({ModelView:h.default,listSelector:".js-list",ModelViewOptions:{reRenderOnChange:!0},idList:"myPlaylists",entitiesPerRequest:p.default.getMaxEntitiesCount("PlaylistRow",!1)},t))||this;n.comparator=function(e){return-e.get("dateCreated")};return n}__extends(t,e);t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRows.bind(this);this.myPlaylistsCollection=new i.Collection([],{comparator:this.comparator});this.myPlaylistsCollection.on("playlistRowClick",this.onPlaylistRowClick,this);this.model.set({myPlaylists:this.myPlaylistsCollection},{silent:!0})};t.prototype.getTemplateId=function(){return"/overlays/playlist/add"};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-addPlaylistOverlay-createPlaylist":"onClickCreatePlaylist"})};t.prototype.render=function(){var t=this,i=this.model.get("id"),o=2*this.options.entitiesPerRequest,a={},s={userId:this.options.userData.session.get("me").id,limit:o,order:"dateCreated_desc"};return n.PlaylistsManager.getByAttribute(a,{dataParameters:s,userData:this.options.userData}).then(function(n){n.forEach(function(e){var n=e.get("tracks"),o=r.findWhere(n,{id:i});e.set({alreadyInPlaylist:void 0!==o},{silent:!0});t.myPlaylistsCollection.add(e)});t.collection.set(t.myPlaylistsCollection.slice(0,t.options.entitiesPerRequest));return e.prototype.render.call(t)})};t.prototype.onGetMoreRows=function(e){var t=this;if(this.collection.length+e.length>=this.myPlaylistsCollection.length){var i=this.model.get("id"),o=this.myPlaylistsCollection.length,a=this.options.entitiesPerRequest,s={},l={userId:this.options.userData.session.get("me").id,limit:a,offset:o,order:"dateCreated_desc"};return n.PlaylistsManager.getByAttribute(s,{dataParameters:l,userData:this.options.userData}).then(function(n){n.forEach(function(e){var n=e.get("tracks");void 0!==r.findWhere(n,{id:i})?e.set({alreadyInPlaylist:!0},{silent:!0}):e.set({alreadyInPlaylist:!1},{silent:!0});t.myPlaylistsCollection.add(e)});return e})}return c.resolve(e)};t.prototype.onClickCreatePlaylist=function(e){var t=this,r=this.$el.find("input[name=js-addPlaylistOverlay-createPlaylistName]").val();if(!r||0===r.length)return!0;var i=this.$el.find("input[name=js-addPlaylistOverlay-createPlaylistStatus]:checked").val();i||(i="on");e.preventDefault();var o="public";"off"===i&&(o="masked");var a=[];if("track"===this.model.get("type")){var s=this.model.get("id");a.push(s);this.saveNewPlaylist(a,r,o,this.model)}else if("album"===this.model.get("type")){var l=this.model.get("id");n.AlbumsManager.get(l,{userData:this.options.userData}).then(function(e){for(var n=e[0],i=n.get("tracks"),s=0;s<i.length;s++){var l=i[s].id;a.push(l)}t.model.set({name:n.get("name")},{silent:!0});if(a.length<d.default.application.playlist.maxTracksPerPlaylist)t.saveNewPlaylist(a,r,o,t.model);else{t.showErrorMessage("_TKEY_WWW_PLAYLIST_error-max-tracks");t.close()}n.close()}).catch(function(e){t.showErrorMessage("_TKEY_WWW_PLAYLIST_error-unknown-server-error")})}};t.prototype.saveNewPlaylist=function(e,t,r,i){for(var a=this,l=[],u=0;u<e.length;u++)l.push({id:e[u],position:0,dateUpdated:0,dateAdded:0});var c={name:t,status:r,tracks:l};n.PlaylistsManager.addSafe(c,{userData:this.options.userData}).then(function(e){e.set({alreadyInPlaylist:!0},{silent:!0});a.myPlaylistsCollection.add(e);o.trigger("STATS:PLAYLIST:CREATE",{id:e.get("id"),name:e.get("name")});o.trigger("STATS:PLAYLIST:ADD",{id:e.get("id"),name:e.get("name"),entityToAddId:i.get("id"),entityToAddName:i.get("name"),entityToAddType:i.get("type"),context:a.model.get("context")});n.LocalizationManager.get("_TKEY_WWW_PLAYLIST_success-playlist-creation",{userData:a.options.userData}).then(function(e){s.show(e[0].get("translate"));e[0].close();a.close()})}).catch(function(e){a.$el.find(".js-addPlaylistOverlay-createPlaylistName").val("");a.$el.find(".js-statusPublic").prop("checked",!0);a.close();a.showErrorMessage("_TKEY_WWW_PLAYLIST_error-unknown-server-error")})};t.prototype.onPlaylistRowClick=function(e){var t=this,r=[];if("track"===this.model.get("type")){var i=this.model.get("id");r.push(i);this.updatePlaylist(e,r,this.model)}else if("album"===this.model.get("type")){var o=this.model.get("id");n.AlbumsManager.get(o,{userData:this.options.userData}).then(function(n){for(var i=n[0],o=i.get("tracks"),a=0;a<o.length;a++){var s=o[a].id;r.push(s)}t.model.set({name:i.get("name")},{silent:!0});t.updatePlaylist(e,r,t.model);i.close()}).catch(function(e){console.error(e);t.showErrorMessage("_TKEY_WWW_PLAYLIST_error-unknown-server-error")})}};t.prototype.updatePlaylist=function(e,t,r){var i=this,a=this.myPlaylistsCollection.get(e.playlistId),l=a.get("tracks");if(l.length>d.default.application.playlist.maxTracksPerPlaylist-t.length){this.showErrorMessage("_TKEY_WWW_PLAYLIST_error-max-tracks");this.close()}else{t.forEach(function(e){l.push({id:e,position:0,dateUpdated:0,dateAdded:0})});var u={id:e.playlistId,tracks:l};n.PlaylistsManager.update(u,{userData:this.options.userData}).then(function(e){var a=t.length>1?"_TKEY_WWW_PLAYLIST_success-songs-added":"_TKEY_WWW_PLAYLIST_success-song-ad
24ded";o.trigger("STATS:PLAYLIST:ADD",{id:e.get("id"),name:e.get("name"),entityToAddId:r.get("id"),entityToAddName:r.get("name"),entityToAddType:r.get("type"),context:i.model.get("context")});n.LocalizationManager.get(a,{userData:i.options.userData}).then(function(e){s.show(e[0].get("translate"));e[0].close();i.close()})}).catch(function(e){i.close();i.showErrorMessage("_TKEY_WWW_PLAYLIST_error-unknown-server-error")})}};t.prototype.showErrorMessage=function(e,t){void 0===t&&(t=a.default.Status.Danger);m.default.getInstance().addMessage(new a.default({model:new l.default({message:e,status:t})}))};t.prototype.close=function(){this.myPlaylistsCollection.off("playlistRowClick",this.onPlaylistRowClick,this);this.myPlaylistsCollection.close();e.prototype.close.call(this)};return t}(f.default);t.default=y});!function(e,t,r,n){"use strict";function i(e,t,r){return setTimeout(u(e,r),t)}function o(e,t,r){if(Array.isArray(e)){a(e,r[t],r);return!0}return!1}function a(e,t,r){var i;if(e)if(e.forEach)e.forEach(t,r);else if(e.length!==n){i=0;for(;i<e.length;){t.call(r,e[i],i,e);i++}}else for(i in e)e.hasOwnProperty(i)&&t.call(r,e[i],i,e)}function s(t,r,n){var i="DEPRECATED METHOD: "+r+"\n"+n+" AT \n";return function(){var r=new Error("get-stack-trace"),n=r&&r.stack?r.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);o&&o.call(e.console,i,n);return t.apply(this,arguments)}}function l(e,t,r){var n,i=t.prototype;n=e.prototype=Object.create(i);n.constructor=e;n._super=i;r&&ce(n,r)}function u(e,t){return function(){return e.apply(t,arguments)}}function c(e,t){return typeof e==fe?e.apply(t?t[0]||n:n,t):e}function d(e,t){return e===n?t:e}function p(e,t,r){a(y(t),function(t){e.addEventListener(t,r,!1)})}function f(e,t,r){a(y(t),function(t){e.removeEventListener(t,r,!1)})}function h(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function y(e){return e.trim().split(/\s+/g)}function g(e,t,r){if(e.indexOf&&!r)return e.indexOf(t);for(var n=0;n<e.length;){if(r&&e[n][r]==t||!r&&e[n]===t)return n;n++}return-1}function v(e){return Array.prototype.slice.call(e,0)}function _(e,t,r){for(var n=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];g(i,a)<0&&n.push(e[o]);i[o]=a;o++}r&&(n=t?n.sort(function(e,r){return e[t]>r[t]}):n.sort());return n}function b(e,t){for(var r,i,o=t[0].toUpperCase()+t.slice(1),a=0;a<de.length;){r=de[a];i=r?r+o:t;if(i in e)return i;a++}return n}function w(){return _e++}function x(t){var r=t.ownerDocument||t;return r.defaultView||r.parentWindow||e}function M(e,t){var r=this;this.manager=e;this.callback=t;this.element=e.element;this.target=e.options.inputTarget;this.domHandler=function(t){c(e.options.enable,[e])&&r.handler(t)};this.init()}function S(e){var t,r=e.options.inputClass;t=r||(xe?N:Me?U:we?H:Y);return new t(e,k)}function k(e,t,r){var n=r.pointers.length,i=r.changedPointers.length,o=t&ke&&n-i==0,a=t&(Ae|Ee)&&n-i==0;r.isFirst=!!o;r.isFinal=!!a;o&&(e.session={});r.eventType=t;T(e,r);e.emit("hammer.input",r);e.recognize(r);e.session.prevInput=r}function T(e,t){var r=e.session,n=t.pointers,i=n.length;r.firstInput||(r.firstInput=P(t));i>1&&!r.firstMultiple?r.firstMultiple=P(t):1===i&&(r.firstMultiple=!1);var o=r.firstInput,a=r.firstMultiple,s=a?a.center:o.center,l=t.center=O(n);t.timeStamp=ye();t.deltaTime=t.timeStamp-o.timeStamp;t.angle=L(s,l);t.distance=C(s,l);A(r,t);t.offsetDirection=D(t.deltaX,t.deltaY);var u=j(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x;t.overallVelocityY=u.y;t.overallVelocity=me(u.x)>me(u.y)?u.x:u.y;t.scale=a?R(a.pointers,n):1;t.rotation=a?I(a.pointers,n):0;t.maxPointers=r.prevInput?t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers:t.pointers.length;E(r,t);var c=e.element;h(t.srcEvent.target,c)&&(c=t.srcEvent.target);t.target=c}function A(e,t){var r=t.center,n=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};if(t.eventType===ke||o.eventType===Ae){i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0};n=e.offsetDelta={x:r.x,y:r.y}}t.deltaX=i.x+(r.x-n.x);t.deltaY=i.y+(r.y-n.y)}function E(e,t){var r,i,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=Ee&&(l>Se||s.velocity===n)){var u=t.deltaX-s.deltaX,c=t.deltaY-s.deltaY,d=j(l,u,c);i=d.x;o=d.y;r=me(d.x)>me(d.y)?d.x:d.y;a=D(u,c);e.lastInterval=t}else{r=s.velocity;i=s.velocityX;o=s.velocityY;a=s.direction}t.velocity=r;t.velocityX=i;t.velocityY=o;t.direction=a}function P(e){for(var t=[],r=0;r<e.pointers.length;){t[r]={clientX:he(e.pointers[r].clientX),clientY:he(e.pointers[r].clientY)};r++}return{timeStamp:ye(),pointers:t,center:O(t),deltaX:e.deltaX,deltaY:e.deltaY}}function O(e){var t=e.length;if(1===t)return{x:he(e[0].clientX),y:he(e[0].clientY)};for(var r=0,n=0,i=0;i<t;){r+=e[i].clientX;n+=e[i].clientY;i++}return{x:he(r/t),y:he(n/t)}}function j(e,t,r){return{x:t/e||0,y:r/e||0}}function D(e,t){return e===t?Pe:me(e)>
24=me(t)?e<0?Oe:je:t<0?De:Ce}function C(e,t,r){r||(r=Ye);var n=t[r[0]]-e[r[0]],i=t[r[1]]-e[r[1]];return Math.sqrt(n*n+i*i)}function L(e,t,r){r||(r=Ye);var n=t[r[0]]-e[r[0]],i=t[r[1]]-e[r[1]];return 180*Math.atan2(i,n)/Math.PI}function I(e,t){return L(t[1],t[0],Ne)+L(e[1],e[0],Ne)}function R(e,t){return C(t[0],t[1],Ne)/C(e[0],e[1],Ne)}function Y(){this.evEl=We;this.evWin=Ue;this.pressed=!1;M.apply(this,arguments)}function N(){this.evEl=Ve;this.evWin=Be;M.apply(this,arguments);this.store=this.manager.session.pointerEvents=[]}function F(){this.evTarget=Ke;this.evWin=$e;this.started=!1;M.apply(this,arguments)}function W(e,t){var r=v(e.touches),n=v(e.changedTouches);t&(Ae|Ee)&&(r=_(r.concat(n),"identifier",!0));return[r,n]}function U(){this.evTarget=Je;this.targetIds={};M.apply(this,arguments)}function q(e,t){var r=v(e.touches),n=this.targetIds;if(t&(ke|Te)&&1===r.length){n[r[0].identifier]=!0;return[r,r]}var i,o,a=v(e.changedTouches),s=[],l=this.target;o=r.filter(function(e){return h(e.target,l)});if(t===ke){i=0;for(;i<o.length;){n[o[i].identifier]=!0;i++}}i=0;for(;i<a.length;){n[a[i].identifier]&&s.push(a[i]);t&(Ae|Ee)&&delete n[a[i].identifier];i++}if(s.length)return[_(o.concat(s),"identifier",!0),s]}function H(){M.apply(this,arguments);var e=u(this.handler,this);this.touch=new U(this.manager,e);this.mouse=new Y(this.manager,e);this.primaryTouch=null;this.lastTouches=[]}function V(e,t){if(e&ke){this.primaryTouch=t.changedPointers[0].identifier;B.call(this,t)}else e&(Ae|Ee)&&B.call(this,t)}function B(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY};this.lastTouches.push(r);var n=this.lastTouches,i=function(){var e=n.indexOf(r);e>-1&&n.splice(e,1)};setTimeout(i,Qe)}}function z(e){for(var t=e.srcEvent.clientX,r=e.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var i=this.lastTouches[n],o=Math.abs(t-i.x),a=Math.abs(r-i.y);if(o<=Xe&&a<=Xe)return!0}return!1}function K(e,t){this.manager=e;this.set(t)}function $(e){if(m(e,nt))return nt;var t=m(e,it),r=m(e,ot);return t&&r?nt:t||r?t?it:ot:m(e,rt)?rt:tt}function G(e){this.options=ce({},this.defaults,e||{});this.id=w();this.manager=null;this.options.enable=d(this.options.enable,!0);this.state=st;this.simultaneous={};this.requireFail=[]}function J(e){return e&pt?"cancel":e&ct?"end":e&ut?"move":e&lt?"start":""}function Q(e){return e==Ce?"down":e==De?"up":e==Oe?"left":e==je?"right":""}function X(e,t){var r=t.manager;return r?r.get(e):e}function Z(){G.apply(this,arguments)}function ee(){Z.apply(this,arguments);this.pX=null;this.pY=null}function te(){Z.apply(this,arguments)}function re(){G.apply(this,arguments);this._timer=null;this._input=null}function ne(){Z.apply(this,arguments)}function ie(){Z.apply(this,arguments)}function oe(){G.apply(this,arguments);this.pTime=!1;this.pCenter=!1;this._timer=null;this._input=null;this.count=0}function ae(e,t){t=t||{};t.recognizers=d(t.recognizers,ae.defaults.preset);return new se(e,t)}function se(e,t){this.options=ce({},ae.defaults,t||{});this.options.inputTarget=this.options.inputTarget||e;this.handlers={};this.session={};this.recognizers=[];this.oldCssProps={};this.element=e;this.input=S(this);this.touchAction=new K(this,this.options.touchAction);le(this,!0);a(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]);e[3]&&t.requireFailure(e[3])},this)}function le(e,t){var r=e.element;if(r.style){var n;a(e.options.cssProps,function(i,o){n=b(r.style,o);if(t){e.oldCssProps[n]=r.style[n];r.style[n]=i}else r.style[n]=e.oldCssProps[n]||""});t||(e.oldCssProps={})}}function ue(e,r){var n=t.createEvent("Event");n.initEvent(e,!0,!0);n.gesture=r;r.target.dispatchEvent(n)}var ce,de=["","webkit","Moz","MS","ms","o"],pe=t.createElement("div"),fe="function",he=Math.round,me=Math.abs,ye=Date.now;ce="function"!=typeof Object.assign?function(e){if(e===n||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(i!==n&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var ge=s(function(e,t,r){for(var i=Object.keys(t),o=0;o<i.length;){(!r||r&&e[i[o]]===n)&&(e[i[o]]=t[i[o]]);o++}return e},"extend","Use `assign`."),ve=s(function(e,t){return ge(e,t,!0)},"merge","Use `assign`."),_e=1,be=/mobile|tablet|ip(ad|hone|od)|android/i,we="ontouchstart"in e,xe=b(e,"PointerEvent")!==n,Me=we&&be.test(navigator.userAgent),Se=25,ke=1,Te=2,Ae=4,Ee=8,Pe=1,Oe=2,je=4,De=8,Ce=16,Le=Oe|je,Ie
24=De|Ce,Re=Le|Ie,Ye=["x","y"],Ne=["clientX","clientY"];M.prototype={handler:function(){},init:function(){this.evEl&&p(this.element,this.evEl,this.domHandler);this.evTarget&&p(this.target,this.evTarget,this.domHandler);this.evWin&&p(x(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&f(this.element,this.evEl,this.domHandler);this.evTarget&&f(this.target,this.evTarget,this.domHandler);this.evWin&&f(x(this.element),this.evWin,this.domHandler)}};var Fe={mousedown:ke,mousemove:Te,mouseup:Ae},We="mousedown",Ue="mousemove mouseup";l(Y,M,{handler:function(e){var t=Fe[e.type];t&ke&&0===e.button&&(this.pressed=!0);t&Te&&1!==e.which&&(t=Ae);if(this.pressed){t&Ae&&(this.pressed=!1);this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e})}}});var qe={pointerdown:ke,pointermove:Te,pointerup:Ae,pointercancel:Ee,pointerout:Ee},He={2:"touch",3:"pen",4:"mouse",5:"kinect"},Ve="pointerdown",Be="pointermove pointerup pointercancel";if(e.MSPointerEvent&&!e.PointerEvent){Ve="MSPointerDown";Be="MSPointerMove MSPointerUp MSPointerCancel"}l(N,M,{handler:function(e){var t=this.store,r=!1,n=e.type.toLowerCase().replace("ms",""),i=qe[n],o=He[e.pointerType]||e.pointerType,a="touch"==o,s=g(t,e.pointerId,"pointerId");
24if(i&ke&&(0===e.button||a)){if(s<0){t.push(e);s=t.length-1}}else i&(Ae|Ee)&&(r=!0);if(!(s<0)){t[s]=e;this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e});r&&t.splice(s,1)}}});var ze={touchstart:ke,touchmove:Te,touchend:Ae,touchcancel:Ee},Ke="touchstart",$e="touchstart touchmove touchend touchcancel";l(F,M,{handler:function(e){var t=ze[e.type];t===ke&&(this.started=!0);if(this.started){var r=W.call(this,e,t);t&(Ae|Ee)&&r[0].length-r[1].length==0&&(this.started=!1);this.callback(this.manager,t,{pointers:r[0],changedPointers:r[1],pointerType:"touch",srcEvent:e})}}});var Ge={touchstart:ke,touchmove:Te,touchend:Ae,touchcancel:Ee},Je="touchstart touchmove touchend touchcancel";l(U,M,{handler:function(e){var t=Ge[e.type],r=q.call(this,e,t);r&&this.callback(this.manager,t,{pointers:r[0],changedPointers:r[1],pointerType:"touch",srcEvent:e})}});var Qe=2500,Xe=25;l(H,M,{handler:function(e,t,r){var n="touch"==r.pointerType,i="mouse"==r.pointerType;if(!(i&&r.sourceCapabilities&&r.sourceCapabilities.firesTouchEvents)){if(n)V.call(this,t,r);else if(i&&z.call(this,r))return;this.callback(e,t,r)}},destroy:function(){this.touch.destroy();this.mouse.destroy()}});var Ze=b(pe.style,"touchAction"),et=Ze!==n,tt="auto",rt="manipulation",nt="none",it="pan-x",ot="pan-y",at=function(){if(!et)return!1;var t={},r=e.CSS&&e.CSS.supports;["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!r||e.CSS.supports("touch-action",n)});return t}();K.prototype={set:function(e){"compute"==e&&(e=this.compute());et&&this.manager.element.style&&at[e]&&(this.manager.element.style[Ze]=e);this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];a(this.manager.recognizers,function(t){c(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))});return $(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,r=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var n=this.actions,i=m(n,nt)&&!at[nt],o=m(n,ot)&&!at[ot],a=m(n,it)&&!at[it];if(i){var s=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(s&&l&&u)return}if(!a||!o)return i||o&&r&Le||a&&r&Ie?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0;e.preventDefault()}};var st=1,lt=2,ut=4,ct=8,dt=ct,pt=16;G.prototype={defaults:{},set:function(e){ce(this.options,e);this.manager&&this.manager.touchAction.update();return this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;e=X(e,this);if(!t[e.id]){t[e.id]=e;e.recognizeWith(this)}return this},dropRecognizeWith:function(e){if(o(e,"dropRecognizeWith",this))return this;e=X(e,this);delete this.simultaneous[e.id];return this},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;e=X(e,this);if(-1===g(t,e)){t.push(e);e.requireFailure(this)}return this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=X(e,this);var t=g(this.requireFail,e);t>-1&&this.requireFail.splice(t,1);return this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){r.manager.emit(t,e)}var r=this,n=this.state;n<ct&&t(r.options.event+J(n));t(r.options.event);e.additionalEvent&&t(e.additionalEvent);n>=ct&&t(r.options.event+J(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(32|st)))return!1;e++}return!0},recognize:function(e){var t=ce({},e);if(c(this.options.enable,[this,t])){this.state&(dt|pt|32)&&(this.state=st);this.state=this.process(t);this.state&(lt|ut|ct|pt)&&this.tryEmit(t)}else{this.reset();this.state=32}},process:function(e){},getTouchAction:function(){},reset:function(){}};l(Z,G,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,r=e.eventType,n=t&(lt|ut),i=this.attrTest(e);return n&&(r&Ee||!i)?t|pt:n||i?r&Ae?t|ct:t&lt?t|ut:lt:32}});l(ee,Z,{defaults:{event:"pan",threshold:10,pointers:1,direction:Re},getTouchAction:function(){var e=this.options.direction,t=[];e&Le&&t.push(ot);e&Ie&&t.push(it);return t},directionTest:function(e){var t=this.options,r=!0,n=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;if(!(i&t.direction))if(t.direction&Le){i=0===o?Pe:o<0?Oe:je;r=o!=this.pX;n=Math.abs(e.deltaX)}else{i=0===a?Pe:a<0?De:Ce;r=a!=this.pY;n=Math.abs(e.deltaY)}e.direction=i;return r&&n>t.threshold&&i&t.direction},attrTest:function(e){return Z.prototype.attrTest.call(this,e)&&(this.state&lt||!(this.state&lt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX;this.pY=e.deltaY;var t=Q(e.direction);t&&(e.additionalEvent=this.options.event+t);this._super.emit.call(this,e)}});l(te,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[nt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&lt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}});l(re,G,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[tt]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,n=e.distance<t.threshold,o=e.deltaTime>t.time;this._input=e;if(!n||!r||e.eventType&(Ae|Ee)&&!o)this.reset();else if(e.eventType&ke){this.reset();this._timer=i(function(){this.state=dt;this.tryEmit()},t.time,this)}else if(e.eventType&Ae)return dt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){if(this.state===dt)if(e&&e.eventType&Ae)this.manager.emit(this.options.event+"up",e);else{this._input.timeStamp=ye();this.manager.emit(this.options.event,this._input)}}});l(ne,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[nt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&lt)}});l(ie,Z,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Le|Ie,pointers:1},getTouchAction:function(){return ee.prototype.getTouchAction.call(this)},attrTest:function(e){var t,r=this.options.direction;r&(Le|Ie)?t=e.overallVelocity:r&Le?t=e.overallVelocityX:r&Ie&&(t=e.overallVelocityY);return this._super.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&me(t)>this.options.velocity&&e.eventType&Ae},emit:function(e){var t=Q(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e);this.manager.emit(this.options.event,e)}});l(oe,G,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[rt]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,n=e.distance<t.threshold,o=e.deltaTime<t.time;this.reset();if(e.eventType&ke&&0===this.count)return this.failTimeout();if(n&&o&&r){if(e.eventType!=Ae)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||C(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp;this.pCenter=e.center;s&&a?this.count+=1:this.count=1;this._input=e;if(0===this.count%t.taps){if(this.hasRequireFailures()){this._timer=i(function(){this.state=dt;this.tryEmit()},t.interval,this);return lt}return dt}}return 32},failTimeout:function(){this._timer=i(function(){this.state=32},this.options.interval,this);return 32},reset:function(){clearTimeout(this._timer)},emit:function(){if(this.state==dt){this._input.tapCount=this.count;this.manager.emit(this.options.event,this._input)}}});ae.VERSION="2.0.7";ae.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[ne,{enable:!1}],[te,{enable:!1},["rotate"]],[ie,{direction:Le}],[ee,{direction:Le},["swipe"]],[oe],[oe,{event:"doubletap",taps:2},["tap"]],[re]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};se.prototype={set:function(e){ce(this.options,e);e.touchAction&&this.touchAction.update();if(e.inputTarget){this.input.destroy();this.input.target=e.inputTarget;this.input.init()}return this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var r,n=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&dt)&&(i=t.curRecognizer=null);for(var o=0;o<n.length;){r=n[o];
242===t.stopped||i&&r!=i&&!r.canRecognizeWith(i)?r.reset():r.recognize(e);!i&&r.state&(lt|ut|ct)&&(i=t.curRecognizer=r);o++}}},get:function(e){if(e instanceof G)return e;for(var t=this.recognizers,r=0;r<t.length;r++)if(t[r].options.event==e)return t[r];return null},add:function(e){if(o(e,"add",this))return this;var t=this.get(e.options.event);t&&this.remove(t);this.recognizers.push(e);e.manager=this;this.touchAction.update();return e},remove:function(e){if(o(e,"remove",this))return this;e=this.get(e);if(e){var t=this.recognizers,r=g(t,e);if(-1!==r){t.splice(r,1);this.touchAction.update()}}return this},on:function(e,t){if(e!==n&&t!==n){var r=this.handlers;a(y(e),function(e){r[e]=r[e]||[];r[e].push(t)});return this}},off:function(e,t){if(e!==n){var r=this.handlers;a(y(e),function(e){t?r[e]&&r[e].splice(g(r[e],t),1):delete r[e]});return this}},emit:function(e,t){this.options.domEvents&&ue(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e;t.preventDefault=function(){t.srcEvent.preventDefault()};for(var n=0;n<r.length;){r[n](t);n++}}},destroy:function(){this.element&&le(this,!1);this.handlers={};this.session={};this.input.destroy();this.element=null}};ce(ae,{INPUT_START:ke,INPUT_MOVE:Te,INPUT_END:Ae,INPUT_CANCEL:Ee,STATE_POSSIBLE:st,STATE_BEGAN:lt,STATE_CHANGED:ut,STATE_ENDED:ct,STATE_RECOGNIZED:dt,STATE_CANCELLED:pt,STATE_FAILED:32,DIRECTION_NONE:Pe,DIRECTION_LEFT:Oe,DIRECTION_RIGHT:je,DIRECTION_UP:De,DIRECTION_DOWN:Ce,DIRECTION_HORIZONTAL:Le,DIRECTION_VERTICAL:Ie,DIRECTION_ALL:Re,Manager:se,Input:M,TouchAction:K,TouchInput:U,MouseInput:Y,PointerEventInput:N,TouchMouseInput:H,SingleTouchInput:F,Recognizer:G,AttrRecognizer:Z,Tap:oe,Pan:ee,Swipe:ie,Pinch:te,Rotate:ne,Press:re,on:p,off:f,each:a,merge:ve,extend:ge,assign:ce,inherit:l,bindFn:u,prefixed:b});(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=ae;"function"==typeof define&&define.amd?define("hammerjs/hammer",[],function(){return ae}):"undefined"!=typeof module&&module.exports?module.exports=ae:e.Hammer=ae}(window,document);define("hammerjs",["hammerjs/hammer"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports)
25;void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/tracks/playlistEdit",["require","exports","../../../library/view/loading","underscore","hammerjs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("underscore"),i=e("hammerjs"),o=function(e){function t(t){return e.call(this,n.extend({},t,{reRenderOnChange:!0,useHammer:!0,hammerOptions:{inputClass:i.TouchMouseInput,recognizers:[[i.Press,{time:80}],[i.Pan,{threshold:10},["press"]]]}}))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/tracks/playlistEdit"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.model.set({toRemove:!1});this.moving=!1};t.prototype.events=function(){return{"click .js-playlist-remove-track":"onClickRemove",press:"onPressTrack",pressup:"onStopPressTrack",panmove:"onMoveTrack",panend:"onEndMoveTrack"}};t.prototype.onClickRemove=function(e){this.model.get("toRemove")?this.model.set({toRemove:!1}):this.model.set({toRemove:!0}).trigger(t.PlaylistTrackEvent.Delete)};t.prototype.onMoveTrack=function(e){if(this.moving){var t,r=$(".js-editPlaylistOverlay-tracksList").children(),n=r.index(this.$el),i=this.$el.outerHeight(),o=Math.min(e.gesture.deltaY+$(".js-edit-playlist-content").scrollTop()-this.scrollPosition,(r.length-n)*i),a=o/i;t=n<r.length&&a>1?Math.min(r.length-1,n+Math.floor(a)):n>0&&a<-1?Math.max(0,n-Math.floor(-a)):n;if(t!==this.lastMove){r.each(function(e,r){if(e!==n){var o=0;n<e&&e<=t&&(o=-i);t<=e&&e<n&&(o=i);$.Velocity.hook(r,"translateY",o+"px")}});this.lastMove=t}$.Velocity.hook(this.$el,"translateY",o+"px")}};t.prototype.onEndMoveTrack=function(e){if(this.moving){var r=void 0,n=$(".js-editPlaylistOverlay-tracksList").children(),i=n.index(this.$el),o=e.gesture.deltaY+$(".js-edit-playlist-content").scrollTop()-this.scrollPosition,a=this.$el.outerHeight(),s=o/a;r=i<n.length&&s>1?Math.min(n.length-1,i+Math.floor(s)):i>0&&s<-1?Math.max(0,i-Math.floor(-s)):i;this.toggleScrollOnMove(!1);this.$el.velocity({translateX:"0"});i!==r?this.model.trigger(t.PlaylistTrackEvent.Move,this.model,i,r):this.$el.velocity({translateY:"0"})}};t.prototype.onPressTrack=function(e){this.toggleScrollOnMove(!0);this.$el.velocity({translateX:"5px"},{duration:0});this.scrollPosition=$(".js-edit-playlist-content").scrollTop()};t.prototype.onStopPressTrack=function(e){this.toggleScrollOnMove(!1);this.$el.velocity({translateX:"0"})};t.prototype.toggleScrollOnMove=function(e){this.moving=e;this.moving?document.ontouchmove=function(e){e.preventDefault()}:document.ontouchmove=function(e){return!0}};t.PlaylistTrackEvent={Move:"playlist:move",Edit:"playlist:edit",Delete:"playlist:delete"};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/playlist/edit",["require","exports","../../../library/view/overlays","underscore","jquery","../../../managers/manager","../../../library/model/model","ribsjs","../../../library/dialog/toast","../../../library/utilities/route","../../messages/item","../../partials/tracks/playlistEdit","../../layout"],e)}(function(e,t){"use strict";
25Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("underscore"),i=e("jquery"),o=e("../../../managers/manager"),a=e("../../../library/model/model"),s=e("ribsjs"),l=s.EventsManager,u=e("../../../library/dialog/toast"),c=e("../../../library/utilities/route"),d=e("../../messages/item"),p=e("../../partials/tracks/playlistEdit"),f=e("../../layout"),h=function(e){function t(r){var i=e.call(this,n.extend({collection:new s.Collection([],{comparator:"position"})},r,t.defaultOptions))||this;i.needSaving=!1;i.cancelString="";return i}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/playlist/edit"};t.prototype.events=function(){return n.extend({"submit #js-editPlaylistOverlay-form":"onClickSubmit"},e.prototype.events.call(this))};t.prototype.onRender=function(){var t=this;this.options.ModelViewOptions.playlistId=this.model.get("id");this.collection.reset();o.PlaylistsManager.get(this.model.get("id"),{userData:this.options.userData}).then(function(e){if(!t.isClose){var r=e[0],n=r.get("tracks").map(function(e){return e.id});t.$el.find("input[name=js-editPlaylistOverlay-name]").val(r.get("name"));"public"===r.get("status")?t.$el.find("input.js-statusPublic").prop("checked",!0):t.$el.find("input.js-statusPrivate").prop("checked",!0);t.$el.find("textarea[name=js-editPlaylistOverlay-description]").val(r.get("description"));o.TracksManager.get(n,{userData:t.options.userData}).then(function(e){if(!t.isClose){var n=0,i=r.get("tracks"),o=new s.Collection(i);e.forEach(function(e){e.on(p.default.PlaylistTrackEvent.Move,t.onMoveTrackRow,t);e.on(p.default.PlaylistTrackEvent.Delete,t.onDeleteTrackRow,t);var r=e.get("id"),i=n++,a=o.where({id:r});e.set({position:i,dateAdded:a[0].get("dateAdded"),dateUpdated:a[0].get("dateUpdated")},{silent:!0});t.collection.add(e)});o.close()}})}});o.LocalizationManager.get("_TKEY_WWW_EDIT_confirm-cancel",{userData:this.options.userData}).then(function(e){t.cancelString=e[0].get("translate");e[0].close()});e.prototype.onRender.call(this)};t.prototype.onClickSubmit=function(e){var t=this;e.preventDefault();var r=this.$el.find("input[name=js-editPlaylistOverlay-name]").val(),n=this.$el.find("input[name=js-editPlaylistOverlay-status]:checked").val(),i=this.$el.find("textarea[name=js-editPlaylistOverlay-description]").val(),s="public";"off"===n&&(s="masked");var p={id:this.model.get("id"),name:r,status:s,description:i,tracks:this.getPlaylistTracks()};o.PlaylistsManager.update(p,{userData:this.options.userData}).then(function(e){t.needSaving=!1;var r=c.default.getUrl("playlist",{id:e.get("id"),name:e.get("name")}),n={trigger:!1,replace:!0};l.trigger("navigate",{url:r,options:n});o.LocalizationManager.get("_TKEY_WWW_PLAYLIST_success-playlist-save",{userData:t.options.userData}).then(function(e){u.show(e[0].get("translate"));l.trigger("playlist:edit",{attributes:p,models:t.collection.toJSON()});e[0].close();t.close()})}).catch(function(e){t.close();f.default.getInstance().addMessage(new d.default({model:new a.default({message:"_TKEY_WWW_PLAYLIST_error-unknown-server-error",status:d.default.Status.Danger})}))})};t.prototype.getPlaylistTracks=function(){var e=[],t=0,r=this.collection.filter(function(e){return e.get("toRemove")});this.collection.remove(r,{silent:!0});this.collection.forEach(function(r){e.push({id:r.get("id"),position:t++,dateAdded:r.get("dateAdded"),dateUpdated:0})});return e};t.prototype.onMoveTrackRow=function(e,t,r){var n=this.$(this.options.listSelector).children();this.collection.each(function(e,n){if(n!==t){t<n&&n<=r&&e.set({position:n-1},{silent:!0});r<=n&&n<t&&e.set({position:n+1},{silent:!0})}});e.set({position:r});this.collection.sort();n.each(function(e,t){i.Velocity(t,{translateY:"0"},{duration:0})});this.needSaving=!0};t.prototype.onDeleteTrackRow=function(){this.needSaving=!0};t.prototype.close=function(){var t=this;if(!this.needSaving||confirm(this.cancelString)){this.collection.forEach(function(e){e.off(p.default.PlaylistTrackEvent.Move,t.onMoveTrackRow,t);e.off(p.default.PlaylistTrackEvent.Delete,t.onDeleteTrackRow,t)});e.prototype.close.call(this)}};t.defaultOptions={reRenderOnChange:!0,listSelector:".js-editPlaylistOverlay-tracksList",ModelView:p.default,scrollableElement:".js-scrollable-element"};return t}(r.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/playlist/deleteplaylistconfirmation",["require","exports","../../../library/view/overlays","ribsjs","../../../library/dialog/toast","../../../managers/manager","underscore"],e)}(function(e,t){"use strict";
25Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("ribsjs"),i=e("../../../library/dialog/toast"),o=e("../../../managers/manager"),a=e("underscore"),s=n.EventsManager,l=function(e){function t(t){var r=e.call(this,t)||this;r.Events={DELETE_AGREE:"deleteplaylist:agree",DELETE_CANCEL:"deleteplaylist:cancel"};return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/playlist/deleteplaylistconfirmation"};t.prototype.events=function(){return a.extend(e.prototype.events.call(this),{"click .js-deleteplaylist-agree":"onAgree","click .js-deleteplaylist-cancel":"onCancel"})};t.prototype.onAgree=function(e){var t=this;e.preventDefault();s.trigger("STATS:PLAYLIST:DELETE",{id:this.model.get("id")});o.LocalizationManager.get("_TKEY_WWW_PLAYLIST_DELETE_deleted-playlist",{playlistId:this.model.get("id"),userData:this.options.userData}).then(function(e){o.PlaylistsManager.remove(t.options.model,{userData:t.options.userData}).then(function(r){t.trigger(t.Events.DELETE_AGREE);t.close();i.show(e[0].get("translate"));e[0].close()}).catch(function(e){t.$(".js-delete-playlist").removeClass("is-disabled")})})};t.prototype.onCancel=function(e){e.preventDefault();this.trigger(this.Events.DELETE_CANCEL);this.close()};t.prototype.onClickClose=function(){this.trigger(this.Events.DELETE_CANCEL);e.prototype.close.call(this)};return t}(r.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/social/sharePrivatePlaylist",["require","exports","underscore","ribsjs","../../../library/model/model","../../../library/view/overlays","../../../managers/manager","../../../library/dialog/toast","../../messages/item","../../layout"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../library/model/model"),a=e("../../../library/view/overlays"),s=e("../../../managers/manager"),l=e("../../../library/dialog/toast"),u=e("../../messages/item"),c=e("../../layout"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/social/sharePrivatePlaylist"};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-make-public":"onMakePublic"})};t.prototype.onMakePublic=function(){var e=this;event.preventDefault();var t={id:this.model.get("id"),status:"public",tracks:this.model.get("tracks")};s.PlaylistsManager.update(t,{userData:this.options.userData}).then(function(t){return s.LocalizationManager.get("_TKEY_WWW_PLAYLIST_success-playlist-save",{userData:e.options.userData})}).then(function(r){l.show(r[0].get("translate"));i.trigger("playlist:edit",{attributes:t});r[0].close();e.options.resolve();e.close()}).catch(function(t){e.options.reject();e.close();c.default.getInstance().addMessage(new u.default({model:new o.default({message:"_TKEY_WWW_PLAYLIST_error-unknown-server-error",status:u.default.Status.Danger})}))})};return t}(a.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/social/share",["require","exports","../../../library/view/overlays","../../../configuration/configuration","underscore","../../../vendor/phpjs/phpjs","chrisweb-utilities","../../../library/utilities/route","speakingurl"],e)}(function(e,t){"use strict";
25Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("../../../configuration/configuration"),i=e("underscore"),o=e("../../../vendor/phpjs/phpjs"),a=e("chrisweb-utilities"),s=e("../../../library/utilities/route"),l=e("speakingurl"),u=function(e){function t(t){return e.call(this,i.extend({templateVariables:{websiteName:n.default.application.websiteName}},t))||this}__extends(t,e);t.prototype.onInitializeStart=function(){var t="";switch(this.model.get("type")){case"track":t=o.default.strings.sprintf(n.default.application.shortUrl.track,this.model.get("id"));break;case"album":t=o.default.strings.sprintf(n.default.application.shortUrl.album,this.model.get("id"));break;case"playlist":t=o.default.strings.sprintf(n.default.application.shortUrl.playlist,this.model.get("id"));break;case"community":t=o.default.strings.sprintf(n.default.application.shortUrl.community,this.model.get("name"));break;case"radio":t=o.default.strings.sprintf(n.default.application.shortUrl.radio,this.model.get("idstr"));break;case"artist":t=o.default.strings.sprintf(n.default.application.shortUrl.artist,this.model.get("id"));break;case"user":var r=l(a.default.safeUnescape(this.model.get("dispname")));this.model.set("name",r);t=o.default.strings.sprintf(n.default.application.shortUrl.retrospective,s.default.getUrl("user",{id:this.model.get("id"),name:r}));break;default:t=o.default.strings.sprintf(n.default.application.shortUrl.retrospective,location.pathname)}this.model.set("pageUrl",t);e.prototype.onInitializeStart.call(this)};t.prototype.getTemplateId=function(){return"/overlays/social/share"};return t}(r.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/controller/media",["require","exports","../track","FSEventDispatcher","../track/factory","../capabilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../track"),n=__importDefault(e("FSEventDispatcher")),i=e("../track/factory"),o=e("../capabilities"),a=null;o.isCapable(["MultiTrack","Volume"]).then(function(e){return a=e});var s=function(e){function t(t,n,i){var o=e.call(this)||this;o.media=t;o.trackInfo=n;o.track=i;o.eventList=[];o.isFading=!1;o.isDispose=!1;o.isLoaded=!1;o.globalVolume=1;o.onCallback(r.Track.Event.LOADED,function(){o.isLoaded=!0});return o}__extends(t,e);t.prototype.play=function(){!this.track.isPlaying&&this.track.currentTimePosition>0?this.track.fadeIn(.5):this.track.play();return this};t.prototype.pause=function(){this.track.isPlaying&&this.track.fadeOut(.5);return this};t.prototype.stop=function(){this.track.stop();return this};t.prototype.volume=function(e){this.globalVolume=e;this.track.setGlobalVolume(e);return this};t.prototype.fadeIn=function(e){var t=this;if(this.track.isPlaying){e&&setTimeout(e,0);return this}var r=function(){t.isDispose?t.track.dispose():e&&e()};if(!1!==a){this.isFading=!0;o.isCapable(["MultiTrack","Volume"],function(){t.track.fadeIn(1,function(){t.isFading=!1;r()})}).then(function(e){t.isFading=!1;e||r()})}else r();return this};t.prototype.fadeOut=function(e){var t=this;if(!this.track.isPlaying){e&&setTimeout(e,0);return this}var r=function(){t.isDispose?t.track.dispose():e&&e()};if(!1!==a){this.isFading=!0;o.isCapable(["MultiTrack","Volume"],function(){t.track.fadeOut(1,function(){t.isFading=!1;r()})}).then(function(e){t.isFading=!1;e||r()})}else r();return this};t.prototype.position=function(e){this.track.position(e);return this};t.prototype.positionPercent=function(e){return this.position(this.track.duration*e)};t.prototype.dispose=function(){this.isDispose=!0;for(;this.eventList.length;)this.eventList[0]();this.isFading||this.track.dispose()};t.prototype.onCallback=function(e,t,r){var n=this,i=function(e){try{t(e)}catch(e){}};this.track.on(e,i);var o=function(){n.track.off(e,i);n.eventList.splice(n.eventList.indexOf(o),1)};this.eventList.push(o);r&&Promise.resolve().then(function(){return i(r)});return o};t.prototype.onProgress=function(e){return this.onCallback(r.Track.Event.PROGRESS,e)};t.prototype.onComplete=function(e){return this.onCallback(r.Track.Event.COMPLETE,e)};t.prototype.onStatus=function(e){return this.onCallback(r.Track.Event.STATE,e,this.track.getState())};t.prototype.onPlay=function(e){var t=this.track.getState();return this.onCallback(r.Track.Event.STATE_PLAY,e,t.state===r.ETrackState.Play?t:void 0)};t.prototype.onPause=function(e){var t=this.track.getState();return this.onCallback(r.Track.Event.STATE_PAUSE,e,t.state===r.ETrackState.Pause?t:void 0)};t.prototype.onStop=function(e){var t=this.track.getState();return this.onCallback(r.Track.Event.STATE_STOP,e,t.state===r.ETrackState.Stop?t:void 0)};t.prototype.onLoaded=function(e){if(this.isLoaded){var t=setTimeout(e,16);return function(){clearTimeout(t)}}
25return this.onCallback(r.Track.Event.LOADED,e)};t.prototype.pipe=function(e){var t=function(t){void 0===t&&(t=!1);return function(r){if(r.duration){var n=r.duration-r.position;if(n<3){e.play();t&&e.position(3-n)}else e.stop()}}},n=[this.onCallback(r.Track.Event.POSITION,t(!0)),this.onProgress(t()),this.onPlay(t(!0)),this.onPause(function(){e.pause()}),this.onStop(function(){e.stop()})];return function(){for(;n.length;)n.pop()()}};t.prototype.isTrackEqualTo=function(e){return this.trackInfo===e};Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this.track.isPlaying},enumerable:!0,configurable:!0});return t}(n.default);t.MediaControls=s;var l=function(e){function t(t){var r=e.call(this)||this;r.track=t;return r}__extends(t,e);t.prototype.create=function(){return new s(this,this.track,this.getInstance())};t.prototype.getInstance=function(){var e=this,t=i.getInstance(this.track);this.track.effects&&Object.keys(this.track.effects).forEach(function(r){t.setEffect(r,e.track.effects[r])});return t};return t}(n.default);t.Media=l;t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},__spread=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/controller/medialist",["require","exports","FSEventDispatcher","../tracklist","../capabilities","./media","../player"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=__importDefault(e("FSEventDispatcher")),i=e("../tracklist"),o=e("../capabilities"),a=e("./media"),s=e("../player");!function(e){e.None="none";e.Song="song";e.List="list"}(r=t.LoopMode||(t.LoopMode={}));var l=function(e){function t(t,n){var i=e.call(this)||this;i.mediaList=t;i.tracklist=n;i.eventList=[];i.currentIndex=0;i._loopMode=r.None;i.currentUnpipeMedia=function(){};i._isShuffle=!1;i.trackOrder=[];i._volume=1;i.initialize();return i}__extends(t,e);t.prototype.initialize=function(){var e=this;this.onCallback(i.Tracklist.Event.REMOVED,function(r,n){if(e.currentMedia)if(0===n&&r instanceof Array&&r.length===e.trackOrder.length){e.currentMedia.fadeOut();e.currentMedia.dispose();e.currentMedia=null;if(e.nextMedia){e.nextMedia.dispose();e.nextMedia=null}if(e.previousMedia){e.previousMedia.dispose();e.previousMedia=null}e.currentMedia=null;e.currentIndex=0;e.trackOrder=[];e.tracklist.trigger(t.Event.NewTrack,null)}else{var i=n===e.trackOrder[e.currentIndex],o=i?e.currentIndex:e.trackOrder.indexOf(n);e.trackOrder.splice(o,1);e.trackOrder=e.trackOrder.map(function(e){return e>=n?e-1:e});if(i){if(e.nextMedia){e.nextMedia.fadeOut();e.nextMedia.dispose();e.nextMedia=null}var a=e.currentMedia.isPlaying;e.currentMedia.fadeOut().dispose();e.currentMedia=null;if(e.currentIndex>=e.tracklist.length){e.currentIndex=Math.max(e.tracklist.length-1,0);if(e.tracklist.length){e._createMedia();e.tracklist.trigger(t.Event.NewTrack,e.currentMedia,e.currentIndex,e.trackOrder[e.currentIndex],e.currentOrigin=s.EPlayOrigin.Skip)}else{e.currentMedia=null;if(e.previousMedia){e.previousMedia.dispose();e.previousMedia=null}}}else{e.play(s.EPlayOrigin.Skip);a||e.currentMedia.pause()}}else{if(e.nextMedia&&!e.nextMedia.isTrackEqualTo(e.tracklist.getTrack(e.trackOrder[e.currentIndex+1]))){e.nextMedia.fadeOut();e.nextMedia.dispose();e.nextMedia=null;e.createNextMedia()}e.previousMedia&&e.createPreviousMedia()}}});this.onCallback(i.Tracklist.Event.ADDED,function(t,r){var n,i=!e.currentMedia&&0===r&&0===e.trackOrder.length;if(e.currentMedia||i){var o=e.trackOrder[e.currentIndex]||0,a=t.length,s=!1;e.trackOrder=e.trackOrder.map(function(e){if(r<=e){s=s||e===o;return e+a}return e});s&&(o+=a);(n=e.trackOrder).splice.apply(n,__spread([r,0],t.map(function(e,t){return r+t})));e.currentIndex=e.trackOrder.indexOf(o);if(!i){if(e.nextMedia&&!e.nextMedia.isTrackEqualTo(e.tracklist.getTrack(e.trackOrder[e.currentIndex+1]))){e.nextMedia.fadeOut();e.nextMedia.dispose();e.nextMedia=null;e.createNextMedia()}e.previousMedia&&e.createPreviousMedia()}}});this.onCallback(i.Tracklist.Event.VOLUME,function(t){e.volume(t)});for(var r=0;r<this.tracklist.length;++r)this.trackOrder.push(r)};t.prototype.play=function(e){this._createMedia();this.currentMedia.play();this.tracklist.trigger(t.Event.NewTrack,this.currentMedia,this.currentIndex,this.trackOrder[this.currentIndex],this.currentOrigin=e);return this.currentMedia};t.prototype.volume=function(e){this._volume=e;this.currentMedia&&this.currentMedia.volume(e);this.nextMedia&&this.nextMedia.volume(e);this.previousMedia&&this.previousMedia.volume(e);return this};t.prototype.shuffle=function(e){void 0===e&&(e=!this._isShuffle);this._isShuffle=e;this._isShuffle?this._shuffle():this._unshuffle();if(this.nextMedia){this.nextMedia.dispose();this.nextMedia=null;this.createNextMedia()}this.previousMedia&&this.createPreviousMedia();return this};t.prototype._unshuffle=function(){var e=this.trackOrder[this.currentIndex];this.trackOrder.sort();this.currentIndex=this.trackOrder.indexOf(e)};t.prototype._shuffle=function(){var e=this;this.trackOrder.sort(function(t,r){return t===e.currentIndex?-1:r===e.currentIndex?1:Math.random()-.5});this.currentIndex=0};Object.defineProperty(t.prototype,"isShuffle",{get:function(){return this._isShuffle},enumerable:!0,configurable:!0});t.prototype._createMedia=function(){if(this.currentMedia){this.currentMedia.fadeOut().dispose();this.currentMedia=null}this.currentMedia=new a.Media(this.tracklist.getTrack(this.trackOrder[this.currentIndex])).create();this.currentMedia.volume(this._volume);this.createNextMedia();this.createPreviousMedia()};t.prototype.createNextMedia=function(){var e=this;o.isCapable("MultiTrack",function(){var t=e.currentIndex+1;t>=e.tracklist.length&&(t=0);e.nextMedia=new a.Media(e.tracklist.getTrack(e.trackOrder[t])).create();e.nextMedia.volume(e._volume);if(e._loopMode===r.None&&e.currentIndex<t||e._loopMode===r.List){e.currentUnpipeMedia();e.currentUnpipeMedia=e.currentMedia.pipe(e.nextMedia)}});this.currentMedia.onComplete(function(){if(e._loopMode!==r.Song){e.currentMedia.dispose();e.currentMedia=null;e.currentIndex++;e._loopMode===r.List&&e.currentIndex>=e.tracklist.length&&(e.currentIndex=0);if(e.nextMedia){e.currentMedia=e.nextMedia;e.createNextMedia();e.createPreviousMedia()}else{if(!(e.currentIndex<e.tracklist.length)){e.tracklist.trigger(t.Event.Complete);return}e._createMedia();e.currentMedia.play()}e.tracklist.trigger(t.Event.NewTrack,e.currentMedia,e.currentIndex,e.trackOrder[e.currentIndex],e.currentOrigin=s.EPlayOrigin.Next)}else{e.currentMedia.position(0);e.currentMedia.play()}})};t.prototype.createPreviousMedia=function(){var e=this;o.isCapable("MultiTrack",function(){if(e.previousMedia){e.previousMedia.dispose();e.previousMedia=null}var t=e.currentIndex-1;t<0&&(t=e.tracklist.length-1);e.previousMedia=new a.Media(e.tracklist.getTrack(e.trackOrder[t])).create();e.previousMedia.volume(e._volume)})};t.prototype.playAt=function(e,r){if(this.currentIndex===e&&this.currentMedia){this.currentMedia.position(0);this.currentMedia.play();this.tracklist.trigger(t.Event.NewTrack,this.currentMedia,this.currentIndex,this.trackOrder[this.currentIndex],this.currentOrigin=r);return this.currentMedia}this.currentIndex=e;if(this.currentMedia){this.currentMedia.fadeOut();this.currentMedia.dispose();this.currentMedia=null}if(this.nextMedia){this.nextMedia.dispose();this.nextMedia=null}if(this.previousMedia){this.previousMedia.dispose();this.previousMedia=null}return this.play(r)};t.prototype.pause=function(){return this};t.prototype.stop=function(){return this};t.prototype.previous=function(){--this.currentIndex<0&&(this.currentIndex=this.tracklist.length-1);if(this.previousMedia){this.currentMedia.fadeOut();this.currentMedia.dispose();this.currentMedia=this.previousMedia;this.previousMedia=null;this.createPreviousMedia();if(this.nextMedia){this.nextMedia.dispose();this.nextMedia=null}this.createNextMedia()}else{this.currentMedia.dispose();this.currentMedia=null;this._createMedia()}this.currentMedia.play();this.tracklist.trigger(t.Event.NewTrack,this.currentMedia,this.currentIndex,this.trackOrder[this.currentIndex],this.currentOrigin=s.EPlayOrigin.Previous);return this};t.prototype.next=function(){++this.currentIndex>=this.tracklist.length&&(this.currentIndex=0);if(this.nextMedia){this.currentMedia.fadeOut();this.currentMedia.dispose();this.currentMedia=this.nextMedia;this.nextMedia=null;this.createNextMedia();this.createPreviousMedia()}else{this.currentMedia.dispose();this.currentMedia=null;this._createMedia()}this.currentMedia.play();this.tracklist.trigger(t.Event.NewTrack,this.currentMedia,this.currentIndex,this.trackOrder[this.currentIndex],this.currentOrigin=s.EPlayOrigin.Skip);return this};t.prototype.loop=function(e){var t=this;if(this._loopMode===e)return this;this._loopMode=e;if(e===r.Song){this.currentUnpipeMedia();this.nextMedia&&this.nextMedia.fadeOut(function(){t.nextMedia.stop()})}else if(this.nextMedia)if(e===r.None&&this.currentIndex>=this.tracklist.length-1){this.currentUnpipeMedia();this.nextMedia.fadeOut(function(){t.nextMedia.stop()})}else{this.currentUnpipeMedia();this.currentUnpipeMedia=this.currentMedia.pipe(this.nextMedia)}return this};Object.defineProperty(t.prototype,"loopMode",{get:function(){return this._loopMode},enumerable:!0,configurable:!0});t.prototype._next=function(){};t.prototype._previous=function(){};t.prototype.dispose=function(){for(;this.eventList.length;)this.eventList[0]();if(this.currentMedia){this.currentMedia.dispose();this.currentMedia=null}if(this.previousMedia){this.previousMedia.dispose();this.previousMedia=null}if(this.nextMedia){this.nextMedia.dispose();this.nextMedia=null}};t.prototype.onCallback=function(e,t,r){var n=this,i=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{t.apply(void 0,__spread(e))}catch(e){console.error(e)}};this.tracklist.on(e,i);var o=function(){n.tracklist.off(e,i);n.eventList.splice(n.eventList.indexOf(o),1)};this.eventList.push(o);r&&Promise.resolve().then(function(){t.apply(void 0,__spread(r))});return o};t.prototype.onTrack=function(e){return this.onCallback(t.Event.NewTrack,e,[this.currentMedia,this.currentIndex,this.trackOrder[this.currentIndex],this.currentOrigin])};t.prototype.onComplete=function(e){return this.onCallback(t.Event.Complete,e)};t.prototype.getTrackOrder=function(){return this.trackOrder.slice()};t.Event={NewTrack:"mlc:next",Complete:"mlc:complete"};return t}(n.default);t.MediaListControls=l;var u=function(e){function t(t){var r=e.call(this)||this;r.tracklist=t;return r}__extends(t,e);t.prototype.create=function(){return new l(this,this.tracklist)};return t}(n.default);t.MediaList=u;t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},__spread=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esMo
25dule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/tracklist",["require","exports","FSEventDispatcher","./track","./controller/medialist","./capabilities","./player"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=__importDefault(e("FSEventDispatcher")),n=e("./track"),i=e("./controller/medialist"),o=e("./capabilities"),a=e("./player");!function(e){e[e.Auto=0]="Auto";e[e.Force=1]="Force"}(t.ENext||(t.ENext={}));var s=function(e){function t(r){void 0===r&&(r=""+t.DEFAULT_TRACKLIST_PREFIX+Date.now());var n=e.call(this)||this;n._name=r;n.tracklist=[];n.crossFading=0;n.volume=1;return n}__extends(t,e);t.prototype.addTrack=function(e){return this.addTrackTo(this.tracklist.length,e)};t.prototype.addTrackTo=function(e,r){var n,i=this;r instanceof Array||(r=[r])
26;e=Math.min(Math.max(e,0),this.tracklist.length);(n=this.tracklist).splice.apply(n,__spread([e,0],r));this.crossFading>0&&o.isCapable(["MultiTrack","Volume"],function(){r.forEach(function(e){return i.applyCrossFading(e)})});this.trigger(t.Event.ADDED,r,e);this.trigger(t.Event.UPDATED);return this};t.prototype.getTrack=function(e){return this.tracklist[e]};t.prototype.removeTrackAt=function(e){var r=__read(this.tracklist.splice(e,1),1),n=r[0];this.trigger(t.Event.REMOVED,n,e);this.trigger(t.Event.UPDATED);return this};t.prototype.clear=function(){var e=this.tracklist.splice(0,this.tracklist.length);this.trigger(t.Event.REMOVED,e,0);this.trigger(t.Event.UPDATED);return this};t.prototype.applyCrossFading=function(e){e.effects=e.effects||{};e.effects.fadeStart={attribute:"volume",ease:n.ETrackEffectEase.Linear,end:this.crossFading,start:0,endValue:1,startValue:0};e.effects.fadeEnd={attribute:"volume",ease:n.ETrackEffectEase.Linear,end:0,start:-this.crossFading,endValue:0,startValue:1}};t.prototype.setCrossFading=function(e){var t=this;void 0===e&&(e=0);this.crossFading=e;o.isCapable(["MultiTrack","Volume"],function(){0===t.crossFading?t.tracklist.forEach(function(e){e.effects=e.effects||{};delete e.effects.fadeStart;delete e.effects.fadeEnd}):t.tracklist.forEach(function(e){t.applyCrossFading(e)})});return this};Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"length",{get:function(){return this.tracklist.length},enumerable:!0,configurable:!0});t.prototype.save=function(){};t.prototype.play=function(){return this._playAt(0,a.EPlayOrigin.First)};t.prototype.playAt=function(e){return this._playAt(e,a.EPlayOrigin.Select)};t.prototype._playAt=function(e,t){var r=new i.MediaList(this).create();r.volume(this.volume);r.playAt(e,t);return r};t.prototype.setVolume=function(e){this.volume=e;this.trigger(t.Event.VOLUME,this.volume);return this};t.prototype.getVolume=function(){return this.volume};t.Event={ADDED:"tracklist:added",COMPLETE:"tracklist:complete",REMOVED:"tracklist:removed",VOLUME:"tracklist:volume:changed",UPDATED:"tracklist:update"};t.DEFAULT_TRACKLIST_PREFIX="tracklist_";return t}(r.default);t.Tracklist=s;t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("player/dist/player",["require","exports","FSEventDispatcher","./tracklist"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=__importDefault(e("FSEventDispatcher")),n=__importDefault(e("./tracklist"));!function(e){e.First="first";e.Next="next";
26e.Skip="skip";e.Previous="previous";e.Select="select"}(t.EPlayOrigin||(t.EPlayOrigin={}));var i=function(e){function t(){var r,i=e.call(this)||this;i.globalVolume=1;i.tracklists=(r={},r[t.DEFAULT_TRACKLIST]=(new n.default).setVolume(i.globalVolume),r);i.latestTracklist=t.DEFAULT_TRACKLIST;return i}__extends(t,e);t.prototype.addTrack=function(e,t){void 0===t&&(t=this.latestTracklist);e instanceof Array||(e=[e]);this.tracklists[t].addTrack(e);return this};t.prototype.addTrackTo=function(e,t,r){void 0===r&&(r=this.latestTracklist);e instanceof Array||(e=[e]);this.tracklists[r].addTrackTo(t,e);return this};t.prototype.addTracklist=function(e){this.tracklists[e.name]=e;return this};t.prototype.createTracklist=function(e,r){void 0===e&&(e=""+t.DEFAULT_TRACKLIST_PREFIX+Date.now());void 0===r&&(r=!0);!r&&e in this.tracklists||this.addTracklist(new n.default(e).setVolume(this.globalVolume));return this};t.prototype.removeTracklist=function(e){void 0===e&&(e=this.latestTracklist);if(e!==t.DEFAULT_TRACKLIST){delete this.tracklists[e];this.tracklists[this.latestTracklist]||(this.latestTracklist=Object.keys(this.tracklists)[0]||t.DEFAULT_TRACKLIST)}return this};t.prototype.getTracklist=function(e){void 0===e&&(e=this.latestTracklist);return this.tracklists[e]};t.prototype.setTracklist=function(e){this.latestTracklist=e;return this};t.prototype.setVolume=function(e){var t=this;this.globalVolume=e;Object.keys(this.tracklists).forEach(function(e){t.tracklists[e].setVolume(t.globalVolume)});return this};t.prototype.getVolume=function(){return this.globalVolume};t.prototype.play=function(e){void 0===e&&(e=this.latestTracklist);return this.tracklists[e].play()};t.prototype.playAt=function(e,t){void 0===t&&(t=this.latestTracklist);return this.tracklists[t].playAt(e)};Object.defineProperty(t.prototype,"currentTracklistName",{get:function(){return this.latestTracklist},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"currentTracklist",{get:function(){return this.tracklists[this.latestTracklist]},enumerable:!0,configurable:!0});t.DEFAULT_TRACKLIST="default";t.DEFAULT_TRACKLIST_PREFIX="tracklist_";return t}(r.default);t.Player=i;t.default=i});define("player",["player/dist/player"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/media/audio/universalplayer",["require","exports","FSEventDispatcher","player","underscore","../../../configuration/configuration","jamtracker"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("FSEventDispatcher"),i=e("player"),o=e("underscore"),a=e("../../../configuration/configuration"),s=e("jamtracker"),l={probably:1,maybe:.5,"":0},u={};!function(e){e.Track="track";e.Radio="radio"}(r=t.EPlayerMode||(t.EPlayerMode={}));var c=function(e){function t(){var t=e.call(this)||this;t.Event={IS_IOS_DEVICE:"player:detect:ios"};t.eventList=[];t.throttledNext=o.throttle(function(){},500);t.playerMode=r.Track;t.player=new i.Player;t.player.currentTracklist.setCrossFading(3);return t}__extends(t,e);t.prototype.onCallback=function(e,t){var r=this,n=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{t.apply(void 0,e)}catch(e){console.error(e)}};this.on(e,n);var i=function(){r.off(e,n);r.eventList.splice(r.eventList.indexOf(i),1)};this.eventList.push(i);return i};t.prototype.pipeTracklist=function(e){var r=this;this.playerMediaListController&&Promise.resolve().then(function(){return e(r.playerMediaListController)});return this.onCallback(t.InternalEvent.PIPE_TRACKLIST,e)};t.prototype.pipeTrack=function(e){var r=this;this.playerMediaController&&Promise.resolve().then(function(){return e(r.playerMediaController,r.currentIndex,r.currentIndexInTracklist)});return this.onCallback(t.InternalEvent.PIPE_TRACK,e)};
26t.getBestFormat=function(e,t){var n=s.Performance.getLatestEstimateBandwidth()>a.default.application.player.highBandwidth?"high":"low",i=e.join(":")+":"+t+":"+n;if(i in u)return u[i];var o=[],c=new Audio;e.forEach(function(e){var i=l[c.canPlayType(a.default.application.formatStreamType[e])]||0;if(i){t===r.Radio&&"mp33"===e&&(i*=2);"mp32"===e&&"high"===n&&(i*=1.5);o.push({format:e,weight:i})}});o=o.sort(function(e,t){return t.weight-e.weight});return u[i]=o.map(function(e){return e.format})};t.prototype.getStreamFormat=function(){return t.getBestFormat(a.default.application.formatStream,this.playerMode)[0]};t.prototype.getOptionOfTrack=function(e){if(this.getStreamFormat())return{}};t.prototype.createTrack=function(e){return{}};t.prototype.next=function(e){void 0===e&&(e=!1);this.throttledNext(e);return this};t.prototype.setVolume=function(e){this.player.setVolume(e);return this};t.prototype.getVolume=function(){return this.player.getVolume()};t.prototype.play=function(){return this._playAt(0,i.EPlayOrigin.First)};t.prototype.playAt=function(e){this._playAt(e,i.EPlayOrigin.Select)};t.prototype._playAt=function(e,r){var n=this;if(this.playerMediaListController){this.playerMediaListController.playAt(e,r);return this}var o=this.playerMediaListController=r===i.EPlayOrigin.First?this.player.play():this.player.playAt(e);this.playerMediaListController=o;this.trigger(t.InternalEvent.PIPE_TRACKLIST,o);o.onTrack(function(e,r,i){n.playerMediaController=e;n.currentIndex=r;n.currentIndexInTracklist=i;n.trigger(t.InternalEvent.PIPE_TRACK,n.playerMediaController,r,i)});return this};t.prototype.pause=function(){this.playerMediaController&&this.playerMediaController.pause();return this};t.prototype.stop=function(){if(this.playerMediaController){this.playerMediaController.stop();this.playerMediaListController.stop()}return this};t.prototype.setMode=function(e){this.playerMode=e;return this};t.prototype.clearTracklist=function(){this.player.currentTracklist.clear();return this};Object.defineProperty(t.prototype,"tracklistLength",{get:function(){return this.player.currentTracklist.length},enumerable:!0,configurable:!0});t.prototype.setPosition=function(e){this.playerMediaController.positionPercent(e);return this};t.prototype.addToTracklist=function(e){var t=this.getStreamFormat();this.player.addTrack(e.map(function(e,r){return{streamUrl:e.get("stream")[t],infos:{id:e.get("id"),startDate:e.get("startDate"),duration:e.get("duration"),offset:e.get("trackNo")||r,raw:e.getModelProjection()}}}));return this};t.prototype.getNextTrack=function(){var e=this;return this.playerMediaListController.getTrackOrder().slice(this.currentIndex).map(function(t){return e.player.currentTracklist.getTrack(t).infos.raw})};t.prototype.getOrderedTracklist=function(){var e=this;return this.playerMediaListController.getTrackOrder().map(function(t){return e.player.currentTracklist.getTrack(t).infos.raw})};t.InternalEvent={PIPE_TRACKLIST:"player:internal:tracklist",PIPE_TRACK:"player:internal:track"};return t}(n.default);t.default=new c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/player/mini",["require","exports","../../../library/view/view","../../../library/media/audio/universalplayer","moment","../../../managers/manager","underscore","jquery"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/view"),n=e("../../../library/media/audio/universalplayer"),i=e("moment"),o=e("../../../managers/manager"),a=e("underscore"),s=e("jquery"),l=function(e){function t(t){var r=e.call(this,t)||this;r.$control=s();r.$volumeBar=s();r.$volumeSlider=s();r.$progressSlider=s();r.$progressBar=s();r.$progressThumb=s();r.onChangeProgressSlider=a.debounce(function(e){if("radio"!==r.model.get("mode")){var t=parseFloat(e.target.value.toString())/100;r.changePosition(t)}},30,!0);return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/layout/player/mini"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.addToFavoriteOnClose=this.onCloseComponent.bind(this,"_addToFavorite");this.addToPlaylistOnClose=this.onCloseComponent.bind(this,"_addToPlaylist");this.downloadOnClose=this.onCloseComponent.bind(this,"_download");
26this.shareOnClose=this.onCloseComponent.bind(this,"_share")};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$control=this.$(".js-player-control");this.$volumeBar=this.$(".js-player-volume-bar");this.$volumeSlider=this.$(".js-player-volume-slider");this.$progressSlider=this.$(".js-player-progress-slider");this.$progressBar=this.$(".js-player-progress-bar");this.$progressThumb=this.$(".js-player-progress-thumb");this.addToFavorite=this.addToFavorite||t.EmptyComponent;this.addToPlaylist=this.addToPlaylist||t.EmptyComponent;this.download=this.download||t.EmptyComponent;this.share=this.share||t.EmptyComponent;this.listenTo(this.model,"change",this.onAttributeChange);this.trigger(t.MiniPlayerViewEvents.RENDER);"radio"===this.model.get("mode")&&this.$progressSlider.attr("disabled","disabled")};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();a.keys(t).forEach(function(r){var n=e.model.get(r);switch(r){case"id":e.addToFavorite.setId(n);e.addToPlaylist.setId(n);e.download.setId(n);e.share.model.set("id",n);break;case"position":case"duration":n=""+i.utc(1e3*n).format("mm:ss");var a=e.model.get("position")/e.model.get("duration")*100;e.$(".js-player-"+r).text(n);e.$progressBar.width(a+"%");e.$progressThumb.css("left",a+"%");e.$progressSlider.val(a);break;case"artistId":o.ArtistsManager.get(n,{userData:e.options.userData}).then(function(t){n=t[0].get("name");e.$(".js-player-"+r).html(n);t[0].close()});break;case"name":e.$(".js-player-"+r).html("<span>"+n+"</span>");break;case"sourceText":n=(n||"").toString().trim();var s=e.$(".js-player-playSource");s.html(n);0===n.length?s.addClass("empty"):s.removeClass("empty");break;case"mode":case"status":var l=e.$control.find(".js-player-play-pause");switch(t[r]){case"play":e.$control.removeClass("is-pause").removeClass("is-stop").addClass("is-play");l.prop("title",l.data("jam-title-pause"));break;case"pause":e.$control.removeClass("is-play").removeClass("is-stop").addClass("is-pause");l.prop("title",l.data("jam-title-play"));break;case"stop":e.$control.removeClass("is-play").removeClass("is-pause").addClass("is-stop");l.prop("title",l.data("jam-title-play"));break;case"radio":e.$control.removeClass("is-normal").addClass("is-radio");e.$el.removeClass("is-normal").addClass("is-radio");e.$progressSlider.attr("disabled","disabled");break;case"normal":e.$control.removeClass("is-radio").addClass("is-normal");e.$el.removeClass("is-radio").addClass("is-normal");e.$progressSlider.removeAttr("disabled")}break;case"cover":e.$(".js-player-"+r).prop("src",n.small.size50);break;case"volume":e.$volumeBar.css("width",n+"%");e.$volumeSlider.val(n);break;case"isIos":n&&e.$(".player-mini_volume").remove()}})};t.prototype.events=function(){var e={"change .js-player-progress-slider":"onChangeProgressSlider","input .js-player-progress-slider":"onChangeProgressSlider"};"device"in window&&"platform"in device&&"iOS"===device.platform&&(e["click .js-progress-bar"]="onClickProgressBar");return e};t.prototype.onClickProgressBar=function(e){if("radio"!==this.model.get("mode")){var t=e.offsetX/e.target.offsetWidth;this.changePosition(t)}};t.prototype.changePosition=function(e){var t=e*this.model.get("duration");this.model.set("position",t);n.default.setPosition(e)};t.prototype.onSetComponent=function(e){this.listenTo(this[e],"close",this[e.substr(1)+"OnClose"])};t.prototype.onCloseComponent=function(e){this.stopListening(this[e],"close",this[e.substr(1)+"OnClose"]);this[e]=t.EmptyComponent};t.prototype.setComponent=function(e,r){if(this[e]!==r){this[e]&&this.onCloseComponent(e);this[e]=r||t.EmptyComponent;this.onSetComponent(e)}};Object.defineProperty(t.prototype,"addToFavorite",{get:function(){return this._addToFavorite},set:function(e){this.setComponent("_addToFavorite",e)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"addToPlaylist",{get:function(){return this._addToPlaylist},set:function(e){this.setComponent("_addToPlaylist",e)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"download",{get:function(){return this._download},set:function(e){this.setComponent("_download",e)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"share",{get:function(){return this._share},set:function(e){this.setComponent("_share",e)},enumerable:!0,configurable:!0});t.prototype.close=function(){this.stopListening(this.model,"change",this.onAttributeChange);this.addToFavorite&&this.onCloseComponent("_addToFavorite");this.addToPlaylist&&this.onCloseComponent("_addToPlaylist");this.download&&this.onCloseComponent("_download");this.share&&this.onCloseComponent("_share");e.prototype.close.call(this)};t.MiniPlayerViewEvents={RENDER:"render"};t.EmptyComponent={setId:function(){""},listenTo:function(){""},stopListening:function(){""}};return t}(r.default);t.default=l});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/media/waveform/core",["require","exports","jquery","underscore","../../utilities/display"],e)}(function(e,t){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("underscore"),i=e("../../utilities/display"),o=function(){function e(t){this.firstDrawing=!0;this.drawStop=!1;this.waveLayoutOptions=i.default.getWaveformDimension();if(void 0!==t){void 0!==t.canvas&&this.setCanvasContext(t.canvas);void 0!==t.data&&(this.waveData=t.data);n.extend(this.waveLayoutOptions,t.layoutOptions)}n.defaults(this.waveLayoutOptions,e.DefaultWaveLayoutOptions)}e.prototype.draw=function(e){if(this.$canvasElement){var t=n.pluck(this.waveData,"height"),r=t.length*this.waveLayoutOptions.peakWidthInPixel+(t.length-1)*this.waveLayoutOptions.spaceWidthInPixel,i=0;void 0!==e&&(i=Math.round(e*t.length/100));var o=this.waveLayoutOptions.waveHeightInPixel;this.$canvasElement.attr("height",o);this.$canvasElement.attr("width",r);this.canvasContext.lineWidth=this.waveLayoutOptions.peakWidthInPixel;var a=this.waveLayoutOptions.waveHeightInPixel*(this.waveLayoutOptions.waveTopPercentage/100),s=this.waveLayoutOptions.waveHeightInPixel*((100-this.waveLayoutOptions.waveTopPercentage)/100);this.canvasContext.fillStyle=this.waveLayoutOptions.waveBackgroundColor;this.canvasContext.fillRect(0,0,r,o);for(var l=0;l<t.length;l++){var u=void 0,c=void 0;if(l<=i&&e){u=this.waveLayoutOptions.peakTopProgressColor;c=this.waveLayoutOptions.peakBottomProgressColor}else{u=this.waveLayoutOptions.peakTopColor;c=this.waveLayoutOptions.peakBottomColor}var d=t[l],p=(l+1)*this.waveLayoutOptions.peakWidthInPixel+l*this.waveLayoutOptions.spaceWidthInPixel;this.canvasContext.beginPath();this.canvasContext.moveTo(p,a);this.canvasContext.lineTo(p,a-a*(d/100));this.canvasContext.strokeStyle=u;this.canvasContext.stroke();this.canvasContext.beginPath();this.canvasContext.moveTo(p,a);this.canvasContext.lineTo(p,a+s*(d/100));this.canvasContext.strokeStyle=c;this.canvasContext.stroke()}}};e.prototype.setCanvasContext=function(e){this.canvasContext=e[0].getContext("2d");this.$canvasElement=r(this.canvasContext.canvas)};Object.defineProperty(e.prototype,"waveData",{get:function(){return this._waveData},set:function(e){this._waveData=e},enumerable:!0,configurable:!0});e.DefaultWaveLayoutOptions={waveHeightInPixel:72,waveBackgroundColor:"rgba(255, 255, 255, 0)",peakWidthInPixel:2,spaceWidthInPixel:1,waveTopPercentage:50,peakTopColor:"rgba(255, 255, 255, 0.4)",peakBottomColor:"rgba(255, 255, 255, 0.4)",peakTopProgressColor:"rgba(255, 255, 255, 1)",peakBottomProgressColor:"rgba(255, 255, 255, 1)"};return e}();t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/player/full",["require","exports","underscore","jquery","ribsjs","../../../library/view/view","moment","../../../managers/manager","../../../library/media/waveform/core","../../../library/media/audio/universalplayer","../../../library/utilities/display","../../../library/utilities/route","../../overlays"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("ribsjs"),o=i.EventsManager,a=e("../../../library/view/view"),s=e("moment"),l=e("../../../managers/manager"),u=e("../../../library/media/waveform/core"),c=e("../../../library/media/audio/universalplayer"),d=e("../../../library/utilities/display"),p=e("../../../library/utilities/route"),f=e("../../overlays"),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.waveform=new u.default;t.isRadioScrolling=!1;t.canMoveWaveform=!1;t.peakQueue=[];t.$canvas=n();t.$control=n();t.$duration=n();t.$position=n();t.$volumeBar=n();t.$volumeSlider=n();return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/layout/player/full"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.model.set({volume:80},{silent:!0});this.addToFavoriteOnClose=this.onCloseComponent.bind(this,"_addToFavorite");this.addToPlaylistOnClose=this.onCloseComponent.bind(this,"_addToPlaylist");this.downloadOnClose=this.onCloseComponent.bind(this,"_download");
26this.shareOnClose=this.onCloseComponent.bind(this,"_share")};t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);c.default.pipeTrack(function(e){e&&e.onProgress(function(){t.updateWaveform()})})};t.prototype.render=function(){var t=this;return e.prototype.render.call(this).then(function(e){t.$canvas=t.$el.find("#waveform");t.waveform.setCanvasContext(t.$canvas);return t})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$control=this.$(".js-player-control");this.$duration=this.$(".js-player-duration");this.$position=this.$(".js-player-position");this.$volumeBar=this.$(".js-player-volume-bar");this.$volumeSlider=this.$(".js-player-volume-slider");this.addToFavorite=this.addToFavorite||t.EmptyComponent;this.addToPlaylist=this.addToPlaylist||t.EmptyComponent;this.download=this.download||t.EmptyComponent;this.share=this.share||t.EmptyComponent;this.setOrigin();this.listenTo(this.model,"change",this.onAttributeChange)};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();r.keys(t).forEach(function(r){var i=e.model.get(r);switch(r){case"id":e.addToFavorite.setId(i);e.addToPlaylist.setId(i);e.download.setId(i);e.share.model.set("id",i);break;case"volume":e.$volumeBar.css("width",i+"%");e.$volumeSlider.val(i);break;case"position":var o=i<0?0:i;i=""+s.utc(1e3*o).format("mm:ss");e.$position.text(i);break;case"duration":i=""+s.utc(1e3*i).format("mm:ss");e.$duration.text(i);break;case"artistId":l.ArtistsManager.get(i,{userData:e.options.userData}).then(function(t){i=t[0].get("name");e.$(".js-player-"+r).html(i);t[0].close()});break;case"name":e.$(".js-player-"+r).html(i);break;case"sourceText":e.$(".js-player-playSource").html(i);break;case"origin":e.setOrigin();break;case"mode":"normal"===i&&(e.peakQueue=[]);break;case"status":var a=e.$control.find(".js-player-play-pause");switch(t[r]){case"play":e.$control.removeClass("is-pause").removeClass("is-stop").addClass("is-play");a.prop("title",a.data("jam-title-pause"));break;case"pause":e.$control.removeClass("is-play").removeClass("is-stop").addClass("is-pause");a.prop("title",a.data("jam-title-play"));break;case"stop":e.$control.removeClass("is-play").removeClass("is-pause").addClass("is-stop");a.prop("title",a.data("jam-title-play"));break;case"radio":e.$control.removeClass("is-normal").addClass("is-radio");break;case"normal":e.$control.removeClass("is-radio").addClass("is-normal")}break;case"cover":e.$(".js-full-player-cover-600").each(function(){n(this).prop("srcset",i.big.size600)});e.$(".js-full-player-cover-400").each(function(){n(this).prop("srcset",i.big.size400)});e.$(".js-full-player-cover-img").each(function(){n(this).prop("src",i.big.size600)});"HTMLPictureElement"in window&&"srcset"in document.createElement("img")||window.picturefill();break;case"isIos":i&&e.$(".js-player-volume-control").remove()}});this.setElement(this.$el)};t.prototype.setOrigin=function(){var e=this.model.get("origin"),t=this.$(".js-player-origin"),r=this.$(".js-player-origin-link");switch(e.type){case"album":case"track":case"playlist":l.getInclude(e.type,e.id,{userData:this.options.userData}).then(function(n){var i=n[0].get("name");t.text(i);r.prop("href",p.default.getUrl(e.type,{id:e.id,name:i}));n[0].close()});break;default:t.text(e.listTitle);r.prop("href",e.href)}};t.prototype.events=function(){return{"mousedown #waveform":"onActivateWaveform","mouseup #waveform":"onDeactivateWaveform","mousemove #waveform":"onMoveWaveform","touchstart #waveform":"onActivateWaveform","touchend #waveform":"onDeactivateWaveform","touchmove #waveform":"onMoveWaveform","click .js-player-queue":"onClickQueue","click .js-player-history":"onClickHistory"}};t.prototype.onActivateWaveform=function(e){e.preventDefault();if("normal"===this.model.get("mode")){this.canMoveWaveform=!0;this.setPositionInWaveform(e)}};t.prototype.onDeactivateWaveform=function(e){e.preventDefault();this.canMoveWaveform=!1};t.prototype.onMoveWaveform=function(e){e.preventDefault();this.canMoveWaveform&&"normal"===this.model.get("mode")&&this.setPositionInWaveform(e)};t.prototype.setPositionInWaveform=function(e){var t=this.getMousePosition(e),r=this.$canvas[0].width/100,n=t/r;c.default.setPosition(n/100);this.model.set("position",n*this.model.get("duration")/100);this.updateWaveform()};t.prototype.onClickQueue=function(e){f.default.add(f.default.DefinitionPath.PlayerQueue,{trackList:c.default.getNextTrack(),fullTracklist:c.default.getOrderedTracklist(),userData:this.options.userData,origin:this.model.get("origin")});o.trigger("STATS:PLAYER:QUEUE",{context:"full-player"})};t.prototype.onClickHistory=function(e){f.default.add(f.default.DefinitionPath.PlayerHistory,{userData:this.options.userData});o.trigger("STATS:PLAYER:HISTORY",{context:"full-player"})};t.prototype.getMousePosition=function(e){var t=this.$canvas[0].getBoundingClientRect();return(e.clientX||e.originalEvent.touches[0].clientX)-t.left};t.prototype.updateWaveform=function(e){e=e||this.model.attributes;var r=e.position/e.duration*100;r>100&&(r=100);r>t.maxWaveformRangeForRadio&&(this.isRadioScrolling="radio"===this.model.get("mode"));if(this.peakQueue.length&&this.isRadioScrolling){r=t.maxWaveformRangeForRadio;for(var n=Math.round(r*this.waveform.waveData.length/100);this.waveform.waveData[n].position<e.position||this.waveform.waveData[n].id!==e.id;){this.waveform.waveData.shift();this.waveform.waveData.push(this.peakQueue.shift())}}this.waveform.draw(r)};t.prototype.preparePeaks=function(e,t){if(e){for(var r=e.get("duration"),n=e.get("waveform").peaks,i=d.default.getWaveformDimension().peaksNumber,o=[],a=0;a<i;a++){var s={id:e.get("id"),position:a*r/i,height:5},l=Math.floor(a*n.length/i);if(l<n.length){var u={position:l*r/n.length,height:n[l]},c={position:(l+1)*r/n.length,height:n[l+1]};s.height=u.height+(c.height-u.height)*(s.position-u.position)/(c.position-u.position)}else s.height=n[n.length-1];o.push(s)}var p={id:e.get("id"),position:r+1,height:0};o.push(p);if(t)this.peakQueue=this.peakQueue.concat(o);else{this.waveform.waveData=o;this.isRadioScrolling=!1}}};t.prototype.onSetComponent=function(e){this.listenTo(this[e],"close",this[e.substr(1)+"OnClose"])};t.prototype.onCloseComponent=function(e){this.stopListening(this[e],"close",this[e.substr(1)+"OnClose"]);this[e]=t.EmptyComponent};t.prototype.setComponent=function(e,r){if(this[e]!==r){this[e]&&this.onCloseComponent(e);this[e]=r||t.EmptyComponent;this.onSetComponent(e)}};Object.defineProperty(t.prototype,"addToFavorite",{get:function(){return this._addToFavorite},set:function(e){this.setComponent("_addToFavorite",e)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"addToPlaylist",{get:function(){return this._addToPlaylist},set:function(e){this.setComponent("_addToPlaylist",e)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"download",{get:function(){return this._download},set:function(e){this.setComponent("_download",e)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"share",{get:function(){return this._share},set:function(e){this.setComponent("_share",e)},enumerable:!0,configurable:!0});t.prototype.close=function(){this.stopListening(this.model,"change",this.onAttributeChange);e.prototype.close.call(this)};t.maxWaveformRangeForRadio=15;t.EmptyComponent={setId:function(){""},listenTo:function(){""},stopListening:function(){""}};return t}(a.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/player",["require","exports","underscore","jquery","hammerjs","ribsjs","moment","../../library/media/audio/universalplayer","../../managers/manager","../../configuration/configuration","../../library/model/model","../../vendor/phpjs/phpjs","../../library/utilities/route","../../library/utilities/image","../../library/utilities/object","../layout","../../library/view/view","./player/mini","./player/full","FSPromise","../../library/error/error","player/dist/controller/medialist","../../models/manager/history","player"],e)}(function(e,t){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0})
27;var r=e("underscore"),n=e("jquery"),i=e("hammerjs"),o=e("ribsjs"),a=o.EventsManager,s=e("moment"),l=e("../../library/media/audio/universalplayer"),u=e("../../managers/manager"),c=e("../../configuration/configuration"),d=e("../../library/model/model"),p=e("../../vendor/phpjs/phpjs"),f=e("../../library/utilities/route"),h=e("../../library/utilities/image"),m=e("../../library/utilities/object"),y=e("../layout"),g=e("../../library/view/view"),v=e("./player/mini"),_=e("./player/full"),b=e("FSPromise"),w=e("../../library/error/error"),x=e("player/dist/controller/medialist"),M=e("../../models/manager/history"),S=e("player"),k=function(){function e(e,t){this.origin=e;this.model=t}e.prototype.pluckFromOriginAndModel=function(e){return[this.origin[e],this.model.get(e)]};e.prototype.sameInOriginAndModel=function(e){var t=this.pluckFromOriginAndModel(e);return t[0]===t[1]};return e}(),T=function(e){function t(){var t=e.call(this,{model:new d.default({id:1258756,name:"",artistId:479670,duration:void 0,position:void 0,status:"stop",mode:"normal",origin:{type:void 0,id:void 0,listTitle:void 0},cover:"",waveform:{peaks:[5,5]},listenedPercent:0,isIos:!1,sourceText:void 0,volume:100}),useHammer:!0,hammerOptions:{recognizers:[[i.Pan,{threshold:50,direction:i.DIRECTION_VERTICAL}]]},templateVariables:{websiteName:c.default.application.websiteName}})||this;t.Event={PLAY:"player:play",PAUSE:"player:pause",RADIO:"player:radio",QUEUE:"player:queue",UPDATE:"player:update"};t.PlayerViews={mini:null,full:null};t.handledPlayAndRadioEventCount=0;t.debouncedOnChangeVolume=r.debounce(function(e){a.trigger("STATS:PLAYER:VOLUME",{volume:e,context:t._currentPlayer+"-player"})},1e3);t.animate=!0;t.radioPlanning={current:null,next:null,queue:new o.Collection};t.isFirstRadioTrack=!0;t.unmuteVolume=0;t.unmaxVolume=1;t.hideMiniPlayerVolumeControl=r.debounce(function(){"mini"===t._currentPlayer&&t.currentPlayer.$(".js-player-volume-control").velocity({opacity:0},{display:"none"})},2e3);t.setCurrentPlayer("mini");t.PlayerViews.mini=new v.default({model:t.model,templateVariables:{websiteName:c.default.application.websiteName},closeModelOnClose:!1});t.PlayerViews.full=new _.default({model:t.model,templateVariables:{websiteName:c.default.application.websiteName},closeModelOnClose:!1});l.default.setVolume(1);t.on(t.Event.PAUSE,t.handlePauseEvent.bind(t));t.on(t.Event.QUEUE,t.handleQueueEvent.bind(t));t.displayPlayer=r.once(t.displayPlayer.bind(t));"device"in window&&"platform"in device&&"iOS"===device.platform?t.model.set({isIos:!0}):l.default.once(l.default.Event.IS_IOS_DEVICE,function(){t.model.set({isIos:!0})});t.resizeCallback=t.onResize.bind(t);n(window).on("resize",t.resizeCallback);var s=t.getUVC();if(s){s.on("ActionNext",t.onNextTrack.bind(t));s.on("ActionPrev",t.onPreviousTrack.bind(t));s.on("ActionPlay",t.onLockScreenPlayPause.bind(t));s.on("ActionPause",t.onLockScreenPlayPause.bind(t));s.on("ActionStop",t.onLockScreenStop.bind(t))}l.default.pipeTracklist(function(e){t.medialistController=e;e&&t.pipeMedialist()});l.default.pipeTrack(function(e,r,n){t.mediaController=e;t.model.get("origin").offset=n;if(e){t.mediaController.trackInfo.infos.startDate&&t.mediaController.position(Math.max(Date.now()/1e3-t.mediaController.trackInfo.infos.startDate,0));t.pipeMedia()}});return t}__extends(t,e);t.prototype.setUserData=function(t){e.prototype.setUserData.call(this,t);var r=this.options.userData.session.get("volume",1);l.default.setVolume(r);this.model.set("volume",100*r);return this};t.prototype.pipeMedia=function(){var e=this;u.TracksManager.get(this.mediaController.trackInfo.infos.id,{userData:this.options.userData}).then(function(t){e.updatePlayerInfo(t[0]);e.updateUVC();e.tryUpdateTrackPlayCount(t[0])});this.mediaController.onStatus(function(t){e.model.set({status:t.state},{silent:!e.isDispatch});e.trigger(e.Event.UPDATE,e.model.get("origin"),t.state);e.updateUVC()});this.mediaController.onProgress(function(t){var r=Math.floor(t.position),n=r-e.model.get("position"),i=e.model.get("listenedPercent");if(i<30&&1===n){var o=i+100*n/e.model.get("duration");e.model.set({position:r,listenedPercent:o},{silent:!e.isDispatch});o>=30&&u.HistoryManager.addNewListen30Event(e.model.get("id"),e.model.get("origin"),e.model.get("name"))}else e.model.set({position:r},{silent:!e.isDispatch})});this.mediaController.onStop(function(t){e.model.set({position:0},{silent:!e.isDispatch})})};t.prototype.pipeMedialist=function(){var e=this;this.medialistController.onComplete(function(){e.model.set({status:"stop"},{silent:!e.isDispatch});e.trigger(e.Event.UPDATE,e.model.get("origin"),"stop");e.updateUVC()})};t.prototype.displayPlayer=function(e,t){var r=this;e.get("playOnClick")().then(function(n){var i="normal"===t?{type:e.get("type"),id:e.get("id"),offset:e.get("offset"),listTitle:e.get("listTitle")?e.get("listTitle"):null,href:e.get("href")?e.get("href"):null}:e.attributes;r.model.set({id:n[0].get("id"),artistId:n[0].get("artistId"),name:n[0].get("name"),duration:n[0].get("duration"),position:0,
27cover:n[0].get("cover"),listenedPercent:0,origin:i},{silent:!r.isDispatch});r.isDispatch||y.default.getInstance().addPlayer(r)})};t.prototype.onLockScreenPlayPause=function(e){"normal"===this.model.get("mode")?this.onPlayPauseTrack(e):this.onPlayPauseRadio(e)};t.prototype.onLockScreenStop=function(e){this.mediaController.stop();var t=this.getUVC();setTimeout(function(){t.removePlayer(function(){""},function(){""})},100)};t.prototype.playPause=function(e){void 0===e&&(e=!1);switch(this.model.get("status")){case"play":this.mediaController.pause();break;case"pause":this.mediaController.play();break;case"stop":l.default.playAt(0)}this.trigger(this.Event.UPDATE,this.model.get("origin"),this.model.get("status"))};t.prototype.loadTrackList=function(e){};t.prototype.play=function(e,t){this.trigger(this.Event.PLAY,e,t);this.handlePlayEvent(e);this.displayPlayer(e,"normal")};t.prototype.playRadio=function(e,t){this.trigger(this.Event.RADIO,e,t);this.handleRadioEvent(e);this.displayPlayer(e,"radio")};t.prototype.handlePlayEvent=function(e){var t=this;this.handledPlayAndRadioEventCount+=1;var n=this.handledPlayAndRadioEventCount,i=new k(r.clone(this.model.get("origin")),e);this.updatePlaySourceText(i);this.PlayerViews.mini.once(v.default.MiniPlayerViewEvents.RENDER,function(){n===t.handledPlayAndRadioEventCount&&t.updatePlaySourceText(i)});this.model.set({mode:"normal",context:i.model.get("context")},{silent:!this.isDispatch});l.default.setMode(l.EPlayerMode.Track);i.model.get("restart")?this.handlePlayEventWithRestart(i):i.sameInOriginAndModel("type")&&i.sameInOriginAndModel("id")&&this.model.get("origin").id===i.origin.id&&this.model.get("origin").type===i.origin.type?this.handlePlayEventWithSameItem(i):this.handlePlayEventFromDifferentContext(i);this.doStatsLoggingForPlayEvent(e)};t.prototype.tryUpdateTrackPlayCount=function(e){try{e.get("stats").listenedAll+=1}catch(e){return}u.TracksManager.update(e,e.attributes,{userData:this.options.userData})};t.prototype.handlePlayEventWithRestart=function(e){if(e.sameInOriginAndModel("type")&&e.sameInOriginAndModel("id")){e.origin.offset=0;this.model.set("origin",e.origin);this.medialistController?this.medialistController.playAt(0,S.EPlayOrigin.Select):l.default.playAt(0)}else{e.origin.type=e.model.get("type");e.origin.id=e.model.get("id");e.origin.offset=0;e.origin.listTitle=e.model.get("listTitle")?e.model.get("listTitle"):null;e.origin.href=e.model.get("href")?e.model.get("href"):null;this.model.set("origin",e.origin);l.default.clearTracklist();e.model.get("playOnClick")().then(function(e){l.default.addToTracklist(e);l.default.play()})}this.trigger(this.Event.UPDATE,e.origin,this.model.get("status"))};t.prototype.handlePlayEventWithSameItem=function(e){this.mediaController&&t.playEventWithSameItemRules[e.origin.type]&&t.playEventWithSameItemRules[e.origin.type](this.mediaController,e)?this.mediaController.play():this.medialistController.playAt(e.model.get("offset"),S.EPlayOrigin.Select);if(-1!==e.model.get("offset")){e.origin.offset=Math.max(0===e.model.get("offset")?0:e.model.get("offset")||e.origin.offset||0,0);this.model.set("origin",e.origin)}this.trigger(this.Event.UPDATE,e.origin,this.model.get("status"))};t.prototype.handlePlayEventFromDifferentContext=function(e){var t=this;l.default.stop();l.default.clearTracklist();e.origin.type=e.model.get("type");e.origin.id=e.model.get("id");var r=e.model.get("offset");e.origin.offset=r>0?r:0;e.origin.listTitle=e.model.get("listTitle")?e.model.get("listTitle"):null;e.origin.href=e.model.get("href")?e.model.get("href"):null;e.model.get("playOnClick")().then(function(r){l.default.addToTracklist(r);t.PlayerViews.full.preparePeaks(r[e.origin.offset],!1);t.model.set("origin",e.origin);l.default.playAt(e.origin.offset);t.trigger(t.Event.UPDATE,e.origin,t.model.get("status"))})};t.prototype.doStatsLoggingForPlayEvent=function(e){};t.prototype.updatePlaySourceText=function(e){return __awaiter(this,void 0,b.FSPromise,function(){var t,r,n,i,o,a,o,s,l,o,c,d,f,h,m,y,o,g,v,o,_,x,M=this;return __generator(this,function(S){switch(S.label){case 0:this.model.set("sourceText","");return[4,new b.FSPromise(function(e){return setTimeout(e,1)})];case 1:S.sent();r=[];n=function(e,t){r.push('<a href="/'+e+'">');t&&r.push(t);r.push("</a>")};i=e.origin.type;switch(i){case"album":return[3,3];case"playlist":return[3,5];case"radio":return[3,7];case"virtual":return[3,10]}return[3,2];case 2:t=void 0;return[3,19];case 3:t="_TKEY_WWW_playing_from_album";return[4,u.AlbumsManager.getByAttribute({id:e.origin.id},{userData:this.options.userData})];case 4:o=S.sent();if(o instanceof w.default)throw o;a=o[0];n("album/"+e.origin.id,a.get("name"));return[3,19];case 5:t="_TKEY_WWW_playing_from_playlist";return[4,u.PlaylistsManager.getByAttribute({id:e.origin.id},{userData:this.options.userData})];case 6:o=S.sent();if(o instanceof w.default)throw o;s=o[0];n("playlist/"+e.origin.id,s.get("name"));return[3,19];case 7:l=e.model.get("origin").id;return[4,u.RadiosManager.getByAttribute({id:l},{userData:this.options.userData})];case 8:o=S.sent();if(o instanceof w.default)throw o;c=o[0];return[4,u.LocalizationManager.get(["_TKEY_WWW_RADIO_"+c.get("idstr")+"-header"],{userData:this.options.userData})];case 9:d=S.sent();if(d instanceof w.default)throw d;f=d[0].get("translate");t="_TKEY_WWW_playing_from_radio";n("radios/"+c.get("idstr"),f);return[3,19];case 10:h=e.model.get("originType");switch(h){case"user.favorites":return[3,12];
27case"communities.tracks":return[3,16]}return[3,11];case 11:t=void 0;return[3,18];case 12:m=this.options.userData.session.get("me");y=e.model.get("playSourceId");if(!m||y!==m.id)return[3,13];t="_TKEY_WWW_playing_from_your_favorite_tracks";n("user/"+y+"/"+m.dispname+"/favorites");return[3,15];case 13:t="_TKEY_WWW_playing_from_user_favorite_tracks";return[4,u.UserManager.getByAttribute({id:y},{userData:this.options.userData})];case 14:o=S.sent();if(o instanceof w.default)throw o;g=o[0];n("user/"+y+"/"+g.get("dispname")+"/favorites",g.get("dispname"));S.label=15;case 15:return[3,18];case 16:v=e.model.get("playSourceId");return[4,u.TagsManager.getByAttribute({id:v},{userData:this.options.userData})];case 17:o=S.sent();if(o instanceof w.default)throw o;_=o[0];x=_.get("name");if(!x)return[3,18];t="_TKEY_WWW_playing_from_community";n("community/"+x,"#"+x);return[3,18];case 18:return[3,19];case 19:if("string"!=typeof t||0===t.trim().length){this.model.set("sourceText","");return[2]}return[2,u.LocalizationManager.get([t],{userData:this.options.userData}).then(function(e){var t,n=e[0],i=(t=p.default.strings).sprintf.apply(t,[n.get("translate")].concat(r));M.model.set("sourceText",i)})]}})})};t.prototype.handlePauseEvent=function(){this.mediaController.pause();this.trigger(this.Event.UPDATE,this.model.get("origin"),this.model.get("status"))};t.prototype.handleRadioEvent=function(e){var t=this;this.handledPlayAndRadioEventCount+=1;var n=this.handledPlayAndRadioEventCount;if(this.model.get("origin").id){var i=new k(r.clone(this.model.get("origin")),this.model);this.updatePlaySourceText(i)}this.PlayerViews.mini.once(v.default.MiniPlayerViewEvents.RENDER,function(){if(n===t.handledPlayAndRadioEventCount){var e=new k(r.clone(t.model.get("origin")),t.model);t.updatePlaySourceText(e)}});var o=this.model.get("origin");this.model.set({mode:"radio"},{silent:!this.isDispatch});l.default.setMode(l.EPlayerMode.Radio);if("radio"!==o.type||o.id!==e.get("id")){this.medialistController&&this.medialistController.loop(x.LoopMode.None).shuffle(!1);var a=this.$(".js-player-control");a.removeClass("is-repeat");a.removeClass("is-repeat-one");a.removeClass("is-shuffle");e.get("playOnClick")().then(function(r){t.radioPlanning.next=null;t.radioPlanning.queue=e.get("trackList");e.attributes.firstTrack=r[0];e.attributes.firstTrack.set({startDate:t.radioPlanning.queue.first().get("datePlay")});t.model.set("origin",e.attributes);t.trigger(t.Event.UPDATE,o,t.model.get("status"));t._playRadio()})}else this._playRadio()};t.prototype.handleQueueEvent=function(e){var t=this.model.get("origin");if(e.ignoreOrigin||!(t.type!==e.type||t.id!==e.id||l.default.tracklistLength>=e.collection.length))if(e.ignoreOrigin&&"virtual"===e.type){e.collection.map(function(e){return e.get("id")}).indexOf(t.offset);l.default.clearTracklist().addToTracklist(e.collection.toArray())}else l.default.addToTracklist(e.collection.slice(l.default.tracklistLength).map(function(e){return new d.default(e.attributes)}))};t.prototype.render=function(){var t=this;this.options.userData;return e.prototype.render.call(this).then(function(){r.values(t.PlayerViews).forEach(function(e){e.setUserData(t.options.userData).render().then(function(e){t.$el.append(e.$el)})});return t})};t.prototype.getTemplateId=function(){return"/layout/player"};t.prototype.events=function(){return{"click .is-normal .js-player-previous":"onPreviousTrack","click .is-normal .js-player-next":"onNextTrack","click .is-normal .js-player-play-pause":"onPlayPauseTrack","click .is-normal .js-player-repeat":"onRepeatTracks","click .is-normal .js-player-shuffle":"onShuffleTracks","click .is-radio .js-player-play-pause":"onPlayPauseRadio","click .js-player-control button":"onClickControl","click .js-minimize-player":"onMinimizePlayer","click .js-maximize-player":"onMaximizePlayer","click .js-player-origin-link":"onClickOrigin","click .js-player-name":"goToCurrentTrack","click .js-player-artistId":"goToCurrentArtist",keydown:"onSpace","mousemove .js-player-volume-slider":"onMouseOverVolumeControl","change .js-player-volume-slider":"onChangeVolume","input .js-player-volume-slider":"onChangeVolume","click .js-player-volume-min":"onClickVolumeMin","click .js-player-volume-max":"onClickVolumeMax","click .js-player-volume":"onShowVolumeControl"}};t.prototype.onMinimizePlayer=function(e){"full"===this._currentPlayer&&this.setCurrentPlayer("mini")};t.prototype.onMaximizePlayer=function(e){"mini"===this._currentPlayer&&this.setCurrentPlayer("full")};t.prototype.onClickOrigin=function(e){this.onMinimizePlayer(e)};t.prototype.onPreviousTrack=function(e){this.model.get("position")<5?this.medialistController.previous():this.mediaController.position(0);this.model.set("position",0)};t.prototype.onNextTrack=function(e){this.medialistController.next()};t.prototype.onPlayPauseTrack=function(e){this.playPause()};t.prototype.onRepeatTracks=function(e){var t,r=this.$(".js-player-control");switch(this.medialistController.loopMode){case x.LoopMode.None:t=x.LoopMode.List;r.addClass("is-repeat");break;case x.LoopMode.List:t=x.LoopMode.Song;r.removeClass("is-repeat");r.addClass("is-repeat-one");break;case x.LoopMode.Song:t=x.LoopMode.None;r.removeClass("is-repeat-one")}this.medialistController.loop(t);a.trigger("STATS:PLAYER:REPEAT",{repeatMode:t,context:this._currentPlayer+"-player"})};t.prototype.onShuffleTracks=function(e){var t,r=this.$(".js-player-control");if(this.medialistController.isShuffle){t=!1;r.removeClass("is-shuffle")}else{t=!0;r.addClass("is-shuffle")}this.medialistController.shuffle(t);a.trigger("STATS:PLAYER:SHUFFLE",{shuffleMode:t?"on":"off",context:this._currentPlayer+"-player"})};t.prototype.onPlayPauseRadio=function(e){"play"===this.model.get("status")?this.mediaController.pause():this._playRadio()};
27t.prototype.onClickControl=function(e){var t=n(e.currentTarget);t.addClass("is-active");setTimeout(function(){t.removeClass("is-active")},800)};t.prototype.goToCurrentTrack=function(e){e.preventDefault();e.stopPropagation();var t=f.default.getUrl("track",{id:this.model.get("id").toString(),name:this.model.get("name")});a.trigger("navigate",{url:t});this.onMinimizePlayer(e)};t.prototype.goToCurrentArtist=function(e){var t=this;e.preventDefault();e.stopPropagation();u.ArtistsManager.get(this.model.get("artistId"),{userData:this.options.userData}).then(function(e){var r=f.default.getUrl("artist",{id:t.model.get("artistId").toString(),name:e[0].get("name")});a.trigger("navigate",{url:r});e[0].close()});this.onMinimizePlayer(e)};t.prototype.onSpace=function(e){if(32===e.keyCode){e.preventDefault();e.stopPropagation();"normal"===this.model.get("mode")?this.playPause():this.onPlayPauseRadio(e)}};t.prototype.onChangeVolume=function(e){var t=e.target.value/100;l.default.setVolume(t);this.model.set("volume",e.target.value);this.options.userData.session.set("volume",t);this.unmuteVolume=0;this.unmaxVolume=1;this.hideMiniPlayerVolumeControl();this.debouncedOnChangeVolume(t)};t.prototype.onClickVolumeMin=function(e){var t=100*this.unmuteVolume,r=l.default.getVolume();l.default.setVolume(this.unmuteVolume);this.model.set("volume",t);this.unmuteVolume=r;this.unmaxVolume=1;this.hideMiniPlayerVolumeControl();a.trigger("STATS:PLAYER:VOLUME",{volume:t,context:this._currentPlayer+"-player"})};t.prototype.onClickVolumeMax=function(e){var t=100*this.unmaxVolume,r=l.default.getVolume();l.default.setVolume(this.unmaxVolume);this.model.set("volume",t);this.unmuteVolume=0;this.unmaxVolume=r;this.hideMiniPlayerVolumeControl();a.trigger("STATS:PLAYER:VOLUME",{volume:t,context:this._currentPlayer+"-player"})};t.prototype.onShowVolumeControl=function(e){this.$(".js-player-volume-control").velocity({opacity:1},{display:"block"}).velocity("finish");this.hideMiniPlayerVolumeControl()};t.prototype.onMouseOverVolumeControl=function(e){this.hideMiniPlayerVolumeControl()};t.prototype.onResize=function(e){var t,r=this;if("radio"===this.model.get("mode")){var n=[];this.radioPlanning.current&&n.push(this.radioPlanning.current.get("trackId"));this.radioPlanning.next&&n.push(this.radioPlanning.next.get("trackId"));t=u.TracksManager.get(n,{userData:this.options.userData}).then(function(e){var t=e[0],n=e[1];t&&r.PlayerViews.full.preparePeaks(t,!1);r.PlayerViews.full.peakQueue=[];n&&r.PlayerViews.full.preparePeaks(n,!0);t.close();n.close()})}else this.model.get("id")&&(t=u.TracksManager.get(this.model.get("id"),{userData:this.options.userData}).then(function(e){if(e.length){r.PlayerViews.full.preparePeaks(e[0],!1);e[0].close()}}));t&&"play"!==this.model.get("status")&&t.then(function(){r.PlayerViews.full.updateWaveform()})};t.prototype._playRadio=function(){var e=this,t=this.findNextRadioTrack();if(t===this.radioPlanning.current){var r=(Date.now()-1e3*t.get("datePlay"))/t.get("duration");this.mediaController.positionPercent(r).play()}else{l.default.stop().clearTracklist();this.radioPlanning.next&&this.radioPlanning.queue.unshift(this.radioPlanning.next);this.radioPlanning.next=t;var n=this.model.get("origin"),i=n.firstTrack;this.isFirstRadioTrack=!0;l.default.addToTracklist([i]).play();this.PlayerViews.full.preparePeaks(i,!1);t.get("trackId")!==i.get("id")?u.TracksManager.get(t.get("trackId"),{userData:this.options.userData}).then(function(r){var n=r[0];n.set({startDate:t.get("datePlay")});e.isFirstRadioTrack=!0;l.default.clearTracklist().addToTracklist([n]);e.onResize({})}):this.radioPlanning.next=this.findNextRadioTrack()}};t.prototype.changeLang=function(){if(this.isDispatch){this.PlayerViews.mini.reRenderModelView();this.PlayerViews.full.reRenderModelView()}};Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._currentPlayer},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"currentPlayer",{get:function(){return this.PlayerViews[this._currentPlayer]},enumerable:!0,configurable:!0});t.prototype.setCurrentPlayer=function(e){this._currentPlayer=e;"full"===e&&a.trigger("STATS:PLAYER:OPEN",{context:"mini-player"});if(this.PlayerViews.full){if("full"===e){this.PlayerViews.full.$el.addClass("is-visible");this.scrollbarHidingToken=y.default.getInstance().hideScrollbar()}else{this.PlayerViews.full.$el.removeClass("is-visible");y.default.getInstance().showScrollbar({hidingToken:this.scrollbarHidingToken})}this.model.changed=this.model.attributes;this.model.trigger("change")}this.PlayerViews.mini&&this.hideMiniPlayerVolumeControl()};t.prototype.updatePlayerInfo=function(e){var t=this,n=r.clone(this.model.get("origin"));switch(n.type){case"track":n.id=e.get("id")}this.model.set({id:e.get("id"),artistId:e.get("artistId"),name:e.get("name"),duration:e.get("duration"),position:0,
27cover:e.get("cover"),listenedPercent:0,origin:n},{silent:!this.isDispatch});this.trigger(this.Event.UPDATE,n,this.model.get("status"));u.HistoryManager.addNewPlayEvent(e.get("id"),{userData:this.options.userData});a.trigger("STATS:PLAYER:PLAY",{id:e.get("id"),name:e.get("name"),context:this.model.get("context")});if("radio"===this.model.get("mode")){this.radioPlanning.current=this.radioPlanning.next;this.radioPlanning.next=this.radioPlanning.queue.shift();var i=this.isFirstRadioTrack?0:Math.random()*e.get("duration")*100;setTimeout(function(){u.TracksManager.get(t.radioPlanning.next.get("trackId"),{userData:t.options.userData}).then(function(e){var r=e[0];l.default.addToTracklist([r]);t.PlayerViews.full.preparePeaks(r,!0);t.isFirstRadioTrack=!1})},i)}else this.PlayerViews.full.preparePeaks(e,!1)};t.prototype.findNextRadioTrack=function(){var e=Date.now()/1e3;if(this.radioPlanning.next&&this.radioPlanning.next.get("datePlay")>e)return this.radioPlanning.current;for(var t=this.radioPlanning.next?this.radioPlanning.next:this.radioPlanning.queue.shift();this.radioPlanning.queue.first().get("datePlay")<e;)t=this.radioPlanning.queue.shift();return t};t.prototype.addToHistory=function(e,t){a.trigger("STATS:PLAYER:PLAY30",{id:e,name:t});var r={id:this.model.get("origin").id,type:this.model.get("origin").type,listTitle:this.model.get("origin").listTitle};u.HistoryManager.add(new M.default({trackId:e,event:"listen-30",eventDate:s().unix(),contextData:{origin:r}}),{userData:this.options.userData})};t.prototype.updateUVC=function(){var e=this.getUVC();this.model&&e&&this.getUVCTrackInfo().then(function(t){e.updateInfos(t,function(){""},function(){""})})};t.prototype.getUVC=function(){return"plugins"in window&&"LockScreenPlayer"in window.plugins?window.plugins.LockScreenPlayer:null};t.prototype.getUVCTrackInfo=function(){var e=this;return u.ArtistsManager.get(this.model.get("artistId"),{userData:this.options.userData}).then(function(t){var r=e.model.get("cover");return h.default.getImageDataFromUrl(r&&"object"==typeof r.small&&null!==r.small?r.small.size50:void 0).then(function(r){var n=t[0].get("name");t[0].close();return{artistName:n,albumName:"",cover:r,duration:e.model.get("duration"),isPlaying:"play"===e.model.get("status"),title:e.model.get("name"),currentDuration:e.model.get("position"),disablePrevNext:"normal"!==e.model.get("mode")}})})};t.prototype.close=function(){this.off(this.Event.PLAY);this.off(this.Event.RADIO);this.off(this.Event.PAUSE);this.off(this.Event.QUEUE);n(window).off("resize",this.resizeCallback);this.resizeCallback=null;var t=this.getUVC();if(t){t.removePlayer(function(){""},function(){""});t.off("ActionNext");t.off("ActionPrev");t.off("ActionPlay");t.off("ActionPause")}if(this.PlayerViews){this.PlayerViews.full.close();this.PlayerViews.mini.close();this.PlayerViews=null}if(this.radioPlanning){this.radioPlanning.queue.close();m.cleanObject(this.radioPlanning)}e.prototype.close.call(this)};t.playEventWithSameItemRules={track:function(e,t){return e.trackInfo.infos.id===t.model.get("id")},virtual:function(e,t){var r=t.model.get("tracklist");r||(r=t.model.collection);var n=("models"in r?r.models[t.model.get("offset")]:r[t.model.get("offset")]).get("id");return e.trackInfo.infos.id===n},album:function(e,t){return-1===t.model.get("offset")||e.trackInfo.infos.offset===t.model.get("offset")},playlist:function(e,t){return-1===t.model.get("offset")||e.trackInfo.infos.offset===t.model.get("offset")}};return t}(g.default);t.PlayerView=T;t.default=new T});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/tracks/item",["require","exports","underscore","../../../library/view/loading"],e)}(function(e,t){"use strict";
27Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/loading"),i=function(e){function t(t){var n=e.call(this,r.extend({context:"TRACKROW"},t))||this;n.options.templateVariables=Object.assign(n.options.templateVariables,{originType:t.originType,originId:t.originId});return n}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/tracks/item";this.model.get("isFeatured")&&(e="/partials/tracks/featuredItem");this.options.isCol&&(e="/partials/tracks/item-col");switch(this.options.templateStyle){case t.TemplateStyles.Licensing:e="/partials/tracks/musicForVideos"}return e};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var n,i=this.model.get("originId");if(!i)switch(this.options.type){case t.TrackItemType.Album:i=this.model.get("albumId");break;case t.TrackItemType.Playlist:i=this.options.playlistId;break;case t.TrackItemType.VirtualList:n="communities.tracks"===this.options.originType||"user.favorites"===this.options.originType?this.options.originId:this.options.virtualId;i=this.options.virtualId;break;default:i=this.model.get("id")}n="number"!=typeof n?i:n;var o=this.model.attributes;r.defaults(o,{listTitle:this.options.listTitle,type:this.options.type,offset:-1,originId:i,playSourceId:n,href:this.options.href,context:this.options.context},t.DefaultAttributes);this.model.set(o,{silent:!0})};t.DefaultAttributes={listTitle:"",offset:0,type:"",href:"",context:""};t.TemplateStyles={Licensing:"licensing"};t.TrackItemType={Album:"album",Artist:"artist",Playlist:"playlist",VirtualList:"virtual",Default:"track"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/player/queue",["require","exports","../../../library/view/overlays","../../../library/utilities/object","ribsjs","../../layout/player","../../partials/tracks/item","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("../../../library/utilities/object"),i=e("ribsjs"),o=i.EventsManager,a=e("../../layout/player"),s=e("../../partials/tracks/item"),l=e("underscore"),u=function(e){function t(r){return e.call(this,l.defaults(r,t.DefaultOptions))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/player/queue"};t.prototype.events=function(){return l.extend({"click li.track>a":"onClickTrack"},e.prototype.events.call(this))};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.collection=new i.Collection([])};t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);var r=this.options.origin;r=Object.assign({context:"QUEUE"},r);this.options.ModelViewOptions.origin=r;switch(r.type){case s.default.TrackItemType.Playlist:this.options.ModelViewOptions.playlistId=r.id;break;case s.default.TrackItemType.VirtualList:this.options.ModelViewOptions.virtualId=r.id}this.collection.set(this.options.trackList.map(function(e,r){return e.getModelProjection().set({tracklist:t.options.fullTracklist,originId:t.options.origin.id,originType:t.options.origin.type,type:t.options.origin.type,offset:t.options.origin.offset+r},{silent:!0})}))};t.prototype.onClickTrack=function(e){e.preventDefault();var t=e.currentTarget.pathname;t&&o.trigger("navigate",{url:t});a.default.onMinimizePlayer(e);this.close()};t.prototype.close=function(){this.collection&&n.closeModel(this.collection.models);e.prototype.close.call(this)};t.DefaultOptions={ModelView:s.default,ModelViewOptions:{templateVariables:{from:"player",fromId:"queue"}},listSelector:".js-queue-tracks",closeCollectionOnClose:!1};return t}(r.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/tracks/list",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";
27Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/tracks/list"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/history/day",["require","exports","../../../managers/manager","ribsjs","underscore","../tracks/list","../tracks/item","../../../library/utilities/object"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../managers/manager"),n=e("ribsjs"),i=e("underscore"),o=e("../tracks/list"),a=e("../tracks/item"),s=e("../../../library/utilities/object"),l=function(e){function t(r){var n=e.call(this,i.defaults(r,t.DefaultOptions))||this;n.isDisplayed=!1;return n}__extends(t,e);t.prototype.dateComparison=function(e){return-e.get("eventDate")};t.prototype.getTemplateId=function(){return"/partials/history/day"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.collection=new n.Collection([],{comparator:this.dateComparison})};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.listenTo(this.model,"change",this.display)}
28;t.prototype.display=function(){var e=this;if(!this.isDisplayed){this.isDisplayed=!0;var t=this.model.get("trackHistory"),n=t.map(function(e){return e.get("trackId")});r.TracksManager.get(n,{userData:this.options.userData}).then(function(r){t.forEach(function(t){var n=t.get("trackId"),o=r.filter(function(e){return e.get("id")===n})[0];if(o){var a=t.get("contextData"),s="origin"in a?a.origin:{id:n};e.collection.add(i.extend({originId:s.id,type:s.type,trackList:[n],listTitle:s.listTitle,eventDate:t.get("eventDate"),history:!0},o.attributes,{cover:{small:{size50:"/blank.png"}}}))}});s.closeModel(r)})}};t.prototype.close=function(){this.stopListening(this.model,"change",this.display);e.prototype.close.call(this)};t.DefaultOptions={listSelector:".js-history-daily-tracks",ModelView:a.default,ModelViewOptions:{templateVariables:{from:"player",fromId:"history"}},reRenderOnChange:!0};return t}(o.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/history/text",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){var e="";this.options.isLogged&&this.options.isEmpty&&(e="/partials/history/emptyLogged");!this.options.isLogged&&this.options.isEmpty&&(e="/partials/history/emptyNotLogged");this.options.isLogged||this.options.isEmpty||(e="/partials/history/notEmptyNotLogged");return e};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/player/history",["require","exports","underscore","ribsjs","moment","../../../library/view/overlays","../../../library/model/model","../../../managers/manager","FSPromise","chrisweb-utilities","../../../library/utilities/display","../../../library/utilities/user","../../layout/player","../../partials/history/day","../../partials/history/text","../../overlays"],e)}(function(e,t){"use strict";
28Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("moment"),a=e("../../../library/view/overlays"),s=e("../../../library/model/model"),l=e("../../../managers/manager"),u=e("FSPromise"),c=u.FSPromise,d=e("chrisweb-utilities"),p=e("../../../library/utilities/display"),f=e("../../../library/utilities/user"),h=e("../../layout/player"),m=e("../../partials/history/day"),y=e("../../partials/history/text"),g=e("../../overlays"),v=function(e){function t(n){var i=e.call(this,r.defaults(n,t.DefaultOptions))||this;i.historyIndex=0;return i}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/player/history"};t.prototype.events=function(){return r.extend({"click .js-button-older-history":"displayMore","click li.track>a":"onClickTrack","click .js-loggedrequired-signin":"onClickSignin","click .js-loggedrequired-create":"onClickCreate"},e.prototype.events.call(this))};t.prototype.render=function(){var t=this;return e.prototype.render.call(this).then(function(){return l.HistoryManager.getByAttribute({event:"listen-30"},{userData:t.options.userData,fetchById:d.default.isClient()})}).then(function(e){var n=f.default.getUserLanguage(t.options.userData);o.locale(n);var i=r.groupBy(e,function(e){var t=e.get("eventDate");new Date(1e3*t).getFullYear()>(new Date).getFullYear()&&(t/=1e3);return o.unix(t).format("L")});t.collection.add(Object.keys(i).map(function(e){return new s.default({date:e,trackHistory:i[e],display:"hidden"})}));return c.all([t.updatePromise]).then(function(){t.displayMore();t.displayText()})}).then(function(){return t})};t.prototype.displayMore=function(e){for(var t=0;this.historyIndex<this.collection.length&&t<this.options.entitiesPerRequest;){t+=this.collection.models[this.historyIndex].get("trackHistory").length;this.collection.models[this.historyIndex++].set({display:""})}this.historyIndex!==this.collection.length&&this.$el.find(".js-button-older-history").removeClass("hidden")};t.prototype.displayText=function(){var e="userData"in this.options&&"session"in this.options.userData&&this.options.userData.session.get("me");if(!this.collection.length||!e){var t=new y.default({isLogged:e,isEmpty:!this.collection.length,userData:this.options.userData});this.addView(".js-history-text",t)}};t.prototype.onClickTrack=function(e){e.preventDefault();var t=e.currentTarget.pathname;t&&i.trigger("navigate",{url:t});h.default.onMinimizePlayer(e);this.close()};t.prototype.onClickSignin=function(e){var t=this;g.default.add(g.default.DefinitionPath.LoginSignin,{userData:this.options.userData,overlaySelector:"#skeleton-overlay",transparentBackground:!0}).then(function(){t.close()})};t.prototype.onClickCreate=function(e){var t=this;g.default.add(g.default.DefinitionPath.LoginCreateAccount,{userData:this.options.userData}).then(function(){t.close()})};t.DefaultOptions={ModelView:m.default,ModelViewOptions:{},collection:new n.Collection,listSelector:".js-history-days",entitiesPerRequest:p.default.getMaxEntitiesCount("InfiniteTrack",!1)};return t}(a.default);t.default=v});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/user/deleteartists",["require","exports","../../../library/view/overlays","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("underscore"),i=function(e){function t(t){var r=e.call(this,t)||this;r.Events={DELETE_ARTISTS_AGREE:"deleteartists:agree",DELETE_ARTISTS_CANCEL:"deleteartists:cancel"};return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/user/deleteartists"};t.prototype.events=function(){return n.extend(e.prototype.events.call(this),{"click .js-deleteartists-agree":"onAgree","click .js-deleteartists-cancel":"onCancel"})};t.prototype.onAgree=function(e){e.preventDefault();this.trigger(this.Events.DELETE_ARTISTS_AGREE);this.close()};t.prototype.onCancel=function(e){e.preventDefault();this.trigger(this.Events.DELETE_ARTISTS_CANCEL);this.close()};
28t.prototype.onClickClose=function(){this.trigger(this.Events.DELETE_ARTISTS_CANCEL);e.prototype.close.call(this)};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/user/deleteuserconfirmation",["require","exports","../../../library/view/overlays","ribsjs","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("ribsjs"),i=n.EventsManager,o=e("underscore"),a=function(e){function t(t){var r=e.call(this,t)||this;r.Events={DELETE_AGREE:"deleteuser:agree",DELETE_CANCEL:"deleteuser:cancel"};return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/user/deleteuserconfirmation"};t.prototype.events=function(){return o.extend(e.prototype.events.call(this),{"click .js-deleteuser-agree":"onAgree","click .js-deleteuser-cancel":"onCancel"})};t.prototype.onAgree=function(e){e.preventDefault();i.trigger("STATS:ACCOUNT:DELETE",{id:this.model.get("id")});this.trigger(this.Events.DELETE_AGREE);this.close()};t.prototype.onCancel=function(e){e.preventDefault();this.trigger(this.Events.DELETE_CANCEL);this.close()};t.prototype.onClickClose=function(){this.trigger(this.Events.DELETE_CANCEL);e.prototype.close.call(this)};return t}(r.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/image/edit",["require","exports","underscore","../../../library/dialog/toast","../../../managers/manager","../../../managers/user","../../../library/view/overlays","../../../configuration/configuration","../../../library/utilities/image","../../../models/manager/user","../../../models/manager/artist","FSEventDispatcher"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/dialog/toast"),i=e("../../../managers/manager"),o=e("../../../managers/user"),a=e("../../../library/view/overlays"),s=e("../../../configuration/configuration"),l=e("../../../library/utilities/image"),u=e("../../../models/manager/user"),c=e("../../../models/manager/artist"),d=e("FSEventDispatcher"),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/image/edit"};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"change #image-upload-file":"readFile","click .js-crop-image":"onClickCrop","click .rotate-cw-btn":"onClickRotateCW","click .rotate-ccw-btn":"onClickRotateCCW"})};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var r=this.options.type;this.options.templateVariables=t.CropInfo[r].translationKeys};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$imageCropper=this.$("#croppie-preview")};t.prototype.readFile=function(e){var t=this,r=e.target;i.LocalizationManager.get("_LOADING",{userData:this.options.userData}).then(function(e){n.show(e[0].get("translate"),n.Delay.Short,n.Position.Center);e[0].close()});if(r.files&&r.files[0]){var o=new FileReader;o.onload=function(e){t.$imageCropper.croppie("bind",{url:e.target.result});t.$(".js-image-loaded").removeClass("hidden")};o.readAsDataURL(r.files[0])}};t.prototype.onClickRotateCW=function(e){this.$imageCropper.croppie("rotate",90)};t.prototype.onClickRotateCCW=function(e){this.$imageCropper.croppie("rotate",-90)};t.prototype.onClickCrop=function(e){var r=this;this.$(".js-crop-image").addClass("is-disabled");var a=this.options.type,s=this.model.get("dispname")||this.model.get("idstr"),p=s.trim().toLowerCase()+Date.now()+".png",f=t.CropInfo[a].url;this.$imageCropper.croppie("result",{type:"base64",size:t.CropInfo[a].dimensions}).then(function(e){var s=function(){r.$(".js-crop-image").removeClass("is-disabled");i.UserManager.trigger(o.UserManager.Event.UserAvatar,{image:e,type:a});i.LocalizationManager.get("_TKEY_WWW_USER_avatar-uploaded",{userData:r.options.userData}).then(function(e){n.show(e[0].get("translate")||"_TKEY_WWW_USER_avatar-uploaded");e[0].close();r.close()})},h=r.options.userData,m=r.options.artistId,y=d.default.Mediator.triggerResult(t.UploadEvent,p,e,f,s,{userData:h,artistId:m});if(!y.length||-1!==y.indexOf(!0)){var g=l.default.dataURLtoFile(e,p),v=new FormData;v.append("userAvatar",g);if(m){v.append("artistId",(m||"").toString());new c.default({},{url:f}).save({},{processData:!1,contentType:!1,data:v,userData:h,wait:!0,success:s,error:function(e,t){r.$(".js-crop-image").removeClass("is-disabled")}})}else{new u.default({},{url:f}).save({},{processData:!1,contentType:!1,data:v,userData:h,wait:!0,success:s,error:function(e,t){r.$(".js-crop-image").removeClass("is-disabled")}})}}})};t.prototype.close=function(){this.$imageCropper&&this.$imageCropper.croppie("destroy");e.prototype.close.call(this)};t.UploadEvent="transfer:file";
28t.CropInfo={profile:{ratio:1,type:"circle",dimensions:{height:600,width:600},translationKeys:{title:"_TKEY_WWW_AVATAR_heading-profile",text:"_TKEY_WWW_AVATAR_upload-text-profile"},url:s.default.api.getUrl(s.default.api.methods.userAvatar)},userCover:{ratio:3,type:"square",dimensions:{height:640,width:1920},translationKeys:{title:"_TKEY_WWW_AVATAR_heading-cover",text:"_TKEY_WWW_AVATAR_upload-text-cover"},url:s.default.api.getUrl(s.default.api.methods.userHero)},artistCover:{ratio:3,type:"square",dimensions:{height:640,width:1920},translationKeys:{title:"_TKEY_WWW_AVATAR_heading-cover",text:"_TKEY_WWW_AVATAR_upload-text-cover"},url:s.default.api.getUrl(s.default.api.methods.artistHero)}};return t}(a.default);t.default=p});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/notification/objectNotFound",["require","exports","../../../library/view/overlays"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/notification/objectNotFound"};return t}(r.default);t.NotificationObjectNotFoundOverlayView=n;t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/update/recommendation",["require","exports","underscore","ribsjs","../../../library/view/overlays"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../library/view/overlays"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/update/recommendation"};t.prototype.render=function(){return e.prototype.render.call(this)};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-confirm-button":"onConfirm"})};t.prototype.onClose=function(){e.prototype.onClose.call(this);i.trigger("updateOverlayClosed")};t.prototype.onConfirm=function(){this.close()};return t}(o.default);t.UpdateRecommendationOverlayView=a;t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/update/mandatory",["require","exports","underscore","../../../library/view/overlays","../../../library/utilities/app"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/overlays"),i=e("../../../library/utilities/app"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/update/mandatory"};t.prototype.render=function(){return e.prototype.render.call(this)};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"click .js-confirm-button":"onConfirm"})};t.prototype.onConfirm=function(){var e=i.getAppStoreLink();"string"==typeof e&&e.length>0&&window.open(e,"_system")};return t}(n.default);t.MandatoryUpdateOverlayView=o;t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/update/requestStatusReportingPermission",["require","exports","../../../library/view/overlays","underscore"],e)}(function(e,t){"use strict";
28Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/overlays"),n=e("underscore"),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/update/requestStatusReportingPermission"};t.prototype.events=function(){return n.extend(e.prototype.events.call(this),{"click .js-requeststatusreportingpermission-agree":"onAgree","click .js-requeststatusreportingpermission-disagree":"onDisagree"})};t.prototype.answer=function(){var e=this;return new Promise(function(r){e.once(t.Events.ALLOWED,function(){return r(!0)});e.once(t.Events.NOT_ALLOWED,function(){return r(!1)})})};t.prototype.onAgree=function(e){e.preventDefault();this.trigger(t.Events.ALLOWED);this.close()};t.prototype.onDisagree=function(e){e.preventDefault();this.trigger(t.Events.NOT_ALLOWED);this.close()};t.prototype.onClickClose=function(){this.trigger(t.Events.NOT_ALLOWED);e.prototype.close.call(this)};t.Events={ALLOWED:"requeststatusreportingpermission:agree",NOT_ALLOWED:"requeststatusreportingpermission:cancel"};return t}(r.default);t.default=i});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays",["require","exports","./overlays/login/createaccount","./overlays/login/createaccount/confirm","./overlays/login/createaccount/informations","./overlays/login/createaccount/signupSubscriptionSettings","./overlays/login/passwordrecoveryoverlay","./overlays/login/passwordrecovery/form","./overlays/login/passwordrecovery/success","./overlays/login/redirection","./overlays/login/signin","./overlays/login/loggedrequire","./overlays/social/mergeaccount","./overlays/social/review","./overlays/social/comment","./overlays/social/deleteCommentConfirmation","./overlays/download/download","./overlays/playlist/add","./overlays/playlist/edit","./overlays/playlist/deleteplaylistconfirmation","./overlays/social/sharePrivatePlaylist","./overlays/social/share","./overlays/player/queue","./overlays/player/history","./overlays/user/deleteartists","./overlays/user/deleteuserconfirmation","./overlays/user/subscriptionSettings","./overlays/image/edit","./overlays/notification/objectNotFound","./overlays/update/recommendation","./overlays/update/mandatory","./overlays/update/requestStatusReportingPermission","./layout"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("./overlays/login/createaccount"),i=e("./overlays/login/createaccount/confirm"),o=e("./overlays/login/createaccount/informations"),a=e("./overlays/login/createaccount/signupSubscriptionSettings"),s=e("./overlays/login/passwordrecoveryoverlay"),l=e("./overlays/login/passwordrecovery/form"),u=e("./overlays/login/passwordrecovery/success"),c=e("./overlays/login/redirection"),d=e("./overlays/login/signin"),p=e("./overlays/login/loggedrequire"),f=e("./overlays/social/mergeaccount"),h=e("./overlays/social/review"),m=e("./overlays/social/comment"),y=e("./overlays/social/deleteCommentConfirmation"),g=e("./overlays/download/download"),v=e("./overlays/playlist/add"),_=e("./overlays/playlist/edit"),b=e("./overlays/playlist/deleteplaylistconfirmation"),w=e("./overlays/social/sharePrivatePlaylist"),x=e("./overlays/social/share"),M=e("./overlays/player/queue"),S=e("./overlays/player/history"),k=e("./overlays/user/deleteartists"),T=e("./overlays/user/deleteuserconfirmation"),A=e("./overlays/user/subscriptionSettings"),E=e("./overlays/image/edit"),P=e("./overlays/notification/objectNotFound"),O=e("./overlays/update/recommendation"),j=e("./overlays/update/mandatory"),D=e("./overlays/update/requestStatusReportingPermission"),C=e("./layout");!function(e){function t(e,t){var n=new r[e](t);return C.default.getInstance().addOverlays(n).then(function(){return n})}e.DefinitionPath={LoginCreateAccount:"LoginCreateAccount",LoginCreateAccountConfirm:"LoginCreateAccountConfirm",LoginCreateAccountInformations:"LoginCreateAccountInformations",LoginCreateAccountSubscriptionSettings:"LoginCreateAccountSubscriptionSettings",LoginPasswordRecovery:"LoginPasswordRecovery",LoginPasswordRecoveryForm:"LoginPasswordRecoveryForm",LoginPasswordRecoverySuccess:"LoginPasswordRecoverySuccess",
28LoginRedirection:"LoginRedirection",LoginSignin:"LoginSignin",LoginRequire:"LoginRequire",WriteReview:"WriteReview",WriteComment:"WriteComment",DeleteComment:"DeleteComment",Download:"Download",AddToPlaylist:"AddToPlaylist",EditPlaylist:"EditPlaylist",DeletePlaylist:"DeletePlaylist",SharePrivatePlaylist:"SharePrivatePlaylist",Share:"Share",SocialMergeAccount:"SocialMergeAccount",PlayerQueue:"PlayerQueue",PlayerHistory:"PlayerHistory",DeleteArtists:"DeleteArtists",DeleteUser:"DeleteUser",SubscriptionSettings:"SubscriptionSettings",EditImage:"EditImage",NotificationObjectNotFoundOverlay:"NotificationObjectNotFoundOverlay",UpdateRecommendation:"UpdateRecommendation",UpdateMandatory:"UpdateMandatory",RequestErrorReportingPermission:"RequestErrorReportingPermission"};var r={LoginCreateAccount:n.default,LoginCreateAccountConfirm:i.default,LoginCreateAccountInformations:o.default,LoginCreateAccountSubscriptionSettings:a.default,LoginPasswordRecovery:s.default,LoginPasswordRecoveryForm:l.default,LoginPasswordRecoverySuccess:u.default,LoginRedirection:c.default,LoginSignin:d.default,LoginRequire:p.default,WriteReview:h.default,WriteComment:m.default,DeleteComment:y.default,Download:g.default,AddToPlaylist:v.default,EditPlaylist:_.default,DeletePlaylist:b.default,SharePrivatePlaylist:w.default,Share:x.default,SocialMergeAccount:f.default,PlayerQueue:M.default,PlayerHistory:S.default,DeleteArtists:k.default,DeleteUser:T.default,SubscriptionSettings:A.default,EditImage:E.default,NotificationObjectNotFoundOverlay:P.default,UpdateRecommendation:O.default,UpdateMandatory:j.default,RequestErrorReportingPermission:D.default};e.add=t}(r=t.Overlays||(t.Overlays={}));t.default=r});!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("notif-server/bundle",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;t.app=e()}}(function(){var e;return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}};
28Object.defineProperty(r,"__esModule",{value:!0});var s=e("lib/core/event/EventEmitter"),l=function(e){function t(t){var r=e.call(this)||this;r.callback=t;return r}n(t,e);t.prepare=function(e){return function(t){function r(){return t.call(this,e)||this}n(r,t);return r}(t)};t.prototype.standby=function(){return i(this,void 0,void 0,function(){return o(this,function(e){return[2]})})};t.prototype.publish=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(this,void 0,void 0,function(){var t,r,n,i,s,l,u,c;return o(this,function(o){switch(o.label){case 0:n=new Map;i=[];try{for(s=a(e),l=s.next();!l.done;l=s.next()){u=l.value;n.set(u,u.notifyPublishingStarted(this));i.push(u.item)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}o.label=1;case 1:o.trys.push([1,3,,4]);return[4,this.callback(i.map(function(e){return e.notifications}))];case 2:o.sent();return[3,4];case 3:c=o.sent();n.forEach(function(e,t){return t.notifyPublishingFailed(e,c)});return[2];case 4:n.forEach(function(e,t){return t.confirmPublished(e)});return[2]}})})};return t}(s.EventEmitter);r.CallbackPublisher=l;r.default=l},{"lib/core/event/EventEmitter":28}],2:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},l=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},c=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e};Object.defineProperty(r,"__esModule",{value:!0})
29;var d=e("app/client/createClientApp"),p=e("app/client/createNetworkingApp"),f=e("lib/core/application/Application"),h=e("lib/core/event/EventEmitter"),m=e("lib/core/gc"),y=e("lib/core/utils"),g=e("app/client/MasterSlaveBroker"),v=e("app/client/indexedDBConfig"),_=e("lib/protocol/indexeddb/IndexedDBClient"),b=e("app/common/NotificationState"),w=e("app/common/NotificationType"),x=e("app/common/legalNotificationStateMutations"),M=e("app/client/runtimeIdentifier"),S=e("lib/core/utils"),k=e("app/common/EnvironmentVariables"),T=e("app/client/SharedEventLog"),A=function(e){function t(t){var r=e.call(this)||this;r.config=t;r.running=!1;return r}n(t,e);t.prototype.destroy=function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.isRunning()?[4,this.stop(!1)]:[3,2];case 1:e.sent();e.label=2;case 2:m.IDisposable.disposeOf(this);return[2]}})})};t.prototype.dispose=function(){this.isRunning()&&this.stop(!1);m.IDisposable.disposeOf(this.masterSlaveBroker,this.sharedEventLog,this.indexedDBClient);e.prototype.dispose.call(this)};t.prototype.isRunning=function(){return this.running};t.prototype.getMasterSlaveState=function(){return a(this,void 0,void 0,function(){return s(this,function(e){return this.isRunning()?[2,this.masterSlaveBroker.getCurrentTabType()]:[2,void 0]})})};t.prototype.start=function(){return a(this,void 0,void 0,function(){var e,t,r,n,i=this;return s(this,function(o){switch(o.label){case 0:if(this.isRunning())throw new Error("Cannot start notification client: Already running.");e=this;t=T.SharedEventLog.bind;return[4,this.getIndexedDBClient()];
29case 1:e.sharedEventLog=new(t.apply(T.SharedEventLog,[void 0,o.sent(),"shared-event-log",M.getCurrentRuntimeIdentifier()]));return[4,this.sharedEventLog.on("incomingEvent",this.handleIncomingSharedEvent.bind(this))];case 2:o.sent();return[4,this.sharedEventLog.startListening()];case 3:o.sent();r=this;n=g.MasterSlaveBroker.bind;return[4,this.getIndexedDBClient()];case 4:r.masterSlaveBroker=new(n.apply(g.MasterSlaveBroker,[void 0,o.sent(),S.getEnv(k.EnvironmentVariables.ClientIndexedDBMasterSlaveBrokerStoreName,"master-slave-broker"),void 0,void 0,M.getCurrentRuntimeIdentifier()]));return[4,this.masterSlaveBroker.on("ownTabTypeChanged",function(e){var t=e.newType;return i.updateRunningApps(1===t)})];case 5:o.sent();return[4,this.masterSlaveBroker.autoRegisterTab()];case 6:o.sent();this.running=!0;if("function"!=typeof this.onBeforeUnloadHandler){this.onBeforeUnloadHandler=function(){try{i.stop(!1)}catch(e){}};window.addEventListener("beforeunload",this.onBeforeUnloadHandler)}return[2]}})})};t.prototype.updateRunningApps=function(e){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return e?[4,this.ensureNetworkingStarted()]:[3,2];case 1:t.sent();return[3,4];case 2:return[4,this.ensureNetworkingStopped()];case 3:t.sent();t.label=4;case 4:return[4,this.ensureClientStarted()];case 5:t.sent();return[2]}})})};t.prototype.ensureNetworkingStarted=function(){return a(this,void 0,void 0,function(){var e,t,r,n=this;return s(this,function(i){switch(i.label){case 0:if(this.networkingApp instanceof f.Application)return[2];e=this;t=p.createNetworkingApp;r=[this.config.getCookie];return[4,this.getIndexedDBClient()];case 1:e.networkingApp=t.apply(void 0,r.concat([i.sent()]));this.networkingApp.dispatcher.on("feedSourceOnline",function(){return n.emit("feedSourceOnline",void 0)});this.networkingApp.dispatcher.on("feedSourceOffline",function(){return n.emit("feedSourceOffline",void 0)});return[4,this.networkingApp.start()];case 2:i.sent();return[2]}})})};t.prototype.ensureNetworkingStopped=function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.networkingApp instanceof f.Application?[4,this.networkingApp.stop()]:[2];case 1:e.sent();m.IDisposable.disposeOf(this.networkingApp);this.networkingApp=void 0;return[2]}})})};t.prototype.ensureClientStarted=function(){return a(this,void 0,void 0,function(){var e,t,r,n=this;return s(this,function(i){switch(i.label){case 0:if(this.clientApp instanceof f.Application)return[2];e=this;t=d.createClientApp;r=[function(e){return a(n,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:e=e.map(function(e){return e.filter(function(e){var t=e.state,r=e.type;return t!==b.NotificationState.Void&&r!==w.NotificationType.Void})});return[4,this.emit("incomingNotifications",e)];case 1:t.sent();return[2]}})})}];return[4,this.getIndexedDBClient()];case 1:e.clientApp=t.apply(void 0,r.concat([i.sent()]));return[4,this.clientApp.start()];case 2:i.sent();return[2]}})})};t.prototype.ensureClientStopped=function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.clientApp instanceof f.Application?[4,this.clientApp.stop()]:[2];case 1:e.sent();m.IDisposable.disposeOf(this.clientApp);this.clientApp=void 0;return[2]}})})};t.prototype.stop=function(e){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:if(!this.isRunning())throw new Error("Cannot stop notification client: Not running.");if(this.onBeforeUnloadHandler instanceof Function){window.removeEventListener("beforeunload",this.onBeforeUnloadHandler);this.onBeforeUnloadHandler=void 0}return[4,this.sharedEventLog.publishSharedEvent("notifSystemClientStopped",{globalStopRequested:e})];case 1:t.sent();return[4,this.ensureNetworkingStopped()];case 2:t.sent();return[4,this.ensureClientStopped()];case 3:t.sent();return[4,this.masterSlaveBroker.unregisterTabIfNecessary()];case 4:t.sent();return[4,this.sharedEventLog.stopListening()];case 5:t.sent();m.IDisposable.disposeOf(this.masterSlaveBroker,this.sharedEventLog);this.running=!1;return[2]}})})};t.prototype.updateNotificationState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(this,void 0,void 0,function(){var t,r,n,i,o,a,u,c,d;return s(this,function(s){switch(s.label){case 0:s.trys.push([0,7,8,9]);n=l(e),i=n.next();s.label=1;case 1:if(i.done)return[3,6];o=i.value,a=o.notificationGroup,u=o.newState;s.label=2;case 2:s.trys.push([2,4,,5]);return[4,this.tryPrepareNotificationStateUpdate(a,u)];case 3:s.sent();return[3,5];case 4:c=s.sent();return[3,5];case 5:i=n.next();return[3,1];case 6:return[3,9];case 7:d=s.sent();t={error:d};return[3,9];case 8:try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}
29return[7];case 9:return[4,this.publishNotificationStateChanges()];case 10:s.sent();return[2]}})})};t.prototype.handleIncomingSharedEvent=function(e){return a(this,void 0,void 0,function(){var t,r,n;return s(this,function(i){switch(i.label){case 0:t=e.eventName;r=t;switch(r){case"notifSystemClientStopped":return[3,2]}return[3,1];case 1:return[3,5];case 2:n=this.sharedEventLog.typeCastPayload(e.payload);return n.globalStopRequested?[4,this.stop(!1)]:[3,4];case 3:i.sent();i.label=4;case 4:return[3,5];case 5:return[2]}})})};t.prototype.tryPrepareNotificationStateUpdate=function(e,t){return a(this,void 0,void 0,function(){var r,n,i,o,a,u,c;return s(this,function(s){switch(s.label){case 0:s.trys.push([0,7,8,9]);i=l(e),o=i.next();s.label=1;case 1:if(o.done)return[3,6];a=o.value;s.label=2;case 2:s.trys.push([2,4,,5]);return[4,this.prepareNotificationStateUpdate(a,t)];case 3:s.sent();return[3,5];case 4:u=s.sent();return[3,5];case 5:o=i.next();return[3,1];case 6:return[3,9];case 7:c=s.sent();r={error:c};return[3,9];case 8:try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}return[7];case 9:return[2]}})})};t.prototype.prepareNotificationStateUpdate=function(e,t){return a(this,void 0,void 0,function(){var r,n,i,o,a,u,c,d,p,f,h,m,g,v,_,b,w,M,M;return s(this,function(s){switch(s.label){case 0:a=e.object,u=e.subjects,c=e.type;return[4,this.getIndexedDBClient()];case 1:d=s.sent();return[4,d.connectIfNecessary()];case 2:s.sent();return[4,d.getAll(S.getEnv(k.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"))];case 3:p=s.sent();try{for(m=l(p),g=m.next();!g.done;g=m.next()){v=g.value;try{for(_=l(v.notifications),b=_.next();!b.done;b=_.next()){w=b.value;if(w.object===a&&w.type===c&&y.arrayEquals(w.subjects,u)){f=v;h=w;break}}}catch(e){i={error:e}}finally{try{b&&!b.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}if("object"!=typeof h||null===h)throw new Error("Cannot update notification state: Notification not found.");if(h.state===t)return[2];if(!x.legalNotificationStateMutations.get(h.state)||0===x.legalNotificationStateMutations.get(h.state).length){M="Notification update rejected: No known legal mutations for current notification state ("+h.state
29+").";throw new Error(M)}if(-1===x.legalNotificationStateMutations.get(h.state).indexOf(t)){M="Notification update rejected: Illegal state mutation from '"+h.state+"' to '"+t+"' requested.";throw new Error(M)}h.state=t;f.stateChanged=!0;return[4,d.put({storeName:S.getEnv(k.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"),data:f})];case 4:s.sent();return[2]}})})};t.prototype.publishNotificationStateChanges=function(){return a(this,void 0,void 0,function(){var e,t,r,n;return s(this,function(i){switch(i.label){case 0:return[4,this.getIndexedDBClient()];case 1:e=i.sent();return[4,e.connectIfNecessary()];case 2:i.sent();return[4,e.getAll(S.getEnv(k.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"))];case 3:t=i.sent();r=-1!==t.findIndex(function(e){return!0===e.stateChanged});if(!r)return[2];t.forEach(function(e){var t=e.seenBy.indexOf(M.getCurrentRuntimeIdentifier());-1!==t&&e.seenBy.splice(t,1)});n=S.getEnv(k.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications");return[4,e.putMultiple.apply(e,c(t.map(function(e){return{storeName:n,data:e}})))];case 4:i.sent();return this.networkingApp instanceof f.Application?[4,this.networkingApp.dispatcher.triggerFeedForage()]:[3,6];case 5:i.sent();return[3,8];case 6:return this.clientApp instanceof f.Application?[4,this.clientApp.dispatcher.triggerFeedForage()]:[3,8];case 7:i.sent();i.label=8;case 8:return[2]}})})};t.prototype.getIndexedDBClient=function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:this.indexedDBClient=this.indexedDBClient||new _.IndexedDBClient(new v.indexedDBConfig);return[4,this.indexedDBClient.connectIfNecessary()];case 1:e.sent();return[2,this.indexedDBClient]}})})};t.networkingStartStopCallSequence=y.sequentializeCalls.createCallSequence();t.clientStartStopCallSequence=y.sequentializeCalls.createCallSequence();i([y.sequentializeCalls(t.networkingStartStopCallSequence),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Promise)],t.prototype,"ensureNetworkingStarted",null);i([y.sequentializeCalls(t.networkingStartStopCallSequence),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Promise)],t.prototype,"ensureNetworkingStopped",null);i([y.sequentializeCalls(t.clientStartStopCallSequence),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Promise)],t.prototype,"ensureClientStarted",null);i([y.sequentializeCalls(t.clientStartStopCallSequence),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Promise)],t.prototype,"ensureClientStopped",null);i([y.debounce(100,"trailing"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Promise)],t.prototype,"publishNotificationStateChanges",null);return t}(h.EventEmitter);r.JamendoNotificationSystemClient=A;r.default=A},{"app/client/MasterSlaveBroker":3,"app/client/SharedEventLog":5,"app/client/createClientApp":7,"app/client/createNetworkingApp":8,"app/client/indexedDBConfig":9,"app/client/runtimeIdentifier":10,"app/common/EnvironmentVariables":11,"app/common/NotificationState":13,"app/common/NotificationType":14,"app/common/legalNotificationStateMutations":15,"lib/core/application/Application":17,"lib/core/event/EventEmitter":28,"lib/core/gc":34,"lib/core/utils":50,"lib/protocol/indexeddb/IndexedDBClient":58}],3:[function(e,t,r){"use strict";function n(e,t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t(a))return a}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}var i=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}};
29Object.defineProperty(r,"__esModule",{value:!0});var l=e("lib/core/gc"),u=e("lib/core/utils"),c=e("lib/core/event/EventEmitter"),d=function(e){function t(t,r,n,i,o){void 0===n&&(n=function(){return u.randomIntBetween(400,600)});void 0===i&&(i=2e3);var a=e.call(this)||this;a.indexedDBClient=t;a.storeName=r;a.getHearbeatInterval=n;a.maxHeartbeatAge=i;a.subscriptionIdentifier=o;a.started=!1;return a}i(t,e);t.prototype.dispose=function(){try{this.unregisterTabIfNecessary(!1)}catch(e){}e.prototype.dispose.call(this)};t.prototype.ensureIsStarted=function(){return o(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:if(l.IDisposable.wasDisposed(this))throw new Error("Rejected call to method `ensureIsStarted`: This MasterSlaveBroker instance was disposed.");if(this.started)return[2];this.started=!0;return[4,this.indexedDBClient.connectIfNecessary()];case 1:e.sent();if(l.IDisposable.wasDisposed(this))throw new Error("Aborted call to method `ensureIsStarted`: This MasterSlaveBroker instance was disposed.");setTimeout(this.doRepeatingTasks.bind(this),this.getHearbeatInterval());return[2]}})})};t.prototype.isRegistrationTimedOut=function(e){return Date.now()-e.lastHeartbeat>this.maxHeartbeatAge};t.prototype.getMasterRegistration=function(){return o(this,void 0,void 0,function(){var e,t=this;return a(this,function(r){switch(r.label){case 0:return[4,this.ensureIsStarted()];case 1:r.sent();return[4,this.indexedDBClient.getAll(this.storeName)];case 2:e=r.sent();return e.length<1?[2,void 0]:[2,n(e,function(e){return 1===e.type&&!t.isRegistrationTimedOut(e)})]}})})};t.prototype.doesMasterExist=function(){return o(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return[4,this.getMasterRegistration()];case 1:e=t.sent();return[2,"object"==typeof e&&null!==e]}})})};t.prototype.getCurrentTabType=function(){return o(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return[4,this.getMasterRegistration()];case 1:e=t.sent();return"object"!=typeof e||null===e?[2,0]:this.subscriptionIdentifier===e.tabIdent?[2,1]:[2,2]}})})};t.prototype.autoRegisterTab=function(){return o(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return[4,this.ensureIsStarted()];case 1:t.sent();return[4,this.getCurrentTabType()];case 2:e=t.sent();return[4,this.registerTabAs(e)];case 3:t.sent();return[4,this.ensureExactlyOneMasterExists()];case 4:t.sent();return[2]}})})};t.prototype.registerTabAs=function(e){return o(this,void 0,void 0,function(){var t,r,n,i;return a(this,function(o){switch(o.label){case 0:return[4,this.ensureIsStarted()];case 1:o.sent();t=0===e;if(t)return[3,4];r=1===e;return r?[4,this.doesMasterExist()]:[3,3];case 2:r=o.sent();o.label=3;case 3:t=r;o.label=4;case 4:t&&(e=2);return[4,this.getCurrentTabType()];case 5:n=o.sent();i={tabIdent:this.subscriptionIdentifier,lastHeartbeat:Date.now(),type:e};return[4,this.indexedDBClient.put({storeName:this.storeName,data:i})];case 6:o.sent();return[4,this.emit("ownTabTypeChanged",{newType:e,oldType:n})];case 7:o.sent();return[2]}})})};t.prototype.unregisterTabIfNecessary=function(e){void 0===e&&(e=!0);return o(this,void 0,void 0,function(){var t;return a(this,function(r){switch(r.label){case 0:return e?[4,this.ensureIsStarted()]:[3,2];case 1:r.sent();r.label=2;case 2:if(l.IDisposable.wasDisposed(this)||l.IDisposable.wasDisposed(this.indexedDBClient))return[2];r.label=3;case 3:r.trys.push([3,5,,6]);return[4,this.indexedDBClient.delete({storeName:this.storeName,data:this.subscriptionIdentifier})];case 4:r.sent();return[3,6];case 5:t=r.sent();return[3,6];case 6:return[2]}})})};t.prototype.writeOwnHeartbeat=function(){return o(this,void 0,void 0,function(){var e,t,r=this;return a(this,function(n){switch(n.label){case 0:return[4,this.ensureIsStarted()];case 1:n.sent();return[4,this.indexedDBClient.getAll(this.storeName)];case 2:e=n.sent();t=e.find(function(e){return e.tabIdent===r.subscriptionIdentifier});if("object"!=typeof t||null===t)return[3,4];t.lastHeartbeat=Date.now();return[4,this.indexedDBClient.put({storeName:this.storeName,data:t})];case 3:n.sent();return[3,6];case 4:return[4,this.registerTabAs(0)];case 5:n.sent();n.label=6;case 6:return[2]}})})};t.prototype.ensureExactlyOneMasterExists=function(){return o(this,void 0,void 0,function(){var e,t;return a(this,function(r){switch(r.label){case 0:return l.IDisposable.wasDisposed(this)?[2]:[4,this.ensureIsStarted()];case 1:r.sent();return[4,this.indexedDBClient.getAll(this.storeName)];case 2:e=r.sent();if(l.IDisposable.wasDisposed(this))return[2];t=e.filter(function(e){return 1===e.type});return 1===t.length?[2]:0!==t.length?[3,5]:[4,this.unregisterTabIfNecessary()];case 3:r.sent();return[4,this.registerTabAs(1)];case 4:r.sent();return[3,7];case 5:return[4,this.registerTabAs(2)];case 6:r.sent();r.label=7;case 7:return[2]}})})};t.prototype.doRepeatingTasks=function(){return o(this,void 0,void 0,function(){var e,t,r,n,i,u,c,d=this;return a(this,function(p){switch(p.label){case 0:r=[function(){return o(d,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.cleanupTimedOutRegistrations()];case 1:return[2,e.sent()]}})})},function(){return o(d,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.ensureExactlyOneMasterExists()];case 1:return[2,e.sent()]}})})},function(){return o(d,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.writeOwnHeartbeat()];case 1:return[2,e.sent()]}})})},function(){return setTimeout(d.doRepeatingTasks.bind(d),d.getHearbeatInterval())}];p.label=1;case 1:p.trys.push([1,6,7,8]);n=s(r),i=n.next();p.label=2;case 2:if(i.done)return[3,5];u=i.value;return l.IDisposable.wasDisposed(this)?[2]:[4,u()];case 3:p.sent();p.label=4;case 4:i=n.next();return[3,2];case 5:return[3,8];case 6:c=p.sent();e={error:c};return[3,8];case 7:try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}
29return[7];case 8:return[2]}})})};t.prototype.cleanupTimedOutRegistrations=function(){return o(this,void 0,void 0,function(){var e,t=this;return a(this,function(r){switch(r.label){case 0:return[4,this.ensureIsStarted()];case 1:r.sent();return[4,this.indexedDBClient.getAll(this.storeName)];case 2:e=r.sent();return[4,Promise.all(e.filter(this.isRegistrationTimedOut.bind(this)).map(function(e){var r=e.tabIdent;return t.indexedDBClient.delete({storeName:t.storeName,data:r})}))];case 3:r.sent();return[2]}})})};return t}(c.EventEmitter);r.MasterSlaveBroker=d;r.default=d},{"lib/core/event/EventEmitter":28,"lib/core/gc":34,"lib/core/utils":50}],4:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},l=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},u=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}},c=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},d=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e};Object.defineProperty(r,"__esModule",{value:!0});var p=e("lib/core/utils"),f=e("lib/core/utils"),h=e("app/common/EnvironmentVariables"),m=e("lib/protocol/indexeddb/IIndexedDBClient"),y=e("lib/core/log/ILogService"),g=e("lib/protocol/socketio/ISocketIOFeedConfig"),v=e("lib/protocol/socketio/SocketIOFeed"),_=function(e){function t(t,r,n){var i=e.call(this,t,r)||this;i.indexedDBClient=n;i.heartbeatStopped=!0;return i}n(t,e);t.configure=function(e){return function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;r.heartbeatFrequency=e.heartbeatFrequency;r.sessionHeartbeatChannelName=e.sessionHeartbeatChannelName;r.notificationPullChannelName=e.notificationPullChannelName;r.notificationStateChangeChannelName=e.notificationStateChangeChannelName;return r}n(r,t);return r}(t)};t.prototype.dispose=function(){e.prototype.dispose instanceof Function&&e.prototype.dispose.call(this);this.stopSendingHeartbeats()};t.prototype.forage=function(){return s(this,void 0,void 0,function(){var t,r,n,i,o,a,s,c,p,m,y,g,v,_,b,w;return l(this,function(l){switch(l.label){case 0:return[4,this.getIndexedDBClient()];case 1:o=l.sent();return[4,o.getAll(f.getEnv(h.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"))];case 2:a=l.sent();s=a.filter(function(e){return e.stateChanged});c=[];l.label=3;case 3:l.trys.push([3,8,9,10]);p=u(s),m=p.next();l.label=4;case 4:if(m.done)return[3,7];y=m.value;g=function(e){var t=e.object,r=e.subjects,n=e.state,i=e.type,o=r.map(function(e){return{object:t,subject:e,type:i,newState:n}});c.push.apply(c,d(o))};try{for(v=u(y.notifications),_=v.next();!_.done;_=v.next()){b=_.value;g(b)}}catch(e){n={error:e}}finally{try{_&&!_.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}y.stateChanged=!1;return[4,o.put({storeName:f.getEnv(h.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"),data:y})];case 5:l.sent();l.label=6;case 6:m=p.next();return[3,4];case 7:return[3,10];case 8:w=l.sent();t={error:w};return[3,10];case 9:try{m&&!m.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}
29return[7];case 10:this.log("debug","state change messages: "+JSON.stringify(c));return c.length>0?[4,this.client.emit(this.notificationStateChangeChannelName,c)]:[3,12];case 11:l.sent();l.label=12;case 12:return[4,e.prototype.forage.call(this)];case 13:l.sent();return[2]}})})};t.prototype.didConnect=function(){return s(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return"function"!=typeof e.prototype.didConnect?[3,2]:[4,e.prototype.didConnect.call(this)];case 1:t.sent();t.label=2;case 2:return[4,this.startSendingHeartbeats()];case 3:t.sent();return[4,this.client.emit(this.notificationPullChannelName)];case 4:t.sent();return[2]}})})};t.prototype.stopSendingHeartbeats=function(){this.heartbeatStopped=!0;clearTimeout(this.nextHeartbeatTimeout)};t.prototype.startSendingHeartbeats=function(){this.stopSendingHeartbeats();this.heartbeatStopped=!1;this.sendHeartbeatAndScheduleNextHeartbeat()};t.prototype.sendHeartbeatAndScheduleNextHeartbeat=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.heartbeatStopped?[2]:[4,this.sendHeartbeat()];case 1:e.sent();this.nextHeartbeatTimeout=setTimeout(this.sendHeartbeatAndScheduleNextHeartbeat.bind(this),1e3/this.heartbeatFrequency);return[2]}})})};t.prototype.sendHeartbeat=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.client.emit(this.sessionHeartbeatChannelName)];case 1:e.sent();return[2]}})})};t.prototype.getIndexedDBClient=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.indexedDBClient.connectIfNecessary()];case 1:e.sent();return[2,this.indexedDBClient]}})})};i([p.debounce(300,"trailing"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Promise)],t.prototype,"forage",null);t=i([a(0,g.ISocketIOFeedConfig),a(1,y.ILogService),a(2,m.IIndexedDBClient),o("design:paramtypes",[Object,Object,Object])],t);return t}(v.SocketIOFeed);r.NetworkingFeed=_},{"app/common/EnvironmentVariables":11,"lib/core/log/ILogService":39,"lib/core/utils":50,"lib/protocol/indexeddb/IIndexedDBClient":54,"lib/protocol/socketio/ISocketIOFeedConfig":64,"lib/protocol/socketio/SocketIOFeed":67}],5:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}};
29Object.defineProperty(r,"__esModule",{value:!0});var s=e("lib/core/gc"),l=e("lib/core/event/EventEmitter"),u=function(e){function t(t,r,n){var i=e.call(this)||this;i.indexedDBClient=t;i.storeName=r;i.instanceIdentifier=n;i.on("anyEvent",function(e){e.emitterIdent===i.instanceIdentifier?i.emit("ownEvent",e):i.emit("incomingEvent",e)});return i}n(t,e);t.prototype.typeCastPayload=function(e){return e};t.prototype.dispose=function(){e.prototype.dispose.call(this);clearTimeout(this.listenerInterval)};t.prototype.startListening=function(){var e=this;clearTimeout(this.listenerInterval);this.listenerInterval=setInterval(function(){return i(e,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return s.IDisposable.wasDisposed(this)?[2]:[4,this.cleanupTimedOutEvents()];case 1:e.sent();return[4,this.checkForNewEvents()];case 2:e.sent();return[2]}})})},500)};t.prototype.stopListening=function(){clearTimeout(this.listenerInterval)};t.prototype.publishSharedEvent=function(e,t){return i(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:r={seenBy:[this.instanceIdentifier],emitterIdent:this.instanceIdentifier,timestamp:Date.now(),eventName:e,payload:t};return[4,Promise.all([this.emit("anyEvent",{emitterIdent:r.emitterIdent,timestamp:r.timestamp,eventName:e,payload:t}),this.indexedDBClient.put({storeName:this.storeName,data:r})])];case 1:n.sent();return[2]}})})};t.prototype.checkForNewEvents=function(){return i(this,void 0,void 0,function(){var e,t,r,n,i,l,u,c,d,p,f,h,m,y,g=this;return o(this,function(o){switch(o.label){case 0:return s.IDisposable.wasDisposed(this)?[2]:[4,this.indexedDBClient.getAll(this.storeName)];case 1:r=o.sent();n=r.filter(function(e){return-1===e.seenBy.indexOf(g.instanceIdentifier)});if(0===n.length)return[2];i=n.sort(function(e,t){
30return e.timestamp>t.timestamp?1:-1});o.label=2;case 2:o.trys.push([2,8,9,10]);l=a(i),u=l.next();o.label=3;case 3:if(u.done)return[3,7];c=u.value;d=c.id,p=c.eventName,f=c.emitterIdent,h=c.payload,m=c.timestamp;c.seenBy=c.seenBy||[];c.seenBy.push(this.instanceIdentifier);return[4,this.indexedDBClient.put({storeName:this.storeName,data:c})];case 4:o.sent();return[4,this.emit("anyEvent",{id:d,eventName:p,emitterIdent:f,timestamp:m,payload:h})];case 5:o.sent();o.label=6;case 6:u=l.next();return[3,3];case 7:return[3,10];case 8:y=o.sent();e={error:y};return[3,10];case 9:try{u&&!u.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}return[7];case 10:return[2]}})})};t.prototype.cleanupTimedOutEvents=function(){return i(this,void 0,void 0,function(){var e,t,r,n,i,l,u,c,d;return o(this,function(o){switch(o.label){case 0:return s.IDisposable.wasDisposed(this)?[2]:[4,this.indexedDBClient.getAll(this.storeName)];case 1:r=o.sent();if(0===r.length)return[2];n=Date.now();i=r.filter(function(e){var t=e.timestamp;return n-t>3e3});o.label=2;case 2:o.trys.push([2,7,8,9]);l=a(i),u=l.next();o.label=3;case 3:if(u.done)return[3,6];c=u.value.id;return[4,this.indexedDBClient.delete({storeName:this.storeName,data:c})];case 4:o.sent();o.label=5;case 5:u=l.next();return[3,3];case 6:return[3,9];case 7:d=o.sent();e={error:d};return[3,9];case 8:try{u&&!u.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}return[7];case 9:return[2]}})})};return t}(l.EventEmitter);r.SharedEventLog=u},{"lib/core/event/EventEmitter":28,"lib/core/gc":34}],6:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("app/common/NotificationType");r.NotificationType=n.NotificationType;var i=e("app/common/NotificationState");r.NotificationState=i.NotificationState;var o=e("app/common/INotificationTimestamp");r.INotificationTimestamp=o.INotificationTimestamp;var a=e("app/client/JamendoNotificationSystemClient");r.JamendoNotificationSystemClient=a.JamendoNotificationSystemClient},{"app/client/JamendoNotificationSystemClient":2,"app/common/INotificationTimestamp":12,"app/common/NotificationState":13,"app/common/NotificationType":14}],7:[function(e,t,r){"use strict";function n(e,t){return o.Application.Builder.build("client","emitter").defineRequirements({acceptableInput:{typeName:"IIndexedDBNotificationRecord"},acceptableOutput:{typeName:"IDispatchedItem[]"}}).useFeed(function(){return y.IndexedDBFeed.specialize()}).addConfiguration(g.IIndexedDBClient,f.IConstructor(t)).addConfiguration(h.IIndexedDBFeedConfig,m.IndexedDBFeedConfig.prepare({foragingRate:1e3,foragingStoreName:a.getEnv(s.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"),forageFilter:function(e){return-1===e.seenBy.indexOf(u.getCurrentRuntimeIdentifier())},postForageAction:function(e){var t,r,n=e.dbClient,o=e.items;try{for(var l=i(o),c=l.next();!c.done;c=l.next()){var d=c.value;d.seenBy.push(u.getCurrentRuntimeIdentifier());n.put({storeName:a.getEnv(s.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"),data:d})}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}}})).useInputQueue(o.Application.Builder.Default).useConverter(o.Application.Builder.Default).useOutputQueue(o.Application.Builder.Default).usePublisher(function(){return l.CallbackPublisher.prepare(e)}).useDispatcher(o.Application.Builder.Default).useLogService(function(){return p.ConsoleLogService}).addConfiguration(c.ILogServiceConfig,d.getLogServiceConfig()).build()}var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}};
30Object.defineProperty(r,"__esModule",{value:!0});var o=e("lib/core/application/Application"),a=e("lib/core/utils"),s=e("app/common/EnvironmentVariables"),l=e("app/client/CallbackPublisher"),u=e("app/client/runtimeIdentifier"),c=e("lib/core/log/ILogServiceConfig"),d=e("app/common/logServiceConfig"),p=e("lib/core/log/ConsoleLogService"),f=e("lib/core/utils/types"),h=e("lib/protocol/indexeddb/IIndexedDBFeedConfig"),m=e("lib/protocol/indexeddb/IndexedDBFeedConfig"),y=e("lib/protocol/indexeddb/IndexedDBFeed"),g=e("lib/protocol/indexeddb/IIndexedDBClient");r.createClientApp=n;r.default=n},{"app/client/CallbackPublisher":1,"app/client/runtimeIdentifier":10,"app/common/EnvironmentVariables":11,"app/common/logServiceConfig":16,"lib/core/application/Application":17,"lib/core/log/ConsoleLogService":38,"lib/core/log/ILogServiceConfig":40,"lib/core/utils":50,"lib/core/utils/types":52,"lib/protocol/indexeddb/IIndexedDBClient":54,"lib/protocol/indexeddb/IIndexedDBFeedConfig":56,"lib/protocol/indexeddb/IndexedDBFeed":60,"lib/protocol/indexeddb/IndexedDBFeedConfig":61}],8:[function(e,t,r){"use strict";function n(e,t,r){return a(this,void 0,void 0,function(){var n,i,o,a,l;return s(this,function(s){switch(s.label){case 0:n=e.type;switch(n){case"bundle":return[3,2];case"diff":return[3,4]}return[3,1];case 1:throw new Error("Unknown message type '"+e.type+"' (typeof "+typeof e.type+")");case 2:return[4,r(x)];case 3:s.sent();return[2,e.bundle.map(function(e){return{storeName:x,data:{seenBy:[],notifications:e}}})];case 4:return[4,t(x)];case 5:i=s.sent();o=c.createMapFromArrayWithKey(c.flattenArray(i.map(function(e){return e.notifications})),"id");e.changedNotifications.forEach(function(e){o.set(e.id,e)});a=e.structure.map(function(e){return{notifications:e.map(function(e){return o.get(e)}).filter(Boolean),seenBy:[]}});l=[];a.forEach(function(e){if(e.notifications&&0!==e.notifications.length){e.notifications.sort(function(e){return e.time});l.push({storeName:x,data:e})}});return[4,r(x)];case 6:s.sent();return[2,l.sort(function(e){return e.data.notifications[0].groupId})]}})})}function i(e,t){var r=g.SocketIOFeedConfig.prepare({hostProtocol:c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketProtocol,"http"),messageEventName:c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketNotificationPushChannelName,"message"),serverHostname:c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketHostname,"notif.jamendo.com"),serverPort:parseInt(c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketPort,"8080"),10),lazyConnect:!1,defaultReconnectTimeout:parseInt(c.getEnv(u.EnvironmentVariables.DispatcherPublisherReconnectTimeout,"5000"),10),authentication:{authDataChannelName:"auth",authDataStringifier:function(e){return e.cookie},authDataGenerator:function(){return{cookie:"jammusicsession="+e()}}}});return l.Application.Builder.build("client","networking").defineRequirements({acceptableInput:{typeName:"IIncomingItem"},acceptableOutput:{typeName:"IIncomingItem"}}).useFeed(function(){return p.NetworkingFeed.configure({heartbeatFrequency:parseFloat(c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketSessionHeartbeatChannelName,"0.2")),sessionHeartbeatChannelName:c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketSessionHeartbeatChannelName,"session-heartbeat"),notificationPullChannelName:c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketNotificationPullChannelName,"pull-notifications"),notificationStateChangeChannelName:c.getEnv(u.EnvironmentVariables.DispatcherPublisherSocketNotificationStateChangeChannelName,"notif-state-event")})}).addConfiguration(y.ISocketIOFeedConfig,r).useInputQueue(l.Application.Builder.Default).useConverter(l.Application.Builder.Default).useOutputQueue(l.Application.Builder.Default).usePublisher(function(){return w.IndexedDBPublisher}).addConfiguration(v.IIndexedDBClient,d.IConstructor(t)).addConfiguration(_.IIndexedDBPublisherConfig,b.IndexedDBPublisherConfig.prepare({generatePublishQueries:n})).useDispatcher(l.Application.Builder.Default).useLogService(function(){return m.ConsoleLogService}
30).addConfiguration(f.ILogServiceConfig,h.getLogServiceConfig()).extend(function(e){return function(e){function r(){return null!==e&&e.apply(this,arguments)||this}o(r,e);r.prototype.clearIndexedDBStores=function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,t.clearStore(x)];case 1:e.sent();return[2]}})})};r.prototype.willStart=function(){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return e.prototype.willStart instanceof Function?[4,e.prototype.willStart.call(this)]:[3,2];case 1:t.sent();t.label=2;case 2:return[4,this.clearIndexedDBStores()];case 3:t.sent();return[2]}})})};r.prototype.didStop=function(){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return e.prototype.didStop instanceof Function?[4,e.prototype.didStop.call(this)]:[3,2];case 1:t.sent();t.label=2;case 2:return[4,this.clearIndexedDBStores()];case 3:t.sent();return[2]}})})};return r}(e)}).build()}var o=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var l=e("lib/core/application/Application"),u=e("app/common/EnvironmentVariables"),c=e("lib/core/utils"),d=e("lib/core/utils/types"),p=e("app/client/NetworkingFeed"),f=e("lib/core/log/ILogServiceConfig"),h=e("app/common/logServiceConfig"),m=e("lib/core/log/ConsoleLogService"),y=e("lib/protocol/socketio/ISocketIOFeedConfig"),g=e("lib/protocol/socketio/SocketIOFeedConfig"),v=e("lib/protocol/indexeddb/IIndexedDBClient"),_=e("lib/protocol/indexeddb/IIndexedDBPublisherConfig"),b=e("lib/protocol/indexeddb/IndexedDBPublisherConfig"),w=e("lib/protocol/indexeddb/IndexedDBPublisher"),x=c.getEnv(u.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications");r.createNetworkingApp=i;r.default=i},{"app/client/NetworkingFeed":4,"app/common/EnvironmentVariables":11,"app/common/logServiceConfig":16,"lib/core/application/Application":17,"lib/core/log/ConsoleLogService":38,"lib/core/log/ILogServiceConfig":40,"lib/core/utils":50,"lib/core/utils/types":52,"lib/protocol/indexeddb/IIndexedDBClient":54,"lib/protocol/indexeddb/IIndexedDBPublisherConfig":57,"lib/protocol/indexeddb/IndexedDBPublisher":62,"lib/protocol/indexeddb/IndexedDBPublisherConfig":63,"lib/protocol/socketio/ISocketIOFeedConfig":64,"lib/protocol/socketio/SocketIOFeedConfig":68}],9:[function(e,t,r){"use strict";
30Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/protocol/indexeddb/IndexedDBConfig"),i=e("lib/core/utils"),o=e("app/common/EnvironmentVariables");r.indexedDBConfig=n.IndexedDBConfig.prepare({databaseVersion:2,databaseName:i.getEnv(o.EnvironmentVariables.ClientIndexedDBDatabaseName,"jamnotif"),databaseStores:[{name:i.getEnv(o.EnvironmentVariables.ClientIndexedDBNotificationStoreName,"notifications"),indices:[],parameters:{autoIncrement:!0,keyPath:"id"}},{name:i.getEnv(o.EnvironmentVariables.ClientIndexedDBMasterSlaveBrokerStoreName,"master-slave-broker"),indices:[],parameters:{autoIncrement:!1,keyPath:"tabIdent"}},{name:"shared-event-log",indices:[],parameters:{autoIncrement:!0,keyPath:"id"}}]})},{"app/common/EnvironmentVariables":11,"lib/core/utils":50,"lib/protocol/indexeddb/IndexedDBConfig":59}],10:[function(e,t,r){"use strict";function n(){return i}Object.defineProperty(r,"__esModule",{value:!0});var i=[Date.now()-14832252e5,1e8*Math.random(),1e8*Math.random(),1e8*Math.random()].map(function(e){return Math.round(e).toString(36)}).join("-");r.getCurrentRuntimeIdentifier=n},{}],11:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n;!function(e){e.DebugLogging="JAMNOTIF_DEBUG_LOGGING";e.ContainerNamePrefix="JAMNOTIF_CONTAINER_NAME_PREFIX";e.PreprocessorJamendoApiBaseUrl="JAMNOTIF_PREPROC_JAM_API_BASE_URL";e.PreprocessorJamendoApiRequestTimeout="JAMNOTIF_PREPROC_JAM_API_REQUEST_TIMEOUT";e.PreprocessorJamendoApiClientId="JAMNOTIF_PREPROC_JAM_API_CLIENT_ID";e.PreprocessorJamendoRecipientHandlePrefix="JAMNOTIF_PREPROC_JAM_RECIPIENT_HANDLE_PREFIX";e.AMQPUsername="JAMNOTIF_AMQP_USERNAME";e.AMQPPassword="JAMNOTIF_AMQP_PASSWORD";e.AMQPHostname="JAMNOTIF_AMQP_HOSTNAME";e.AMQPPort="JAMNOTIF_AMQP_PORT";e.AMQPMaxConnectionReattempts="JAMNOTIF_AMQP_MAX_CONNECTION_REATTEMPTS";e.AMQPMConnectionReattemptTimeout="JAMNOTIF_AMQP_CONNECTION_REATTEMPT_TIMEOUT";e.MySQLHost="JAMNOTIF_MYSQL_HOST";e.MySQLPort="JAMNOTIF_MYSQL_PORT";e.MySQLUser="JAMNOTIF_MYSQL_USER";e.MySQLPassword="JAMNOTIF_MYSQL_PASS";e.MySQLDatabase="JAMNOTIF_MYSQL_DB";e.MySQLFeedForageInterval="JAMNOTIF_MYSQL_FEED_FORAGE_INTERVAL";e.MySQLFeedFirstForageInterval="JAMNOTIF_MYSQL_FIRST_FEED_FORAGE_INTERVAL";e.CassandaContactPoints="JAMNOTIF_CASSANDRA_CONTACT_POINTS";e.CassandaKeyspace="JAMNOTIF_CASSANDRA_KEYSPACE";e.CassandaUsername="JAMNOTIF_CASSANDRA_USER";e.CassandaPassword="JAMNOTIF_CASSANDRA_PASS";e.CassandraFeedForageInterval="JAMNOTIF_CASSANDRA_FEED_FORAGE_INTERVAL";e.CassandraFeedFirstForageInterval="JAMNOTIF_CASSANDRA_FIRST_FEED_FORAGE_INTERVAL";e.RealtimePushHostname="JAMNOTIF_RTPUSH_HOSTNAME";e.RealtimePushPort="JAMNOTIF_RTPUSH_PORT";e.RealtimePushReconnectTimeout="JAMNOTIF_RTPUSH_RECONNECT_TIMEOUT";e.OutgoingWorkerMaxNotificationsPerRecipient="OUTGOING_WORKER_MAX_NOTIFICATIONS_PER_PUSH";e.OutgoingWorkerNotificationPushRecipientRateLimit="OUTGOING_WORKER_NOTIFICATION_PUSH_RECIPIENT_RATE_LIMIT";e.OutgoingWorkerSessionTimeoutAge="OUTGOING_WORKER_SESSION_TIMEOUT_AGE";e.DispatcherFeedSocketHostname="JAMNOTIF_PROXY_FEED_SOCKET_HOSTNAME";e.DispatcherFeedSocketPort="JAMNOTIF_PROXY_FEED_SOCKET_PORT";e.DispatcherPublisherSocketHostname="JAMNOTIF_PROXY_PUBLISHER_SOCKET_HOSTNAME";e.DispatcherPublisherSocketPort="JAMNOTIF_PROXY_PUBLISHER_SOCKET_PORT";e.DispatcherPublisherReconnectTimeout="JAMNOTIF_PROXY_PUBLISHER_RECONNECT_TIMEOUT";e.DispatcherPublisherAuthenticationRequestTimeout="JAMNOTIF_PROXY_PUBLISHER_AUTH_REQUEST_TIMEOUT";e.DispatcherPublisherReconnectInstructionTimeout="JAMNOTIF_PROXY_PUBLISHER_RECONNECT_INSTRUCTION_TIMEOUT";e.DispatcherPublisherSocketProtocol="JAMNOTIF_PROXY_PUBLISHER_SOCKET_PROTOCOL";e.DispatcherPublisherSocketSSLKeyFilePath="JAMNOTIF_PROXY_PUBLISHER_SOCKET_KEY_FILE_PATH";e.DispatcherPublisherSocketSSLCertFilePath="JAMNOTIF_PROXY_PUBLISHER_SOCKET_CERT_FILE_PATH";e.DispatcherPublisherSocketSSLPassphrase="JAMNOTIF_PROXY_PUBLISHER_SOCKET_SSL_PASSPHRASE";e.DispatcherPublisherSocketNotificationPushChannelName="JAMNOTIF_PROXY_PUBLISHER_SOCKET_NOTIFICATION_PUSH_CHANNEL_NAME";e.DispatcherPublisherSocketNotificationPullChannelName="JAMNOTIF_PROXY_PUBLISHER_SOCKET_NOTIFICATION_PULL_CHANNEL_NAME";e.DispatcherPublisherSocketNotificationStateChangeChannelName="JAMNOTIF_PROXY_PUBLISHER_SOCKET_NOTIFICATION_STATE_CHANGE_CHANNEL_NAME";e.DispatcherPublisherSocketSessionHeartbeatChannelName="JAMNOTIF_PROXY_PUBLISHER_SOCKET_SESSION_HEARTBEAT_CHA
30NNEL_NAME";e.DispatcherPublisherSocketSessionHeartbeatFrequency="JAMNOTIF_PROXY_PUBLISHER_SOCKET_SESSION_HEARTBEAT_FREQUENCY";e.DispatcherPublisherSocketPushSocketMessageRateLimit="JAMNOTIF_PROXY_PUBLISHER_SOCKET_PUSH_SOCKET_RATE_LIMIT";e.HTTPSessionFeedProtocol="JAMNOTIF_SESSION_CONTROL_FEED_PROTOCOL";e.HTTPSessionFeedHostname="JAMNOTIF_SESSION_CONTROL_FEED_HOSTNAME";e.HTTPSessionFeedPort="JAMNOTIF_SESSION_CONTROL_FEED_PORT";e.ClientIndexedDBDatabaseName="JAMNOTIF_CLIENT_INDEXEDDB_DATABASE_NAME";e.ClientIndexedDBNotificationStoreName="JAMNOTIF_CLIENT_INDEXEDDB_NOTIFICATION_STORE_NAME";e.ClientIndexedDBMasterSlaveBrokerStoreName="JAMNOTIF_CLIENT_INDEXEDDB_MASTER_SLAVE_BROKER_STORE_NAME"}(n=r.EnvironmentVariables||(r.EnvironmentVariables={}));r.default=n},{}],12:[function(e,t,r){"use strict";function n(e){void 0===e&&(e=new Date);if("number"==typeof e)return n(new Date(e));var t=Math.round(i.dateDiff(o,e,i.ISecond));if(t<0)throw new Error("Cannot create notification system timestamp: Date must not be before ref date.");return t}Object.defineProperty(r,"__esModule",{value:!0});var i=e("lib/core/utils/time"),o=14832288e5;r.INotificationTimestamp=n;!function(e){function t(e){return"number"==typeof e&&e>=0&&!isNaN(e)&&isFinite(e)}e.isValid=t}(n=r.INotificationTimestamp||(r.INotificationTimestamp={}))},{"lib/core/utils/time":51}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("lib/core/reflect/enum");n=r.NotificationState||(r.NotificationState={});i.literals(n);!function(e){e.Void="_void_";e.New="new";e.Seen="seen";e.Clicked="clicked";e.Deleted="deleted"}(n=r.NotificationState||(r.NotificationState={}));r.default=n},{"lib/core/reflect/enum":49}],14:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("lib/core/reflect/enum");n=r.NotificationType||(r.NotificationType={});i.literals(n,function(e){return Object.keys(e).filter(function(e){return/^(JA)|(JM)|(JAJM)|(JMJA)_/.test(e)})});!function(e){e.Void="_void_";e.JAJM_NewCommentReply="user_commented_user_comment";e.JM_NewPlaylistFollower="user_follow_user_playlist";e.JM_NewPlaylistComment="user_commented_user_playlist";e.JM_UserLikedArtist="user_like_artist";e.JM_UserFollowedUser="user_follow_user";e.JM_FavoriteUserReleasedPlaylist="favorite_user_released_playlist";e.JM_FavoriteArtistReleasedSingle="favorite_artist_released_single";e.JM_FavoriteArtistReleasedAlbum="favorite_artist_released_album";e.FavoriteArtistReleasedSingleOrAlbum="favorite_artist_released_single_or_album";e.JA_ArtistTrackAccepted="catalog_accepted_artist_track";e.JA_ArtistTrackRefused="catalog_refused_artist_track";e.JA_AlbumAddedToWallpost="wallpost_added_artist_album";e.JA_TrackInPlaylistAddedToWallpost="wallpost_added_playlist_with_artist_track";e.JA_UserLikedTrack="user_like_artist_track";e.JA_UserLikedAlbum="user_like_artist_album";e.JA_NewTrackComment="user_commented_artist_track"}(n=r.NotificationType||(r.NotificationType={}));r.default=n},{"lib/core/reflect/enum":49}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("app/common/NotificationState");r.legalNotificationStateMutations=new Map([[n.NotificationState.New,[n.NotificationState.Seen,n.NotificationState.Clicked,n.NotificationState.Deleted]],[n.NotificationState.Seen,[n.NotificationState.Clicked]],[n.NotificationState.Clicked,[]],[n.NotificationState.Deleted,[n.NotificationState.New,n.NotificationState.Seen,n.NotificationState.Clicked]]]);r.default=r.legalNotificationStateMutations},{"app/common/NotificationState":13}],16:[function(e,t,r){"use strict";function n(){return i.LogServiceConfig.prepare({channels:function(){var e=["error","warn","notice","info"];1===parseInt(a.getEnv(o.EnvironmentVariables.DebugLogging,"1"),10)&&e.push("debug");return e}()})}Object.defineProperty(r,"__esModule",{value:!0});var i=e("lib/core/log/LogServiceConfig"),o=e("app/common/EnvironmentVariables"),a=e("lib/core/utils");r.getLogServiceConfig=n;r.default=n},{"app/common/EnvironmentVariables":11,"lib/core/log/LogServiceConfig":41,"lib/core/utils":50}],17:[function(e,t,r){(function(t){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},u=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e};
30Object.defineProperty(r,"__esModule",{value:!0});var c=e("lib/core/application/IApplication"),d=e("lib/core/application/IApplicationRequirements"),p=e("lib/core/gc"),f=e("lib/core/ioc"),h=e("lib/core/feed/IReadableFeed"),m=e("lib/core/log/ILogService"),y=e("lib/core/log/ConsoleLogService"),g=e("lib/core/queue/SimpleRAMQueue"),v=e("lib/core/converter/IConverter"),_=e("lib/core/converter/BypassConverter"),b=e("lib/core/publisher/IPublisher"),w=e("lib/core/publisher/LogOutputPublisher"),x=e("lib/core/dispatcher/IDispatcher"),M=e("lib/core/dispatcher/IInputQueue"),S=e("lib/core/dispatcher/IOutputQueue"),k=e("lib/core/dispatcher/Dispatcher"),T=function(){function e(){}e.build=function(e,t){void 0===t&&(t="default");var r,n,i=f.Container.create(),o={appName:e,configName:t,container:i,getApplication:function(){return n}},a=function(){function e(){}e.prototype.addConfiguration=function(e,t){try{i.registerDependency(e,t)}catch(t){throw new Error("ApplicationBuilder: adding configuration for identifier '"+e+"' failed: "+t)}return this};e.mixin=function(t){Object.getOwnPropertyNames(e.prototype).forEach(function(r){t[r]=e.prototype[r]});return t};return e}(),s={defineRequirements:function(e){r=d.IApplicationRequirements.completeWithDefaults(e);return a.mixin(l)}},l={useFeed:function(e){var t=e(o);i.registerDependency(h.IReadableFeed,t);return a.mixin(u)}},u={useInputQueue:function(e){void 0===e&&(e=function(){return g.SimpleRAMQueue});var t=e(o);i.registerDependency(M.IInputQueue,t);return a.mixin(c)}},c={useConverter:function(e){void 0===e&&(e=function(){return _.BypassConverter});var t=e(o);i.registerDependency(v.IConverter,t);return a.mixin(p)}},p={useOutputQueue:function(e){void 0===e&&(e=function(){return g.SimpleRAMQueue});var t=e(o);i.registerDependency(S.IOutputQueue,t);return a.mixin(T)}},T={usePublisher:function(e){void 0===e&&(e=function(){return w.LogOutputPublisher});var t=e(o);i.registerDependency(b.IPublisher,t);return a.mixin(E)}},E={useDispatcher:function(e){void 0===e&&(e=function(){return k.Dispatcher});var t=e(o);i.registerDependency(x.IDispatcher,t);return a.mixin(P)}},P={useLogService:function(e){void 0===e&&(e=function(){return y.ConsoleLogService});var t=e(o);i.registerDependency(m.ILogService,t);return a.mixin(O)}},O=new(function(){function o(){this.applicationClass=A}o.prototype.extend=function(e){this.applicationClass=e(this.applicationClass);return this};o.prototype.build=function(){var o=i.createDependencyInstance(this.applicationClass);o.appName=e;o.configName=t;o._requirements=r;n=o;return o};return o}());return s};e.Default=void 0;return e}(),A=function(){function e(e,t){this.logService=e;this.dispatcher=t;this._serviceBrand=c.__BRAND_IApplication__;this.appName="unknown";this.configName="???"}e.prototype.dispose=function(){this._requirements=void 0;p.IDisposable.disposeOf(this.dispatcher)};Object.defineProperty(e.prototype,"requirements",{get:function(){return this._requirements},enumerable:!0,configurable:!0});e.prototype.start=function(){return a(this,void 0,void 0,function(){var e=this;return s(this,function(r){switch(r.label){case 0:return[4,this.logService.write("info",function(){return"starting application "+e.appName+"/"+e.configName+" (PID "+t.pid+")"})];case 1:r.sent();return[4,this.hook(this.willStart)()];case 2:r.sent();return[4,this.dispatcher.start()];case 3:r.sent();return[4,this.hook(this.didStart)()];case 4:r.sent();return[4,this.logService.write("info",function(){return"application "+e.appName+"/"+e.configName+" started"})];case 5:r.sent();return[2]}})})};e.prototype.stop=function(){return a(this,void 0,void 0,function(){var e=this;return s(this,function(t){switch(t.label){case 0:return void 0!==this.stopPromise&&null!==this.stopPromise?[2,this.stopPromise]:[4,this.logService.write("info",function(){return"stopping application "+e.appName+"/"+e.configName})];case 1:t.sent();return[4,this.hook(this.willStop)()];case 2:t.sent();return[4,this.dispatcher.stop()];case 3:t.sent();return[4,this.hook(this.didStop)()];case 4:t.sent();return[4,this.logService.write("info",function(){return"application "+e.appName+"/"+e.configName+" stopped"})];case 5:t.sent();return[2]}})})};e.prototype.writeLogMessage=function(e,t){return a(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return[4,this.logService.write(e,function(){return t})];case 1:r.sent();return[2]}})})};e.prototype.hook=function(e){var t=this;return e instanceof Function?function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.call.apply(e,u([t],r))}:function(){return new Promise(function(e){return e()})}};
30e.Builder=T;e=n([f.implementation(c.IApplication),o(0,m.ILogService),o(1,x.IDispatcher),i("design:paramtypes",[Object,Object])],e);return e}();r.Application=A;r.default=A}).call(this,e("_process"))},{_process:111,"lib/core/application/IApplication":18,"lib/core/application/IApplicationRequirements":19,"lib/core/converter/BypassConverter":20,"lib/core/converter/IConverter":21,"lib/core/dispatcher/Dispatcher":22,"lib/core/dispatcher/IDispatcher":23,"lib/core/dispatcher/IInputQueue":24,"lib/core/dispatcher/IOutputQueue":25,"lib/core/feed/IReadableFeed":31,"lib/core/gc":34,"lib/core/ioc":36,"lib/core/log/ConsoleLogService":38,"lib/core/log/ILogService":39,"lib/core/publisher/IPublisher":42,"lib/core/publisher/LogOutputPublisher":45,"lib/core/queue/SimpleRAMQueue":48}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IApplication__="lib/core/application/IApplication";r.IApplication=n.createDecorator(r.__BRAND_IApplication__);r.default=r.IApplication},{"lib/core/ioc":36}],19:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});!function(e){function t(e,t){if(t.validator instanceof Function)return t.validator(e);throw new Error("functionailty disabled")}e.validate=t}(r.ITypeDescriptor||(r.ITypeDescriptor={}));var n;!function(e){function t(e){e.acceptableInput=e.acceptableInput||r.acceptableInput;e.acceptableOutput=e.acceptableOutput||r.acceptableOutput;"boolean"!=typeof e.ignoreDuplicateInputs&&(e.ignoreDuplicateInputs=r.ignoreDuplicateInputs);"number"!=typeof e.maxThroughputDuration&&(e.maxThroughputDuration=r.maxThroughputDuration);return e}var r={acceptableInput:{validator:function(){return!0}},acceptableOutput:{validator:function(){return!0}},ignoreDuplicateInputs:!0,maxThroughputDuration:1/0};e.completeWithDefaults=t}(n=r.IApplicationRequirements||(r.IApplicationRequirements={}));r.default=n},{}],20:[function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(){}e.prototype.dispose=function(){};e.prototype.getMaxBatchSize=function(){return 1/0};e.prototype.process=function(e){return n(this,void 0,void 0,function(){return i(this,function(t){return[2,e]})})};return e}();r.BypassConverter=o;r.default=o},{}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IConverter__="lib/core/converter/IConverter";r.IConverter=n.createDecorator(r.__BRAND_IConverter__);r.default=r.IConverter},{"lib/core/ioc":36}],22:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n
31;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},l=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},c=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e};
31Object.defineProperty(r,"__esModule",{value:!0});var d=e("lib/core/dispatcher/IDispatcher"),p=e("lib/core/dispatcher/IInputQueue"),f=e("lib/core/dispatcher/IOutputQueue"),h=e("lib/core/event/EventEmitter"),m=e("lib/core/gc"),y=e("lib/core/utils"),g=e("lib/core/ioc"),v=e("lib/core/feed/IReadableFeed"),_=(e("lib/core/queue/IQueue"),e("lib/core/converter/IConverter")),b=e("lib/core/publisher/IPublisher"),w=e("lib/core/publisher/PublishingJob"),x=(e("lib/core/publisher/IPublishingJobFactory"),e("lib/core/log/ILogService")),M=e("util"),S=function(e){function t(t,r,n,i,o,a,s){void 0===s&&(s=function(e){return new w.PublishingJob(e)});var l=e.call(this)||this;l.feed=t;l.inputQueue=r;l.converter=n;l.outputQueue=i;l.publisher=o;l.logService=a;l.publishingJobFactory=s;l._serviceBrand=d.__BRAND_IDispatcher__;l.started=!1;l.conversionCounter=0;return l}n(t,e);t.prototype.dispose=function(){this.stop();m.IDisposable.disposeOf(this.feed,this.inputQueue,this.converter,this.outputQueue,this.publisher);e.prototype.dispose.call(this)};t.prototype.getStats=function(){return{conversionsCompleted:this.conversionCounter}};t.prototype.start=function(){return s(this,void 0,void 0,function(){var e=this;return l(this,function(t){this.feedSourceOnlineHandler=this.feedSourceOnlineHandler||function(){return e.emit("feedSourceOnline",void 0)};this.feed.on("feedSourceOnline",this.feedSourceOnlineHandler);this.feedSourceOfflineHandler=this.feedSourceOfflineHandler||function(){return e.emit("feedSourceOffline",void 0)};this.feed.on("feedSourceOffline",this.feedSourceOfflineHandler);this.incomingFeedItemsHandler=this.incomingFeedItemsHandler||function(t){var r;return(r=e.inputQueue).add.apply(r,c(t))};this.feed.on("incomingItems",this.incomingFeedItemsHandler);this.itemInOutputQueueHandler=this.itemInOutputQueueHandler||this.publishItemsInOutputQueue.bind(this);this.outputQueue.on("itemInQueue",this.itemInOutputQueueHandler);this.started=!0;this.startConverting();return[2]})})};t.prototype.stop=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:this.started=!1;this.feed.off("feedSourceOnline",this.feedSourceOnlineHandler);this.feed.off("feedSourceOffline",this.feedSourceOfflineHandler);this.feed.off("incomingItems",this.incomingFeedItemsHandler);this.outputQueue.off("itemInQueue",this.itemInOutputQueueHandler);return[4,this.publisher.standby()];case 1:e.sent();return[2]}})})};t.prototype.triggerFeedForage=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.feed.isForaging()?[4,this.feed.emitted("foragingCompleted")]:[3,2];case 1:e.sent();e.label=2;case 2:return[4,this.feed.forage()];case 3:e.sent();return[2]}})})};t.prototype.directFeed=function(e){this.feed.emit("incomingItems",e)};t.prototype.startConverting=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.started?this.inputQueue.length<1?[4,this.inputQueue.emitted("itemInQueue")]:[3,2]:[2];case 1:e.sent();if(!this.started)return[2];e.label=2;case 2:return[4,this.convertItemsInInputQueue()];case 3:e.sent();this.startConverting();return[2]}})})};t.prototype.createPublishingJob=function(e){return this.publishingJobFactory(e)};t.prototype.convertItemsInInputQueue=function(){return s(this,void 0,void 0,function(){var e,t,r,n,i,o,a,s=this;return l(this,function(u){switch(u.label){case 0:e=this.inputQueue.popAll();t=Math.min(e.length,this.converter.getMaxBatchSize());r=[];n=0;this.conversionCounter+=1;i=function(){var i,a,u,d,p,f;return l(this,function(l){switch(l.label){case 0:n+=1;r.push.apply(r,c(e.splice(0,Math.min(t,e.length))));l.label=1;case 1:l.trys.push([1,3,,5]);return[4,o.converter.process([].concat(r))];case 2:d=l.sent();u=[].concat(d);return[3,5];case 3:p=l.sent();return[4,o.logService.write("warn",function(){return"conversion in dispatcher failed: "+p+", "+p.stack})];case 4:l.sent();return[2,"continue"];case 5:if(o.started)return[3,7];(i=o.inputQueue).add.apply(i,c(r));return[4,o.logService.write("notice",function(){return"dispatcher: aborting conversion #"+s.conversionCounter+" since dispatcher stopped"})];case 6:l.sent();return[2,{value:void 0}];case 7:return[4,o.logService.write("debug",function(){var e=M.inspect(u,{colors:!1,depth:5,maxArrayLength:10});return"dispatcher: conversion #"+s.conversionCounter+": batch #"+n+" complete, result: "+e})];case 8:l.sent();r.splice(0,r.length-1);f=u.map(function(e){return s.createPublishingJob(e)});(a=o.outputQueue).add.apply(a,c(f));return[2]}})};o=this;u.label=1;case 1:return e.length?[5,i()]:[3,3];case 2:a=u.sent();return"object"==typeof a?[2,a.value]:[3,1];case 3:return[4,this.logService.write("debug",function(){return"dispatcher: conversion #"+s.conversionCounter+" complete"})];case 4:u.sent();return[2]}})})};t.prototype.publishItemsInOutputQueue=function(){return s(this,void 0,void 0,function(){var e,t,r,n;return l(this,function(i){switch(i.label){case 0:if(0===this.outputQueue.length)return[2];t=this.outputQueue.popAll();r=function(){return m.IDisposable.disposeOf.apply(m.IDisposable,c(t))};i.label=1;case 1:i.trys.push([1,3,,5]);return[4,(e=this.publisher).publish.apply(e,c(t))];case 2:i.sent();return[3,5];case 3:n=i.sent();return[4,this.logService.write("warn",function(){return"dispatcher: publishing "+t.length+" items failed: "+n+" "+(n.stack||"")})];case 4:i.sent();r();return[2];case 5:r();return[4,this.logService.write("debug",function(){return"dispatcher: "+t.length+" items published"})];case 6:i.sent();
31return[4,this.emit("itemsPublished",t.map(function(e){return e.item}))];case 7:i.sent();return[2]}})})};i([y.sequentializeCalls(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Promise)],t.prototype,"triggerFeedForage",null);t=i([g.implementation(d.IDispatcher),a(0,v.IReadableFeed),a(1,p.IInputQueue),a(2,_.IConverter),a(3,f.IOutputQueue),a(4,b.IPublisher),a(5,x.ILogService),o("design:paramtypes",[Object,Object,Object,Object,Object,Object,Function])],t);return t}(h.EventEmitter);r.Dispatcher=S;r.default=S},{"lib/core/converter/IConverter":21,"lib/core/dispatcher/IDispatcher":23,"lib/core/dispatcher/IInputQueue":24,"lib/core/dispatcher/IOutputQueue":25,"lib/core/event/EventEmitter":28,"lib/core/feed/IReadableFeed":31,"lib/core/gc":34,"lib/core/ioc":36,"lib/core/log/ILogService":39,"lib/core/publisher/IPublisher":42,"lib/core/publisher/IPublishingJobFactory":44,"lib/core/publisher/PublishingJob":46,"lib/core/queue/IQueue":47,"lib/core/utils":50,util:124}],23:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IDispatcher__="lib/core/dispatcher/IDispatcher";r.IDispatcher=n.createDecorator(r.__BRAND_IDispatcher__);r.default=r.IDispatcher},{"lib/core/ioc":36}],24:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.IInputQueue=n.createDecorator("lib/core/dispatcher/IInputQueue");r.default=r.IInputQueue},{"lib/core/ioc":36}],25:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.IOutputQueue=n.createDecorator("lib/core/dispatcher/IOutputQueue");r.default=r.IOutputQueue},{"lib/core/ioc":36}],26:[function(e,t,r){"use strict";function n(){return"object"==typeof window&&null!==window}Object.defineProperty(r,"__esModule",{value:!0});r.isBrowser=n},{}],27:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});!function(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}(e("./env"))},{"./env":26}],28:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};
31Object.defineProperty(r,"__esModule",{value:!0});var s=e("lib/core/event/IEventEmitter"),l=e("lib/core/event/NonIntrospectiveEventEmitter"),u=e("lib/core/gc"),c=e("lib/core/ioc"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.internalEvents=new l.NonIntrospectiveEventEmitter;return t}n(t,e);t.prototype.dispose=function(){u.IDisposable.disposeOf(this.internalEvents);e.prototype.dispose.call(this)};t.prototype.on=function(t,r){return o(this,void 0,void 0,function(){return a(this,function(n){0===this.getEventHandlerCount(t)&&this.internalEvents.emit("beforeFirstBind",{eventName:t});return[2,e.prototype.on.call(this,t,r)]})})};t.prototype.off=function(t,r){return o(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,e.prototype.off.call(this,t,r)];case 1:n.sent();this.getEventHandlerCount(t)<1&&this.internalEvents.emit("afterLastUnbind",{eventName:t});return[2]}})})};t=i([c.implementation(s.IEventEmitter)],t);return t}(l.NonIntrospectiveEventEmitter);r.EventEmitter=d;r.default=d},{"lib/core/event/IEventEmitter":29,"lib/core/event/NonIntrospectiveEventEmitter":30,"lib/core/gc":34,"lib/core/ioc":36}],29:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IEventEmitter="lib/core/event/IEventEmitter";r.default=r.IEventEmitter},{}],30:[function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},s=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e},l=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}};Object.defineProperty(r,"__esModule",{value:!0});var u=e("lib/core/event/IEventEmitter"),c=e("lib/core/ioc"),d=e("lib/core/gc"),p=function(){function e(){this.handlers={}}e.prototype.dispose=function(){for(var e in this.handlers){if(!Array.isArray(this.handlers[e])||0===this.handlers[e].length)return;for(;this.handlers[e].length>0;)this.off(e,this.handlers[e][0]);this.handlers[e]=void 0}};e.prototype.prepareHandler=function(e,t){return t};e.prototype.on=function(e,t){return i(this,void 0,void 0,function(){return o(this,function(r){this.handlers[e]=this.handlers[e]||[];this.handlers[e].push(t);return[2]})})};e.prototype.once=function(e,t){return i(this,void 0,void 0,function(){var r,n;return o(this,function(a){switch(a.label){case 0:r=this;n=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i(this,void 0,void 0,function(){return o(this,function(i){switch(i.label){case 0:return[4,r.off(e,n)];case 1:i.sent();t.apply(this,a);return[2]}})})};return[4,this.on(e,n)];case 1:a.sent();return[2]}})})};e.prototype.emitted=function(e){var t=this;return new Promise(function(r){return t.once(e,r)})};e.prototype.off=function(e,t){return i(this,void 0,void 0,function(){var r;return o(this,function(n){if(!Array.isArray(this.handlers[e]))return[2];if("function"!=typeof t)throw new Error("illegal argument 'callback': must be a function, is typeof "+typeof t);r=this.handlers[e].indexOf(t);if(-1===r)return[2];this.handlers[e].splice(r,1);return[2]})})};e.prototype.emit=function(e,t){return i(this,void 0,void 0,function(){var r,n,i,a,u,c,p;return o(this,function(o){switch(o.label){case 0:if(d.IDisposable.wasDisposed(this)||!Array.isArray(this.handlers[e]))return[2];i=s(this.handlers[e]);o.label=1;case 1:o.trys.push([1,6,7,8]);a=l(i),u=a.next();o.label=2;case 2:if(u.done)return[3,5];c=u.value;return[4,c.call(null,t)];case 3:o.sent();o.label=4;case 4:u=a.next();return[3,2];case 5:return[3,8];case 6:p=o.sent();r={error:p};return[3,8];case 7:try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}
31return[7];case 8:return[2]}})})};e.prototype.getEventHandlerCount=function(e){if(!d.IDisposable.wasDisposed(this))return Array.isArray(this.handlers[e])?this.handlers[e].length:0};e=n([c.implementation(u.IEventEmitter)],e);return e}();r.NonIntrospectiveEventEmitter=p;r.default=p},{"lib/core/event/IEventEmitter":29,"lib/core/gc":34,"lib/core/ioc":36}],31:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IReadableFeed__="lib/core/feed/IReadableFeed";r.IReadableFeed=n.createDecorator(r.__BRAND_IReadableFeed__);r.default=r.IReadableFeed},{"lib/core/ioc":36}],32:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var a=e("lib/core/event/EventEmitter"),s=function(e){function t(){var t=e.call(this)||this;t.foraging=!1;t.stopped=!1;t.emit("feedSourceOnline",void 0);setTimeout(t.doScheduleNextForaging.bind(t),1);return t}n(t,e);t.prototype.isSourceOnline=function(){return!0};t.extendInline=function(e){var r=e.scheduleNext,i=e.doForage;return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);t.prototype.scheduleNext=function(){return r()};t.prototype.doForage=function(){return i()};return t}(t)};t.prototype.dispose=function(){e.prototype.dispose.call(this);this.stop()};t.prototype.isForaging=function(){return this.foraging};t.prototype.forage=function(){return i(this,void 0,void 0,function(){var e,t,r;return o(this,function(n){switch(n.label){case 0:this.clearForagingTimeout();this.foraging=!0;return[4,this.emit("foragingStarted",void 0)];case 1:n.sent();t=!1;n.label=2;case 2:n.trys.push([2,4,,5]);return[4,this.doForage()];case 3:e=n.sent();return[3,5];case 4:r=n.sent();this.writeErrorLogMessage("foraging failed: "+r);t=!0;return[3,5];case 5:return t?[3,7]:[4,this.emit("incomingItems",e)];case 6:n.sent();n.label=7;case 7:this.doScheduleNextForaging();this.foraging=!1;return[4,this.emit("foragingCompleted",void 0)];case 8:n.sent();return[2]}})})};t.prototype.writeDebugLogMessage=function(e){"function"==typeof this.debugLog&&this.debugLog("ScheduledFeed "+this.constructor.name+": "+e)};t.prototype.writeErrorLogMessage=function(e){"function"==typeof this.errorLog&&this.errorLog("ScheduledFeed "+this.constructor.name+": "+e)};t.prototype.clearForagingTimeout=function(){clearTimeout(this.nextForagingTimeout)};t.prototype.doScheduleNextForaging=function(){var e=this;this.clearForagingTimeout();if(!this.stopped){var t=this.scheduleNext();this.writeDebugLogMessage("scheduling next forage in "+t+"ms");this.nextForagingTimeout=setTimeout(function(){return i(e,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,this.forage()];case 1:e.sent();
31this.doScheduleNextForaging();return[2]}})})},t)}};t.prototype.stop=function(){this.stopped=!0;this.clearForagingTimeout()};return t}(a.EventEmitter);r.ScheduledFeed=s},{"lib/core/event/EventEmitter":28}],33:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n;!function(e){function t(e){return"object"==typeof e&&null!==e&&e.dispose instanceof Function}function r(e){e.__wasDisposed__=!0}function n(e){return!0===e.__wasDisposed__}function i(e){if(t(e)&&!n(e)){e.dispose();r(e)}}function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.forEach(i)}e.wasDisposed=n;e.disposeOf=o}(n=r.IDisposable||(r.IDisposable={}));r.default=n},{}],34:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});!function(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}(e("./IDisposable"))},{"./IDisposable":33}],35:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(r,"__esModule",{value:!0});var o=e("lib/core/ioc"),a=function(){function e(e,t){void 0===e&&(e=new o.ServiceCollection);this.serviceCollection=e;this.instantiationService=t;this.instantiationService=this.instantiationService||new o.InstantiationService(this.serviceCollection);this.afterConstruct instanceof Function&&this.afterConstruct()}e.extend=function(){var t;return t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);t.registerDependency=function(e,r){t.dependencies.push([e,r]);return t};t.createInstance=function(){return new this};t.prototype.afterConstruct=function(){var e=this;t.dependencies.forEach(function(t){var r=i(t,2),n=r[0],o=r[1];e.registerDependency(n,o)})};return t}(e),t.dependencies=[],t};e.create=function(){return new e};e.prototype.registerDependency=function(e,t){this.serviceCollection.set(e,new o.Descriptor(t));return this};e.prototype.createDependencyInstance=function(e){return this.instantiationService.createInstance(e)};e.prototype.getServiceInstance=function(e){var t=this.serviceCollection.get(e);return this.createDependencyInstance(t)};e.prototype.createDuplicate=function(){var t=this,r=new o.ServiceCollection;this.serviceCollection.forEach(function(e){r.set(e,t.serviceCollection.get(e))});return new e(r)};e.prototype.instantiateWithDependencies=function(e){var t=e.name+"_"+Date.now()+"_"+Math.round(1e8*Math.random()),r=this.createDuplicate();r.registerDependency(t,e);return r.getServiceInstance(t)};return e}();r.Container=a;r.default=a},{"lib/core/ioc":36}],36:[function(e,t,r){"use strict";function n(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}Object.defineProperty(r,"__esModule",{value:!0});n(e("decoration-ioc"));n(e("./ioc"));n(e("./Container"))},{"./Container":35,"./ioc":37,"decoration-ioc":86}],37:[function(e,t,r){"use strict";function n(e){return function(t){o.has(e)||o.set(e,[]);o.get(e).unshift(t)}}function i(e){return[].concat(o.get(e)||[])}Object.defineProperty(r,"__esModule",{value:!0});var o=new Map;r.implementation=n;r.getImplementations=i},{}],38:[function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},u=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e};
31Object.defineProperty(r,"__esModule",{value:!0});var c=e("lib/core/log/ILogService"),d=e("lib/core/log/ILogServiceConfig"),p=e("lib/core/ioc/ioc"),f=e("lib/core/utils"),h=e("os"),m=function(){function e(e,t){void 0===t&&(t="");this.logServiceConfig=e;this.messagePrefix=t;this._serviceBrand=c.__BRAND_ILogService__;this.messagePrefix=(this.messagePrefix||"").trim()}t=e;e.disable=function(){this.disabled=!0};e.enable=function(){this.disabled=!1};e.prototype.write=function(e,r){return a(this,void 0,void 0,function(){var n;return s(this,function(i){if(t.disabled||this.logServiceConfig&&-1===this.logServiceConfig.channels.indexOf(e))return[2];switch((e||"").toString().trim().toLowerCase()){default:n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.log.apply(console,u(e))};break;case"debug":n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.debug.apply(console,u(e))};break;case"warn":case"notice":n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.warn.apply(console,u(e))};break;case"error":n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.error.apply(console,u(e))}}n(this.formatLogMessage(e,r()));return[2]})})};e.prototype.formatLogMessage=function(e,t){var r=f.zerofill,n=new Date,i=n.getFullYear()+"/"+r(n.getMonth()+1,2)+"/"+r(n.getDate(),2),o=r(n.getHours(),2)+"h:"+r(n.getMinutes(),2)+"m",a=r(n.getSeconds(),2)+"s:"+r(n.getMilliseconds(),3)+"ms";t=(t||"").replace(h.EOL,"\\"+h.EOL);return i+" "+o+":"+a+" ["+e+"]\t"+t+h.EOL};var t;e.disabled=!1;e=t=n([p.implementation(c.ILogService),o(0,d.ILogServiceConfig),i("design:paramtypes",[Object,Object])],e);return e}();r.ConsoleLogService=m},{"lib/core/ioc/ioc":37,"lib/core/log/ILogService":39,"lib/core/log/ILogServiceConfig":40,"lib/core/utils":50,os:108}],39:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_ILogService__="lib/core/log/ILogService";r.ILogService=n.createDecorator(r.__BRAND_ILogService__);r.default=r.ILogService},{"lib/core/ioc":36}],40:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_ILogServiceConfig__="lib/core/log/ILogServiceConfig";r.ILogServiceConfig=n.createDecorator(r.__BRAND_ILogServiceConfig__);r.default=r.ILogServiceConfig},{"lib/core/ioc":36}],41:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e){this.channels=e}e.prepare=function(t){return function(e){function r(){return e.call(this,t.channels)||this}n(r,e);return r}(e)};return e}();r.LogServiceConfig=i;r.default=i},{}],42:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IPublisher__="lib/core/publisher/IPublisher";r.IPublisher=n.createDecorator(r.__BRAND_IPublisher__);r.default=r.IPublisher},{"lib/core/ioc":36}],43:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});!function(e){function t(){return""+1e6*Math.random()}function r(e){return"object"==typeof e&&null!==e&&"object"==typeof e.job&&null!==e.job&&"object"==typeof e.publisher&&null!==e.publisher&&"string"==typeof e.secret&&e.secret.length>0}function n(e,t){return e===t||e.secret===t.secret&&e.job===t.job&&e.publisher===t.publisher}function i(e,r){return{publisher:r,job:e,secret:t()+"-"+t()}}function o(e){e.secret=void 0;e.publisher=void 0;e.job=void 0}e.isToken=r;e.areTokensEqual=n
32;e.createToken=i;e.destroyToken=o}(r.IPublishingJobToken||(r.IPublishingJobToken={}));r.IPublishingJob="lib/core/publisher/IPublishingJob";r.default=r.IPublishingJob},{}],44:[function(e,t,r){"use strict";
32Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IPublishingJobFactory__="lib/core/publisher/IPublishingJobFactory";r.IPublishingJobFactory=n.createDecorator(r.__BRAND_IPublishingJobFactory__);r.default=r.IPublishingJobFactory},{"lib/core/ioc":36}],45:[function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var l=e("lib/core/publisher/IPublisher"),u=e("lib/core/log/ILogService"),c=e("lib/core/ioc"),d=function(){function e(e){this.logService=e}e.prototype.publish=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(this,void 0,void 0,function(){var t,r=this;return s(this,function(n){t=e.map(function(e){return e.notifyPublishingStarted(r)});this.logService.write("debug",function(){return"LogOutputPublisher: "+JSON.stringify(e.map(function(e){return e.item}))});e.forEach(function(e,r){return e.confirmPublished(t[r])});return[2]})})};e.prototype.standby=function(){return a(this,void 0,void 0,function(){return s(this,function(e){return[2]})})};e=n([c.implementation(l.IPublisher),o(0,u.ILogService),i("design:paramtypes",[Object])],e);return e}();r.LogOutputPublisher=d;r.default=d},{"lib/core/ioc":36,"lib/core/log/ILogService":39,"lib/core/publisher/IPublisher":42}],46:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(r,"__esModule",{value:!0});var a=e("lib/core/publisher/IPublishingJob"),s=e("lib/core/event/EventEmitter"),l=e("lib/core/ioc"),u=function(e){function t(t){var r=e.call(this)||this;r.item=t;r.state=0;r.on("success",function(){return r.emit("done",void 0)});r.on("fail",function(){return r.emit("done",void 0)});return r}n(t,e);r=t;t.prototype.dispose=function(){e.prototype.dispose.call(this);a.IPublishingJobToken.isToken(this.publisherToken)&&a.IPublishingJobToken.destroyToken(this.publisherToken)};t.prototype.createDuplicate=function(){return new r(this.item)};t.prototype.getCurrentState=function(){return this.state};t.prototype.getLastErrors=function(){return 3!==this.getCurrentState()?[]:[].concat(this.lastErrors)};t.prototype.notifyPublishingStarted=function(e){if(0!==this.getCurrentState())throw new Error("PublishingJob: publishing already started");this.state=1;this.publisherToken=a.IPublishingJobToken.createToken(this,e);
32this.emit("started",void 0);return this.publisherToken};t.prototype.confirmPublished=function(e){if(1!==this.getCurrentState())throw new Error("PublishingJob: not currently publishing");if(!a.IPublishingJobToken.areTokensEqual(this.publisherToken,e))throw new Error("PublishingJob: invalid token");this.state=2;this.emit("success",void 0)};t.prototype.notifyPublishingFailed=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(1!==this.getCurrentState())throw new Error("PublishingJob: not currently publishing");if(!a.IPublishingJobToken.areTokensEqual(this.publisherToken,e))throw new Error("PublishingJob: invalid token");this.state=3;this.lastErrors=t;this.emit("fail",void 0)};var r;t=r=i([l.implementation(a.IPublishingJob),o("design:paramtypes",[Object])],t);return t}(s.EventEmitter);r.PublishingJob=u;r.default=u},{"lib/core/event/EventEmitter":28,"lib/core/ioc":36,"lib/core/publisher/IPublishingJob":43}],47:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IQueue__="lib/core/queue/IQueue";r.IQueue=n.createDecorator(r.__BRAND_IQueue__);r.default=r.IQueue},{"lib/core/ioc":36}],48:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e};Object.defineProperty(r,"__esModule",{value:!0});var s=e("lib/core/queue/IQueue"),l=e("lib/core/utils"),u=e("lib/core/ioc"),c=e("lib/core/event/EventEmitter"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.items=[];return t}n(t,e);Object.defineProperty(t.prototype,"length",{get:function(){return this.items.length},enumerable:!0,configurable:!0});t.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.addConcrete.apply(this,a(e))};t.prototype.addConcrete=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n;(n=this.items).push.apply(n,a(t));l.defer(function(){return e.emit("itemInQueue",void 0)})};t.prototype.pop=function(){return this.items.shift()};t.prototype.popAll=function(){return this.items.splice(0,this.items.length)};t=i([u.implementation(s.IQueue)],t);return t}(c.EventEmitter);r.SimpleRAMQueue=d},{"lib/core/event/EventEmitter":28,"lib/core/ioc":36,"lib/core/queue/IQueue":47,"lib/core/utils":50}],49:[function(e,t,r){"use strict";function n(e,t){void 0===t&&(t=function(e){return Object.keys(e)});e.literals=function(){return t(e)}}function i(e){return e.literals()}function o(e){return i(e).map(function(t){return e[t]})}function a(e,t){return-1!==i(e).indexOf(t)}function s(e,t){return-1!==o(e).indexOf(t)}Object.defineProperty(r,"__esModule",{value:!0});r.literals=n;r.getEnumLiterals=i;r.getEnumValues=o;r.isEnumLiteral=a;r.isEnumValue=s},{}],50:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});!function(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}(e("./utils"))},{"./utils":53}],51:[function(e,t,r){"use strict";function n(e){return e instanceof Date?e.getTime():e}function i(e,t,n){if(t===n)return e;t!==r.IMillisecond&&(e*=t);return e/n}function o(e,t,o){return i(n(t)-n(e),r.IMillisecond,o)}
32Object.defineProperty(r,"__esModule",{value:!0});r.IMillisecond=1;r.ISecond=1e3*r.IMillisecond;r.IMinute=60*r.ISecond;r.toTimestamp=n;r.convertResolution=i;r.dateDiff=o},{}],52:[function(e,t,r){"use strict";function n(e){return function(){function t(){return e}return t}()}Object.defineProperty(r,"__esModule",{value:!0});r.IConstructor=n},{}],53:[function(e,t,r){(function(t){"use strict";function n(e){return new Promise(function(t){setTimeout(t,e)})}function i(e){return v(this,void 0,void 0,function(){var t=this;return _(this,function(r){return[2,new Promise(function(r,n){x(function(){return v(t,void 0,void 0,function(){var t,i;return _(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4,e()];case 1:t=o.sent();return[3,3];case 2:i=o.sent();n(i);return[2];case 3:r(t);return[2]}})})})})]})})}function o(e,t){e=e.toString();for(;e.length<t;)e="0"+e;return e}function a(e,r){var n;n=w.isBrowser()?window.ENV||{}:t.env;return"string"==typeof n[e]&&n[e].length>0?n[e]:"string"==typeof r?r:void 0}function s(e,t){if(e>=t)throw new Error("cannot generate random int between "+e+" and "+t+": min must be less than max");return Math.floor(Math.random()*(t-e+1))+e}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.map(function(e){return[].concat.apply([],e)});return[].concat.apply([],r)}function u(e){return Array.from(new Set(e))}function c(e,t){if(e===t)return!0;var r=u(e),n=u(t);return r.length===n.length&&-1===r.findIndex(function(e){return-1===n.indexOf(e)})}function d(e,t,r){for(var n=s(e,t),i=[];i.length<n;)i.push(r(i.length,i));return i}function p(e){return function(t,r,n){var i=n.value;n.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return v(this,void 0,void 0,function(){var r,n,o,a,s,l;return _(this,function(u){switch(u.label){case 0:i.sequence=e||i.sequence||[];n=new Promise(function(e){r=function(){var t=i.sequence.indexOf(n);-1!==t&&i.sequence.splice(t,1);e()}});o=[].concat(i.sequence);i.sequence.push(n);if(!(o.length>0))return[3,4];u.label=1;case 1:u.trys.push([1,3,,4]);return[4,Promise.all(o)];case 2:u.sent();return[3,4];case 3:a=u.sent();return[3,4];case 4:u.trys.push([4,6,7,8]);return[4,i.apply(this,t)];case 5:s=u.sent();return[3,8];case 6:l=u.sent();throw l;case 7:setTimeout(r,1);return[7];case 8:return[2,s]}})})}}}function f(e,t){return function(r,i,o){var a=o.value;o.value="trailing"===t?function(){for(var t=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!0===a.debounceCalled)return a.debouncePromise;a.debounceCalled=!0;a.debouncePromise=new Promise(function(i){return v(t,void 0,void 0,function(){return _(this,function(t){switch(t.label){case 0:return[4,n(e)];case 1:t.sent();return[4,a.apply(this,r)];case 2:t.sent();a.debounceCalled=!1;a.debouncePromise=void 0;i();return[2]}})})});return a.debouncePromise}:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!0!==a.debounceCalled){a.debounceCalled=!0;setTimeout(function(){a.debounceCalled=!1},e);return a.apply(this,t)}}}}function h(e,t){return new Map(e.map(function(e){return[t(e),e]}))}function m(e,t){return h(e,function(e){return e[t]})}function y(e,t){var r,n,i=new Map;try{for(var o=b(e),a=o.next();!a.done;a=o.next()){var s=a.value,l=t(s),u=i.get(l);if(!u){u=[];i.set(l,u)}u.push(s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}function g(e,t){return y(e,function(e){return e[t]})}var v=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},_=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},b=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}};
32Object.defineProperty(r,"__esModule",{value:!0});var w=e("lib/core/env");r.fsleep=n;var x=w.isBrowser()?function(e){return void setTimeout(e,0)}:function(e){return void t.nextTick(e)};r.defer=i;r.zerofill=o;r.getEnv=a;!function(e){function t(e){try{return e()}catch(e){return}}function r(e){return v(this,void 0,void 0,function(){var t;return _(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,e()];case 1:return[2,r.sent()];case 2:t=r.sent();return[3,3];case 3:return[2,void 0]}})})}e.sync=t;e.async=r}(r.nothrow||(r.nothrow={}));r.randomIntBetween=s;r.flattenArray=l;r.deduplicateArray=u;r.arrayEquals=c;r.randomLengthArray=d;r.sequentializeCalls=p;!function(e){function t(){return[]}e.createCallSequence=t}(p=r.sequentializeCalls||(r.sequentializeCalls={}));r.debounce=f;r.createMapFromArray=h;r.createMapFromArrayWithKey=m;r.createIndexFromArray=y;r.createIndexFromArrayWithKey=g}).call(this,e("_process"))},{_process:111,"lib/core/env":27}],54:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IIndexedDBClient__="lib/protocol/indexeddb/IIndexedDBClient";r.IIndexedDBClient=n.createDecorator(r.__BRAND_IIndexedDBClient__);r.default=r.IIndexedDBClient},{"lib/core/ioc":36}],55:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IIndexedDBConfig__="lib/protocol/indexeddb/IIndexedDBConfig";r.IIndexedDBConfig=n.createDecorator(r.__BRAND_IIndexedDBConfig__);r.default=r.IIndexedDBConfig},{"lib/core/ioc":36}],56:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IIndexedDBFeedConfig__="lib/protocol/indexeddb/IIndexedDBFeedConfig";r.IIndexedDBFeedConfig=n.createDecorator(r.__BRAND_IIndexedDBFeedConfig__);r.default=r.IIndexedDBFeedConfig},{"lib/core/ioc":36}],57:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_IIndexedDBPublisherConfig__="lib/protocol/indexeddb/IIndexedDBPublisherConfig";r.IIndexedDBPublisherConfig=n.createDecorator(r.__BRAND_IIndexedDBPublisherConfig__);r.default=r.IIndexedDBPublisherConfig},{"lib/core/ioc":36}],58:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};
32Object.defineProperty(r,"__esModule",{value:!0});var l=e("lib/protocol/indexeddb/IIndexedDBClient"),u=e("lib/core/ioc"),c=(e("lib/protocol/indexeddb/IIndexedDBConfig"),function(){function e(e){this.indexedDBConfig=e}t=e;e.prototype.dispose=function(){this.disconnectIfNecessary()};e.prototype.isConnected=function(){return void 0!==this.db&&null!==this.db};e.prototype.connectIfNecessary=function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.isConnected()?[2]:[4,this.connect()];case 1:e.sent();return[2]}})})};e.prototype.disconnectIfNecessary=function(){this.isConnected()&&this.disconnect()};e.prototype.connect=function(){var e=this;if(this.isConnected())throw new t.AlreadyConnectedError;return new Promise(function(r,n){var i=indexedDB.open(e.indexedDBConfig.databaseName,e.indexedDBConfig.databaseVersion);i.onupgradeneeded=function(){var r=e.db||i.result;e.indexedDBConfig.databaseStores.forEach(function(e){t.prepareObjectStore(r,e)})};i.onerror=function(e){return n(e)};i.onsuccess=function(){e.db=i.result;r()}})};e.prepareObjectStore=function(e,t){e.objectStoreNames.contains(t.name)&&e.deleteObjectStore(t.name);var r=e.createObjectStore(t.name,t.parameters||void 0);t.indices.forEach(function(e){r.createIndex(e.name,e.fields)})};e.prototype.disconnect=function(){if(!this.isConnected())throw new t.NotConnectedError("IndexedDBClient: cannot disconnect: not connected");this.db.close();this.db=void 0};e.prototype.get=function(e){var r=e.storeName,n=e.query,i=e.indexName;return a(this,void 0,void 0,function(){var e=this;return s(this,function(o){return[2,new Promise(function(o,a){e.throwIfDisconnected("get");var s,l=e.db.transaction(r,"readonly"),u=l.objectStore(r);if(Array.isArray(n))s=u.get(n);else{var c=u.index(i);s=c.get(n)}s.onerror=function(e){return a(new t.QueryFailedError("IndexedDBClient: get request failed: "+e))};s.onsuccess=function(){return o(s.result)}})]})})};e.prototype.getMultiple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(this,void 0,void 0,function(){var t=this;return s(this,function(r){return 0===e.length?[2,[]]:[2,Promise.all(e.map(function(e){return t.get(e)}))]})})};e.prototype.getAll=function(e){return a(this,void 0,void 0,function(){var r=this;return s(this,function(n){return[2,new Promise(function(n,i){r.throwIfDisconnected("getAll");var o=r.db.transaction(e,"readonly"),a=o.objectStore(e),s=a.openCursor();s.onerror=function(e){return i(new t.QueryFailedError("IndexedDBClient: getAll: cursor request failed: "+e))};var l=[];s.onsuccess=function(e){var t=e.target.result;if(t){l.push(t.value);t.continue()}else n(l)}})]})})};e.prototype.put=function(e){var r=e.storeName,n=e.data;return a(this,void 0,void 0,function(){var e=this;return s(this,function(i){return[2,new Promise(function(i,o){e.throwIfDisconnected("put");var a=e.db.transaction(r,"readwrite"),s=a.objectStore(r),l=s.put(n);l.onerror=function(e){return o(new t.QueryFailedError("IndexedDBClient: put request failed: "+e))};l.onsuccess=function(){return i()}})]})})};e.prototype.putMultiple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(this,void 0,void 0,function(){var t=this;return s(this,function(r){switch(r.label){case 0:return 0===e.length?[2]:[4,Promise.all(e.map(function(e){return t.put(e)}))];case 1:r.sent();return[2]}})})};e.prototype.delete=function(e){var r=e.storeName,n=e.data;return a(this,void 0,void 0,function(){var e=this;return s(this,function(i){return[2,new Promise(function(i,o){var a=e.db.transaction(r,"readwrite"),s=a.objectStore(r),l=s.delete(n);l.onerror=function(e){return o(new t.QueryFailedError("IndexedDBClient: delete request failed: "+e))};l.onsuccess=function(){return i()}})]})})};e.prototype.clearStore=function(e){return a(this,void 0,void 0,function(){var r=this;return s(this,function(n){return[2,new Promise(function(n,i){r.throwIfDisconnected("clearStore");var o=r.db.transaction(e,"readwrite"),a=o.objectStore(e);o.onerror=function(e){return i(new t.QueryFailedError("IndexedDBClient: clear request failed: "+e))};o.oncomplete=function(){return n()};a.clear()})]})})};e.prototype.throwIfDisconnected=function(e){if(!this.isConnected())throw new t.NotConnectedError('IndexedDBClient: cannot perform "'+e+'": not connected')};var t;e.AlreadyConnectedError=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.name="IndexedDBClientAlreadyConnected";t.message="IndexedDBClient: cannot connect: already connected";return t}n(t,e);return t}(Error);e.NotConnectedError=function(e){function t(t){var r=e.call(this)||this;r.message=t;r.name="IndexedDBClientNotConnected";return r}n(t,e);return t}(Error);e.QueryFailedError=function(e){function t(t){var r=e.call(this)||this;r.message=t;r.name="IndexedDBClientQueryFailed";return r}n(t,e);return t}(Error);e=t=i([u.implementation(l.IIndexedDBClient),o("design:paramtypes",[Object])],e);return e}());r.IndexedDBClient=c;r.default=c},{"lib/core/ioc":36,"lib/protocol/indexeddb/IIndexedDBClient":54,"lib/protocol/indexeddb/IIndexedDBConfig":55}],59:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();
32Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t,r){this.databaseName=e;this.databaseStores=t;this.databaseVersion=r}e.prepare=function(t){return function(e){function r(){return e.call(this,t.databaseName,t.databaseStores,t.databaseVersion)||this}n(r,e);return r}(e)};return e}();r.IndexedDBConfig=i;r.default=i},{}],60:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},l=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var u=e("lib/core/feed/IReadableFeed"),c=e("lib/core/ioc"),d=e("lib/core/feed/ScheduledFeed"),p=e("lib/core/log/ILogService"),f=e("lib/protocol/indexeddb/IIndexedDBFeedConfig"),h=e("lib/protocol/indexeddb/IIndexedDBClient"),m=function(e){function t(t,r,n){var i=e.call(this)||this;i.indexedDBFeedConfig=t;i.client=r;i.logService=n;i._serviceBrand=u.__BRAND_IReadableFeed__;i.internalEvents.on("beforeFirstBind",function(){if(!i.client.isConnected()){i.client.connect();i.emit("feedSourceOnline",void 0)}});return i}n(t,e);r=t;t.specialize=function(){return r};t.prototype.isSourceOnline=function(){return this.client&&this.client.isConnected()};t.prototype.debugLog=function(e){return this.logService.write("debug",function(){return e})};t.prototype.errorLog=function(e){return this.logService.write("error",function(){return e})};t.prototype.scheduleNext=function(){var e;e=this.indexedDBFeedConfig.foragingRate instanceof Function?this.indexedDBFeedConfig.foragingRate():this.indexedDBFeedConfig.foragingRate;return e};t.prototype.doForage=function(){return s(this,void 0,void 0,function(){var e;return l(this,function(t){switch(t.label){case 0:this.debugLog("IndexedDBFeed: begin foraging");return[4,this.client.connectIfNecessary()];case 1:t.sent();return[4,this.client.getAll(this.indexedDBFeedConfig.foragingStoreName)];case 2:e=t.sent();this.indexedDBFeedConfig.forageFilter instanceof Function&&(e=e.filter(this.indexedDBFeedConfig.forageFilter));return this.indexedDBFeedConfig.postForageAction instanceof Function?[4,this.indexedDBFeedConfig.postForageAction({items:e,dbClient:this.client,feedConfig:this.indexedDBFeedConfig})]:[3,4];case 3:t.sent();t.label=4;case 4:this.debugLog("foraged "+e.length+" items from indexedDB");this.debugLog("IndexedDBFeed: foraging complete");return[2,e]}})})};var r;t=r=i([c.implementation(u.IReadableFeed),a(0,f.IIndexedDBFeedConfig),a(1,h.IIndexedDBClient),a(2,p.ILogService),o("design:paramtypes",[Object,Object,Object])],t);return t}(d.ScheduledFeed);r.IndexedDBFeed=m;r.default=m},{"lib/core/feed/IReadableFeed":31,"lib/core/feed/ScheduledFeed":32,"lib/core/ioc":36,"lib/core/log/ILogService":39,"lib/protocol/indexeddb/IIndexedDBClient":54,"lib/protocol/indexeddb/IIndexedDBFeedConfig":56}],61:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();
32Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t,r,n){this.foragingRate=e;this.foragingStoreName=t;this.forageFilter=r;this.postForageAction=n}e.prepare=function(t){return function(e){function r(){return e.call(this,t.foragingRate,t.foragingStoreName,t.forageFilter,t.postForageAction)||this}n(r,e);return r}(e)};return e}();r.IndexedDBFeedConfig=i;r.default=i},{}],62:[function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),
33return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},u=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){e&&r>=e.length&&(e=void 0);return{value:e&&e[r++],done:!e}}}};Object.defineProperty(r,"__esModule",{value:!0});var d=e("lib/core/publisher/IPublisher"),p=e("lib/core/ioc"),f=e("lib/core/log/ILogService"),h=e("lib/protocol/indexeddb/IIndexedDBPublisherConfig"),m=e("lib/protocol/indexeddb/IIndexedDBClient"),y=function(){function e(e,t,r){this.logService=e;this.indexedDBPublisherConfig=t;this.client=r}e.prototype.dispose=function(){this.standby()};e.prototype.publish=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(this,void 0,void 0,function(){var t,r,n,i,o,a,l,d,p=this;return s(this,function(f){switch(f.label){case 0:return[4,this.client.connectIfNecessary()];case 1:f.sent();this.logService.write("debug",function(){return"publishing "+e.length+" items to indexedDB"});return Array.isArray(this.indexedDBPublisherConfig.clearStoresBeforePublish)&&this.indexedDBPublisherConfig.clearStoresBeforePublish.length>0?[4,Promise.all(this.indexedDBPublisherConfig.clearStoresBeforePublish.map(function(e){return p.client.clearStore(e)}))]:[3,3];case 2:f.sent();f.label=3;case 3:n=function(e){var t,r,n,o,a;return s(this,function(s){switch(s.label){case 0:r=e.notifyPublishingStarted(i);return[4,i.indexedDBPublisherConfig.generatePublishQueries(e.item,function(e){return p.client.getAll(e)},function(e){return p.client.clearStore(e)})];case 1:n=s.sent();s.label=2;case 2:s.trys.push([2,4,,5]);return[4,(t=i.client).putMultiple.apply(t,u(n))];case 3:s.sent();return[3,5];case 4:o=s.sent();a="IndexedDBPublisher: job batch query failed: "+o;i.logService.write("error",function(){return a});e.notifyPublishingFailed(r);return[2,"continue"];case 5:e.confirmPublished(r);return[2]}})};i=this;f.label=4;case 4:f.trys.push([4,9,10,11]);o=c(e),a=o.next();f.label=5;case 5:if(a.done)return[3,8];l=a.value;return[5,n(l)];case 6:f.sent();f.label=7;case 7:a=o.next();return[3,5];case 8:return[3,11];case 9:d=f.sent();t={error:d};return[3,11];case 10:try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}
33return[7];case 11:return[2]}})})};e.prototype.standby=function(){return a(this,void 0,void 0,function(){return s(this,function(e){return[2]})})};e=n([p.implementation(d.IPublisher),o(0,f.ILogService),o(1,h.IIndexedDBPublisherConfig),o(2,m.IIndexedDBClient),i("design:paramtypes",[Object,Object,Object])],e);return e}();r.IndexedDBPublisher=y;r.default=y},{"lib/core/ioc":36,"lib/core/log/ILogService":39,"lib/core/publisher/IPublisher":42,"lib/protocol/indexeddb/IIndexedDBClient":54,"lib/protocol/indexeddb/IIndexedDBPublisherConfig":57}],63:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){this.generatePublishQueries=e;this.clearStoresBeforePublish=t}e.prepare=function(t){return function(e){function r(){return e.call(this,t.generatePublishQueries,t.clearStoresBeforePublish)||this}n(r,e);return r}(e)};return e}();r.IndexedDBPublisherConfig=i;r.default=i},{}],64:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("lib/core/ioc");r.__BRAND_ISocketIOFeedConfig__="lib/protocol/socketio/ISocketIOFeedConfig";r.ISocketIOFeedConfig=n.createDecorator(r.__BRAND_ISocketIOFeedConfig__);r.default=r.ISocketIOFeedConfig},{"lib/core/ioc":36}],65:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n;!function(e){function t(e){return e}function r(e){return JSON.stringify(t(e))}function n(e){return JSON.parse(e)}e.create=t;e.createJson=r;e.fromJson=n}(n=r.ISocketReconnectInstruction||(r.ISocketReconnectInstruction={}));r.default=n},{}],66:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t,r,n){this.hostProtocol=e;this.messageEventName=t;this.serverHostname=r;this.serverPort=n}e.prepare=function(t){return function(e){function r(){return e.call(this,t.hostProtocol,t.messageEventName,t.serverHostname,t.serverPort)||this}n(r,e);return r}(e)};return e}();r.SocketIOConfig=i;r.default=i},{}],67:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},l=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},c=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e};
33Object.defineProperty(r,"__esModule",{value:!0});var d=e("lib/core/feed/IReadableFeed"),p=e("lib/core/ioc"),f=e("lib/core/event/EventEmitter"),h=e("lib/core/log/ILogService"),m=e("lib/protocol/socketio/ISocketIOFeedConfig"),y=e("lib/protocol/socketio/ISocketReconnectInstruction"),g=e("socket.io-client"),v=function(e){function t(t,r){var n=e.call(this)||this;n.socketIOConfig=t;n.logService=r;n.expectingDisconnect=!1;n.foraging=!1;if(t.lazyConnect){n.internalEvents.on("beforeFirstBind",function(e){"incomingItems"===e.eventName&&n.createClientIfNecessary()});n.internalEvents.on("afterLastUnbind",function(e){if("incomingItems"===e.eventName){n.expectingDisconnect=!0;n.destroyClientIfNecessary();n.expectingDisconnect=!1}})}else n.createClientIfNecessary();return n}n(t,e);r=t;t.prototype.dispose=function(){this.expectingDisconnect=!0;this.destroyClientIfNecessary();e.prototype.dispose.call(this)};t.specialize=function(){return r};t.prototype.isSourceOnline=function(){return this.clientConnected};t.prototype.isForaging=function(){return this.foraging};t.prototype.forage=function(){};t.prototype.log=function(e,t){return s(this,void 0,void 0,function(){return l(this,function(r){switch(r.label){case 0:return[4,this.logService.write(e,function(){return"socket.io feed: "+t})];case 1:r.sent();return[2]}})})};Object.defineProperty(t.prototype,"client",{get:function(){return this._client},enumerable:!0,configurable:!0});t.prototype.hook=function(e){var t=this;return e instanceof Function?function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.call.apply(e,c([t],r))}:function(){return new Promise(function(e){return e()})}};t.prototype.updateClientConnectionStatus=function(e){if(this.clientConnected!==e){this.clientConnected=e;if(this.clientConnected){this.hook(this.didConnect)();this.emit("feedSourceOnline",void 0)}else{this.hook(this.didDisconnect)();this.emit("feedSourceOffline",void 0)}}};t.prototype.isReconnectScheduled=function(){return void 0!==this.reconnectTimeout};t.prototype.clearScheduledReconnect=function(){clearTimeout(this.reconnectTimeout)};t.prototype.scheduleReconnectIfNecessary=function(){this.expectingDisconnect||this.isReconnectScheduled()||this.scheduleReconnect()};t.prototype.scheduleReconnect=function(e){var t=this;void 0===e&&(e=this.socketIOConfig.defaultReconnectTimeout);if(this.isReconnectScheduled())throw new Error("cannot schedule reconnect attempt: attempt already scheduled");this.reconnectTimeout=setTimeout(function(){t.reconnectTimeout=void 0;t.reconnect()},e)};t.prototype.reconnect=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.log("info","reconnecting")];case 1:e.sent();return[4,this.destroyClientIfNecessary()];case 2:e.sent();return[4,this.createClientIfNecessary()];case 3:e.sent();return[4,this.log("info","reconnected")];case 4:e.sent();return[2]}})})};t.prototype.isClientReady=function(){return"object"==typeof this.client&&null!==this.client};t.prototype.createClientIfNecessary=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.isClientReady()?[2]:[4,this.createClient()];case 1:e.sent();return[2]}})})};t.prototype.buildAuthenticationRequestPayload=function(){return s(this,void 0,void 0,function(){var e,t;return l(this,function(r){switch(r.label){case 0:t=(e=this.socketIOConfig.authentication).authDataStringifier;return[4,this.socketIOConfig.authentication.authDataGenerator()];case 1:return[2,t.apply(e,[r.sent()])]}})})};t.prototype.createClient=function(){return s(this,void 0,void 0,function(){var e,t=this;return l(this,function(r){switch(r.label){case 0:e=this.socketIOConfig.hostProtocol+"://"+this.socketIOConfig.serverHostname+":"+this.socketIOConfig.serverPort;return[4,this.hook(this.willConnect)()];case 1:r.sent();this._client=g(e);this.client.on("connect",function(){return s(t,void 0,void 0,function(){return l(this,function(e){this.log("info","connecting with '"+this.client.io.uri+"'");this.sendAuthenticationRequestIfNecessary();return[2]})})});this.client.on("authentication_successful",function(){t.log("info","server confirmed successful auth at '"+t.client.io.uri+"'");t.updateClientConnectionStatus(!0)});this.client.on("reconnect_instruction",function(e){var r=y.ISocketReconnectInstruction.fromJson(e);t.updateClientConnectionStatus(!1);t.clearScheduledReconnect();t.scheduleReconnect(r.retryAfter);t.log("info","connection with '"+t.client.io.uri+"' was closed with reconnect instruction, will reconnect again in "+r.retryAfter+"ms")});this.client.on("disconnect",function(){t.updateClientConnectionStatus(!1);t.scheduleReconnectIfNecessary();t.log("info","connection with '"+t.client.io.uri+"' was disconnected, will reconnect again in "+t.socketIOConfig.defaultReconnectTimeout+"ms")});this.client.on("connect_failed",function(e){t.updateClientConnectionStatus(!1);t.scheduleReconnectIfNecessary();t.log("error","connection attempt with '"+t.client.io.uri+"' failed: "+e)});this.client.on("error",function(e){t.log("error","error in connection with '"+t.client.io.uri+"': "+e)});this.client.io.on("connect_error",function(e){t.log("error","connect error with '"+t.client.io.uri+"': "+e);t.clearScheduledReconnect();t.scheduleReconnectIfNecessary()});this.client.on(this.socketIOConfig.messageEventName,function(e){var r=e.messages;r=Array.isArray(r)?r:[r];t.handleIncomingItems(r)});this.log("info",'client created for URI "'+e+'"');return[2]}})})};t.prototype.sendAuthenticationRequestIfNecessary=function(){return s(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.socketIOConfig.authentication?[4,this.sendAuthenticationRequest()]:[2];case 1:e.sent();return[2]}})})};t.prototype.sendAuthenticationRequest=function(){return s(this,void 0,void 0,function(){var e;return l(this,function(t){switch(t.label){case 0:return[4,this.buildAuthenticationRequestPayload()];case 1:e=t.sent();this.client.emit(this.socketIOConfig.authentication.authDataChannelName,e);this.log("info","auth request sent to '"+this.client.io.uri+"'");return[2]}})})};t.prototype.destroyClientIfNecessary=function(){this.isClientReady()&&this.destroyClient()};t.prototype.destroyClient=function(){this.hook(this.willDisconnect)();this.client.disconnect();this.client.close();this._client=void 0;this.log("info","client closed")};t.prototype.handleIncomingItems=function(e){return s(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:this.foraging=!0;
33return[4,this.emit("foragingStarted",void 0)];case 1:t.sent();return[4,this.emit("incomingItems",e)];case 2:t.sent();this.foraging=!1;return[4,this.emit("foragingCompleted",void 0)];case 3:t.sent();return[2]}})})};var r;t=r=i([p.implementation(d.IReadableFeed),a(0,m.ISocketIOFeedConfig),a(1,h.ILogService),o("design:paramtypes",[Object,Object])],t);return t}(f.EventEmitter);r.SocketIOFeed=v;r.default=v},{"lib/core/event/EventEmitter":28,"lib/core/feed/IReadableFeed":31,"lib/core/ioc":36,"lib/core/log/ILogService":39,"lib/protocol/socketio/ISocketIOFeedConfig":64,"lib/protocol/socketio/ISocketReconnectInstruction":65,"socket.io-client":112}],68:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=e("lib/protocol/socketio/SocketIOConfig"),o=function(e){function t(t,r,n,i,o,a,s){var l=e.call(this,t,r,n,i)||this;l.lazyConnect=o;l.authentication=a;l.defaultReconnectTimeout=s;return l}n(t,e);t.prepare=function(e){return function(t){function r(){return t.call(this,e.hostProtocol,e.messageEventName,e.serverHostname,e.serverPort,e.lazyConnect,e.authentication,e.defaultReconnectTimeout)||this}n(r,t);return r}(t)};return t}(i.SocketIOConfig);r.SocketIOFeedConfig=o;r.default=i.SocketIOConfig},{"lib/protocol/socketio/SocketIOConfig":66}],69:[function(e,t,r){function n(e,t,r){function n(e,i){if(n.count<=0)throw new Error("after called too many times");--n.count;if(e){o=!0;t(e);t=r}else 0!==n.count||o||t(null,i)}var o=!1;r=r||i;n.count=e;return 0===e?t():n}function i(){}t.exports=n},{}],70:[function(e,t,r){t.exports=function(e,t,r){var n=e.byteLength;t=t||0;r=r||n;if(e.slice)return e.slice(t,r);t<0&&(t+=n);r<0&&(r+=n);r>n&&(r=n);if(t>=n||t>=r||0===n)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(r-t),a=t,s=0;a<r;a++,s++)o[s]=i[a];return o.buffer}},{}],71:[function(e,t,r){function n(e){e=e||{};this.ms=e.min||100;this.max=e.max||1e4;this.factor=e.factor||2;this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0;this.attempts=0}t.exports=n;n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)};n.prototype.reset=function(){this.attempts=0};n.prototype.setMin=function(e){this.ms=e};n.prototype.setMax=function(e){this.max=e};n.prototype.setJitter=function(e){this.jitter=e}},{}],72:[function(e,t,r){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),n=0;n<e.length;n++)t[e.charCodeAt(n)]=n;r.encode=function(t){var r,n=new Uint8Array(t),i=n.length,o="";for(r=0;r<i;r+=3){o+=e[n[r]>>2];o+=e[(3&n[r])<<4|n[r+1]>>4];o+=e[(15&n[r+1])<<2|n[r+2]>>6];o+=e[63&n[r+2]]}i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"==");return o};r.decode=function(e){var r,n,i,o,a,s=.75*e.length,l=e.length,u=0;if("="===e[e.length-1]){s--;"="===e[e.length-2]&&s--}var c=new ArrayBuffer(s),d=new Uint8Array(c);for(r=0;r<l;r+=4){n=t[e.charCodeAt(r)];i=t[e.charCodeAt(r+1)];o=t[e.charCodeAt(r+2)];a=t[e.charCodeAt(r+3)];d[u++]=n<<2|i>>4;d[u++]=(15&i)<<4|o>>2;d[u++]=(3&o)<<6|63&a}return c}}()},{}],73:[function(e,t,r){(function(e){function r(e){for(var t=0;t<e.length;t++){var r=e[t];if(r.buffer instanceof ArrayBuffer){var n=r.buffer;if(r.byteLength!==n.byteLength){var i=new Uint8Array(r.byteLength);i.set(new Uint8Array(n,r.byteOffset,r.byteLength));n=i.buffer}e[t]=n}}}function n(e,t){t=t||{};var n=new o;r(e);for(var i=0;i<e.length;i++)n.append(e[i]);return t.type?n.getBlob(t.type):n.getBlob()}function i(e,t){r(e);return new Blob(e,t||{})}var o=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,a=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),s=a&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),l=o&&o.prototype.append&&o.prototype.getBlob;t.exports=function(){return a?s?e.Blob:i:l?n:void 0}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],74:[function(e,t,r){},{}],75:[function(e,t,r){var n=[].slice;t.exports=function(e,t){"string"==typeof t&&(t=e[t]);if("function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},{}],76:[function(e,t,r){function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}void 0!==t&&(t.exports=n);n.prototype.on=n.prototype.addEventListener=function(e,t){this._callbacks=this._callbacks||{};(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t);return this};n.prototype.once=function(e,t){function r(){this.off(e,r);t.apply(this,arguments)}r.fn=t;this.on(e,r);return this};n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length){delete this._callbacks["$"+e];return this}for(var n,i=0;i<r.length;i++){n=r[i];if(n===t||n.fn===t){r.splice(i,1);break}}return this};n.prototype.emit=function(e){this._callbacks=this._callbacks||{};
33var t=[].slice.call(arguments,1),r=this._callbacks["$"+e];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,t)}return this};n.prototype.listeners=function(e){this._callbacks=this._callbacks||{};return this._callbacks["$"+e]||[]};n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],77:[function(e,t,r){t.exports=function(e,t){var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}},{}],78:[function(e,t,r){(function(n){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var t=this.useColors;e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff);if(t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){if("%%"!==e){i++;"%c"===e&&(o=i)}});e.splice(o,0,n)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function l(){var e;try{e=r.storage.debug}catch(e){}!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG);return e}r=t.exports=e("./debug");r.log=a;r.formatArgs=o;r.save=s;r.load=l;r.useColors=i;r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}();r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}};r.enable(l())}).call(this,e("_process"))},{"./debug":79,_process:111}],79:[function(e,t,r){function n(e){var t,n=0;for(t in e){n=(n<<5)-n+e.charCodeAt(t);n|=0}return r.colors[Math.abs(n)%r.colors.length]}function i(e){function t(){if(t.enabled){var e=t,n=+new Date,i=n-(u||n);e.diff=i;e.prev=u;e.curr=n;u=n;for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];o[0]=r.coerce(o[0]);"string"!=typeof o[0]&&o.unshift("%O");var s=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;s++;var i=r.formatters[n];if("function"==typeof i){var a=o[s];t=i.call(e,a);o.splice(s,1);s--}return t});r.formatArgs.call(e,o);(t.log||r.log||console.log.bind(console)).apply(e,o)}}t.namespace=e;t.enabled=r.enabled(e);t.useColors=r.useColors();t.color=n(e);"function"==typeof r.init&&r.init(t);return t}function o(e){r.save(e);r.names=[];r.skips=[];for(var t=("string"==typeof e?e:"").split(/[\s,]+/),n=t.length,i=0;i<n;i++)if(t[i]){e=t[i].replace(/\*/g,".*?");"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$"))}}function a(){r.enable("")}function s(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=i.debug=i.default=i;r.coerce=l;r.disable=a;r.enable=o;r.enabled=s;r.humanize=e("ms");r.names=[];r.skips=[];r.formatters={};var u},{ms:107}],80:[function(e,t,r){function n(e,t){void 0===t&&(t=0);return e[e.length-(1+t)]}function i(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],function(){e.splice(r,1);r--;n--})}function o(e,t,r){void 0===r&&(r=function(e,t){return e===t});if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n++)if(!r(e[n],t[n]))return!1;return!0}function a(e,t,r){for(var n=0,i=e.length-1;n<=i;){var o=(n+i)/2|0,a=r(e[o],t);if(a<0)n=o+1;else{if(!(a>0))return o;i=o-1}}return-(n+1)}function s(e,t){var r=0,n=e.length;if(0===n)return 0;for(;r<n;){var i=Math.floor((r+n)/2);t(e[i])?n=i:r=i+1}return r}function l(e,t,r){for(var n=e.slice(0,r).sort(t),i=e.length,o=r;o<i;o++)!function(i){var o=e[i];if(t(o,n[r-1])<0){n.pop();var a=s(n,function(e){return t(o,e)<0});n.splice(a,0,o)}}(o);return n}function u(e,t){var r=new Array;
33if(t)for(var n={},i=0;i<e.length;i++)for(var o=0;o<e[i].length;o++){var a=e[i][o],s=t(a);if(!n.hasOwnProperty(s)){n[s]=!0;r.push(a)}}else for(var l=e.length,i=0;i<l;i++)r.push.apply(r,e[i]);return r}function c(e){return e?e.filter(function(e){return!!e}):e}function d(e,t){return e.indexOf(t)>=0}function p(e,t,r){var n=e[t],i=e[r];e[t]=i;e[r]=n}function f(e,t,r){e.splice(r,0,e.splice(t,1)[0])}function h(e){return!Array.isArray(e)||0===e.length}function m(e,t){if(!t)return e.filter(function(t,r){return e.indexOf(t)===r});var r=Object.create(null);return e.filter(function(e){var n=t(e);if(r[n])return!1;r[n]=!0;return!0})}function y(e){var t=Object.create(null);return function(r){var n=e(r);if(t[n])return!1;t[n]=!0;return!0}}function g(e,t){for(var r=0;r<e.length;r++){if(t(e[r]))return r}return-1}function v(e,t,r){void 0===r&&(r=null);var n=g(e,t);return n<0?r:e[n]}function _(e,t,r){void 0===r&&(r=function(e,t){return e===t});for(var n=0,i=0,o=Math.min(e.length,t.length);i<o&&r(e[i],t[i]);i++)n++;return n}function b(e){return e.reduce(function(e,t){return e.concat(t)},[])}function w(e,t){void 0===t&&(t=0);for(var r=[],n=t;n<e;n++)r.push(n);return r}function x(e,t,r){void 0===r&&(r=[]);for(var n=0;n<e;n++)r[n]=t();return r}function M(e,t,r){void 0===r&&(r=function(e){return e});return e.reduce(function(e,n){var i=t(n);e[i]=r(n,e[i]);return e},Object.create(null))}r.tail=n;r.forEach=i;r.equals=o;r.binarySearch=a;r.findFirst=s;r.top=l;r.merge=u;r.coalesce=c;r.contains=d;r.swap=p;r.move=f;r.isFalsyOrEmpty=h;r.distinct=m;r.uniqueFilter=y;r.firstIndex=g;r.first=v;r.commonPrefixLength=_;r.flatten=b;r.range=w;r.fill=x;r.index=M},{}],81:[function(e,t,r){function n(){return Object.create(null)}function i(){return Object.create(null)}function o(e,t,r){void 0===r&&(r=null);var n=String(t);return l(e,n)?e[n]:r}function a(e,t,r){var n=String(t);if(l(e,n))return e[n];"function"==typeof r&&(r=r());e[n]=r;return r}function s(e,t,r){e[r(t)]=t}function l(e,t){return f.call(e,t)}function u(e){var t=[];for(var r in e)f.call(e,r)&&t.push(e[r]);return t}function c(e,t){for(var r in e)if(f.call(e,r)){var n=t({key:r,value:e[r]},function(){delete e[r]});if(!1===n)return}}function d(e,t){if(!f.call(e,t))return!1;delete e[t];return!0}function p(e,t){var r=n();e.forEach(function(e){return a(r,t(e),[]).push(e)});return r}r.createStringDictionary=n;r.createNumberDictionary=i;r.lookup=o;r.lookupOrInsert=a;r.insert=s;var f=Object.prototype.hasOwnProperty;r.contains=l;r.values=u;r.forEach=c;r.remove=d;r.groupBy=p},{}],82:[function(e,t,r){function n(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}var i=e("./types"),o=e("./collections"),a=function(){function e(e){this._hashFn=e;this._nodes=Object.create(null)}e.prototype.roots=function(){var e=[];o.forEach(this._nodes,function(t){i.isEmptyObject(t.value.outgoing)&&e.push(t.value)});return e};e.prototype.traverse=function(e,t,r){var n=this.lookup(e);n&&this._traverse(n,t,Object.create(null),r)};e.prototype._traverse=function(e,t,r,n){var i=this,a=this._hashFn(e.data);if(!o.contains(r,a)){r[a]=!0;n(e.data);var s=t?e.outgoing:e.incoming;o.forEach(s,function(e){return i._traverse(e.value,t,r,n)})}};e.prototype.insertEdge=function(e,t){var r=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);r.outgoing[this._hashFn(t)]=n;n.incoming[this._hashFn(e)]=r};e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t];o.forEach(this._nodes,function(e){delete e.value.outgoing[t];delete e.value.incoming[t]})};e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),r=o.lookup(this._nodes,t);if(!r){r=n(e);this._nodes[t]=r}return r};e.prototype.lookup=function(e){return o.lookup(this._nodes,this._hashFn(e))};Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!0});e.prototype.toString=function(){var e=[];o.forEach(this._nodes,function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")});return e.join("\n")};return e}();r.Graph=a},{"./collections":81,"./types":83}],83:[function(e,t,r){function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==g.number||e.constructor!==Array)}function i(e){return typeof e===g.string||e instanceof String}function o(e){return n(e)&&e.every(function(e){return i(e)})}function a(e){return!(typeof e!==g.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return(typeof e===g.number||e instanceof Number)&&!isNaN(e)}function l(e){return!0===e||!1===e}function u(e){return typeof e===g.undefined}function c(e){return u(e)||null===e}function d(e){if(!a(e))return!1;for(var t in e)if(v.call(e,t))return!1;return!0}function p(e){return typeof e===g.function}function f(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e&&e.length>0&&e.every(p)}function h(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)m(e[n],t[n])}function m(e,t){if(i(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(p(t)){if(e instanceof t)return;if(e&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function y(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new(e.bind.apply(e,[void 0].concat(t)))}var g={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};r.isArray=n;r.isString=i;r.isStringArray=o;r.isObject=a;r.isNumber=s;r.isBoolean=l;r.isUndefined=u;r.isUndefinedOrNull=c;var v=Object.prototype.hasOwnProperty;r.isEmptyObject=d;r.isFunction=p;r.areFunctions=f;r.validateConstraints=h;r.validateConstraint=m;r.create=y},{}],84:[function(e,t,r){var n=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},i=function(){function e(e){this._staticArguments=e}e.prototype.appendStaticArguments=function(e){this._staticArguments.push.apply(this._staticArguments,e)};e.prototype.staticArguments=function(e){return isNaN(e)?this._staticArguments.slice(0):this._staticArguments[e]};e.prototype._validate=function(e){if(!e)throw new Error("can not be falsy")};return e}();r.AbstractDescriptor=i;var o=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=e.call(this,r)||this;i._ctor=t;return i}n(t,e);Object.defineProperty(t.prototype,"ctor",{get:function(){return this._ctor},enumerable:!0,configurable:!0});t.prototype.bind=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=[];n=n.concat(this.staticArguments());n=n.concat(e);
33return new(t.bind.apply(t,[void 0,this._ctor].concat(n)))};return t}(i);r.Descriptor=o;r.createDescriptor=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new(o.bind.apply(o,[void 0,e].concat(t)))}},{}],85:[function(e,t,r){function n(e,t){a.push({id:e,descriptor:new o.Descriptor(t)})}function i(){return a}var o=e("./descriptors");r.Services="di.services";var a=[];r.registerSingleton=n;r.getServices=i},{
34"./descriptors":84}],86:[function(e,t,r){"use strict";var n=e("./instantiationService"),i=e("./descriptors");r.Descriptor=i.Descriptor;var o=e("./instantiation");r.createDecorator=o.createDecorator;r.IInstantiationService=o.IInstantiationService;r.optional=o.optional;var a=e("./serviceCollection");r.ServiceCollection=a.ServiceCollection;var s=e("./extensions");r.registerSingleton=s.registerSingleton;r.getServices=s.getServices;r.InstantiationService=n.InstantiationService},{"./descriptors":84,"./extensions":85,"./instantiation":87,"./instantiationService":88,"./serviceCollection":89}],87:[function(e,t,r){function n(e){if(e[l.DI_TARGET]!==e){e[l.DI_TARGET]=e;e[l.DI_CONSTRUCTOR_DEPENDENCIES]=[];e[l.DI_PROPERTY_DEPENDENCIES]=[]}}function i(e,t,r,i){n(t);t[l.DI_PROPERTY_DEPENDENCIES].push({id:e,key:r,optional:i})}function o(e,t,r,i){n(t);t[l.DI_CONSTRUCTOR_DEPENDENCIES].push({id:e,index:r,optional:i})}function a(e){var t=function(e,r,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter or property");u.isUndefined(n)||u.isObject(n)?i(t,e.constructor,r,!1):o(t,e,n,!1)};t.toString=function(){return e};return t}function s(e){return function(t,r,n){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter or property");u.isUndefined(n)||u.isObject(n)?i(e,t.constructor,r,!0):o(e,t,n,!0)}}var l,u=e("./base/types");!function(e){function t(t){return t[e.DI_CONSTRUCTOR_DEPENDENCIES]||[]}function r(t){return t[e.DI_PROPERTY_DEPENDENCIES]||[]}e.DI_TARGET="$di$target";e.DI_CONSTRUCTOR_DEPENDENCIES="$di$constructorDependencies";e.DI_PROPERTY_DEPENDENCIES="$di$propertyDependencies";e.getConstructorServiceDependencies=t;e.getPropertyServiceDependencies=r}(l=r._util||(r._util={}));r.IInstantiationService=a("instantiationService");r.createDecorator=a;r.optional=s},{"./base/types":83}],88:[function(e,t,r){var n=e("./base/types"),i=e("./base/graph"),o=e("./descriptors"),a=e("./instantiation"),s=e("./serviceCollection"),l=function(){function e(e,t){void 0===e&&(e=new s.ServiceCollection);void 0===t&&(t=!1);this._services=e;this._strict=t;this._services.set(a.IInstantiationService,this)}e.prototype.createChild=function(t){var r=this;this._services.forEach(function(e,n){if(!t.has(e)){n instanceof o.Descriptor&&(n=r._createAndCacheServiceInstance(e,n));t.set(e,n)}});return new e(t,this._strict)};e.prototype.invokeFunction=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i;try{i={get:function(e,r){var n=t._getOrCreateServiceInstance(e);if(!n&&r!==a.optional)throw new Error('[invokeFunction] unkown service "'+e+'"');return n}};return e.apply(void 0,[i].concat(r))}finally{i.get=function(){throw new Error("service accessor is only valid during the invocation of its target method")}}};e.prototype.createInstance=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return e instanceof o.Descriptor?this._createInstance(e,t):this._createInstance(new o.Descriptor(e),t)};e.prototype._verifyDependency=function(e,t,r){if(!t&&this._strict&&!r.optional)throw new Error("[createInstance] "+e.ctor.name+" depends on UNKNOWN service "+r.id+".")};e.prototype._createInstance=function(e,t){var r=this,i=e.staticArguments().concat(t),o=a._util.getConstructorServiceDependencies(e.ctor).sort(function(e,t){return e.index-t.index}),s=o.map(function(t){var n=r._getOrCreateServiceInstance(t.id);r._verifyDependency(e,n,t);return n}),l=o.length>0?o[0].index:i.length;if(i.length!==l){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(l+1)+" conflicts with "+i.length+" static arguments");var u=l-i.length;i=u>0?i.concat(new Array(u)):i.slice(0,l)}var c=[e.ctor];c.push.apply(c,i);c.push.apply(c,s);var d=n.create.apply(null,c);e._validate(d);for(var p=a._util.getPropertyServiceDependencies(e.ctor),f=0,h=p;f<h.length;f++){var m=h[f],y=this._getOrCreateServiceInstance(m.id);this._verifyDependency(e,y,m);d[m.key]=y}return d};e.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof o.Descriptor?this._createAndCacheServiceInstance(e,t):t};e.prototype._createAndCacheServiceInstance=function(e,t){function r(){var e=new Error("[createInstance] cyclic dependency between services");e.message=n.toString();throw e}if(!(this._services.get(e)instanceof o.Descriptor))throw new Error("service is not a SyncDescriptor");for(var n=new i.Graph(function(e){return e.id.toString()}),s=0,l=[{id:e,desc:t}];l.length;){var u=l.pop();n.lookupOrInsertNode(u);s++>100&&r();for(var c=a._util.getConstructorServiceDependencies(u.desc.ctor),d=0,p=c;d<p.length;d++){var f=p[d],h=this._services.get(f.id);h||console.warn("[createInstance] "+e+" depends on "+f.id+" which is NOT registered.");
34if(h instanceof o.Descriptor){var m={id:f.id,desc:h};n.insertEdge(u,m);l.push(m)}}}for(;;){var y=n.roots();if(0===y.length){0!==n.length&&r();break}for(var g=0,v=y;g<v.length;g++){var _=v[g],b=this._createInstance(_.data.desc,[]);this._services.set(_.data.id,b);n.removeNode(_.data)}}return this._services.get(e)};return e}();r.InstantiationService=l},{"./base/graph":82,"./base/types":83,"./descriptors":84,"./instantiation":87,"./serviceCollection":89}],89:[function(e,t,r){var n=e("./base/arrays"),i=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=[];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.set(i[0],i[1])}}e.prototype.set=function(t,r){var i=[t,r],o=n.binarySearch(this._entries,i,e._entryCompare);if(!(o<0)){var a=this._entries[o];this._entries[o]=i;return a[1]}this._entries.splice(~o,0,i)};e.prototype.forEach=function(e){for(var t=0,r=this._entries;t<r.length;t++){var n=r[t];e(n[0],n[1])}};e.prototype.has=function(t){return n.binarySearch(this._entries,e._searchEntry(t),e._entryCompare)>=0};e.prototype.get=function(t){var r=n.binarySearch(this._entries,e._searchEntry(t),e._entryCompare);if(r>=0)return this._entries[r][1]};e._searchEntry=function(t){e._dummy[0]=t;return e._dummy};e._entryCompare=function(e,t){var r=e[0].toString(),n=t[0].toString();return r<n?-1:r>n?1:0};return e}();i._dummy=[void 0,void 0];r.ServiceCollection=i},{"./base/arrays":80}],90:[function(e,t,r){t.exports=e("./lib/index")},{"./lib/index":91}],91:[function(e,t,r){t.exports=e("./socket");t.exports.parser=e("engine.io-parser")},{"./socket":92,"engine.io-parser":100}],92:[function(e,t,r){(function(r){function n(e,t){if(!(this instanceof n))return new n(e,t);t=t||{};if(e&&"object"==typeof e){t=e;e=null}if(e){e=c(e);t.hostname=e.host;t.secure="https"===e.protocol||"wss"===e.protocol;t.port=e.port;e.query&&(t.query=e.query)}else t.host&&(t.hostname=c(t.host).host);this.secure=null!=t.secure?t.secure:r.location&&"https:"===location.protocol;t.hostname&&!t.port&&(t.port=this.secure?"443":"80");this.agent=t.agent||!1;this.hostname=t.hostname||(r.location?location.hostname:"localhost");this.port=t.port||(r.location&&location.port?location.port:this.secure?443:80);this.query=t.query||{};"string"==typeof this.query&&(this.query=d.decode(this.query));this.upgrade=!1!==t.upgrade;this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/";this.forceJSONP=!!t.forceJSONP;this.jsonp=!1!==t.jsonp;this.forceBase64=!!t.forceBase64;this.enablesXDR=!!t.enablesXDR;this.timestampParam=t.timestampParam||"t";this.timestampRequests=t.timestampRequests;this.transports=t.transports||["polling","websocket"];this.transportOptions=t.transportOptions||{};this.readyState="";this.writeBuffer=[];this.prevBufferLen=0;this.policyPort=t.policyPort||843;this.rememberUpgrade=t.rememberUpgrade||!1;this.binaryType=null;this.onlyBinaryUpgrades=t.onlyBinaryUpgrades;this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{});!0===this.perMessageDeflate&&(this.perMessageDeflate={});this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024);this.pfx=t.pfx||null;this.key=t.key||null;this.passphrase=t.passphrase||null;this.cert=t.cert||null;this.ca=t.ca||null;this.ciphers=t.ciphers||null;this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized;this.forceNode=!!t.forceNode;var i="object"==typeof r&&r;if(i.global===i){t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders);t.localAddress&&(this.localAddress=t.localAddress)}this.id=null;this.upgrades=null;this.pingInterval=null;this.pingTimeout=null;this.pingIntervalTimer=null;this.pingTimeoutTimer=null;this.open()}function i(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}var o=e("./transports/index"),a=e("component-emitter"),s=e("debug")("engine.io-client:socket"),l=e("indexof"),u=e("engine.io-parser"),c=e("parseuri"),d=e("parseqs");t.exports=n;n.priorWebsocketSuccess=!1;a(n.prototype);n.protocol=u.protocol;n.Socket=n;n.Transport=e("./transport");n.transports=e("./transports/index");n.parser=e("engine.io-parser");n.prototype.createTransport=function(e){s('creating transport "%s"',e);var t=i(this.query);t.EIO=u.protocol;t.transport=e;var r=this.transportOptions[e]||{};this.id&&(t.sid=this.id);return new o[e]({query:t,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNo
34de:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0})};n.prototype.open=function(){var e;if(this.rememberUpgrade&&n.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;setTimeout(function(){t.emit("error","No transports available")},0);return}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){this.transports.shift();this.open();return}e.open();this.setTransport(e)};n.prototype.setTransport=function(e){s("setting transport %s",e.name);var t=this;if(this.transport){s("clearing existing transport %s",this.transport.name);this.transport.removeAllListeners()}this.transport=e;e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})};n.prototype.probe=function(e){function t(){if(p.onlyBinaryUpgrades){var t=!this.supportsBinary&&p.transport.supportsBinary;d=d||t}if(!d){s('probe transport "%s" opened',e);c.send([{type:"ping",data:"probe"}]);c.once("packet",function(t){if(!d)if("pong"===t.type&&"probe"===t.data){s('probe transport "%s" pong',e);p.upgrading=!0;p.emit("upgrading",c);if(!c)return;n.priorWebsocketSuccess="websocket"===c.name;s('pausing current transport "%s"',p.transport.name);p.transport.pause(function(){if(!d&&"closed"!==p.readyState){s("changing transport and sending upgrade packet");u();p.setTransport(c);c.send([{type:"upgrade"}]);p.emit("upgrade",c);c=null;p.upgrading=!1;p.flush()}})}else{s('probe transport "%s" failed',e);var r=new Error("probe error");r.transport=c.name;p.emit("upgradeError",r)}})}}function r(){if(!d){d=!0;u();c.close();c=null}}function i(t){var n=new Error("probe error: "+t);n.transport=c.name;r();s('probe transport "%s" failed because of error: %s',e,t);p.emit("upgradeError",n)}function o(){i("transport closed")}function a(){i("socket closed")}function l(e){if(c&&e.name!==c.name){s('"%s" works - aborting "%s"',e.name,c.name);r()}}function u(){c.removeListener("open",t);c.removeListener("error",i);c.removeListener("close",o);p.removeListener("close",a);p.removeListener("upgrading",l)}s('probing transport "%s"',e);var c=this.createTransport(e,{probe:1}),d=!1,p=this;n.priorWebsocketSuccess=!1;c.once("open",t);c.once("error",i);c.once("close",o);this.once("close",a);this.once("upgrading",l);c.open()};n.prototype.onOpen=function(){s("socket open");this.readyState="open";n.priorWebsocketSuccess="websocket"===this.transport.name;this.emit("open");this.flush();if("open"===this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}};n.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){s('socket receive: type "%s", data "%s"',e.type,e.data);this.emit("packet",e);this.emit("heartbeat");switch(e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing();this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data;this.onError(t);break;
34case"message":this.emit("data",e.data);this.emit("message",e.data)}}else s('packet received with socket readyState "%s"',this.readyState)};n.prototype.onHandshake=function(e){this.emit("handshake",e);this.id=e.sid;this.transport.query.sid=e.sid;this.upgrades=this.filterUpgrades(e.upgrades);this.pingInterval=e.pingInterval;this.pingTimeout=e.pingTimeout;this.onOpen();if("closed"!==this.readyState){this.setPing();this.removeListener("heartbeat",this.onHeartbeat);this.on("heartbeat",this.onHeartbeat)}};n.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)};n.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer);e.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",e.pingTimeout);e.ping();e.onHeartbeat(e.pingTimeout)},e.pingInterval)};n.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})};n.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;0===this.writeBuffer.length?this.emit("drain"):this.flush()};n.prototype.flush=function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){s("flushing %d packets in socket",this.writeBuffer.length);this.transport.send(this.writeBuffer);this.prevBufferLen=this.writeBuffer.length;this.emit("flush")}};n.prototype.write=n.prototype.send=function(e,t,r){this.sendPacket("message",e,t,r);return this};n.prototype.sendPacket=function(e,t,r,n){if("function"==typeof t){n=t;t=void 0}if("function"==typeof r){n=r;r=null}if("closing"!==this.readyState&&"closed"!==this.readyState){r=r||{};r.compress=!1!==r.compress;var i={type:e,data:t,options:r};this.emit("packetCreate",i);this.writeBuffer.push(i);n&&this.once("flush",n);this.flush()}};n.prototype.close=function(){function e(){n.onClose("forced close");s("socket closing - telling transport to close");n.transport.close()}function t(){n.removeListener("upgrade",t);n.removeListener("upgradeError",t);e()}function r(){n.once("upgrade",t);n.once("upgradeError",t)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var n=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():e()}):this.upgrading?r():e()}return this};n.prototype.onError=function(e){s("socket error %j",e);n.priorWebsocketSuccess=!1;this.emit("error",e);this.onClose("transport error",e)};n.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){s('socket close with reason: "%s"',e);var r=this;clearTimeout(this.pingIntervalTimer);clearTimeout(this.pingTimeoutTimer);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();this.readyState="closed";this.id=null;this.emit("close",e,t);r.writeBuffer=[];r.prevBufferLen=0}};n.prototype.filterUpgrades=function(e){for(var t=[],r=0,n=e.length;r<n;r++)~l(this.transports,e[r])&&t.push(e[r]);return t}}
34).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":93,"./transports/index":94,"component-emitter":76,debug:78,"engine.io-parser":100,indexof:106,parseqs:109,parseuri:110}],93:[function(e,t,r){function n(e){this.path=e.path;this.hostname=e.hostname;this.port=e.port;this.secure=e.secure;this.query=e.query;this.timestampParam=e.timestampParam;this.timestampRequests=e.timestampRequests;this.readyState="";this.agent=e.agent||!1;this.socket=e.socket;this.enablesXDR=e.enablesXDR;this.pfx=e.pfx;this.key=e.key;this.passphrase=e.passphrase;this.cert=e.cert;this.ca=e.ca;this.ciphers=e.ciphers;this.rejectUnauthorized=e.rejectUnauthorized;this.forceNode=e.forceNode;this.extraHeaders=e.extraHeaders;this.localAddress=e.localAddress}var i=e("engine.io-parser"),o=e("component-emitter");t.exports=n;o(n.prototype);n.prototype.onError=function(e,t){var r=new Error(e);r.type="TransportError";r.description=t;this.emit("error",r);return this};n.prototype.open=function(){if("closed"===this.readyState||""===this.readyState){this.readyState="opening";this.doOpen()}return this};n.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.doClose();this.onClose()}return this};n.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)};n.prototype.onOpen=function(){this.readyState="open";this.writable=!0;this.emit("open")};n.prototype.onData=function(e){var t=i.decodePacket(e,this.socket.binaryType);this.onPacket(t)};n.prototype.onPacket=function(e){this.emit("packet",e)};n.prototype.onClose=function(){this.readyState="closed";this.emit("close")}},{"component-emitter":76,"engine.io-parser":100}],94:[function(e,t,r){(function(t){function n(e){var r,n=!1,s=!1,l=!1!==e.jsonp;if(t.location){var u="https:"===location.protocol,c=location.port;c||(c=u?443:80);n=e.hostname!==location.hostname||c!==e.port;s=e.secure!==u}e.xdomain=n;e.xscheme=s;r=new i(e);if("open"in r&&!e.forceJSONP)return new o(e);if(!l)throw new Error("JSONP disabled");return new a(e)}var i=e("xmlhttprequest-ssl"),o=e("./polling-xhr"),a=e("./polling-jsonp"),s=e("./websocket");r.polling=n;r.websocket=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":95,"./polling-xhr":96,"./websocket":98,"xmlhttprequest-ssl":99}],95:[function(e,t,r){(function(r){function n(){}
34function i(e){o.call(this,e);this.query=this.query||{};if(!s){r.___eio||(r.___eio=[]);s=r.___eio}this.index=s.length;var t=this;s.push(function(e){t.onData(e)});this.query.j=this.index;r.document&&r.addEventListener&&r.addEventListener("beforeunload",function(){t.script&&(t.script.onerror=n)},!1)}var o=e("./polling"),a=e("component-inherit");t.exports=i;var s,l=/\n/g,u=/\\n/g;a(i,o);i.prototype.supportsBinary=!1;i.prototype.doClose=function(){if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}if(this.form){this.form.parentNode.removeChild(this.form);this.form=null;this.iframe=null}o.prototype.doClose.call(this)};i.prototype.doPoll=function(){var e=this,t=document.createElement("script");if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}t.async=!0;t.src=this.uri();t.onerror=function(t){e.onError("jsonp poll error",t)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t);this.script=t;"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e);document.body.removeChild(e)},100)};i.prototype.doWrite=function(e,t){function r(){n();t()}function n(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(e){i.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+i.iframeId+'">';o=document.createElement(e)}catch(e){o=document.createElement("iframe");o.name=i.iframeId;o.src="javascript:0"}o.id=i.iframeId;i.form.appendChild(o);i.iframe=o}var i=this;if(!this.form){var o,a=document.createElement("form"),s=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;a.className="socketio";a.style.position="absolute";a.style.top="-1000px";a.style.left="-1000px";a.target=c;a.method="POST";a.setAttribute("accept-charset","utf-8");s.name="d";a.appendChild(s);document.body.appendChild(a);this.form=a;this.area=s}this.form.action=this.uri();n();e=e.replace(u,"\\\n");this.area.value=e.replace(l,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===i.iframe.readyState&&r()}:this.iframe.onload=r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":97,"component-inherit":77}],96:[function(e,t,r){(function(r){function n(){}function i(e){l.call(this,e);this.requestTimeout=e.requestTimeout;this.extraHeaders=e.extraHeaders;if(r.location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80);this.xd=e.hostname!==r.location.hostname||n!==e.port;this.xs=e.secure!==t}}function o(e){this.method=e.method||"GET";this.uri=e.uri;this.xd=!!e.xd;this.xs=!!e.xs;this.async=!1!==e.async;this.data=void 0!==e.data?e.data:null;this.agent=e.agent;this.isBinary=e.isBinary;this.supportsBinary=e.supportsBinary;this.enablesXDR=e.enablesXDR;this.requestTimeout=e.requestTimeout;this.pfx=e.pfx;this.key=e.key;this.passphrase=e.passphrase;this.cert=e.cert;this.ca=e.ca;this.ciphers=e.ciphers;this.rejectUnauthorized=e.rejectUnauthorized;this.extraHeaders=e.extraHeaders;this.create()}function a(){for(var e in o.requests)o.requests.hasOwnProperty(e)&&o.requests[e].abort()}var s=e("xmlhttprequest-ssl"),l=e("./polling"),u=e("component-emitter"),c=e("component-inherit"),d=e("debug")("engine.io-client:polling-xhr");t.exports=i;t.exports.Request=o;c(i,l);i.prototype.supportsBinary=!0;i.prototype.request=function(e){e=e||{};e.uri=this.uri();e.xd=this.xd;e.xs=this.xs;e.agent=this.agent||!1;e.supportsBinary=this.supportsBinary;e.enablesXDR=this.enablesXDR;e.pfx=this.pfx;e.key=this.key;e.passphrase=this.passphrase;e.cert=this.cert;e.ca=this.ca;e.ciphers=this.ciphers;e.rejectUnauthorized=this.rejectUnauthorized;e.requestTimeout=this.requestTimeout;e.extraHeaders=this.extraHeaders;return new o(e)};i.prototype.doWrite=function(e,t){var r="string"!=typeof e&&void 0!==e,n=this.request({method:"POST",data:e,isBinary:r}),i=this;n.on("success",t);n.on("error",function(e){i.onError("xhr post error",e)});this.sendXhr=n};i.prototype.doPoll=function(){d("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)});e.on("error",function(e){t.onError("xhr poll error",e)});this.pollXhr=e};u(o.prototype);o.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx;e.key=this.key;e.passphrase=this.passphrase;e.cert=this.cert;e.ca=this.ca;e.ciphers=this.ciphers;e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new s(e),n=this;try{d("xhr open %s: %s",this.method,this.uri);t.open(this.method,this.uri,this.async);try{if(this.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(var i in this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&t.setRequestHeader(i,this.extraHeaders[i])}}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=!0);this.requestTimeout&&(t.timeout=this.requestTimeout);if(this.hasXDR()){t.onload=function(){n.onLoad()};t.onerror=function(){n.onError(t.responseText)}}else t.onreadystatechange=function(){if(2===t.readyState){var e;try{e=t.getResponseHeader("Content-Type")}catch(e){}
34"application/octet-stream"===e&&(t.responseType="arraybuffer")}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout(function(){n.onError(t.status)},0))};d("xhr data %s",this.data);t.send(this.data)}catch(e){setTimeout(function(){n.onError(e)},0);return}if(r.document){this.index=o.requestsCount++;o.requests[this.index]=this}};o.prototype.onSuccess=function(){this.emit("success");this.cleanup()};o.prototype.onData=function(e){this.emit("data",e);this.onSuccess()};o.prototype.onError=function(e){this.emit("error",e);this.cleanup(!0)};o.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){this.hasXDR()?this.xhr.onload=this.xhr.onerror=n:this.xhr.onreadystatechange=n;if(e)try{this.xhr.abort()}catch(e){}r.document&&delete o.requests[this.index];this.xhr=null}};o.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t?this.xhr.response||this.xhr.responseText:this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)};o.prototype.hasXDR=function(){return void 0!==r.XDomainRequest&&!this.xs&&this.enablesXDR};o.prototype.abort=function(){this.cleanup()};o.requestsCount=0;o.requests={};r.document&&(r.attachEvent?r.attachEvent("onunload",a):r.addEventListener&&r.addEventListener("beforeunload",a,!1))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":97,"component-emitter":76,"component-inherit":77,debug:78,"xmlhttprequest-ssl":99}],97:[function(e,t,r){function n(e){var t=e&&e.forceBase64;c&&!t||(this.supportsBinary=!1);i.call(this,e)}var i=e("../transport"),o=e("parseqs"),a=e("engine.io-parser"),s=e("component-inherit"),l=e("yeast"),u=e("debug")("engine.io-client:polling");t.exports=n;var c=function(){return null!=new(e("xmlhttprequest-ssl"))({xdomain:!1}).responseType}();s(n,i);n.prototype.name="polling";n.prototype.doOpen=function(){this.poll()};n.prototype.pause=function(e){function t(){u("paused");r.readyState="paused";e()}var r=this;this.readyState="pausing";if(this.polling||!this.writable){var n=0;if(this.polling){u("we are currently polling - waiting to pause");n++;this.once("pollComplete",function(){u("pre-pause polling complete");--n||t()})}if(!this.writable){u("we are currently writing - waiting to pause");n++;this.once("drain",function(){u("pre-pause writing complete");--n||t()})}}else t()};n.prototype.poll=function(){u("polling");this.polling=!0;this.doPoll();this.emit("poll")};n.prototype.onData=function(e){var t=this;u("polling got data %s",e);var r=function(e,r,n){"opening"===t.readyState&&t.onOpen();if("close"===e.type){t.onClose();return!1}t.onPacket(e)};a.decodePayload(e,this.socket.binaryType,r);if("closed"!==this.readyState){this.polling=!1;this.emit("pollComplete");"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState)}};n.prototype.doClose=function(){function e(){u("writing close packet");t.write([{type:"close"}])}var t=this;if("open"===this.readyState){u("transport open - closing");e()}else{u("transport not open - deferring close");this.once("open",e)}};n.prototype.write=function(e){var t=this;this.writable=!1;var r=function(){t.writable=!0;t.emit("drain")};a.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,r)})};n.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",r="";!1!==this.timestampRequests&&(e[this.timestampParam]=l());this.supportsBinary||e.sid||(e.b64=1);e=o.encode(e);this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(r=":"+this.port);e.length&&(e="?"+e);return t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+r+this.path+e}},{"../transport":93,"component-inherit":77,debug:78,"engine.io-parser":100,parseqs:109,"xmlhttprequest-ssl":99,yeast:125}],98:[function(e,t,r){(function(r){function n(e){e&&e.forceBase64&&(this.supportsBinary=!1);this.perMessageDeflate=e.perMessageDeflate;this.usingBrowserWebSocket=d&&!e.forceNode;this.protocols=e.protocols;this.usingBrowserWebSocket||(p=i);o.call(this,e)}var i,o=e("../transport"),a=e("engine.io-parser"),s=e("parseqs"),l=e("component-inherit"),u=e("yeast"),c=e("debug")("engine.io-client:websocket"),d=r.WebSocket||r.MozWebSocket;if("undefined"==typeof window)try{i=e("ws")}catch(e){}var p=d;p||"undefined"!=typeof window||(p=i);t.exports=n;l(n,o);n.prototype.name="websocket";n.prototype.supportsBinary=!0;n.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,r={agent:this.agent,perMessageDeflate:this.perMessageDeflate};r.pfx=this.pfx;r.key=this.key;r.passphrase=this.passphrase;r.cert=this.cert;r.ca=this.ca;r.ciphers=this.ciphers;r.rejectUnauthorized=this.rejectUnauthorized;this.extraHeaders&&(r.headers=this.extraHeaders);this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new p(e,t):new p(e):new p(e,t,r)}
34catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1);if(this.ws.supports&&this.ws.supports.binary){this.supportsBinary=!0;this.ws.binaryType="nodebuffer"}else this.ws.binaryType="arraybuffer";this.addEventListeners()}};n.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()};this.ws.onclose=function(){e.onClose()};this.ws.onmessage=function(t){e.onData(t.data)};this.ws.onerror=function(t){e.onError("websocket error",t)}};n.prototype.write=function(e){function t(){n.emit("flush");setTimeout(function(){n.writable=!0;n.emit("drain")},0)}var n=this;this.writable=!1;for(var i=e.length,o=0,s=i;o<s;o++)!function(e){a.encodePacket(e,n.supportsBinary,function(o){if(!n.usingBrowserWebSocket){var a={};e.options&&(a.compress=e.options.compress);if(n.perMessageDeflate){("string"==typeof o?r.Buffer.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(a.compress=!1)}}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,a)}catch(e){c("websocket closed before onclose event")}--i||t()})}(e[o])};n.prototype.onClose=function(){o.prototype.onClose.call(this)};n.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()};n.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",r="";this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(r=":"+this.port);this.timestampRequests&&(e[this.timestampParam]=u());this.supportsBinary||(e.b64=1);e=s.encode(e);e.length&&(e="?"+e);return t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+r+this.path+e};n.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===n.prototype.name)}
34}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../transport":93,"component-inherit":77,debug:78,"engine.io-parser":100,parseqs:109,ws:74,yeast:125}],99:[function(e,t,r){(function(r){var n=e("has-cors");t.exports=function(e){var t=e.xdomain,i=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!i&&o)return new XDomainRequest}catch(e){}if(!t)try{return new(r[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"has-cors":105}],100:[function(e,t,r){(function(t){function n(e,t){return t("b"+r.packets[e.type]+e.data.data)}function i(e,t,n){if(!t)return r.encodeBase64Packet(e,n);var i=e.data,o=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=v[e.type];for(var s=0;s<o.length;s++)a[s+1]=o[s];return n(a.buffer)}function o(e,t,n){if(!t)return r.encodeBase64Packet(e,n);var i=new FileReader
35;i.onload=function(){e.data=i.result;r.encodePacket(e,t,!0,n)};return i.readAsArrayBuffer(e.data)}function a(e,t,n){if(!t)return r.encodeBase64Packet(e,n);if(g)return o(e,t,n);var i=new Uint8Array(1);i[0]=v[e.type];return n(new w([i.buffer,e.data]))}function s(e){try{e=h.decode(e,{strict:!1})}catch(e){return!1}return e}function l(e,t,r){for(var n=new Array(e.length),i=f(e.length,r),o=0;o<e.length;o++)!function(e,r,i){t(r,function(t,r){n[e]=r;i(t,n)})}(o,e[o],i)}var u,c=e("./keys"),d=e("has-binary2"),p=e("arraybuffer.slice"),f=e("after"),h=e("./utf8");t&&t.ArrayBuffer&&(u=e("base64-arraybuffer"));var m="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),y="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),g=m||y;r.protocol=3;var v=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},_=c(v),b={type:"error",data:"parser error"},w=e("blob");r.encodePacket=function(e,r,o,s){if("function"==typeof r){s=r;r=!1}if("function"==typeof o){s=o;o=null}var l=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&l instanceof ArrayBuffer)return i(e,r,s);if(w&&l instanceof t.Blob)return a(e,r,s);if(l&&l.base64)return n(e,s);var u=v[e.type];void 0!==e.data&&(u+=o?h.encode(String(e.data),{strict:!1}):String(e.data));return s(""+u)};r.encodeBase64Packet=function(e,n){var i="b"+r.packets[e.type];if(w&&e.data instanceof t.Blob){var o=new FileReader;o.onload=function(){var e=o.result.split(",")[1];n(i+e)};return o.readAsDataURL(e.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),l=new Array(s.length),u=0;u<s.length;u++)l[u]=s[u];a=String.fromCharCode.apply(null,l)}i+=t.btoa(a);return n(i)};r.decodePacket=function(e,t,n){if(void 0===e)return b;if("string"==typeof e){if("b"===e.charAt(0))return r.decodeBase64Packet(e.substr(1),t);if(n){e=s(e);if(!1===e)return b}var i=e.charAt(0);return Number(i)==i&&_[i]?e.length>1?{type:_[i],data:e.substring(1)}:{type:_[i]}:b}var o=new Uint8Array(e),i=o[0],a=p(e,1);w&&"blob"===t&&(a=new w([a]));return{type:_[i],data:a}};r.decodeBase64Packet=function(e,t){var r=_[e.charAt(0)];if(!u)return{type:r,data:{base64:!0,data:e.substr(1)}};var n=u.decode(e.substr(1));"blob"===t&&w&&(n=new w([n]));return{type:r,data:n}};r.encodePayload=function(e,t,n){function i(e){return e.length+":"+e}function o(e,n){r.encodePacket(e,!!a&&t,!1,function(e){n(null,i(e))})}if("function"==typeof t){n=t;t=null}var a=d(e);if(t&&a)return w&&!g?r.encodePayloadAsBlob(e,n):r.encodePayloadAsArrayBuffer(e,n);if(!e.length)return n("0:");l(e,o,function(e,t){return n(t.join(""))})};r.decodePayload=function(e,t,n){if("string"!=typeof e)return r.decodePayloadAsBinary(e,t,n);if("function"==typeof t){n=t;t=null}var i;if(""===e)return n(b,0,1);for(var o,a,s="",l=0,u=e.length;l<u;l++){var c=e.charAt(l);if(":"===c){if(""===s||s!=(o=Number(s)))return n(b,0,1);a=e.substr(l+1,o);if(s!=a.length)return n(b,0,1);if(a.length){i=r.decodePacket(a,t,!1);if(b.type===i.type&&b.data===i.data)return n(b,0,1);if(!1===n(i,l+o,u))return}l+=o;s=""}else s+=c}return""!==s?n(b,0,1):void 0};r.encodePayloadAsArrayBuffer=function(e,t){function n(e,t){r.encodePacket(e,!0,!0,function(e){return t(null,e)})}if(!e.length)return t(new ArrayBuffer(0));l(e,n,function(e,r){var n=r.reduce(function(e,t){var r;r="string"==typeof t?t.length:t.byteLength;return e+r.toString().length+r+2},0),i=new Uint8Array(n),o=0;r.forEach(function(e){var t="string"==typeof e,r=e;if(t){for(var n=new Uint8Array(e.length),a=0;a<e.length;a++)n[a]=e.charCodeAt(a);r=n.buffer}i[o++]=t?0:1;for(var s=r.byteLength.toString(),a=0;a<s.length;a++)i[o++]=parseInt(s[a]);i[o++]=255;for(var n=new Uint8Array(r),a=0;a<n.length;a++)i[o++]=n[a]});return t(i.buffer)})};r.encodePayloadAsBlob=function(e,t){function n(e,t){r.encodePacket(e,!0,!0,function(e){var r=new 
35Uint8Array(1);r[0]=1;if("string"==typeof e){for(var n=new Uint8Array(e.length),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);e=n.buffer;r[0]=0}for(var o=e instanceof ArrayBuffer?e.byteLength:e.size,a=o.toString(),s=new Uint8Array(a.length+1),i=0;i<a.length;i++)s[i]=parseInt(a[i]);s[a.length]=255;if(w){var l=new w([r.buffer,s.buffer,e]);t(null,l)}})}l(e,n,function(e,r){return t(new w(r))})};r.decodePayloadAsBinary=function(e,t,n){if("function"==typeof t){n=t;t=null}for(var i=e,o=[];i.byteLength>0;){for(var a=new Uint8Array(i),s=0===a[0],l="",u=1;255!==a[u];u++){if(l.length>310)return n(b,0,1);l+=a[u]}i=p(i,2+l.length);l=parseInt(l);var c=p(i,0,l);if(s)try{c=String.fromCharCode.apply(null,new Uint8Array(c))}catch(e){var d=new Uint8Array(c);c="";for(var u=0;u<d.length;u++)c+=String.fromCharCode(d[u])}o.push(c);i=p(i,l)}var f=o.length;o.forEach(function(e,i){n(r.decodePacket(e,t,!0),i,f)})}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":101,"./utf8":102,after:69,"arraybuffer.slice":70,"base64-arraybuffer":72,blob:73,"has-binary2":103}],101:[function(e,t,r){t.exports=Object.keys||function(e){var t=[],r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&t.push(n);return t}},{}],102:[function(t,r,n){(function(t){!function(i){function o(e){for(var t,r,n=[],i=0,o=e.length;i<o;){t=e.charCodeAt(i++);if(t>=55296&&t<=56319&&i<o){r=e.charCodeAt(i++);if(56320==(64512&r))n.push(((1023&t)<<10)+(1023&r)+65536);else{n.push(t);i--}}else n.push(t)}return n}function a(e){for(var t,r=e.length,n=-1,i="";++n<r;){t=e[n];if(t>65535){t-=65536;i+=b(t>>>10&1023|55296);t=56320|1023&t}i+=b(t)}return i}function s(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function l(e,t){return b(e>>t&63|128)}function u(e,t){if(0==(4294967168&e))return b(e);var r="";if(0==(4294965248&e))r=b(e>>6&31|192);else if(0==(4294901760&e)){s(e,t)||(e=65533);r=b(e>>12&15|224);r+=l(e,6)}else if(0==(4292870144&e)){r=b(e>>18&7|240);r+=l(e,12);r+=l(e,6)}r+=b(63&e|128);return r}function c(e,t){t=t||{};for(var r,n=!1!==t.strict,i=o(e),a=i.length,s=-1,l="";++s<a;){r=i[s];l+=u(r,n)}return l}function d(){if(_>=v)throw Error("Invalid byte index");var e=255&g[_];_++;if(128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function p(e){var t,r,n,i,o;if(_>v)throw Error("Invalid byte index");if(_==v)return!1;t=255&g[_];_++;if(0==(128&t))return t;if(192==(224&t)){r=d();o=(31&t)<<6|r;if(o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){r=d();n=d();o=(15&t)<<12|r<<6|n;if(o>=2048)return s(o,e)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&t)){r=d();n=d();i=d();o=(7&t)<<18|r<<12|n<<6|i;if(o>=65536&&o<=1114111)return o}throw Error("Invalid UTF-8 detected")}function f(e,t){t=t||{};var r=!1!==t.strict;g=o(e);v=g.length;_=0;for(var n,i=[];!1!==(n=p(r));)i.push(n);return a(i)}var h="object"==typeof n&&n,m="object"==typeof r&&r&&r.exports==h&&r,y="object"==typeof t&&t;y.global!==y&&y.window!==y||(i=y);var g,v,_,b=String.fromCharCode,w={version:"2.1.2",encode:c,decode:f};if("function"==typeof e&&"object"==typeof e.amd&&e.amd)e(function(){return w});else if(h&&!h.nodeType)if(m)m.exports=w;else{var x={},M=x.hasOwnProperty;for(var S in w)M.call(w,S)&&(h[S]=w[S])}else i.utf8=w}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],103:[function(e,t,r){(function(r){function n(e){if(!e||"object"!=typeof e)return!1;if(i(e)){for(var t=0,o=e.length;t<o;t++)if(n(e[t]))return!0;return!1}if("function"==typeof r.Buffer&&r.Buffer.isBuffer&&r.Buffer.isBuffer(e)||"function"==typeof r.ArrayBuffer&&e instanceof ArrayBuffer||a&&e instanceof Blob||s&&e instanceof File)return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return n(e.toJSON(),!0);for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)&&n(e[l]))return!0;return!1}var i=e("isarray"),o=Object.prototype.toString,a="function"==typeof r.Blob||"[object BlobConstructor]"===o.call(r.Blob),s="function"==typeof r.File||"[object FileConstructor]"===o.call(r.File);t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{isarray:104}],104:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],105:[function(e,t,r){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},{}],106:[function(e,t,r){var n=[].indexOf;
35t.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},{}],107:[function(e,t,r){function n(e){e=String(e);if(!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*d;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*l;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=c?Math.round(e/c)+"d":e>=u?Math.round(e/u)+"h":e>=l?Math.round(e/l)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function o(e){return a(e,c,"day")||a(e,u,"hour")||a(e,l,"minute")||a(e,s,"second")||e+" ms"}function a(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var s=1e3,l=60*s,u=60*l,c=24*u,d=365.25*c;t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?o(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],108:[function(e,t,r){r.endianness=function(){return"LE"};r.hostname=function(){return"undefined"!=typeof location?location.hostname:""};r.loadavg=function(){return[]};r.uptime=function(){return 0};r.freemem=function(){return Number.MAX_VALUE};r.totalmem=function(){return Number.MAX_VALUE};r.cpus=function(){return[]};r.type=function(){return"Browser"};r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""};r.networkInterfaces=r.getNetworkInterfaces=function(){return{}};r.arch=function(){return"javascript"};r.platform=function(){return"browser"};r.tmpdir=r.tmpDir=function(){return"/tmp"};r.EOL="\n"},{}],109:[function(e,t,r){r.encode=function(e){var t="";for(var r in e)if(e.hasOwnProperty(r)){t.length&&(t+="&");t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r])}return t};r.decode=function(e){for(var t={},r=e.split("&"),n=0,i=r.length;n<i;n++){var o=r[n].split("=");
35t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},{}],110:[function(e,t,r){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(e){var t=e,r=e.indexOf("["),o=e.indexOf("]");-1!=r&&-1!=o&&(e=e.substring(0,r)+e.substring(r,o).replace(/:/g,";")+e.substring(o,e.length));for(var a=n.exec(e||""),s={},l=14;l--;)s[i[l]]=a[l]||"";if(-1!=r&&-1!=o){s.source=t;s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":");s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":");s.ipv6uri=!0}return s}},{}],111:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(d===setTimeout)return setTimeout(e,0);if((d===n||!d)&&setTimeout){d=setTimeout;return setTimeout(e,0)}try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout){p=clearTimeout;return clearTimeout(e)}try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function s(){if(y&&h){y=!1;h.length?m=h.concat(m):g=-1;m.length&&l()}}function l(){if(!y){var e=o(s);y=!0;for(var t=m.length;t;){h=m;m=[];for(;++g<t;)h&&h[g].run();g=-1;t=m.length}h=null;y=!1;a(e)}}function u(e,t){this.fun=e;this.array=t}function c(){}var d,p,f=t.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:n}catch(e){d=n}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var h,m=[],y=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];m.push(new u(e,t));1!==m.length||y||o(l)};u.prototype.run=function(){this.fun.apply(null,this.array)};f.title="browser";f.browser=!0;f.env={};f.argv=[];f.version="";f.versions={};f.on=c;f.addListener=c;f.once=c;f.off=c;f.removeListener=c;f.removeAllListeners=c;f.emit=c;f.prependListener=c;f.prependOnceListener=c;f.listeners=function(e){return[]};f.binding=function(e){throw new Error("process.binding is not supported")};f.cwd=function(){return"/"};f.chdir=function(e){throw new Error("process.chdir is not supported")};f.umask=function(){return 0}},{}],112:[function(e,t,r){function n(e,t){if("object"==typeof e){t=e;e=void 0}t=t||{};var r,n=i(e),o=n.source,u=n.id,c=n.path,d=l[u]&&c in l[u].nsps,p=t.forceNew||t["force new connection"]||!1===t.multiplex||d;if(p){s("ignoring socket cache for %s",o);r=a(o,t)}else{if(!l[u]){s("new io instance for %s",o);l[u]=a(o,t)}r=l[u]}n.query&&!t.query&&(t.query=n.query);return r.socket(n.path,t)}var i=e("./url"),o=e("socket.io-parser"),a=e("./manager"),s=e("debug")("socket.io-client");t.exports=r=n;var l=r.managers={};r.protocol=o.protocol;r.connect=n;r.Manager=e("./manager");r.Socket=e("./socket")},{"./manager":113,"./socket":115,"./url":116,debug:78,"socket.io-parser":118}],113:[function(e,t,r){function n(e,t){if(!(this instanceof n))return new n(e,t);if(e&&"object"==typeof e){t=e;e=void 0}t=t||{};t.path=t.path||"/socket.io";this.nsps={};this.subs=[];this.opts=t;this.reconnection(!1!==t.reconnection);this.reconnectionAttempts(t.reconnectionAttempts||1/0);this.reconnectionDelay(t.reconnectionDelay||1e3);this.reconnectionDelayMax(t.reconnectionDelayMax||5e3);this.randomizationFactor(t.randomizationFactor||.5);this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()});this.timeout(null==t.timeout?2e4:t.timeout);this.readyState="closed";this.uri=e;this.connecting=[];this.lastPing=null;this.encoding=!1;this.packetBuffer=[];var r=t.parser||s;this.encoder=new r.Encoder;this.decoder=new r.Decoder;this.autoConnect=!1!==t.autoConnect;this.autoConnect&&this.open()}var i=e("engine.io-client"),o=e("./socket"),a=e("component-emitter"),s=e("socket.io-parser"),l=e("./on"),u=e("component-bind"),c=e("debug")("socket.io-client:manager"),d=e("indexof"),p=e("backo2"),f=Object.prototype.hasOwnProperty;t.exports=n;n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)f.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)};n.prototype.updateSocketIds=function(){for(var e in this.nsps)f.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))};n.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id};a(n.prototype);n.prototype.reconnection=function(e){if(!arguments.length)return this._reconnection;this._reconnection=!!e;return this};n.prototype.reconnectionAttempts=function(e){if(!arguments.length)return this._reconnectionAttempts;this._reconnectionAttempts=e;return this};n.prototype.reconnectionDelay=function(e){if(!arguments.length)return this._reconnectionDelay;this._reconnectionDelay=e;this.backoff&&this.backoff.setMin(e);return this};n.prototype.randomizationFactor=function(e){if(!arguments.length)return this._randomizationFactor;this._randomizationFactor=e;this.backoff&&this.backoff.setJitter(e);return this};n.prototype.reconnectionDelayMax=function(e){if(!arguments.length)return this._reconnectionDelayMax;this._reconnectionDelayMax=e;this.backoff&&this.backoff.setMax(e);return this};n.prototype.timeout=function(e){if(!arguments.length)return this._timeout;this._timeout=e;return this};n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()};n.prototype.open=n.prototype.connect=function(e,t){c("readyState %s",this.readyState);if(~this.readyState.indexOf("open"))return this;c("opening %s",this.uri);this.engine=i(this.uri,this.opts);var r=this.engine,n=this;this.readyState="opening";this.skipReconnect=!1;var o=l(r,"open",function(){n.onopen();e&&e()}),a=l(r,"error",function(t){c("connect_error");n.cleanup();n.readyState="closed";n.emitAll("connect_error",t);if(e){var r=new Error("Connection error");r.data=t;e(r)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var s=this._timeout;c("connect attempt will timeout after %d",s);var u=setTimeout(function(){c("connect attempt timed out after %d",s);o.destroy();r.close();r.emit("error","timeout");n.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(u)}})}this.subs.push(o);this.subs.push(a);return this};n.prototype.onopen=function(){c("open");this.cleanup();this.readyState="open";
35this.emit("open");var e=this.engine;this.subs.push(l(e,"data",u(this,"ondata")));this.subs.push(l(e,"ping",u(this,"onping")));this.subs.push(l(e,"pong",u(this,"onpong")));this.subs.push(l(e,"error",u(this,"onerror")));this.subs.push(l(e,"close",u(this,"onclose")));this.subs.push(l(this.decoder,"decoded",u(this,"ondecoded")))};n.prototype.onping=function(){this.lastPing=new Date;this.emitAll("ping")};n.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};n.prototype.ondata=function(e){this.decoder.add(e)};n.prototype.ondecoded=function(e){this.emit("packet",e)};n.prototype.onerror=function(e){c("error",e);this.emitAll("error",e)};n.prototype.socket=function(e,t){function r(){~d(i.connecting,n)||i.connecting.push(n)}var n=this.nsps[e];if(!n){n=new o(this,e,t);this.nsps[e]=n;var i=this;n.on("connecting",r);n.on("connect",function(){n.id=i.generateId(e)});this.autoConnect&&r()}return n};n.prototype.destroy=function(e){var t=d(this.connecting,e);~t&&this.connecting.splice(t,1);this.connecting.length||this.close()};n.prototype.packet=function(e){c("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query);if(t.encoding)t.packetBuffer.push(e);else{t.encoding=!0;this.encoder.encode(e,function(r){for(var n=0;n<r.length;n++)t.engine.write(r[n],e.options);t.encoding=!1;t.processPacketQueue()})}};n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}};n.prototype.cleanup=function(){c("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[];this.encoding=!1;this.lastPing=null;this.decoder.destroy()};n.prototype.close=n.prototype.disconnect=function(){c("disconnect");this.skipReconnect=!0;this.reconnecting=!1;"opening"===this.readyState&&this.cleanup();this.backoff.reset();this.readyState="closed";this.engine&&this.engine.close()};n.prototype.onclose=function(e){c("onclose");this.cleanup();this.backoff.reset();this.readyState="closed";this.emit("close",e);this._reconnection&&!this.skipReconnect&&this.reconnect()};n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts){c("reconnect failed");this.backoff.reset();this.emitAll("reconnect_failed");this.reconnecting=!1}else{var t=this.backoff.duration();c("will wait %dms before reconnect attempt",t);this.reconnecting=!0;var r=setTimeout(function(){if(!e.skipReconnect){c("attempting reconnect");e.emitAll("reconnect_attempt",e.backoff.attempts);e.emitAll("reconnecting",e.backoff.attempts);e.skipReconnect||e.open(function(t){if(t){c("reconnect attempt error");e.reconnecting=!1;e.reconnect();e.emitAll("reconnect_error",t.data)}else{c("reconnect success");e.onreconnect()}})}},t);this.subs.push({destroy:function(){clearTimeout(r)}})}};n.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1;this.backoff.reset();this.updateSocketIds();this.emitAll("reconnect",e)}},{"./on":114,"./socket":115,backo2:71,"component-bind":75,"component-emitter":76,debug:78,"engine.io-client":90,indexof:106,"socket.io-parser":118}],114:[function(e,t,r){function n(e,t,r){e.on(t,r);return{destroy:function(){e.removeListener(t,r)}}}t.exports=n},{}],115:[function(e,t,r){function n(e,t,r){this.io=e;this.nsp=t;this.json=this;this.ids=0;this.acks={};this.receiveBuffer=[];this.sendBuffer=[];this.connected=!1;this.disconnected=!0;r&&r.query&&(this.query=r.query);this.io.autoConnect&&this.open()}var i=e("socket.io-parser"),o=e("component-emitter"),a=e("to-array"),s=e("./on"),l=e("component-bind"),u=e("debug")("socket.io-client:socket"),c=e("parseqs");t.exports=n;var d={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},p=o.prototype.emit;o(n.prototype);n.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",l(this,"onopen")),s(e,"packet",l(this,"onpacket")),s(e,"close",l(this,"onclose"))]}};n.prototype.open=n.prototype.connect=function(){if(this.connected)return this;this.subEvents();this.io.open();"open"===this.io.readyState&&this.onopen();
35this.emit("connecting");return this};n.prototype.send=function(){var e=a(arguments);e.unshift("message");this.emit.apply(this,e);return this};n.prototype.emit=function(e){if(d.hasOwnProperty(e)){p.apply(this,arguments);return this}var t=a(arguments),r={type:i.EVENT,data:t};r.options={};r.options.compress=!this.flags||!1!==this.flags.compress;if("function"==typeof t[t.length-1]){u("emitting packet with ack id %d",this.ids);this.acks[this.ids]=t.pop();r.id=this.ids++}this.connected?this.packet(r):this.sendBuffer.push(r);delete this.flags;return this};n.prototype.packet=function(e){e.nsp=this.nsp;this.io.packet(e)};n.prototype.onopen=function(){u("transport is open - connecting");if("/"!==this.nsp)if(this.query){var e="object"==typeof this.query?c.encode(this.query):this.query;u("sending connect packet with query %s",e);this.packet({type:i.CONNECT,query:e})}else this.packet({type:i.CONNECT})};n.prototype.onclose=function(e){u("close (%s)",e);this.connected=!1;this.disconnected=!0;delete this.id;this.emit("disconnect",e)};n.prototype.onpacket=function(e){if(e.nsp===this.nsp)switch(e.type){case i.CONNECT:this.onconnect();break;case i.EVENT:case i.BINARY_EVENT:this.onevent(e);break;case i.ACK:case i.BINARY_ACK:this.onack(e);break;case i.DISCONNECT:this.ondisconnect();break;case i.ERROR:this.emit("error",e.data)}};n.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t);if(null!=e.id){u("attaching ack callback to event");t.push(this.ack(e.id))}this.connected?p.apply(this,t):this.receiveBuffer.push(t)};n.prototype.ack=function(e){var t=this,r=!1;return function(){if(!r){r=!0;var n=a(arguments);u("sending ack %j",n);t.packet({type:i.ACK,id:e,data:n})}}};n.prototype.onack=function(e){var t=this.acks[e.id];if("function"==typeof t){u("calling ack %s with %j",e.id,e.data);t.apply(this,e.data);delete this.acks[e.id]}else u("bad ack %s",e.id)};n.prototype.onconnect=function(){this.connected=!0;this.disconnected=!1;this.emit("connect");this.emitBuffered()};n.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)p.apply(this,this.receiveBuffer[e]);this.receiveBuffer=[];for(e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]};n.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp);this.destroy();this.onclose("io server disconnect")};n.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)};n.prototype.close=n.prototype.disconnect=function(){if(this.connected){u("performing disconnect (%s)",this.nsp);this.packet({type:i.DISCONNECT})}this.destroy();this.connected&&this.onclose("io client disconnect");return this};n.prototype.compress=function(e){this.flags=this.flags||{};this.flags.compress=e;return this}},{"./on":114,"component-bind":75,"component-emitter":76,debug:78,parseqs:109,"socket.io-parser":118,"to-array":121}],116:[function(e,t,r){(function(r){function n(e,t){var n=e;t=t||r.location;null==e&&(e=t.protocol+"//"+t.host);if("string"==typeof e){"/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e);if(!/^(https?|wss?):\/\//.test(e)){o("protocol-less url %s",e);e=void 0!==t?t.protocol+"//"+e:"https://"+e}o("parse %s",e);n=i(e)}n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var a=-1!==n.host.indexOf(":"),s=a?"["+n.host+"]":n.host;n.id=n.protocol+"://"+s+":"+n.port;n.href=n.protocol+"://"+s+(t&&t.port===n.port?"":":"+n.port);return n}var i=e("parseuri"),o=e("debug")("socket.io-client:url");t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{debug:78,parseuri:110}],117:[function(e,t,r){(function(t){function n(e,t){if(!e)return e;if(a(e)){var r={_placeholder:!0,num:t.length};t.push(e);return r}if(o(e)){for(var i=new Array(e.length),s=0;s<e.length;s++)i[s]=n(e[s],t);return i}if("object"==typeof e&&!(e instanceof Date)){var i={};for(var l in e)i[l]=n(e[l],t);return i}return e}function i(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];
35if(o(e))for(var r=0;r<e.length;r++)e[r]=i(e[r],t);else if("object"==typeof e)for(var n in e)e[n]=i(e[n],t);return e}var o=e("isarray"),a=e("./is-buffer"),s=Object.prototype.toString,l="function"==typeof t.Blob||"[object BlobConstructor]"===s.call(t.Blob),u="function"==typeof t.File||"[object FileConstructor]"===s.call(t.File);r.deconstructPacket=function(e){var t=[],r=e.data,i=e;i.data=n(r,t);i.attachments=t.length;return{packet:i,buffers:t}};r.reconstructPacket=function(e,t){e.data=i(e.data,t);e.attachments=void 0;return e};r.removeBlobs=function(e,t){function r(e,s,c){if(!e)return e;if(l&&e instanceof Blob||u&&e instanceof File){n++;var d=new FileReader;d.onload=function(){c?c[s]=this.result:i=this.result;--n||t(i)};d.readAsArrayBuffer(e)}else if(o(e))for(var p=0;p<e.length;p++)r(e[p],p,e);else if("object"==typeof e&&!a(e))for(var f in e)r(e[f],f,e)}var n=0,i=e;r(i);n||t(i)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./is-buffer":119,isarray:120}],118:[function(e,t,r){function n(){}function i(e){var t=""+e.type;r.BINARY_EVENT!==e.type&&r.BINARY_ACK!==e.type||(t+=e.attachments+"-");e.nsp&&"/"!==e.nsp&&(t+=e.nsp+",");null!=e.id&&(t+=e.id);null!=e.data&&(t+=JSON.stringify(e.data));d("encoded %j as %s",e,t);return t}function o(e,t){function r(e){var r=h.deconstructPacket(e),n=i(r.packet),o=r.buffers;o.unshift(n);t(o)}h.removeBlobs(e,r)}function a(){this.reconstructor=null}function s(e){var t=0,n={type:Number(e.charAt(0))};if(null==r.types[n.type])return c();if(r.BINARY_EVENT===n.type||r.BINARY_ACK===n.type){for(var i="";"-"!==e.charAt(++t);){i+=e.charAt(t);if(t==e.length)break}if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){n.nsp="";for(;++t;){var o=e.charAt(t);if(","===o)break;n.nsp+=o;if(t===e.length)break}}else n.nsp="/";var a=e.charAt(t+1);if(""!==a&&Number(a)==a){n.id="";for(;++t;){var o=e.charAt(t);if(null==o||Number(o)!=o){--t;break}n.id+=e.charAt(t);if(t===e.length)break}n.id=Number(n.id)}e.charAt(++t)&&(n=l(n,e.substr(t)));d("decoded %s as %j",e,n);return n}function l(e,t){try{e.data=JSON.parse(t)}catch(e){return c()}return e}function u(e){this.reconPack=e;this.buffers=[]}function c(){return{type:r.ERROR,data:"parser error"}}var d=e("debug")("socket.io-parser"),p=e("component-emitter"),f=e("has-binary2"),h=e("./binary"),m=e("./is-buffer");r.protocol=4;r.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"];r.CONNECT=0;r.DISCONNECT=1;r.EVENT=2;r.ACK=3;r.ERROR=4;r.BINARY_EVENT=5;r.BINARY_ACK=6;r.Encoder=n;r.Decoder=a;n.prototype.encode=function(e,t){e.type!==r.EVENT&&e.type!==r.ACK||!f(e.data)||(e.type=e.type===r.EVENT?r.BINARY_EVENT:r.BINARY_ACK);d("encoding packet %j",e);if(r.BINARY_EVENT===e.type||r.BINARY_ACK===e.type)o(e,t);else{t([i(e)])}};p(a.prototype);a.prototype.add=function(e){var t;if("string"==typeof e){t=s(e);if(r.BINARY_EVENT===t.type||r.BINARY_ACK===t.type){this.reconstructor=new u(t);0===this.reconstructor.reconPack.attachments&&this.emit("decoded",t)}else this.emit("decoded",t)}else{if(!m(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e);if(t){this.reconstructor=null;this.emit("decoded",t)}}};a.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};u.prototype.takeBinaryData=function(e){this.buffers.push(e);if(this.buffers.length===this.reconPack.attachments){var t=h.reconstructPacket(this.reconPack,this.buffers);this.finishedReconstruction();return t}return null};u.prototype.finishedReconstruction=function(){this.reconPack=null;this.buffers=[]}},{"./binary":117,"./is-buffer":119,"component-emitter":76,debug:78,"has-binary2":103}],119:[function(e,t,r){(function(e){function r(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],120:[function(e,t,r){arguments[4][104][0].apply(r,arguments)},{dup:104}],121:[function(e,t,r){function n(e,t){var r=[];t=t||0;for(var n=t||0;n<e.length;n++)r[n-t]=e[n];return r}t.exports=n},{}],122:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}},{}],123:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],124:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};arguments.length>=3&&(n.depth=arguments[2]);arguments.length>=4&&(n.colors=arguments[3]);m(t)?n.showHidden=t:t&&r._extend(n,t);w(n.showHidden)&&(n.showHidden=!1);w(n.depth)&&(n.depth=2);w(n.colors)&&(n.colors=!1);w(n.customInspect)&&(n.customInspect=!0);n.colors&&(n.stylize=o);return l(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"�["+i.colors[r][0]+"m"+e+"�["+i.colors[r][1]+"m":e}function a(e,t){return e}function s(e){var t={};e.forEach(function(e,r){t[e]=!0});return t}function l(e,t,n){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);_(i)||(i=l(e,i,n));return i}var o=u(e,t);if(o)return o;var a=Object.keys(t),m=s(a);e.showHidden&&(a=Object.getOwnPropertyNames(t));if(k(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(T(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(k(t))return c(t)}var g="",v=!1,b=["{","}"];if(h(t)){v=!0;b=["[","]"]}if(T(t)){g=" [Function"+(t.name?": "+t.name:"")+"]"}x(t)&&(g=" "+RegExp.prototype.toString.call(t));S(t)&&(g=" "+Date.prototype.toUTCString.call(t));k(t)&&(g=" "+c(t))
36;
36if(0===a.length&&(!v||0==t.length))return b[0]+g+b[1];if(n<0)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var w;w=v?d(e,t,n,m,a):a.map(function(r){return p(e,t,n,m,r,v)});e.seen.pop();return f(w,g,b)}function u(e,t){if(w(t))return e.stylize("undefined","undefined");if(_(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)j(t,String(a))?o.push(p(e,t,r,n,String(a),!0)):o.push("");i.forEach(function(i){i.match(/^\d+$/)||o.push(p(e,t,r,n,i,!0))});return o}function p(e,t,r,n,i,o){var a,s,u;u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]};u.get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special"));j(n,i)||(a="["+i+"]");if(!s)if(e.seen.indexOf(u.value)<0){s=y(r)?l(e,u.value,null):l(e,u.value,r-1);s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n"))}else s=e.stylize("[Circular]","special");if(w(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i);if(a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){a=a.substr(1,a.length-2);a=e.stylize(a,"name")}else{a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");a=e.stylize(a,"string")}}return a+": "+s}function f(e,t,r){var n=0;return e.reduce(function(e,t){n++;t.indexOf("\n")>=0&&n++;return e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function v(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function w(e){return void 0===e}function x(e){return M(e)&&"[object RegExp]"===E(e)}function M(e){return"object"==typeof e&&null!==e}function S(e){return M(e)&&"[object Date]"===E(e)}function k(e){return M(e)&&("[object Error]"===E(e)||e instanceof Error)}function T(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function E(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function O(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var D=/%[sdj%]/g;r.format=function(e){if(!_(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,a=String(e).replace(D,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<o;s=n[++r])y(s)||!M(s)?a+=" "+s:a+=" "+i(s);return a};r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i);a=!0}return e.apply(this,arguments)}if(w(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return o};var C,L={};r.debuglog=function(e){w(C)&&(C=t.env.NODE_DEBUG||"");e=e.toUpperCase();if(!L[e])if(new RegExp("\\b"+e+"\\b","i").test(C)){var n=t.pid;L[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else L[e]=function(){};return L[e]};r.inspect=i;i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};r.isArray=h;r.isBoolean=m;r.isNull=y;r.isNullOrUndefined=g;r.isNumber=v;r.isString=_;
36r.isSymbol=b;r.isUndefined=w;r.isRegExp=x;r.isObject=M;r.isDate=S;r.isError=k;r.isFunction=T;r.isPrimitive=A;r.isBuffer=e("./support/isBuffer");var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))};r.inherits=e("inherits");r._extend=function(e,t){if(!t||!M(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":123,_process:111,inherits:122}],125:[function(e,t,r){"use strict";function n(e){var t="";do{t=s[e%l]+t;e=Math.floor(e/l)}while(e>0);return t}function i(e){var t=0;for(d=0;d<e.length;d++)t=t*l+u[e.charAt(d)];return t}function o(){var e=n(+new Date);return e!==a?(c=0,a=e):e+"."+n(c++)}for(var a,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),l=64,u={},c=0,d=0;d<l;d++)u[s[d]]=d;o.encode=n;o.decode=i;t.exports=o},{}]},{},[6])(6)});define("notif-server",["notif-server/bundle"],function(e){return e});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/notifications/apiVisitor",["require","exports","../../managers/manager","ribsjs","../error/error"],e)}(function(e,t){"use strict";function r(e){return e}function n(e,t,r){return{type:e,extract:t,params:r}}Object.defineProperty(t,"__esModule",{value:!0});var i=e("../../managers/manager"),o=e("ribsjs"),a=e("../error/error"),s=r({artist:i.ArtistsManager,user:i.UserManager,playlist:i.PlaylistsManager,track:i.TracksManager,album:i.AlbumsManager,review:i.ReviewsManager}),l=function(){function e(e){this.userData=e;this.Path=function(e){return function(){function t(e){this.nodes=e}t.create=function(){return t.createInternal([])};t.createInternal=function(e){void 0===e&&(e=[]);return new(function(){function r(){}r.prototype.add=function(t,r,i){e.push(n(t,r,i));return this};r.prototype.addLast=function(r,n,i){this.add(r,n,i);return new t(e)};return r}())};t.prototype.createIDLoader=function(t){return e.createIDLoader.apply(e,[t].concat(this.nodes))};t.prototype.load=function(t){return e.createLoader.apply(e,[t].concat(this.nodes))()};t.prototype.loadID=function(e){return this.createIDLoader(e)()};return t}()}(this);this.paths=r({artist:r({name:this.Path.create().addLast("artist",["name"])}),user:r({dispname:this.Path.create().addLast("user",["dispname"])}),playlist:r({name:this.Path.create().addLast("playlist",["name"])}),track:r({name:this.Path.create().addLast("track",["name"])}),album:r({name:this.Path.create().addLast("album",["name"])}
36),review:r({track:r({name:this.Path.create().add("review",["joinId"],{status:"any"}).addLast("track",["name"])}),playlist:r({id:this.Path.create().add("review",["joinId"]).addLast("playlist",["id"]),name:this.Path.create().add("review",["joinId"],{status:"any"}).addLast("playlist",["name"])})})})}e.create=function(t){e.instancesByUserData.has(t)||e.instancesByUserData.set(t,new e(t));return e.instancesByUserData.get(t)};e.prototype.loadNode=function(e){return __awaiter(this,void 0,void 0,function(){var t,r,n,i,l,u;return __generator(this,function(c){switch(c.label){case 0:t=e.type,r=e.extract;n=e.id,i=e.params;i=i||{};delete i.id;"string"==typeof n&&(n=parseInt(n,10));if("number"==typeof n&&(isNaN(n)||!isFinite(n)))throw new a.default("ApiVisitor: loadNode: Illegal ID given: "+n);u=10;c.label=1;case 1:return[4,s[t].get(n,{userData:this.userData,noBundle:!0,dataParameters:i})];case 2:l=c.sent()[0];if("object"!=typeof l||null===l)return[3,3];if(parseInt(l.get("id")||"",10)===n)return[3,4];c.label=3;case 3:if(u-- >0)return[3,1];c.label=4;case 4:if(!(l instanceof o.Model))throw new a.default("Could not load node "+JSON.stringify(e)+": No result found.");return[2,r.map(function(e){return l.get(e)})]}})})};e.prototype.createLoader=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return function(){return __awaiter(t,void 0,void 0,function(){var t,n,i,o;return __generator(this,function(a){switch(a.label){case 0:t=[e];n=0,i=r;a.label=1;case 1:if(!(n<i.length))return[3,4];o=i[n];o.id=t[0];return[4,this.loadNode(o)];case 2:t=a.sent();a.label=3;case 3:n++;return[3,1];case 4:return[2,t]}})})}};e.prototype.createIDLoader=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return function(){return __awaiter(t,void 0,void 0,function(){var t,n,i;return __generator(this,function(o){switch(o.label){case 0:t=0,n=r;o.label=1;case 1:if(!(t<n.length))return[3,4];i=n[t];i.id=e;return[4,this.loadNode(i)];case 2:e=o.sent()[0];o.label=3;case 3:t++;return[3,1];case 4:return[2,e]}})})}};e.prototype.userNameLoader=function(e){var t=this;return function(){return __awaiter(t,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:t="@";return[4,this.paths.user.dispname.loadID(e)];case 1:return[2,t+r.sent()]}})})}};e.prototype.loadReplyEntity=function(e){return __awaiter(this,void 0,void 0,function(){var t,r,n;return __generator(this,function(i){switch(i.label){case 0:return[4,this.Path.create().add("review",["joinId"],{status:"any"}).addLast("review",["joinId","type"],{status:"any"}).load(e)];case 1:t=i.sent(),r=t[0],n=t[1];return[2,{id:r,type:n}]}})})};e.prototype.commentReplyEntityLoader=function(e){var t=this;return function(){return __awaiter(t,void 0,void 0,function(){var t,r,n;return __generator(this,function(i){switch(i.label){case 0:return[4,this.loadReplyEntity(e)];case 1:t=i.sent(),r=t.id,n=t.type;switch(n){default:throw new a.default("Unable to process review join type '"+n+"': This type is unknown.");case"playlist":return[2,this.paths.playlist.name.createIDLoader(r)()];case"track":return[2,this.paths.track.name.createIDLoader(r)()]}return[2]}})})}};e.prototype.loadArtistSinglesAndAlbumIds=function(e){return __awaiter(this,void 0,void 0,function(){var t,r,n,i;return __generator(this,function(o){switch(o.label){case 0:return[4,this.Path.create().addLast("artist",["singles","albums"]).load(e)];case 1:t=o.sent(),r=t[0],n=t[1];i=function(e){return e.map(function(e){return e.id})};return[2,{singles:i(r),albums:i(n)}]}})})};e.prototype.isSingleOrAlbum=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){switch(n.label){case 0:t=parseInt(t,10);return[4,this.loadArtistSinglesAndAlbumIds(e)];case 1:r=n.sent();if(-1!==r.singles.indexOf(t))return[2,"single"];if(-1!==r.albums.indexOf(t))return[2,"album"];throw new a.default("artist "+e+" has neither a single nor an album with id "+t)}})})};e.prototype.countNumberOfSingleAndAlbums=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,n=this;return __generator(this,function(i){switch(i.label){case 0:return[4,Promise.all(t.map(function(t){return n.isSingleOrAlbum(e,t)}))];case 1:r=i.sent();return[2,{singles:r.filter(function(e){return"single"===e}).length,albums:r.filter(function(e){return"album"===e}).length}]}})})};e.prototype.countNumberOfSingles=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){switch(r.label){case 0:return[4,this.countNumberOfSingleAndAlbums(e,t)];case 1:return[2,r.sent().singles]}})})};e.prototype.countNumberOfAlbums=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){switch(r.label){case 0:return[4,this.countNumberOfSingleAndAlbums(e,t)];case 1:return[2,r.sent().albums]}})})};e.instancesByUserData=new Map;return e}();t.Visitor=l;t.default=l});!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("jamendo-text-formatter/bundle",[],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JamendoTextFormatter=e()}(function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){return i(t[a][1][e]||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){"use strict";
36Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(){}return Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),e.prototype.setParent=function(e){this._parent=e},e.prototype.setParentOf=function(e,t){e.setParent(t)},e}();r.BaseNode=n,r.default=n},{}],2:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(e){function t(t){var r=e.call(this)||this;return r.items=t,r}return n(t,e),Object.defineProperty(t.prototype,"nodes",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(e("ast/BaseNode").BaseNode);r.ListNode=i},{"ast/BaseNode":1}],3:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(e){function t(t){var r=e.call(this)||this;return r.value=t,r}return n(t,e),t.fromString=function(e){return new t(e)},t}(e("ast/BaseNode").BaseNode);r.LiteralNode=i},{"ast/BaseNode":1}],4:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(e){function t(t,r){var n=e.call(this)||this;return n.argumentName=t,n.transformations=r,n}return n(t,e),t}(e("ast/BaseNode").BaseNode);r.NamedFormatStringExpr=i},{"ast/BaseNode":1}],5:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(e){function t(t,r){var n=e.call(this)||this;return n.numberedArgumentSpecifier=t,n.flags=r,n}return n(t,e),t}(e("ast/BaseNode").BaseNode);r.PosixFormatStringExpr=i},{"ast/BaseNode":1}],6:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=e("ast/BaseNode");r.ISimpleConditionalExprOperator=["==","===","!=","!==",">","<",">=","<="];var o=function(e){function t(t,r,n,i,o){var a=e.call(this)||this;return a.leftHandValue=t,a.operator=r,a.rightHandValue=n,a.truthyExpr=i,a.falsyExpr=o,a}return n(t,e),t}(i.BaseNode);r.SimpleConditionalExpr=o},{"ast/BaseNode":1}],7:[function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1],a=r;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(r);break}a[2]&&l.ops.pop(),l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e],o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};
36Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e){var t=e.astNode,r=e.getEmitterParameter,n=e.applyTransformation,i=e.getEmitterParameterCursor,o=e.updateEmitterParameterCursor;this.astNode=t,this._getEmitterParameter=r,this._applyTransformation=n,this._getEmitterParameterCursor=i,this._updateEmitterParameterCursor=o}return e.prototype.getEmitterParameter=function(e){return this._getEmitterParameter(e)},e.prototype.applyTransformation=function(e,t){return this._applyTransformation(e,t)},e.prototype.getEmitterParameterCursor=function(){return this._getEmitterParameterCursor()},e.prototype.updateEmitterParameterCursor=function(e){return this._updateEmitterParameterCursor(e)},e.prototype.emit=function(){return n(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return[4,this.emitConcrete(this.astNode)];case 1:return e=t.sent(),Array.isArray(e)||(e=[e]),[2,e.join("")]}})})},e}();r.BaseEmitter=o,r.default=o},{}],8:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(e("emitter/ListNodeEmitter").ListNodeEmitter);r.Emitter=i,r.default=i},{"emitter/ListNodeEmitter":9}],9:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1],a=r;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(r);break}a[2]&&l.ops.pop(),l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e],o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var s=e("emitter/BaseEmitter"),l=e("emitter/factory"),u=e("ast/ListNode"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.emitConcrete=function(e){return o(this,void 0,void 0,function(){var t,r,n,i,o;return a(this,function(a){switch(a.label){case 0:t="",r=0,n=e.nodes,a.label=1;case 1:return r<n.length?(i=n[r],o=t,[4,l.createForAstNode({astNode:i,getEmitterParameter:this.getEmitterParameter.bind(this),applyTransformation:this.applyTransformation.bind(this),getEmitterParameterCurs
36or:this.getEmitterParameterCursor.bind(this),updateEmitterParameterCursor:this.updateEmitterParameterCursor.bind(this)}).emit()]):[3,4];case 2:t=o+a.sent(),a.label=3;case 3:return r++,[3,1];case 4:return[2,t]}})})},t=i([l.register(function(e){return e.astNode instanceof u.ListNode?1/0:0})],t)}(s.BaseEmitter);r.ListNodeEmitter=c},{"ast/ListNode":2,"emitter/BaseEmitter":7,"emitter/factory":14}],10:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(r,"__esModule",{value:!0});var o=e("emitter/BaseEmitter"),a=e("emitter/factory"),s=e("ast/LiteralNode"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.emitConcrete=function(e){return e.value},t=i([a.register(function(e){return e.astNode instanceof s.LiteralNode?1/0:0})],t)}(o.BaseEmitter);r.LiteralNodeEmitter=l},{"ast/LiteralNode":3,"emitter/BaseEmitter":7,"emitter/factory":14}],11:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1],a=r;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(r);break}a[2]&&l.ops.pop(),l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e],o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var s=e("emitter/BaseEmitter"),l=e("emitter/factory"),u=e("ast/NamedFormatStringExpr"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.emitConcrete=function(e){return o(this,void 0,void 0,function(){var t,r,n,i;return a(this,function(o){switch(o.label){case 0:return[4,this.getEmitterParameter(e.argumentName)];case 1:t=o.sent(),r=0,n=e.transformations,o.label=2;case 2:return r<n.length?(i=n[r],[4,this.applyTransformation(i,t)]):[3,5];case 3:t=o.sent(),o.label=4;case 4:return r++,[3,2];case 5:return[2,t]}})})},t=i([l.register(function(e){return e.astNode instanceof u.NamedFormatStringE
36xpr?1/0:0})],t)}(s.BaseEmitter);r.NamedFormatStringExprEmitter=c},{"ast/NamedFormatStringExpr":4,"emitter/BaseEmitter":7,"emitter/factory":14}],12:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1],a=r;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(r);break}a[2]&&l.ops.pop(),l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e],o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(r,"__esModule",{value:!0});var s=e("emitter/BaseEmitter"),l=e("emitter/factory"),u=e("ast/PosixFormatStringExpr"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.emitConcrete=function(e){return o(this,void 0,void 0,function(){var t;return a(this,function(r){return t=this.getEmitterParameterCursor(),"number"==typeof e.numberedArgumentSpecifier?t=e.numberedArgumentSpecifier:this.updateEmitterParameterCursor(1),[2,this.getEmitterParameter(t)]})})},t=i([l.register(function(e){return e.astNode instanceof u.PosixFormatStringExpr?1/0:0})],t)}(s.BaseEmitter);r.PosixFormatStringExprEmitter=c},{"ast/PosixFormatStringExpr":5,"emitter/BaseEmitter":7,"emitter/factory":14}],13:[function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue
37;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1],a=r;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(r);break}a[2]&&l.ops.pop(),l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e],o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};
37Object.defineProperty(r,"__esModule",{value:!0});var s=e("emitter/BaseEmitter"),l=e("emitter/factory"),u=e("ast/SimpleConditionalExpr"),c=e("ast/NamedFormatStringExpr"),d=e("emitter/NamedFormatStringExprEmitter"),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),r=t,t.prototype.emitConcrete=function(e){return o(this,void 0,void 0,function(){var t,r;return a(this,function(n){switch(n.label){case 0:return[4,this.evaluateCondition(e)];case 1:return t=n.sent(),r=!0===t?e.truthyExpr:e.falsyExpr,[4,this.expandExpression(r)];case 2:return[2,n.sent()]}})})},t.prototype.evaluateCondition=function(e){return o(this,void 0,void 0,function(){var t,r;return a(this,function(n){switch(n.label){case 0:return[4,this.expandExpression(e.leftHandValue)];case 1:return t=n.sent(),[4,this.expandExpression(e.rightHandValue)];case 2:return r=n.sent(),[2,this.getOperatorFunction(e.operator)(t,r)]}})})},t.prototype.expandExpression=function(e){return o(this,void 0,void 0,function(){var t;return a(this,function(r){switch(r.label){case 0:return e instanceof c.NamedFormatStringExpr?(t=new d.NamedFormatStringExprEmitter({astNode:e,getEmitterParameter:this.getEmitterParameter.bind(this),applyTransformation:this.applyTransformation.bind(this),getEmitterParameterCursor:this.getEmitterParameterCursor.bind(this),updateEmitterParameterCursor:this.updateEmitterParameterCursor.bind(this)}),[4,t.emit()]):[3,2];case 1:return[2,r.sent()];case 2:return/^".*"$/.test(e)?[2,e.slice(1,-1)]:[2,e]}})})},t.prototype.getOperatorFunction=function(e){if(!r.operatorFunctions.has(e))throw new Error("Unable to get operator function: Operation "+e+" not known.");return r.operatorFunctions.get(e)},t.operatorFunctions=new Map(u.ISimpleConditionalExprOperator.map(function(e){return[e,new Function("l","r","return l "+e+" r;")]})),t=r=i([l.register(function(e){return e.astNode instanceof u.SimpleConditionalExpr?1/0:0})],t);var r}(s.BaseEmitter);r.SimpleConditionalExprEmitter=p},{"ast/NamedFormatStringExpr":4,"ast/SimpleConditionalExpr":6,"emitter/BaseEmitter":7,"emitter/NamedFormatStringExprEmitter":11,"emitter/factory":14}],14:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("utils/FactoryRegistry").FactoryRegistry.create();r.register=n.registerClass.bind(n),r.createForAstNode=n.create.bind(n)},{"utils/FactoryRegistry":20}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),e("emitter/ListNodeEmitter"),e("emitter/LiteralNodeEmitter"),e("emitter/NamedFormatStringExprEmitter"),e("emitter/PosixFormatStringExprEmitter"),e("emitter/SimpleConditionalExprEmitter");var n=e("./Emitter");r.Emitter=n.Emitter},{"./Emitter":8,"emitter/ListNodeEmitter":9,"emitter/LiteralNodeEmitter":10,"emitter/NamedFormatStringExprEmitter":11,"emitter/PosixFormatStringExprEmitter":12,"emitter/SimpleConditionalExprEmitter":13}],16:[function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1],a=r;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(r);break}a[2]&&l.ops.pop(),l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e],o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};
37Object.defineProperty(r,"__esModule",{value:!0});var o=e("parser/Parser"),a=e("grammar/defaultGrammar"),s=e("emitter"),l=function(){function e(e,t,r,a,s){void 0===s&&(s=function(e,t){return o.Parser.parse(e,t)}),this.translate=e,this.numericParams=t,this.namedParams=r,this.formattingTransformations=a,this.parse=s,this.EmitterParams=function(e,t,r){return function(){return function(o){var a=this;this.astNode=o,this.cursor=0,this.getEmitterParameter=function(r){return n(a,void 0,void 0,function(){var n;return i(this,function(i){switch(i.label){case 0:return"number"!=typeof r?[3,1]:[2,e[r]().toString()];case 1:if("function"!=typeof t[r])throw new Error("Cannot get emitter parameter: Parameter "+r+" not found");return[4,t[r]()];case 2:if(void 0===(n=i.sent())||null===n)throw new Error("Cannot get emitter parameter: Parameter "+r+" returned "+n);return[2,n.toString()]}})})},this.applyTransformation=function(e,t){return n(a,void 0,void 0,function(){return i(this,function(n){return[2,r[e](t)]})})},this.getEmitterParameterCursor=function(){return a.cursor},this.updateEmitterParameterCursor=function(e){a.cursor+=e}}}()}(this.numericParams,this.namedParams,this.formattingTransformations)}return e.prototype.translateAndFormat=function(e){return n(this,void 0,void 0,function(){var t,r,n,o,l,u,c;return i(this,function(i){switch(i.label){case 0:return r=this.parse,[4,this.translate(e)];case 1:for(t=r.apply(this,[i.sent(),a.language]),n=new this.EmitterParams(t),o=0,l=Object.getOwnPropertyNames(n).map(function(e){return Object.getOwnPropertyDescriptor(n,e)});o<l.length;o++)"function"==typeof(u=l[o]).value&&(u.value=u.value.bind(n));return c=new s.Emitter(n),[2,c.emit()]}})})},e}();r.Formatter=l,r.default=l},{emitter:15,"grammar/defaultGrammar":17,"parser/Parser":18}],17:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("parser/grammar"),i=e("ast/LiteralNode"),o=e("ast/NamedFormatStringExpr"),a=e("ast/SimpleConditionalExpr"),s=e("ast/PosixFormatStringExpr");r.language={name:"i18n-lang",patterns:[n.IFormalLanguageTokenPattern(/%([dfs]+)/).produces(function(e,t){return new s.PosixFormatStringExpr(void 0,t.split(""))}),n.IFormalLanguageTokenPattern(/%([0-9]+)\$([dfs]+)/).produces(function(e,t,r){return new s.PosixFormatStringExpr(parseInt(t,10),r.split(""))}),n.IFormalLanguageTokenPattern(/\{\{([a-zA-Z]+[a-zA-Z0-9]*)\}\}/).produces(function(e,t){return new o.NamedFormatStringExpr(t,[])}),n.IFormalLanguageTokenPattern(/\{\{([a-zA-Z]+[a-zA-Z0-9]*)([\!a-zA-Z_0-9]+)\}\}/).produces(function(e,t,r){return new o.NamedFormatStringExpr(t,r.split("!").filter(function(e){return"string"==typeof e&&e.trim().length>0}))}),function(){var e=a.ISimpleConditionalExprOperator.join("|");return n.IFormalLanguageTokenPattern(new RegExp('\\[\\[ *("?[a-zA-Z0-9]*"?) *('+e+') *("?[a-zA-Z0-9]*"?) *\\? *("?[a-zA-Z0-9]*"?) *: *("?[a-zA-Z0-9]*"?) * *\\]\\]')).produces(function(e,t,r,n,i,s){var l=function(e){return/^"/.test(e)||/^[0-9]+$/.test(e)?e:new o.NamedFormatStringExpr(e,[])};return new a.SimpleConditionalExpr(l(t),r,l(n),l(i),l(s))})}(),n.IFormalLanguageTokenPattern(/.|\n/).produces(i.LiteralNode.fromString)]},r.default=r.language},{"ast/LiteralNode":3,"ast/NamedFormatStringExpr":4,"ast/PosixFormatStringExpr":5,"ast/SimpleConditionalExpr":6,"parser/grammar":19}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("ast/ListNode"),i=function(){function e(e){this.language=e}return e.parse=function(t,r){return e.getForLanguage(r).parse(t)},e.getForLanguage=function(t){if(!this.instancesByLanguage.has(t)){var r=new e(t);this.instancesByLanguage.set(t,r)}return this.instancesByLanguage.get(t)},e.prototype.parse=function(e){for(var t=[],r=0;r<e.length;){var i=r+this.parseFromIndex(t,e,r);if(i<=r)throw new Error("parsing failed: input index did not increase from "+r+" (next was "+i+")");r=i}return new n.ListNode(t)},e.prototype.parseFromIndex=function(e,t,r){t=t.slice(r);for(var n=0,i=this.language.patterns;n<i.length;n++){var o=i[n],a=t.match(o.pattern);if(a&&0===a.index&&"string"==typeof a[0]&&a[0].length>0){var s=o.produce.apply(o,[a[0]].concat(a.slice(1)));return e.push(s),a[0].length}}throw new Error("SyntaxError: Unexpected token at index "+r+': "'+t.
37slice(0,10)+'"')},e.instancesByLanguage=new Map,e}();r.Parser=i,r.default=i},{"ast/ListNode":2}],19:[function(e,t,r){"use strict";function n(e){return new(function(){function t(){}return t.prototype.produces=function(t){return{pattern:e,produce:t}},t.prototype.produceWithLanguage=function(e){return this.produces(function(t,r){return i.Parser.parse(r,e)})},t}())}Object.defineProperty(r,"__esModule",{value:!0});var i=e("parser/Parser");r.IFormalLanguageTokenPattern=n;!function(e){e.generateCommonPatternFromLanguage=function(e){return new RegExp("("+e.patterns.map(function(e){return e.pattern.toString().replace(/^\//,"").replace(/\/$/,"")}).map(function(e){return"("+e+")"}).join("|")+")")},e.createDescendable=function(t){return n(e.generateCommonPatternFromLanguage(t)).produceWithLanguage(t)}}(r.IFormalLanguage||(r.IFormalLanguage={}))},{"parser/Parser":18}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(){this.registry=[]}return e.create=function(){return new e},e.prototype.register=function(e,t){this.registry.push({ratingFunc:e,constructorFunc:t})},e.prototype.registerClass=function(e){var t=this;return function(r){t.register(e,function(e){return new r(e)})}},e.prototype.create=function(e){return this.findConstructorForContext(e).call(void 0,e)},e.prototype.createRatingSorter=function(e){return function(t,r){var n=t.ratingFunc(e),i=r.ratingFunc(e);return n>i?-1:n<i?1:0}},e.prototype.findConstructorForContext=function(e){var t=this.registry.filter(function(t){return(t.ratingFunc(e)||0)>0}).sort(this.createRatingSorter(e));if(t.length<1)throw new Error("Unable to find matching constructor for context.");return t[0].constructorFunc},e}();r.FactoryRegistry=n,r.default=n},{}]},{},[16])(16)});define("jamendo-text-formatter",["jamendo-text-formatter/bundle"],function(e){return e});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/textFormat",["require","exports","jamendo-text-formatter","../../managers/manager"],e)}(function(e,t){"use strict";function r(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,new Promise(function(r,n){o.LocalizationManager.get([e],{userData:t}).then(function(e){var t=e[0];r(t.get("translate"))}).catch(n)})]})})}function n(e,t,n,o){void 0===o&&(o={});return new i.Formatter(function(e){return r(e,t)},o,n,{notif_text_highlight:function(e){return"<span>"+e+"</span>"}}).translateAndFormat(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=e("jamendo-text-formatter"),o=e("../../managers/manager");t.formatText=n});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/notifications/translate",["require","exports","notif-server","./apiVisitor","../utilities/textFormat","../error/error"],e)}(function(e,t){"use strict";function r(e){if(d.has(e))return d.get(e);var t=new Map([[s.NotificationType.JM_NewPlaylistFollower,{1:function(t,r){return{playlist:e.paths.playlist.name.createIDLoader(t),follower:e.userNameLoader(r[0])}},2:function(t,r){return{playlist:e.paths.playlist.name.createIDLoader(t),follower1:e.userNameLoader(r[0]),follower2:e.userNameLoader(r[1])}},many:function(t,r){return{playlist:e.paths.playlist.name.createIDLoader(t),follower1:e.userNameLoader(r[0]),followerAmount:function(){return r.length-1}}}}],[s.NotificationType.JM_NewPlaylistComment,{1:function(t,r){return{playlist:e.paths.review.playlist.name.createIDLoader(t),commenter:e.userNameLoader(r[0])}},2:function(t,r){return{playlist:e.paths.review.playlist.name.createIDLoader(t),commenter1:e.userNameLoader(r[0]),commenter2:e.userNameLoader(r[1])}},many:function(t,r){return{playlist:e.paths.review.playlist.name.createIDLoader(t),commenter1:e.userNameLoader(r[0]),commenterAmount:function(){return r.length-1}}}}],[s.NotificationType.JAJM_NewCommentReply,{1:function(t,r){return{entity:e.commentReplyEntityLoader(t),commenter:e.userNameLoader(r[0])}},2:function(t,r){return{entity:e.commentReplyEntityLoader(t),commenter1:e.userNameLoader(r[0]),commenter2:e.userNameLoader(r[1])}},many:function(t,r){return{entity:e.commentReplyEntityLoader(t),commenter1:e.userNameLoader(r[0]),commenterAmount:function(){return r.length-1}}}}],[s.NotificationType.JM_UserFollowedUser,{1:function(t,r){return{follower:e.userNameLoader(r[0])}},2:function(t,r){return{follower1:e.userNameLoader(r[0]),follower2:e.userNameLoader(r[1])}},many:function(t,r){return{follower1:e.userNameLoader(r[0]),followerAmount:function(){return r.length-1}}}}],[s.NotificationType.JM_FavoriteUserReleasedPlaylist,{1:function(t,r){return{playlist:e.paths.playlist.name.createIDLoader(t),owner:e.userNameLoader(r[0])}},2:function(e,t){throw new c.default("The notification type FavoriteUserReleasedPlaylist must never be used with more than one subject, but it was used with 2 subjects.")},many:function(e,t){throw new c.default("The notification type FavoriteUserReleasedPlaylist must never be used with more than one subject, but it was used with "+t.length+" subjects.")}}],[s.NotificationType.JM_UserLikedArtist,{1:function(t,r){return{artist:e.paths.artist.name.createIDLoader(t),follower:e.userNameLoader(r[0])}},2:function(t,r){return{artist:e.paths.artist.name.createIDLoader(t),follower1:e.userNameLoader(r[0]),follower2:e.userNameLoader(r[1])}},many:function(t,r){return{artist:e.paths.artist.name.createIDLoader(t),follower1:e.userNameLoader(r[0]),followerAmount:function(){return r.length-1}}}}],[s.NotificationType.JM_FavoriteArtistReleasedSingle,{1:function(t){return{artist:e.paths.artist.name.createIDLoader(t)}},2:function(t){return{artist:e.paths.artist.name.createIDLoader(t)}},many:function(t,r){return{artist:e.paths.artist.name.createIDLoader(t),count:function(){return r.length}}}}],[s.NotificationType.JM_FavoriteArtistReleasedAlbum,{1:function(t){return{artist:e.paths.artist.name.createIDLoader(t)}},2:function(t){return{artist:e.paths.artist.name.createIDLoader(t)}},many:function(t,r){return{artist:e.paths.artist.name.createIDLoader(t),count:function(){return r.length}}}}],[s.NotificationType.FavoriteArtistReleasedSingleOrAlbum,{1:function(){throw new c.default("The notification type ArtistReleasedSingleOrAlbum must never be used with only one subject.")},2:function(t,r){return{artist:e.paths.artist.name.createIDLoader(t),singlesCount:function(){return e.countNumberOfSingles(t,r)},albumsCount:function(){return e.countNumberOfAlbums(t,r)}}},many:function(t,r){return{artist:e.paths.artist.name.createIDLoader(t),singlesCount:function(){return e.countNumberOfSingles(t,r)},albumsCount:function(){return e.countNumberOfAlbums(t,r)}}}}]]);d.set(e,t);return t}function n(e,t){var r="_TKEY_WWW_NOTIFICATION_text_"+e+"_";1===t?r+="1":2===t?r+="2":t&&(r+="many");return r}function i(e,t,r,n){var i=r.length,o=n.get(e);switch(i){case 1:case 2:return o[i](t,r);default:return o.many(t,r)}}function o(e,t,r,n){return __awaiter(this,void 0,void 0,function(){var i,o,a,u,c;return __generator(this,function(d){switch(d.label){case 0:i=t;switch(i){case s.NotificationType.FavoriteArtistReleasedSingleOrAlbum:return[3,2]}return[3,1];case 1:return[2,t];case 2:o=l.Visitor.create(e);return[4,o.countNumberOfSingleAndAlbums(r,n)];case 3:a=d.sent();u=0===a.albums;c=0===a.singles;return u?[2,s.NotificationType.JM_FavoriteArtistReleasedSingle]:c?[2,s.NotificationType.JM_FavoriteArtistReleasedAlbum]:[2,t]}})})}function a(e){var t=e.userData,a=e.type,s=e.object,c=e.subjects;return __awaiter(this,void 0,void 0,function(){var e,d;return __generator(this,function(p){switch(p.label){case 0:e=l.Visitor.create(t);d=r(e);return[4,o(t,a,s,c)];case 1:a=p.sent();return[4,u.formatText(n(a,c.length),t,i(a,s,c,d))];case 2:return[2,p.sent()]}})})}
37Object.defineProperty(t,"__esModule",{value:!0});var s=e("notif-server"),l=e("./apiVisitor"),u=e("../utilities/textFormat"),c=e("../error/error"),d=new Map;t.translate=a});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/notifications/favicon",["require","exports","../../configuration/configuration","jquery"],e)}(function(e,t){"use strict";function r(e){var t=e.unreadCount;return new Promise(function(e){var r=document.createElement("canvas"),n=r.getContext("2d"),i=new Image;r.width=16;r.height=16;i.src="/Client/assets/toolkit/images/icon/favicon.ico";i.onload=function(){n.drawImage(i,0,0,i.width,i.height,0,0,r.width,r.height);if(t>0){n.beginPath();n.arc(12,4,3,0,2*Math.PI,!1);n.fillStyle="#262626";n.fill();n.strokeStyle="#fff";n.lineWidth=1;n.stroke()}e(r.toDataURL("image/x-icon"))}})}function n(e){s('head link[rel="shortcut icon"], head link[rel="icon"]').remove();s("head").first().append('<link type="image/x-icon" rel="shortcut icon" href="'+e+'">')}function i(e){void 0===e&&(e=0);return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){if(!1!==a.default.notificationSystem.hideUI||Math.max(innerWidth,innerHeight)<=720||e===l)return[2];l=e;return[2,r({unreadCount:e}).then(n)]})})}function o(){return i(0)}Object.defineProperty(t,"__esModule",{value:!0});var a=e("../../configuration/configuration"),s=e("jquery"),l=0;t.updateFavicon=i;t.resetFavicon=o});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/notifications/pageTitle",["require","exports","../utilities/pageTitle","../../configuration/configuration"],e)}(function(e,t){"use strict";function r(e){void 0===e&&(e=0);return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){if(!1!==o.default.notificationSystem.hideUI||e===a)return[2,Promise.resolve()];a=e;i.updatePageTitlePart("UnreadNotificationCount",e).reRenderPageTitle();return[2]})})}function n(){return r(0)}
37Object.defineProperty(t,"__esModule",{value:!0});var i=e("../utilities/pageTitle"),o=e("../../configuration/configuration"),a=0;t.updatePageTitle=r;t.resetPageTitle=n});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/notifications/client",["require","exports","notif-server","../../managers/manager","../../managers/notifications","./favicon","./pageTitle","chrisweb-utilities","../../configuration/configuration"],e)}(function(e,t){"use strict";function r(){if(!b){b=!0;p.on("incomingNotifications",i)}}function n(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){if(!b)return[2];b=!1;p.off("incomingNotifications",i);g.resetPageTitle();y.resetFavicon();return[2]})})}function i(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:t=e.filter(function(e){return"new"===e[0].state}).length;return[4,y.updateFavicon(t)];case 1:r.sent();return[4,g.updatePageTitle(t)];case 2:r.sent();return[2]}})})}function o(e){if(!(p instanceof f.JamendoNotificationSystemClient)&&v.default.isClient()){var t=_.default.notificationSystem;window.ENV={JAMNOTIF_DEBUG_LOGGING:t.debugLog?"1":"0",JAMNOTIF_PROXY_PUBLISHER_SOCKET_HOSTNAME:t.proxyPublisher.hostname||void 0,JAMNOTIF_PROXY_PUBLISHER_SOCKET_PORT:(t.proxyPublisher.port||"0").toString()||void 0,JAMNOTIF_PROXY_PUBLISHER_RECONNECT_TIMEOUT:t.proxyPublisher.reconnectTimeout||void 0,JAMNOTIF_PROXY_PUBLISHER_SOCKET_PROTOCOL:t.proxyPublisher.protocol||void 0,JAMNOTIF_PROXY_PUBLISHER_SOCKET_CHANNEL_NAME:t.proxyPublisher.notificationChannelName||void 0};p=new f.JamendoNotificationSystemClient({getCookie:e});r();p.on("incomingNotifications",function(e){var t=e.filter(function(e){var t=e[0].type;return t===f.NotificationType.JM_UserLikedArtist||t===f.NotificationType.JM_UserFollowedUser}),r=e.filter(function(e){return-1===t.indexOf(e)});w.splice(0,w.length);x.splice(0,x.length);w.push.apply(w,t);x.push.apply(x,r);h.NotificationsManager.trigger(m.NotificationManager.Event.FollowerNotifications,t);h.NotificationsManager.trigger(m.NotificationManager.Event.GenericNotifications,r)});p.start()}}function a(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){if(!v.default.isClient()||_.default.notificationSystem.disabled)return[2];o(e);return[2]})})}function s(){return[].concat(w)}function l(){return[].concat(x)}function u(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,p.updateNotificationState({notificationGroup:e,newState:t})];case 1:n.sent();return[3,3];case 2:r=n.sent();return[3,3];case 3:return[2]}})})}function c(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){switch(r.label){case 0:return[4,p.updateNotificationState.apply(p,t.map(function(t){return{notificationGroup:t,newState:e}}))];case 1:r.sent();return[2]}})})}function d(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return v.default.isClient()?p&&p.isRunning()?[4,p.stop(e)]:[3,3]:[2];case 1:t.sent();return[4,p.destroy()];case 2:t.sent();t.label=3;case 3:return[4,n()];case 4:t.sent();p=void 0;return[2]}})})}
37Object.defineProperty(t,"__esModule",{value:!0});var p,f=e("notif-server"),h=e("../../managers/manager"),m=e("../../managers/notifications"),y=e("./favicon"),g=e("./pageTitle"),v=e("chrisweb-utilities"),_=e("../../configuration/configuration"),b=!1,w=[],x=[];t.ensureClientReady=a;t.getFollowerNotifications=s;t.getGenericNotifications=l;t.tryUpdateNotificationGroupState=u;t.tryUpdateNotificationStates=c;t.ensureClientStopped=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){
38if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/notifications/item",["require","exports","underscore","ribsjs","../../layout","../../../library/view/view","../../../library/error/error","notif-server","../../../library/notifications/translate","../../../library/notifications/apiVisitor","../../../library/notifications/client","../../overlays","../../layout/notificationPanel"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../layout"),a=e("../../../library/view/view"),s=e("../../../library/error/error"),l=e("notif-server"),u=e("../../../library/notifications/translate"),c=e("../../../library/notifications/apiVisitor"),d=e("../../../library/notifications/client"),p=e("../../overlays"),f=e("../../layout/notificationPanel"),h=function(e){function t(t){var n=e.call(this,r.extend({context:"NOTIFICATIONROW"},t))||this;n.options=t;var i=(n.options.templateVariables?n.options.templateVariables.userData:void 0)||t.userData;n.options.templateVariables=n.options.templateVariables||{};n.options.templateVariables.userData=i;n.apiVisitor=c.Visitor.create(t.userData);return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/notifications/item"};t.prototype.events=function(){return{click:"onClick"}};t.prototype.close=function(){e.prototype.close.call(this);o.default.getInstance().off(o.default.Events.CHANGE_LANG,this.doRenderListener)};t.prototype.onInitialize=function(){var n=this;e.prototype.onInitialize.call(this);var i=this.model.attributes,a=this.options;r.defaults(i,{type:a.type,context:a.context},t.DefaultAttributes);this.model.set(i,{silent:!0});this.listenTo(this.model,"change",this.onAttributeChange);this.doRenderListener=this.doRenderListener||function(){return n.doRender()};o.default.getInstance().on(o.default.Events.CHANGE_LANG,this.doRenderListener)};t.prototype.onRender=function(){this.doRender()};t.prototype.onClick=function(){for(var e=[],t=0;t<1/0;t++){var r=this.model.get(t.toString());if(!r)break;e.push(r)}d.tryUpdateNotificationGroupState(e.map(function(e){return e.attributes}),"clicked");f.NotificationPanelView.hidePanelsIfNecessary();this.navigateToNotificationObject()};t.prototype.onAttributeChange=function(){"state"in this.model.get("0").changedAttributes()&&this.updateStateCssClass()};t.prototype.getFromModel=function(e){return this.model.get("0").get(e)};t.prototype.doRender=function(){return __awaiter(this,void 0,void 0,function(){var e,t,r,n,i,o,a,s,l;return __generator(this,function(c){switch(c.label){case 0:if(this.isClose)return[2];e=(this.getFromModel("type")||"").toLowerCase();r=[];for(n=0;n<1/0;n++){i=this.model.get(n.toString());if(!i)break;r.push.apply(r,i.get("subjects"))}c.label=1;case 1:c.trys.push([1,3,,4]);return[4,u.translate({type:e,object:this.getFromModel("object"),subjects:r,userData:this.options.userData})];case 2:t=c.sent();return[3,4];case 3:o=c.sent();t="";if(this.isClose){console.warn("unable to render notification in closed NotificationItemView: ",o);return[2]}console.warn("unable to render notification: ",this.model.attributes,o);this.options.removeSelf(this);return[3,4];case 4:if(this.isClose)return[2];this.$(".js-notification-text").html(t);this.updateStateCssClass();s=(a=this.$(".avatar img")).attr;l=["src"];return[4,this.getNotificationSubjectCoverImageUrl()];case 5:s.apply(a,l.concat([c.sent()]));return[2]}})})};t.prototype.updateStateCssClass=function(){"string"==typeof this.stateCssClass&&this.$el.removeClass(this.stateCssClass);this.stateCssClass="state-"+(this.getFromModel("state")||"clicked").toLowerCase();this.$el.addClass(this.stateCssClass)};t.prototype.getNotificationSubjectCoverImageUrl=function(){return __awaiter(this,void 0,void 0,function(){var e,t,r;return __generator(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);e=this.getFromModel("subjects")[0];return[4,this.apiVisitor.loadNode({extract:["cover"],id:e,type:"user"})];case 1:t=n.sent()[0];return[2,t.small.size50];case 2:r=n.sent();return[2,""];case 3:return[2]}})})};t.prototype.showNotificationObjectNotFoundOverlay=function(){p.default.add(p.default.DefinitionPath.NotificationObjectNotFoundOverlay,{userData:this.options.userData})};t.prototype.navigateToNotificationObject=function(){return __awaiter(this,void 0,void 0,function(){var e,t,r,n,o;return __generator(this,function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);
38t=(e=i).trigger;r=["navigate"];n={};return[4,this.buildNotificationObjectUrl()];case 1:t.apply(e,r.concat([(n.url=a.sent(),n.reload=!0,n)]));return[3,3];case 2:o=a.sent();this.showNotificationObjectNotFoundOverlay();return[3,3];case 3:return[2]}})})};t.prototype.buildNotificationObjectUrl=function(){return __awaiter(this,void 0,void 0,function(){var e,t,r,n,i,o,a,u,c,n;return __generator(this,function(d){switch(d.label){case 0:e=this.getFromModel("type");switch(e){case l.NotificationType.JM_UserFollowedUser:return[3,2];case l.NotificationType.JM_FavoriteUserReleasedPlaylist:case l.NotificationType.JM_NewPlaylistFollower:return[3,3];case l.NotificationType.JM_NewPlaylistComment:return[3,4];case l.NotificationType.JAJM_NewCommentReply:return[3,7];case l.NotificationType.JM_UserLikedArtist:case l.NotificationType.JM_FavoriteArtistReleasedSingle:case l.NotificationType.JM_FavoriteArtistReleasedAlbum:case l.NotificationType.FavoriteArtistReleasedSingleOrAlbum:return[3,11]}return[3,1];case 1:throw new s.default("Unable to build notification object URL: Unknown notification type.");case 2:return[2,"/user/"+this.getFromModel("subjects")[0]];case 3:return[2,"/playlist/"+this.getFromModel("object")];case 4:t=this.getFromModel("object");return[4,this.apiVisitor.paths.review.playlist.id.loadID(t)];case 5:r=d.sent();return[4,this.apiVisitor.paths.review.playlist.name.loadID(t)];case 6:n=d.sent();return[2,"/playlist/"+r+"/"+n+"/reviews#"+t];case 7:i=this.getFromModel("object");return[4,this.apiVisitor.loadReplyEntity(i)];case 8:o=d.sent(),a=o.id,u=o.type;c="/"+u+"/"+a;return"playlist"!==u?[3,10]:[4,this.apiVisitor.paths.playlist.name.loadID(a)];case 9:n=d.sent();c+="/"+n+"/reviews#"+i;d.label=10;case 10:return[2,c];case 11:return[2,"/artist/"+this.getFromModel("object")];case 12:return[2]}})})};t.DefaultAttributes={type:"",context:"",userData:void 0,removeSelf:function(){}};t.TemplateStyles={Licensing:"licensing"};return t}(a.default);t.NotificationItemView=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/notificationList",["require","exports","backbone","../../library/view/scroll","../../library/utilities/display","../partials/notifications/item"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("backbone"),n=e("../../library/view/scroll"),i=e("../../library/utilities/display"),o=e("../partials/notifications/item"),a=function(e){function t(r){var n=e.call(this,Object.assign({idList:"notificationIdList",listSelector:".js-notificationlist",ModelView:o.NotificationItemView,ModelViewOptions:Object.assign({userData:r.userData,removeSelf:function(e){n.trigger(t.NotificationEvents.NotificationRemoved,e.model)}},r),reRenderOnChange:!0,entitiesPerRequest:i.default.getMaxEntitiesCount("Notifications",!1)||1/0},r))||this;return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/layout/notificationList"};t.prototype.renderNotifications=function(e){this.collection.set(e.map(function(e){return e.map(function(e){var t=e.type,n=e.object,i=e.subjects,o=__assign({},e,{id:t+"_o"+n+"_s"+i.join("-")});return new r.Model(o)})}))};t.NotificationEvents={NotificationRemoved:"notificationRemoved"};return t}(n.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/emptyNotificationMessage",["require","exports","../../library/view/component","../../managers/manager","../../views/layout"],e)}(function(e,t){"use strict";
38Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/component"),n=e("../../managers/manager"),i=e("../../views/layout"),o=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);i.default.getInstance().on(i.default.Events.CHANGE_LANG,function(){return t.reRenderModelView()})};t.prototype.onRender=function(){var t=this;e.prototype.onRender.call(this);n.LocalizationManager.get(["_TKEY_WWW_NOTIFICATIONS_empty-message"],{userData:this.options.userData}).then(function(e){var r=e[0];t.$el.text(r.get("translate"))})};t.prototype.getTemplateId=function(){return"/layout/emptyNotificationMessage"};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/notificationPanel",["require","exports","underscore","jquery","backbone","../../library/view/loggedComponent","../../managers/manager","../../managers/notifications","../layout","./notificationList","./emptyNotificationMessage","../../library/notifications/client"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("backbone"),o=e("../../library/view/loggedComponent"),a=e("../../managers/manager"),s=e("../../managers/notifications"),l=e("../layout"),u=e("./notificationList"),c=e("./emptyNotificationMessage"),d=e("../../library/notifications/client"),p=function(e){function t(t){var r=e.call(this,t)||this;r.options=t;r.notifications=[];r.hideBecauseOfClickHandler=function(){return r.hide({causedByUserInput:!0})};r.hideBecauseOfWindowResize=function(){return r.hide()};r.visible=!1;return r}__extends(t,e);t.createPanelsIfNecessary=function(e){return __awaiter(this,void 0,void 0,function(){var r,n,i,o,a,u;return __generator(this,function(c){switch(c.label){case 0:if(t.genericNotificationPanel instanceof t)return[3,2];t.genericNotificationPanel=new t({id:"skeleton-notifications-generic",userData:e.userData,notificationListOptions:e,positioningReferenceSelector:".list-button.notification-buttons .js-notifications-generic",notificationManagerEvent:s.NotificationManager.Event.GenericNotifications});
38t.genericNotificationPanel.on(t.Events.ShowPanel,t.hideFollowerNotifications);t.genericNotificationPanel.on(t.Events.PanelClosing,function(){t.genericNotificationPanel=void 0});n=(r=l.default.getInstance()).addNotificationPanel;return[4,t.genericNotificationPanel.create()];case 1:n.apply(r,[c.sent()]);c.label=2;case 2:if(t.followerNotificationPanel instanceof t)return[3,4];t.followerNotificationPanel=new t({id:"skeleton-notifications-followers",userData:e.userData,notificationListOptions:e,positioningReferenceSelector:".list-button.notification-buttons .js-notifications-followers",notificationManagerEvent:s.NotificationManager.Event.FollowerNotifications});t.followerNotificationPanel.on(t.Events.ShowPanel,t.hideGenericNotifications);t.followerNotificationPanel.on(t.Events.PanelClosing,function(){t.followerNotificationPanel=void 0});o=(i=l.default.getInstance()).addNotificationPanel;return[4,t.followerNotificationPanel.create()];case 3:o.apply(i,[c.sent()]);c.label=4;case 4:a=function(e){return t.relayEvents.trigger(t.Events.ShowAnyPanel,e)};t.genericNotificationPanel.on(t.Events.ShowPanel,a);t.followerNotificationPanel.on(t.Events.ShowPanel,a);u=function(e){return t.relayEvents.trigger(t.Events.HideAnyPanel,e)};t.genericNotificationPanel.on(t.Events.HidePanel,u);t.followerNotificationPanel.on(t.Events.HidePanel,u);return[2]}})})};t.hidePanelsIfNecessary=function(){t.genericNotificationPanel instanceof t&&t.genericNotificationPanel.hide();t.followerNotificationPanel instanceof t&&t.followerNotificationPanel.hide()};t.showGenericNotifications=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:this.hideFollowerNotifications();return[4,t.genericNotificationPanel.show()];case 1:e.sent();return[2]}})})};t.hideGenericNotifications=function(e){void 0===e&&(e=!1);t.genericNotificationPanel.hide({causedByUserInput:e})};t.toggleGenericNotifications=function(e){void 0===e&&(e=!1);t.genericNotificationPanel.toggle({causedByUserInput:e})};t.showFollowerNotifications=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:this.hideGenericNotifications();return[4,t.followerNotificationPanel.show()];case 1:e.sent();return[2]}})})};t.hideFollowerNotifications=function(e){void 0===e&&(e=!1);t.followerNotificationPanel.hide({causedByUserInput:e})};t.toggleFollowerNotifications=function(e){void 0===e&&(e=!1);t.followerNotificationPanel.toggle({causedByUserInput:e})};t.updatePositioning=function(){try{t.genericNotificationPanel instanceof t&&t.genericNotificationPanel.updatePositioning();t.followerNotificationPanel instanceof t&&t.followerNotificationPanel.updatePositioning()}catch(e){}};t.prototype.close=function(){var r=this;this.hide({causedByUserInput:!1});a.NotificationsManager.off(this.options.notificationManagerEvent,this.renderNotificationsWhenNewNotificationsIncoming,this);this.trigger(t.Events.PanelClosing);n(window).off("resize",this.hideBecauseOfWindowResize);l.default.getInstance().off(l.default.Events.CHANGE_LANG,this.hide,this);Object.keys(t.Events).forEach(function(e){try{r.off(e)}catch(e){}});e.prototype.close.call(this)};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.initializeArrow();this.initializeNotificationList();this.initializeEmptyMessage();l.default.getInstance().on(l.default.Events.CHANGE_LANG,this.hide,this);a.NotificationsManager.on(this.options.notificationManagerEvent,this.renderNotificationsWhenNewNotificationsIncoming,this)};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.setIsEmpty(!0);this.$el.prepend(this.$arrow);this.$el.attr("id",this.options.id)};t.prototype.onUserDisconnected=function(){this.close()};t.prototype.isVisible=function(){return this.visible};t.prototype.show=function(e){void 0===e&&(e={causedByUserInput:!1});return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:if(this.isVisible())return[2];this.visible=!0;return[4,this.renderNotifications(this.notifications||[])];case 1:e.sent();n("body").one("click",this.hideBecauseOfClickHandler);n(window).on("resize",this.hideBecauseOfWindowResize);this.updatePositioning();this.$el.addClass("is-visible");this.trigger(t.Events.ShowPanel);return[2]}})})};t.prototype.hide=function(e){void 0===e&&(e={causedByUserInput:!1});if(this.isVisible()){this.visible=!1;
38n("body").off("click",this.hideBecauseOfClickHandler);n(window).off("resize",this.hideBecauseOfWindowResize);this.$el.removeClass("is-visible");this.trigger(t.Events.HidePanel,e)}};t.prototype.toggle=function(e){void 0===e&&(e={causedByUserInput:!1});return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:if(!this.$el.hasClass("is-visible"))return[3,1];this.hide(e);return[3,3];case 1:return[4,this.show(e)];case 2:t.sent();t.label=3;case 3:return[2]}})})};t.prototype.getTemplateId=function(){return"/layout/notificationPanel"};t.prototype.renderNotifications=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:this.notifications=e;return this.isVisible()?[4,d.tryUpdateNotificationStates.apply(void 0,["seen"].concat(e))]:[2];case 1:t.sent();this.setIsEmpty(0===e.length);this.notificationList.renderNotifications(e);return[2]}})})};t.prototype.renderNotificationsWhenNewNotificationsIncoming=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return this.isVisible()?[4,d.tryUpdateNotificationStates.apply(void 0,["seen"].concat(e))]:[3,2];case 1:t.sent();t.label=2;case 2:return[4,this.renderNotifications(e)];case 3:t.sent();return[2]}})})};t.prototype.updatePositioning=function(){var e=this.getPositioningReferenceElement().offset().left+this.getPositioningReferenceElement().width()/2,r=this.$el.width()/2,i=e-r,o=e+r-(window.innerWidth-50);o>0&&(i-=o);this.$el.css({left:i,right:"auto"});var a=this.$el.offset().left;this.$arrow.css("left",e-a-this.$arrow.outerWidth()/2);if(this.$el.outerWidth()>=n("body").outerWidth()){var s=l.default.getInstance().hideScrollbar();this.once(t.Events.HidePanel,function(){l.default.getInstance().showScrollbar({hidingToken:s})})}};t.prototype.setIsEmpty=function(e){var t=e?"addClass":"removeClass";this.$el[t]("empty")};t.prototype.getPositioningReferenceElement=function(){return n(this.options.positioningReferenceSelector)};t.prototype.initializeArrow=function(){this.$arrow=n('<div class="arrow-top"></div>')};t.prototype.initializeNotificationList=function(){var e=this;this.notificationList=new u.default(this.options.notificationListOptions);var t=[],n=r.debounce(function(){return __awaiter(e,void 0,void 0,function(){var e,r,n,i,o,a;return __generator(this,function(s){switch(s.label){case 0:e=t.splice(0,t.length);r=this.notificationList.collection.toArray();for(n=0,i=e;n<i.length;n++){o=i[n];for(;;){a=r.indexOf(o);if(-1===a)break;r.splice(a,1)}}return[4,this.renderNotifications(r.map(function(e){return e.attributes}))];case 1:s.sent();return[2]}})})},300,!1);this.notificationList.on(u.default.NotificationEvents.NotificationRemoved,function(e){t.push(e);n()});this.addView(".skeleton-notifications",this.notificationList)};t.prototype.initializeEmptyMessage=function(){this.emptyMessage=new c.default({userData:this.options.userData});this.addView(".skeleton-notifications",this.emptyMessage)};t.Events={PanelClosing:"panelClosing",ShowPanel:"showOne",HidePanel:"hideOne",ShowAnyPanel:"showAny",HideAnyPanel:"hideAny"};t.relayEvents=r.extend({},i.Events);return t}(o.default);t.NotificationPanelView=p});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/header",["require","exports","underscore","jquery","ribsjs","../../library/view/view","../../library/dialog/toast","../../library/utilities/pageTitle","../overlays","../../managers/manager","../../managers/user","chrisweb-utilities","../../configuration/configuration","FSEventDispatcher","../../managers/notifications","./notificationPanel","../../library/notifications/client","../../library/utilities/display","../../library/utilities/image","../../library/utilities/route","../../library/utilities/user"],e)}(function(e,t){"use strict";
38Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("ribsjs"),o=i.EventsManager,a=e("../../library/view/view"),s=e("../../library/dialog/toast"),l=e("../../library/utilities/pageTitle"),u=e("../overlays"),c=e("../../managers/manager"),d=e("../../managers/user"),p=e("chrisweb-utilities"),f=e("../../configuration/configuration"),h=e("FSEventDispatcher"),m=e("../../managers/notifications"),y=e("./notificationPanel"),g=e("../../library/notifications/client"),v=e("../../library/utilities/display"),_=e("../../library/utilities/image"),b=e("../../library/utilities/route"),w=e("../../library/utilities/user"),x=function(e){function t(t){var i=e.call(this,r.extend({},t,{useHammer:!0}))||this;i.options=t;i.$backButton=n();return i}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.isMobileMode=!1;c.UserManager.on(d.UserManager.Event.UserConnected,this.ensureNotificationsPanelInitialized,this);c.UserManager.on(d.UserManager.Event.UserDisconnected,this.resetNotificationUI,this);y.NotificationPanelView.relayEvents.on(y.NotificationPanelView.Events.ShowAnyPanel,this.doCloseMenu.bind(this));if(w.default.getIsLogged(this.options.userData)){var t=this.model.get("user"),r=t.cover,n=void 0;r&&"object"==typeof r.small&&null!==r.small&&"string"==typeof r.small.size50&&(n=_.default.getUpdatedImage(r.small.size50));this.model.set({id:this.model.get("user").id,isLogged:!0,image:n,dispname:this.model.get("user").dispname},{silent:!0})}else this.model.set({id:0,isLogged:!1,image:"",dispname:""},{silent:!0});this.listenTo(this.model,"change",this.onAttributeChange);c.UserManager.on(d.UserManager.Event.UserAvatar,this.updateProfile,this);c.NotificationsManager.on(m.NotificationManager.Event.FollowerNotifications,this.updateFollowerNotificationsButton,this);c.NotificationsManager.on(m.NotificationManager.Event.GenericNotifications,this.updateGenericNotificationsButton,this)};t.prototype.onRender=function(){var t=this;e.prototype.onRender.call(this);this.$backButton=this.$(".js-header-back-button");n(document).on("click",function(e){0===n(e.target).closest(".user-menu").length&&n(".js-open-menu").removeClass("menu-is-opened");0===t.searchModule.$el.has(e.target).length&&0===n(e.target).closest(".single-tag").length&&t.onSearchInputBlur(!1)});this.showOrHideUser();if(v.default.getMaxEntitiesCount("DesktopDesign")<0){"search"===this.model.get("controller")?this.onClickSearch():this.onSearchInputBlur(!1);this.resetBackButton()}this.showOrHideNotificationButtons();try{window.showOrHideNotificationButtons=function(){return t.showOrHideNotificationButtons(!0)}}catch(e){}w.default.getIsLogged(this.options.userData)&&this.ensureNotificationsPanelInitialized()};t.prototype.resetBackButton=function(){h.default.Mediator.triggerResult(t.Event.BackButton).includes(!0)&&("homepage"===this.model.get("controller")?this.$backButton.addClass("hidden"):this.$backButton.removeClass("hidden"))};t.prototype.getTemplateId=function(){return"/layout/header"};t.prototype.events=function(){return{"click .js-settings-link":"onClickSettings","click .js-user-login":"onLogin","click .js-user-logout":"onLogout","click .js-open-menu":"onOpenMenu","touchstart .js-reveal-search":"onClickSearch","click .js-reveal-search":"onClickSearch","click .js-notifications-followers":"onClickFollowersButton","click .js-notifications-generic":"onClickNotificationsButton"}};t.prototype.onClickSettings=function(e){e.preventDefault();var t=b.default.getUrl("settings");o.trigger("navigate",{url:t})};t.prototype.onLogin=function(e){e.preventDefault();u.default.add(u.default.DefinitionPath.LoginSignin,{userData:this.options.userData,overlaySelector:"#skeleton-overlay",transparentBackground:!0})};t.prototype.onLogout=function(e){var t=this;c.UserManager.logout(this.options.userData.session).then(function(){c.LocalizationManager.get("_TKEY_WWW_USER_feedback-disconnect",{userData:t.options.userData}).then(function(e){s.show(e[0].get("translate"));e[0].close()})})};t.prototype.onOpenMenu=function(e){e.stopPropagation();this.doToggleMenu()};t.prototype.doOpenMenu=function(){y.NotificationPanelView.hidePanelsIfNecessary();this.$(".js-open-menu").addClass("menu-is-opened")};t.prototype.doCloseMenu=function(){this.$(".js-open-menu").removeClass("menu-is-opened")};t.prototype.doToggleMenu=function(){this.$(".js-open-menu").hasClass("menu-is-opened")?this.doCloseMenu():this.doOpenMenu()};t.prototype.onClickSearch=function(e){if(e){e.stopPropagation();e.preventDefault();"touchstart"===e.type&&(this.isMobileMode=!0)}this.searchModule.$el.addClass("focus");var t=this.$(".js-form-search-input").focus(),r=t.val();t.val("").val(r)};t.prototype.onSearchInputBlur=function(e){e||this.searchModule.$el.removeClass("focus")};t.prototype.onClickFollowersButton=function(e){e.stopPropagation();
38y.NotificationPanelView.toggleFollowerNotifications(!0)};t.prototype.onClickNotificationsButton=function(e){e.stopPropagation();y.NotificationPanelView.toggleGenericNotifications(!0)};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();r.keys(t).forEach(function(t){var r=e.model.get(t);switch(t){case"title":l.updatePageTitlePart("SiteName",r).reRenderPageTitle();break;case"isLogged":e.showOrHideUser();e.showOrHideNotificationButtons();break;case"dispname":e.$(".js-attr-dispname").text(r);break;case"image":e.$(".js-attr-image").prop("src",_.default.getUpdatedImage(r));break;case"lang":e.reRenderModelView();break;case"controller":e.resetBackButton()}})};t.prototype.updateProfile=function(e){"profile"===e.type&&this.$(".js-attr-image").prop("src",e.image||e.cover.small.size50)};t.prototype.updateCounterBadge=function(e,t){var r,n=(t||[]).filter(function(e){return"new"===(e[0].state||"").toLowerCase()}),i=n.length;r=0===i?"":i>f.default.notificationSystem.maxDisplayedNotifications?f.default.notificationSystem.maxDisplayedNotifications+"+":i.toString();var o=this.$(e);o.text(r);0===i?o.addClass("hide"):o.removeClass("hide")};t.prototype.updateFollowerNotificationsButton=function(e){this.updateCounterBadge(".js-follower-notification-count",e)};t.prototype.updateGenericNotificationsButton=function(e){this.updateCounterBadge(".js-generic-notification-count",e)};t.prototype.ensureNotificationsPanelInitialized=function(){var e=this;if(p.default.isClient()){g.ensureClientReady(function(){return e.options.userData.session.get("me").notifSystemSessionToken});y.NotificationPanelView.createPanelsIfNecessary({userData:this.options.userData})}};t.prototype.showOrHideNotificationButtons=function(e){void 0===e&&(e=!1);!e&&f.default.notificationSystem.hideUI||!this.model.get("user").isLogged?this.$(".notification-buttons").addClass("hide"):this.$(".notification-buttons").removeClass("hide")};t.prototype.showOrHideUser=function(){if(!this.isClose)if(this.model.get("isLogged")){this.$(".js-is-logged").removeClass("hidden");this.$(".js-is-not-logged").addClass("hidden")}else{this.$(".js-is-logged").addClass("hidden");this.$(".js-is-not-logged").removeClass("hidden")}};t.prototype.resetNotificationUI=function(){g.ensureClientStopped(!0);y.NotificationPanelView.hidePanelsIfNecessary();this.updateFollowerNotificationsButton([]);this.updateGenericNotificationsButton([])};t.prototype.close=function(){this.stopListening(this.model,"change",this.onAttributeChange);c.UserManager.off(d.UserManager.Event.UserAvatar,this.updateProfile,this);c.UserManager.off(d.UserManager.Event.UserConnected,this.ensureNotificationsPanelInitialized,this);c.UserManager.off(d.UserManager.Event.UserDisconnected,this.resetNotificationUI,this);y.NotificationPanelView.relayEvents.off(y.NotificationPanelView.Events.ShowAnyPanel,this.doCloseMenu.bind(this));c.NotificationsManager.off(m.NotificationManager.Event.FollowerNotifications,this.updateFollowerNotificationsButton,this);c.NotificationsManager.off(m.NotificationManager.Event.GenericNotifications,this.updateGenericNotificationsButton,this);e.prototype.close.call(this)};Object.defineProperty(t.prototype,"mobileMode",{get:function(){return this.isMobileMode},enumerable:!0,configurable:!0});t.prototype.getSearchInstance=function(){return this.searchModule};t.Event={BackButton:"headerview:backbutton"};return t}(a.default);t.default=x});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout",["require","exports","jquery","underscore","FSEventDispatcher","ribsjs","../library/view/view","./layout/header","../configuration/configuration","../library/error/error","../configuration/errorDefinitions","../library/model/model","FSPromise","chrisweb-utilities","../library/utilities/user","../library/utilities/object","../library/utilities/display"],e)}(function(e,t){"use strict";
38Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("underscore"),i=e("FSEventDispatcher"),o=e("ribsjs"),a=e("../library/view/view"),s=e("./layout/header"),l=e("../configuration/configuration"),u=e("../library/error/error"),c=e("../configuration/errorDefinitions"),d=e("../library/model/model"),p=e("FSPromise"),f=p.FSPromise,h=e("chrisweb-utilities"),m=e("../library/utilities/user"),y=e("../library/utilities/object"),g=e("../library/utilities/display"),v=function(e){function t(i,a){var u=e.call(this)||this
39;u.pageLoader='<div class="loader loader--block"><div><i class="icon icon-hexagon-on"></i><i class="icon icon-hexagon"></i></div></div>';u.isClose=!1;u.scrollbarHidingTokens=[];u.overlayScrollbarTokens=[];u.templatePath=i;u.options=a;u.isDispatched=!1;u.isRendering=!1;u.listViewContent=[];u.overlaysRendered=[];u.overlaysFlush=!1;u.options.navigationViewOptions.model=u.options.navigationViewOptions.model||new d.default({user:{}});u.header=u.options.navigationViewOptions.model.getModelProjection(o.Model,!1,!0);u.header.set({title:"",description:"",keywords:"",header:"",canonicalUrl:""});t.instance=u;u.headerView=new s.default({model:u.header,reRenderOnChange:!1,layout:u,userData:u.options.userData,cookie:a.cookie});u.rootUrl=l.default.application.websiteProtocol+l.default.application.websiteHostname;u.isDesktop=g.default.getMaxEntitiesCount("DesktopDesign")>0;u.onDebounceChangeDisplay=n.debounce(u.onChangeDisplay,350).bind(u);if(h.default.isClient()){u.onClick=function(e){u.navigationViewInstance.trigger(t.Events.CLOSE_MENU);u.headerView.trigger(t.Events.CLOSE_MENU)};var c=function(){var e=r(".js-close-menu");e.length?e.on("click",u.onClick):setTimeout(c,16)};c();r(window).on("resize",u.onDebounceChangeDisplay)}return u}__extends(t,e);t.prototype.addContent=function(e){if(e instanceof Array){var t=e.splice(0,e.length);t.unshift(this.listViewContent.length,0);this.listViewContent.splice.apply(this.listViewContent,t)}else this.listViewContent.push(e);return this};t.prototype.clear=function(){return this.setSchema(null).clearContent()};t.prototype.close=function(){this.isClose=!0;this.clear();this.listViewContent&&(this.listViewContent=null);if(this.headerView){this.headerView.close();this.headerView=null}this.header=null;if(this.navigationViewInstance){this.navigationViewInstance.close();this.navigationViewInstance=null}if(this.playerViewInstance){this.playerViewInstance.close();this.playerViewInstance=null}if(h.default.isClient()){r(".js-close-menu").off("click",this.onClick);r(window).off("resize",this.onDebounceChangeDisplay)}if(this.overlaysRendered){this.overlaysRendered.splice(0);this.overlaysRendered=null}y.cleanObject(this.options)};t.prototype.clearContent=function(){this.listViewContent.forEach(function(e){e instanceof a.default?e.close():e.remove()});this.listViewContent.splice(0,this.listViewContent.length);r(this.options.contentSelector).append(this.pageLoader);return this};t.prototype.setOpenGraph=function(e){e.url=this.rootUrl+e.url;this.header.set("opengraphData",e);return this};t.prototype.setSchema=function(e){this.header.set("schemaData",e);return this};t.prototype.setTitle=function(e){this.header.set("title",e);return this};t.prototype.setDescription=function(e){this.header.set("description",e);return this};t.prototype.setKeywords=function(e){this.header.set("keywords",e);return this};t.getHeaderInstance=function(){return t.instance.headerView};t.getNavigationInstance=function(){return t.instance.navigationViewInstance};t.prototype.setHeader=function(e,t){var n=this;void 0===t&&(t=!1);t?r("body").addClass("is-fullscreen"):r("body").removeClass("is-fullscreen");this.header.set({header:e});this.headerView.isDispatch||this.headerView.isCreating||this.headerView.setUserData(this.options.userData).create().then(function(e){r(n.options.headerSelector).empty().append(e)});return this};t.prototype.setCanonicalUrl=function(e,t){void 0===t&&(t=!0);this.header.set({setAlternate:t});var r=!1;void 0!==window&&-1!==window.location.href.indexOf("language=")?r=!0:this.options.userData.hasOwnProperty("request")&&"string"==typeof this.options.userData.request.url&&-1!==this.options.userData.request.url.indexOf("language=")&&(r=!0);this.header.set({languageInUrl:r});"/"===e?this.header.set({canonicalUrl:this.rootUrl}):this.header.set({canonicalUrl:this.rootUrl+e});return this};t.prototype.addNotificationPanel=function(e){r("#app").append(e)};t.prototype.render=function(){var e=this;this.isRendering=!0;var t=[this.createSkeleton(),this.generateContent(),this.generateNavigation(),this.generateOverlays()];return f.all(t).then(function(t){var r=t[0],n=t[1],i=t[2],o=t[3],a=e.options.renderAdapter.render({renderAdapter
39:e,content:n,contentSelector:e.options.contentSelector,header:e.header,navigation:i,navigationSelector:e.options.navigationSelector,navigationView:null,template:r,skeletonAdapter:null,userData:e.options.userData,overlays:o,overlaySelector:e.options.overlaySelector,overlayFlush:e.overlaysFlush,messageSelector:e.options.messageSelector,bannerSelector:e.options.bannerSelector});e.overlaysFlush=!1;e.isRendering=!1;e.isDispatched=!0;e.overlaysRendered.splice(0);return a}).catch(function(t){throw new u.default(c.default.UNKNOWN_SERVER_ERROR.message,{originalError:t,originalStack:t.stack||"",userData:e.options.userData})})};t.prototype.createSkeleton=function(){var e=this;return new f(function(r,n){e.templatePath in t.templateList?r(t.templateList[e.templatePath]):e.options.skeletonAdapter.create({templatePath:e.templatePath,userData:e.options.userData,keepSelector:[e.options.bannerSelector,e.options.messageSelector]}).then(function(n){t.templateList[e.templatePath]=n;r(n)},n)})};t.prototype.generateContent=function(){var e=this;return new f(function(t,r){var n=[],i=[],o=function(e,t){n.splice(e,1,t)};e.listViewContent.forEach(function(t,r){if(t instanceof a.default){var s=t.setUserData(e.options.userData).create();i.push(s.then(function(e){o(r,e);return e}))}n.push(t)});i.length?f.all(i).then(function(){t(n)}).catch(r):t(n)})};t.prototype.generateNavigation=function(){var e=this;return new f(function(t,r){var i;if(e.navigationViewInstance)i=e.navigationPromise?e.navigationPromise.then(function(e){return e.$el}):f.resolve(e.navigationViewInstance.$el);else{var o=e.options.navigationViewOptions.model,a=m.default.getUserLanguage(e.options.userData);o.set({lang:a},{silent:!0});e.navigationViewInstance=new e.options.navigationView(n.extend({userData:e.options.userData},e.options.navigationViewOptions));i=e.navigationViewInstance.create()}i instanceof f?i.then(function(e){t(e)},r):t(i)})};t.prototype.generateOverlays=function(){return f.all(this.overlaysRendered)};t.prototype.addOverlays=function(e,t){var n=this;void 0===t&&(t=!1);var i=r(e.options.overlaySelector?e.options.overlaySelector:this.options.overlaySelector);i.css("background-color",e.options.transparentBackground?"transparent":"");var o=e.setUserData(this.options.userData).create(),a=!1;if(!this.isDispatched||this.isRendering){this.overlaysRendered.push(o);this.overlaysFlush=this.overlaysFlush||t;a=!0}return o.then(function(e){if(!a){t&&i.empty();i.append(e);i.addClass("is-visible");r("html").addClass("has-overlay");n.overlayScrollbarTokens.push(n.hideScrollbar());n.hideAllOverlaysButTheLast()}return e})};t.prototype.hasOverlays=function(){return r(this.options.overlaySelector).children().length>0};t.prototype.closeOverlays=function(){r(this.options.overlaySelector).empty();this.maybeHideOverlay()};t.prototype.hideAllOverlaysButTheLast=function(){var e=r(this.options.overlaySelector).find(">div");e.each(function(t){t<e.length-1?r(this).addClass("hidden"):r(this).removeClass("hidden")})};t.prototype.maybeHideOverlay=function(){var e=this,t=r(this.options.overlaySelector);if(t.children().length)this.hideAllOverlaysButTheLast();else{t.removeClass("is-visible");r("html").removeClass("has-overlay");this.overlayScrollbarTokens.forEach(function(t){e.showScrollbar({hidingToken:t})})}};t.prototype.onChangeDisplay=function(){if(!this.isClose&&this.isDesktop!==g.default.getMaxEntitiesCount("DesktopDesign")>0){this.isDesktop=!this.isDesktop;this.trigger(t.Events.CHANGE_DISPLAY_SIZE)}};t.prototype.onChangeLang=function(){if(!this.isClose){var e=this.navigationViewInstance.reRenderModelView();e instanceof f&&(this.navigationPromise=e);e=this.headerView.reRenderModelView();e instanceof f&&(this.headerPromise=e)}};t.getInstance=function(){return t.instance};t.prototype.addPlayer=function(e){var t=this;return e.setUserData(this.options.userData).create().then(function(e){r(t.options.playerSelector).empty().append(e);r("html").addClass("has-player");return e})};t.prototype.addMessage=function(e){var t=this;return e.setUserData(this.options.userData).create().then(function(e){r(t.options.messageSelector).append(e);return e})};t.prototype.addCookieBanner=function(e){var t=this;return e.setUserData(this.options.userData).create().then(function(e){r(t.options.bannerSelector).append(e);return e})};t.prototype.closeMenu=function(){this.navigationViewInstance&&this.navigationViewInstance.trigger(t.Events.CLOSE_MENU)};t.prototype.openMenu=function(){this.navigationViewInstance&&this.navigationViewInstance.trigger(t.Events.OPEN_MENU)};t.prototype.showScrollbar=function(e){var t=(void 0===e?{}:e).hidingToken;this.scrollbarHidingTokens.length>0&&-1!==this.scrollbarHidingTokens.indexOf(t)&&this.scrollbarHidingTokens.splice(this.scrollbarHidingTokens.indexOf(t),1);this.scrollbarHidingTokens.length>0||r("html").removeClass("noscroll")};t.prototype.hideScrollbar=function(){r("html").addClass("noscroll");var e=Math.random()*Math.random()*Math.random();this.scrollbarHidingTokens.push(e);return e};t.prototype.getVeilElement=function(){return r("#skeleton-content-veil")};t.prototype.showVeil=function(){this.getVeilElement().addClass("is-visible")};t.prototype.hideVeil=function(){this.getVeilElement().removeClass("is-visible")};t.Events={OPEN_MENU:"menu:open",CLOSE_MENU:"menu:close",CHANGE_TAB:"tab:change",CHANGE_LANG:"lang:change",CHANGE_DISPLAY_SIZE:"window:resize"};t.templateList={};return t}(i.default);t.default=v});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/skeleton/skeletonAdapter",["require","exports"],e)}(function(e,t){"use strict";
39Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e}();t.default=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/skeleton/skeletonClientAdapter",["require","exports","jquery","./skeletonAdapter","../../../managers/manager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("./skeletonAdapter"),i=e("../../../managers/manager"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){return i.TemplateManager.get(e.templatePath,{userData:e.userData}).then(function(t){var n,i=r(t[0].get("template")),o=r(document),a=o.find("body"),s=a.find("[toast=browser]").detach();e.keepSelector&&(n=e.keepSelector.map(function(e){return{$elements:a.find(e).children().detach(),selector:e}}));a.empty().append(i);a.append(s);n&&n.forEach(function(e){a.find(e.selector).append(e.$elements)});return o})};return t}(n.default);t.default=o});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/skeleton/contentRenderAdapter",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e}();t.default=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/skeleton/contentRenderJQueryAdapter",["require","exports","./contentRenderAdapter","../../../configuration/bootLoader"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./contentRenderAdapter"),n=e("../../../configuration/bootLoader"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.render=function(e){e.template.find(e.contentSelector).empty().append(e.content);e.navigation.detach();e.template.find(e.navigationSelector).empty().append(e.navigation);var t=e.template.find("html"),r=t.find("head");if(e.overlays&&e.overlays.length){var i=t.addClass("has-overlay").find(e.overlaySelector).addClass("is-visible");e.overlayFlush&&i.empty();i.append(e.overlays)}this.processSchema(e,t,r);n.getValue(n.Properties.Application.IsApp)&&e.template.find("body").addClass("is-app")};t.prototype.processSchema=function(e,t,r){var n=e.header.get("schemaData");if(n){t.attr("itemtype",n.itemtype).attr("itemscope","");["image","name","description","url"].forEach(function(e){var t=r.find('meta[itemprop="'+e+'"]');if(!t.length){t=$("<meta>").attr("itemprop",e);r.append(t)}t.attr("content",n[e])})}else{t.attr("itemtype",null).attr("itemscope",null);["image","name","description","url"].forEach(function(e){r.find('meta[itemprop="'+e+'"]').remove()})}};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/navigation",["require","exports","underscore","jquery","../../library/view/loading","../../library/dialog/toast","ribsjs","../layout","../overlays","./player","../../managers/manager","../layout","chrisweb-utilities","../../library/utilities/display","../../library/utilities/route","../../library/utilities/app","FSEventDispatcher"],e)}(function(e,t){"use strict";
39Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("../../library/view/loading"),o=e("../../library/dialog/toast"),a=e("ribsjs"),s=e("../layout"),l=e("../overlays"),u=e("./player"),c=e("../../managers/manager"),d=e("../layout"),p=e("chrisweb-utilities"),f=e("../../library/utilities/display"),h=e("../../library/utilities/route"),m=e("../../library/utilities/app"),y=a.EventsManager,g=e("FSEventDispatcher"),v=function(e){function t(t){return e.call(this,r.extend({useHammer:!0},t))||this}__extends(t,e);t.prototype.onInitialize=function(){var r=this;e.prototype.onInitialize.call(this);this._isOpen=!1;this.on(s.default.Events.OPEN_MENU,function(){r.isOpen=!0});this.on(s.default.Events.CLOSE_MENU,function(){r.isOpen=!1});if(p.default.isClient()){var i=100,o=function(){if(!(i--<=0)){r.$navBar=r.$el.closest("#skeleton-navigation");r.$navBar.length&&d.default.getInstance().getVeilElement().length?r.lazyLoadId=-1:r.lazyLoadId=setTimeout(o,16)}};o()}this.model.set({displayLicensingLink:!g.default.Mediator.triggerResult(t.Event.LicensingLink).includes(!1)});if(this.model.get("user").isLogged){var a=!!this.model.get("user").managedArtistIds&&this.model.get("user").managedArtistIds.length;this.model.set({isLogged:!0,isManagingArtist:a,id:this.model.get("user").id,dispname:this.model.get("user").dispname})}else this.model.set({isLogged:!1,isManagingArtist:!1,id:0,dispname:""});this.listenTo(this.model,"change",this.onAttributeChange);if(p.default.isClient()){this.onResize=this.onResize.bind(this);n(window).on("resize",this.onResize)}};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();r.keys(t).forEach(function(t){var r=e.model.get(t);switch(t){case"isLogged":case"isManagingArtist":e.showOrHideUser();break;case"dispname":var n=h.default.getUrl("user",{id:e.model.get("id"),name:r}),i=h.default.getUrl("user",{id:e.model.get("id"),name:r,subpage:"playlists"}),o=h.default.getUrl("user",{id:e.model.get("id"),name:r,subpage:"favorites"});e.$(".js-profile-link").prop("href",n);e.$(".js-playlists-link").prop("href",i);e.$(".js-favorites-link").prop("href",o)}})};t.prototype.events=function(){return{"click a":"onClickNav","click .js-user-create-account":"onCreateAccount","click .js-user-login":"onLogin","click .js-user-lost-password":"onLostPassword","change .js-navigation-lang":"onChangeLang","click .js-close-menu":"onClickNav",panmove:"onMoveMenu",panend:"onEndMoveMenu"}};t.prototype.getTemplateId=function(){return"/layout/navigation"};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.showOrHideUser()};t.prototype.onResize=function(){f.default.getMaxEntitiesCount("DesktopDesign")>0&&(this.isOpen=!1)};t.prototype.onCreateAccount=function(e){e.preventDefault();l.default.add(l.default.DefinitionPath.LoginCreateAccount,{userData:this.options.userData})};t.prototype.onLogin=function(e){e.preventDefault();l.default.add(l.default.DefinitionPath.LoginSignin,{userData:this.options.userData,overlaySelector:"#skeleton-overlay",transparentBackground:!0})};t.prototype.onLostPassword=function(e){e.preventDefault();l.default.add(l.default.DefinitionPath.LoginPasswordRecoveryForm,{userData:this.options.userData})};t.prototype.onLogout=function(e){var t=this;c.UserManager.logout(this.options.userData.session).then(function(){c.LocalizationManager.get("_TKEY_WWW_USER_feedback-disconnect",{userData:t.options.userData}).then(function(e){o.show(e[0].get("translate"));e[0].close();t.isOpen=!1})})};t.prototype.onChangeLang=function(e){e.preventDefault();var t=this.$(".js-navigation-lang>option:selected").val();u.default.changeLang();s.default.getInstance().trigger(s.default.Events.CHANGE_LANG,t)};t.prototype.onMoveMenu=function(e){if("a"===e.gesture.target.localName){e.preventDefault();e.stopPropagation()}this._isOpen?e.gesture.deltaX<0&&n.Velocity.hook(this.$navBar,"left",e.gesture.deltaX+"px"):e.gesture.deltaX>0&&e.gesture.deltaX<this.$el.width()&&n.Velocity.hook(this.$navBar,"left",e.gesture.deltaX-this.$el.width()+"px")};t.prototype.onEndMoveMenu=function(e){if("a"===e.gesture.target.localName){e.preventDefault();e.stopPropagation()}this.isOpen=(this._isOpen?-1:1)*e.gesture.deltaX>this.$el.width()/3?!this._isOpen:this._isOpen;this.$navBar.css("left","")};Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},set:function(e){var t=!(this.isOpen===e);this._isOpen=e;this.animateMenu(t)},enumerable:!0,configurable:!0});t.prototype.animateMenu=function(e){if(e)if(this._isOpen){this.$navBar.addClass("is-visible");d.default.getInstance().showVeil()}else{this.$navBar.removeClass("is-visible");d.default.getInstance().hideVeil()}y.trigger(t.Event.MenuState,this._isOpen)};t.prototype.onClickNav=function(e){this.isOpen=!1};t.prototype.showOrHideUser=function(){if(!this.isClose){if(this.model.get("isLogged")){this.$(".wrap").addClass("is-logged");this.$(".js-is-logged").removeClass("hidden");this.$(".js-is-not-logged").addClass("hidden");if(this.model.get("isManagingArtist")){this.$(".js-is-logged-and-not-managing").addClass("hidden");this.$(".js-is-logged-and-managing").removeClass("hidden")}else{this.$(".js-is-logged-and-not-managing").removeClass("hidden");this.$(".js-is-logged-and-managing").addClass("hidden")}}else{this.$(".wrap").removeClass("is-logged");this.$(".js-is-logged").addClass("hidden");this.$(".js-is-not-logged").removeClass("hidden");this.$(".js-is-logged-and-not-managing").addClass("hidden");this.$(".js-is-logged-and-managing").addClass("hidden")}m.getDevicePlatform()!==m.Platform.Unknown&&this.$(".artists-link").addClass("hidden")}};t.prototype.close=function(){-1!==this.lazyLoadId&&clearTimeout(this.lazyLoadId);this.off(s.default.Events.OPEN_MENU);this.off(s.default.Events.CLOSE_MENU);p.default.isClient()&&n(window).off("resize",this.onResize);e.prototype.close.call(this)};t.Event={MenuState:"menustate",LicensingLink:"licensingLink"};return t}(i.default);t.default=v});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/messages/cookieBanner",["require","exports","../../library/view/view","ribsjs","../../library/utilities/route","../../configuration/configuration","../../library/utilities/deployment","underscore"],e)}(function(e,t){"use strict";
39Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=e("ribsjs"),i=n.EventsManager,o=e("../../library/utilities/route"),a=e("../../configuration/configuration"),s=e("../../library/utilities/deployment"),l=e("underscore"),u=function(e){function t(t){return e.call(this,l.extend({isDismissable:!0},t))||this}__extends(t,e);t.prototype.onInitializeStart=function(){this.model.set({linkText:this.options.linkText||"",linkUrl:this.options.linkUrl||""},{silent:!0});var t=this.options.isDismissable;this.model.set({isDismissable:t},{silent:!0});i.on(o.default.Events.InternalNavigation,this.onInternalNavigation,this);var r=new Date;r.setDate(r.getDate()+a.default.cookies.cookieBanner.duration);this.options.userData.cookie.set(a.default.cookies.cookieBanner.name,"true",{expires:r,path:"/",secure:!s.default.isEnvironment("development"),sameSite:"strict"});e.prototype.onInitializeStart.call(this)};t.prototype.getTemplateId=function(){return"/messages/cookieBanner"};t.prototype.events=function(){return{"click .messages_message_dismiss":"onClickClose"}};t.prototype.onClickClose=function(e){this.close()};t.prototype.onInternalNavigation=function(){this.close()};t.prototype.close=function(){i.off(o.default.Events.InternalNavigation,this.onInternalNavigation,this);e.prototype.close.call(this)};return t}(r.default);t.default=u});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/user/session",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.adapter=e}e.prototype.get=function(e,t){return this.adapter.get(e,t)};e.prototype.set=function(e,t){this.adapter.set(e,t)};e.prototype.delete=function(e){this.adapter.delete(e)};return e}();t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/session/localStorage",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},n=function(){function e(){this.fakeLocalStorage={};this.createFakeLocalStorage=function(){var e,t=this;if(window.Storage&&window.localStorage)e=window.Storage.prototype;else{window.localStorage={};e=window.localStorage}var r=function(t,r){var n=null==t?null:e.getItem(t),i=location.href.substr(location.origin.length),o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,i,null);window.dispatchEvent(o)};e.key=function(e){var r=Object.keys(t.fakeLocalStorage)[e];return"string"==typeof r?r:null};e.getItem=function(e){return"string"==typeof t.fakeLocalStorage[e]?t.fakeLocalStorage[e]:null};e.setItem=function(e,n){r(e,n);t.fakeLocalStorage[e]=String(n)};e.removeItem=function(e){r(e,null);delete t.fakeLocalStorage[e]};e.clear=function(){r(null,null);t.fakeLocalStorage={}};return e};if("object"==typeof window.localStorage)try{localStorage.setItem("localStorageTest","test");localStorage.removeItem("localStorageTest");this.sessionObject=localStorage}catch(e){this.sessionObject=this.createFakeLocalStorage()}else this.sessionObject=this.createFakeLocalStorage()}e.prototype.get=function(e,t){var n=this.sessionObject.getItem(e)||t;if(!n)return n;if("string"==typeof n&&this.isJSON(n))try{n=JSON.parse(n)}catch(t){if(!(n in r)){r[n]=!0;console.warn("Error during decoding SessionJSON '"+e+"'. Input value: "+n);console.warn(t)}}return n};e.prototype.set=function(e,t){this.sessionObject.setItem(e,JSON.stringify(t))};e.prototype.delete=function(e){this.sessionObject.removeItem(e)};e.prototype.isJSON=function(e){if(/^\s*$/.test(e))return!1;e=e.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@");e=e.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");e=e.replace(/(?:^|:|,)(?:\s*\[)+/g,"");return/^[\],:{}\s]*$/.test(e)};return e}();t.default=n});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/user/cookie",["require","exports"],e)}(function(e,t){"use strict";
39Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.adapter=e}e.prototype.get=function(e,t){return this.adapter.get(e,t)};e.prototype.set=function(e,t,r){this.adapter.set(e,t,r)};e.prototype.delete=function(e,t){this.adapter.delete(e,t)};return e}();t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/cookie/jquery",["require","exports","jquery.cookie","jquery"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n={},i=function(){function e(){}e.prototype.get=function(e,t){var i=r.cookie(e)||t;if(!i)return i;if(i in n)return i;if("string"==typeof i&&this.isJSON(i))try{i=JSON.parse(i)}catch(t){if(!(i in n)){n[i]=!0;console.warn("Error during decoding CookieJSON '"+e+"'. Input value: \""+i+'"');console.warn(t)}}return i};e.prototype.set=function(e,t,n){r.cookie(e,"object"==typeof t?JSON.stringify(t):t,n)};e.prototype.delete=function(e,t){r.removeCookie(e,t)};e.prototype.isJSON=function(e){if(/^\s*$/.test(e))return!1;e=e.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@");e=e.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");e=e.replace(/(?:^|:|,)(?:\s*\[)+/g,"");return/^[\],:{}\s]*$/.test(e)};return e}();t.default=i});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/update/update",["require","exports","../../views/overlays","FSPromise","ribsjs","../../configuration/configuration","FSEventDispatcher","../../managers/manager","../error/error"],e)}(function(e,t){"use strict";function r(){return 0===n()||1===n()}function n(){return m}function i(e){e<m&&(m=e)}function o(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,f.UpdateManager.getByAttribute({type:"update"},{userData:e})];case 1:t=n.sent();if(t instanceof h.default)throw t;return[3,3];case 2:r=n.sent();return[2];case 3:return[2]}})})}function a(){if(!a.closeEventHandlerBound){a.closeEventHandlerBound=!0;c.EventsManager.on("updateOverlayClosed",function(){y=!1})}}function s(e){return __awaiter(this,void 0,u.default,function(){var i,o,s,c;return __generator(this,function(d){i=function(){return u.default.resolve()};if(!r())return[2,i()];o=p.default.Mediator.triggerResult(t.UpdateOverlaysEnabled)[0];if(y||!0!==o)return[2,i()];a();s=Date.now();switch(n()){default:case 1e3:case 1:return[2,i()];case 0:c=l.default.DefinitionPath.UpdateMandatory}y=!0;g=s;return[2,l.default.add(c,{userData:e})]})})}
39Object.defineProperty(t,"__esModule",{value:!0});var l=e("../../views/overlays"),u=e("FSPromise"),c=e("ribsjs"),d=e("../../configuration/configuration"),p=e("FSEventDispatcher"),f=e("../../managers/manager"),h=e("../error/error"),m=(d.default.update.updateUrgency.udpateRecommendedOverlayInterval,1e3),y=!1,g=-1/0;t.UpdateOverlaysEnabled="updateOverlaysEnabled";t.isUpdateNecessary=r;t.getUpdateUrgency=n;t.increaseUpdateUrgency=i;t.requestUpdateUrgency=o;!function(e){e.closeEventHandlerBound=!1}(a||(a={}));t.showUpdateOverlayIfNecessary=s;t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop()
40;continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/router",["require","exports","jquery.cookie","underscore","chrisweb-utilities","ribsjs","FSPromise","jamtracker","Server/scripts/library/controller/controllerLoader","Server/scripts/library/utilities/route","Server/scripts/configuration/errorDefinitions","Server/scripts/configuration/configuration","Server/scripts/library/utilities/deployment","./library/plugin/featuresCheck","Server/scripts/library/error/error","Server/scripts/views/layout","Server/scripts/library/view/skeleton/skeletonClientAdapter","Server/scripts/library/view/skeleton/contentRenderJQueryAdapter","Server/scripts/views/layout/navigation","Server/scripts/views/overlays","Server/scripts/views/messages/cookieBanner","Server/scripts/views/messages/item","Server/scripts/library/user/session","Server/scripts/library/adapter/session/localStorage","Server/scripts/library/user/cookie","Server/scripts/library/adapter/cookie/jquery","Server/scripts/managers/manager","Server/scripts/library/update/update","Server/scripts/configuration/bootLoader","Server/scripts/library/model/model","Server/scripts/library/utilities/app"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("chrisweb-utilities"),i=e("ribsjs"),o=e("FSPromise"),a=e("jamtracker"),s=i.EventsManager,l=e("Server/scripts/library/controller/controllerLoader"),u=e("Server/scripts/library/utilities/route"),c=e("Server/scripts/configuration/errorDefinitions"),d=e("Server/scripts/configuration/configuration"),p=e("Server/scripts/library/utilities/deployment"),f=e("./library/plugin/featuresCheck"),h=e("Server/scripts/library/error/error"),m=e("Server/scripts/views/layout"),y=e("Server/scripts/library/view/skeleton/skeletonClientAdapter"),g=e("Server/scripts/library/view/skeleton/contentRenderJQueryAdapter"),v=e("Server/scripts/views/layout/navigation"),_=e("Server/scripts/views/overlays"),b=e("Server/scripts/views/messages/cookieBanner"),w=e("Server/scripts/views/messages/item"),x=e("Server/scripts/library/user/session"),M=e("Server/scripts/library/adapter/se
40ssion/localStorage"),S=e("Server/scripts/library/user/cookie"),k=e("Server/scripts/library/adapter/cookie/jquery"),T=e("Server/scripts/managers/manager"),A=e("Server/scripts/library/update/update"),E=e("Server/scripts/configuration/bootLoader"),P=e("Server/scripts/library/model/model"),O=e("Server/scripts/library/utilities/app"),j=function(e){function t(){var t=e.call(this,{routes:u.default.getRoutes()})||this;t.updateUrgencyInfoRequested=!1;t.requestId=0;t.isDisconnected=E.getValue(E.Properties.Connectivity);return t}__extends(t,e);t.prototype.initialize=function(){var e=this;n.default.log("[LIBRARY ROUTER] initializing ...");this.session=new x.default(E.getValue(E.Properties.Adapter.Session)?E.getValue(E.Properties.Adapter.Session):new M.default);this.cookie=new S.default(E.getValue(E.Properties.Adapter.Cookie)?E.getValue(E.Properties.Adapter.Cookie):new k.default);var i=this.userData={session:this.session,cookie:this.cookie,query:{},location:location},o=this.cookie.get(d.default.cookies.me.name);this.cookie.delete(d.default.cookies.me.name,{path:"/"});o&&this.session.set("me",o);o=this.session.get("me");o||(o={});if(parseInt(this.cookie.get(d.default.cookies.connection.name))!==parseInt(o.id)){this.session.delete("me");o={}}var a=this.cookie.get(d.default.cookies.lang.name);if(!a){a=(navigator.language||"en").substr(0,2);-1===d.default.application.acceptedLanguages.indexOf(a)&&(a=null);a||(a=d.default.application.acceptedLanguages[0]);this.cookie.set(d.default.cookies.lang.name,a,{path:"/",secure:!p.default.isEnvironment("development"),sameSite:"strict"})}document.documentElement.lang=a;this.navigationModel=new P.default({user:o,lang:this.cookie.get(d.default.cookies.lang.name),controller:""});this.layoutView=new m.default("/layout-lite",{contentSelector:"#skeleton-content-wrap",messageSelector:"#skeleton-content-messages",bannerSelector:"#skeleton-content-messages",navigationSelector:"#skeleton-navigation",navigationView:v.default,headerSelector:"#skeleton-bar-new",renderAdapter:new g.default,skeletonAdapter:new y.default,navigationViewOptions:{model:this.navigationModel,userData:i},overlaySelector:"#skeleton-overlay",playerSelector:"#skeleton-player",cookie:this.cookie,userData:i});l.default.router=this;var c=function(t){var n=!!t.get("managedArtistIds")&&t.get("managedArtistIds").length,i=t.get("cover");e.navigationModel.set({user:r.clone(t.attributes),id:t.get("id"),isLogged:!0,isManagingArtist:n,image:i&&"object"==typeof i.small&&null!==i.small?i.small.size50:void 0,dispname:t.get("dispname")})};this.layoutView.on(m.default.Events.CHANGE_LANG,function(t){var r=new Date;r.setDate(r.getDate()+d.default.cookies.lang.duration);e.cookie.set(d.default.cookies.lang.name,t,{path:"/",expires:r,secure:!p.default.isEnvironment("development"),sameSite:"strict"});e.navigationModel.set("lang",t);document.documentElement.lang=t;e.executeRoute().then(function(){return e.layoutView.onChangeLang()})});T.UserManager.on("userconnected",c);T.UserManager.on("userupdated",c);T.UserManager.on("userdisconnected",function(){e.cookie.delete(d.default.cookies.me.name);e.cookie.delete(d.default.cookies.connection.name);e.session.delete("me");o={};e.navigationModel.set({user:{},isLogged:!1,isManagingArtist:!1})});s.on(s.constants.ROUTER_POSTROUTE,function(t){var r=i.cookie.get(d.default.cookies.message.name);if(r){i.cookie.delete(d.default.cookies.message.name,{path:"/"});e.layoutView.addMessage(new w.default({model:new P.default({message:r.message,status:r.status})}))}if(i.cookie.get(d.default.cookies.social.name)){i.cookie.delete(d.default.cookies.social.name,{path:"/"});_.default.add(_.default.DefinitionPath.SocialMergeAccount,{userData:i})}void 0===i.cookie.get(d.default.cookies.cookieBanner.name)&&e.layoutView.addCookieBanner(new b.default({model:new P.default({message:"_TKEY_WWW_GENERIC_cookiebanner-text"}),linkText:"_TKEY_WWW_GENERIC_learn-more",linkUrl:u.default.getUrl("cookies"),isDismissable:!1,userData:i}))});var h=new f.default;this.isFeaturesSupported=h.featuresSupported();document.addEventListener("offline",function(){e.isDisconnected=!0;e.layoutView.trigger(t.Event.disconnection)},!1);document.addEventListener("online",function(){e.isDisconnected=!1;e.layoutView.trigger(t.Event.disconnection)},!1);this.layoutView.on(t.Event.disconnection,function(){e.executeRoute()},this);this.layoutView.on(m.default.Events.CHANGE_DISPLAY_SIZE,function(){e.executeRoute()},this);if(!1===this.cookie.get(d.default.cookies.application.name,!1)){var A=new Date;A.setDate(A.getDate()+d.default.cookies.application.duration);this.cookie.set(d.default.cookies.application.name,!0,{expires:A,path:"/",secure:!p.default.isEnvironment("development"),sameSite:"strict"})}};t.prototype.execute=function(e,t,r){var n=this;this.previousUrl=window.location.pathname;this.requestId++;if(e){s.trigger(s.constants.ROUTER_PREROUTE,{routeArguments:t,routeName:r,userData:this.userData});this.userData.currentRoute=r;this.currentRouteDefinition=e.apply(this,t);this.navigationModel.set({controller:this.currentRouteDefinition.controller});this.executeRoute().then(function(){s.trigger(s.constants.ROUTER_POSTROUTE,{routeArguments:t,routeName:r,userData:n.userData})})}return!0};t.prototype.executeRoute=function(){return __awaiter(this,void 0,o.default,function(){var e,t,n,i,o,s,u=this;return __generator(this,function(d){switch(d.label){case 0:e=this.currentRouteDefinition;t=this.requestId;
40n={session:this.session,cookie:this.cookie,location:location};if(!this.isFeaturesSupported){i=new h.default(c.default.OLD_BROWSER.message);o=c.default[i.message];return[2,l.default.load("error/index",r.extend({userData:n,url:window.location.href},e.params,{code:o.httpCode}),"Server/scripts").then(function(e){return e.create(u.layoutView)}).then(function(e){return u.layoutView.render().then(function(){try{document.dispatchEvent(new CustomEvent("jampageloaded"))}catch(t){var e=document.createEvent("CustomEvent");e.initCustomEvent("jampageloaded",!1,!1,{});document.dispatchEvent(e)}})})]}if(O.getDevicePlatform()===O.Platform.Unknown)return[3,3];if(this.updateUrgencyInfoRequested)return[3,2];this.updateUrgencyInfoRequested=!0;return[4,A.requestUpdateUrgency(n)];case 1:d.sent();d.label=2;case 2:A.showUpdateOverlayIfNecessary(n);d.label=3;case 3:if(e){this.layoutView.clear();s=void 0;s=e.params.hasOwnProperty("code")?e.params.code:"error/index"===e.controller?500:200;return[2,l.default.load(e.controller,r.extend({code:s,userData:this.userData,url:window.location.href,isDisconnected:this.isDisconnected},e.params),"Server/scripts").then(function(e){if(u.currentController){u.currentController.clear();u.currentController=null}if(t===u.requestId){u.currentController=e;return e.create(u.layoutView)}}).then(function(e){if(t===u.requestId)return u.layoutView.render().then(function(){try{document.dispatchEvent(new CustomEvent("jampageloaded"))}catch(t){var e=document.createEvent("CustomEvent");e.initCustomEvent("jampageloaded",!1,!1,{});document.dispatchEvent(e)}})}).catch(function(t){if(!(t.options&&"originalError"in t.options&&"FSPromiseCancelError"===t.options.originalError.name)){console.error(t);u.layoutView.clear();var n=c.default[t.message];if(n&&301===n.httpCode){(new a.Navigation.NavigationTracker).setEntity("page").setOrigin(a.Navigation.ENavigationOrigin.Redirection).setUri(u.userData.location.pathname).setEntityId(t.options.newUrl).send();u.navigate(t.options.newUrl,{trigger:!0,replace:!0})}else{var i=void 0;i=void 0===n||void 0===n.httpCode?500:n.httpCode;l.default.load("error/index",r.extend({userData:u.userData,url:window.location.href},e.params,{code:i}),"Server/scripts").then(function(e){return e.create(u.layoutView)}).then(function(e){return u.layoutView.render().then(function(){try{document.dispatchEvent(new CustomEvent("jampageloaded"))}catch(t){var e=document.createEvent("CustomEvent");e.initCustomEvent("jampageloaded",!1,!1,{});document.dispatchEvent(e)}})}).catch(function(e){console.error(e)})}}})]}return[2,Promise.resolve()]}})})};t.Event={disconnection:"user_disconnected"};return t}(i.Router);t.default=j});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/vendor/chromedevtools/elements/dompath",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){function t(t,r){return t.nodeType!==Node.ELEMENT_NODE?t.localName||t.nodeName.toLowerCase():e.cssPath(t,r)}function r(e,t){void 0===t&&(t=!0);if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var r=[],n=e;n;){var o=i(n,!!t,n===e);if(!o)break;r.push(o);if(o.optimized)break;n=n.parentNode}r.reverse();return r.join(" > ")}function n(e){var t=e.shadowRootType||null;return t?"#shadow-root ("+t+")":e.localName?e.localName.length!==e.nodeName.length?e.nodeName:e.localName:e.nodeName}function i(t,r,i){if(t.nodeType!==Node.ELEMENT_NODE)return null;var l=t.getAttribute("id");if(r){if(l)return new e.Step(a(l),!0);var u=t.nodeName.toLowerCase();if("body"===u||"head"===u||"html"===u)return new e.Step(n(t),!0)}var c=n(t);if(l)return new e.Step(c+a(l),!0);var d=t.parentNode;if(!d||d.nodeType===Node.DOCUMENT_NODE)return new e.Step(c,!0);for(var p=o(t),f=!1,h=!1,m=-1,y=-1,g=d.childNodes,v=0;(-1===m||!h)&&v<g.length;++v){var _=g[v];if(_.nodeType===Node.ELEMENT_NODE){y+=1;if(_!==t){if(!h&&n(_)===c){f=!0;var b=new Set(p);if(b.size)for(var w=o(_),x=0;x<w.length;++x){var M=w[x];if(b.has(M)){b.delete(M);if(!b.size){h=!0;break}}}else h=!0}}else m=y}}var S=c;i&&"input"===c.toLowerCase()&&t.getAttribute("type")&&!t.getAttribute("id")&&!t.getAttribute("class")&&(S+='[type="'+t.getAttribute("type")+'"]');if(h)S+=":nth-child("+(m+1)+")";else if(f)for(var k=0,T=p;k<T.length;k++){var A=T[k];
40S+="."+s(A.substr(1))}return new e.Step(S,!1)}function o(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function a(e){return"#"+s(e)}function s(e){if(d(e))return e;var t=/^(?:[0-9]|-[0-9-]?)/.test(e),r=e.length-1;return e.replace(/./g,function(e,n){return t&&0===n||!c(e)?l(e,n===r):e})}function l(e,t){return"\\"+u(e)+(t?"":" ")}function u(e){var t=e.charCodeAt(0).toString(16);1===t.length&&(t="0"+t);return t}function c(e){return!!/[a-zA-Z0-9_-]/.test(e)||e.charCodeAt(0)>=160}function d(e){return/^-{0,2}[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e)}function p(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";for(var r=[],n=e;n;){var i=f(n,t);if(!i)break;r.push(i);if(i.optimized)break;n=n.parentNode}r.reverse();return(r.length&&r[0].optimized?"":"/")+r.join("/")}function f(t,r){var n,i=h(t);if(-1===i)return null;switch(t.nodeType){case Node.ELEMENT_NODE:if(r&&t.getAttribute("id"))return new e.Step('//*[@id="'+t.getAttribute("id")+'"]',!0);n=t.localName;break;case Node.ATTRIBUTE_NODE:n="@"+t.nodeName;break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:n="text()";break;case Node.PROCESSING_INSTRUCTION_NODE:n="processing-instruction()";break;case Node.COMMENT_NODE:n="comment()";break;case Node.DOCUMENT_NODE:default:n=""}i>0&&(n+="["+i+"]");return new e.Step(n,t.nodeType===Node.DOCUMENT_NODE)}function h(e){var t=e.parentNode?e.parentNode.childNodes:null;if(!t)return 0;for(var r,n=0;n<t.length;++n)if(m(e,t[n])&&t[n]!==e){r=!0;break}if(!r)return 0;for(var i=1,n=0;n<t.length;++n)if(m(e,t[n])){if(t[n]===e)return i;++i}return-1}function m(e,t){return e===t||(e.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE?e.localName===t.localName:e.nodeType===t.nodeType||(e.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:e.nodeType)===(t.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:t.nodeType))}e.fullQualifiedSelector=t;e.cssPath=r;e.xPath=p;var y=function(){function e(e,t){this.value=e;this.optimized=t}e.prototype.toString=function(){return this.value};return e}();e.Step=y}(r=t.DOMPath||(t.DOMPath={}));t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/configuration/tagDefinitions",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={instrumental:"instrumental",happy:"happy","happy music":"happy",happiness:"happy",alegre:"happy",alegria:"happy",feliz:"happy",piano:"piano",epic:"epic",jazz:"jazz",rock:"rock",soundtrack:"soundtrack",sad:"sad",triste:"sad",sadness:"sad",pop:"pop",dubstep:"dubstep",country:"country",ambient:"ambient",ambiental:"ambient",ambiente:"ambient",ambiance:"ambient",ambience:"ambient",ambiant:"ambient",ambiante:"ambient",rap:"rap",corporate:"corporate",corporative:"corporate",love:"love",amor:"love",amour:"love",amore:"love",lovely:"love",guitar:"guitar",guitare:"guitar",guitarra:"guitar",chitarra:"guitar",dance:"dance",sports:"sports",sport:"sports",deporte:"sports",hiphop:"hiphop","hip hop":"hi
40phop",folk:"folk",house:"house",reggae:"reggae",electronic:"electronic",electro:"electronic",fun:"fun",blues:"blues",summer:"summer",wedding:"wedding",classical:"classical",clasica:"classical",classique:"classical",classica:"classical",horror:"horror",lounge:"lounge",cinematic:"cinematic",cinema:"cinematic",cine:"cinematic",film:"cinematic",movie:"cinematic",funny:"funny",nature:"nature",naturaleza:"nature",natural:"nature",metal:"metal",upbeat:"upbeat",ukelele:"ukelele",ukulele:"ukelele",action:"action",indie:"indie",salsa:"salsa",travel:"travel",kids:"kids",children:"kids",child:"kids",infantil:"kids",kid:"kids","niños":"kids","niño":"kids",acoustic:"acoustic",acustic:"acoustic",acoustique:"acoustic",acustico:"acoustic",acustica:"acoustic",adventure:"adventure",aventure:"adventure",aventura:"adventure",classicrock:"classicrock","classic rock":"classicrock",techno:"techno",chillout:"chillout","chill out":"chillout","chilled out":"chillout",funk:"funk",funky:"funk",violin:"violin",violon:"violin",relax:"relax",relaxing:"relax",relaxation:"relax",relajante:"relax",motivational:"motivational",motivation:"motivational",motivate:"motivational",motivacional:"motivational",motivacion:"motivational",suspense:"suspense",suspens:"suspense",suspence:"suspense",trance:"trance",romantic:"romantic",romance:"romantic",romantico:"romantic",romantica:"romantic",trap:"trap",celtic:"celtic",celtique:"celtic",celta:"celtic",flamenco:"flamenco",inspirational:"inspirational",inspiration:"inspirational",inspiring:"inspirational",inspire:"inspirational",gospel:"gospel",drum:"drum",drums:"drum",dramatic:"dramatic",drama:"dramatic",fashion:"fashion",mode:"fashion",moda:"fashion",swing:"swing",emotional:"emotional",emotion:"emotional",emotive:"emotional",advertising:"advertising",scary:"scary",miedo:"scary",latin:"latin",latino:"latin",latina:"latin",dark:"dark",kpop:"kpop",disco:"disco",electronica:"electronica",party:"party",fiest:"party",beach:"beach",playa:"beach",space:"space",calm:"calm",ska:"ska",energetic:"energetic",energy:"energetic",terror:"terror",soul:"soul",DJ:"DJ",soft:"soft",medieval:"medieval",meditation:"meditation",meditative:"meditation",deephouse:"deephouse","deep house":"deephouse",newage:"newage",uplifting:"uplifting",tango:"tango",documentary:"documentary",african:"african",africa:"african",positive:"positive",cumbia:"cumbia",slow:"slow",bass:"bass",christmas:"christmas",samba:"samba",french:"french",france:"french",francais:"french",francaise:"french",frances:"french",sexy:"sexy",ride:"ride",zen:"zen",edm:"edm",dream:"dream",dreams:"dream",water:"water",ocean:"ocean",sea:"sea",bachata:"bachata",dub:"dub",western:"western",yoga:"yoga",spanish:"spanish",spain:"spanish",espanol:"spanish",espanola:"spanish","español":"spanish","española":"spanish",italian:"italian",italia:"italian",italy:"italian",italiano:"italian",italiana:"italian",comedy:"comedy",history:"history",indian:"indian",india:"indian",sex:"sex",sexo:"sex",minimal:"minimal",nightcore:"nightcore",arabic:"arabic",arab:"arabic",arabian:"arabic",arabe:"arabic",running:"running",run:"running",surf:"surf",orchestral:"orchestral",orchestra:"orchestral",oriental:"oriental",orient:"oriental",fantasy:"fantasy",tropical:"tropical",magic:"magic",workout:"workout","work out":"workout",chinese:"chinese",china:"chinese",reggaeton:"reggaeton",regueton:"reggaeton",reggeton:"reggaeton",regeton:"reggaeton",rnb:"rnb","r n b":"rnb","r & b":"rnb","r&b":"rnb",world:"world",japanese:"japanese",japan:"japanese",spring:"spring",fast:"fast",flute:"flute",industrial:"industrial",tension:"tension",creepy:"creepy",rain:"rain",cute:"cute",easylistening:"easylistening",irish:"irish",experimental:"experimental",circus:"circus",trumpet:"trumpet",birthday:"birthday",success:"success",cartoon:"cartoon",joy:"joy",joyful:"joy",cello:"cello","80s":"80s",light:"light",alternative:"alternative",christian:"christian",jungle:"jungle",heavymetal:"heavymetal",hardrock:"hardrock","hard rock":"hardrock",triphop:"triphop","trip hop":"triphop",forest:"forest",sunny:"sunny",sun:"sunny",sunshine:"sunny",hardcore:"hardcore",intense:"intense","8bit":"8bit","8 bit":"8bit",school:"school",club:"club",mysterious:"mysterious",mystery:"mysterious",misterio:"mysterious",mystic:"mysterious",mexican:"mexican",mexico:"mexican",bossanova:"bossanova","bossa nova":"bossanova",bossa:"bossanova",cheerful:"cheerful",hip:"hip",deep:"deep",sweet:"sweet",asian:"asian",asia:"asian",brasil:"brasil",brazil:"brasil",brazilian:"brasil",fitness:"fitness",holiday:"holiday",holidays:"holiday",dancehall:"dancehall",cool:"cool",beats:"beats",beat:"beats",youth:"youth",young:"youth",winter:"winter",rai:"rai",schlager:"schlager",trip:"trip",home:"home",percussion:"percussion",percussions:"percussion",opera:"opera",tribal:"tribal",drumnbass:"drumnbass","drum and bass":"drumnbass",drumandbass:"drumnbass",dnb:"drumnbass","drum n bass":"drumnbass","drum & bass":"drumnbass","drum&bass":"drumnbass","d 
40n b":"drumnbass",loop:"loop",sax:"sax",saxo:"sax",saxophone:"sax",indierock:"indierock","indie rock":"indierock",poprock:"poprock","pop rock":"poprock",presentation:"presentation",smooth:"smooth",smoothjazz:"smoothjazz","smooth jazz":"smoothjazz",chiptune:"chiptune",animal:"animal",vocal:"vocal",vocals:"vocal",family:"family",science:"science",smile:"smile",comic:"comic",fear:"fear",downtempo:"downtempo",crazy:"crazy",gym:"gym",retro:"retro",sky:"sky",electroswing:"electroswing","electro swing":"electroswing",silence:"silence",mariachi:"mariachi",rumba:"rumba",power:"power",oldies:"oldies",groove:"groove",mountain:"mountain",greek:"greek",woodwind:"woodwind",wind:"wind",cuba:"cuba",cuban:"cuba",cubano:"cuba",spa:"spa",rockabilly:"rockabilly",waves:"waves",tv:"tv",merengue:"merengue",lullaby:"lullaby",russian:"russian",russia:"russian",strings:"strings",halloween:"halloween",zumba:"zumba",exciting:"exciting",electropop:"electropop","electro pop":"electropop",speed:"speed",church:"church",education:"education",hindi:"hindi",cooking:"cooking",vintage:"vintage",computer:"computer",tech:"tech",heroic:"heroic",gothic:"gothic",hardstyle:"hardstyle",death:"death",deathmetal:"death",flower:"flower",beautiful:"beautiful",beauty:"beautiful",peaceful:"peaceful",peace:"peaceful",coffee:"coffee",cafe:"coffee",marimba:"marimba",accordion:"accordion",accordeon:"accordion",acordeon:"accordion",psy:"psy",road:"road",sunset:"sunset",german:"german",deutsch:"german",bluegrass:"bluegrass",night:"night",sensual:"sensual",electric:"electric",optimistic:"optimistic",tsunami:"tsunami",sleep:"sleep",atmosphere:"atmosphere",atmospheric:"atmosphere",videogame:"videogame",synth:"synth",synths:"synth",synthesizer:"synth",synthesizers:"synth",progressive:"progressive",island:"island",grunge:"grunge",hawaii:"hawaii",hawaiian:"hawaii",robot:"robot",urban:"urban",bright:"bright",jpop:"jpop",playful:"playful",angry:"angry",postrock:"postrock",peru:"peru",danger:"danger",punk:"punk",punkrock:"punk","punk rock":"punk",futuristic:"futuristic",future:"futuristic",indiepop:"indiepop","indie pop":"indiepop",hype:"hype",organ:"organ",modern:"modern",choir:"choir",chanson:"chanson",infinity:"infinity",zombie:"zombie",carnival:"carnival",spooky:"spooky",animation:"animation",ibiza:"ibiza",drone:"drone",chillstep:"chillstep",rocknroll:"rocknroll","rock and roll":"rocknroll",rockandroll:"rocknroll","rock n roll":"rocknroll","rock&roll":"rocknroll","rock & roll":"rocknroll",ragtime:"ragtime",celebration:"celebration",march:"march",marching:"march","marching band":"march",marchingband:"march",quiet:"quiet",dynamic:"dynamic",ethnic:"ethnic",extreme:"extreme",hopeful:"hope",hope:"hope",serious:"serious",psytrance:"psytrance",clown:"clown",noise:"noise",polka:"polka",gypsy:"gypsy",gipsy:"gypsy",portuguese:"portuguese",portugal:"portuguese",sunrise:"sunrise",spiritual:"spiritual",darkambient:"darkambient",crime:"crime",viking:"viking",ballet:"ballet",wild:"wild",folklore:"folklore",gaming:"gaming",glitch:"glitch",religion:"religion"};t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/keyboard",["require","exports"],e)}(function(e,t){"use strict";function r(e){var r=e.keyCode||e.which;if(t.ArrowKeyList.includes(r))return{x:r===n.ArrowLeft?-1:r===n.ArrowRight?1:0,y:r===n.ArrowUp?-1:r===n.ArrowDown?1:0}}Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){e[e.ArrowLeft=37]="ArrowLeft";e[e.ArrowUp=38]="ArrowUp";e[e.ArrowRight=39]="ArrowRight";e[e.ArrowDown=40]="ArrowDown";e[e.Backspace=8]="Backspace";e[e.Enter=13]="Enter";e[e.Return=13]="Return";e[e.Escape=27]="Escape";e[e.PageUp=33]="PageUp";e[e.PageDown=34]="PageDown";e[e.Delete=46]="Delete"}(n=t.KeyCode||(t.KeyCode={}));t.ArrowKeyList=[n.ArrowDown,n.ArrowLeft,n.ArrowRight,n.ArrowUp];t.ArrowHorizontalKeyList=[n.ArrowLeft,n.ArrowRight];t.ArrowVerticalKeyList=[n.ArrowDown,n.ArrowUp];t.PageKeyList=[n.PageDown,n.PageUp];t.arrowToOffset=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/search/term",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";
40Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this)};t.prototype.events=function(){return{"touchstart .js-close-search-term":"onCloseTerm","mousedown .js-close-search-term":"onCloseTerm"}};t.prototype.onCloseTerm=function(e){e.preventDefault();this.close()};t.prototype.getTemplateId=function(){return"/components/search/term"};return t}(r.default);t.default=n});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/promise",["require","exports","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("FSPromise");!function(e){function t(e){var t=[],r=new n.FSPromise(function(r){var i=new Array(e.length).fill(void 0),o=0,a=function(){o>=e.length&&r(i)};e.forEach(function(e,r){var s=function(e){i[r]=e;t.forEach(function(t){try{t(e,r,i)}catch(e){console.error(e)}});++o;a()};e instanceof n.FSPromise?e.then(s,s):s(e)});a()});r.progress=function(e){t.push(e);return r};return r}e.stream=t}(r=t.Promise||(t.Promise={}));t.default=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/search/form",["require","exports","underscore","jquery","ribsjs","../../../managers/manager","jamtracker","../../../library/collection/collection","../../../configuration/configuration","../../../configuration/tagDefinitions","chrisweb-utilities","../../../library/utilities/route","../../../library/utilities/keyboard","../../../library/view/component","./term","ribsjs","../../../library/utilities/promise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("ribsjs"),o=i.EventsManager,a=e("../../../managers/manager"),s=e("jamtracker"),l=e("../../../library/collection/collection"),u=e("../../../configuration/configuration"),c=e("../../../configuration/tagDefinitions"),d=e("chrisweb-utilities"),p=e("../../../library/utilities/route"),f=e("../../../library/utilities/keyboard"),h=e("../../../library/view/component"),m=e("./term"),y=e("ribsjs"),g=e("../../../library/utilities/promise"),v=new s.Monitoring.MonitoringTracker;v.setFrom("search").setAction(s.Monitoring.EMonitoringAction.Issue);var _=function(e){function t(i){var o=e.call(this,r.extend(t.DefaultOptions,i))||this;o.$searchInput=n();o.requestId=0;t.instance=o;return o}__extends(t,e);Object.defineProperty(t,"Instance",{get:function(){return t.instance},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"currentSearchResult",{get:function(){return this.persistentData.result},enumerable:!0,configurable:!0});t.prototype.isOnSearchPage=function(){var e=this.options.userData.location,r=e.href,n=r.split("#").length>1?r.split("#")[1].split("?")[0]:"";return"/search"===e.pathname||t.RouteRegex.test(e.pathname)||"search"===n||t.RouteRegex.test(n)};t.prototype.isOnSearchEntityPage=function(){return!!this.getSearchEntityPage()};t.prototype.getSearchEntityPage=function(){var e=this.options.userData.location,r=e.href,n=r.split("#").length>1?r.split("#")[1].split("?")[0]:"";return t.RouteRegex.test(e.pathname)?e.pathname.match(t.RouteRegex)[1]:t.RouteRegex.test(n)?n.match(t.RouteRegex)[1]:""};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.placeholderText={empty:"",fill:""};this.persistentData={entityType:this.getSearchEntityPage(),result:{albums:[],artists:[],query:"",offset:0,tags:[],tracks:[],currentSelection:"",isProcessing:!1}};this.collection=this.options.collection||new l.default;this.options.listSelector=".js-search-form-term";this.options.ModelView=this.options.ModelView||m.default;if(d.default.isClient()){this.$searchInput=n();this.$placeholder=n();this.uriToQueryTerm()}};t.prototype.onResetForm=function(e){void 0===e&&(e=!0);this.$searchInput.attr("value","").val("").trigger("keyup");this.onSelectTerm(n());e&&this.$searchInput.focus()};t.prototype.onRefreshResult=function(){o.trigger(t.Event.Result,this.persistentData.result)};t.prototype.events=function(){return{"click .js-hide-search":"onHideSearch","touchstart .js-form-search-reset":"onClickResetForm","mousedown .js-form-search-reset":"onClickResetForm","keydown .js-form-search-input":"onPressKey","keyup .js-form-search-input":"resetSuggest","focus .js-form-search-input":"onFocus","click .js-form-search-input":"onFocus","blur .js-form-search-input":"onBlur","input .js-form-search-input":"onInvalid",click:"onCheckFocus"}};t.prototype.onHideSearch=function(e){e.preventDefault();n(".app-bar").removeClass("is-search");this.$searchInput.attr("value","").val("");this.isOnSearchPage()&&window.history.back()};t.prototype.onClickResetForm=function(e){this.persistentData.entityType="";this.persistentData.result={albums:[],artists:[],tags:[],tracks:[],query:"",offset:0,currentSelection:"",isProcessing:!1};this.collection.reset();if(this.isOnSearchPage()){var t=p.default.getUrl("search");o.trigger("navigate",{url:t});this.onResetForm()}else this.onResetForm(!1);this.reloadPlaceholder();return!1};t.prototype.onPressKey=function(e){if(f.ArrowKeyList.includes(e.ke
40yCode)||f.PageKeyList.includes(e.keyCode)){var r=f.PageKeyList.includes(e.keyCode);if(this.$el.hasClass("highlight")){var n=f.ArrowVerticalKeyList.includes(e.keyCode),i=this.$searchInput[0],a=f.KeyCode.ArrowRight===e.keyCode&&i.selectionEnd===this.$searchInput.val().length&&i.selectionStart===i.selectionEnd;if(n||r||a){this.$el.removeClass("highlight");if(n)o.trigger(t.Event.Move,{x:0,y:e.keyCode===f.KeyCode.ArrowDown?0:-1},!0);else if(a){var s=f.arrowToOffset(e.originalEvent);o.trigger(t.Event.Move,s)}else o.trigger(t.Event.MovePage,e.keyCode===f.KeyCode.PageDown?1:-1,!0);e.preventDefault();e.stopPropagation();return!1}return}if(r)o.trigger(t.Event.MovePage,e.keyCode===f.KeyCode.PageDown?1:-1);else{var s=f.arrowToOffset(e.originalEvent);o.trigger(t.Event.Move,s)}}else if(e.keyCode===f.KeyCode.Enter){o.trigger(t.Event.Select)
41;this.isOnSearchPage()||this.$searchInput.blur()}else if(e.keyCode===f.KeyCode.Escape){if(this.isOnSearchEntityPage()){var l=this.getSearchUrl(),u=p.default.getUrl("search",{},{q:l});o.trigger("navigate",{url:u})}}else{if(e.keyCode!==f.KeyCode.Backspace||0!==this.$searchInput.val().length){this.$el.addClass("highlight");this.queryCallback();return}this.collection.length>0&&this.collection.last().close()}e.preventDefault();e.stopPropagation();return!1};t.prototype.render=function(){var t=this;return a.LocalizationManager.get(["_TKEY_GENERIC_SEARCH_refine-search","_TKEY_WWW_SEARCH_placeholder"],{userData:this.options.userData}).then(function(r){t.placeholderText={empty:r[1].get("translate"),fill:r[0].get("translate")};return e.prototype.render.call(t)})};t.prototype.onRender=function(){var n=this;e.prototype.onRender.call(this);this.$searchInput=this.$(".js-form-search-input");this.$placeholder=this.$(".js-form-search-placeholder");this.reloadPlaceholder();this.queryCallback=r.debounce(function(){var e=n.getSearchParams(),r=n.getSearchUrl(e);if(!n.isOnSearchPage()&&r.length>1){var i={};n.persistentData.entityType&&(i.type=n.persistentData.entityType);var a=p.default.getUrl("search",i,{q:r});o.trigger("navigate",{url:a});if(n.persistentData.result&&Object.values(n.persistentData.result).find(function(e){if(e)return e.length>0})){o.trigger(t.Event.Result,n.persistentData.result);return}}n.search(e)},this.options.delayThrottle);if(d.default.isClient()){o.on(t.Event.Reset,this.onClickResetForm,this);o.on(t.Event.Search,this.search,this);o.on(t.Event.SearchMore,this.more,this);o.on(t.Event.Focus,this.onAutoFocus,this);o.on(t.Event.AddTerm,this.onAddedTerm,this);o.on(t.Event.SelectTerm,this.onSelectTerm,this);o.on(t.Event.RefreshResult,this.onRefreshResult,this);o.on("popstate",this.onPopState,this);this.listenTo(this.collection,"remove",this.onRemoveTerm);this.listenTo(this.collection,"reset",this.onResetTerm);this.listenTo(this.collection,"update",this.onUpdateTerm);if(this.getSearchUrl()){this.resetSuggest();this.search()}}};t.prototype.getTemplateId=function(){return"/components/search/form"};t.prototype.getSearchParams=function(){var e=this.collection.reduce(function(e,t){var r=t.get("type");r in e||(e[r]=[]);e[r].push(t.get("term"));return e},{});e.query=[this.$searchInput.val()];return e};t.prototype.getSearchUrl=function(e){void 0===e&&(e=this.getSearchParams());var t=Object.keys(e).map(function(t){return"query"===t?e.query[0]:t+":"+e[t].map(function(e){return encodeURIComponent(e)}).join(",")}).filter(Boolean).join("+");return this.sanitizeQuery(t)};t.prototype.getSearchTerm=function(){if(this.isOnSearchPage()){var e=this.options.userData.location;if(void 0!==e.search){var t=e.search.split("=");if(t.length>1)return t[1]}var r=/.*[?q=](.*)/,n=r.exec(e.href);return n?n[1]:""}return""};t.prototype.resetSuggest=function(){var e=this.getSearchParams(),r=this.getSearchUrl(e);if(this.previousQuery!==r){var n=e.query[0].toLowerCase();this.$placeholder.text("");var i=[],a=n.length;if(a>0){var s="tag"in e?e.tag.reduce(function(e,t){e[t]=!0;return e},{}):{};i=Object.keys(c.default).filter(function(e){return!(e in s)&&e.substr(0,a)===n}).sort(function(e,t){return e.length-t.length}).map(function(e,t){return{id:Math.random()*Date.now(),type:"tag",score:1,name:e,idstr:c.default[e],albumName:"",artistName:"",tags:"",cover:"",stream:{mp3:"",ogg:""},download:{mp3:"",ogg:""},tagEntityId:t}}).slice(0,15)}o.trigger(t.Event.Result,this.persistentData.result={tags:i,tracks:[],artists:[],albums:[],query:r,offset:0,currentSelection:"",isProcessing:!1},!0)}};t.prototype.onAutoFocus=function(e){var t=this.$el.hasClass("highlight");this.$searchInput.focus();var r=this.$searchInput.val();this.$searchInput.val("");this.$searchInput.val(r);
41!t&&f.ArrowKeyList.includes(e.keyCode)&&this.$el.removeClass("highlight");this.onPressKey(e)};t.prototype.onFocus=function(){if(!this.$el.hasClass("highlight")){this.queryCallback();this.$el.addClass("highlight");o.trigger(t.Event.FocusInput,!0)}this.$el.addClass("focus")};t.prototype.onBlur=function(){this.$el.removeClass("highlight");this.$el.removeClass("focus");o.trigger(t.Event.FocusInput,!1)};t.prototype.onInvalid=function(e){e.preventDefault();e.stopPropagation();return!1};t.prototype.onCheckFocus=function(){this.$searchInput.is(":focus")||this.$searchInput.focus()};t.prototype.search=function(e,r,n){var i=this;void 0===e&&(e=this.getSearchParams());void 0===r&&(r=100);var l=this.getSearchUrl(e),c=this.getSearchEntityPage(),d=this.persistentData.entityType===c;if(this.previousQuery!==l||this.offset!==n||!d){if(this.persistentData.result.query===l&&this.persistentData.result.offset===n)if(c){if(this.persistentData.result[c]&&this.persistentData.result[c].length>0){this.persistentData.entityType=c;return o.trigger(t.Event.Result,this.persistentData.result)}}else{var p=!!t.DynamicCategories.find(function(e){return!i.persistentData.result[e]||!i.persistentData.result[e].length});if(!p){this.persistentData.entityType=c;return o.trigger(t.Event.Result,this.persistentData.result)}}this.previousQuery=l;this.offset=n;var f=++this.requestId,h=this.options.userData,m=c?c.substr(0,c.length-1):"global";o.trigger(t.Event.Update,l,m,f);e.query[0];this.persistentData.entityType=c;if(""!==l||!d){var y=this.persistentData.entityType,_=y?[y.substr(0,y.length-1)]:["album","artist","track"],b={limit:r,identities:"www"};n&&(b.offset=n);var w=_.map(function(e){return a.SearchManager.getByAttribute({query:l,type:e},{dataParameters:b,userData:h})});g.default.stream(w).progress(function(e,r,a){if(i.requestId===f){var s=a.filter(function(e){return e instanceof Array}).reduce(function(e,t){return e.concat(t)},[]),u=s.filter(function(e){return"track"===e.get("type")}).sort(function(e,t){return t.get("score")-e.get("score")}),c=s.filter(function(e){return"artist"===e.get("type")}).sort(function(e,t){return t.get("score")-e.get("score")}),d=s.filter(function(e){return"album"===e.get("type")}).sort(function(e,t){return t.get("score")-e.get("score")});o.trigger(t.Event.Result,{tags:i.persistentData.result.tags,tracks:u,artists:c,albums:d,query:l,offset:n,currentSelection:i.persistentData.result.currentSelection,currentRequestId:f,isProcessing:!0},!1,f)}}).then(function(e){return e.reduce(function(e,t){return e.concat(t)},[])}).then(function(e){if(i.requestId===f){var r=e;v.setFromId(l);if(r.length){var a=r.filter(function(e){return"track"===e.get("type")}).sort(function(e,t){return t.get("score")-e.get("score")}),c=r.filter(function(e){return"artist"===e.get("type")}).sort(function(e,t){return t.get("score")-e.get("score")}),d=r.filter(function(e){return"album"===e.get("type")}).sort(function(e,t){return t.get("score")-e.get("score")}),p={track:a,artist:c,album:d};Object.keys(p).forEach(function(e){var t=p[e];t.length<u.default.tracker.monitoring.search.minimumResult&&(!y||y===e)&&v.send({origin:0===t.length?s.Monitoring.EMonitoringOrigin.Critical:s.Monitoring.EMonitoringOrigin.Warning,entity:e,custom:{monitoring:{type:0===t.length?"EmptyContent":"NotEnoughContent",value:t.length,details:JSON.stringify(t.map(function(e){return""+e.get("id")}))}}})});o.trigger(t.Event.Result,i.persistentData.result={tags:i.persistentData.result.tags,tracks:a,artists:c,albums:d,query:l,offset:n,currentSelection:i.persistentData.result.currentSelection,currentRequestId:f,isProcessing:!1},!1,f)}else{v.send({origin:s.Monitoring.EMonitoringOrigin.Critical,custom:{monitoring:{type:"EmptyContent",value:0}}});o.trigger(t.Event.Result,i.persistentData.result,!1,f)}}})}}};t.prototype.more=function(e){this.search(this.getSearchParams(),e.limit,e.offset)};t.prototype.sanitizeQuery=function(e){var t=e.replace(/_/g," ");t=r.escape(t).replace(/&quot;/g,'"');return t.trim()};t.prototype.onAddedTerm=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!1);this.collection.add(new y.Model(e));t&&this.onResetForm(r);this.queryCallback()};t.prototype.onSelectTerm=function(e){var t=e.find("[data-search-item-term]").text();this.persistentData.result.currentSelection=e.data("ref");var r=this.$searchInput.val();this.$placeholder.text(""+r+t.substr(r.length))};t.prototype.onRemoveTerm=function(e){o.trigger(t.Event.RemoveTerm,e.attributes);this.queryCallback()};t.prototype.onResetTerm=function(){o.trigger(t.Event.ResetTerm)};t.prototype.onUpdateTerm=function(){this.reloadPlaceholder()};
41t.prototype.reloadPlaceholder=function(){this.getSearchUrl()?this.$searchInput.attr("placeholder",this.placeholderText.fill):this.$searchInput.attr("placeholder",this.placeholderText.empty)};t.prototype.onPopState=function(){if(this.isOnSearchPage()){this.uriToQueryTerm(!1);this.reloadPlaceholder();this.$placeholder.text("");this.queryCallback()}};t.prototype.uriToQueryTerm=function(e){var t=this;void 0===e&&(e=!0);var r=this.getSearchTerm();this.collection.reset([],{silent:e});this.$searchInput.val("");if(""!==r){r=decodeURIComponent(this.sanitizeQuery(r));r.split("+").forEach(function(r){var n=r.split(":");if(1===n.length){t.model.set({q:n[0]},{silent:e});t.$searchInput.val(n[0])}else n[1].split(",").forEach(function(r){t.collection.add({term:r,type:n[0]},{silent:e})})})}else this.model.set({q:""},{silent:e})};t.prototype.close=function(){o.off(t.Event.Reset,this.onClickResetForm,this);o.off(t.Event.Focus,this.onAutoFocus,this);o.off(t.Event.Search,this.search,this);o.off(t.Event.SearchMore,this.more,this);o.off(t.Event.AddTerm,this.onAddedTerm,this);o.off(t.Event.SelectTerm,this.onSelectTerm,this);o.off("popstate",this.onPopState,this);this.$searchInput.off("keyup");e.prototype.close.call(this)};t.Event={Update:"search:update",Reset:"search:reset",Result:"search:result",RefreshResult:"search:refreshresult",Direct:"search:direct",Move:"search:move",MovePage:"search:movepage",MoveSelect:"search:moveselect",Select:"search:select",Search:"search:trigger",SearchMore:"search:triggermore",AddTerm:"search:addterm",SelectTerm:"search:selectterm",RemoveTerm:"search:removeterm",ResetTerm:"search:resetterm",Focus:"search:focus",FocusInput:"search:focusinput"};t.RouteRegex=/^\/search\/([a-z]+)$/;t.DynamicCategories=["albums","tracks","artists"];t.DefaultOptions={delayThrottle:u.default.controller.search.formDelayThrottle,userData:null};return t}(h.default);t.default=_});var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/stats/search",["require","exports","jamtracker","ribsjs","../views/components/search/form"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("jamtracker"),n=e("ribsjs"),i=n.EventsManager,o=e("../views/components/search/form"),a=new r.Search.SearchTracker,s={},l=[];t.Events={Update:"stats:search:update"};i.on(o.default.Event.ResetTerm,function(){a.setSearchId(void 0);i.trigger(t.Events.Update,void 0)});i.on(o.default.Event.Update,function(e,t,r){s[r]=a.send({entity:t,entityId:e}).then(function(e){var t=JSON.parse(e[0]);a.setSearchId(t.searchId);return t}).catch(function(e){console.error(e);return!1});l.push(r);for(;l.length>30;)l.shift()});i.on(o.default.Event.Result,function(e,n,o){e.isProcessing||o in s&&s[o].then(function(n){if(!1!==n){["albums","artists","tracks"].forEach(function(t){e[t].forEach(function(e){e.set({custom:{searchResultId:n.searchResultId}})})});i.trigger(t.Events.Update,n.searchResultId);a.send({action:r.Search.ESearchAction.Result,custom:__assign({},n,{searchResult:{albums:e.albums.map(function(e){return e.get("id").toString()}),artists:e.artists.map(function(e){return e.get("id").toString()}),tracks:e.tracks.map(function(e){return e.get("id").toString()})}})})}})})});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/router",["require","exports","jquery","chrisweb-utilities","jamtracker","backbone","../../router","ribsjs","Server/scripts/library/utilities/route","Server/scripts/library/utilities/app","Server/scripts/views/layout","Server/scripts/views/layout/player","Server/scripts/configuration/bootLoader","Server/scripts/vendor/chromedevtools/elements/dompath","Server/scripts/stats/search"],e)}(function(e,t){"use strict";
41Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("jquery"),i=e("chrisweb-utilities"),o=e("jamtracker"),a=e("backbone"),s=e("../../router"),l=e("ribsjs"),u=l.EventsManager,c=e("Server/scripts/library/utilities/route"),d=e("Server/scripts/library/utilities/app"),p=e("Server/scripts/views/layout"),f=e("Server/scripts/views/layout/player"),h=e("Server/scripts/configuration/bootLoader"),m=e("Server/scripts/vendor/chromedevtools/elements/dompath"),y=e("Server/scripts/stats/search");!function(e){function t(){i.default.log("[ROUTER PLUGIN] initializeRouter");v=new s.default;l(v);g(v);var e={pushState:!0};a.History.prototype.decodeFragment=r;var t=h.getValue(h.Properties.Router.BackboneOptions)||e,n=a.history.start(t);n&&!t.silent||a.history.loadUrl(n?window.location.pathname.toString():"/404")}function r(e){var t;try{t=decodeURI(e.replace(/%25/g,"%2525"))}catch(e){t=""}return t}function l(e){var t=new o.Navigation.NavigationTracker;t.setEntity("page").setOrigin(o.Navigation.ENavigationOrigin.Manual);u.on(y.Events.Update,function(e){t.setAttribute("custom",{searchResultId:e})});n(document).on("click",'a:internal:not([href^="mailto"]):not([href^="#"])',function(r){r.preventDefault();var i=r.currentTarget.pathname+r.currentTarget.search;u.trigger(c.default.Events.InternalNavigation,{url:i});n(r.currentTarget).closest("body").length>0&&0===n(r.currentTarget).closest("#skeleton-content-wrap").length&&t.setAttribute("custom",{searchResultId:void 0});if(i){t.setUri(""+location.pathname+location.search).setEntityId(i).setSelector(m.default.cssPath(r.currentTarget)).setScrollY(window.scrollY).send();e.navigate(i,{trigger:!0})}});n(document).on("click",'a:not(:internal):not([target="_blank"])',function(e){n(e.currentTarget).attr("target","_blank")});u.on("navigate",function(t){var r=a.history.getFragment(a.history.decodeFragment((t.url||"").replace(/#.*$/,"")));if(void 0!==t.options&&!1===t.options.trigger)e.navigate(t.url,{trigger:!1,replace:!0});else if(-1===(t.url||"").indexOf("#")&&t.reload&&r===a.history.getFragment())a.history.loadUrl(t.url);else{t.reload&&(a.history.fragment=void 0);e.navigate(t.url,{trigger:!0})}})}function g(e){var t=function(e){var t=!1;if(p.default.getNavigationInstance()&&p.default.getNavigationInstance().isOpen){p.default.getInstance().closeMenu();t=!0}else if(p.default.getInstance().hasOverlays()){p.default.getInstance().closeOverlays();t=!0}else if("full"===f.default.displayMode){f.default.onMinimizePlayer(e);t=!0}return!t};document.addEventListener("backbutton",function(e){t(e)&&("start"===a.history.fragment?d.closeApp():a.history.history.back())});var r=new o.Navigation.NavigationTracker;r.setEntity("page").setOrigin(o.Navigation.ENavigationOrigin.History);var n=a.history.checkUrl;a.history.checkUrl=function(e){if(e&&e instanceof PopStateEvent){r.setUri(""+a.history.root+a.history.fragment).setEntityId(""+location.pathname+location.search).setScrollY(window.scrollY).send();u.trigger("popstate",{url:window.location.pathname})}return n(e)}}var v;e.initialize=t}(r||(r={}));t.default=r});!function(){var e=window.MutationObserver||window.WebKitMutationObserver,t="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch;if(void 0===document.documentElement.style["touch-action"]&&!document.documentElement.style["-ms-touch-action"]&&t&&e){window.Hammer=window.Hammer||{};var r=/touch-action[:][\s]*(none)[^;'"]*/,n=/touch-action[:][\s]*(manipulation)[^;'"]*/,i=/touch-action/,o=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),a=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,s=function(){try{var e=document.createElement("canvas");return!(!window.WebGLRenderingContext||!e.getContext("webgl")&&!e.getContext("experimental-webgl"))}catch(e){return!1}}(),l=s&&o,u={};window.Hammer.time={getTouchAction:function(e){return this.checkStyleString(e.getAttribute("style"))},checkStyleString:function(e){if(i.test(e))return r.test(e)?"none":!n.test(e)||"manipulation"},shouldHammer:function(e){var t=this.hasParent(e.target);return!(!t||l&&!(Date.now()-e.target.lastStart<125))&&t},touchHandler:function(e){var t=!1;if(e.changedTouches){var r=e.changedTouches[0];u[r.identifier]&&(t=r.clientY!==u[r.identifier])}this.shouldHammer(e);if(!t){if("touchend"===e.type||"mouseup"===e.type){e.target.focu
41s();setTimeout(function(){e.target.click()},0)}e.preventDefault()}this.scrolled=!1;delete e.target.lastStart;e.changedTouches&&delete u[r.identifier]},touchStart:function(e){if((o||a)&&this.hasParent(e.target)&&e.touches){u[e.touches[0].identifier]=e.touches[0].clientY;e.target.lastStart=Date.now()}},styleWatcher:function(e){e.forEach(this.styleUpdater,this)},styleUpdater:function(e){if(e.target.updateNext)e.target.updateNext=!1;else{var t=this.getTouchAction(e.target);if(t)"none"!==t&&(e.target.hadTouchNone=!1);else if(!t&&(e.oldValue&&this.checkStyleString(e.oldValue)||e.target.hadTouchNone)){e.target.hadTouchNone=!0;e.target.updateNext=!1;e.target.setAttribute("style",e.target.getAttribute("style")+" touch-action: none;")}}},hasParent:function(e){for(var t,r=e;r&&r.parentNode;r=r.parentNode){t=this.getTouchAction(r);if(t)return t}return!1},installStartEvents:function(){document.addEventListener("touchstart",this.touchStart.bind(this));document.addEventListener("mousedown",this.touchStart.bind(this))},installEndEvents:function(){document.addEventListener("touchend",this.touchHandler.bind(this),!0);document.addEventListener("touchcancel",this.touchHandler.bind(this),!0);document.addEventListener("mouseup",this.touchHandler.bind(this),!0)},installObserver:function(){this.observer=new e(this.styleWatcher.bind(this)).observe(document,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["style"]})},install:function(){this.installEndEvents();this.installStartEvents();this.installObserver()}};window.Hammer.time.install()}}();define("hammer-timejs",["hammer-timejs/hammer-time"],function(e){return e});define("hammer-timejs/hammer-time",function(){});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/jquery/hammer",["require","exports","jquery","underscore","hammerjs","hammer-timejs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("jquery"),i=e("underscore"),o=e("hammerjs"),a=e("hammer-timejs");!function(e){function t(e,t){delete o.defaults.cssProps.userSelect;var r={inputClass:o.TouchInput,recognizers:[[o.Pan,{threshold:50,direction:o.DIRECTION_HORIZONTAL}]]},a=i.extend({},r,t),s=new o.Manager(e,a),l=n(e);l.data("hammer")||l.data("hammer",s)}function r(e){return function(t,r){if(l.indexOf(r.target.localName)<0){e.call(this,t,r);n(this.element).trigger({type:t,gesture:r})}}}function s(){n.fn.hammer=function(e){return this.each(function(){t(this,e)})};o.Manager.prototype.emit=r(o.Manager.prototype.emit);console.debug(a)}var l=["input","button","canvas","select"];e.initialize=s}(r||(r={}));t.default=r});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/jquery/navigation",["require","exports","jquery"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("jquery");!function(e){function t(){n.expr[":"].internal=function(e,t,r,i){var o,a=n(e),s=a.attr("href")||"",l=location.protocol+"//"+location.host;o="//"===s.substring(0,2)?s.substring(0,l.replace(/http(s)?:/,"").length)===l||-1===s.indexOf("://"):s.substring(0,l.length)===l||-1===s.indexOf("://");return o}}e.initialize=t}(r||(r={}));t.default=r});!function(e){var t=navigator.userAgent;e.HTMLPictureElement&&/ecko/.test(t)&&t.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var t,r=document.createElement("source"),n=function(e){var t,n,i=e.parentNode;if("PICTURE"===i.nodeName.toUpperCase()){t=r.cloneNode();i.insertBefore(t,i.firstElementChild);setTimeout(function(){i.removeChild(t)})}else if(!e._pfLastSize||e.offsetWidth>e._pfLastSize){e._pfLastSize=e.offsetWidth;n=e.sizes;e.sizes+=",100vw";setTimeout(function(){e.sizes=n})}},i=function(){var e,t=document.querySelectorAll("picture > img, img[srcset][sizes]");for(e=0;e<t.length;e++)n(t[e])},o=function(){clearTimeout(t);t=setTimeout(i,99)},a=e.matchMedia&&matchMedia("(orientation: landscape)"),s=function(){o();a&&a.addListener&&a.addListener(o)};r.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
41/^[c|i]|d$/.test(document.readyState||"")?s():document.addEventListener("DOMContentLoaded",s);return o}())}(window);!function(e,t,r){"use strict";function n(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function i(){C=!1;R=e.devicePixelRatio;L={};I={};y.DPR=R||1;Y.width=Math.max(e.innerWidth||0,M.clientWidth);Y.height=Math.max(e.innerHeight||0,M.clientHeight);Y.vw=Y.width/100;Y.vh=Y.height/100;m=[Y.height,Y.width,R].join("-");Y.em=y.getEmValue();Y.rem=Y.em}function o(e,t,r,n){var i,o,a,s;if("saveData"===k.algorithm)if(e>2.7)s=r+1;else{o=t-r;i=Math.pow(e-.6,1.5);a=o*i;n&&(a+=.1*i);s=e+a}else s=r>1?Math.sqrt(e*t):e;return s>r}function a(e){var t,r=y.getSet(e),n=!1;if("pending"!==r){n=m;if(r){t=y.setRes(r);y.applySetCandidate(t,e)}}e[y.ns].evaled=n}function s(e,t){return e.res-t.res}function l(e,t,r){var n;if(!r&&t){r=e[y.ns].sets;r=r&&r[r.length-1]}n=u(t,r);if(n){t=y.makeUrl(t);e[y.ns].curSrc=t;e[y.ns].curCan=n;n.res||G(n,n.set.sizes)}return n}function u(e,t){var r,n,i;if(e&&t){i=y.parseSet(t);e=y.makeUrl(e);for(r=0;r<i.length;r++)if(e===y.makeUrl(i[r].url)){n=i[r];break}}return n}function c(e,t){var r,n,i,o,a=e.getElementsByTagName("source");for(r=0,n=a.length;r<n;r++){i=a[r];i[y.ns]=!0;o=i.getAttribute("srcset");o&&t.push({srcset:o,media:i.getAttribute("media"),type:i.getAttribute("type"),sizes:i.getAttribute("sizes")})}}function d(e,t){function r(t){var r,n=t.exec(e.substring(d));if(n){r=n[0];d+=r.length;return r}}function i(){var e,r,n,i,s,l,u,c,d,f=!1,h={};for(i=0;i<a.length;i++){s=a[i];l=s[s.length-1];u=s.substring(0,s.length-1);c=parseInt(u,10);d=parseFloat(u);if(V.test(u)&&"w"===l){(e||r)&&(f=!0);0===c?f=!0:e=c}else if(B.test(u)&&"x"===l){(e||r||n)&&(f=!0);d<0?f=!0:r=d}else if(V.test(u)&&"h"===l){(n||r)&&(f=!0);0===c?f=!0:n=c}else f=!0}if(!f){h.url=o;e&&(h.w=e);r&&(h.d=r);n&&(h.h=n);n||r||e||(h.d=1);1===h.d&&(t.has1x=!0);h.set=t;p.push(h)}}for(var o,a,s,l,u,c=e.length,d=0,p=[];;){r(U);if(d>=c)return p;o=r(q);a=[];if(","===o.slice(-1)){o=o.replace(H,"");i()}else!function(){r(W);s="";l="in descriptor";for(;;){u=e.charAt(d);if("in descriptor"===l)if(n(u)){if(s){a.push(s);s="";l="after descriptor"}}else{if(","===u){d+=1;s&&a.push(s);i();return}if("("===u){s+=u;l="in parens"}else{if(""===u){s&&a.push(s);i();return}s+=u}}else if("in parens"===l)if(")"===u){s+=u;l="in descriptor"}else{if(""===u){a.push(s);i();return}s+=u}else if("after descriptor"===l)if(n(u));else{if(""===u){i();return}l="in descriptor";d-=1}d+=1}}()}}function p(e){var t,r,i,o,a,s,l=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,u=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;r=function(e){function t(){if(o){a.push(o);o=""}}function r(){if(a[0]){s.push(a);a=[]}}for(var i,o="",a=[],s=[],l=0,u=0,c=!1;;){i=e.charAt(u);if(""===i){t();r();return s}if(c){if("*"===i&&"/"===e[u+1]){c=!1;u+=2;t();continue}u+=1}else{if(n(i)){if(e.charAt(u-1)&&n(e.charAt(u-1))||!o){u+=1;continue}if(0===l){t();u+=1;continue}i=" "}else if("("===i)l+=1;else if(")"===i)l-=1;else{if(","===i){t();r();u+=1;continue}if("/"===i&&"*"===e.charAt(u+1)){c=!0;u+=2;continue}}o+=i;u+=1}}}(e);i=r.length;for(t=0;t<i;t++){o=r[t];a=o[o.length-1];if(function(e){return!!(l.test(e)&&parseFloat(e)>=0)||(!!u.test(e)||("0"===e||"-0"===e||"+0"===e))}(a)){s=a;o.pop();if(0===o.length)return s;o=o.join(" ");if(y.matchesMedia(o))return s}}return"100vw"}t.createElement("picture");var f,h,m,y={},g=!1,v=function(){},_=t.createElement("img"),b=_.getAttribute,w=_.setAttribute,x=_.removeAttribute,M=t.documentElement,S={},k={algorithm:""},T=navigator.userAgent,A=/rident/.test(T)||/ecko/.test(T)&&T.match(/rv\:(\d+)/)&&RegExp.$1>35,E="currentSrc",P=/\s+\+?\d+(e\d+)?w/,O=/(\([^)]+\))?\s*(.+)/,j=e.picturefillCFG,D="font-size:100%!important;",C=!0,L={},I={},R=e.devicePixelRatio,Y={px:1,in:96},N=t.createElement("a"),F=!1,W=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,q=/^[^ \t\n\r\u000c]+/,H=/[,]+$/,V=/^\d+$/,B=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,z=function(e,t,r,n){e.addEventListener?e.addEventListener(t,r,n||!1):e.attachEvent&&e.attachEvent("on"+t,r)},K=function(e){var t={};return function(r){r in t||(t[r]=e(r));return t[r]}},$=function(){var e=/^([\d\.]+)(em|vw|px)$/,t=function(){for(var e=arguments,t=0,r=e[0];++t in e;)r=r.replace(e[t],e[++t]);return r},r=K(function(e){return"return "+t((e||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(t,n){var i;if(!(t in L)){L[t]=!1;if(n&&(i=t.match(e)))L[t]=i[1]*Y[i[2]];else try{L[t]=new Function("e",r(t))(Y)}catch(e){}}return L[t]}}(),G=function(e,t){if(e.w){e.cWidth=y.calcListLength(t||"100vw");e.res=e.w/e.cWidth}else e.res=e.d;return e},J=function(e){if(g){var r,n,i,o=e||{};if(o.elements&&1===o.elements.nodeType)if("IMG"===o.elements.nodeName.toUpperCase())o.elements=[o.elements];else{o.context=o.elements;o.elements=null}r=o.elements||y.qsa(o.context||t,o.reevaluate||o.reselect?y.sel:y.selShort);if(i=r.length){y.setupRun(o);F=!0;for(n=0;n<i;n++)y.fillImg(r[n],o);y.teardownRun(o)}}};e.console&&console.warn?function(e){console.warn(e)}:v;E in _||(E="src");S["image/jpeg"]=!0;S["image/gif"]=!0;S["image/png"]=!0;S["image/svg+xml"]=t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");y.ns=("pf"+(new Date).getTime()).substr(0,9);y.supSrcset="srcset"in _;y.supSizes="sizes"in _;y.supPicture=!!e.HTMLPictureElement;y.supSrcset&&y.supPicture&&!y.supSizes&&function(e){_.srcset="data:,a";e.src="data:,a";y.supSrcset=_.complete===e.complete;y.supPicture=y.supSrcset&&y.supPicture}(t.createElement("img"));y.supSrcset&&!y.supSizes?function(){var e="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",r=t.createElement("img"),n=function(){2===r.width&&(y.supSizes=!0);h=y.supSrcset&&!y.supSizes;g=!0;setTimeout(J)};r.onload=n;r.onerror=n;r.setAttribute("sizes","9px");r.srcset=e+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 9w";r.src=e}():g=!0;y.selShort="picture>img,img[srcset]";y.sel=y.selShort;y.cfg=k;y.DPR=R||1;y.u=Y;y.types=S;y.setSize=v;y.makeUrl=K(function(e){N.href=e;return N.href});y.qsa=function(e,t){return"querySelector"in e?e.querySelectorAll(t):[]};y.matchesMedia=function(){e.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?y.matchesMedia=function(e){return!e||matchMedia(e).matches}:y.matchesMedia=y.mMQ;return y.matchesMedia.apply(this,arguments)};y.mMQ=function(e){return!e||$(e)};y.calcLength=function(e){var t=$(e,!0)||!1;t<0&&(t=!1);return t};y.supportsType=function(e){return!e||S[e]};y.parseSize=K(function(e){var t=(e||"").match(O);return{media:t&&t[1],length:t&&t[2]}});y.parseSet=function(e){e.cands||(e.cands=d(e.srcset,e));return e.cands};y.getEmValue=function(){var e;if(!f&&(e=t.body)){var r=t.createElement("div"),n=M.style.cssText,i=e.style.cssText;r.style.cssText="position:absolute;
41left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)";M.style.cssText=D;e.style.cssText=D;e.appendChild(r);f=r.offsetWidth;e.removeChild(r);f=parseFloat(f,10);M.style.cssText=n;e.style.cssText=i}return f||16};y.calcListLength=function(e){if(!(e in I)||k.uT){var t=y.calcLength(p(e));I[e]=t||Y.width}return I[e]};y.setRes=function(e){var t;if(e){t=y.parseSet(e);for(var r=0,n=t.length;r<n;r++)G(t[r],e.sizes)}return t};y.setRes.res=G;y.applySetCandidate=function(e,t){if(e.length){var r,n,i,a,u,c,d,p,f,h=t[y.ns],m=y.DPR;c=h.curSrc||t[E];d=h.curCan||l(t,c,e[0].set);if(d&&d.set===e[0].set){f=A&&!t.complete&&d.res-.1>m;if(!f){d.cached=!0;d.res>=m&&(u=d)}}if(!u){e.sort(s);a=e.length;u=e[a-1];for(n=0;n<a;n++){r=e[n];if(r.res>=m){i=n-1;u=e[i]&&(f||c!==y.makeUrl(r.url))&&o(e[i].res,r.res,m,e[i].cached)?e[i]:r;break}}}if(u){p=y.makeUrl(u.url);h.curSrc=p;h.curCan=u;p!==c&&y.setSrc(t,u);y.setSize(t)}}};y.setSrc=function(e,t){var r;e.src=t.url;if("image/svg+xml"===t.set.type){r=e.style.width;e.style.width=e.offsetWidth+1+"px";e.offsetWidth+1&&(e.style.width=r)}};y.getSet=function(e){var t,r,n,i=!1,o=e[y.ns].sets;for(t=0;t<o.length&&!i;t++){r=o[t];if(r.srcset&&y.matchesMedia(r.media)&&(n=y.supportsType(r.type))){"pending"===n&&(r=n);i=r;break}}return i};y.parseSets=function(e,t,r){var n,i,o,a,s=t&&"PICTURE"===t.nodeName.toUpperCase(),l=e[y.ns];if(void 0===l.src||r.src){l.src=b.call(e,"src");l.src?w.call(e,"data-pfsrc",l.src):x.call(e,"data-pfsrc")}if(void 0===l.srcset||r.srcset||!y.supSrcset||e.srcset){n=b.call(e,"srcset");l.srcset=n;a=!0}l.sets=[];if(s){l.pic=!0;c(t,l.sets)}if(l.srcset){i={srcset:l.srcset,sizes:b.call(e,"sizes")};l.sets.push(i);o=(h||l.src)&&P.test(l.srcset||"");if(!o&&l.src&&!u(l.src,i)&&!i.has1x){i.srcset+=", "+l.src;i.cands.push({url:l.src,d:1,set:i})}}else l.src&&l.sets.push({srcset:l.src,sizes:null});l.curCan=null;l.curSrc=void 0;l.supported=!(s||i&&!y.supSrcset||o&&!y.supSizes);if(a&&y.supSrcset&&!l.supported)if(n){w.call(e,"data-pfsrcset",n);e.srcset=""}else x.call(e,"data-pfsrcset");l.supported&&!l.srcset&&(!l.src&&e.src||e.src!==y.makeUrl(l.src))&&(null===l.src?e.removeAttribute("src"):e.src=l.src);l.parsed=!0};y.fillImg=function(e,t){var r,n=t.reselect||t.reevaluate;e[y.ns]||(e[y.ns]={});r=e[y.ns];if(n||r.evaled!==m){r.parsed&&!t.reevaluate||y.parseSets(e,e.parentNode,t);r.supported?r.evaled=m:a(e)}};y.setupRun=function(){F&&!C&&R===e.devicePixelRatio||i()};if(y.supPicture){J=v;y.fillImg=v}else!function(){var r,n=e.attachEvent?/d$|^c/:/d$|^c|^i/,i=function(){var e=t.readyState||"";o=setTimeout(i,"loading"===e?200:999);if(t.body){y.fillImgs();r=r||n.test(e);r&&clearTimeout(o)}},o=setTimeout(i,t.body?9:99),a=M.clientHeight,s=function(){C=Math.max(e.innerWidth||0,M.clientWidth)!==Y.width||M.clientHeight!==a;a=M.clientHeight;C&&y.fillImgs()};z(e,"resize",function(e,t){var r,n,i=function(){var o=new Date-n;if(o<t)r=setTimeout(i,t-o);else{r=null;e()}};return function(){n=new Date;r||(r=setTimeout(i,t))}}(s,99));z(t,"readystatechange",i)}();y.picturefill=J;y.fillImgs=J;y.teardownRun=v;J._=y;e.picturefillCFG={pf:y,push:function(e){var t=e.shift();if("function"==typeof y[t])y[t].apply(y,e);else{k[t]=e[0];F&&y.fillImgs({reselect:!0})}}};for(;j&&j.length;)e.picturefillCFG.push(j.shift());e.picturefill=J;"object"==typeof module&&"object"==typeof module.exports?module.exports=J:"function"==typeof define&&define.amd&&define("picturefill",[],function(){return J});y.supPicture||(S["image/webp"]=function(t,r){var n=new e.Image;n.onerror=function(){S[t]=!1;J()};n.onload=function(){S[t]=1===n.width;J()};n.src=r;return"pending"
42}("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);define("picturefill/dist/picturefill",function(){});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/jquery/picturefill",["require","exports","picturefill"],e)}(function(e,t){"use strict";
42Object.defineProperty(t,"__esModule",{value:!0});var r;e("picturefill");!function(e){function t(){document.createElement("picture")}e.initialize=t}(r||(r={}));t.default=r});!function(e){function t(e){var t=e.length,n=r.type(e);return"function"!==n&&!r.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}if(!e.jQuery){var r=function(e,t){return new r.fn.init(e,t)};r.isWindow=function(e){return null!=e&&e==e.window};r.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?i[a.call(e)]||"object":typeof e};r.isArray=Array.isArray||function(e){return"array"===r.type(e)};r.isPlainObject=function(e){var t;if(!e||"object"!==r.type(e)||e.nodeType||r.isWindow(e))return!1;try{if(e.constructor&&!o.call(e,"constructor")&&!o.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(t in e);return void 0===t||o.call(e,t)};r.each=function(e,r,n){var i,o=0,a=e.length,s=t(e);if(n)if(s)for(;o<a;o++){i=r.apply(e[o],n);if(!1===i)break}else for(o in e){i=r.apply(e[o],n);if(!1===i)break}else if(s)for(;o<a;o++){i=r.call(e[o],o,e[o]);if(!1===i)break}else for(o in e){i=r.call(e[o],o,e[o]);if(!1===i)break}return e};r.data=function(e,t,i){if(void 0===i){var o=e[r.expando],a=o&&n[o];if(void 0===t)return a;
42if(a&&t in a)return a[t]}else if(void 0!==t){var o=e[r.expando]||(e[r.expando]=++r.uuid);n[o]=n[o]||{};n[o][t]=i;return i}};r.removeData=function(e,t){var i=e[r.expando],o=i&&n[i];o&&r.each(t,function(e,t){delete o[t]})};r.extend=function(){var e,t,n,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;if("boolean"==typeof s){c=s;s=arguments[l]||{};l++}"object"!=typeof s&&"function"!==r.type(s)&&(s={});if(l===u){s=this;l--}for(;l<u;l++)if(null!=(o=arguments[l]))for(i in o){e=s[i];n=o[i];if(s!==n)if(c&&n&&(r.isPlainObject(n)||(t=r.isArray(n)))){if(t){t=!1;a=e&&r.isArray(e)?e:[]}else a=e&&r.isPlainObject(e)?e:{};s[i]=r.extend(c,a,n)}else void 0!==n&&(s[i]=n)}return s};r.queue=function(e,n,i){if(e){n=(n||"fx")+"queue";var o=r.data(e,n);if(!i)return o||[];!o||r.isArray(i)?o=r.data(e,n,function(e,r){var n=r||[];null!=e&&(t(Object(e))?function(e,t){for(var r=+t.length,n=0,i=e.length;n<r;)e[i++]=t[n++];if(r!==r)for(;void 0!==t[n];)e[i++]=t[n++];e.length=i}(n,"string"==typeof e?[e]:e):[].push.call(n,e));return n}(i)):o.push(i);return o}};r.dequeue=function(e,t){r.each(e.nodeType?[e]:e,function(e,n){t=t||"fx";var i=r.queue(n,t),o=i.shift();"inprogress"===o&&(o=i.shift());if(o){"fx"===t&&i.unshift("inprogress");o.call(n,function(){r.dequeue(n,t)})}})};r.fn=r.prototype={init:function(e){if(e.nodeType){this[0]=e;return this}throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function e(){for(var e=this.offsetParent||document;e&&"html"===!e.nodeType.toLowerCase&&"static"===e.style.position;)e=e.offsetParent;return e||document}var t=this[0],e=e.apply(t),n=this.offset(),i=/^(?:body|html)$/i.test(e.nodeName)?{top:0,left:0}:r(e).offset();n.top-=parseFloat(t.style.marginTop)||0;n.left-=parseFloat(t.style.marginLeft)||0;if(e.style){i.top+=parseFloat(e.style.borderTopWidth)||0;i.left+=parseFloat(e.style.borderLeftWidth)||0}return{top:n.top-i.top,left:n.left-i.left}}};var n={};r.expando="velocity"+(new Date).getTime();r.uuid=0;for(var i={},o=i.hasOwnProperty,a=i.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<s.length;l++)i["[object "+s[l]+"]"]=s[l].toLowerCase();r.fn.init.prototype=r.fn;e.Velocity={Utilities:r}}}(window);!function(e){"object"==typeof module&&"object"==typeof module.exports?module.exports=e():"function"==typeof define&&define.amd?define("velocity-animate/velocity",e):e()}(function(){return function(e,t,r,n){function i(e){for(var t=-1,r=e?e.length:0,n=[];++t<r;){var i=e[t];i&&n.push(i)}return n}function o(e){m.isWrapped(e)?e=[].slice.call(e):m.isNode(e)&&(e=[e]);return e}function a(e){var t=p.data(e,"velocity");return null===t?n:t}function s(e){return function(t){return Math.round(t*e)*(1/e)}}function l(e,r,n,i){function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,r){return((o(t,r)*e+a(t,r))*e+s(t))*e}function u(e,t,r){return 3*o(t,r)*e*e+2*a(t,r)*e+s(t)}function c(t,r){for(var i=0;i<m;++i){var o=u(r,e,n);if(0===o)return r;r-=(l(r,e,n)-t)/o}return r}function d(){for(var t=0;t<_;++t)M[t]=l(t*b,e,n)}function p(t,r,i){var o,a,s=0;do{a=r+(i-r)/2;o=l(a,e,n)-t;o>0?i=a:r=a}while(Math.abs(o)>g&&++s<v);return a}function f(t){for(var r=0,i=1,o=_-1;i!=o&&M[i]<=t;++i)r+=b;--i;var a=(t-M[i])/(M[i+1]-M[i]),s=r+a*b,l=u(s,e,n);return l>=y?c(t,s):0==l?s:p(t,r,r+b)}function h(){S=!0;e==r&&n==i||d()}var m=4,y=.001,g=1e-7,v=10,_=11,b=1/(_-1),w="Float32Array"in t;if(4!==arguments.length)return!1;for(var x=0;x<4;++x)if("number"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;e=Math.min(e,1);n=Math.min(n,1);e=Math.max(e,0);n=Math.max(n,0);var M=w?new Float32Array(_):new Array(_),S=!1,k=function(t){S||h();return e===r&&n===i?t:0===t?0:1===t?1:l(f(t),r,i)};k.getControlPoints=function(){return[{x:e,y:r},{x:n,y:i}]};var T="generateBezier("+[e,r,n,i]+")";k.toString=function(){return T};return k}function u(e,t){var r=e;m.isString(e)?_.Easings[e]||(r=!1):r=m.isArray(e)&&1===e.length?s.apply(null,e):m.isArray(e)&&2===e.length?b.apply(null,e.concat([t])):!(!m.isArray(e)||4!==e.length)&&l.apply(null,e);!1===r&&(r=_.Easings[_.defaults.easing]?_.defaults.easing:v);return r}function c(e){if(e){var t=(new Date).getTime(),r=_.State.calls.length;r>1e4&&(_.State.calls=i(_.State.calls));for(var o=0;o<r;o++)if(_.State.calls[o]){var s=_.State.calls[o],l=s[0],u=s[2],f=s[3],h=!!f,y=null;f||(f=_.State.calls[o][3]=t-16);for(var g=Math.min((t-f)/u.duration,1),v=0,b=l.length;v<b;v++){var x=l[v],S=x.element;if(a(S)){var k=!1;if(u.display!==n&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var T=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];p.each(T,function(e,t){w.setPropertyValue(S,"display",t)})}w.setPropertyValue(S,"display",u.display)}
42u.visibility!==n&&"hidden"!==u.visibility&&w.setPropertyValue(S,"visibility",u.visibility);for(var A in x)if("element"!==A){var E,P=x[A],O=m.isString(P.easing)?_.Easings[P.easing]:P.easing;if(1===g)E=P.endValue;else{var j=P.endValue-P.startValue;E=P.startValue+j*O(g,u,j);if(!h&&E===P.currentValue)continue}P.currentValue=E;if("tween"===A)y=E;else{if(w.Hooks.registered[A]){var D=w.Hooks.getRoot(A),C=a(S).rootPropertyValueCache[D];C&&(P.rootPropertyValue=C)}var L=w.setPropertyValue(S,A,P.currentValue+(0===parseFloat(E)?"":P.unitType),P.rootPropertyValue,P.scrollData);w.Hooks.registered[A]&&(w.Normalizations.registered[D]?a(S).rootPropertyValueCache[D]=w.Normalizations.registered[D]("extract",null,L[1]):a(S).rootPropertyValueCache[D]=L[1]);"transform"===L[0]&&(k=!0)}}if(u.mobileHA&&a(S).transformCache.translate3d===n){a(S).transformCache.translate3d="(0px, 0px, 0px)";k=!0}k&&w.flushTransformCache(S)}}u.display!==n&&"none"!==u.display&&(_.State.calls[o][2].display=!1);u.visibility!==n&&"hidden"!==u.visibility&&(_.State.calls[o][2].visibility=!1);u.progress&&u.progress.call(s[1],s[1],g,Math.max(0,f+u.duration-t),f,y);1===g&&d(o)}}_.State.isTicking&&M(c)}function d(e,t){if(!_.State.calls[e])return!1;for(var r=_.State.calls[e][0],i=_.State.calls[e][1],o=_.State.calls[e][2],s=_.State.calls[e][4],l=!1,u=0,c=r.length;u<c;u++){var d=r[u].element;if(!t&&!o.loop){"none"===o.display&&w.setPropertyValue(d,"display",o.display);"hidden"===o.visibility&&w.setPropertyValue(d,"visibility",o.visibility)}if(!0!==o.loop&&(p.queue(d)[1]===n||!/\.velocityQueueEntryFlag/i.test(p.queue(d)[1]))&&a(d)){a(d).isAnimating=!1;a(d).rootPropertyValueCache={};var f=!1;p.each(w.Lists.transforms3D,function(e,t){var r=/^scale/.test(t)?1:0,i=a(d).transformCache[t];if(a(d).transformCache[t]!==n&&new RegExp("^\\("+r+"[^.]").test(i)){f=!0;delete a(d).transformCache[t]}});if(o.mobileHA){f=!0;delete a(d).transformCache.translate3d}f&&w.flushTransformCache(d);w.Values.removeClass(d,"velocity-animating")}if(!t&&o.complete&&!o.loop&&u===c-1)try{o.complete.call(i,i)}catch(e){setTimeout(function(){throw e},1)}s&&!0!==o.loop&&s(i);if(a(d)&&!0===o.loop&&!t){p.each(a(d).tweensContainer,function(e,t){if(/^rotate/.test(e)&&360===parseFloat(t.endValue)){t.endValue=0;t.startValue=360}if(/^backgroundPosition/.test(e)&&100===parseFloat(t.endValue)&&"%"===t.unitType){t.endValue=0;t.startValue=100}});_(d,"reverse",{loop:!0,delay:o.delay})}!1!==o.queue&&p.dequeue(d,o.queue)}_.State.calls[e]=!1;for(var h=0,m=_.State.calls.length;h<m;h++)if(!1!==_.State.calls[h]){l=!0;break}if(!1===l){_.State.isTicking=!1;delete _.State.calls;_.State.calls=[]}}var p,f=function(){if(r.documentMode)return r.documentMode;for(var e=7;e>4;e--){var t=r.createElement("div");t.innerHTML="\x3c!--[if IE "+e+"]><span></span><![endif]--\x3e";if(t.getElementsByTagName("span").length){t=null;return e}}return n}(),h=function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var r,n=(new Date).getTime();r=Math.max(0,16-(n-e));e=n+r;return setTimeout(function(){t(n+r)},r)}}(),m={isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isNodeList:function(e){return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&e.length!==n&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},isWrapped:function(e){return e&&(e.jquery||t.Zepto&&t.Zepto.zepto.isZ(e))},isSVG:function(e){return t.SVGElement&&e instanceof t.SVGElement},isEmptyObject:function(e){for(var t in e)return!1;return!0}},y=!1;if(e.fn&&e.fn.jquery){p=e;y=!0}else p=t.Velocity.Utilities;if(f<=8&&!y)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(!(f<=7)){var g=400,v="swing",_={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:r.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,
42calls:[]},CSS:{},Utilities:p,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:g,easing:v,begin:n,complete:n,progress:n,display:n,visibility:n,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){p.data(e,"velocity",{isSVG:m.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};if(t.pageYOffset!==n){_.State.scrollAnchor=t;_.State.scrollPropertyLeft="pageXOffset";_.State.scrollPropertyTop="pageYOffset"}else{_.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body;_.State.scrollPropertyLeft="scrollLeft";_.State.scrollPropertyTop="scrollTop"}var b=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,r,n){var i={x:t.x+n.dx*r,v:t.v+n.dv*r,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function r(r,n){var i={dx:r.v,dv:e(r)},o=t(r,.5*n,i),a=t(r,.5*n,o),s=t(r,n,a),l=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);r.x=r.x+l*n;r.v=r.v+u*n;return r}return function e(t,n,i){var o,a,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0;t=parseFloat(t)||500;n=parseFloat(n)||20;i=i||null;l.tension=t;l.friction=n;o=null!==i;if(o){c=e(t,n);a=c/i*.016}else a=.016;for(;;){s=r(s||l,a);u.push(1+s.x);c+=16;if(!(Math.abs(s.x)>1e-4&&Math.abs(s.v)>1e-4))break}return o?function(e){return u[e*(u.length-1)|0]}:c}}();_.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}};p.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(e,t){_.Easings[t[0]]=l.apply(null,t[1])});var w=_.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<w.Lists.colors.length;e++){var t="color"===w.Lists.colors[e]?"0 0 0 1":"255 255 255 1";w.Hooks.templates[w.Lists.colors[e]]=["Red Green Blue Alpha",t]}var r,n,i;if(f)for(r in w.Hooks.templates){n=w.Hooks.templates[r];i=n[0].split(" ");var o=n[1].match(w.RegEx.valueSplit);if("Color"===i[0]){i.push(i.shift());o.push(o.shift());w.Hooks.templates[r]=[i.join(" "),o.join(" ")]}}for(r in w.Hooks.templates){n=w.Hooks.templates[r];i=n[0].split(" ");for(var e in i){var a=r+i[e],s=e;w.Hooks.registered[a]=[r,s]}}},getRoot:function(e){var t=w.Hooks.registered[e];return t?t[0]:e},cleanRootPropertyValue:function(e,t){w.RegEx.valueUnwrap.test(t)&&(t=t.match(w.RegEx.valueUnwrap)[1]);w.Values.isCSSNullValue(t)&&(t=w.Hooks.templates[e][1]);return t},extractValue:function(e,t){var r=w.Hooks.registered[e];if(r){var n=r[0],i=r[1];t=w.Hooks.cleanRootPropertyValue(n,t);return t.toString().match(w.RegEx.valueSplit)[i]}return t},injectValue:function(e,t,r){var n=w.Hooks.registered[e];if(n){var i,o,a=n[0],s=n[1];r=w.Hooks.cleanRootPropertyValue(a,r);i=r.toString().match(w.RegEx.valueSplit);i[s]=t;o=i.join(" ");return o}return r}},Normalizations:{registered:{clip:function(e,t,r){switch(e){case"name":return"clip";case"extract":var n;if(w.RegEx.wrappedValueAlreadyExtracted.test(r))n=r;
42else{n=r.toString().match(w.RegEx.valueUnwrap);n=n?n[1].replace(/,(\s+)?/g," "):r}return n;case"inject":return"rect("+r+")"}},blur:function(e,t,r){switch(e){case"name":return _.State.isFirefox?"filter":"-webkit-filter";case"extract":var n=parseFloat(r);if(!n&&0!==n){var i=r.toString().match(/blur\(([0-9]+[A-z]+)\)/i);n=i?i[1]:0}return n;case"inject":return parseFloat(r)?"blur("+r+")":"none"}},opacity:function(e,t,r){if(f<=8)switch(e){case"name":return"filter";case"extract":var n=r.toString().match(/alpha\(opacity=(.*)\)/i);r=n?n[1]/100:1;return r;case"inject":t.style.zoom=1;return parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(e){case"name":return"opacity";case"extract":case"inject":return r}}},register:function(){f<=9||_.State.isGingerbread||(w.Lists.transformsBase=w.Lists.transformsBase.concat(w.Lists.transforms3D));for(var e=0;e<w.Lists.transformsBase.length;e++)!function(){var t=w.Lists.transformsBase[e];w.Normalizations.registered[t]=function(e,r,i){switch(e){case"name":return"transform";case"extract":return a(r)===n||a(r).transformCache[t]===n?/^scale/i.test(t)?1:0:a(r).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(i);break;case"scal":case"scale":_.State.isAndroid&&a(r).transformCache[t]===n&&i<1&&(i=1);o=!/(\d)$/i.test(i);break;case"skew":case"rotate":o=!/(deg|\d)$/i.test(i)}o||(a(r).transformCache[t]="("+i+")");return a(r).transformCache[t]}}}();for(var e=0;e<w.Lists.colors.length;e++)!function(){var t=w.Lists.colors[e];w.Normalizations.registered[t]=function(e,r,i){switch(e){case"name":return t;case"extract":var o;if(w.RegEx.wrappedValueAlreadyExtracted.test(i))o=i;else{var a,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(i)?a=s[i]!==n?s[i]:s.black:w.RegEx.isHex.test(i)?a="rgb("+w.Values.hexToRgb(i).join(" ")+")":/^rgba?\(/i.test(i)||(a=s.black);o=(a||i).toString().match(w.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}f<=8||3!==o.split(" ").length||(o+=" 1");return o;case"inject":f<=8?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1");return(f<=8?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";(f||_.State.isAndroid&&!_.State.isChrome)&&(t+="|transform");return new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(_.State.prefixMatches[e])return[_.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],r=0,n=t.length;r<n;r++){var i;i=0===r?e:t[r]+e.replace(/^\w/,function(e){return e.toUpperCase()});if(m.isString(_.State.prefixElement.style[i])){_.State.prefixMatches[e]=i;return[i,!0]}}return[e,!1]}},Values:{hexToRgb:function(e){var t,r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;e=e.replace(r,function(e,t,r,n){return t+t+r+r+n+n});t=n.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,r,i,o){function s(e,r){function i(){u&&w.setPropertyValue(e,"display","none")}var l=0;if(f<=8)l=p.css(e,r);else{var u=!1;if(/^(width|height)$/.test(r)&&0===w.getPropertyValue(e,"display")){u=!0;w.setPropertyValue(e,"display",w.Values.getDisplayType(e))}if(!o){if("height"===r&&"border-box"!==w.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(w.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(w.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(w.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(w.getPropertyValue(e,"paddingBottom"))||0);i();return c}if("width"===r&&"border-box"!==w.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var d=e.offsetWidth-(parseFloat(w.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(w.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(w.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(w.getPropertyValue(e,"paddingRight"))||0);i();return d}}var h;h=a(e)===n?t.getComputedStyle(e,null):a(e).computedStyle?a(e).computedStyle:a(e).computedStyle=t.getComputedStyle(e,null);"borderColor"===r&&(r="borderTopColor");l=9===f&&"filter"===r?h.getPropertyValue(r):h[r];""!==l&&null!==l||(l=e.style[r]);i()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(r)){var m=s(e,"position");("fixed"===m||"absolute"===m&&/top|left/i.test(r))&&(l=p(e).position()[r]+"px")}return l}var l;if(w.Hooks.registered[r]){var u=r,c=w.Hooks.getRoot(u);i===n&&(i=w.getPropertyValue(e,w.Names.prefixCheck(c)[0]));w.Normalizations.registered[c]&&(i=w.Normalizations.registered[c]("extract",e,i));l=w.Hooks.extractValue(u,i)}else if(w.Normalizations.registered[r]){var d,h;d=w.Normalizations.registered[r]("name",e);if("transform"!==d){h=s(e,w.Names.prefixCheck(d)[0]);w.Values.isCSSNullValue(h)&&w.Hooks.templates[r]&&(h=w.Hooks.templates[r][1])}l=w.Normalizations.registered[r]("extract",e,h)}if(!/^[\d-]/.test(l))if(a(e)&&a(e).isSVG&&w.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{l=e.getBBox()[r]}catch(e){l=0}else l=e.getAttribute(r);else l=s(e,w.Names.prefixCheck(r)[0]);w.Values.isCSSNullValue(l)&&(l=0);_.debug>=2&&console.log("Get "+r+": "+l);return l},setPropertyValue:function(e,r,n,i,o){var s=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=n:"Left"===o.direction?t.scrollTo(n,o.alternateValue):t.scrollTo(o.alternateValue,n);else if(w.Normalizations.registered[r]&&"transform"===w.Normalizations.registered[r]("name",e)){w.Normalizations.registered[r]("inject",e,n);s="transform";n=a(e).transformCache[r]}else{if(w.Hooks.registered[r]){var l=r,u=w.Hooks.getRoot(r);i=i||w.getPropertyValue(e,u);n=w.Hooks.injectValue(l,n,i);r=u}if(w.Normalizations.registered[r]){n=w.Normalizations.registered[r]("inject",e,n);r=w.Normalizations.registered[r]("name",e)}s=w.Names.prefixCheck(r)[0];if(f<=8)try{e.style[s]=n}catch(e){_.debug&&console.log("Browser does not support ["+n+"] for ["+s+"]")}else a(e)&&a(e).isSVG&&w.Names.SVGAttribute(r)?e.setAttribute(r,n):e.style[s]=n;_.debug>=2&&console.log("Set "+r+" ("+s+"): "+n)}return[s,n]},flushTransformCache:function(e){function t(t){return parseFloat(w.getPropertyValue(e,t))}
42var r="";if((f||_.State.isAndroid&&!_.State.isChrome)&&a(e).isSVG){var n={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]};p.each(a(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate");if(n[e]){r+=e+"("+n[e].join(" ")+") ";delete n[e]}})}else{var i,o;p.each(a(e).transformCache,function(t){i=a(e).transformCache[t];if("transformPerspective"===t){o=i;return!0}9===f&&"rotateZ"===t&&(t="rotate");r+=t+i+" "});o&&(r="perspective"+o+" "+r)}w.setPropertyValue(e,"transform",r)}};w.Hooks.register();w.Normalizations.register();_.hook=function(e,t,r){var i=n;e=o(e);p.each(e,function(e,o){a(o)===n&&_.init(o);if(r===n)i===n&&(i=_.CSS.getPropertyValue(o,t));else{var s=_.CSS.setPropertyValue(o,t,r);"transform"===s[0]&&_.CSS.flushTransformCache(o);i=s}});return i};var x=function(){function e(){return s?A.promise||null:l}function i(){function e(e){function d(e,t){var r=n,i=n,a=n;if(m.isArray(e)){r=e[0];if(!m.isArray(e[1])&&/^[\d-]/.test(e[1])||m.isFunction(e[1])||w.RegEx.isHex.test(e[1]))a=e[1];else if(m.isString(e[1])&&!w.RegEx.isHex.test(e[1])||m.isArray(e[1])){i=t?e[1]:u(e[1],s.duration);e[2]!==n&&(a=e[2])}}else r=e;t||(i=i||s.easing);m.isFunction(r)&&(r=r.call(o,S,M));
42m.isFunction(a)&&(a=a.call(o,S,M));return[r||0,i,a]}function f(e,t){var r,n;n=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(e){r=e;return""});r||(r=w.Values.getUnitType(e));return[n,r]}if(s.begin&&0===S)try{s.begin.call(h,h)}catch(e){setTimeout(function(){throw e},1)}if("scroll"===E){var g,b,x,k=/^x$/i.test(s.axis)?"Left":"Top",T=parseFloat(s.offset)||0;if(s.container)if(m.isWrapped(s.container)||m.isNode(s.container)){s.container=s.container[0]||s.container;g=s.container["scroll"+k];x=g+p(o).position()[k.toLowerCase()]+T}else s.container=null;else{g=_.State.scrollAnchor[_.State["scrollProperty"+k]];b=_.State.scrollAnchor[_.State["scrollProperty"+("Left"===k?"Top":"Left")]];x=p(o).offset()[k.toLowerCase()]+T}l={scroll:{rootPropertyValue:!1,startValue:g,currentValue:g,endValue:x,unitType:"",easing:s.easing,scrollData:{container:s.container,direction:k,alternateValue:b}},element:o};_.debug&&console.log("tweensContainer (scroll): ",l.scroll,o)}else if("reverse"===E){if(!a(o).tweensContainer){p.dequeue(o,s.queue);return}"none"===a(o).opts.display&&(a(o).opts.display="auto");"hidden"===a(o).opts.visibility&&(a(o).opts.visibility="visible");a(o).opts.loop=!1;a(o).opts.begin=null;a(o).opts.complete=null;v.easing||delete s.easing;v.duration||delete s.duration;s=p.extend({},a(o).opts,s);var P=p.extend(!0,{},a(o).tweensContainer);for(var O in P)if("element"!==O){var j=P[O].startValue;P[O].startValue=P[O].currentValue=P[O].endValue;P[O].endValue=j;m.isEmptyObject(v)||(P[O].easing=s.easing);_.debug&&console.log("reverse tweensContainer ("+O+"): "+JSON.stringify(P[O]),o)}l=P}else if("start"===E){var P;a(o).tweensContainer&&!0===a(o).isAnimating&&(P=a(o).tweensContainer);p.each(y,function(e,t){if(RegExp("^"+w.Lists.colors.join("$|^")+"$").test(e)){var r=d(t,!0),i=r[0],o=r[1],a=r[2];if(w.RegEx.isHex.test(i)){for(var s=["Red","Green","Blue"],l=w.Values.hexToRgb(i),u=a?w.Values.hexToRgb(a):n,c=0;c<s.length;c++){var p=[l[c]];o&&p.push(o);u!==n&&p.push(u[c]);y[e+s[c]]=p}delete y[e]}}});for(var D in y){var C=d(y[D]),R=C[0],Y=C[1],N=C[2];D=w.Names.camelCase(D);var F=w.Hooks.getRoot(D),W=!1;if(a(o).isSVG||"tween"===F||!1!==w.Names.prefixCheck(F)[1]||w.Normalizations.registered[F]!==n){(s.display!==n&&null!==s.display&&"none"!==s.display||s.visibility!==n&&"hidden"!==s.visibility)&&/opacity|filter/.test(D)&&!N&&0!==R&&(N=0);if(s._cacheValues&&P&&P[D]){N===n&&(N=P[D].endValue+P[D].unitType);W=a(o).rootPropertyValueCache[F]}else if(w.Hooks.registered[D])if(N===n){W=w.getPropertyValue(o,F);N=w.getPropertyValue(o,D,W)}else W=w.Hooks.templates[F][1];else N===n&&(N=w.getPropertyValue(o,D));var U,q,H,V=!1;U=f(D,N);N=U[0];H=U[1];U=f(D,R);R=U[0].replace(/^([+-\/*])=/,function(e,t){V=t;return""});q=U[1];N=parseFloat(N)||0;R=parseFloat(R)||0;if("%"===q)if(/^(fontSize|lineHeight)$/.test(D)){R/=100;q="em"}else if(/^scale/.test(D)){R/=100;q=""}else if(/(Red|Green|Blue)$/i.test(D)){R=R/100*255;q=""}if(/[\/*]/.test(V))q=H;else if(H!==q&&0!==N)if(0===R)q=H;else{i=i||function(){var e={myParent:o.parentNode||r.body,position:w.getPropertyValue(o,"position"),fontSize:w.getPropertyValue(o,"fontSize")},n=e.position===L.lastPosition&&e.myParent===L.lastParent,i=e.fontSize===L.lastFontSize;L.lastParent=e.myParent;L.lastPosition=e.position;L.lastFontSize=e.fontSize;var s={};if(i&&n){s.emToPx=L.lastEmToPx;s.percentToPxWidth=L.lastPercentToPxWidth;s.percentToPxHeight=L.lastPercentToPxHeight}else{var l=a(o).isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");_.init(l);e.myParent.appendChild(l);p.each(["overflow","overflowX","overflowY"],function(e,t){_.CSS.setPropertyValue(l,t,"hidden")});_.CSS.setPropertyValue(l,"position",e.position);_.CSS.setPropertyValue(l,"fontSize",e.fontSize);_.CSS.setPropertyValue(l,"boxSizing","content-box");p.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(e,t){_.CSS.setPropertyValue(l,t,"100%")});_.CSS.setPropertyValue(l,"paddingLeft","100em");s.percentToPxWidth=L.lastPercentToPxWidth=(parseFloat(w.getPropertyValue(l,"width",null,!0))||1)/100;s.percentToPxHeight=L.lastPercentToPxHeight=(parseFloat(w.getPropertyValue(l,"height",null,!0))||1)/100;s.emToPx=L.lastEmToPx=(parseFloat(w.getPropertyValue(l,"paddingLeft"))||1)/100;e.myParent.removeChild(l)}null===L.remToPx&&(L.remToPx=parseFloat(w.getPropertyValue(r.body,"fontSize"))||16);if(null===L.vwToPx){L.vwToPx=parseFloat(t.innerWidth)/100;
42L.vhToPx=parseFloat(t.innerHeight)/100}s.remToPx=L.remToPx;s.vwToPx=L.vwToPx;s.vhToPx=L.vhToPx;_.debug>=1&&console.log("Unit ratios: "+JSON.stringify(s),o);return s}();var B=/margin|padding|left|right|width|text|word|letter/i.test(D)||/X$/.test(D)||"x"===D?"x":"y";switch(H){case"%":N*="x"===B?i.percentToPxWidth:i.percentToPxHeight;break;case"px":break;default:N*=i[H+"ToPx"]}switch(q){case"%":N*=1/("x"===B?i.percentToPxWidth:i.percentToPxHeight);break;case"px":break;default:N*=1/i[q+"ToPx"]}}switch(V){case"+":R=N+R;break;case"-":R=N-R;break;case"*":R*=N;break;case"/":R=N/R}l[D]={rootPropertyValue:W,startValue:N,currentValue:N,endValue:R,unitType:q,easing:Y};_.debug&&console.log("tweensContainer ("+D+"): "+JSON.stringify(l[D]),o)}else _.debug&&console.log("Skipping ["+F+"] due to a lack of browser support.")}l.element=o}if(l.element){w.Values.addClass(o,"velocity-animating");I.push(l);if(""===s.queue){a(o).tweensContainer=l;a(o).opts=s}a(o).isAnimating=!0;if(S===M-1){_.State.calls.push([I,h,s,null,A.resolver]);if(!1===_.State.isTicking){_.State.isTicking=!0;c()}}else S++}}var i,o=this,s=p.extend({},_.defaults,v),l={};a(o)===n&&_.init(o);parseFloat(s.delay)&&!1!==s.queue&&p.queue(o,s.queue,function(e){_.velocityQueueEntryFlag=!0;a(o).delayTimer={setTimeout:setTimeout(e,parseFloat(s.delay)),next:e}});switch(s.duration.toString().toLowerCase()){case"fast":s.duration=200;break;case"normal":s.duration=g;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}if(!1!==_.mock)if(!0===_.mock)s.duration=s.delay=1;else{s.duration*=parseFloat(_.mock)||1;s.delay*=parseFloat(_.mock)||1}s.easing=u(s.easing,s.duration);s.begin&&!m.isFunction(s.begin)&&(s.begin=null);s.progress&&!m.isFunction(s.progress)&&(s.progress=null);s.complete&&!m.isFunction(s.complete)&&(s.complete=null);if(s.display!==n&&null!==s.display){s.display=s.display.toString().toLowerCase();"auto"===s.display&&(s.display=_.CSS.Values.getDisplayType(o))}s.visibility!==n&&null!==s.visibility&&(s.visibility=s.visibility.toString().toLowerCase());s.mobileHA=s.mobileHA&&_.State.isMobile&&!_.State.isGingerbread;!1===s.queue?s.delay?setTimeout(e,s.delay):e():p.queue(o,s.queue,function(t,r){if(!0===r){A.promise&&A.resolver(h);return!0}_.velocityQueueEntryFlag=!0;e(t)});""!==s.queue&&"fx"!==s.queue||"inprogress"===p.queue(o)[0]||p.dequeue(o)}var s,l,f,h,y,v,b=arguments[0]&&(arguments[0].p||p.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||m.isString(arguments[0].properties));if(m.isWrapped(this)){s=!1;f=0;h=this;l=this}else{s=!0;f=1;h=b?arguments[0].elements||arguments[0].e:arguments[0]}h=o(h);if(h){if(b){y=arguments[0].properties||arguments[0].p;v=arguments[0].options||arguments[0].o}else{y=arguments[f];v=arguments[f+1]}var M=h.length,S=0;if(!/^(stop|finish|finishAll)$/i.test(y)&&!p.isPlainObject(v)){var k=f+1;v={}
43;for(var T=k;T<arguments.length;T++)m.isArray(arguments[T])||!/^(fast|normal|slow)$/i.test(arguments[T])&&!/^\d/.test(arguments[T])?m.isString(arguments[T])||m.isArray(arguments[T])?v.easing=arguments[T]:m.isFunction(arguments[T])&&(v.complete=arguments[T]):v.duration=arguments[T]}var A={promise:null,resolver:null,rejecter:null};s&&_.Promise&&(A.promise=new _.Promise(function(e,t){A.resolver=e;A.rejecter=t}));var E;switch(y){case"scroll":E="scroll";break;case"reverse":E="reverse";break;case"finish":case"finishAll":case"stop":p.each(h,function(e,t){if(a(t)&&a(t).delayTimer){clearTimeout(a(t).delayTimer.setTimeout);a(t).delayTimer.next&&a(t).delayTimer.next();delete a(t).delayTimer}if("finishAll"===y&&(!0===v||m.isString(v))){p.each(p.queue(t,m.isString(v)?v:""),function(e,t){m.isFunction(t)&&t()});p.queue(t,m.isString(v)?v:"",[])}});var P=[];p.each(_.State.calls,function(e,t){t&&p.each(t[1],function(r,i){var o=v===n?"":v;if(!0!==o&&t[2].queue!==o&&(v!==n||!1!==t[2].queue))return!0;p.each(h,function(r,n){if(n===i){if(!0===v||m.isString(v)){p.each(p.queue(n,m.isString(v)?v:""),function(e,t){m.isFunction(t)&&t(null,!0)});p.queue(n,m.isString(v)?v:"",[])}if("stop"===y){a(n)&&a(n).tweensContainer&&!1!==o&&p.each(a(n).tweensContainer,function(e,t){t.endValue=t.currentValue});P.push(e)}else"finish"!==y&&"finishAll"!==y||(t[2].duration=1)}})})});if("stop"===y){p.each(P,function(e,t){d(t,!0)});A.promise&&A.resolver(h)}return e();default:if(!p.isPlainObject(y)||m.isEmptyObject(y)){if(m.isString(y)&&_.Redirects[y]){var O=p.extend({},v),j=O.duration,D=O.delay||0;!0===O.backwards&&(h=p.extend(!0,[],h).reverse());p.each(h,function(e,t){parseFloat(O.stagger)?O.delay=D+parseFloat(O.stagger)*e:m.isFunction(O.stagger)&&(O.delay=D+O.stagger.call(t,e,M));if(O.drag){O.duration=parseFloat(j)||(/^(callout|transition)/.test(y)?1e3:g);O.duration=Math.max(O.duration*(O.backwards?1-e/M:(e+1)/M),.75*O.duration,200)}_.Redirects[y].call(t,t,O||{},e,M,h,A.promise?A:n)});return e()}var C="Velocity: First argument ("+y+") was not a property map, a known action, or a registered redirect. Aborting.";A.promise?A.rejecter(new Error(C)):console.log(C);return e()}E="start"}var L={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},I=[];p.each(h,function(e,t){m.isNode(t)&&i.call(t)});var R,O=p.extend({},_.defaults,v);O.loop=parseInt(O.loop);R=2*O.loop-1;if(O.loop)for(var Y=0;Y<R;Y++){var N={delay:O.delay,progress:O.progress};if(Y===R-1){N.display=O.display;N.visibility=O.visibility;N.complete=O.complete}x(h,"reverse",N)}return e()}};_=p.extend(x,_);_.animate=x;var M=t.requestAnimationFrame||h;_.State.isMobile||r.hidden===n||r.addEventListener("visibilitychange",function(){if(r.hidden){M=function(e){return setTimeout(function(){e(!0)},16)};c()}else M=t.requestAnimationFrame||h});e.Velocity=_;if(e!==t){e.fn.velocity=x;e.fn.velocity.defaults=_.defaults}p.each(["Down","Up"],function(e,t){_.Redirects["slide"+t]=function(e,r,i,o,a,s){var l=p.extend({},r),u=l.begin,c=l.complete,d={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},f={};l.display===n&&(l.display="Down"===t?"inline"===_.CSS.Values.getDisplayType(e)?"inline-block":"block":"none");l.begin=function(){u&&u.call(a,a);for(var r in d){f[r]=e.style[r];var n=_.CSS.getPropertyValue(e,r);d[r]="Down"===t?[n,0]:[0,n]}f.overflow=e.style.overflow;e.style.overflow="hidden"};l.complete=function(){for(var t in f)e.style[t]=f[t];
43c&&c.call(a,a);s&&s.resolver(a)};_(e,d,l)}});p.each(["In","Out"],function(e,t){_.Redirects["fade"+t]=function(e,r,i,o,a,s){var l=p.extend({},r),u={opacity:"In"===t?1:0},c=l.complete;l.complete=i!==o-1?l.begin=null:function(){c&&c.call(a,a);s&&s.resolver(a)};l.display===n&&(l.display="In"===t?"auto":"none");_(this,u,l)}});return _}jQuery.fn.velocity=jQuery.fn.animate}(window.jQuery||window.Zepto||window,window,document)});define("velocity-animate",["velocity-animate/velocity"],function(e){return e});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/jquery/velocity",["require","exports","velocity-animate"],e)}(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){function t(){"Velocity"}e.initialize=t}(n||(n={}));t.default=n});!function(e,t){"function"==typeof define&&define.amd?define("croppie/croppie",["exports"],t):t("object"==typeof exports&&"string"!=typeof exports.nodeName?exports:e.commonJsStrict={})}(this,function(e){function t(e){if(e in q)return e;for(var t=e[0].toUpperCase()+e.slice(1),r=U.length;r--;){e=U[r]+t;if(e in q)return e}}function r(e,t){e=e||{};for(var n in t)if(t[n]&&t[n].constructor&&t[n].constructor===Object){e[n]=e[n]||{};r(e[n],t[n])}else e[n]=t[n];return e}function n(e){if("createEvent"in document){var t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0);e.dispatchEvent(t)}else e.fireEvent("onchange")}function i(e,t,r){if("string"==typeof t){var n=t;t={};t[n]=r}for(var i in t)e.style[i]=t[i]}function o(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(t,"")}function s(e){return parseInt(e,10)}function l(e,t){var r=t||new Image;r.style.opacity=0;return new Promise(function(t){if(r.src===e)t(r);else{r.removeAttribute("crossOrigin");e.match(/^https?:\/\/|^\/\//)&&r.setAttribute("crossOrigin","anonymous");r.onload=function(){setTimeout(function(){t(r)},1)};r.src=e}})}function u(e,t){window.EXIF||t(0);EXIF.getData(e,function(){var e=EXIF.getTag(this,"Orientation");t(e)})}function c(e,t,r){var n=t.width,i=t.height,o=e.getContext("2d");e.width=t.width;e.height=t.height;o.save();switch(r){case 2:o.translate(n,0);o.scale(-1,1);break;case 3:o.translate(n,i);o.rotate(180*Math.PI/180);break;case 4:o.translate(0,i);o.scale(1,-1);break;case 5:e.width=i;e.height=n;o.rotate(90*Math.PI/180);o.scale(1,-1);break;case 6:e.width=i;e.height=n;o.rotate(90*Math.PI/180);o.translate(0,-i);break;case 7:e.width=i;e.height=n;o.rotate(-90*Math.PI/180);o.translate(-n,i);o.scale(1,-1);break;case 8:e.width=i;e.height=n;o.translate(0,n);o.rotate(-90*Math.PI/180)}o.drawImage(t,0,0,n,i);
43o.restore()}function d(){var e,t,r,n,a,s=this,l=s.options.viewport.type?"cr-vp-"+s.options.viewport.type:null;s.options.useCanvas=s.options.enableOrientation||p.call(s);s.data={};s.elements={};e=s.elements.boundary=document.createElement("div");t=s.elements.viewport=document.createElement("div");s.elements.img=document.createElement("img");r=s.elements.overlay=document.createElement("div");if(s.options.useCanvas){s.elements.canvas=document.createElement("canvas");s.elements.preview=s.elements.canvas}else s.elements.preview=s.elements.img;o(e,"cr-boundary");n=s.options.boundary.width;a=s.options.boundary.height;i(e,{width:n+(isNaN(n)?"":"px"),height:a+(isNaN(a)?"":"px")});o(t,"cr-viewport");l&&o(t,l);i(t,{width:s.options.viewport.width+"px",height:s.options.viewport.height+"px"});t.setAttribute("tabindex",0);o(s.elements.preview,"cr-image");o(r,"cr-overlay");s.element.appendChild(e);e.appendChild(s.elements.preview);e.appendChild(t);e.appendChild(r);o(s.element,"croppie-container");s.options.customClass&&o(s.element,s.options.customClass);v.call(this);s.options.enableZoom&&h.call(s)}function p(){return this.options.enableExif&&window.EXIF}function f(e){if(this.options.enableZoom){var t=this.elements.zoomer,r=j(e,4);t.value=Math.max(t.min,Math.min(t.max,r))}}function h(){function e(){m.call(r,{value:parseFloat(i.value),origin:new B(r.elements.preview),viewportRect:r.elements.viewport.getBoundingClientRect(),transform:V.parse(r.elements.preview)})}function t(t){var n,i;n=t.wheelDelta?t.wheelDelta/1200:t.deltaY?t.deltaY/1060:t.detail?t.detail/-60:0;i=r._currentZoom+n*r._currentZoom;t.preventDefault();f.call(r,i);e.call(r)}var r=this,n=r.elements.zoomerWrap=document.createElement("div"),i=r.elements.zoomer=document.createElement("input");o(n,"cr-slider-wrap");o(i,"cr-slider");i.type="range";i.step="0.0001";i.value=1;i.style.display=r.options.showZoomer?"":"none";r.element.appendChild(n);n.appendChild(i);r._currentZoom=1;r.elements.zoomer.addEventListener("input",e);r.elements.zoomer.addEventListener("change",e);if(r.options.mouseWheelZoom){r.elements.boundary.addEventListener("mousewheel",t);r.elements.boundary.addEventListener("DOMMouseScroll",t)}}function m(e){function t(){var e={};e[F]=n.toString();e[N]=a.toString();i(r.elements.preview,e)}var r=this,n=e?e.transform:V.parse(r.elements.preview),o=e?e.viewportRect:r.elements.viewport.getBoundingClientRect(),a=e?e.origin:new B(r.elements.preview);r._currentZoom=e?e.value:r._currentZoom;n.scale=r._currentZoom;t();if(r.options.enforceBoundary){var s=y.call(r,o),l=s.translate,u=s.origin;if(n.x>=l.maxX){a.x=u.minX;n.x=l.maxX}if(n.x<=l.minX){a.x=u.maxX;n.x=l.minX}if(n.y>=l.maxY){a.y=u.minY;n.y=l.maxY}if(n.y<=l.minY){a.y=u.maxY;n.y=l.minY}}t();z.call(r);b.call(r)}function y(e){var t=this,r=t._currentZoom,n=e.width,i=e.height,o=t.elements.boundary.clientWidth/2,a=t.elements.boundary.clientHeight/2,s=t.elements.preview.getBoundingClientRect(),l=s.width,u=s.height,c=n/2,d=i/2,p=-1*(c/r-o),f=p-(l*(1/r)-n*(1/r)),h=-1*(d/r-a),m=h-(u*(1/r)-i*(1/r)),y=1/r*c,g=l*(1/r)-y,v=1/r*d;return{translate:{maxX:p,minX:f,maxY:h,minY:m},origin:{maxX:g,minX:y,maxY:u*(1/r)-v,minY:v}}}function g(){var e=this,t=e._currentZoom,r=e.elements.preview.getBoundingClientRect(),n=e.elements.viewport.getBoundingClientRect(),o=V.parse(e.elements.preview.style[F]),a=new B(e.elements.preview),s=n.top-r.top+n.height/2,l=n.left-r.left+n.width/2,u={},c={};u.y=s/t;u.x=l/t;c.y=(u.y-a.y)*(1-t);c.x=(u.x-a.x)*(1-t);o.x-=c.x;o.y-=c.y;var d={};d[N]=u.x+"px "+u.y+"px";d[F]=o.toString();i(e.elements.preview,d)}function v(){function e(e,t){var r=h.elements.preview.getBoundingClientRect(),n=p.y+t,i=p.x+e;if(h.options.enforceBoundary){d.top>r.top+t&&d.bottom<r.bottom+t&&(p.y=n);d.left>r.left+e&&d.right<r.right+e&&(p.x=i)}else{p.y=n;p.x=i}}function t(e){var t=37,n=38,i=39,o=40;if(!e.shiftKey||e.keyCode!=n&&e.keyCode!=o){if(e.keyCode>=37&&e.keyCode<=40){e.preventDefault();var a=function(e){switch(e){case t:return[1,0];case n:return[0,1];case i:return[-1,0];case o:return[0,-1]}}(e.keyCode);p=V.parse(h.elements.preview);document.body.style[W]="none";d=h.elements.viewport.getBoundingClientRect();r(a)}}else{var s=0;s=e.keyCode==n?parseFloat(h.elements.zoomer.value,10)+parseFloat(h.elements.zoomer.step,10):parseFloat(h.elements.zoomer.value,10)-p
43arseFloat(h.elements.zoomer.step,10);h.setZoom(s)}}function r(t){var r=t[0],n=t[1],o={};e(r,n);o[F]=p.toString();i(h.elements.preview,o);_.call(h);document.body.style[W]="";g.call(h);b.call(h);c=0}function o(e){e.preventDefault();if(!m){m=!0;l=e.pageX;u=e.pageY;if(e.touches){var t=e.touches[0];l=t.pageX;u=t.pageY}p=V.parse(h.elements.preview);window.addEventListener("mousemove",a);window.addEventListener("touchmove",a);window.addEventListener("mouseup",s);window.addEventListener("touchend",s);document.body.style[W]="none";d=h.elements.viewport.getBoundingClientRect()}}function a(t){t.preventDefault();var r=t.pageX,o=t.pageY;if(t.touches){var a=t.touches[0];r=a.pageX;o=a.pageY}var s=r-l,d=o-u,m={};if("touchmove"==t.type&&t.touches.length>1){var y=t.touches[0],g=t.touches[1],v=Math.sqrt((y.pageX-g.pageX)*(y.pageX-g.pageX)+(y.pageY-g.pageY)*(y.pageY-g.pageY));c||(c=v/h._currentZoom);var b=v/c;f.call(h,b);n(h.elements.zoomer)}else{e(s,d);m[F]=p.toString();i(h.elements.preview,m);_.call(h);u=o;l=r}}function s(){m=!1;window.removeEventListener("mousemove",a);window.removeEventListener("touchmove",a);window.removeEventListener("mouseup",s);window.removeEventListener("touchend",s);document.body.style[W]="";g.call(h);b.call(h);c=0}var l,u,c,d,p,h=this,m=!1;h.elements.overlay.addEventListener("mousedown",o);h.elements.viewport.addEventListener("keydown",t);h.elements.overlay.addEventListener("touchstart",o)}function _(){var e=this,t=e.elements.boundary.getBoundingClientRect(),r=e.elements.preview.getBoundingClientRect();i(e.elements.overlay,{width:r.width+"px",height:r.height+"px",top:r.top-t.top+"px",left:r.left-t.left+"px"})}function b(){var e,t=this,r=t.get();if(w.call(t)){t.options.update.call(t,r);
43if(t.$&&"undefined"==typeof Prototype)t.$(t.element).trigger("update",r);else{var e;if(window.CustomEvent)e=new CustomEvent("update",{detail:r});else{e=document.createEvent("CustomEvent");e.initCustomEvent("update",!0,!0,r)}t.element.dispatchEvent(e)}}}function w(){return this.elements.preview.offsetHeight>0&&this.elements.preview.offsetWidth>0}function x(){var e,t,r,o,a,s=this,l=0,u=1.5,c=1,d={},p=s.elements.preview,h=s.elements.zoomer,m=new V(0,0,c),y=new B,v=w.call(s);if(v&&!s.data.bound){s.data.bound=!0;d[F]=m.toString();d[N]=y.toString();d.opacity=1;i(p,d);e=p.getBoundingClientRect();t=s.elements.viewport.getBoundingClientRect();r=s.elements.boundary.getBoundingClientRect();s._originalImageWidth=e.width;s._originalImageHeight=e.height;if(s.options.enableZoom){if(s.options.enforceBoundary){o=t.width/e.width;a=t.height/e.height;l=Math.max(o,a)}l>=u&&(u=l+1);h.min=j(l,4);h.max=j(u,4);var b=Math.max(r.width/e.width,r.height/e.height);c=null!==s.data.boundZoom?s.data.boundZoom:b;f.call(s,c);n(h)}else s._currentZoom=c;m.scale=s._currentZoom;d[F]=m.toString();i(p,d);s.data.points.length?M.call(s,s.data.points):S.call(s);g.call(s);_.call(s)}}function M(e){if(4!=e.length)throw"Croppie - Invalid number of points supplied: "+e;var t=this,r=e[2]-e[0],n=t.elements.viewport.getBoundingClientRect(),o=t.elements.boundary.getBoundingClientRect(),a={left:n.left-o.left,top:n.top-o.top},s=n.width/r,l=e[1],u=e[0],c=-1*e[1]+a.top,d=-1*e[0]+a.left,p={};p[N]=u+"px "+l+"px";p[F]=new V(d,c,s).toString();i(t.elements.preview,p);f.call(t,s);t._currentZoom=s}function S(){var e=this,t=e.elements.preview.getBoundingClientRect(),r=e.elements.viewport.getBoundingClientRect(),n=e.elements.boundary.getBoundingClientRect(),o=r.left-n.left,a=r.top-n.top,s=o-(t.width-r.width)/2,l=a-(t.height-r.height)/2,u=new V(s,l,e._currentZoom);i(e.elements.preview,F,u.toString())}function k(e){var t=this,r=t.elements.canvas,n=t.elements.img,i=r.getContext("2d"),o=p.call(t),e=t.options.enableOrientation&&e;i.clearRect(0,0,r.width,r.height);r.width=n.width;r.height=n.height;o?u(n,function(t){c(r,n,s(t,10));e&&c(r,n,e)}):e&&c(r,n,e)}function T(e){var t=this,r=e.points,n=s(r[0]),i=s(r[1]),o=s(r[2]),a=s(r[3]),l=o-n,u=a-i,c=e.circle,d=document.createElement("canvas"),p=d.getContext("2d"),f=l,h=u,m=0,y=0,g=f,v=h,_=e.outputWidth&&e.outputHeight,b=1;if(_){g=e.outputWidth;v=e.outputHeight;b=g/f}d.width=g;d.height=v;if(e.backgroundColor){p.fillStyle=e.backgroundColor;p.fillRect(0,0,f,h)}if(n<0){m=Math.abs(n);n=0}if(i<0){y=Math.abs(i);i=0}if(o>t._originalImageWidth){l=t._originalImageWidth-n;f=l}if(a>t._originalImageHeight){u=t._originalImageHeight-i;h=u}if(1!==b){m*=b;y*=b;f*=b;h*=b}p.drawImage(this.elements.preview,n,i,l,u,m,y,f,h);if(c){p.fillStyle="#fff";p.globalCompositeOperation="destination-in";p.beginPath();p.arc(f/2,h/2,f/2,0,2*Math.PI,!0);p.closePath();p.fill()}return d}function A(e){var t=e.points,r=document.createElement("div"),n=document.createElement("img"),a=t[2]-t[0],s=t[3]-t[1];o(r,"croppie-result");r.appendChild(n);i(n,{left:-1*t[0]+"px",top:-1*t[1]+"px"});n.src=e.url;i(r,{width:a+"px",height:s+"px"});return r}function E(e){return T.call(this,e).toDataURL(e.format,e.quality)}function P(e){var t=this;return new Promise(function(r,n){T.call(t,e).toBlob(function(e){r(e)},e.format,e.quality)})}function O(e,t){var r,n=this,i=[],o=null;if("string"==typeof e){r=e;e={}}else if(Array.isArray(e))i=e.slice();else{if(void 0===e&&n.data.url){x.call(n);b.call(n);return null}r=e.url;i=e.points||[];o=void 0===e.zoom?null:e.zoom}n.data.bound=!1;n.data.url=r||n.data.url;n.data.boundZoom=o;return l(r,n.elements.img).then(function(r){if(i.length){n.options.relative&&(i=[i[0]*r.naturalWidth/100,i[1]*r.naturalHeight/100,i[2]*r.naturalWidth/100,i[3]*r.naturalHeight/100]);n.data.points=i.map(function(e){return parseFloat(e)})}else{var o,a,s=r.naturalWidth,l=r.naturalHeight,u=n.elements.viewport.getBoundingClientRect(),c=u.width/u.height;if(s/l>c){a=l;o=a*c}else{o=s;a=o/c}var d=(s-o)/2,p=(l-a)/2,f=d+o,h=p+a;n.data.points=[d,p,f,h]}if(n.options.useCanvas){n.elements.img.exifdata=null;k.call(n,e.orientation||1)}x.call(n);b.call(n);t&&t()})}function j(e,t){return parseFloat(e).toFixed(t||0)}function D(){var e=this,t=e.elements.preview.getBoundingClientRect(),r=e.elements.viewport.getBoundingClientRect(),n=r.left-t.left,i=r.top-t.top,o=(r.width-e.elements.viewport.offsetWidth)/2,a=(r.height-e.elements.viewport.offsetHeight)/2,s=n+e.elements.viewport.offsetWidth+o,l=i+e.elements.viewport.offsetHeight+a,u=e._currentZoom;(u===1/0||isNaN(u))&&(u=1);var c=e.options.enforceBoundary?0:Number.NEGATIVE_INFINITY;n=Math.max(c,n/u);i=Math.max(c,i/u);s=Math.max(c,s/u);l=Math.max(c,l/u);return{points:[j(n),j(i),j(s),j(l)],zoom:u}}function C(e){var t,n=this,i=D.call(n),o=r(K,r({},e)),a="string"==typeof e?e:o.type||"base64",s=o.size,l=o.format,u=o.quality,c=o.backgroundColor,d="boolean"==typeof o.circle?o.circle:"circle"===n.options.viewport.type,p=n.elements.viewport.getBoundingClientRect(),f=p.width/p.height;if("viewport"===s){i.outputWidth=p.width;i.outputHeight=p.height}else if("object"==typeof s)if(s.width&&s.height){i.outputWidth=s.width;i.outputHeight=s.height}else if(s.width){i.outputWidth=s.width;i.outputHeight=s.width/f}else if(s.height){i.outputWidth=s.height*f;i.outputHeight=s.height}if($.indexOf(l)>-1){i.format="image/"+l;i.quality=u}i.circle=d;i.url=n.data.url;i.backgroundColor=c;t=new Promise(function(e,t){switch(a.toLowerCase()){case"rawcanvas":e(T.call(n,i));break;case"canvas":case"base64":e(E.call(n,i));break;case"blob":P.call(n,i).then(e);break;default:e(A.call(n,i))}});return t}function L(){x.call(this)}function I(e){if(!this.options.useCanvas)throw"Croppie: Cannot rotate without enableOrientation";var t=this,r=t.elements.canvas,n=(t.elements.img,document.createElement("canvas")),i=1;n.width=r.width;n.height=r.height;n.getContext("2d").drawImage(r,0,0);90!==e&&-270!==e||(i=6);-90!==e&&270!==e||(i=8);180!==e&&-180!==e||(i=3);c(r,n,i);m.call(t)}function R(){var e=this;e.element.removeChild(e.elements.boundary);a(e.element,"croppie-container");e.options.enableZoom&&e.element.removeChild(e.elements.zoomerWrap);delete e.elements}function Y(e,t){this.element=e;this.options=r(r({},Y.defaults),t);if("img"===this.element.tagName.toLowerCase()){var n=this.element;o(n,"cr-original-image");var i=document.createElement("div");this.element.parentNode.appendChild(i);i.appendChild(n);this.element=i;this.options.url=this.options.url||n.src}d.call(this);if(this.options.url){var a={url:this.options.url,points:this.options.points};delete this.options.url;delete this.options.points;O.call(this,a)}}"function"!=typeof Promise&&function(e){function t(e,t){return function(){e.apply(t,arguments)}}function r(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,t(i,this),t(o,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void c(function(){var r=t._state?e.onFulfilled:e.onRejected;if(null===r)return void(t._state?e.resolve:e.reject)(t._value);var n;try{n=r(t._value)}catch(t){return void e.reject(t)}e.resolve(n)})}function i(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if("function"==typeof r)return void l(t(r,e),t(i,this),t(o,this))}
43this._state=!0,this._value=e,a.call(this)}catch(e){o.call(this,e)}}function o(e){this._state=!1,this._value=e,a.call(this)}function a(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function s(e,t,r,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n}function l(e,t,r){var n=!1;try{e(function(e){n||(n=!0,t(e))},function(e){n||(n=!0,r(e))})}catch(e){if(n)return;n=!0,r(e)}}var u=setTimeout,c="function"==typeof setImmediate&&setImmediate||function(e){u(e,1)},d=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var i=this;return new r(function(r,o){n.call(i,new s(e,t,r,o))})},r.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&d(arguments[0])?arguments[0]:arguments);return new r(function(t,r){function n(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){n(o,e)},r)}e[o]=a,0==--i&&t(e)}catch(e){r(e)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)n(o,e[o])})},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,r){r(e)})},r.race=function(e){return new r(function(t,r){for(var n=0,i=e.length;i>n;n++)e[n].then(t,r)})},r._setImmediateFn=function(e){c=e},"undefined"!=typeof module&&module.exports?module.exports=r:e.Promise||(e.Promise=r)}(this);"function"!=typeof window.CustomEvent&&function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail);return r}e.prototype=window.Event.prototype;window.CustomEvent=e}();HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,r){for(var n=atob(this.toDataURL(t,r).split(",")[1]),i=n.length,o=new Uint8Array(i),a=0;a<i;a++)o[a]=n.charCodeAt(a);e(new Blob([o],{type:t||"image/png"}))}});var N,F,W,U=["Webkit","Moz","ms"],q=document.createElement("div").style;F=t("transform");N=t("transformOrigin");W=t("userSelect");var H={translate3d:{suffix:", 0px"},translate:{suffix:""}},V=function(e,t,r){this.x=parseFloat(e);this.y=parseFloat(t);this.scale=parseFloat(r)};V.parse=function(e){return e.style?V.parse(e.style[F]):e.indexOf("matrix")>-1||e.indexOf("none")>-1?V.fromMatrix(e):V.fromString(e)};V.fromMatrix=function(e){var t=e.substring(7).split(",");t.length&&"none"!==e||(t=[1,0,0,1,0,0]);return new V(s(t[4]),s(t[5]),parseFloat(t[0]))};V.fromString=function(e){var t=e.split(") "),r=t[0].substring(Y.globals.translate.length+1).split(","),n=t.length>1?t[1].substring(6):1,i=r.length>1?r[0]:0,o=r.length>1?r[1]:0;return new V(i,o,n)};V.prototype.toString=function(){var e=H[Y.globals.translate].suffix||"";return Y.globals.translate+"("+this.x+"px, "+this.y+"px"+e+") scale("+this.scale+")"};var B=function(e){if(e&&e.style[N]){var t=e.style[N].split(" ");this.x=parseFloat(t[0]);this.y=parseFloat(t[1])}else{this.x=0;this.y=0}};B.prototype.toString=function(){return this.x+"px "+this.y+"px"};var z=function(e,t,r){var n;return function(){var i=this,o=arguments,a=function(){n=null;r||e.apply(i,o)},s=r&&!n;clearTimeout(n);n=setTimeout(a,t);s&&e.apply(i,o)}}(_,500),K={type:"canvas",format:"png",quality:1},$=["jpeg","webp","png"];if(window.jQuery){var G=window.jQuery;G.fn.croppie=function(e){if("string"==typeof e){var t=Array.prototype.slice.call(arguments,1),r=G(this).data("croppie");return"get"===e?r.get():"result"===e?r.result.apply(r,t):"bind"===e?r.bind.apply(r,t):this.each(function(){var r=G(this).data("croppie");if(r){var n=r[e];if(!G.isFunction(n))throw"Croppie "+e+" method not found";n.apply(r,t);"destroy"===e&&G(this).removeData("croppie")}})}return this.each(function(){var t=new Y(this,e);t.$=G;G(this).data("croppie",t)})}}Y.defaults={viewport:{width:100,height:100,type:"square"},boundary:{},orientationControls:{enabled:!0,leftClass:"",rightClass:""}
43,customClass:"",showZoomer:!0,enableZoom:!0,mouseWheelZoom:!0,enableExif:!1,enforceBoundary:!0,enableOrientation:!1,update:function(){}};Y.globals={translate:"translate3d"};r(Y.prototype,{bind:function(e,t){return O.call(this,e,t)},get:function(){var e=D.call(this),t=e.points;if(this.options.relative){t[0]/=this.elements.img.naturalWidth/100;t[1]/=this.elements.img.naturalHeight/100;t[2]/=this.elements.img.naturalWidth/100;t[3]/=this.elements.img.naturalHeight/100}return e},result:function(e){return C.call(this,e)},refresh:function(){return L.call(this)},setZoom:function(e){f.call(this,e);n(this.elements.zoomer)},rotate:function(e){I.call(this,e)},destroy:function(){return R.call(this)}});e.Croppie=window.Croppie=Y;"object"==typeof module&&module.exports&&(module.exports=Y)});define("croppie",["croppie/croppie"],function(e){return e});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/jquery/croppie",["require","exports","croppie"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;e("croppie");!function(e){function t(){}e.initialize=t}(r||(r={}));t.default=r});!function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function i(e){return parseFloat(e)||0}function o(e){for(var t=0;e;){t+=e.offsetTop;e=e.offsetParent}return t}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(t,r,n){r&&e(t.prototype,r);n&&e(t,n);return t}}(),s=!1;e.getComputedStyle?function(){var e=t.createElement("div");["","-webkit-","-moz-","-ms-"].some(function(t){try{e.style.position=t+"sticky"}catch(e){}return""!=e.style.position})&&(s=!0)}():s=!0;var l="undefined"!=typeof ShadowRoot,u={top:null,left:null},c=[],d=function(){function d(e){r(this,d);if(!(e instanceof HTMLElement))throw new Error("First argument must be HTMLElement");if(c.some(function(t){return t._node===e}))throw new Error("Stickyfill is already applied to this node");this._node=e;this._stickyMode=null;this._active=!1;c.push(this);this.refresh()}a(d,[{key:"refresh",value:function(){if(!s&&!this._removed){this._active&&this._deactivate();var r=this._node,a=getComputedStyle(r),u={top:a.top,display:a.display,marginTop:a.marginTop,marginBottom:a.marginBottom,marginLeft:a.marginLeft,marginRight:a.marginRight,cssFloat:a.cssFloat};if(!isNaN(parseFloat(u.top))&&"table-cell"!=u.display&&"none"!=u.display){this._active=!0;var c=r.parentNode,d=l&&c instanceof ShadowRoot?c.host:c,p=r.getBoundingClientRect(),f=d.getBoundingClientRect(),h=getComputedStyle(d);this._parent={node:d,styles:{position:d.style.position},offsetHeight:d.offsetHeight};this._offsetToWindow={left:p.left,right:t.documentElement.clientWidth-p.right};this._offsetToParent={top:p.top-f.top-i(h.borderTopWidth),left:p.left-f.left-i(h.borderLeftWidth),right:-p.right+f.right-i(h.borderRightWidth)};this._styles={position:r.style.position,top:r.style.top,bottom:r.style.bottom,left:r.style.left,right:r.style.right,width:r.style.width,marginTop:r.style.marginTop,marginLeft:r.style.marginLeft,marginRight:r.style.marginRight};var m=i(u.top);this._limits={start:p.top+e.pageYOffset-m,end:f.top+e.pageYOffset+d.offsetHeight-i(h.borderBottomWidth)-r.offsetHeight-m-i(u.marginBottom)};var y=h.position;"absolute"!=y&&"relative"!=y&&(d.style.position="relative");this._recalcPosition();var g=this._clone={};g.node=t.createElement("div");n(g.node.style,{width:p.right-p.left+"px",height:p.bottom-p.top+"px",marginTop:u.marginTop,marginBottom:u.marginBottom,marginLeft:u.marginLeft,marginRight:u.marginRight,cssFloat:u.cssFloat,padding:0,border:0,borderSpacing:0,fontSize:"1em",position:"static"});c.insertBefore(g.node,r);g.docOffsetTop=o(g.node)}}}},{key:"_recalcPosition",value:function(){if(this._active&&!this._removed){var e=u.top<=this._limits.start?"start":u.top>=this._limits.end?"end":"middle";if(this._stickyMode!=e){switch(e){case"start":n(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",to
43p:this._offsetToParent.top+"px",bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"middle":n(this._node.style,{position:"fixed",left:this._offsetToWindow.left+"px",right:this._offsetToWindow.right+"px",top:this._styles.top,bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"end":n(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",top:"auto",bottom:0,width:"auto",marginLeft:0,marginRight:0})}this._stickyMode=e}}}},{key:"_fastCheck",value:function(){this._active&&!this._removed&&(Math.abs(o(this._clone.node)-this._clone.docOffsetTop)>1||Math.abs(this._parent.node.offsetHeight-this._parent.offsetHeight)>1)&&this.refresh()}},{key:"_deactivate",value:function(){var e=this;if(this._active&&!this._removed){this._clone.node.parentNode.removeChild(this._clone.node);delete this._clone;n(this._node.style,this._styles);delete this._styles;c.some(function(t){return t!==e&&t._parent&&t._parent.node===e._parent.node})||n(this._parent.node.style,this._parent.styles);delete this._parent;this._stickyMode=null;this._active=!1;delete this._offsetToWindow;delete this._offsetToParent;delete this._limits}}},{key:"remove",value:function(){var e=this;this._deactivate();c.some(function(t,r){if(t._node===e._node){c.splice(r,1);return!0}});this._removed=!0}}]);return d}(),p={stickies:c,Sticky:d,addOne:function(e){if(!(e instanceof HTMLElement)){if(!e.length||!e[0])return;e=e[0]}for(var t=0;t<c.length;t++)if(c[t]._node===e)return c[t];return new d(e)},add:function(e){e instanceof HTMLElement&&(e=[e]);if(e.length){for(var t=[],r=0;r<e.length;r++){(function(r){var n=e[r];if(!(n instanceof HTMLElement)){t.push(void 0);return"continue"}if(c.some(function(e){if(e._node===n){t.push(e);return!0}}))return"continue";t.push(new d(n))})(r)}return t}},refreshAll:function(){c.forEach(function(e){return e.refresh()})},removeOne:function(e){if(!(e instanceof HTMLElement)){if(!e.length||!e[0])return;e=e[0]}c.some(function(t){if(t._node===e){t.remove();return!0}})},remove:function(e){e instanceof HTMLElement&&(e=[e]);if(e.length)for(var t=0;t<e.length;t++)!function(t){var r=e[t];c.some(function(e){if(e._node===r){e.remove();return!0}})}(t)},removeAll:function(){for(;c.length;)c[0].remove()}};s||function(){function r(){if(e.pageXOffset!=u.left){u.top=e.pageYOffset;u.left=e.pageXOffset;p.refreshAll()}else if(e.pageYOffset!=u.top){u.top=e.pageYOffset;u.left=e.pageXOffset;c.forEach(function(e){return e._recalcPosition()})}}function n(){o=setInterval(function(){c.forEach(function(e){return e._fastCheck()})},500)}function i(){clearInterval(o)}r();e.addEventListener("scroll",r);e.addEventListener("resize",p.refreshAll);e.addEventListener("orientationchange",p.refreshAll);var o=void 0,a=void 0,s=void 0;if("hidden"in t){a="hidden";s="visibilitychange"}else if("webkitHidden"in t){a="webkitHidden";s="webkitvisibilitychange"}if(s){t[a]||n();t.addEventListener(s,function(){t[a]?i():n()})}else n()}();"undefined"!=typeof module&&module.exports?module.exports=p:e.Stickyfill=p}(window,document);define("stickyfilljs",["stickyfilljs/dist/stickyfill"],function(e){return e});define("stickyfilljs/dist/stickyfill",function(){});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/jquery/stickyfill",["require","exports","stickyfilljs"],e)}(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){function t(){!function e(){
44if("Stickyfill"in window){var t=document.querySelectorAll(".sticky");if(!t||!t.length)return setTimeout(e,0);window.Stickyfill.add(t)}else setTimeout(e,0)}()}e.initialize=t}(n||(n={}));t.default=n});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/authentication",["require","exports"],e)}(function(e,t){"use strict";
44Object.defineProperty(t,"__esModule",{value:!0})});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/clientAdapter",["require","exports","jquery","ribsjs","../../configuration/configuration","../utilities/authentication","underscore","../update/update"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("ribsjs"),i=e("../../configuration/configuration"),o=(e("../utilities/authentication"),e("underscore")),a=e("../update/update"),s=function(e){function t(t){var r=e.call(this,t)||this;r.retryCount=0;return r}__extends(t,e);t.prototype.formatOptions=function(t){t=e.prototype.formatOptions.call(this,t);var r=function(e){t.include&&t.include.length>0&&(e.include=t.include);"dataParameters"in t&&o.extend(e,t.dataParameters)};t.data instanceof Array?t.data.forEach(function(e){r(e)}):r(t.data);var n={},a=i.default.update.updateUrgency.currentVersion,s=i.default.update.updateUrgency.versionRadix;n[i.default.update.updateUrgency.requestHeaderName]=a.toString(s);t.headers=o.extend(n,t.headers);this.errorCallback=t.error;this.successCallback=t.success;t.error=null;t.success=null;return t};t.prototype.doRequest=function(e){var t=this,n=function(){e.headers[i.default.server.checkH]=function(e){var t=Math.random(),r=/(^https?:\/\/.*?\/)/;e=e.replace(r,"/");var n=String.fromCharCode;return n(36)+function(e){var t,r,n,i,o,a,s,l,u,c=function(e,t){return e<<t|e>>>32-t},d=function(e){var t,r="";for(t=7;0<=t;t--)r+=(e>>>4*t&15).toString(16);return r},p=new Array(80),f=1732584193,h=4023233417,m=2562383102,y=271733878,g=3285377520,v=(e=function(e){if(null==e)return"";var t,r,n,i=e+"",o="";t=r=0,n=i.length;for(var a=0;a<n;a++){var s=i.charCodeAt(a),l=null;if(s<128)r++;else if(127<s&&s<2048)l=String.fromCharCode(s>>6|192,63&s|128);else if(55296!=(63488&s))l=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128);else{if(55296!=(64512&s))throw new RangeError("Unmatched trail surrogate at "+a);var u=i.charCodeAt(++a);if(56320!=(64512&u))throw new RangeError("Unmatched lead surrogate at "+(a-1));s=((1023&s)<<10)+(1023&u)+65536,l=String.fromCharCode(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}null!==l&&(t<r&&(o+=i.slice(t,r)),o+=l,t=r=a+1)}return t<r&&(o+=i.slice(t,n)),o}(e)).length,_=[];for(r=0;r<v-3;r+=4)n=e.charCodeAt(r)<<24|e.charCodeAt(r+1)<<16|e.charCodeAt(r+2)<<8|e.charCodeAt(r+3),_.push(n);switch(v%4){case 0:r=2147483648;break;case 1:r=e.charCodeAt(v-1)<<24|8388608;break;case 2:r=e.charCodeAt(v-2)<<24|e.charCodeAt(v-1)<<16|32768;break;case 3:r=e.charCodeAt(v-3)<<24|e.charCodeAt(v-2)<<16|e.charCodeAt(v-1)<<8|128}for(_.push(r);_.length%16!=14;)_.push(0);for(_.push(v>>>29),_.push(v<<3&4294967295),t=0;t<_.length;t+=16){for(r=0;r<16;r++)p[r]=_[t+r];for(r=16;r<=79;r++)p[r]=c(p[r-3]^p[r-8]^p[r-14]^p[r-16],1);for(i=f,o=h,a=m,s=y,l=g,r=0;r<=19;r++)u=c(i,5)+(o&a|~o&s)+l+p[r]+1518500249&4294967295,l=s,s=a,a=c(o,30),o=i,i=u;for(r=20;r<=39;r++)u=c(i,5)+(o^a^s)+l+p[r]+1859775393&4294967295,l=s,s=a,a=c(o,30),o=i,i=u;for(r=40;r<=59;r++)u=c(i,5)+(o&a|o&s|a&s)+l+p[r]+2400959708&4294967295,l=s,s=a,a=c(o,30),o=i,i=u;for(r=60;r<=79;r++)u=c(i,5)+(o^a^s)+l+p[r]+3395469782&4294967295,l=s,s=a,a=c(o,30),o=i,i=u;f=f+i&4294967295,h=h+o&4294967295,m=m+a&4294967295,y=y+s&4294967295,g=g+l&4294967295}return(u=d(f)+d(h)+d(m)+d(y)+d(g)).toLowerCase()}(e+t)+""+n(42)+t+n(126)}(e.url);return r.ajax(e).then(function(e,r,n){t.retryCount=0;t.processAppUpdateResponseHeader(n);t.successCallback(e,r,n)},function(e,r,o){(504===e.status||["gateway timeout","gateway time-out"].indexOf((o||"").toString().toLowerCase()))&&t.retryCount++<i.default.api.maxRetryNumber?t.requestList.push(n()):t.errorCallback(e,r,o)})};this.requestList.push(n())};t.prototype.processAppUpdateResponseHeader=function(e){var t=e.getResponseHeader(i.default.update.updateUrgency.responseHeaderName);if("string"==typeof t){var r;switch(t){default:return;case i.default.update.updateUrgency.responseHeaderValues.mandatory:r=0;break;case i.default.update.updateUrgency.responseHeaderValues.recommended:r=1}a.increaseUpdateUrgency(r)}};return t}(n.Adapter.DefaultRequest);t.ClientRequest=s;var l=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getRequestInstance=function(e){return new s(o.extend({},this.options,e))};return t}(n.Adapter.Adapter);t.ClientAdapter=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/fileAdapter",["require","exports","ribsjs"],e)}(function(e,t){"use strict";
44Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=function(e){function t(t){var r,n=e.call(this,t)||this,i=t.data;r=i instanceof Array?i:[i];var o=[],a=0,s=[],l=function(){if(!(++a<r.length)){if(s.length>0){if(t.error)return t.error(n,s.map(function(e){return e.message}),s);throw new Error(s.map(function(e){return e.message}).join("\n"))}t.success&&t.success(o)}};r.forEach(function(e){n.getFile(e,t,function(t,r){t?s.push(t):o.push({id:e.id,template:r});l()})});return n}__extends(t,e);return t}(r.Adapter.Request);t.AFileRequest=n;var i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);return t}(r.Adapter.Adapter);t.AFileAdapter=i;t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/cordovaTemplateAdapter",["require","exports","jquery","underscore","../../configuration/bootLoader","./fileAdapter"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("underscore"),i=e("../../configuration/bootLoader"),o=e("./fileAdapter"),a=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getFile=function(e,t,n){var o=i.getValue(i.Properties.Adapter.Template.Directory)+e.id+"."+t.fileExtension;r.get(o,function(e){n(null,e)})};return t}(o.AFileRequest);t.CordovaTemplateRequest=a;var s=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getRequestInstance=function(e){return new a(n.extend({},this.options,e))};return t}(o.AFileAdapter);t.CordovaTemplateAdapter=s;t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/cordovaTemplateBundleAdapter",["require","exports","jquery","underscore","../../configuration/bootLoader","./cordovaTemplateAdapter"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("underscore"),i=e("../../configuration/bootLoader"),o=e("./cordovaTemplateAdapter"),a=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getFile=function(e,n,o){if(t.bundle)return o(null,t.bundle[e.id]);var a=i.getValue(i.Properties.Adapter.Template.Directory)+"/"+i.getValue(i.Properties.Adapter.Template.Bundle);r.getJSON(a,function(r){t.bundle=r;o(null,t.bundle[e.id])})};return t}(o.CordovaTemplateRequest),s=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getRequestInstance=function(e){return new a(n.extend({},this.options,e))};return t}(o.CordovaTemplateAdapter);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/favoritesClientAdapter",["require","exports","./clientAdapter","underscore"],e)}(function(e,t){"use strict";
44Object.defineProperty(t,"__esModule",{value:!0});var r=e("./clientAdapter"),n=e("underscore"),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.formatOptions=function(t){t=e.prototype.formatOptions.call(this,t);if(t.data instanceof Array){for(var r={},n=0;n<t.data.length;++n){var i=t.data[n];if(2===Object.keys(i).length&&"id"in i&&"type"in i){i.type in r||(r[i.type]=[]);i.id instanceof Array?r[i.type]=r[i.type].concat(i.id):r[i.type].push(i.id);t.data.splice(n--,1)}}Object.keys(r).forEach(function(e){t.data.push({type:e,id:r[e]})})}return t};return t}(r.ClientRequest);t.FavoritesClientRequest=i;var o=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getRequestInstance=function(e){return new i(n.extend({},this.options,e))};return t}(r.ClientAdapter);t.FavoritesClientAdapter=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/similarsClientAdapter",["require","exports","./clientAdapter","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./clientAdapter"),n=e("underscore"),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.formatOptions=function(t){t=e.prototype.formatOptions.call(this,t);if(t.data instanceof Array){for(var r={},n=0;n<t.data.length;++n){var i=t.data[n];if(2===Object.keys(i).length&&"id"in i&&"type"in i){i.type in r||(r[i.type]=[]);i.id instanceof Array?r[i.type]=r[i.type].concat(i.id):r[i.type].push(i.id);t.data.splice(n--,1)}}Object.keys(r).map(function(e){t.data.push({type:e,id:r[e]})})}return t};return t}(r.ClientRequest);t.SimilarsClientRequest=i;var o=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getRequestInstance=function(e){return new i(n.extend({},this.options,e))};return t}(r.ClientAdapter);t.SimilarsClientAdapter=o});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/adapter/cache/indexedDb",["require","exports","../../../configuration/configuration","FSPromise"],e)}(function(e,t){"use strict";function r(e){void 0===e&&(e=!1);return new i.FSPromise(function(i,s){if(!t.isActive){t.isActive=!1;return i("Unable to initialize indexedDb: 01")}var l=setTimeout(function(){l=-1;if(!0===e){t.isActive=!1;return i("Unable to initialize indexedDb: 02")}console.debug("Reset IndexedDb");r(!0).then(i,s)},n.default.indexedDb.object.timeout),u=n.default.indexedDb.object.options.prefix+n.default.indexedDb.object.options.dbName;(n.default.indexedDb.object.deleteInLoad||e)&&o.deleteDatabase(u);try{var c=o.open(u,n.default.indexedDb.object.options.dbVersion);c.onupgradeneeded=function(e){if(-1!==l){clearTimeout(l);var r=e.target.result;t.IndexedDbObjectStore.forEach(function(e){r.objectStoreNames.contains(e)&&r.deleteObjectStore(e);r.createObjectStore(e,{autoIncrement:!1})})}};c.onsuccess=function(e){if(-1!==l){clearTimeout(l);a=e.target.result;i()}};c.onerror=function(e){if(-1!==l){clearTimeout(l);t.isActive=!1;i("Unable to initialize indexedDb: 03");console.error(e)}};c.onblocked=function(e){if(-1!==l){clearTimeout(l);t.isActive=!1;i("Unable to initialize indexedDb: 04");console.error(e)}}}catch(e){t.isActive=!1;i("Unable to initialize indexedDb: 05");console.error(e)}})}
44Object.defineProperty(t,"__esModule",{value:!0});var n=e("../../../configuration/configuration"),i=e("FSPromise"),o=window.indexedDB||window.msIndexedDB;t.isActive=!!o&&n.default.indexedDb.object.isActive;t.IndexedDbObjectStore=["albums","artists","charts","favorites","legals","localizations","playlists","posts","radios","reviews","search","sentiments","similars","statics","tags","templates","tracks","users"];var a=null;t.initialize=r;var s=function(){function e(e,t){this.objectStore=e;this.options=t}e.prototype.doesOwnObjectStoreExist=function(){return a.objectStoreNames.contains(this.objectStore)};e.prototype.fetch=function(e){return __awaiter(this,void 0,i.FSPromise,function(){var t=this;return __generator(this,function(o){switch(o.label){case 0:return void 0!==a&&null!==a?[3,2]:[4,r(!1)];case 1:o.sent();o.label=2;case 2:return[2,new i.FSPromise(function(r,o){if(t.doesOwnObjectStoreExist()){var s=[],l=n.default.indexedDb.object.options.prefix||"",u=a.transaction([t.objectStore],"readonly").objectStore(t.objectStore);e instanceof Array||(e=[e]);e.forEach(function(e,t){var r=u.get(l+e);s.push(new i.FSPromise(function(e,t){r.onsuccess=function(t){e(t.target.result)};r.onerror=function(t){console.warn(t);e()}}))});i.FSPromise.all(s).then(r,o)}else{console.warn("fetch: prevented access to missing object store "+t.objectStore);r([])}}).catch(function(e){console.error(e);return[]})]}})})};e.prototype.save=function(e){if(!this.doesOwnObjectStoreExist()){console.warn("save: prevented access to missing object store "+this.objectStore);return i.FSPromise.resolve()}var t=n.default.indexedDb.object.options.prefix||"",r=a.transaction([this.objectStore],"readwrite").objectStore(this.objectStore),o=Object.keys(e).map(function(n){return new i.FSPromise(function(i,o){var a=r.put(e[n],t+n);a.onsuccess=function(){return i()};a.onerror=o})});return i.FSPromise.all(o)};e.prototype.set=function(e,t){if(!this.doesOwnObjectStoreExist()){console.warn("set: prevented access to missing object store "+this.objectStore);return i.FSPromise.resolve()}var r=n.default.indexedDb.object.options.prefix||"",o=a.transaction([this.objectStore],"readwrite").objectStore(this.objectStore),s=null;s=t instanceof Array?t.map(function(t){return""+r+e}):""+r+t;return new i.FSPromise(function(t,n){var i=o.put(s,""+r+e);i.onsuccess=function(e){t()};i.onerror=function(e){n(e)}})};e.prototype.remove=function(e,t){var r=this;if(!this.doesOwnObjectStoreExist()){console.warn("remove: prevented access to missing object store "+this.objectStore);return i.FSPromise.resolve()}e instanceof Array||(e=[e]);return new i.FSPromise(function(i){var o=n.default.indexedDb.object.options.prefix||"",s=e.map(function(e){return""+o+e});t&&(t instanceof Array?s=s.concat(t):s.push(t));var l=a.transaction(r.objectStore,"readwrite").objectStore(r.objectStore);l.openCursor().onsuccess=function(e){var t=e.target.result;if(t){(function(e,t){for(var r=0,n=e.length;r<n;++r)if(t(e[r]))return!0;return!1})(s,function(e){return t.key.indexOf(e)>-1})&&l.delete(t.key);t.continue()}else i()}})};e.prototype.removeAllMatch=function(e){if(!this.doesOwnObjectStoreExist()){console.warn("fetch: prevented access to missing object store "+this.objectStore);return i.FSPromise.resolve([])}var t=(n.default.indexedDb.object.options.prefix,a.transaction([this.objectStore],"readwrite").objectStore(this.objectStore));return new i.FSPromise(function(r,n){var i=t.openCursor();i.onsuccess=function(n){var i=n.target.result;if(i){i.key.indexOf(e)>-1&&t.delete(i.key);i.continue()}else r()};i.onerror=function(e){n(e)}})};return e}();t.IndexedDbClient=s});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/aFetcherPlugin",["require","exports","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("FSPromise"),n=r.FSPromise,i=function(){function e(e,t){void 0===t&&(t={});this.fetcher=e;this.options=t}e.prototype.remove=function(e){return n.resolve(e)};e.prototype.preRemoveHook=function(e){return n.resolve(e)};e.prototype.postRemoveHook=function(e){return n.resolve(e)};e.prototype.removedAll=function(e){return n.resolve(e)};return e}();t.AFetcherPlugin=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/aCacheFetcherPlugin",["require","exports","underscore","./aFetcherPlugin","FSPromise","../../library/error/error","../../library/utilities/deployment"],e)}(function(e,t){"use strict";
44Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("./aFetcherPlugin"),i=e("FSPromise"),o=i.FSPromise,a=e("../../library/error/error"),s=e("../../library/utilities/deployment"),l=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.options.secondaryKey=r.secondaryKey||[];n.options.timeToLive=r.timeToLive||3e5;n.initializeCache();return n}__extends(t,e);t.prototype.initializeCache=function(){};Object.defineProperty(t.prototype,"isActive",{get:function(){return t.isActive},enumerable:!0,configurable:!0});t.prototype.fetch=function(e){var t=this;return!this.isActive||"userData"in e.options&&"query"in e.options.userData&&e.options.userData.query.nocache&&"false"!==e.options.userData.query.nocache?o.resolve(e):new o(function(r,n){var i=[];e.dataOfModelsNotFetched.forEach(function(r){var n=t.getKeyFromData(r,e.options);n&&i.push({data:r,key:n})});if(i.length){t.getIndexDbFetchMethod(i).then(t.decodeFetchResponse).then(function(n){var o=(new Date).getTime()-t.options.timeToLive;t.checkItemFetched(n,i,e,o);r(e)}).catch(function(t){r(e);var n=new a.default(t.message,{originalErrorStack:t.stack,userData:e.options.userData});"constructor"in t&&(n.options.originalErrorType=t.constructor.name);console.error(n)})}else r(e)})};t.prototype.checkItemFetched=function(e,t,n,i){var o=this;t.forEach(function(t,a){var l=r.matches(t.data),u=e[a];if(u&&u.fetchDate>i)if(u.model instanceof Array){u.model.forEach(function(e){if(s.default.isEnvironment("development")){e._debug_=e._||{};e._debug_.modelSource=o.constructor.name}n.modelsAlreadyFetched.push(o.fetcher.collection.add(e,{merge:!0,silent:!0}))});n.dataOfModelsNotFetched.splice(n.dataOfModelsNotFetched.indexOf(t.data),1)}else if(l(u.model)){if(s.default.isEnvironment("development")){u.model._debug_=u.model._debug_||{};u.model._debug_.modelSource=o.constructor.name}n.modelsAlreadyFetched.push(o.fetcher.collection.add(u.model,{merge:!0,silent:!0}));n.dataOfModelsNotFetched.splice(n.dataOfModelsNotFetched.indexOf(t.data),1)}})};t.prototype.decodeFetchResponse=function(e){e.forEach(function(t,r){if(t)try{var n=JSON.parse(t);"object"==typeof n.model&&(n.model.__fetchFromCache=!0);"string"==typeof n.model&&(n.model=JSON.parse(n.model).map(function(e){e.__fetchFromCache=!0;return e}));e[r]=n}catch(e){}});return e};t.prototype.getIndexDbFetchMethod=function(e){return this.cacheClient.fetch(e.map(function(e){return e.key}))};t.prototype.preFetchHook=function(e){return o.resolve(e)};t.prototype.postFetchHook=function(e){return o.resolve(e)};t.prototype.fetchedAll=function(e){var t=this;if(!this.isActive||this.options.timeToLive===Number.POSITIVE_INFINITY||"userData"in e.options&&"query"in e.options.userData&&e.options.userData.query.nocache&&"false"!==e.options.userData.query.nocache&&e.options.userData.query.nocacheupdate&&"false"!==e.options.userData.query.nocacheupdate){this.clearCacheMetadata(e);return o.resolve(e)}return new o(function(r,n){var i=t.getDataToCache(e);t.clearCacheMetadata(e);if(i){t.saveToCache(i).then(function(){},function(t){var r=new a.default("Ignore error: "+t.message,{originalErrorStack:t.stack,userData:e.options.userData});"constructor"in t&&(r.options.originalErrorType=t.constructor.name);console.error(r)});r(e)}else r(e)})};t.prototype.getDataToCache=function(e){var t=this,r={},n=(new Date).getTime();e.modelsAlreadyFetched.forEach(function(i){if(!i.get("__fetchFromCache")){var o=t.getKeyFromModel(i,e.options);if(o){var a={model:i.toJSON(),fetchDate:n};r[o]=JSON.stringify(a)}}});return Object.keys(r).length?r:null};t.prototype.saveToCache=function(e){return this.cacheClient.save(e)};t.prototype.clearCacheMetadata=function(e){e.modelsAlreadyFetched.forEach(function(e){e.unset("__fetchFromCache",{silent:!0})})};t.prototype.getKeyFromData=function(e,t){if(!this.options.primaryKey)return null;for(var r=0,n=this.options.primaryKey;r<n.length;r++){if(!(n[r]in e))return null}var i=this.options.primaryKey.slice(0);e.id||this.options.secondaryKey.forEach(function(e){t.dataParameters&&e in t.dataParameters&&i.push(e)});return this.options.table+"_"+i.map(function(r){return e&&r in e?r+"_"+e[r]:t.dataParameters&&r in t.dataParameters?r+"_"+t.dataParameters[r]:r+"_undefined"}).join("__")};t.prototype.getKeyFromModel=function(e,t){if(!this.options.primaryKey)return null;var r=e.pick(this.options.primaryKey);return Object.keys(r).length!==this.options.primaryKey.length?null:this.options.table+"_"+this.options.primaryKey.map(function(e){return e+"_"+r[e]}).join("__")};t.prototype.remove=function(e){var t=this;return new o(function(n){var i=e.modelsToRemove.map(function(r){return t.getKeyFromData(r.attributes,e.options)}
44).filter(Boolean),o=e.modelsToRemove.map(function(n){var i=r.extend({},n.attributes,{id:void 0});return t.getKeyFromData(i,r.extend({},e.options,{dataParameters:i}))}).filter(Boolean);i.push.apply(i,o);if(!i.length)return n(e);t.getRemoveMethod(i).then(function(){return n(e)},function(){return n(e)})})};t.prototype.getRemoveMethod=function(e){return this.cacheClient.remove(e)};t.isActive=!0;return t}(n.AFetcherPlugin);t.ACacheFetcherPlugin=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDbFetcherPlugin",["require","exports","../../configuration/configuration","../../library/adapter/cache/indexedDb","../../library/model/model","./aCacheFetcherPlugin"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../configuration/configuration"),n=e("../../library/adapter/cache/indexedDb"),i=e("../../library/model/model"),o=e("./aCacheFetcherPlugin"),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;r.bundle&&n.saveBundle(r.bundle);return n}__extends(t,e);Object.defineProperty(t.prototype,"isActive",{get:function(){return t.isActive},enumerable:!0,configurable:!0});t.prototype.initializeCache=function(){this.cacheClient=new n.IndexedDbClient(this.options.table)};t.prototype.saveBundle=function(e){e.models&&e.models.length&&this.saveBundledModels(e.models);e.query&&e.query.length&&this.saveBundledQuery(e.query)};t.prototype.updateModel=function(e){var t=this.getKeyFromModel(e);if(t){var r={model:e,fetchDate:Date.now()},n={};n[t]=JSON.stringify(r);this.saveToCache(n)}return Promise.resolve(void 0)};t.prototype.saveBundledModels=function(e){var t=this,r={},n=(new Date).getTime();e.forEach(function(e){var o=t.getKeyFromModel(new i.default(e));if(o){var a={model:e,fetchDate:n};r[o]=JSON.stringify(a)}});this.saveToCache(r)};t.prototype.saveBundledQuery=function(e){var t=this,r={},n=(new Date).getTime();e.forEach(function(e){var i=t.getKeyFromData(e.data,e.options);if(i){var o={model:e.model,fetchDate:n};r[i]=JSON.stringify(o)}});this.saveToCache(r)};t.isActive=r.default.indexedDb.object.isActive;return t}(o.ACacheFetcherPlugin);t.IndexedDbFetcherPlugin=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/localFetcherPlugin",["require","exports","./aFetcherPlugin","FSPromise","../../library/utilities/deployment"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./aFetcherPlugin"),n=e("FSPromise"),i=n.FSPromise,o=e("../../library/utilities/deployment"),a=function(e){function t(t,r){return e.call(this,t,r)||this}__extends(t,e);t.prototype.fetch=function(e){var t=this;return new i(function(r,n){e.options.fetchById&&(e.dataOfModelsNotFetched=e.dataOfModelsNotFetched.map(function(r){var n=t.fetcher.collection.where(t.formatDataForLocal(r,e.options));if(!n.length)return r;n.forEach(function(r){e.modelsAlreadyFetched.push(r);if(o.default.isEnvironment("development")){r.set("_debug_",r.get("_debug_")||{});r.get("_debug_").modelSource=t.constructor.name}})}).filter(Boolean));r(e)})};t.prototype.formatDataForLocal=function(e,t){return e};t.prototype.preFetchHook=function(e){return i.resolve(e)};t.prototype.postFetchHook=function(e){return i.resolve(e)};t.prototype.fetchedAll=function(e){return i.resolve(e)};return t}(r.AFetcherPlugin);t.LocalFetcherPlugin=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/remoteFetcherPlugin",["require","exports","underscore","FSPromise","../../library/error/error","./aFetcherPlugin","../../library/utilities/deployment"],e)}(function(e,t){"use strict";function r(e){return e?{dataOfModelsNotFetched:e.dataOfModelsNotFetched,options:n.omit(e.options,"userData"),modelsAlreadyFetched:e.modelsAlreadyFetched.map(function(e){return{cid:e.cid,id:e.id,attributes:e.attributes,options:e.options}})}:e}
44Object.defineProperty(t,"__esModule",{value:!0});var n=e("underscore"),i=e("FSPromise"),o=i.FSPromise,a=e("../../library/error/error"),s=e("./aFetcherPlugin"),l=e("../../library/utilities/deployment"),u=function(e){function t(t,r){return e.call(this,t,r)||this}__extends(t,e);t.prototype.fetch=function(e){var t=this;return e.dataOfModelsNotFetched.length?new o(function(i,o){t.fetcher.collection.fetch(n.extend({},e.options,{data:e.dataOfModelsNotFetched,error:function(n,i,s){o(void 0!==s.errorThrown&&s.errorThrown.length>0?new a.default("RemoteFetcher Error",{data:r(e),constructor:t.constructor.name,errors:s.errorThrown,userData:e.options.userData}):void 0!==i.status?new a.default("error fetching model(s), status: "+i.status,{data:r(e),constructor:t.constructor.name,errors:i,userData:e.options.userData}):new a.default("unknown error when fetching model(s)",{data:r(e),constructor:t.constructor.name,userData:e.options.userData}))},success:function(r,s,u){var c=e.modelsAlreadyFetched;try{s.forEach(function(e){var i="id"in e?r.findWhere({id:e.id}):r.findWhere(e);if(i){if(l.default.isEnvironment("development")){i.set("_debug_",i.get("_debug_")||{});i.get("_debug_").modelSource=t.constructor.name}c.push(i)}else console.warn({message:"Didn't find a model in the fetch response, even though it was a successful request by the the collection.fetch in remoteFetcherPlugin...",
45collection:r.toJSON(),response:s,options:n.pick(u,"userData","include","data","dataParameters")})})}catch(t){var d=new a.default(t.message,{originalErrorStack:t.stack,data:e.dataOfModelsNotFetched,userData:e.options.userData,options:{url:e.options.url,dataParameters:e.options.dataParameters}});t.constructor||(d.options.originalErrorType=t.constructor.name);o(d)}i(e)},remove:!1,merge:!0,userData:e.options.userData}))}):o.resolve(e)};t.prototype.preFetchHook=function(e){return o.resolve(e)};t.prototype.postFetchHook=function(e){return o.resolve(e)};t.prototype.fetchedAll=function(e){return o.resolve(e)};return t}(s.AFetcherPlugin);t.RemoteFetcherPlugin=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDb/favoritesIndexedDbFetcherPlugin",["require","exports","../indexedDbFetcherPlugin","../../manager","../../../library/model/model","FSPromise","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../indexedDbFetcherPlugin"),n=e("../../manager"),i=e("../../../library/model/model"),o=e("FSPromise"),a=o.FSPromise,s=e("underscore"),l=function(e){function t(t,r){var i=e.call(this,t,r)||this;n.UserManager.on("userdisconnected",function(){i.cacheClient.removeAllMatch("_")});return i}__extends(t,e);t.prototype.fetchedAll=function(e){var t=this;return new a(function(r,n){var i=t.getDataToCache(e);t.clearCacheMetadata(e);i?t.saveToCache(i).then(function(){r(e)}):r(e)})};t.prototype.getDataToCache=function(t){var r=this,n=e.prototype.getDataToCache.call(this,t)||{},o=(new Date).getTime();t.dataOfModelsNotFetched.forEach(function(e,a){if(e.id){var s=new i.default({favorite:0,id:e.id,type:e.type,userId:t.options.userData.session.get("me",{}).id});if("user"===e.type){var l=t.modelsAlreadyFetched[a];s.set("favorite",l.get("favorite"))}var u=r.getKeyFromModel(s);if(u&&!n[u]){var c={model:s.toJSON(),fetchDate:o};n[u]=JSON.stringify(c)}s.close()}else t.dataOfModelsNotFetched.forEach(function(e){var i=r.getKeyFromData(e,t.options);i&&(n[i]=JSON.stringify({model:"["+t.modelsAlreadyFetched.map(function(e){return JSON.stringify(e.toJSON())}).join(",")+"]",fetchDate:o}))})});return Object.keys(n).length?n:null};t.prototype.getKeyFromData=function(t,r){r.dataParameters=s.extend({type:r.url.split("/").slice(-1)[0]},r.dataParameters);return e.prototype.getKeyFromData.call(this,t,r)};t.prototype.clearCacheMetadata=function(t){if("clearCache"in t.options){var r=t.options.clearCache,n=t.options.userData.session.get("me").id;this.cacheClient.removeAllMatch(this.options.table+"_type_"+r+"__id_undefined__userId_"+n)}return e.prototype.clearCacheMetadata.call(this,t)};return t}(r.IndexedDbFetcherPlugin);t.FavoritesIndexedDbFetcherPlugin=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/local/historyLocalFetcherPlugin",["require","exports","../localFetcherPlugin"],e)}(function(e,t){"use strict";
45Object.defineProperty(t,"__esModule",{value:!0});var r=e("../localFetcherPlugin"),n=function(e){function t(t,r){return e.call(this,t,r)||this}__extends(t,e);t.prototype.fetch=function(t){return e.prototype.fetch.call(this,t).then(function(e){e.dataOfModelsNotFetched=t.dataOfModelsNotFetched;return e})};return t}(r.LocalFetcherPlugin);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/local/legalLocalFetcherPlugin",["require","exports","underscore","../localFetcherPlugin","../../../library/utilities/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../localFetcherPlugin"),i=e("../../../library/utilities/user"),o=function(e){function t(t,r){return e.call(this,t,r)||this}__extends(t,e);t.prototype.formatDataForLocal=function(e,t){var n=i.default.getUserLanguage(t.userData);return r.extend({lang:n},e)};return t}(n.LocalFetcherPlugin);t.LegalLocalFetcherPlugin=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/local/localizationLocalFetcherPlugin",["require","exports","underscore","../../../library/utilities/user","../localFetcherPlugin","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/utilities/user"),i=e("../localFetcherPlugin"),o=e("FSPromise"),a=o.FSPromise,s=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.hashCache={};return n}__extends(t,e);t.prototype.formatDataForLocal=function(e,t){var i=n.default.getUserLanguage(t.userData);i in this.hashCache||(this.hashCache[i]={});return r.extend({lang:i},e)};t.prototype.fetch=function(e){var t=this;return new a(function(n,i){e.options.fetchById&&(e.dataOfModelsNotFetched=e.dataOfModelsNotFetched.map(function(n){var i=t.formatDataForLocal(n,e.options);if(!t.hashCache[i.lang])return n;var o=t.hashCache[i.lang][i.id];if(!o)return n;var a=new t.fetcher.collection.model(r.extend({_fetchFromLocalCache:!0},o));e.modelsAlreadyFetched.push(a)}).filter(Boolean));n(e)})};t.prototype.fetchedAll=function(e){var t=this;return new a(function(n){n(e);e.modelsAlreadyFetched.filter(function(e){return e.get("_fetchFromLocalCache")}).forEach(function(e){e.unset("_fetchFromLocalCache",{silent:!0});t.hashCache[e.get("lang")][e.get("id")]=r.extend({},e.attributes)})})};return t}(i.LocalFetcherPlugin);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDb/localizationIndexedDbFetcherPlugin",["require","exports","underscore","../../../library/utilities/user","../indexedDbFetcherPlugin"],e)}(function(e,t){"use strict";
45Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/utilities/user"),i=e("../indexedDbFetcherPlugin"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getKeyFromData=function(t,i){var o=n.default.getUserLanguage(i.userData);i.dataParameters=r.extend({lang:o},i.dataParameters);"lang"in t||(t.lang=o);return e.prototype.getKeyFromData.call(this,t,i)};return t}(i.IndexedDbFetcherPlugin);t.LocalizationIndexedDbFetcherPlugin=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/remote/localizationRemoteFetcherPlugin",["require","exports","underscore","../remoteFetcherPlugin","FSPromise","../../../library/utilities/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../remoteFetcherPlugin"),i=e("FSPromise"),o=i.FSPromise,a=e("../../../library/utilities/user"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.preFetchHook=function(e){var t={};e.dataOfModelsNotFetched.forEach(function(r){var n=a.default.getUserLanguage(e.options.userData),i=r.lang||n;t[i]?t[i]+="+"+r.id:t[i]=r.id});var n=[];r.keys(t).forEach(function(e){n.push({lang:e,id:t[e]})});e.dataOfModelsNotFetched=n;return o.resolve(e)};return t}(n.RemoteFetcherPlugin);t.LocalizationRemoteFetcherPlugin=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDb/queryIndexedDbFetcherPlugin",["require","exports","../indexedDbFetcherPlugin"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../indexedDbFetcherPlugin"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getDataToCache=function(t){var r=this,n=e.prototype.getDataToCache.call(this,t)||{},i=(new Date).getTime();t.modelsAlreadyFetched.length&&t.modelsAlreadyFetched[0].get("__fetchFromCache")||t.dataOfModelsNotFetched.forEach(function(e){if(!e.id){var o=r.getKeyFromData(e,t.options);o&&(n[o]=JSON.stringify({model:"["+t.modelsAlreadyFetched.map(function(e){return JSON.stringify(e.toJSON())}).join(",")+"]",fetchDate:i}))}});return Object.keys(n).length?n:null};return t}(r.IndexedDbFetcherPlugin);t.QueryIndexedDbFetcherPlugin=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDb/playlistsIndexedDbFetcherPlugin",["require","exports","./queryIndexedDbFetcherPlugin","../../manager","../../user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./queryIndexedDbFetcherPlugin"),n=e("../../manager"),i=e("../../user"),o=function(e){function t(t,r){var o=e.call(this,t,r)||this;n.UserManager.on(i.UserManager.Event.UserConnected,function(e){o.currentLoggedId=e.get("id");o.cacheClient.removeAllMatch(o.options.table+"_id_undefined__userId_"+o.currentLoggedId)});n.UserManager.on(i.UserManager.Event.UserDisconnected,function(){o.cacheClient.removeAllMatch(o.options.table+"_id_undefined__userId_"+o.currentLoggedId);o.currentLoggedId=null});return o}__extends(t,e);t.prototype.clearCacheMetadata=function(t){if("type"in t.options&&("POST"===t.options.type||"PATCH"===t.options.type||"DELET
45E"===t.options.type)&&t.modelsAlreadyFetched.length>0){var r=t.modelsAlreadyFetched[0],n=r.get("userId");this.cacheClient.removeAllMatch(this.options.table+"_id_undefined__userId_"+n)}return e.prototype.clearCacheMetadata.call(this,t)};return t}(r.QueryIndexedDbFetcherPlugin);t.PlaylistsIndexedDbFetcherPlugin=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDb/reviewsIndexedDbFetcherPlugin",["require","exports","../../../library/model/model","../indexedDbFetcherPlugin"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/model/model"),n=e("../indexedDbFetcherPlugin"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getDataToCache=function(e){var t=this,r={},n=(new Date).getTime();e.modelsAlreadyFetched.length&&e.modelsAlreadyFetched[0].get("__fetchFromCache")||e.dataOfModelsNotFetched.forEach(function(i){if(!i.id){var o=t.getKeyFromData(i,e.options);o&&(r[o]=JSON.stringify({model:"["+e.modelsAlreadyFetched.map(function(e){return JSON.stringify(e.toJSON())}).join(",")+"]",fetchDate:n}))}});return Object.keys(r).length?r:null};t.prototype.clearCacheMetadata=function(t){if("type"in t.options&&("POST"===t.options.type||"PATCH"===t.options.type)&&t.modelsAlreadyFetched.length>0){var n=t.options.parent?new r.default(t.options.parent):t.modelsAlreadyFetched[0],i=n.get("joinId"),o=n.get("type"),a=t.options.userData.session.get("me").id;this.cacheClient.removeAllMatch(this.options.table+"_joinId_"+i+"__type_"+o);this.cacheClient.removeAllMatch(this.options.table+"_joinId_"+a+"__type_user");var s=n.get("artistId");s&&this.cacheClient.removeAllMatch(this.options.table+"_joinId_"+s+"__type_artist")}return e.prototype.clearCacheMetadata.call(this,t)};return t}(n.IndexedDbFetcherPlugin);t.ReviewsIndexedDbFetcherPlugin=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDb/tagsIndexedDbFetcherPlugin",["require","exports","../indexedDbFetcherPlugin"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../indexedDbFetcherPlugin"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getDataToCache=function(t){var r=this,n=e.prototype.getDataToCache.call(this,t)||{},i=(new Date).getTime();t.modelsAlreadyFetched.length&&t.modelsAlreadyFetched[0].get("__fetchFromCache")||t.dataOfModelsNotFetched.forEach(function(e){if(!e.name){var o=r.getKeyFromData(e,t.options);o&&(n[o]=JSON.stringify({model:"["+t.modelsAlreadyFetched.map(function(e){return JSON.stringify(e.toJSON())}).join(",")+"]",fetchDate:i}))}});return Object.keys(n).length?n:null};return t}(r.IndexedDbFetcherPlugin);t.TagsIndexedDbFetcherPlugin=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/managers/fetcher/indexedDb/usersIndexedDbFetcherPlugin",["require","exports","../indexedDbFetcherPlugin"],e)}(function(e,t){"use strict";
45Object.defineProperty(t,"__esModule",{value:!0});var r=e("../indexedDbFetcherPlugin"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getDataToCache=function(t){t.modelsAlreadyFetched.forEach(function(e){["password","password_check","countries"].forEach(e.unset.bind(e))});return e.prototype.getDataToCache.call(this,t)||{}};return t}(r.IndexedDbFetcherPlugin);t.UsersIndexedDbFetcherPlugin=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/albums",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/artists",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/charts",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){return e.call(this,[],t)||this}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/favorites",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/history",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";
45Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/legals",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/localization",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.parse=function(e){return e};return n}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/playlists",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/posts",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){return e.call(this,[],t)||this}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/radios",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";
45Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/reviews",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/sentiment",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/search",["require","exports","../../library/collection/collection","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=e("underscore"),i=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e,t){var r=function(e){switch(e.type){case"track":"artistName"in e&&(e.artist={name:e.artistName});"artistId"in e&&(e.artist=n.extend({id:e.artistId},e.artist));"albumName"in e&&(e.album={name:e.albumName});"albumId"in e&&(e.album=n.extend({id:e.albumId},e.album));delete e.artistName;delete e.albumName;break;case"album":"artistName"in e&&(e.artist={name:e.artistName});"artistId"in e&&(e.artist=n.extend({id:e.artistId},e.artist));delete e.artistName}e.uniqueId=e.type+"_"+e.id;e.query=t.data[0].query};e.forEach(r);return e};return r}__extends(t,e);return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/sim
45ilars",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/static",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
46;var r=e("../../library/collection/collection"),n=function(e){function t(t){return e.call(this,[],t)||this}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/template",["require","exports","../../library/collection/collection","chrisweb-utilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=e("chrisweb-utilities"),i=function(e){function t(t){var r=e.call(this,t.models||[],t)||this;r.parse=function(e){if(n.default.isServer()){var t=[];for(var r in e)t.push(new this.model(e[r]));return t}return e};return r}__extends(t,e);return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/track",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/user",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/tags",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";
46Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/collections/manager/updateManagerCollection",["require","exports","../../library/collection/collection"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/collection/collection"),n=function(e){function t(t){var r=e.call(this,[],t)||this;r.parse=function(e){return e};return r}__extends(t,e);return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/models/manager/favorite",["require","exports","ribsjs","underscore","../../configuration/configuration","../../library/model/model"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("underscore"),i=e("../../configuration/configuration"),o=e("../../library/model/model"),a=function(e){function t(r,i){var o=e.call(this,r,i)||this;o.adapter=new t.Adapter(n.extend(t.AdapterOptions,{model:o}));o.url=t.url;return o}__extends(t,e);t.prototype.parse=function(e){return e instanceof Array?e[0]:e};t.prototype.getUrlApi=function(e){return i.default.api.getUrl(i.default.api.methods["favorite"+e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()])};t.prototype.save=function(t,r){r=n.extend({},this.options,r);if("type"in(t||this.attributes)||"type"in this.attributes){var i="";i="type"in(t||this.attributes)?(t||this.attributes).type:this.attributes.type;r=n.extend({url:this.getUrlApi(i)},r)}e.prototype.save.call(this,t,r)};t.Adapter=r.Adapter.DefaultAdapter;t.AdapterOptions={};t.url="";return t}(o.default);t.default=a});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/numberFormat",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){!function(e){!function(e){function t(e){return e===Math.round(e)}function r(e,t){for(;e.length<t;)e="0"+e;return e}function n(e,n){void 0===n&&(n=i("en"));var o=Math.round(e).toString();o=o.match(/./g).reverse().map(function(e,t){t%n.placesPerGroup==0&&(e+=n.groupSeparator);return e}).reverse().join("");o[o.length-1]===n.groupSeparator&&(o=o.slice(0,o.length-1));if(!t(e)){var a=e-Math.round(e);o+=n.decimalSeparator+r(a.toString(),10)}return o}function i(e){e=e.slice(0,2).toLowerCase();return u[e]||a}var o=function(){function e(e,t,r){this.decimalSeparator=e;this.placesPerGroup=t;this.groupSeparator=r}e.prototype.copy=function(){return new e(this.decimalSeparator,this.placesPerGroup,this.groupSeparator)};return e}();e.LocaleFormatSettings=o;e.formatNumber=n;var a=new o(".",3,","),s=new o(",",3," "),l=new o(",",3,"."),u={en:a,fr:s,de:s,pl:s,pt:s,es:l,it:s,ru:s};e.getFormatSettingsByLocale=i}(e.NumberFormat||(e.NumberFormat={}))}
46(e.Utilities||(e.Utilities={}))}(r||(r={}));t.default=r.Utilities.NumberFormat});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/helper",["require","exports","underscore","../../managers/manager","./loading","../../vendor/phpjs/phpjs","ribsjs","moment","../../configuration/configuration","../../library/model/model","FSPromise","chrisweb-utilities","../utilities/image","../utilities/object","../utilities/user","../utilities/route","../utilities/numberFormat","speakingurl"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../managers/manager"),i=e("./loading"),o=e("../../vendor/phpjs/phpjs"),a=e("ribsjs"),s=e("moment"),l=e("../../configuration/configuration"),u=e("../../library/model/model"),c=e("FSPromise"),d=c.FSPromise,p=e("chrisweb-utilities"),f=e("../utilities/image"),h=e("../utilities/object"),m=e("../utilities/user"),y=e("../utilities/route"),g=e("../utilities/numberFormat"),v=e("speakingurl");!function(e){function t(e,t){var r=this;void 0===t&&(t=!0);var i=n.LocalizationManager.get(e,{userData:this._view.options.userData});if(t){var o="{{{"+L+++"}}}",a=function(t){null===t&&l.default.views.helpers.translate.keyIfNull&&(t=e);void 0===r._view.currentTemplateBuffer||r._view.isClose||(r._view.currentTemplateBuffer=r._view.currentTemplateBuffer.replace(o,t))},s=i.then(function(e){var t=e[0].get("translate");a(t);e[0].close()}).catch(function(e){a(null)});this._view.registerTemplatePromise(s);return o}return i.then(function(t){var r=t[0].get("translate")||(l.default.views.helpers.translate.keyIfNull?e:"");t[0].close();return r})}function i(e,t){var r=this;void 0===t&&(t=[]);var i=n.LocalizationManager.get(e.length?e.concat(t):t,{userData:this._view.options.userData,autolock:!0}),o=[];e.forEach(function(e){o[e]="{{{"+L+++"}}}"});var a=function(e,t){null===t&&l.default.views.helpers.translate.keyIfNull&&(t=e);if(void 0!==r._view.currentTemplateBuffer&&!r._view.isClose){var n=o[e].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");r._view.currentTemplateBuffer=r._view.currentTemplateBuffer.replace(new RegExp(n,"g"),t)}},s=i.then(function(t){t.forEach(function(t){if("id"in t){var r=t.get("id");if(e.includes(r)){var n=t.get("translate");a(r,n);t.close()}}})}).catch(function(e){for(var t in o)a(t,null)});this._view.registerTemplatePromise(s);t.forEach(function(e){o[e]=i.then(function(t){var r=l.default.views.helpers.translate.keyIfNull?e:"";t.forEach(function(t){if("id"in t&&t.get("id")===e){r=t.get("translate");t.close()}});return r})});return o}function u(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n="{{{"+L+++"}}}",i=d.all(t).then(function(t){t[0]||(t[0]="");if(!e._view.isClose){var r=o.default.strings.sprintf.apply(null,t);e._view.currentTemplateBuffer=e._view.currentTemplateBuffer.replace(n,r)}});this._view.registerTemplatePromise(i);return n}function c(e,t,n){var i=this;void 0===n&&(n=!1);var o="";if(n){var a=this._view.options.userData;o=a.location.protocol+"//"+a.location.host}var s=!1;t&&Object.keys(t).forEach(function(e){t[e]instanceof d&&(s=!0)});if(!s)return o+y.default.getUrl(e,t);var l="{{{"+L+++"}}}",u=d.all(r.values(t)).then(function(n){t=r.object(r.keys(t),n);var a=o+y.default.getUrl(e,t);void 0===i._view.currentTemplateBuffer||i._view.isClose||(i._view.currentTemplateBuffer=i._view.currentTemplateBuffer.replace(l,a))});this._view.registerTemplatePromise(u);return l}function _(e,t,r){var n=m.default.getUserLanguage(e._view.options.userData);s.locale(n);return t.format(r)}function b(e,t){return _.call(this,s(e),t)}function w(e,t){return _(this,s.unix(e),t)}function x(){return"L"}function M(e){var t=m.default.getUserLanguage(this._view.options.userData);s.locale(t);return s.utc(1e3*e).format("mm:ss")}function S(e){return s.utc(1e3*e).format("[PT]HH[H]mm[M]ss[SZ]")}function k(e){var t=m.default.getUserLanguage(this._view.options.userData);s.locale(t);return s.unix(e).fromNow()}function T(e){var t=m.default.getUserLanguage(this._view.options.userData),r=g.default.getFormatSettingsByLocale(t);return g.default.formatNumber(parseFloat(e.toString()),r)}function A(e){var t=function(e){var t=p.default.safeUnescape(e);return""===v(t)?"_":v(t)};
46return e instanceof d?e.then(t).catch(function(e){console.error(e)}):t(e)}function E(e,t){void 0===t&&(t="images.jamendo.com");return f.default.getImageUrl(e,t)}function P(e,t,r,i){var o=this;void 0===i&&(i=!0);var s=r.split(".");if(t in this&&this[t]){var l;try{l=this[t]instanceof a.Model?this[t].get(s[0]):this[t][s[0]];if(void 0!==l){s.shift();s.forEach(function(e){l=l[e]});return l}}catch(n){console.warn("error getting "+r+" from "+t+" "+e)}}if(!0===i){var u="{{{"+L+++"}}}",c=n.getInclude(t,e,{userData:this._view.options.userData}).then(function(e){if(!o._view.isClose){var t=e[0].get(s.shift());s.forEach(function(e){t=t[e]});o._view.currentTemplateBuffer=o._view.currentTemplateBuffer.replace(u,t)}e[0].close()}).catch(function(){console.warn("error getting "+r+" from "+t+" "+e)});this._view.registerTemplatePromise(c);return u}return n.getInclude(t,e,{userData:this._view.options.userData}).then(function(e){var t=e[0].get(s.shift());s.forEach(function(e){t=t[e]});e[0].close();return t}).catch(function(){console.warn("error getting "+r+" from "+t+" "+e)})}function O(e){var t=this,i="{{{"+L+++"}}}",o=n.StaticManager.getByAttribute({type:"country"},{userData:this._view.options.userData}).then(function(n){if(!t._view.isClose){var o=r.findWhere(n,{code:e});if(!o){t._view.currentTemplateBuffer=t._view.currentTemplateBuffer.replace(i,e);h.closeModel(n);return}t._view.currentTemplateBuffer=t._view.currentTemplateBuffer.replace(i,o.get("name"))}h.closeModel(n)});this._view.registerTemplatePromise(o);return i}function j(e,t){var r=this;void 0===t&&(t="");if(e instanceof d){var n="{{{"+L+++"}}}",i=e.then(function(e){r._view.isClose||(r._view.currentTemplateBuffer=r._view.currentTemplateBuffer.replace(n,e.replace(/(^|\s)#([a-z\d-_]+)/gi,'$1<a href="/community/$2" class="'+t+'">#$2</a>')))});this._view.registerTemplatePromise(i);return n}return e.replace(/(^|\s)#([a-z\d-_]+)/gi,'$1<a href="/community/$2" class="'+t+'">#$2</a>')}function D(e,t,r){var n=this;void 0===t&&(t=110);void 0===r&&(r="span");if(e instanceof d){var i="{{{"+L+++"}}}",o=e.then(function(e){n._view.isClose||(n._view.currentTemplateBuffer=n._view.currentTemplateBuffer.replace(i,C(e,t,r)))});this._view.registerTemplatePromise(o);return i}return C(e,t,r)}function C(e,t,r){var n=e.split(" ").reduce(function(e,r){e[0].length+r.length<=t?e[0]+=r+" ":e[1]+=r+" ";return e},["",""]);return"<"+r+' itemprop="headline">'+n[0]+"</"+r+">"+n[1]}var L=0;e.translate=t;e.batchTranslate=i;e.sprintf=u;e.url=c;e.formatDate=b;e.formatDateFromTimestamp=w;e.getDefaultDateFormat=x;e.formatDuration=M;e.formatDurationSchema=S;e.fromNow=k;e.formatNumber=T;e.niceurl=A;e.imageUrl=E;e.valueFromId=P;e.countryCodeToCountry=O;e.parseTagInText=j;e.extractHeadline=D}(t.Text||(t.Text={}));!function(t){function n(t,n,a){var s=this;void 0===n&&(n={});void 0===a&&(a=null);t="../../views/"+t;var l="viewLoader"+o++,c=this._view.options.subviewAsyncRender;this._view.registerDomPromise(function(o){return d.all(r.values(n)).then(function(e){n=r.object(r.keys(n),e)}).then(function(){return new d(function(r,d){var f=function(e){if(!s._view.isClose){var t=new e({model:new u.default(n),userData:s._view.options.userData}),d=t instanceof i.default;t.create().then(function(e){if(c)d||o.find(l).replaceWith(e);else{o.find(l).replaceWith(e);r(t)}}).catch(function(e){console.warn(e);p.default.isServer()&&r(t)});null!==a&&(s._view[a]=t);if(c){d&&o.find(l).replaceWith(t.$el);r(t)}}};if(p.default.isServer()){var h=e(t);f(h.default||h)}else e([t],function(e){f("default"in e?e.default:e)})})})});return"<"+l+"/>"}var o=0;t.viewLoader=n}(t.View||(t.View={}));!function(e){function t(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return!t.find(function(t){return!(t in e)})}function r(e,t,r){return e[t]===r}function n(e,r,n){void 0===n&&(n=null);return t(e,r)?e[r]:n}e.isset=t;e.equalTo=r;e.getValue=n}(t.Utils||(t.Utils={}))});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Client/scripts/library/plugin/tagmanager",["require","exports","ribsjs","underscore"],e)}(function(e,t){"use strict";
46Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("underscore"),o=function(){function e(){}e.prototype.initializeListeners=function(){var e=window.dataLayer||[],t={userAgent:navigator.userAgent};n.on("STATS:PLAYER:PLAY",function(r){e.push(i.extend({event:"Player_Play_Event",id:r.id,name:r.name},t))});n.on("STATS:PLAYBUTTON:PLAY",function(r){if("wallpost"===r.context){var n="";r.hasOwnProperty("wallpostText")&&(n=r.wallpostText.substring(0,30)+"...");e.push(i.extend({event:"Wallpost_Play_Event",id:r.id,name:r.name,wallpostId:r.wallpostId,wallpostText:n},t))}"artist-page-all"===r.context&&e.push(i.extend({event:"Artist_All_Play_Event",id:r.id,name:r.name},t));"artist-page-popular"===r.context&&e.push(i.extend({event:"Artist_Popular_Play_Event",id:r.id,name:r.name},t));"artist-page-albums-preview"===r.context&&e.push(i.extend({event:"Artist_Albums_Preview_Play_Event",id:r.id,name:r.name},t));"artist-page-singles-preview"===r.context&&e.push(i.extend({event:"Artist_Singles_Preview_Play_Event",id:r.id,name:r.name},t));"album-page-all"===r.context&&e.push(i.extend({event:"Album_All_Play_Event",id:r.id,name:r.name,albumId:r.albumId,albumName:r.albumName},t));"album-page"===r.context&&e.push(i.extend({event:"Album_Song_Play_Event",id:r.id,name:r.name,albumId:r.albumId,albumName:r.albumName},t));"charts-all"===r.context&&e.push(i.extend({event:"Charts_All_Play_Event",id:r.id,name:r.name},t));"charts"===r.context&&e.push(i.extend({event:"Charts_Play_Event",id:r.id,name:r.name},t));"track-page"===r.context&&e.push(i.extend({event:"Track_Page_Play_Header_Event",id:r.id,name:r.name},t))});n.on("STATS:PLAYER:PLAY30",function(r){e.push(i.extend({event:"Player_Play30_Event",id:r.id,name:r.name},t))});n.on("STATS:DOWNLOAD:CLICK",function(r){"track"===r.type?e.push(i.extend({event:"Download_Track_Event"+(r.abTesting?"_ABTesting_"+r.abTesting:""),id:r.id,name:r.name},t)):e.push(i.extend({event:"Download_Album_Event",id:r.id,name:r.name},t));"charts"===r.context&&e.push(i.extend({event:"Charts_Download_Event",id:r.id,name:r.name,type:r.type},t));"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Download_Event",id:r.id,name:r.name,type:r.type},t));"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Download_Event",id:r.id,name:r.name,type:r.type},t));"artist-page-popular"===r.context&&e.push(i.extend({event:"Artist_Page_Popular_Download_Event",id:r.id,name:r.name,type:r.type},t));"track-page"===r.context&&e.push(i.extend({event:"Track_Page_Header_Download_Event",id:r.id,name:r.name,type:r.type},t));"album-page"===r.context&&e.push(i.extend({event:"Album_Page_Header_Download_Event",id:r.id,name:r.name,type:r.type},t))});n.on("STATS:FAVORITE:ADD",function(r){var n;switch(r.type){case"track":n="Favorite_Track_Add_Event";break;case"artist":n="Favorite_Artist_Add_Event";break;case"album":n="Favorite_Album_Add_Event";break;case"playlist":n="Favorite_Playlist_Add_Event"}e.push(i.extend({event:n,id:r.id,name:r.name},t));"artist-page"===r.context&&e.push(i.extend({event:"Artist_Page_Favorite_Add_Event",id:r.id,name:r.name,type:r.type},t));"artist-page-popular"===r.context&&e.push(i.extend({event:"Artist_Page_Popular_Favorite_Add_Event",id:r.id,name:r.name,type:r.type},t));"album-page"===r.context&&e.push(i.extend({event:"Album_Page_Favorite_Add_Event",id:r.id,name:r.name,type:r.type},t));"charts"===r.context&&e.push(i.extend({event:"Charts_Favorite_Add_Event",id:r.id,name:r.name,type:r.type},t));"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Favorite_Add_Event",id:r.id,name:r.name,type:r.type},t));"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Favorite_Add_Event",id:r.id,name:r.name,type:r.type},t));"track-page"===r.context&&e.push(i.extend({event:"Track_Page_Header_Favorite_Add_Event",id:r.id,name:r.name},t))});n.on("STATS:FAVORITE:REMOVE",function(r){var n;switch(r.type){case"track":n="Favorite_Track_Remove_Event";break;case"artist":n="Favorite_Artist_Remove_Event";break;case"album":n="Favorite_Album_Remove_Event";break;case"playlist":n="Favorite_Playlist_Remove_Event"}e.push(i.extend({event:n,id:r.id,name:r.name},t))});n.on("STATS:REVIEW:WRITE",function(r){switch(r.type){case"track":e.push(i.extend({event:"Review_Track_Write_Event",id:r.id,name:r.name},t));break;case"album":e.push(i.extend({event:"Review_Album_Write_Event",id:r.id,name:r.name},t))}"track-page"===r.context&&e.push(i.extend({event:"Track_Page_Review_Write_Event",id:r.id,name:r.name},t));"album-page"===r.context&&e.push(i.extend({event:"Album_Page_Review_Write_Event",id:r.id,name:r.name},t))});n.on("STATS:REPLY:WRITE",function(r){switch(r.type){case"track":e.push(i.extend({event:"Reply_Track_Write_Event",id:r.id,name:r.name},t));break;case"album":e.push(i.extend({event:"Reply_Album_Write_Event",id:r.id,name:r.name},t))}});n.on("STATS:SHARE:CLICK",function(r){var n;switch(r.service){case"facebook":n="Share_Facebook_Event";break;case"twitter":n="Share_Twitter_Event";break;case"google":n="Share_Google_Event";break;case"reddit":n="Share_Reddit_Event"}e.push(i.extend({event:n,id:r.id,name:r.name,type:r.type},t));"wallpost"===r.context&&e.push(i.extend({event:"Wallpost_Share_Click_Event",id:r.id,name:r.name,type:r.type},t));"charts"===r.context&&e.push(i.extend({event:"Charts_Share_Click_Event",id:r.id,name:r.name,type:r.type},t));"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Share_Click_Event",id:r.id,name:r.name,type:r.type},t));"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Share_Click_Event",id:r.id,name:r.name,type:r.type},t));if("artist-page"===r.context){var o;switch(r.service){case"facebook":o="Artist_Page_Share_Facebook_Event";break;case"twitter":o="Artist_Page_Share_Twitter_Event";break;case"google":o="Artist_Page_Share_Google_Event";break;case"reddit":o="Artist_Page_Share_Reddit_Event"}e.push(i.extend({event:o,id:r.id,name:r.name,type:r.type},t))}if("track-page"===r.context){var a;switch(r.service){case"facebook":a="Track_Page_Share_Facebook_Event";break;case"twitter":a="Track_Page_Share_Twitter_Event";break;case"google":a="Track_Page_Share_Google_Event";break;case"reddit":a="Track_Page_Share_Reddit_Event"}e.push(i.extend({event:a,id:r.id,name:r.name,type:r.type},t))}if("album-page"===r.context){var s;switch(r.service){case"facebook":s="Album_Page_Share_Facebook_Event";break;case"twitter":s="Album_Page_Share_Twitter_Event";break;case"google":s="Album_Page_Share_Google_Event";break;case"reddit":s="Album_Page_Share_Reddit_Event"}e.push(i.extend({event:s,id:r.id,name:r.name,type:r.type},t))}});n.on("STATS:ACCOUNT:CREATE",function(r){e.push(i.extend({event:"Account_Create_Event",type:r.type},t))});n.on("STATS:ACCOUNT:DELETE",function(r){e.push(i.extend({event:"Account_Delete_Event",id:r.id},t))});n.on("STATS:PLAYLIST:CREATE",function(r){e.push(i.extend({event:"Playlist_Create_Event",id:r.id,name:r.name},t))});n.on("STATS:PLAYLIST:ADD",function(r){"track"===r.entityToAddType?e.push(i.extend({event:"Playlist_Add_Track_Event",id:r.id,name:r.name,trackId:r.entityToAddId,trackName:r.entityToAddName},t)):"album"===r.entityToAddType&&e.push(i.extend({event:"Playlist_Add_Album_Event",id:r.id,name:r.name,albumId:r.entityToAddId,albumName:r.entityToAddName},t));"charts"===r.context&&e.push(i.extend({event:"Charts_Playlist_Add_Event",id:r.id,name:r.name,entityType:r.entityToAddType,entityId:r.entityToAddId,entityName:r.entityToAddName},t));"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Playlist_Add_Event",id:r.id,name:r.name,entityType:r.entityToAddType,entityId:r.entityToAddId,entityName:r.entityToAddName},t));"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Playlist_Add_Event",id:r.id,name:r.name,entityType:r.entityToAddType,entityId:r.entityToAddId,entityName:r.entityToAddName},t));"track-page"===r.context&&e.push(i.extend({event:"Track_Page_Header_Playlist_Add_Event",id:r.id,name:r.name,trackId:r.entityToAddId,trackName:r.entityToAddName},t));"album-page"===r.context&&e.push(i.extend({event:"Album_Page_Header_Playlist_Add_Event",id:r.id,name:r.name,trackId:r.entityToAddId,trackName:r.entityToAddName},t))});n.on("STATS:SEARCH:QUERY",function(r){e.push(i.extend({event:"Search_Query_Event",query:r.query},t))});n.on("STATS:PLAYER:OPEN",function(r){"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Open_Event"},t))});n.on("STATS:PLAYER:VOLUME",function(r){"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Volume_Event",volume:100*r.volume},t));"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Volume_Event",volume:100*r.volume},t))});n.on("STATS:PLAYER:REPEAT",function(r){"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Repeat_Event",mode:r.repeatMode},t));"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Repeat_Event",mode:r.repeatMode},t))});n.on("STATS:PLAYER:SHUFFLE",function(r){"mini-player"===r.context&&e.push(i.extend({event:"Mini_Player_Shuffle_Event",mode:r.shuffleMode},t));"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Shuffle_Event",mode:r.shuffleMode},t))});n.on("STATS:PLAYER:QUEUE",function(r){"full-player"===r.context&&e.push(i.extend({event:"Full_Player_Queue_Event"},t))});n.on("STATS:PLAYER:HISTORY",function(r){"full-player"===r.context&&e.push(i.extend({event:"Full_Player_History_Event"},t))});n.on("STATS:HEADER:SEARCHCLICK",function(r){e.push(i.extend({event:"Header_Search_Click_Event"},t))});n.on("STATS:HEADER:NAVIGATIONCLICK",function(r){e.push(i.extend({event:"Header_Navigation_Click_Event"},t))});n.on("STATS:HEADER:BACKCLICK",function(r){e.push(i.extend({event:"Header_Back_Click_Event"},t))});n.on("STATS:HEADER:LOGOCLICK",function(r){e.push(i.extend({event:"Header_Logo_Click_Event"},t))});n.on("STATS:SPLASH:REDIRECT",function(r){switch(r.type){case"music":e.push(i.extend({event:"Splash_Redirect_To_Music_Event"},t));break;case"licensing":e.push(i.extend({event:"Splash_Redirect_To_Licensing_Event"},t))}});n.on("STATS:SPLASH:LOGIN",function(r){e.push(i.extend({event:"Splash_Login_Event"},t))});n.on("STATS:SPLASH:REDIRECT:LICENSING",function(r){switch(r.type){case"catalog":e.push(i.extend({event:"Splash_Redirect_To_Licensing_Catalog_Event"},t));break;case"instore":e.push(i.extend({event:"Splash_Redirect_To_Licensing_InStore_Event"},t))}});document.addEventListener("jampageloaded",function(){setTimeout(function(){e.push({event:"optimize.activate"})},32)})};return e}();t.default=o});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/stats/player",["require","exports","jamtracker","player","../vendor/chromedevtools/elements/dompath","../library/media/audio/universalplayer","../views/layout/player","player/dist/track"],e)}(function(e,t){"use strict";function r(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=_.getAttribute("custom").playId);var n=Date.now();if(!(!t&&e-d<10||!r)){_.setSample(d,e).send({custom:{playId:r}});d=e;p=n}}
46Object.defineProperty(t,"__esModule",{value:!0});var n=e("jamtracker"),i=e("player"),o=e("../vendor/chromedevtools/elements/dompath"),a=e("../library/media/audio/universalplayer"),s=e("../views/layout/player"),l=e("player/dist/track"),u=0,c=0,d=-1,p=-1,f={currentEntity:"",currentEntityId:""},h=Promise.resolve(!1),m=Promise.resolve(!1),y=new n.Player.PlayTracker;y.setAction(n.Player.EPlayAction.Play);var g=y.createTracker(),v=new g;v.setEntity("track");var _=new n.Player.ListenTracker;_.setAction(n.Player.EListenAction.Listen).setEntity("track");var b={};b[i.EPlayOrigin.First]=n.Player.EPlayOrigin.First;b[i.EPlayOrigin.Next]=n.Player.EPlayOrigin.Autonext;b[i.EPlayOrigin.Previous]=n.Player.EPlayOrigin.Prev;b[i.EPlayOrigin.Select]=n.Player.EPlayOrigin.Select;b[i.EPlayOrigin.Skip]=n.Player.EPlayOrigin.Skip;var w=function(e,t){var r=e.get("stats");if(f.currentEntity!==r.entity||f.currentEntityId!==r.entityId){var n=++u;_.setPlayId(void 0);y.setTracklistId(void 0);++c;m=Promise.resolve(!1);var i=o.default.cssPath(t[0]),a=Object.assign({uri:""+location.pathname+location.search},r,{custom:Object.assign({selector:i},r.custom)});a.entityId=(a.entityId||"").toString();h=y.send(a).then(function(e){if(n!==u)return!1;var t=JSON.parse(e[0]);t.tracklistId&&y.setTracklistId(t.tracklistId);v.setFrom(r.entity).setFromId((r.entityId||"").toString());return!0});f.currentEntity=r.entity;f.currentEntityId=r.entityId}};s.default.on(s.default.Event.RADIO,w);s.default.on(s.default.Event.PLAY,w);a.default.pipeTracklist(function(e){e.onTrack(function(e,t,n,i){var o=e.trackInfo;if(i){h.then(function(e){if(!1!==e){var r=++c,n={entityId:o.infos.id.toString(),origin:b[i],custom:{format:a.default.getStreamFormat(),trackNo:t}};m=v.send(n).then(function(e){if(r!==c)return!1;var t=JSON.parse(e[0]);_.setEntityId(o.infos.id.toString()).setPlayId(t.playId);d=0;return!0})}});e.onProgress(function(e){if(null!==e.fromPosition&&void 0!==e.fromPosition)return m.then(function(t){if(t){r(e.fromPosition,!0);d=e.position}});m.then(function(t){t&&r(e.position)})});e.onComplete(function(e){m.then(function(){r(e.position,!0)})});e.onStatus(function(e){switch(e.state){case l.ETrackState.Stop:var t=_.getAttribute("custom").playId;m.then(function(){r(e.position,!0,t)})}})}})})});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/stats/index",["require","exports","./player","./search","jamtracker","../configuration/configuration","../library/utilities/deployment","../configuration/bootLoader"],e)}(function(e,t,r,n){"use strict";function i(e){o.Initialize("music",l.getValue(l.Properties.Tracker.Application,"browser"),{transports:e,domain:"jamendo.com",secure:!s.default.isEnvironment("development"),host:a.default.tracker.endpoint,monitoring:{rules:[function(e){return!!e.name.includes(a.default.notificationSystem.proxyPublisher.hostname)&&a.default.tracker.monitoring.resources.notificationSystem.duration}]}})}Object.defineProperty(t,"__esModule",{value:!0});var o=e("jamtracker"),a=e("../configuration/configuration"),s=e("../library/utilities/deployment"),l=e("../configuration/bootLoader");t.initialize=i});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/stats/user",["require","exports","jamtracker","../managers/manager"],e)}(function(e,t){"use strict";function r(e){void 0!==e&&null!==e&&(e=e.toString());n.baseTracker.setUserId(e)}Object.defineProperty(t,"__esModule",{value:!0});var n=e("jamtracker"),i=e("../managers/manager");t.setUserId=r;i.UserManager.on("userconnected",function(e){r(e.get("id").toString())});i.UserManager.on("userdisconnected",function(){r(void 0)})});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)
47}else"function"==typeof define&&define.amd&&define("Client/scripts/bootstrap",["require","exports","ribsjs","jquery","Server/scripts/managers/manager","jamtracker","./library/plugin/router","./library/plugin/jquery/hammer","./library/plugin/jquery/navigation","./library/plugin/jquery/picturefill","./library/plugin/jquery/velocity","./library/plugin/jquery/croppie","./library/plugin/jquery/stickyfill","Server/scripts/library/adapter/clientAdapter","Server/scripts/library/adapter/cordovaTemplateAdapter","Server/scripts/library/adapter/cordovaTemplateBundleAdapter","Server/scripts/library/adapter/favoritesClientAdapter","Server/scripts/library/adapter/sim
47ilarsClientAdapter","Server/scripts/library/adapter/cache/indexedDb","Server/scripts/managers/fetcher/indexedDbFetcherPlugin","Server/scripts/managers/fetcher/localFetcherPlugin","Server/scripts/managers/fetcher/remoteFetcherPlugin","Server/scripts/managers/fetcher/indexedDb/favoritesIndexedDbFetcherPlugin","Server/scripts/managers/fetcher/local/historyLocalFetcherPlugin","Server/scripts/managers/fetcher/local/legalLocalFetcherPlugin","Server/scripts/managers/fetcher/local/localizationLocalFetcherPlugin","Server/scripts/managers/fetcher/indexedDb/localizationIndexedDbFetcherPlugin","Server/scripts/managers/fetcher/remote/localizationRemoteFetcherPlugin","Server/scripts/managers/fetcher/indexedDb/playlistsIndexedDbFetcherPlugin","Server/scripts/managers/fetcher/indexedDb/queryIndexedDbFetcherPlugin","Server/scripts/managers/fetcher/indexedDb/reviewsIndexedDbFetcherPlugin","Server/scripts/managers/fetcher/indexedDb/tagsIndexedDbFetcherPlugin","Server/scripts/managers/fetcher/indexedDb/usersIndexedDbFetcherPlugin","Server/scripts/collections/manager/albums","Server/scripts/collections/manager/artists","Server/scripts/collections/manager/charts","Server/scripts/collections/manager/favorites","Server/scripts/collections/manager/history","Server/scripts/collections/manager/legals","Server/scripts/collections/manager/localization","Server/scripts/collections/manager/playlists","Server/scripts/collections/manager/posts","Server/scripts/collections/manager/radios","Server/scripts/collections/manager/reviews","Server/scripts/collections/manager/sentiment","Server/scripts/collections/manager/search","Server/scripts/collections/manager/similars","Server/scripts/collections/manager/static","Server/scripts/collections/manager/template","Server/scripts/collections/manager/track","Server/scripts/collections/manager/user","Server/scripts/collections/manager/tags","Server/scripts/collections/manager/updateManagerCollection","Server/scripts/models/manager/favorite","Server/scripts/models/manager/history","Server/scripts/models/manager/review","Server/scripts/models/manager/sentiment","Server/scripts/models/manager/artist","Server/scripts/models/manager/user","Server/scripts/models/manager/playlist","Server/scripts/library/view/helper","./library/plugin/tagmanager","Server/scripts/configuration/configuration","Server/scripts/configuration/bootLoader","Server/scripts/stats/index","Server/scripts/stats/user"],e)}(function(e,t){"use strict";var r,n=e("ribsjs"),i=e("jquery"),o=e("Server/scripts/managers/manager"),a=e("jamtracker"),s=e("./library/plugin/router"),l=e("./library/plugin/jquery/hammer"),u=e("./library/plugin/jquery/navigation"),c=e("./library/plugin/jquery/picturefill"),d=e("./library/plugin/jquery/velocity"),p=e("./library/plugin/jquery/croppie"),f=e("./library/plugin/jquery/stickyfill"),h=e("Server/scripts/library/adapter/clientAdapter"),m=e("Server/scripts/library/adapter/cordovaTemplateAdapter"),y=e("Server/scripts/library/adapter/cordovaTemplateBundleAdapter"),g=e("Server/scripts/library/adapter/favoritesClientAdapter"),v=e("Server/scripts/library/adapter/similarsClientAdapter"),_=e("Server/scripts/library/adapter/cache/indexedDb"),b=e("Server/scripts/managers/fetcher/indexedDbFetcherPlugin"),w=e("Server/scripts/managers/fetcher/localFetcherPlugin"),x=e("Server/scripts/managers/fetcher/remoteFetcherPlugin"),M=e("Server/scripts/managers/fetcher/indexedDb/favoritesIndexedDbFetcherPlugin"),S=e("Server/scripts/managers/fetcher/local/historyLocalFetcherPlugin"),k=e("Server/scripts/managers/fetcher/local/legalLocalFetcherPlugin"),T=e("Server/scripts/managers/fetcher/local/localizationLocalFetcherPlugin"),A=e("Server/scripts/managers/fetcher/indexedDb/localizationIndexedDbFetcherPlugin"),E=e("Server/scripts/managers/fetcher/remote/localizationRemoteFetcherPlugin"),P=e("Server/scripts/managers/fetcher/indexedDb/playlistsIndexedDbFetcherPlugin"),O=e("Server/scripts/managers/fetcher/indexedDb/queryIndexedDbFetcherPlugin"),j=e("Server/scripts/managers/fetcher/indexedDb/reviewsIndexedDbFetcherPlugin"),D=e("Server/scripts/managers/fetcher/indexedDb/tagsIndexedDbFetcherPlugin"),C=e("Server/scripts/managers/fetcher/indexedDb/usersIndexedDbFetcherPlugin"),L=e("Server/scripts/collections/manager/albums"),I=e("Server/scripts/collections/manager/artists"),R=e("Server/scripts/collections/manager/charts"),Y=e("Server/scripts/collections/manager/favorites"),N=e("Server/scripts/collections/manager/history"),F=e("Server/scripts/collections/manager/legals"),W=e("Server/scripts/collections/manager/localization"),U=e("Server/scripts/collections/manager/
47playlists"),q=e("Server/scripts/collections/manager/posts"),H=e("Server/scripts/collections/manager/radios"),V=e("Server/scripts/collections/manager/reviews"),B=e("Server/scripts/collections/manager/sentiment"),z=e("Server/scripts/collections/manager/search"),K=e("Server/scripts/collections/manager/similars"),$=e("Server/scripts/collections/manager/static"),G=e("Server/scripts/collections/manager/template"),J=e("Server/scripts/collections/manager/track"),Q=e("Server/scripts/collections/manager/user"),X=e("Server/scripts/collections/manager/tags"),Z=e("Server/scripts/collections/manager/updateManagerCollection"),ee=e("Server/scripts/models/manager/favorite"),te=e("Server/scripts/models/manager/history"),re=e("Server/scripts/models/manager/review"),ne=e("Server/scripts/models/manager/sentiment"),ie=e("Server/scripts/models/manager/artist"),oe=e("Server/scripts/models/manager/user"),ae=e("Server/scripts/models/manager/playlist"),se=e("Server/scripts/library/view/helper"),le=e("./library/plugin/tagmanager"),ue=e("Server/scripts/configuration/configuration"),ce=e("Server/scripts/configuration/bootLoader"),de=e("Server/scripts/stats/index"),pe=e("Server/scripts/stats/user");!function(e){function t(){console.info("STARTING BOOTSTRAP");r();var e=ce.getValue(ce.Properties.Application.ResetIndexedDb);_.initialize(e).then(function(e){e&&console.warn(e);localStorage.setItem("resetIndexedDb","no");fe()}).catch(function(e){console.error(e);fe()})}function r(){var e=i.cookie(ue.default.cookies.connection.name)||void 0;pe.setUserId(e);de.initialize([(new a.Tracker.Transport.TransportXMLHttpRequest).url(ue.default.tracker.endpoint).setMethod(a.Tracker.Transport.Method.Post)])}function fe(){me();ge();ve();n.EventsManager.trigger(n.EventsManager.constants.DOM_LOADED);_e||he()}function he(){l.default.initialize();u.default.initialize();"HTMLPictureElement"in window&&"srcset"in document.createElement("img")||c.default.initialize();d.default.initialize();p.default.initialize();f.default.initialize();s.default.initialize();_e=!0}function me(){o.FavoritesManager.fetcher.collection=new Y.default({url:ue.default.api.getUrl(ue.default.api.methods.favorite),model:ee.default});ee.default.url=ue.default.api.getUrl(ue.default.api.methods.favorite);o.FavoritesManager.fetcher.collection.adapter=new g.FavoritesClientAdapter({collection:o.FavoritesManager.fetcher.collection});o.AlbumsManager.fetcher.collection=new L.default({url:ue.default.api.getUrl(ue.default.api.methods.albums)});o.AlbumsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.AlbumsManager.fetcher.collection});o.ArtistsManager.fetcher.collection=new I.default({url:ue.default.api.getUrl(ue.default.api.methods.artists)});o.ArtistsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.ArtistsManager.fetcher.collection});o.ChartsManager.fetcher.collection=new R.default({url:ue.default.api.getUrl(ue.default.api.methods.charts)});o.ChartsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.ChartsManager.fetcher.collection});o.HistoryManager.fetcher.collection=new N.default({url:ue.default.api.getUrl(ue.default.api.methods.history),model:te.default});o.HistoryManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.HistoryManager.fetcher.collection});o.LegalsManager.fetcher.collection=new F.default({url:ue.default.api.getUrl(ue.default.api.methods.legals)});o.LegalsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.LegalsManager.fetcher.collection});o.LocalizationManager.fetcher.collection=new W.default(ce.getValue(ce.Properties.Manager.Localization.Models),{url:ue.default.api.getUrl(ue.default.api.methods.translationback)});o.LocalizationManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.LocalizationManager.fetcher.collection});o.PlaylistsManager.fetcher.collection=new U.default({url:ue.default.api.getUrl(ue.default.api.methods.playlists),model:ae.default});o.PlaylistsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.PlaylistsManager.fetcher.collection});o.PostsManager.fetcher.collection=new q.default({url:ue.default.api.getUrl(ue.default.api.methods.postsback)});
47o.PostsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.PostsManager.fetcher.collection});o.RadiosManager.fetcher.collection=new H.default({url:ue.default.api.getUrl(ue.default.api.methods.radios)});o.RadiosManager.planningCollection.url=ue.default.api.getUrl(ue.default.api.methods.radiosPlanning);o.RadiosManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.RadiosManager.fetcher.collection});o.RadiosManager.planningCollection.adapter=new h.ClientAdapter({collection:o.RadiosManager.planningCollection});o.ReviewsManager.fetcher.collection=new V.default({url:ue.default.api.getUrl(ue.default.api.methods.reviews),model:re.default});o.ReviewsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.ReviewsManager.fetcher.collection});o.SentimentManager.fetcher.collection=new B.default({url:ue.default.api.getUrl(ue.default.api.methods.reviewsSentiment),model:ne.default});o.SentimentManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.SentimentManager.fetcher.collection});o.SearchManager.fetcher.collection=new z.default({url:ue.default.api.getUrl(ue.default.api.methods.search)});o.SearchManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.SearchManager.fetcher.collection});o.SimilarsManager.fetcher.collection=new K.default({url:ue.default.api.getUrl(ue.default.api.methods.similars)});o.SimilarsManager.fetcher.collection.adapter=new v.SimilarsClientAdapter({collection:o.SimilarsManager.fetcher.collection});o.StaticManager.fetcher.collection=new $.default({url:ue.default.api.getUrl(ue.default.api.methods.static)});o.StaticManager.fetcher.collection.adapter=new h.ClientAdapter({url:o.StaticManager.fetcher.collection});o.TemplateManager.fetcher.collection=new G.default({url:ue.default.api.getUrl(ue.default.api.methods.template)});if("cordova"===ce.getValue(ce.Properties.Adapter.Template.Class)){o.TemplateManager.fetcher.collection.adapter=new m.default({collection:o.TemplateManager.fetcher.collection,fileExtension:"ejs"});o.TemplateManager.fetcher.collection.adapter||(o.TemplateManager.fetcher.collection.adapter=new y.default({collection:o.TemplateManager.fetcher.collection,fileExtension:"ejs"}))}else o.TemplateManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.TemplateManager.fetcher.collection});o.TracksManager.fetcher.collection=new J.default({url:ue.default.api.getUrl(ue.default.api.methods.track)});o.TracksManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.TracksManager.fetcher.collection});o.UserManager.fetcher.collection=new Q.default({url:ue.default.api.getUrl(ue.default.api.methods.user),model:oe.default});o.UserManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.UserManager.fetcher.collection});o.TagsManager.fetcher.collection=new X.default({url:ue.default.api.getUrl(ue.default.api.methods.tags)});o.TagsManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.TagsManager.fetcher.collection});o.UpdateManager.fetcher.collection=new Z.default({url:ue.default.api.getUrl(ue.default.api.methods.update)});o.UpdateManager.fetcher.collection.adapter=new h.ClientAdapter({collection:o.UpdateManager.fetcher.collection});ee.default.Adapter=h.ClientAdapter;te.default.url=ue.default.api.getUrl(ue.default.api.methods.history);te.default.Adapter=h.ClientAdapter;ie.default.url=ue.default.api.getUrl(ue.default.api.methods.artists);ie.default.Adapter=h.ClientAdapter;oe.default.url=ue.default.api.getUrl(ue.default.api.methods.user);oe.default.Adapter=h.ClientAdapter;re.default.url=ue.default.api.getUrl(ue.default.api.methods.reviews);re.default.Adapter=h.ClientAdapter;ne.default.url=ue.default.api.getUrl(ue.default.api.methods.reviewsSentiment);ne.default.Adapter=h.ClientAdapter;ae.default.url=ue.default.api.getUrl(ue.default.api.methods.playlists);ae.default.Adapter=h.ClientAdapter;var e=ye();if(_.isActive){var t={};if(e instanceof Promise){e.then(function(e){Object.keys(e).forEach(function(r){t[r].saveBundle(e[r])})});e={}}o.AlbumsManager.fetcher.addFetcher(t.album=new O.QueryIndexedDbFetcherPlugin(o.AlbumsManager.fetcher,{primaryKey:["id"],secondaryKey:["tagId","order","country","limit","offset"],table:"albums",timeToLive:ue.default.indexedDb.object.expire.medium,bundle:e.album}));o.ArtistsManager.fetcher.addFetcher(t.artist=new O.QueryIndexedDbFetcherPlugin(o.ArtistsManager.fetcher,{primaryKey:["id"],secondaryKey:["tagId","order","country","limit","offset"],table:"artists",timeToLive:ue.default.indexedDb.object.expire.medium,bundle:e.artist}));o.ChartsManager.fetcher.addFetcher(t.charts=new O.QueryIndexedDbFetcherPlugin(o.ChartsManager.fetcher,{primaryKey:["type","tagId","artistId"],secondaryKey:["order","country","limit","offset"],table:"charts",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.charts}));o.FavoritesManager.fetcher.addFetcher(t.favorite=new M.FavoritesIndexedDbFetcherPlugin(o.FavoritesManager.fetcher,{primaryKey:["type","id","userId"],secondaryKey:["limit","offset"],table:"favorites",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.favorite}));o.LegalsManager.fetcher.addFetcher(t.legal=new A.LocalizationIndexedDbFetcherPlugin(o.LocalizationManager.fetcher,{primaryKey:["id","lang"],table:"legals",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.legal}));o.LocalizationManager.fetcher.addFetcher(t.translation=new A.LocalizationIndexedDbFetcherPlugin(o.LocalizationManager.fetcher,{primaryKey:["id","lang"],table:"localizations",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.translation}));o.PlaylistsManager.fetcher.addFetcher(t.playlist=new P.PlaylistsIndexedDbFetcherPlugin(o.PlaylistsManager.fetcher,{primaryKey:["id"],secondaryKey:["userId","featured","limit","offset"],table:"playlists",bundle:e.playlist}));
47o.PostsManager.fetcher.addFetcher(t.posts=new O.QueryIndexedDbFetcherPlugin(o.PostsManager.fetcher,{primaryKey:["category"],secondaryKey:["limit","offset"],table:"posts",timeToLive:ue.default.indexedDb.object.expire.short,bundle:e.posts}));o.RadiosManager.fetcher.addFetcher(t.radio=new O.QueryIndexedDbFetcherPlugin(o.RadiosManager.fetcher,{primaryKey:["idstr"],table:"radios",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.radio}));o.ReviewsManager.fetcher.addFetcher(t.reviews=new j.ReviewsIndexedDbFetcherPlugin(o.ReviewsManager.fetcher,{primaryKey:["id","joinId","type"],secondaryKey:["limit","offset","order"],table:"reviews",bundle:e.reviews}));o.SearchManager.fetcher.addFetcher(t.search=new O.QueryIndexedDbFetcherPlugin(o.SearchManager.fetcher,{primaryKey:["query","type"],secondaryKey:["limit","offset"],table:"search",bundle:e.search}));o.SentimentManager.fetcher.addFetcher(t.sentiment=new b.IndexedDbFetcherPlugin(o.SentimentManager.fetcher,{primaryKey:["reviewId"],table:"sentiments",bundle:e.sentiment}));o.SimilarsManager.fetcher.addFetcher(t.similar=new O.QueryIndexedDbFetcherPlugin(o.SimilarsManager.fetcher,{primaryKey:["type","id"],table:"similars",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.similar}));o.StaticManager.fetcher.addFetcher(t.static=new O.QueryIndexedDbFetcherPlugin(o.StaticManager.fetcher,{primaryKey:["name","lang"],secondaryKey:["type"],table:"statics",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.static}));o.TemplateManager.fetcher.addFetcher(t.template=new b.IndexedDbFetcherPlugin(o.TemplateManager.fetcher,{primaryKey:["id"],table:"templates",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.template}));o.TracksManager.fetcher.addFetcher(t.track=new O.QueryIndexedDbFetcherPlugin(o.TracksManager.fetcher,{primaryKey:["id"],secondaryKey:["artistId","tagId","order","country","limit","offset"],table:"tracks",timeToLive:ue.default.indexedDb.object.expire.medium,bundle:e.track}));o.UserManager.fetcher.addFetcher(t.user=new C.UsersIndexedDbFetcherPlugin(o.UserManager.fetcher,{primaryKey:["id"],table:"users",bundle:e.user}));o.TagsManager.fetcher.addFetcher(t.tags=new D.TagsIndexedDbFetcherPlugin(o.TagsManager.fetcher,{primaryKey:["name","lang"],secondaryKey:["category","limit","offset","order"],table:"tags",timeToLive:ue.default.indexedDb.object.expire.long,bundle:e.tags}))}else{o.AlbumsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.AlbumsManager.fetcher));o.ArtistsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.ArtistsManager.fetcher));o.ChartsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.ChartsManager.fetcher));o.FavoritesManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.FavoritesManager.fetcher));o.LegalsManager.fetcher.addFetcher(new k.LegalLocalFetcherPlugin(o.LocalizationManager.fetcher));o.LocalizationManager.fetcher.addFetcher(new T.default(o.LocalizationManager.fetcher));o.PlaylistsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.PlaylistsManager.fetcher));o.PostsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.PostsManager.fetcher));o.RadiosManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.RadiosManager.fetcher));o.ReviewsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.ReviewsManager.fetcher));o.SearchManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.SearchManager.fetcher));o.SentimentManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.SentimentManager.fetcher));o.SimilarsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.SimilarsManager.fetcher));o.StaticManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.StaticManager.fetcher));o.TemplateManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.TemplateManager.fetcher));o.TracksManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.TracksManager.fetcher));o.UserManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.UserManager.fetcher));o.TagsManager.fetcher.addFetcher(new w.LocalFetcherPlugin(o.TagsManager.fetcher))}o.ArtistsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.ArtistsManager.fetcher));o.AlbumsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.AlbumsManager.fetcher));o.ChartsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.ChartsManager.fetcher));o.FavoritesManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.FavoritesManager.fetcher));o.HistoryManager.fetcher.addFetcher(new S.default(o.HistoryManager.fetcher));o.HistoryManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.HistoryManager.fetcher));o.LegalsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.LegalsManager.fetcher));o.LocalizationManager.fetcher.addFetcher(new E.LocalizationRemoteFetcherPlugin(o.LocalizationManager.fetcher));o.PlaylistsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.PlaylistsManager.fetcher));
47o.PostsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.PostsManager.fetcher));o.RadiosManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.RadiosManager.fetcher));o.ReviewsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.ReviewsManager.fetcher));o.SearchManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.SearchManager.fetcher));o.SentimentManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.SentimentManager.fetcher));o.SimilarsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.SimilarsManager.fetcher));o.StaticManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.StaticManager.fetcher));o.TemplateManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.TemplateManager.fetcher));o.TracksManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.TracksManager.fetcher));o.UserManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.UserManager.fetcher));o.TagsManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.TagsManager.fetcher));o.UpdateManager.fetcher.addFetcher(new x.RemoteFetcherPlugin(o.UpdateManager.fetcher))}function ye(){var e=i("#app-bundled-models");if(!e.length)return new Promise(function(e){setTimeout(function(){var t=ye();if(t instanceof Promise)return t.then(e);e(t)},32)});var t=e.data("bundledModels");e.remove();return t||{}}function ge(){n.ViewHelper.add("_t",se.Text.translate);n.ViewHelper.add("_bt",se.Text.batchTranslate);n.ViewHelper.add("sprintf",se.Text.sprintf);n.ViewHelper.add("url",se.Text.url);n.ViewHelper.add("formatDate",se.Text.formatDate);n.ViewHelper.add("formatDuration",se.Text.formatDuration);n.ViewHelper.add("formatDurationSchema",se.Text.formatDurationSchema);n.ViewHelper.add("fromNow",se.Text.fromNow);n.ViewHelper.add("valueFromId",se.Text.valueFromId);n.ViewHelper.add("formatDateFromTimestamp",se.Text.formatDateFromTimestamp);n.ViewHelper.add("getDefaultDateFormat",se.Text.getDefaultDateFormat);n.ViewHelper.add("formatNumber",se.Text.formatNumber);n.ViewHelper.add("niceurl",se.Text.niceurl);n.ViewHelper.add("imageUrl",se.Text.imageUrl);n.ViewHelper.add("countryCodeToCountry",se.Text.countryCodeToCountry);n.ViewHelper.add("parseTagInText",se.Text.parseTagInText);n.ViewHelper.add("extractHeadline",se.Text.extractHeadline);n.ViewHelper.add("equalTo",se.Utils.equalTo);n.ViewHelper.add("getValue",se.Utils.getValue);n.ViewHelper.add("isset",se.Utils.isset);n.ViewHelper.add("viewLoader",se.View.viewLoader);n.ViewHelper.add("websiteName",ue.default.application.websiteName);n.ViewHelper.add("websiteUrl",ue.default.application.websiteProtocol+ue.default.application.websiteHostname);n.ViewHelper.add("websiteLogo",ue.default.application.websiteLogo)}function ve(){(new le.default).initializeListeners()}var _e=!1;e.start=t}(r||(r={}));return r});!function(){function e(e,t,r,n){var i,o=!1,a=!1,s=!1;if(r)if("object"==typeof r){s=!!r.passive;a=!!r.useCapture}else a=r;s&&(o=!0);if(o){i=a.toString();i+=s.toString()}n(o,i,a,s)}var t=!1;document.createElement("div").addEventListener("test",function(){},{get passive(){t=!0;return!1}});if(!t){var r=r||Element,n=r.prototype.addEventListener,i=r.prototype.removeEventListener,o=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.__passive?console.warn("Ignored attempt to preventDefault an event from a passive listener"):o.apply(this)};r.prototype.addEventListener=function(t,r,i){var o=this;e(t,r,i,function(e,i,a,s){if(e){var i=a.toString();i+=s.toString();this.__event_listeners_options||(this.__event_listeners_options={});this.__event_listeners_options[t]||(this.__event_listeners_options[t]={});this.__event_listeners_options[t][r]||(this.__event_listeners_options[t][r]=[]);if(this.__event_listeners_options[t][r][i])return;var l={handleEvent:function(e){e.__passive=s;"function"==typeof r?r(e):r.handleEvent(e);e.__passive=!1}};this.__event_listeners_options[t][r][i]=l;n.call(o,t,l,a)}else n.call(o,t,r,a)})};r.prototype.removeEventListener=function(t,r,n){var o=this;e(t,r,n,function(e,n,a,s){if(e&&this.__event_listeners_options&&this.__event_listeners_options[t]&&this.__event_listeners_options[t][r]&&this.__event_listeners_options[t][r][n]){i.call(o,t,this.__event_listeners_options[t][r][n],!1);delete this.__event_listeners_options[t][r][n];0==this.__event_listeners_options[t][r].length&&delete this.__event_listeners_options[t][r]}else i.call(o,t,r,a)})}}}();define("polyfill.eventlisteneroptions",function(){});requirejs.config({baseUrl:"object"==typeof window?window.musicPath||"/":"/",waitSeconds:30,packages:[{name:"ribsjs",main:"ribs",location:"./node_modules/ribsjs/build"},{name:"underscore",main:"underscore",location:"./node_modules/underscore"},{name:"backbone",main:"backbone",location:"./node_modules/backbone"},{name:"core-js",main:"client/core",location:"./node_modules/core-js"},{name:"jquery",main:"jquery",location:"./node_modules/jquery/dist"},{name:"jquery.cookie",main:"jquery.cookie",location:"./node_modules/jquery.cookie"},{name:"moment",main:"moment-with-locales",location:"./node_modules/moment/min"},{name:"nicescroll",main:"jquery.nicescroll",location:"./node_modules/nicescroll"},{name:"croppie",main:"croppie",location:"./node_modules/croppie"},{name:"FSEventDispatcher",main:"eventdispatcher",location:"./node_modules/FSEventDispatcher/dist"}
47,{name:"FSPromise",main:"FSPromise",location:"./node_modules/FSPromise/build"},{name:"chrisweb-utilities",main:"utilities",location:"./node_modules/chrisweb-utilities"},{name:"hammerjs",main:"hammer",location:"./node_modules/hammerjs"},{name:"hammer-timejs",main:"hammer-time",location:"./node_modules/hammer-timejs"},{name:"velocity-animate",main:"velocity",location:"./node_modules/velocity-animate"},{name:"picturefill",main:"dist/picturefill",location:"./node_modules/picturefill"},{name:"stickyfilljs",main:"dist/stickyfill",location:"./node_modules/stickyfilljs"},{name:"piexif",main:"piexif",location:"./node_modules/piexifjs"},{name:"player",main:"dist/player",location:"./node_modules/player"},{name:"speakingurl",main:"speakingurl",location:"./node_modules/speakingurl/lib"},{name:"clipboard",main:"clipboard",location:"./node_modules/clipboard/dist"},{name:"notif-server",main:"bundle",location:"./node_modules/notif-server/dist"},{name:"jamendo-text-formatter",main:"bundle",location:"./node_modules/jamendo-text-formatter/dist"},{name:"jamtracker",main:"jamstats",location:"./node_modules/jamtracker/dist"},{name:"crc",main:"lib/index",location:"./node_modules/crc"},{name:"jamtracker",main:"dist/jamstats",location:"./node_modules/jamtracker"}],paths:{bootstrap:"Client/scripts/bootstrap","polyfill.eventlisteneroptions":"Client/scripts/vendor/polyfill/EventListenerOptions.polyfill"},shim:{velocity:{deps:["jquery"]},"jquery.cookie":{deps:["jquery"]},"polyfill.eventlisteneroptions":{}}});requirejs(["core-js","Server/scripts/configuration/bootLoader","player/dist/browser-register"],function(e,t){global=void 0;requirejs(["Client/scripts/bootstrap","polyfill.eventlisteneroptions"],function(e){e.start()})});define("Client/main",function(){});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/swipeMenu",["require","exports","jquery","underscore","./view","chrisweb-utilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("underscore"),i=e("./view"),o=e("chrisweb-utilities"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.$swipeTab=r();t.$swipeList=r();return t}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.listenTo(this.model,"change",this.onAttributeChange);this.resizeCallback=this.animateMenu.bind(this);r(window).on("resize",this.resizeCallback)};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$swipeTab=this.$(".js-swipe-tab");this.$swipeList=this.$(".js-swipe-item-list");this.showOrHideSwipeMenu()};t.prototype.events=function(){return{"click .js-swipe-tab":"onClickTab"}};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();n.keys(t).forEach(function(t){var r=e.model.get(t);switch(t){case"activeTab":e.$swipeTab.removeClass("is-active");e.$swipeList.find('[href="'+r.split("?")[0]+'"]').parent().addClass("is-active");e.animateMenu()}})};t.prototype.onClickTab=function(e){e.preventDefault();e.stopPropagation();this.trigger(t.Events.CHANGE_TAB,e)};t.prototype.showOrHideSwipeMenu=function(){if(this.model.get("swipeItems").length){this.$(".pivot-bar").css("display","block");r("html").addClass("has-pivot")}else{this.$(".pivot-bar").css("display","none");r("html").removeClass("has-pivot")}};t.prototype.animateMenu=function(){if(o.default.isClient()){var e=this.$swipeList.children();if(this.isDispatch)if(e.length>1){var t=r("#skeleton-content-wrap").width(),n=-1,i=Math.max(this.$swipeList.outerWidth(!0)-t,0),a=this.getCurrentSwipeItemIndex();if(a<1||!i)n=0;else if(a===e.length-1)n=i;else{var s=e.eq(a),l=s.position().left,u=s.width();n=Math.max(l+u/2-t/2,0)}n=Math.min(n,i);this.$swipeList.velocity({left:-n+"px"})}else this.$swipeList.velocity({left:"0px"})}};t.prototype.getCurrentSwipeItemIndex=function(){return this.$swipeList.children().index(this.$swipeList.find("li.is-active"))};t.prototype.close=function(){this.stopListening(this.model,"change",this.onAttributeChange);r(window).off("resize",this.resizeCallback);this.resizeCallback=null;r("html").removeClass("has-pivot");e.prototype.close.call(this)};t.Events={CHANGE_TAB:"tab:change"};return t}(i.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/layout/menu",["require","exports","../../library/view/swipeMe
47nu"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/swipeMenu"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/layout/menu"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/swipe",["require","exports","underscore","jquery","../../configuration/configuration","../../library/model/model","../../library/utilities/route","chrisweb-utilities","./view","../../views/layout","../../views/layout/menu","ribsjs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
48;var r=e("underscore"),n=e("jquery"),i=e("../../configuration/configuration"),o=e("../../library/model/model"),a=e("../../library/utilities/route"),s=e("chrisweb-utilities"),l=e("./view"),u=e("../../views/layout"),c=e("../../views/layout/menu"),d=e("ribsjs"),p=function(e){function t(t){return e.call(this,r.extend({useHammer:!0},t))||this}__extends(t,e);t.prototype.onInitializeStart=function(){var t=this,n="";this.currentViewIndex=0;this.animate=!0;this.firstInit=!0;var i=this.options.swipeViews.map(function(e,i){var o=r.extend({userData:t.options.userData,router:t.options.router,loadingStyle:{template:"li",page:!0}},e.options);e.view=new e.viewClass(o);var a=t.getUrl(e);a.includes("?")&&(a=a.split("?")[0]);if(e.name===t.options.currentView){t.currentViewIndex=i;n=a}return{title:e.titleKey,href:a,name:e.name}});this.menuOptions={model:new o.default({swipeItems:i,activeTab:n})};e.prototype.onInitializeStart.call(this)};t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);this.menuView=new c.default(this.menuOptions);this.addView(".js-pivot-menu",this.menuView);if(s.default.isClient()){this.listenTo(this.menuView,u.default.Events.CHANGE_TAB,this.goToTab);d.EventsManager.on("popstate",this.onNavigate,this);d.EventsManager.on(a.default.Events.InternalNavigation,this.onNavigate,this)}"headerView"in this.options&&this.addView(".js-pivot-header-incontainer",this.options.headerView);this.options.renderPromise?this.options.renderPromise.then(function(){return t.setCurrentViewIndex(t.currentViewIndex,!0)}):this.options.renderPromise=this.setCurrentViewIndex(this.currentViewIndex,!0)};t.prototype.getTabMetaData=function(e,t){void 0===e&&(e=this.currentViewIndex);void 0===t&&(t=!1);var r=this.options.swipeViews[e];return{url:this.getUrl(r),replace:t,metaTitle:r.metaTitle instanceof Function?r.metaTitle(this.model):r.metaTitle,metaDescription:r.metaDescription,metaKeywords:r.metaKeywords}};t.prototype.setCurrentViewIndex=function(e,r){var i=this;void 0===r&&(r=!1);var o=this.currentViewIndex,a=this.getTabMetaData(e,r),s=a.url,l=this.options.swipeViews[e];this.menuOptions.model.set("activeTab",s);this.currentViewIndex=e;this.tabWidth=n("#skeleton-content-wrap").width();this.trigger(t.Events.ChangeTab,a);"function"==typeof this.options.swipeViews[e].view.notifyIsActiveSwipeView&&this.options.swipeViews[e].view.notifyIsActiveSwipeView();this.options.swipeViews[e].view.$el.addClass("is-current");if(o!==e){"function"==typeof this.options.swipeViews[o].view.notifyIsInactiveSwipeView&&this.options.swipeViews[o].view.notifyIsInactiveSwipeView();this.options.swipeViews[o].view.$el.removeClass("is-current")}return l.view.create().then(function(t){return e===i.currentViewIndex?t.addClass("is-current"):t})};t.prototype.onRender=function(){var t=this;e.prototype.onRender.call(this);this.swipeContainer=this.$(this.options.swipeSelector);this.options.swipeViews.forEach(function(e,r){t.swipeContainer.append(e.view.$el)});if(this.firstInit){this.menuView.animateMenu();this.firstInit=!1}else this.setCurrentViewIndex(this.currentViewIndex,!0).then(function(){t.menuView.animateMenu()})};t.prototype.events=function(){return{panmove:"onMoveTab",panend:"onEndMoveTab"}};t.prototype.onMoveTab=function(e){if(this.options.swipeViews.length>1&&Math.abs(e.gesture.deltaX)>Math.abs(e.gesture.deltaY)&&this.animate){var t=e.gesture.deltaX;(this.currentViewIndex>
480&&this.currentViewIndex<this.options.swipeViews.length-1||!this.currentViewIndex&&t<this.tabWidth/5||this.currentViewIndex===this.options.swipeViews.length-1&&-t<this.tabWidth/5)&&n.Velocity.hook(this.swipeContainer,"translateX",t+"px")}};t.prototype.onEndMoveTab=function(e){var t=this;if(this.animate){this.animate=!1;var r=e.gesture.deltaX;if(Math.abs(r)>i.default.client.view.minimumDistanceToSwipe&&Math.abs(e.gesture.deltaX)>Math.abs(e.gesture.deltaY)){var n=0;r<0&&this.currentViewIndex<this.options.swipeViews.length-1?n=1:r>0&&this.currentViewIndex>0&&(n=-1);if(0!==n){this.swipeContainer.velocity({translateX:-1*r+"px"},{duration:0}).velocity({translateX:0},{complete:function(e){t.animate=!0}});this.setCurrentViewIndex(this.currentViewIndex+n)}else this.swipeContainer.velocity({translateX:0},{complete:function(e){t.animate=!0}})}}};t.prototype.goToTab=function(e){var t=e.target.fullUrl||e.target.href;this.loadTab(t.split("/").pop())};t.prototype.onNavigate=function(e){e.url.includes(this.options.prefix)&&this.loadTab(e.url.split("/").pop(),!0)};t.prototype.loadTab=function(e,t){void 0===t&&(t=!1);var r=decodeURIComponent(e),n=this.options.swipeViews.filter(function(e){return e.name===r.split("?")[0]})[0];n=n||this.options.swipeViews.filter(function(e){return""===e.name})[0];this.setCurrentViewIndex(this.options.swipeViews.indexOf(n),t)};t.prototype.getUrl=function(e){return e?e.fullUrl?e.fullUrl:e.name&&""!==e.name?this.options.prefix+"/"+e.name:this.options.prefix:this.options.prefix};t.prototype.close=function(){if(s.default.isClient()){this.stopListening(this.menuView,u.default.Events.CHANGE_TAB,this.goToTab);d.EventsManager.off("popstate",this.onNavigate,this);d.EventsManager.off(a.default.Events.InternalNavigation,this.onNavigate,this)}this.options&&"swipeViews"in this.options&&this.options.swipeViews.forEach(function(e){try{e.view.close()}catch(e){console.warn("error closing swipe view:",e)}});e.prototype.close.call(this)};t.Events={ChangeTab:"change:tab"};return t}(l.default);t.default=p});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/controller/controller",["require","exports","ribsjs","../error/error","../../configuration/errorDefinitions","../view/swipe","chrisweb-utilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("../error/error"),i=e("../../configuration/errorDefinitions"),o=e("../view/swipe"),a=e("chrisweb-utilities"),s=0,l=function(e){function t(t,r,o){var a=e.call(this,t,r,o)||this;a.swipeViews=[];a.errorDefinitions=i.default;t.isDisconnected&&(a.promise=Promise.reject(new n.default(a.errorDefinitions.NO_NETWORK.message,{userData:a.options.userData})));return a}__extends(t,e);t.prototype.getInstanceId=function(){return this.constructor.name+"_"+this.uniqueInstanceId()};t.prototype.uniqueInstanceId=function(){return""+s++};t.prototype.create=function(t){this.skeleton=t;return e.prototype.create.call(this,t)};t.prototype.listenToSwipe=function(e){e.on(o.default.Events.ChangeTab,this.onNavigate,this);this.swipeViews?this.swipeViews.push(e):console.warn("Controller.prototype.listenToSwipe: swipeViews is `undefined`");return this};t.prototype.stopListeningSwipe=function(){for(;this.swipeViews.length;)this.swipeViews.pop().off(o.default.Events.ChangeTab,this.onNavigate,this)};t.prototype.onNavigate=function(e){a.utilities.isClient()&&this.router.navigate(e.url,{trigger:!1,replace:this.options.navigation&&!0===this.options.navigation.tabs||e.replace});this.updateMetadata(e)};t.prototype.updateMetadata=function(e){this.skeleton.setTitle(a.utilities.safeUnescape(e.metaTitle));this.skeleton.setDescription(a.utilities.safeUnescape(e.metaDescription));this.skeleton.setKeywords(e.metaKeywords);this.skeleton.setCanonicalUrl(e.url)};t.prototype.clear=function(){if(this.swipeViews){this.stopListeningSwipe();this.swipeViews=null}return e.prototype.clear.call(this)};return t}(r.Controller);t.default=l});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/compliance/gdpr",["require","exports","../../views/overlays","../../managers/manager","../../managers/user","chrisweb-utilities"],e)}(function(e,t){"use strict";function r(e){if(n(e.userData)){localStorage&&localStorage.setItem(l,e.userData.id+"");i.default.add(i.default.DefinitionPath.SubscriptionSettings,e)}}function n(e){return s.utilities.isClient()&&localStorage&&parseInt(localStorage.getItem(l),10)!==e.id&&2===e.newsletter}
48Object.defineProperty(t,"__esModule",{value:!0});var i=e("../../views/overlays"),o=e("../../managers/manager"),a=e("../../managers/user"),s=e("chrisweb-utilities"),l="subscriptionSettingsPopup",u=function(){localStorage&&localStorage.removeItem(l)};if(s.utilities.isClient()){o.UserManager.on(a.UserManager.Event.UserConnected,u);o.UserManager.on(a.UserManager.Event.UserDisconnected,u)}t.showOverlayIfNecessary=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/controller/pageController",["require","exports","./controller","../../library/error/error","../../library/compliance/gdpr","../../managers/manager","../../managers/user","backbone","chrisweb-utilities","../../library/utilities/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./controller"),n=e("../../library/error/error"),i=e("../../library/compliance/gdpr"),o=e("../../managers/manager"),a=e("../../managers/user"),s=e("backbone"),l=e("chrisweb-utilities"),u=e("../../library/utilities/user"),c=function(e){function t(t,r,n){return e.call(this,t,r,n)||this}__extends(t,e);t.prototype.initialize=function(t,r,n){e.prototype.initialize.call(this,t,r,n);if(l.default.isClient()){this.showGdprOverlayIfNecessary();o.UserManager.once(a.UserManager.Event.UserConnected,this.onUserConnected,this)}};t.prototype.close=function(){l.default.isClient()&&o.UserManager.off(a.UserManager.Event.UserConnected,this.onUserConnected,this)};t.prototype.onUserConnected=function(){var e=this;setTimeout(function(){return e.showGdprOverlayIfNecessary()},1e3)};t.prototype.showGdprOverlayIfNecessary=function(){var e=this,t=this.router.session.get("me");t&&o.UserManager.get(t.id,{userData:t}).then(function(t){t&&0!==t.length&&u.default.getIsLogged(e.options.userData)&&""!==s.history.getFragment()&&i.showOverlayIfNecessary(__assign({},e.options,{userData:t[0].attributes}))})};t.prototype.redirectIfUrlIncomplete=function(e){var t=e.cleanName,r=e.generateURL;if(!this.options.name||t!==this.options.name)throw new n.default(this.errorDefinitions.MOVED_PE
48RMANENTLY.message,{newUrl:r()})};return t}(r.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/artists/item",["require","exports","underscore","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/loading"),i=function(e){function t(t){var n=e.call(this,t)||this;r.defaults(n.options.templateVariables,{isCol:!1});return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/artists/item"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/review/write",["require","exports","underscore","jquery","ribsjs","../../../managers/manager","../../../library/view/loggedComponent","../../../library/utilities/form","../../../library/utilities/image","../../../library/utilities/user","../../../library/dialog/toast","../../../configuration/configuration","../../../vendor/phpjs/phpjs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("ribsjs"),o=i.EventsManager,a=e("../../../managers/manager"),s=e("../../../library/view/loggedComponent"),l=e("../../../library/utilities/form"),u=e("../../../library/utilities/image"),c=e("../../../library/utilities/user"),d=e("../../../library/dialog/toast"),p=e("../../../configuration/configuration"),f=e("../../../vendor/phpjs/phpjs"),h=function(e){function t(i){var o=e.call(this,r.extend({},t.defaultOptions,i))||this;o.$charsLeft=n();return o}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/review/write"};t.prototype.events=function(){return r.extend(e.prototype.events.call(this),{"submit .js-review-form":"onSubmitMessage","input #contact-form-message":"onModifyInput","focus #contact-form-message":"onFocusInput"})};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.options.templateVariables.placeHolder="_TKEY_WWW_REVIEW_add-review"};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$charsLeft=this.$("#chars-left")};t.prototype.getCharsLeft=function(e){return a.LocalizationManager.get("_TKEY_WWW_COMMENT_chars-left",{userData:this.options.userData}).then(function(t){var r=t[0].get("translate");return r?f.default.strings.sprintf(r,p.default.application.reviewsMaxChars-e):""+(p.default.application.reviewsMaxChars-e)})};t.prototype.render=function(){var t=this;return this.getCharsLeft(0).then(function(e){t.model.set("charsLeft",e);return t.isLogged({openDialog:!1})}).then(function(){if(!t.isClose){t._isLogged=!0;t.model.set({avatar:u.default.getUpdatedImage(t.options.userData.session.get("me").cover.small.size50),optionalHiddenClass:""});return e.prototype.render.call(t)}}).catch(function(){t._isLogged=!1;t.model.set({avatar:"",optionalHiddenClass:"hidden"});return e.prototype.render.call(t)})};t.prototype.onUserConnected=function(e){this.model.set({avatar:u.default.getUpdatedImage(this.options.userData.session.get("me").cover.small.size50),optionalHiddenClass:""});this._isLogged=!0}
48;t.prototype.onUserDisconnected=function(e){this.model.set({avatar:"",optionalHiddenClass:"hidden"});this._isLogged=!1};t.prototype.onSubmitMessage=function(e){var t=this;e.preventDefault();e.stopPropagation();var r={dialogType:"review"},i=this.options.userData;this.isLogged(r).then(function(){var r=n(e.currentTarget),s=l.default.extractDataFromForm(r);r.removeClass("has-error");r.find("button[type=submit]").prop("disabled",!0).addClass("is-active");var u=c.default.getUserLanguage(i),p=a.ReviewsManager.addReviews({joinId:t.model.get("id"),type:t.model.get("type"),reviewText:s.text,lang:u,parent:t.model.get("parent")},{userData:i,success:function(){r.find("#contact-form-message").val("");r.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");t.getCharsLeft(0).then(function(e){t.$charsLeft.text(e)})},error:function(){a.LocalizationManager.get("_TKEY_WWW_ERROR_error-occured",{userData:i}).then(function(e){d.show(e[0].get("translate"));e[0].close()});r.addClass("has-error");r.find("button[type=submit]").prop("disabled",!1).removeClass("is-active")},parent:t.model.get("parent")});o.trigger("review:post",{review:p,id:t.model.get("id"),type:t.model.get("type")});t.model.get("parent")?o.trigger("STATS:REPLY:WRITE",{id:t.model.get("parent").joinId,name:t.model.get("parent").name,type:t.model.get("parent").type}):o.trigger("STATS:REVIEW:WRITE",{id:t.model.get("id"),context:t.model.get("context"),name:t.model.get("name"),type:t.model.get("type")})})};t.prototype.onModifyInput=function(e){var t=this;this.getCharsLeft(e.currentTarget.textLength).then(function(e){t.$charsLeft.text(e)})};t.prototype.onFocusInput=function(e){var t=this;if(!this._isLogged){var r={dialogType:"review"};this.$("#contact-form-message").blur();this.isLogged(r).then(function(){t._isLogged=!0;t.$("#contact-form-message").focus()})}};t.defaultOptions={reRenderOnChange:!0,closeModelOnClose:!1};return t}(s.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/more/more",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/more/more"};t.prototype.events=function(){return{click:"onClickMore"}};t.prototype.onClickMore=function(e){this.activateComponent()};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/reviews/empty",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/reviews/empty"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/reviews/index",["require","exports","underscore","ribsjs","../../../managers/manager","../../../configuration/configuration","../../../library/model/model","FSPromise","../../../library/utilities/display","../../../library/utilities/object","../../../library/view/scroll","../../components/review/write","../../components/more/more","./empty"],e)}(function(e,t){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../managers/manager"),a=e("../../../configuration/configuration"),s=e("../../../library/model/model"),l=e("FSPromise"),u=l.FSPromise,c=e("../../../library/utilities/display"),d=e("../../../library/utilities/object"),p=e("../../../library/view/scroll"),f=e("../../components/review/write"),h=e("../../components/more/more"),m=e("./empty"),y=function(e){function t(t){return e.call(this,r.extend({entitiesPerRequest:c.default.getMaxEntitiesCount("Review",!1),displayMore:!1,idList:"reviewsItems",listSelector:".js-reviews-list-selector"},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/reviews/index"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.collection=new n.Collection([],{comparator:function(e){return-e.get("dateAdded")}});r.defaults(this.options.templateVariables,{isCol:!1});this.options.callback=this.onGetMoreRow.bind(this);r.extend(this.options.ModelViewOptions,{type:this.options.type,templateVariables:this.options.templateVariables})};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var t=this.options.userData,o=this.options.userFilters?"_TKEY_WWW_USER_activity-":"_TKEY_COMMENT_FILTER_",l=r.values(a.default.application.reviewsFilter);l.indexOf(this.model.get("currentReviewFilter"))<0&&this.model.set({currentReviewFilter:a.default.application.reviewsFilter.Latest},{silent:!0});var u=["track","album","playlist"].indexOf(this.options.type)>-1;this.reviewsCollection=new n.Collection;this.model.set({enableWrite:u,filterKey:o,context:this.options.context,reviewFilters:l,reviewsItems:this.reviewsCollection,type:this.options.type},{silent:!0});if(u){i.on("review:post",this.onWriteReview,this);var c=new f.default({model:this.model,userData:t});this.addView(".js-write-review",c)}if(this.options.displayMore){var d={urlName:this.options.type,name:this.model.get("name"),subpage:"reviews"};"community"!==this.options.type&&(d.id=this.model.get("id"));this.addView(".js-display-more-reviews",new h.default({model:new s.default({translationKey:"_TKEY_WWW_GENERIC_more-comments",moreUrl:d,context:this.options.context}),userData:t}))}};t.prototype.onAttributeChange=function(){var t=this;e.prototype.onAttributeChange.call(this);var n=this.model.changedAttributes();r.keys(n).forEach(function(e){switch(e){case"currentReviewFilter":t.getReviews(2*t.options.entitiesPerRequest).then(function(){t.onNeedMoreEntities()})}})};t.prototype.render=function(){var t=this;return this.getReviews(2*this.options.entitiesPerRequest).then(function(){return e.prototype.render.call(t)})};t.prototype.onRender=function(){var t=this;e.prototype.onRender.call(this);if(!this.reviewsCollection.length){new m.default(this.options).create().then(function(e){t.$(t.options.listSelector).empty().append(e)})}this.options.displayMore&&this.collection.length<this.reviewsCollection.length&&this.$(".js-display-more-reviews").removeClass("hidden");"plugins"in window&&"listpicker"in window.plugins&&this.configureSelect()};t.prototype.configureSelect=function(){var e=this,t=this.model.get("reviewFilters"),r=t.map(function(e){return"_TKEY_COMMENT_FILTER_"+e});r.unshift("_TKEY_WWW_GENERIC_cancel","_TKEY_GENERIC_FILTER_select-title");return o.LocalizationManager.get(r,{userData:this.options.userData}).then(function(r){var n=r[0],i=r[1],o=r.slice(2);e.filterSelectConfig={title:i.get("translate"),items:t.map(function(e,t){return{text:o[t].get("translate"),value:e}}),selectedValue:e.model.get("currentReviewFilter"),cancelButtonLabel:n.get("translate")}})};t.prototype.onWriteReview=function(e){var t=this;if(this.model.get("id")===e.id&&this.options.type===e.type){this.reviewsCollection.length||this.$(this.options.listSelector).empty();var r=e.review;r.once("change",function(){if(t.model.get("currentReviewFilter")!==a.default.application.reviewsFilter.Latest){t.model.set("currentReviewFilter",a.default.application.reviewsFilter.Latest);t.$("#select_filter_reviews").val(a.default.application.reviewsFilter.Latest)}else t.collection.add(r.clone())})}};t.prototype.getReviews=function(e,t){void 0===e&&(e=this.options.entitiesPerRequest);switch(this.model.get("currentReviewFilter")){case a.default.application.reviewsFilter.MostPopular:return this.getPopular(e,t);case a.default.application.reviewsFilter.Latest:default:return this.getLatest(e,t)}};t.prototype.getPopular=function(e,t){return this.loadReviews({order:"popularity",limit:e,joinId:this.model.get("id"),type:this.options.type},t)};t.prototype.getLatest=function(e,t){return this.loadReviews({order:"dateAdded_desc",limit:e,joinId:this.model.get("id"),type:this.options.type},t)};t.prototype.loadReviews=function(e,t){var r=this;t&&(e.offset=t);this.options.userData.query=this.options.userData.query||{};var n=this.options.userData.query.nocache;this.options.userData.query.nocache="number"==typeof this.options.highlightReview;e=__assign({},e,{nocache:this.options.userData.query.nocache});return o.ReviewsManager.getByAttribute({},{dataParameters:e,userData:this.options.userData}).then(function(e){r.options.userData.query.nocache=n;r.checkFilter(a.default.application.reviewsFilter.Latest)&&r.addReviews(e)})};t.prototype.addReviews=function(e){if(this.reviewsCollection){this.reviewsCollection.add(e);!this.collection.length&&e.length&&this.collection.set(this.reviewsCollection.slice(0,this.options.entitiesPerRequest))}};t.prototype.onGetMoreRow=function(e){if(this.options.displayMore)return u.resolve([]);this.collection.length+e.length>=this.reviewsCollection.length&&this.getReviews(this.options.entitiesPerRequest,this.reviewsCollection.length);return u.resolve(e)};t.prototype.events=function(){var e="plugins"in window&&"listpicker"in window.plugins,t={};t[(e?"click":"change")+" #select_filter_reviews"]=e?"showFilterPicker":"onChangeReviewFilter";return t};t.prototype.showFilterPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.filterSelectConfig,function(e){t.$("#select_filter_reviews").val(e);t.filterSelectConfig.selectedValue=e;t.onChangeReviewFilter()},function(){})};t.prototype.onChangeReviewFilter=function(){this.reviewsCollection.reset();this.collection.reset();this.model.set("currentReviewFilter",this.$("#select_filter_reviews>option:selected").val())};t.prototype.checkFilter=function(e){return this.model&&this.model.get("currentReviewFilter")===e};t.prototype.close=function(){i.off("review:post",this.onWriteReview,this);if(this.reviewsCollection){d.closeModel(this.reviewsCollection.slice(this.collection.length));this.reviewsCollection=null}e.prototype.close.call(this)};return t}(p.default);t.default=y});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/reviews/item",["require","exports","underscore","jquery","ribsjs","../../../managers/manager","FSPromise","../../layout","../../../managers/user","../../../library/error/error","../../../configuration/configuration","../../../models/manager/review","../../../library/utilities/display","../../../library/utilities/image","../../../library/utilities/user","../../../library/utilities/object","../../overlays","../../../library/view/loading","../../components/review/write","../../../library/model/model"],e)}(function(e,t){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("ribsjs"),o=i.EventsManager,a=e("../../../managers/manager"),s=e("FSPromise"),l=s.FSPromise,u=e("../../layout"),c=e("../../../managers/user"),d=e("../../../library/error/error"),p=e("../../../configuration/configuration"),f=e("../../../models/manager/review"),h=e("../../../library/utilities/display"),m=e("../../../library/utilities/image"),y=e("../../../library/utilities/user"),g=e("../../../library/utilities/object"),v=e("../../overlays"),_=e("../../../library/view/loading"),b=e("../../components/review/write"),w=e("../../../library/model/model"),x=function(e){function t(i){var o=e.call(this,r.extend({listSelector:".js-answers",ModelView:t,ModelViewOptions:{type:"review",userData:i.userData,router:i.router},reRenderOnChange:!0},i))||this;o.$expandReplies=n();o.options.templateVariables=i.templateVariables||{};o.options.templateVariables.router=i.router;o.options.templateVariables.userData=i.userData;var a=i.userData.session.get("me");o.options.templateVariables.sessionUserId="object"==typeof a&&null!==a?a.id:null;return o}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/reviews/";switch(this.options.type){case t.TemplateStyle.Community:case t.TemplateStyle.User:e+="item-feature";break;case t.TemplateStyle.Artist:e+="item-aggregate";break;case t.TemplateStyle.Review:e+="answer";break;case t.TemplateStyle.Default:default:e+="item"}return e};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.collection||(this.collection=new i.Collection([]));this.answersCollection=new i.Collection([],{comparator:this.dateComparison})};t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);r.extend(this.options.templateVariables,{contextType:this.options.type,userData:this.options.userData});var n=this.model.get("answers");this.answersDisplayed=this.options.isCompact?0:h.default.getMaxEntitiesCount(h.default.EntityType.ReviewAnswers);if(n&&n.length>0){this.answersCollection.set(n);this.collection.set(this.answersCollection.slice(0,this.answersDisplayed))}this.model.set({answersDisplayed:this.collection.length,answersTotal:this.answersCollection.length,moreText:this.options.isCompact?"_TKEY_MUSIC_REVIEW_view-answers":"_TKEY_MUSIC_REVIEW_more-answers"});o.on("review:post",this.onWriteReview,this);"review"!==this.options.type&&a.getInclude(this.model.get("type"),this.model.get("joinId"),{userData:this.options.userData}).then(function(e){var r=e[0];if(r){var n=new b.default({model:t.model.clone().set({parent:{type:t.model.get("type"),joinId:t.model.get("joinId"),name:r.get("name")},type:"review",placeHolder:"_TKEY_WWW_REVIEW_reply-placeholder",context:t.options.context}),userData:t.options.userData});t.addView(".js-answer-review",n)}});this.bindRerenderEvents()};t.prototype.bindRerenderEvents=function(){t.rerenderEvents.forEach(function(e){return a.UserManager.on(e,t.rerenderItems)})};t.prototype.unbindRerenderEvents=function(){t.rerenderEvents.forEach(function(e){return a.UserManager.off(e,t.rerenderItems)})};t.prototype.events=function(){return{"click .js-reply-review":"onClickReply","click .js-display-more":"onClickMore"}};t.prototype.onClickReply=function(e){var t=this
49;this.isLogged().then(function(){t.$(".js-answer-review").removeClass("hidden")})};t.prototype.onClickMore=function(e){this.answersDisplayed=this.answersDisplayed<10?10:this.answersDisplayed+t.AnswersDisplayedOnMore;this.collection.set(this.answersCollection.slice(0,this.answersDisplayed));this.updateCounterAndMoreButton();e.preventDefault();e.stopPropagation()};t.prototype.render=function(){var t=this,n=this.options.userData;return a.UserManager.get(this.model.get("userId"),{userData:n}).then(function(e){var i=e[0];if("object"!=typeof i||null===i){t.close();throw new d.default("Unable to render review: User "+t.model.get("userId")+" not found",{userData:n})}t.model.set("authorModel",i);var o=i.get("cover");t.options.templateVariables=r.extend({},t.options.templateVariables,{author:i.get("dispname"),image:m.default.getUpdatedImage(
49o&&"object"==typeof o.small&&null!==o.small?o.small.size50:void 0)})}).then(function(){return["artist","community","user"].indexOf(t.options.type)>-1&&"review"!==t.model.get("type")?a.getInclude(t.model.get("type"),t.model.get("joinId"),{userData:n}).then(function(r){var n=r[0];if(!n){t.close();return t.options.renderPromise||l.resolve(t)}t.model.set({cover:n.get("cover"),ownerId:"playlist"===t.model.get("type")?n.get("userId"):n.get("artistId")});g.closeModel(n);return e.prototype.render.call(t)}):e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$expandReplies=this.$(".expand-replies");this.updateCounterAndMoreButton();this.listenTo(this.sentiment,"change:sentiment",this.onChangeSentiment)};t.prototype.onChangeSentiment=function(e){a.ReviewsManager.fetcher.fetchedAll({modelsAlreadyFetched:[this.model],options:{userData:this.options.userData},dataOfModelsNotFetched:[]})};t.prototype.onWriteReview=function(e){var t=this;if(this.model.get("id")===e.id&&"review"===e.type){var r=e.review;r.once("change",function(){t.answersCollection.add(r);t.model.set("answers",t.answersCollection.models);t.collection.set(t.answersCollection.slice(0,++t.answersDisplayed));t.updateCounterAndMoreButton()})}};t.prototype.dateComparison=function(e){return-e.get("dateAdded")};t.prototype.updateCounterAndMoreButton=function(){this.model.set({answersDisplayed:this.collection.length,answersTotal:this.answersCollection.length,moreText:this.collection.length?"_TKEY_MUSIC_REVIEW_more-answers":"_TKEY_MUSIC_REVIEW_view-answers"},{silent:!this.isDispatch});this.answersCollection.length?this.options.isCompact?this.answersCollection.length>this.collection.length?this.$expandReplies.addClass("expand-only"):this.$expandReplies.addClass("hidden"):this.answersCollection.length===this.collection.length&&this.$expandReplies.addClass("count-only"):this.$expandReplies.addClass("hidden");this.$(".js-answer-review").addClass("hidden")};t.prototype.isLogged=function(){var e=this.options.userData;return new l(function(t,r){y.default.getIsLogged(e)?t():v.default.add(v.default.DefinitionPath.LoginRequire,{callback:function(){t()},userData:e,templateVariables:{dialogType:"review"}})})};t.prototype.generateStructuredData=function(){return f.Review.generateStructuredData(new w.default(__assign({},this.model.attributes,{parentItem:this.options.parentItem,parentItemType:this.options.parentItemType})),3)};t.prototype.close=function(){this.stopListening(this.sentiment,"change:sentiment",this.onChangeSentiment);o.off("review:post",this.onWriteReview,this);if(this.answersCollection){g.closeModel(this.answersCollection.models);this.answersCollection=null}this.unbindRerenderEvents();e.prototype.close.call(this)};t.TemplateStyle={Community:"community",Artist:"artist",User:"user",Review:"review",Default:"item"};t.AnswersDisplayedOnMore=p.default.application.reviewAnswersToLoadOnMoreButtonClick;t.rerenderEvents=[c.UserManager.Event.UserConnected,c.UserManager.Event.UserDisconnected,c.UserManager.Event.UserDeleted];t.rerenderItems=r.debounce(function(){return u.default.getInstance().trigger(u.default.Events.CHANGE_DISPLAY_SIZE)},100);return t}(_.default);t.default=x});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/favorites/favorite",["require","exports","underscore","../../../library/view/loggedComponent","../../../managers/manager","../../../models/manager/favorite","ribsjs","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/loggedComponent"),i=e("../../../managers/manager"),o=e("../../../models/manager/favorite"),a=e("ribsjs"),s=a.EventsManager,l=e("FSProm
49ise"),u=function(e){function t(n){var i=e.call(this,r.extend({},t.defaultOptions,n.model instanceof o.default?n:r.extend(n,{model:new o.default(n.model.attributes)})))||this;i.suspendUpdateState=!1;i.updating=!1;i.model.set("favorite",i.model.get("favorite")||0);try{i.model.set("userId",i.model.get("userId")||i.options.userData.session.get("me").id)}catch(e){}return i}__extends(t,e);t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.templateStyle=this.model.get("templateStyle");this.model.unset("templateStyle",{silent:!0});this.context=this.model.get("context");this.model.unset("context",{silent:!0});s.on(t.Events.RemoveFromFavorite,this.localUpdateState,this);s.on(t.Events.AddToFavorite,this.localUpdateState,this)};t.prototype.getTemplateId=function(){switch(this.templateStyle){case t.TemplateStyle.Hero:case t.TemplateStyle.HeroDesktop:case t.TemplateStyle.HeroFollow:case t.TemplateStyle.HeroFollowDesktop:case t.TemplateStyle.HeroOverlay:case t.TemplateStyle.HeroDesktopOverlay:case t.TemplateStyle.HeroFollowOverlay:case t.TemplateStyle.HeroFollowDesktopOverlay:case t.TemplateStyle.IconOnBg:case t.TemplateStyle.Round:case t.TemplateStyle.Icon:return"/components/favorites/"+this.templateStyle;default:return"/components/favorites/icon"}};t.prototype.events=function(){return{click:"onClickToFavorite"}};t.prototype.onClickToFavorite=function(e){var t=this;this.activateComponent();var r={dialogType:"favorite"};"followeduser"===this.model.get("type")&&(r={dialogType:"follow"});this.isLogged(r).then(function(){return t.executeFavoriteAction()}).catch(function(){})};t.prototype.executeFavoriteAction=function(){var e=this;if(!this.updating){this.updating=!0;var r=this.model.get("favorite")?0:1;this.$el.prop("disabled",!0);this.model.set("favorite",r);return i.FavoritesManager.update(this.model,{type:this.model.get("type"),id:this.model.get("id"),favorite:r},{userData:this.options.userData,wait:!0,error:function(t){e.$el.prop("disabled",!1);e.model.set("favorite",r?0:1);e.updating=!1;throw t},success:function(){e.suspendUpdateState=!0;e.$el.prop("disabled",!1);var n=1===r?t.Events.AddToFavorite:t.Events.RemoveFromFavorite;e.tryUpdateModelStats(n).then(function(){e.emitStatsEvent(1===r);s.trigger(n,{id:e.model.get("id"),type:e.model.get("type"),favorite:r});e.suspendUpdateState=!1;e.updating=!1})}})}};t.prototype.emitStatsEvent=function(e){var r={id:this.model.get("id"),name:this.model.get("name"),type:this.model.get("type"),context:t.Context[this.context]};e?s.trigger("STATS:FAVORITE:ADD",r):s.trigger("STATS:FAVORITE:REMOVE",r)};t.prototype.render=function(){var t=this;return this.updateState().then(function(){return e.prototype.render.call(t)})};t.prototype.setId=function(e){this.model.set({id:e},{silent:!0});this.updateState()};t.prototype.onUserConnected=function(t){e.prototype.onUserConnected.call(this,t);return this.updateState()};t.prototype.localUpdateState=function(e){e.type===this.model.get("type")&&e.id===this.model.get("id")&&this.model.get("favorite")!==e.favorite&&this.model.set("favorite",e.favorite)};t.prototype.updateState=function(e){var t=this;void 0===e&&(e=!1);if(this.updating)return l.FSPromise.resolve();this.updating=!0;return this.isLogged({openDialog:!1}).then(function(){if(t.suspendUpdateState||t.isClose){t.updating=!1;return l.FSPromise.resolve()}return t.loadFavoriteState().then(function(r){if(t.isClose){t.updating=!1;return l.FSPromise.resolve()}t.model.set({favorite:r?1:0},{silent:e,reset:!1});t.updating=!1})}).catch(function(e){t.updating=!1})};t.prototype.onUserDisconnected=function(t){e.prototype.onUserDisconnected.call(this,t);this.suspendUpdateState=!0;this.model.set("favorite",0);this.suspendUpdateState=!1};t.prototype.close=function(){s.off(t.Events.RemoveFromFavorite,this.localUpdateState,this);s.off(t.Events.AddToFavorite,this.localUpdateState,this);e.prototype.close.call(this)};t.prototype.loadFavoriteState=function(){var e=this;return new Promise(function(t,r){i.FavoritesManager.getByAttribute({id:e.model.get("id"),type:e.model.get("type"),userId:e.options.userData.session.get("me").id},{fetchById:!0,userData:e.options.userData}).then(function(e){var r=e[0],n=r&&!!r.get("favorite");r&&r.close();t(n)}).catch(r)})};t.prototype.tryUpdateModelStats=function(e){var r=this;return new Promise(function(n){r.loadTargetModel().then(function(i){var o=i.model,a=i.manager,s="artist"===r.model.get("type")?"fans":"favorited";
49e===t.Events.AddToFavorite?o.get("stats")[s]+=1:o.get("stats")[s]-=1;a.update(o,o.attributes,{userData:r.options.userData,success:function(){o.close();n()}})}).catch(n)})};t.prototype.loadTargetModel=function(){var e=this;return new Promise(function(r,n){var o;switch(e.model.get("type")){case t.FavoriteType.Track:o=i.TracksManager;break;case t.FavoriteType.Album:o=i.AlbumsManager;break;case t.FavoriteType.Artist:o=i.ArtistsManager;break;case t.FavoriteType.Playlist:o=i.PlaylistsManager;break;case t.FavoriteType.User:o=i.UserManager;break;default:n();return}o.get(e.model.get("id"),{fetchById:!0,userData:e.options.userData}).then(function(e){var t=e[0];return r({model:t,manager:o})}).catch(n)})};t.Events={AddToFavorite:"favorite:add",RemoveFromFavorite:"favorite:remove"};t.TemplateStyle={Hero:"hero",HeroDesktop:"heroDesktop",HeroFollow:"heroFollow",HeroFollowDesktop:"heroFollowDesktop",HeroOverlay:"heroOverlay",HeroDesktopOverlay:"heroDesktopOverlay",HeroFollowOverlay:"heroFollowOverlay",HeroFollowDesktopOverlay:"heroFollowDesktopOverlay",Icon:"icon",IconOnBg:"iconOnBg",Round:"iconRound"};t.FavoriteType={Album:"album",Artist:"artist",Playlist:"playlist",Track:"track",User:"followeduser"};t.defaultOptions={reRenderOnChange:!0,loadingStyle:{template:"action",block:!1,invert:!0},userData:null};return t}(n.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/secondaryInformationView",["require","exports","../../library/view/loading","ribsjs","../components/favorites/favorite","../overlays/download/download","../layout/player"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/loading"),n=e("ribsjs"),i=n.EventsManager,o=e("../components/favorites/favorite"),a=e("../overlays/download/download"),s=e("../layout/player"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.onRenderStart=function(){e.prototype.onRenderStart.call(this);1&this.secondaryInformationViewFeatures&&this.initializeFavoriteEventSubscription();2&this.secondaryInformationViewFeatures&&this.initializeDownloadEventSubscription();4&this.secondaryInformationViewFeatures&&"track"===this.modelType&&this.initializePlayEventSubscription()};t.prototype.close=function(){1&this.secondaryInformationViewFeatures&&this.cleanupFavoriteEventSubscription();2&this.secondaryInformationViewFeatures&&this.cleanupDownloadEventSubscription();4&this.secondaryInformationViewFeatures&&this.cleanupPlayEventSubscription();e.prototype.close.call(this)};t.prototype.initializeFavoriteEventSubscription=function(){var e=this;this.cleanupFavoriteEventSubscription();this.onFavoriteEvent=function(t){var r=t.id,n=t.type;e.modelType===n&&e.model.get("id")===r&&e.modelManager.get(e.model.get("id"),{userData:e.options.userData}).then(function(t){var r=t[0];e.model.set("stats",r.get("stats"));e.reRenderModelView()})};i.on(o.default.Events.AddToFavorite,this.onFavoriteEvent);i.on(o.default.Events.RemoveFromFavorite,this.onFavoriteEvent)};t.prototype.cleanupFavoriteEventSubscription=function(){if(this.onFavoriteEvent){i.off(o.default.Events.AddToFavorite,this.onFavoriteEvent);i.off(o.default.Events.RemoveFromFavorite,this.onFavoriteEvent)}};t.prototype.initializeDownloadEventSubscription=function(){var e=this;this.cleanupDownloadEventSubscription();this.onDownloadEvent=function(t){var r=t.id,n=t.type;e.modelType===n&&e.model.get("id")===r&&e.modelManager.get(e.model.get("id"),{userData:e.options.userData}).then(function(t){var r=t[0];e.model.set("stats",r.get("stats"));e.reRenderModelView()})};i.on(a.default.Events.Download,this.onDownloadEvent)};t.prototype.cleanupDownloadEventSubscription=function(){this.onDownloadEvent&&i.off(a.default.Events.Download,this.onDownloadEvent)};t.prototype.initializePlayEventSubscription=function(){var e=this;this.cleanupPlayEventSubscription();this.onPlayEvent=function(t){var r=t.id;e.model.get("id")===r&&e.modelManager.get(e.model.get("id"),{userData:e.options.userData}).then(function(t){var r=t[0];e.model.set("stats",r.get("stats"));e.reRenderModelView()})};s.default.on(s.default.Event.PLAY,this.onPlayEvent)};t.prototype.cleanupPlayEventSubscription=function(){this.onPlayEvent&&s.default.off(s.default.Event.PLAY,this.onPlayEvent)};return t}(r.default);t.BaseSecondaryInformationView=l;t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/albums/secondaryInformation",["require","exports","../secondaryInformationView","../../../managers/manager"],e)}(function(e,t){"use strict";
49Object.defineProperty(t,"__esModule",{value:!0});var r=e("../secondaryInformationView"),n=e("../../../managers/manager"),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.secondaryInformationViewFeatures=7;t.modelManager=n.AlbumsManager;t.modelType="album";return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/albums/secondaryInformation"};return t}(r.BaseSecondaryInformationView);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/albums/overview",["require","exports","underscore","ribsjs","../../../managers/manager","../../../library/view/loading","../../../library/model/model","../../../library/utilities/display","../../../library/utilities/object","../../../library/utilities/app","../../layout/player","../../partials/tracks/item","../../partials/tracks/list","../../partials/artists/item","../../partials/reviews/index","../../partials/reviews/item","../../partials/albums/secondaryInformation"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("../../../managers/manager"),o=e("../../../library/view/loading"),a=e("../../../library/model/model"),s=e("../../../library/utilities/display"),l=e("../../../library/utilities/object"),u=e("../../../library/utilities/app"),c=e("../../layout/player"),d=e("../../partials/tracks/item"),p=e("../../partials/tracks/list"),f=e("../../partials/artists/item"),h=e("../../partials/reviews/index"),m=e("../../partials/reviews/item"),y=e("../../partials/albums/secondaryInformation"),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/albums/overview"};t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);this.tracksCollection=new n.Collection([],{comparator:"position"});var r=this.model.get("tracks").map(function(e){return new a.default(e)}),o=this.options.userData;this.artistModel=new a.default({id:this.model.get("artistId"),name:"",cover:{big:""},location:{country:""}});var l={isTracklist:!0};Object.defineProperty(l,"count",{enumerable:!0,get:function(){return t.tracksCollection.length}});var c=new a.default({}),g=new p.default({model:c,renderPromise:i.TracksManager.get(r.map(function(e){return e.get("id")}),{userData:this.options.userData}).then(function(e){var r=0;e.forEach(function(e,t){r+=e.get("duration");e.set({trackNo:t+1,offset:t},{silent:!0})});c.set({totalDuration:r},{silent:!0});t.tracksCollection.set(e)}),collection:this.tracksCollection,listSelector:".js-list",userData:o,ModelView:d.default,templateVariables:l,ModelViewOptions:{type:d.default.TrackItemType.Album,context:this.options.context||"ALBUMPAGE",isCol:!0,templateVariables:{isTracklist:!0,from:"overview",fromId:"tracks",entityId:this.model.get("id")}}}),v=new f.default({model:this.artistModel,reRenderOnChange:!0,userData:o}),_=new h.default({model:this.model.clone(),listSelector:".js-reviews-list-selector",ModelView:m.default,ModelViewOptions:{context:"ALBUMPAGE",userData:o,router:this.options.router,parentItem:this.model,parentItemType:"album",templateVariables:{from:"overview",fromId:"reviews"}},type:"album",context:"ALBUMPAGE",displayMore:!0,userData:o});if(s.default.getMaxEntitiesCount("DesktopDesign")>0){this.options.templateVariables.showLicensingBtn=u.getDevicePlatform()!==u.Platform.iOS;var b=new y.default({model:this.model.clone(),userData:o,templateVariables:this.options.templateVariables});this.addView(".js-secondary-desktop",b)}this.addView(".js-reviews-section",_);this.addView(".js-albumOverview-tracksList",g);this.addView(".js-albumOverview-artistEntity",v)};t.prototype.render=function(){var t=this;return i.ArtistsManager.get(this.model.get("artistId"),{userData:this.options.userData}).then(function(r){t.artistModel.set(r[0].attributes);r[0].close();c.default.trigger(c.default.Event.QUEUE,{type:d.default.TrackItemType.Album,id:t.model.get("id"),collection:t.tracksCollection,ignoreOrigin:!0});return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$revealButton=this.$(".reveal>button");
49this.$asideDiv=this.$(".entity-aside")};t.prototype.events=function(){return r.extend({"click .reveal":"onClickReveal"},e.prototype.events.call(this))};t.prototype.onClickReveal=function(e){if(this.$revealButton.hasClass("is-toggled")){this.$revealButton.removeClass("is-toggled");this.$asideDiv.removeClass("revealed")}else{this.$revealButton.addClass("is-toggled");this.$asideDiv.addClass("revealed")}};t.prototype.close=function(){if(this.tracksCollection){l.closeModel(this.tracksCollection.models);this.tracksCollection=null}e.prototype.close.call(this)};return t}(o.default);t.default=g});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/reviews/page",["require","exports","underscore","../../../library/view/loading","../../partials/reviews/index","../../partials/reviews/item"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/loading"),i=e("../../partials/reviews/index"),o=e("../../partials/reviews/item"),a=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/reviews/page"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var t=new i.default(r.extend({},this.options,{listSelector:".js-reviews-list-selector",ModelView:o.default,type:this.options.type,closeModelOnClose:!1,context:this.options.context,ModelViewOptions:{context:this.options.context,userData:this.options.userData,router:this.options.router,highlightReview:this.options.highlightReview,templateVariables:{from:"swipe",fromId:"reviews"}}}));this.addView(".js-reviews-section",t)};return t}(n.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/similar/empty",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/similar/empty"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/similar/index",["require","exports","underscore","ribsjs","../../../managers/manager","../../../library/utilities/route","../../../library/view/loading","./empty","../tracks/item","../../layout/player"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../managers/manager"),a=e("../../../library/utilities/route"),s=e("../../../library/view/loading"),l=e("./empty"),u=e("../tracks/item"),c=e("../../layout/player"),d=function(e){function t(n){return e.call(this,r.extend({},t.defaultOptions,n))||this}__extends(t,e);t.prototype.getTemplateId=function(){var e="";switch(this.options.type){case t.similarType.Track:e="/partials/similar/track";break;case t.similarType.Album:case t.similarType.Artist:default:e="/partials/similar/index"}return e};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.collection=new n.Collection([]);if("track"===this.options.type){this.listener="similar-to-track-"+this.model.get("id");r.extend(this.options.ModelViewOptions,{type:u.default.TrackItemType.VirtualList,virtualId:this.listener,listTitle:this.model.get("name"),href:a.default.getUrl("track",{id:this.model.get("id"),name:this.model.get("name"),subpage:"similar"})});i.on(this.listener,this.notifyPlayer,this)}};t.prototype.render=function(){var r=this;return o.SimilarsManager.getByAttribute({id:this.model.get("id")},{userData:this.options.userData,dataParameters:{type:this.options.type}}).then(function(e){if(e.length){var n=e[0].get("similars").map(function(e){return e.id});return t.similarManagers[r.options.type].get(n,{userData:r.options.userData})}r.trigger(t.Events.NO_SIMILAR_FOUND,r);return[]}).then(function(t){if(!r.isClose){r.collection.set(t);"track"===r.options.type&&r.notifyPlayer();return e.prototype.render.call(r)}}).then(function(){if(!r.isClose&&!r.collection.length){return new l.default(r.options).create().then(function(e){if(!r.isClose){r.$el.find(r.options.listSelector).empty().append(e);return r}})}})};t.prototype.notifyPlayer=function(){!this.isClose&&this.collection.length&&c.default.trigger(c.default.Event.QUEUE,{type:u.default.TrackItemType.VirtualList,i
49d:this.listener,collection:this.collection})};t.prototype.close=function(){this.listener&&i.off(this.listener,this.notifyPlayer,this);e.prototype.close.call(this)};t.Events={NO_SIMILAR_FOUND:"similar:notFound"};t.defaultOptions={listSelector:".js-similar-list-selector"};t.similarManagers={album:o.AlbumsManager,artist:o.ArtistsManager,track:o.TracksManager};t.similarType={Album:"album",Artist:"artist",Track:"track"};return t}(s.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/albums/item",["require","exports","underscore","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/loading"),i=function(e){function t(t){var n=e.call(this,r.extend({context:"SINGLEITEM"},t))||this;r.defaults(n.options.templateVariables,{isCol:!1});return n}__extends(t,e);t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);void 0===this.model.get("isPlayable")&&this.model.set("isPlayable",!0)};t.prototype.getTemplateId=function(){return"/partials/albums/item"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/albums/header",["require","exports","../../../library/view/loading","../../../library/utilities/display","../../../library/utilities/app"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../library/utilities/display"),i=e("../../../library/utilities/app"),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.isExpanded=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/albums/header";n.default.getMaxEntitiesCount("DesktopDesign")>0&&(e+="Desktop");return e};t.prototype.events=function(){return{"click .js-expand":"onClickExpand"}};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.options.templateVariables.showLicensingHeaderBtn=i.getDevicePlatform()!==i.Platform.iOS};t.prototype.onClickExpand=function(e){this.isExpanded=!this.isExpanded;if(this.isExpanded){this.$(".js-expand").addClass("is-toggled");$(".js-secondary-mobile").removeClass("hidden")}else{this.$(".js-expand").removeClass("is-toggled");$(".js-secondary-mobile").addClass("hidden")}};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/albums/index",["require","exports","underscore","ribsjs","../../../library/view/swipe","../../../models/manager/album","../../../library/utilities/route","../../../library/utilities/display","./overview","../reviews/page","../../partials/similar/index","../../partials/albums/item","../../partials/albums/header","../../partials/albums/secondaryInformation"],e)}(function(e,t){"use strict";
49Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("../../../library/view/swipe"),o=e("../../../models/manager/album"),a=e("../../../library/utilities/route"),s=e("../../../library/utilities/display"),l=e("./overview"),u=e("../reviews/page"),c=e("../../partials/similar/index"),d=e("../../partials/albums/item"),p=e("../../partials/albums/header"),f=e("../../partials/albums/secondaryInformation"),h=function(e){function t(i,o){var s=this,f=i[0],h=i[1],m=i[2],y=i[3],g=i[4],v=i[5],_=i[6],b=i[7],w=i[8],x=[{metaTitle:f,metaDescription:h,metaKeywords:m,name:t.Views.Overview,titleKey:"_TKEY_WWW_GENERIC_album",viewClass:l.default,options:Object.assign({type:"album",context:"ALBUMPAGE"},o,{model:o.model.getModelProjection(n.Model)})},{metaTitle:y,metaDescription:g,metaKeywords:v,name:t.Views.Reviews,titleKey:"_TKEY_WWW_TRACK_comments-tab-title",viewClass:u.default,options:Object.assign({type:"album",context:"ALBUMPAGE"},o,{model:o.model.getModelProjection(n.Model)})},{metaTitle:_,metaDescription:b,metaKeywords:w,name:t.Views.Similar,titleKey:"_TKEY_WWW_ALBUM_similar-swipe-title",viewClass:c.default,options:Object.assign({ModelView:d.default,ModelViewOptions:{templateVariables:{from:"swipe",fromId:"similar"}},type:"album",context:"ALBUMPAGE"},o,{model:o.model.getModelProjection(n.Model)})}];s=e.call(this,r.extend({},o,{swipeSelector:".js-swipe-container",swipeViews:x,headerView:new p.default(o),prefix:a.default.getUrl("album",{id:o.model.get("id"),name:o.model.get("name")}),manageUrl:!0,isCircular:!1}))||this;return s}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/albums/index"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);if(s.default.getMaxEntitiesCount("DesktopDesign")<0){var t=new f.default({model:this.model.clone(),userData:this.options.userData,
50templateVariables:this.options.templateVariables});this.addView(".js-secondary-mobile",t)}};t.prototype.generateStructuredData=function(){return o.Album.generateStructuredData(this.model,7)};t.Views={Overview:"",Reviews:"reviews",Similar:"similar"};return t}(i.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/albums/index",["require","exports","../../library/controller/pageController","../../library/error/error","../../managers/manager","speakingurl","../../vendor/phpjs/phpjs","../../configuration/configuration","FSPromise","chrisweb-utilities","../../library/utilities/user","../../library/utilities/object","../../library/utilities/route","../../views/pages/albums/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../library/error/error"),i=e("../../managers/manager"),o=e("speakingurl"),a=e("../../vendor/phpjs/phpjs"),s=e("../../configuration/configuration"),l=e("FSPromise"),u=l.FSPromise,c=e("chrisweb-utilities"),d=e("../../library/utilities/user"),p=e("../../library/utilities/object"),f=e("../../library/utilities/route"),h=e("../../views/pages/albums/index"),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;e.prototype.create.call(this,t);if(isNaN(this.options.id))throw new n.default(this.errorDefinitions.NOT_FOUND.message,{userData:this.options.userData,id:this.options.id});if(!this.promise){var l=this.options.userData;this.promise=i.AlbumsManager.get(this.options.id,{userData:l}).then(function(e){if(0===e.length)throw new n.default(r.errorDefinitions.NOT_FOUND.message,{userData:r.options.userData,id:r.options.id});var m=e[0];if(!m.get("status").available)throw new n.default(r.errorDefinitions.NOT_FOUND.message,{userData:r.options.userData,id:r.options.id});var y=o(c.default.safeUnescape(m.get("name")));""===y&&(y="_");r.redirectIfUrlIncomplete({cleanName:y,generateURL:function(){var e=f.default.getUrl("album",{id:m.get("id"),name:m.get("name")}
50);"string"==typeof r.options.subpage&&r.options.subpage.length>0&&(e+="/"+r.options.subpage);return e}});""===m.get("stats").notesCount&&(m.get("stats").notesCount=1);var g=[],v=s.default.application.websiteName,_=d.default.getUserLanguage(l);g.push(i.LocalizationManager.get(["_TKEY_WWW_META_TITLE_album-x-artistname-x-title-x-website","_TKEY_WWW_META_DESCRIPTION_album-x-artistname-x-title-x-website","_TKEY_WWW_META_KEYWORDS_album","_TKEY_WWW_META_TITLE_album-reviews-x-artistname-x-title-x-website","_TKEY_WWW_META_DESCRIPTION_album-reviews-x-artistname-x-title","_TKEY_WWW_META_KEYWORDS_album-reviews","_TKEY_WWW_META_TITLE_album-similar-x-artistname-x-title-x-website","_TKEY_WWW_META_DESCRIPTION_album-similar-x-artistname-x-title","_TKEY_WWW_META_KEYWORDS_album-similar","_TKEY_WWW_ALBUM_page-title","_TKEY_WWW_GENERIC_share-message"],{userData:l}));g.push(i.ArtistsManager.get(m.get("artistId"),{userData:l}));return u.all(g).then(function(e){var n=e[0],i=e[1],o=n[0],u=n[1],d=n[2],f=n[3],y=n[4],g=n[5],b=n[6],w=n[7],x=n[8],M=n[9],S=n[10],k=i[0];m.set("artist",k.getModelProjection());var T=a.default.strings.sprintf(o.get("translate"),k.get("name"),m.get("name"),v),A=a.default.strings.sprintf(u.get("translate"),k.get("name"),m.get("name"),v),E=d.get("translate"),P=a.default.strings.sprintf(f.get("translate"),k.get("name"),m.get("name"),v),O=a.default.strings.sprintf(y.get("translate"),k.get("name"),m.get("name"),v),j=g.get("translate"),D=a.default.strings.sprintf(b.get("translate"),k.get("name"),m.get("name"),v),C=a.default.strings.sprintf(w.get("translate"),k.get("name"),m.get("name"),v),L=x.get("translate"),I=a.default.strings.sprintf(S.get("translate")||S.get("id"),m.get("name"),v),R=m.get("description")[_].replace(/"/g,"&quot;");R=R.replace(/[<]br[^>]*[>]/gi," ");""!==R&&(A=R);
50var Y=new h.default([T,A,E,P,O,j,D,C,L],{currentView:r.options.subpage,model:m,userData:l,router:r.router,templateVariables:{websiteName:v,language:_}});r.listenToSwipe(Y);var N=Y.getUrl(r.options.subpage),F=a.default.strings.sprintf(M.get("translate")||M.get("id"),k.get("name"),m.get("name")),W=R;""===W&&(W=I);t.setHeader(c.default.safeUnescape(F));var U=Y.getTabMetaData();r.skeleton.setTitle(c.default.safeUnescape(U.metaTitle));r.skeleton.setDescription(c.default.safeUnescape(U.metaDescription));r.skeleton.setKeywords(U.metaKeywords);t.setCanonicalUrl(N);t.addContent(Y);t.setOpenGraph({app_id:s.default.application.facebookAppId,url:N,title:c.default.safeUnescape(T),image:m.get("cover").big.size600,site_name:s.default.application.websiteName,description:c.default.safeUnescape(W),type:"music.album",locale_alternate:s.default.application.getLocales()});var q=l.location.protocol+"//"+l.location.host;t.setSchema({itemtype:"http://schema.org/MusicAlbum",name:c.default.safeUnescape(m.get("name")),description:c.default.safeUnescape(R).replace(/"/g,""),image:m.get("cover").small.size600,url:q+N});p.closeModel(n);p.closeModel(i);return t})})}return this.promise};t.prototype.uniqueInstanceId=function(){return this.options.id+"_"+this.options.name};return t}(r.default);t.default=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/artists/secondaryInformation",["require","exports","../secondaryInformationView","../../../managers/manager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../secondaryInformationView"),n=e("../../../managers/manager"),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.secondaryInformationViewFeatures=7;t.modelManager=n.ArtistsManager;t.modelType="artist";return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/artists/secondaryInformation"};return t}(r.BaseSecondaryInformationView);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/artists/overview",["require","exports","underscore","ribsjs","../../../managers/manager","../../../configuration/configuration","chrisweb-utilities","../../../library/utilities/display","../../../library/utilities/route","../../../library/utilities/app","../../../library/view/loading","../../partials/tracks/item","../../layout/player","../../partials/artists/secondaryInformation"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../managers/manager"),a=e("../../../configuration/configuration"),s=e("chrisweb-utilities"),l=e("../../../library/utilities/display"),u=e("../../../library/utilities/route"),c=e("../../../library/utilities/app"),d=e("../../../library/view/loading"),p=e("../../partials/tracks/item"),f=e("../../layout/player"),h=e("../../partials/artists/secondaryInformation"),m=function(e){function t(t){return e.call(this,Object.assign({collection:new n.Collection,listSelector:".js-artist-filteredTracksList",ModelView:p.default,ModelViewOptions:{virtualId:"artist-"+t.model.get("id")+"-mostpopular",type:p.default.TrackItemType.VirtualList,isCol:!0,originId:1e5,originType:"artist.overview",reRenderOnChange:!0,templateVariables:{itemprop:"track",from:"swipe",fromId:"overview"}}},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/artists/overview"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.listenTo(this.model,"change",this.onAttributeChange);var t=r.values(a.default.application.artistsFilter);t.indexOf(this.model.get("currentFilter"))<0&&this.model.set("currentFilter",a.default.application.artistsFilter.MostPopular);var n=this.model.get("currentFilter"),i=this.model.get("name"),o=this.model.get("id"),s="artist-"+o+"-"+n;this.listener=s;if(l.default.getMaxEntitiesCount("DesktopDesign")>0){this.options.templateVariables.showLicensingBtn=c.getDevicePlatform()!==c.Platform.iOS;var u=new h.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables});this.addView(".js-secondary-desktop",u)}this.model.set({filters:t,isHidden:"",listTitle:n+" "+i,virtualId:s,tracklist:this.collection},{silent:!0})};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();Object.keys(t).forEach(function(r){var n=t[r];switch(r){case"currentFilter":e.getArtistFilteredTracks();e.updateStats(n);break;case"href":i.trigger("change:filter",{url:n});break;case"virtualId":e.play&&e.play.model.set("id",n);e.options.ModelViewOptions[r]=n;break;case"listTitle":e.play&&e.play.model.set(r,n);e.options.ModelViewOptions[r]=n}})};t.prototype.updateStats=function(e){if(this.play){var t=this.play.model.get("stats");t.entityId=e;this.play.model.set({stats:t},{silent:!0});this.collection.length&&this.applyStats(this.collection.models,!1)}};t.prototype.applyStats=function(e,t){void 0===t&&(t=!0);if(this.play){var r={entity:"tracklist",entityId:this.play.model.get("stats").entity
50Id};e.forEach(function(e){e.set(r,{silent:t})})}};t.prototype.getArtistFilteredTracks=function(e,t){void 0===e&&(e=10);switch(this.model.get("currentFilter")){case a.default.application.artistsFilter.MostPopular:return this.getMostPopular(e,t);case a.default.application.artistsFilter.Latest:return this.getLatest(e,t)}};t.prototype.getMostPopular=function(e,t){var r=this,n=this.options.userData,i={limit:e,artistId:this.model.get("id")};t&&(i.offset=t);return o.ChartsManager.getByAttribute({type:"track"},{dataParameters:i,userData:n}).then(function(e){if(e.length&&r.checkFilter(a.default.application.artistsFilter.MostPopular)){var t=e.map(function(e){return e.get("id")});return o.TracksManager.get(t,{userData:n})}return[]}).then(function(t){if(r.checkFilter(a.default.application.artistsFilter.MostPopular)){t.length<e&&(r.$moreButton?r.$moreButton.addClass("hidden"):r.model.set("isHidden","hidden"));r.addTracks(t)}})};t.prototype.getLatest=function(e,t){var r=this,n=this.options.userData,i={order:"dateCreated_desc",limit:e,artistId:this.model.get("id")};t&&(i.offset=t);return o.TracksManager.getByAttribute({},{dataParameters:i,userData:n}).then(function(t){if(r.checkFilter(a.default.application.artistsFilter.Latest)){t.length<e&&(r.$moreButton?r.$moreButton.addClass("hidden"):r.model.set("isHidden","hidden"));r.addTracks(t)}})};t.prototype.addTracks=function(e){var t=this;if(0!==e.length){this.applyStats(e);this.collection.add(e.map(function(e,r){e.set({offset:t.collection.length+r,tracklist:t.collection},{silent:!0});return e}));this.notifyPlayer()}};t.prototype.notifyPlayer=function(){!this.isClose&&s.default.isClient()&&0!==this.collection.length&&f.default.trigger(f.default.Event.QUEUE,{type:p.default.TrackItemType.VirtualList,id:this.model.get("virtualId"),collection:this.collection})};t.prototype.onRenderStart=function(){e.prototype.onRenderStart.call(this);var t=this.model.get("currentFilter"),r=this.model.get("name"),n=u.default.getUrl("artist",{name:r,id:this.model.get("id")})+this.getCurrentFilterParam(t);this.model.set({href:n})};t.prototype.render=function(){var t=this;return this.getArtistFilteredTracks().then(function(){return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$asideDiv=this.$(".entity-aside");this.$moreButton=this.$(".js-more-artist-tracks");this.$revealButton=this.$(".reveal>button");this.updateStats(this.model.get("currentFilter"));"plugins"in window&&"listpicker"in window.plugins&&this.configureSelect()};t.prototype.configureSelect=function(){var e=this,t=this.model.get("filters"),r=t.map(function(e){return"_TKEY_GENERIC_FILTER_"+e});r.unshift("_TKEY_WWW_GENERIC_cancel","_TKEY_GENERIC_FILTER_select-title");return o.LocalizationManager.get(r,{userData:this.options.userData}).then(function(r){var n=r[0],i=r[1],o=r.slice(2);e.filterSelectConfig={title:i.get("translate"),items:t.map(function(e,t){return{text:o[t].get("translate"),value:e}}),selectedValue:e.model.get("currentFilter"),cancelButtonLabel:n.get("translate")}})};t.prototype.events=function(){var t=r.extend({"click .reveal":"onClickReveal","change #select_filter":"onChangeFilter","click .js-more-artist-tracks":"onGetMore"},e.prototype.events.call(this));"plugins"in window&&"listpicker"in window.plugins&&(t["click #select_filter"]="showFilterPicker");return t};t.prototype.onClickReveal=function(e){if(this.$revealButton.hasClass("is-toggled")){this.$revealButton.removeClass("is-toggled");this.$asideDiv.removeClass("revealed")}else{this.$revealButton.addClass("is-toggled");this.$asideDiv.addClass("revealed")}};t.prototype.onChangeFilter=function(e){this.collection.reset();this.$moreButton?this.$moreButton.removeClass("hidden"):this.model.set("isHidden","");var t=this.$("#select_filter>option:selected").val(),r="artist-"+this.model.get("id")+"-"+t;this.model.set({virtualId:r,currentFilter:t,href:u.default.getUrl("artist",{name:this.model.get("name"),id:this.model.get("id")})+this.getCurrentFilterParam(t)});this.listener=r};t.prototype.showFilterPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.filterSelectConfig,function(e){t.$("#select_filter").val(e);t.filterSelectConfig.selectedValue=e;t.onChangeFilter()},function(){""})};t.prototype.onGetMore=function(e){this.getArtistFilteredTracks(10,this.collection.length)};t.prototype.getCurrentFilterParam=function(e){void 0===e&&(e=this.model.get("currentFilter")||a.default.application.artistsFilter.MostPopular);return e!==a.default.application.artistsFilter.MostPopular?"?filter="+e:""};t.prototype.checkFilter=function(e){return this.model&&this.model.get("currentFilter")===e};Object.defineProperty(t.prototype,"listener",{set:function(e){this._listener&&i.off(this._listener,this.notifyPlayer,this);this._listener=e;e&&i.on(this._listener,this.notifyPlayer,this)},enumerable:!0,configurable:!0});t.prototype.close=function(){this.listener=null;e.prototype.close.call(this)};return t}(d.default);t.default=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/artists/albums",["require","exports","underscore","../../../managers/manager","../../../library/view/scroll","../../../library/utilities/display","../../partials/albums/item"],e)}(function(e,t){"use strict";
50Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../managers/manager"),i=e("../../../library/view/scroll"),o=e("../../../library/utilities/display"),a=e("../../partials/albums/item"),s=function(e){function t(t){return e.call(this,r.extend({listSelector:".js-artist-albumsList",idList:"albums",ModelView:a.default,ModelViewOptions:{templateVariables:{from:"discography"}},entitiesPerRequest:o.default.getMaxEntitiesCount("Album",!1)},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/artists/albums"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.getMoreAlbums.bind(this)};t.prototype.render=function(){var t=this,r=this.options.entitiesPerRequest,i=this.model.get(this.options.idList),o=i.slice(0,r).map(function(e){return e.id});return n.AlbumsManager.get(o,{userData:this.options.userData}).then(function(r){if(!t.isClose){t.collection.set(r.slice(0,t.options.entitiesPerRequest));return e.prototype.render.call(t)}})};t.prototype.getMoreAlbums=function(e){var t=e.map(function(e){return e.id});return n.AlbumsManager.get(t,{userData:this.options.userData})};return t}(i.default);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/artists/singles",["require","exports","../../../library/view/scroll","../../../managers/manager","../../../library/utilities/display","../../partials/tracks/item","../../layout/player"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/scroll"),n=e("../../../managers/manager"),i=e("../../../library/utilities/display"),o=e("../../partials/tracks/item"),a=e("../../layout/player"),s=function(e){function t(t){return e.call(this,Object.assign({listSelector:".js-artist-singlesList",idList:"singles",ModelView:o.default,entitiesPerRequest:i.default.getMaxEntitiesCount("Single",!1),ModelViewOptions:{type:"virtual",originId:t.model.get("id"),templateVariables:{originId:t.model.get("id"),itemprop:"track",from:"swipe",fromId:"singles"}}},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/artists/singles"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.getMoreSingles.bind(this)};t.prototype.render=function(){var t=this,r=this.options.entitiesPerRequest,i=this.model.get(this.options.idList),s=i.slice(0,r).map(function(e){return e.id});return n.TracksManager.get(s,{userData:this.options.userData}).then(function(r){if(!t.isClose){t.collection.set(r.slice(0,t.options.entitiesPerRequest));t.collection.forEach(function(e,r){e.set({offset:r,tracklist:t.collection})});a.default.trigger(a.default.Event.QUEUE,{type:o.default.TrackItemType.VirtualList,id:t.model.get("virtualId"),collection:t.collection,origin:{id:t.model.get("id"),type:"virtual"}});return e.prototype.render.call(t)}})};t.prototype.getMoreSingles=function(e){var t=e.map(function(e){return e.id});return n.TracksManager.get(t,{userData:this.options.userData})};return t}(r.default);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/image/edit",["require","exports","underscore","../../overlays","../../../library/view/loggedComponent","../../overlays/image/edit"],e)}(function(e,t){"use strict";
50Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../overlays"),i=e("../../../library/view/loggedComponent"),o=e("../../overlays/image/edit"),a=function(e){function t(n){return e.call(this,r.extend({},t.defaultOptions,n))||this}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this)};t.prototype.getTemplateId=function(){switch(this.options.type){case"userCover":case"artistCover":return"/components/image/edit-cover";case"profile":default:return"/components/image/edit-profile"}};t.prototype.onRender=function(){var t=this;e.prototype.onRender.call(this);var r={openDialog:!1};this.isLogged(r).then(function(){var e=t.options.userData.session.get("me");t.checkIfAllowed(e.id)?t.$el.removeClass("hidden"):t.$el.addClass("hidden")}).catch(function(){t.$el.addClass("hidden")})};t.prototype.events=function(){return{click:"onClickEdit"}};t.prototype.onClickEdit=function(e){if(!this.isActive){this.activateComponent();var t=this.options.type,r=this.options.artistId;n.default.add(n.default.DefinitionPath.EditImage,{model:this.model,userData:this.options.userData,closeModelOnClose:!1,type:t,artistId:r}
50).then(function(){var e=$("#croppie-preview"),r=$(".image-crop").width(),n=o.default.CropInfo[t],i={enableExif:!1,enableOrientation:!0,viewport:{width:r,height:r/n.ratio,type:n.type},boundary:{width:r,height:r/n.ratio}};e.croppie(i)})}};t.prototype.onUserConnected=function(e){this.checkIfAllowed(e.get("id"))&&this.$el.removeClass("hidden")};t.prototype.onUserDisconnected=function(e){this.$el.addClass("hidden")};t.prototype.checkIfAllowed=function(e){return!this.options.doubleCheckIfAllowed||this.model.get("id")===e};t.defaultOptions={type:"profile",doubleCheckIfAllowed:!0};return t}(i.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/artists/header",["require","exports","../../../library/view/loading","../../../library/utilities/display","chrisweb-utilities","../../components/image/edit","../../../managers/manager","../../../managers/user","../../../library/utilities/app"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../library/utilities/display"),i=e("chrisweb-utilities"),o=e("../../components/image/edit"),a=e("../../../managers/manager"),s=e("../../../managers/user"),l=e("../../../library/utilities/app"),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.isExpanded=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/artists/headerDesktop"};t.prototype.events=function(){return{"click .js-expand":"onClickExpand"}};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.options.templateVariables.showLicensingHeaderBtn=l.getDevicePlatform()!==l.Platform.iOS&&n.default.getMaxEntitiesCount("DesktopDesign")<0;this.model.set("isOwner",this.determineIfUserIsArtistOwner());var t=new o.default({artistId:this.options.model.get("id"),userData:this.options.userData,model:this.options.model,type:"artistCover",doubleCheckIfAllowed:!1});this.addView(".js-edit-cover",t);a.UserManager.on(s.UserManager.Event.UserAvatar,this.updateCover,this);var r=new o.default({userData:this.options.userData,model:this.options.model,type:"profile",doubleCheckIfAllowed:!1});this.addView(".js-edit-profile",r)};t.prototype.close=function(){a.UserManager.off(s.UserManager.Event.UserAvatar,this.updateCover,this);e.prototype.close.call(this)};t.prototype.onClickExpand=function(e){this.isExpanded=!this.isExpanded;if(this.isExpanded){this.$(".js-expand").addClass("is-toggled");$(".js-secondary-mobile").removeClass("hidden")}else{this.$(".js-expand").removeClass("is-toggled");$(".js-secondary-mobile").addClass("hidden")}};t.prototype.updateCover=function(e){this.$(".js-"+e.type).prev().find(" > source").each(function(){$(this).prop("srcset",e.image)});this.$(".js-"+e.type).prev().find(" > img").each(function(){$(this).prop("src",e.image)});i.default.isClient()&&"picturefill"in window&&("HTMLPictureElement"in window&&"srcset"in document.createElement("img")||window.picturefill())};t.prototype.determineIfUserIsArtistOwner=function(){var e=!1;try{var t=this.options.userData.session.get("me");e=t&&(t.managedArtistIds.includes(this.options.model.get("id"))||!0===t.superAdmin)}catch(e){console.warn(e)}return e};return t}(r.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/artists/index",["require","exports","ribsjs","../../../library/view/swipe","../../../library/utilities/route","../../../library/utilities/display","./overview","./albums","./singles","../../partials/similar/index","../../partials/artists/item","../../pages/reviews/page","../../partials/artists/header","../../partials/artists/secondaryInformation","../../../models/manager/artist"],e)}(function(e,t){"use strict";
50Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("../../../library/view/swipe"),i=e("../../../library/utilities/route"),o=e("../../../library/utilities/display"),a=e("./overview"),s=e("./albums"),l=e("./singles"),u=e("../../partials/similar/index"),c=e("../../partials/artists/item"),d=e("../../pages/reviews/page"),p=e("../../partials/artists/header"),f=e("../../partials/artists/secondaryInformation"),h=e("../../../models/manager/artist"),m=function(e){function t(n,o){var f=this,h=n[0],m=n[1],y=n[2],g=n[3],v=n[4],_=n[5],b=n[6],w=n[7],x=n[8],M=n[9],S=n[10],k=n[11],T=o.model,A=[{metaTitle:h,metaDescription:m,metaKeywords:y,name:t.Views.Overview,titleKey:"_TKEY_WWW_ARTIST_overview-title",viewClass:a.default,options:Object.assign({type:"artist",context:"ARTISTPAGE"},o,{model:o.model.getModelProjection(r.Model)})}];T.get("albums")&&T.get("albums").length&&A.push({metaTitle:g,metaDescription:v,metaKeywords:_,name:t.Views.Albums,titleKey:"_TKEY_WWW_GENERIC_albums",viewClass:s.default,options:Object.assign({context:"ARTISTPAGE"},o,{model:o.model.getModelProjection(r.Model)})});if(T.get("singles")&&T.get("singles").length){var E=o.model.getModelProjection(r.Model);E.set("virtualId","artist_"+T.get("id")+"_singles");A.push({metaTitle:b,metaDescription:w,metaKeywords:x,name:t.Views.Singles,titleKey:"_TKEY_WWW_GENERIC_singles",viewClass:l.default,options:Object.assign({context:"ARTISTPAGE"},o,{model:E})})}A.push({metaTitle:M,metaDescription:S,metaKeywords:k,name:t.Views.Similar,titleKey:"_TKEY_WWW_ARTIST_similar-swipe-title",viewClass:u.default,options:Object.assign({ModelView:c.default,type:"artist",context:"ARTISTPAGE",ModelViewOptions:{templateVariables:{from:"swipe",fromId:"similar"}}},o,{model:o.model.getModelProjection(r.Model)})},{metaTitle:h,metaDescription:m,metaKeywords:y,name:t.Views.Reviews,titleKey:"_TKEY_WWW_TRACK_comments-tab-title",viewClass:d.default,options:Object.assign({type:"artist",context:"ARTISTPAGE"},o,{model:o.model.getModelProjection(r.Model)})});f=e.call(this,Object.assign({},o,{swipeSelector:".js-swipe-container",swipeViews:A,headerView:new p.default(Object.assign({},o,{model:o.model.getModelProjection(r.Model)})),prefix:i.default.getUrl("artist",{id:T.get("id"),name:T.get("name")}),manageUrl:!0,isCircular:!1}))||this;return f}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/artists/index"};t.prototype.getUrl=function(t){var r="";"getCurrentFilterParam"in this.options.swipeViews[this.currentViewIndex].view&&(r=this.options.swipeViews[this.currentViewIndex].view.getCurrentFilterParam());return e.prototype.getUrl.call(this,t)+r};t.prototype.getHeaderElement=function(){var t=this;return this.options.swipeViews.map(function(r){return{title:r.titleKey,href:e.prototype.getUrl.call(t,r.name),name:r.name}})};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);if(o.default.getMaxEntitiesCount("DesktopDesign")<0){var t=new f.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables});this.addView(".js-secondary-mobile",t)}};t.prototype.generateStructuredData=function(){return h.Artist.generateStructuredData(this.model)};t.Views={Overview:"",Albums:"albums",Singles:"singles",Similar:"similar",Reviews:"reviews"};return t}(n.default);t.default=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/artists/index",["require","exports","ribsjs","../../library/controller/pageController","../../library/error/error","../../managers/manager","speakingurl","../../vendor/phpjs/phpjs","../../configuration/configuration","chrisweb-utilities","../../library/utilities/user","../../library/utilities/route","../../library/utilities/object","../../views/pages/artists/index"],e)}(function(e,t){"use strict";
50Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../library/controller/pageController"),o=e("../../library/error/error"),a=e("../../managers/manager"),s=e("speakingurl"),l=e("../../vendor/phpjs/phpjs"),u=e("../../configuration/configuration"),c=e("chrisweb-utilities"),d=e("../../library/utilities/user"),p=e("../../library/utilities/route"),f=e("../../library/utilities/object"),h=e("../../views/pages/artists/index"),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;e.prototype.create.call(this,t);if(isNaN(this.options.id))throw new o.default(this.errorDefinitions.NOT_FOUND.message,{userData:this.options.userData,id:this.options.id});if(!this.promise){var i=this.options.userData;this.promise=a.ArtistsManager.get(this.options.id,{userData:i}).then(function(e){if(0===e.length)throw new o.default(r.errorDefinitions.NOT_FOUND.message,{userData:r.options.userData,id:r.options.id});var m=e[0],y=p.default.getParams(r.options.url);m.set("currentFilter",y.filter||u.default.application.artistsFilter.MostPopular);n.on("change:filter",r.onChangeFilter,r)
51;var g=s(c.default.safeUnescape(m.get("name")));""===g&&(g="_");r.redirectIfUrlIncomplete({cleanName:g,generateURL:function(){var e=p.default.getUrl("artist",{id:m.get("id"),name:m.get("name")});"string"==typeof r.options.subpage&&r.options.subpage.length>0&&(e+="/"+r.options.subpage);return e}});var v=u.default.application.websiteName,_=d.default.getUserLanguage(i);return a.LocalizationManager.get(["_TKEY_WWW_META_TITLE_artist-x-artistname-x-website","_TKEY_WWW_META_DESCRIPTION_artist-x-artistname-x-website","_TKEY_WWW_META_KEYWORDS_artist","_TKEY_WWW_META_TITLE_artist-albums-x-artistname-x-website","_TKEY_WWW_META_DESCRIPTION_artist-albums-x-artistname-x-website","_TKEY_WWW_META_KEYWORDS_artist-albums","_TKEY_WWW_META_TITLE_artist-singles-x-artistname-x-website","_TKEY_WWW_META_DESCRIPTION_artist-singles-x-artistname-x-website","_TKEY_WWW_META_KEYWORDS_artist-singles","_TKEY_WWW_META_TITLE_artist-similar-x-artistname-x-website","_TKEY_WWW_META_DESCRIPTION_artist-similar-x-artistname","_TKEY_WWW_META_KEYWORDS_artist-similar","_TKEY_WWW_ARTIST_page-title","_TKEY_WWW_GENERIC_share-message"],{userData:i}).then(function(e){var n=e[0],o=e[1],a=e[2],s=e[3],d=e[4],p=e[5],y=e[6],g=e[7],b=e[8],w=e[9],x=e[10],M=e[11],S=e[12],k=e[13],T=l.default.strings.sprintf(n.get("translate")||n.get("id"),m.get("name"),v),A=l.default.strings.sprintf(o.get("translate")||o.get("id"),m.get("name"),v),E=a.get("translate")||a.get("id"),P=l.default.strings.sprintf(s.get("translate")||s.get("id"),m.get("name"),v),O=l.default.strings.sprintf(d.get("translate")||d.get("id"),m.get("name"),v),j=p.get("translate")||p.get("id"),D=l.default.strings.sprintf(y.get("translate")||y.get("id"),m.get("name"),v),C=l.default.strings.sprintf(g.get("translate")||g.get("id"),m.get("name"),v),L=b.get("translate")||b.get("id"),I=l.default.strings.sprintf(w.get("translate")||w.get("id"),m.get("name"),v),R=l.default.strings.sprintf(x.get("translate")||x.get("id"),m.get("name"),v),Y=M.get("translate")||M.get("id"),N=l.default.strings.sprintf(k.get("translate")||k.get("id"),m.get("name"),v),F=m.get("description")[_].replace(/"/g,"&quot;");if(""===F&&"en"!==_&&""!==m.get("description").en){var W=m.get("description").en,U=m.get("description");U[_]=W;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").en){F=m.get("description").en;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").es){F=m.get("description").es;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").fr){F=m.get("description").fr;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").de){F=m.get("description").de;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").ru){F=m.get("description").ru;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").it){F=m.get("description").it;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").pt){F=m.get("description").pt;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}if(""===F&&""!==m.get("description").pl){F=m.get("description").pl;var U=m.get("description");U[_]=F;m.set({description:U},{silent:!0})}F=F.replace(/[<]br[^>]*[>
51]/gi," ");""!==F&&(A=F);var q=new h.default([T,A,E,P,O,j,D,C,L,I,R,Y],{currentView:r.options.subpage,model:m,userData:i,router:r.router,templateVariables:{websiteName:v,language:_}});r.listenToSwipe(q);var H=q.getTabMetaData();r.skeleton.setTitle(c.default.safeUnescape(H.metaTitle));r.skeleton.setDescription(c.default.safeUnescape(H.metaDescription));r.skeleton.setKeywords(H.metaKeywords);var V=(q.getHeaderElement(),l.default.strings.sprintf(S.get("translate")||S.get("id"),m.get("name"))),B=q.getUrl(r.options.subpage),z=F;""===z&&(z=N);t.setHeader(c.default.safeUnescape(V));t.setCanonicalUrl(B);t.addContent(q);t.setOpenGraph({app_id:u.default.application.facebookAppId,url:B,title:c.default.safeUnescape(T),image:m.get("cover").small.size600,site_name:u.default.application.websiteName,description:c.default.safeUnescape(z),type:"music.musician",locale_alternate:u.default.application.getLocales()});t.setSchema({itemtype:"http://schema.org/MusicGroup",name:c.default.safeUnescape(m.get("name")),description:c.default.safeUnescape(F).replace(/"/g,""),image:m.get("cover").small.size600,url:B});f.closeModel(e);return t})})}return this.promise};t.prototype.updateMetadata=function(e){this.skeleton.setTitle(c.default.safeUnescape(e.metaTitle));this.skeleton.setDescription(c.default.safeUnescape(e.metaDescription));this.skeleton.setKeywords(e.metaKeywords);this.skeleton.setCanonicalUrl(e.url,!e.url.includes("biography"))};t.prototype.onChangeFilter=function(e){c.default.isClient()&&this.router.navigate(e.url,{trigger:!1,replace:!0})};t.prototype.clear=function(){n.off("change:filter",this.onChangeFilter,this);e.prototype.clear.call(this)};t.prototype.uniqueInstanceId=function(){return this.options.id+"_"+this.options.name};return t}(i.default);t.default=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/post/item",["require","exports","underscore","../../../library/view/view","../../../managers/manager","FSPromise","../../../library/error/error","../../../configuration/errorDefinitions"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/view"),i=e("../../../managers/manager"),o=e("FSPromise"),a=o.FSPromise,s=e("../../../library/error/error"),l=e("../../../configuration/errorDefinitions"),u=function(e){function t(t){var n=e.call(this,r.extend({context:"WALLPOST"},t))||this;n.model.set("wallpostText",n.model.get("wallpostText")||n.model.get("text"));n.model.set({fromId:n.model.get("id").toString()},{silent:!0});return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/post/"+this.model.get("category")};t.prototype.render=function(){var t=this,r=null,n={userData:this.options.userData};switch(this.model.get("category")){case"artist":r=i.ArtistsManager;break;case"album":r=i.AlbumsManager;break;case"playlist":r=i.PlaylistsManager;break;case"single":case"track":r=i.TracksManager;break;case"message":case"interview":r=i.UserManager}var o=[];if(r){var u=this.model.get("entityId");u||(u=this.model.get("authorId"));o.push(r.get(u,n))}else o.push(null);o.push(i.UserManager.get(this.model.get("authorId"),n));/^_TKEY_[A-Z0-9_-]+$/.test(this.model.get("wallpostText"))&&o.push(new a(function(e){i.LocalizationManager.get([t.model.get("wallpostText")],{userData:t.options.userData}).then(function(r){var n=r[0];t.model.set("wallpostText",n.get("translate"));e()})}));return a.all(o).then(function(n){var i=n[0],o=n[1];if((!r||i.length>0)&&o.length>0){var a={};a[t.model.get("category")]=r?i[0].toJSON():r;a.author=o[0].toJSON();t.model.set(a,{silent:!0});i[0].close();o[0].close();return e.prototype.render.call(t)}throw new s.default(l.default.NOT_FOUND.message,{data:{type:"post",entity:t.model.get("category"),id:t.model.get("entity
51Id")},userData:t.options.userData})}).catch(function(e){return t})};return t}(n.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/blog/postfilter",["require","exports","underscore","ribsjs","../../../library/view/scroll","../../../managers/manager","FSPromise","../../../library/utilities/display","../../../library/utilities/object","../../partials/post/item"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("../../../library/view/scroll"),o=e("../../../managers/manager"),a=e("FSPromise"),s=a.FSPromise,l=e("../../../library/utilities/display"),u=e("../../../library/utilities/object"),c=e("../../partials/post/item"),d=function(e){function t(t){var n=e.call(this,r.extend({listSelector:".js-blog-post-list",idList:"items",ModelView:c.default,ModelViewOptions:{userData:t.userData,templateVariables:{from:"blog",fromId:t.category?t.category+"s":null}},entitiesPerRequest:2*l.default.getMaxEntitiesCount("Post",!1)},t))||this;n.comparator=function(e,t){return t.get("dateStart")-e.get("dateStart")||t.get("id")-e.get("id")};return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/blog/postfilter"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this);this.postCollection=new n.Collection([],{comparator:this.comparator})};t.prototype.render=function(){var t=this,r={limit:2*this.options.entitiesPerRequest},n=this.options.category,i=n?{category:n}:{};return o.PostsManager.getByAttribute(i,{dataParameters:r,userData:this.options.userData}).then(function(r){if(!t.isClose){t.collection.set(r.slice(0,t.options.entitiesPerRequest));t.postCollection.add(r);t.model.set({items:t.postCollection},{silent:!0});return e.prototype.render.call(t)}})};t.prototype.onGetMoreRow=function(e){var t=this;if(this.collection.length+e.length>=this.postCollection.length){var r={limit:this.options.entitiesPerRequest,offset:this.postCollection.length},n=this.options.category,i=n?{category:n}:{};return o.PostsManager.getByAttribute(i,{dataParameters:r,userData:this.options.userData}).then(function(r){t.isClose||t.postCollection.add(r,{silent:!0});return e})}return s.resolve(e)};t.prototype.close=function(){if(this.postCollection){u.closeModel(this.postCollection.models);this.postCollection=null}e.prototype.close.call(this)};t.Categories={Album:"album",Artist:"artist",Interview:"interview",Message:"message",Playlist:"playlist",Song:"track",Video:"video"};return t}(i.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/blog/index",["require","exports","underscore","../../../library/view/swipe","../../../library/utilities/route","./postfilter"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/swipe"),i=e("../../../library/utilities/route"),o=e("./postfilter"),a=function(e){function t(n,a){var s=this,l=n[0],u=n[1],c=n[2],d=n[3],p=n[4],f=n[5],h=n[6],m=n[7],y=n[8],g=[{metaTitle:l,metaDescription:u,metaKeywords:c,name:t.Vie
51ws.Overview,titleKey:"_TKEY_WWW_BLOG_all-posts-tabs",viewClass:o.default,options:Object.assign({templateVariables:{mode:"list"}},a)},{metaTitle:d,metaDescription:p,metaKeywords:f,name:t.Views.Albums,titleKey:"_TKEY_WWW_GENERIC_albums",viewClass:o.default,options:Object.assign({category:o.default.Categories.Album,templateVariables:{mode:"list"}},a)},{metaTitle:h,metaDescription:m,metaKeywords:y,name:t.Views.Playlists,titleKey:"_TKEY_WWW_GENERIC_playlists",viewClass:o.default,options:Object.assign({category:o.default.Categories.Playlist,templateVariables:{mode:"list"}},a)}];s=e.call(this,r.extend({},a,{swipeSelector:".js-swipe-container",swipeViews:g,prefix:i.default.getUrl("blog"),manageUrl:!0,isCircular:!1}))||this;return s}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/blog/index"};t.Views={Overview:"",Albums:"albums",Playlists:"playlists"};return t}(n.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/blog/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../views/pages/blog/index","../../library/utilities/object"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../views/pages/blog/index"),s=e("../../library/utilities/object"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;e.prototype.create.call(this,t);if(!this.promise){var l=this.options.userData;this.promise=n.LocalizationManager.get(["_TKEY_WWW_GENERIC_albums","_TKEY_WWW_GENERIC_artists","_TKEY_WWW_GENERIC_interviews","_TKEY_WWW_GENERIC_messages","_TKEY_WWW_GENERIC_playlists","_TKEY_WWW_META_TITLE_blog-x-website","_TKEY_WWW_META_DESCRIPTION_blog-x-website","_TKEY_WWW_META_KEYWORDS_blog","_TKEY_WWW_BLOG_page-title"],{userData:l}).then(function(e){var n=e[0],u=e[1],c=(e[2],e[3]),d=e[4],p=e[5],f=e[6],h=e[7],m=e[8],y=r.options.subpage||"",g=o.default.application.websiteName,v=i.default.strings.sprintf(p.get("translate"),g),_=i.default.strings.sprintf(f.get("translate"),g),b=h.get("translate"),w=v+" | "+n.get("translate"),x=_,M=b,S=v+" | "+u.get("translate"),k=_,T=b,A=v+" | "+c.get("translate"),E=_,P=b,O=v+" | "+d.get("translate"),j=_,D=b,C=new a.default([v,_,b,w,x,M,S,k,T,A,E,P,O,j,D],{currentView:y,userData:l});r.listenToSwipe(C);var L=i.default.strings.sprintf(m.get("translate"),g);t.setHeader(L);var I=C.getTabMetaData();r.skeleton.setTitle(I.metaTitle);r.skeleton.setDescription(I.metaDescription);r.skeleton.setKeywords(I.metaKeywords);t.addContent(C);s.closeModel(e);return t})}return this.promise};t.prototype.uniqueInstanceId=function(){return"_"};return t}(r.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/communities/header",["require","exports","../../../library/view/loading","../../../library/utilities/display"],e)}(function(e,t){"use strict";
51Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../library/utilities/display"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/communities/header";switch(this.options.templateStyle){case t.TemplateStyle.NoCover:e+="NoCover";break;case t.TemplateStyle.Cover:default:n.default.getMaxEntitiesCount("DesktopDesign")>0&&(e+="Desktop")}return e};t.TemplateStyle={NoCover:"noCover",Cover:"cover"};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/communities/tracks",["require","exports","underscore","ribsjs","../../../configuration/configuration","../../../library/view/scroll","../../../managers/manager","FSPromise","chrisweb-utilities","../../../library/utilities/display","../../../library/utilities/object","../../../library/utilities/route","../../partials/tracks/item","../../partials/reviews/index","../../partials/reviews/item","../../layout/player"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../configuration/configuration"),a=e("../../../library/view/scroll"),s=e("../../../managers/manager"),l=e("FSPromise"),u=l.FSPromise,c=e("chrisweb-utilities"),d=e("../../../library/utilities/display"),p=e("../../../library/utilities/object"),f=e("../../../library/utilities/route"),h=e("../../partials/tracks/item"),m=e("../../partials/reviews/index"),y=e("../../partials/reviews/item"),g=e("../../layout/player"),v=function(e){function t(t){var n=e.call(this,r.extend({listSelector:".js-community-tracksList",idList:"trackItems",ModelView:h.default,ModelViewOptions:{type:h.default.TrackItemType.VirtualList,originType:"communities.tracks",originId:t.model.get("id"),isCol:!0,templateVariables:{from:"charts",fromId:"tracks"}},entitiesPerRequest:d.default.getMaxEntitiesCount("InfiniteTrack",!1),loadingStyle:{block:!0}},t))||this;n.allGenreChartName="all genres";n.genres={};n.allGenreChartName=s.TagsManager.getAllGenreTagName(n.options.language);n.options.templateVariables.id=n.model.get("id");return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/communities/tracks"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this)};t.prototype.onInitialize=function(){var i=this;e.prototype.onInitialize.call(this);var a=this.options.userData,l=r.values(o.default.application.chartsFilter);l.indexOf(this.model.get("currentTrackFilter"))<0&&this.model.set({currentTrackFilter:o.default.application.chartsFilter.BestOf},{silent:!0});var u=f.default.getParams().country||"_ALL_",p=r.values(o.default.application.countriesFilter),h=p.includes(u)?u:"_ALL_";this.model.set({currentCountry:h},{silent:!0});var g=p.map(function(e){return{code:e,name:"",lang:i.options.language}});g.unshift({code:"_ALL_",name:s.TagsManager.getAllCountriesName(this.options.language),lang:this.options.language});this.tracksCollection=new n.Collection;this.model.set({currentGenre:this.model.get("name"),trackFilters:l,countries:g,hiddenEmptyTracksMessage:"hidden",trackItems:this.tracksCollection});if(d.default.getMaxEntitiesCount("DisplayReview")>0){var v=new m.default({model:this.model.clone(),subviewAsyncRender:c.utilities.isClient(),listSelector:".js-reviews-list-selector",ModelView:y.default,ModelViewOptions:{context:t.Context,userData:a,router:this.options.router,parentItem:this.model,parentItemType:"track",templateVariables:{from:"charts",fromId:"reviews"}},type:"community",closeModelOnClose:!1,context:t.Context,userData:a,displayMore:!0,templateVariables:{isCol:!0}});this.addView(".js-reviews-section",v)}this.setUrl();s.StaticManager.getByAttribute({type:"country"},{userData:a}).then(function(e){var t=e.reduce(function(e,t){p.includes(t.attributes.code)&&e.push(t.attributes);return e},[]);t.unshift({code:"_ALL_",name:s.TagsManager.getAllCountriesName(i.options.language),lang:i.options.language});i.model.set("countries",t)})};t.prototype.onAttributeChange=function(){var t=this;e.prototype.onAttributeChange.call(this);var r=this.model.changedAttributes();Object.keys(r).forEach(function(e){switch(e){case"listTitle":case"href":case"virtualId":t.play&&t.play.model.set(e,t.model.get(e));t.options.ModelViewOptions[e]=t.model.get(e);break;case"currentTrackFilter":case"currentCountry":t.updateStats(r[e]);t.getChart(t.options.entitiesPerRequest).then(function(){t.onNeedMoreEntities()})}})};t.prototype.updateStats=function(e){if(this.play){var t=this.play.model.get("stats");t.entityId=e;this.play.model.set({stats:t},{silent:!0})}};t.prototype.getChart=function(e,t){void 0===e&&(e=this.options.entitiesPerRequest);switch(this.model.get("currentTrackFilter")){case o.default.application.chartsFilter.BestOf:return this.getBestOf(e,t);case o.default.application.chartsFilter.Trending:return this.getTrending(e,t);case o.default.application.chartsFilter.Latest:return this.getLatest(e,t)}};t.prototype.getBestOf=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),limit:e}:{limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return s.ChartsManager.getByAttribute({type:"track"},{dataParameters:i,userData:n}).then(function(t){var r=t.map(function(e){return e.get("id")});p.closeModel(t);return s.TracksManager.get(r,{dataParameters:{limit:e},userData:n})}).then(function(e){r.checkFilters(o.default.application.chartsFilter.BestOf)&&r.addTracks(e)})};t.prototype.getTrending=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),order:"hotness",limit:e}:{order:"trending",limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return this.model.get("id")?s.TracksManager.getByAttribute({},{dataParameters:i,userData:n}).then(function(e){r.checkFilters(o.default.application.chartsFilter.Trending)&&r.addTracks(e)}):s.ChartsManager.getByAttribute({type:"track"},{dataParameters:i,userData:n}).then(function(t){var r=t.map(function(e){return e.get("id")});p.closeModel(t);return s.TracksManager.get(r,{dataParameters:{limit:e},userData:n})}).then(function(e){r.checkFilters(o.default.application.chartsFilter.Trending)&&r.addTracks(e)})};t.prototype.getLatest=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),order:"dateCreated_desc",limit:e}:{order:"dateCreated_desc",limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return s.TracksManager.getByAttribute({},{dataParameters:i,userData:n}).then(function(e){r.checkFilters(o.default.application.chartsFilter.Latest)&&r.addTracks(e)})};t.prototype.addTracks=function(e){var t=this;if(this.tracksCollection){var r=this.tracksCollection.length;this.tracksCollection.add(e);this.tracksCollection.forEach(function(e,r){e.set({offset:r,tracklist:t.tracksCollection})});this.notifyPlayer();this.tracksCollection.length?r||this.collection.set(this.tracksCollection.slice(0,this.options.entitiesPerRequest/2)):this.$el.find("#js-community-noTracks").removeClass("hidden")}};t.prototype.notifyPlayer=function(){!this.isClose&&c.default.isClient()&&this.tracksCollection.length&&g.default.trigger(g.default.Event.QUEUE,{type:h.default.TrackItemType.VirtualList,i
51d:this.model.get("virtualId"),collection:this.tracksCollection})};t.prototype.checkFilters=function(e){return this.model&&this.model.get("currentTrackFilter")===e&&(!this.$("#select_country").length||this.model.get("currentCountry")===this.$("#select_country>option:selected").val())};t.prototype.setUrl=function(e,t){void 0===e&&(e=this.model.get("currentTrackFilter"));void 0===t&&(t=this.model.get("currentCountry"));var r=f.default.getUrl("community",{name:this.model.get("name"),subpage:"tracks"})+this.getCurrentFilterParam(e)+this.getCurrentCountryParam(t,e),n="community-tracklist-"+this.model.get("idstr")+"-filter-"+e+"-country-"+t;this.model.set({currentTrackFilter:e,currentCountry:t,href:r,listTitle:e+" "+this.model.get("name"),virtualId:n});this.$el.find("#js-community-noTracks").addClass("hidden");i.trigger("change:filter",{url:r});this.listener=n};t.prototype.render=function(){var t=this,n=this.options.language,i={order:"featuredRank",limit:40,lang:n,category:["genre"]};return s.TagsManager.getByAttribute({},{dataParameters:i,userData:this.options.userData}).then(function(e){if(!t.isClose){var i=s.TagsManager.getAllGenreTagModel(n);e.unshift(i);e=r.reject(e,function(e){return 100===e.get("id")});e.forEach(function(e){t.genres[e.get("name")]={id:e.get("id"),idstr:e.get("idstr")}});Object.keys(t.genres).indexOf(t.model.get("name"))<0&&(t.genres[t.model.get("name")]={id:t.model.get("id"),idstr:t.model.get("idstr")});t.model.set({genres:Object.keys(t.genres)},{silent:!0});return t.getChart(t.options.entitiesPerRequest)}}).then(function(){if(!t.isClose)return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.updateStats(this.model.get("currentTrackFilter"));"plugins"in window&&"listpicker"in window.plugins&&this.configureSelect()};t.prototype.configureSelect=function(){var e=this,t=this.model.get("trackFilters"),r=t.map(function(e){return"_TKEY_GENERIC_FILTER_"+e});r.unshift("_TKEY_WWW_GENERIC_cancel","_TKEY_GENERIC_GENRE_select-title","_TKEY_GENERIC_FILTER_select-title","_TKEY_GENERIC_COUNTRY_select-title");return s.LocalizationManager.get(r,{userData:this.options.userData}).then(function(r){var n=r[0],i=r[1],o=r[2],a=r[3],s=r.slice(4);e.genreSelectConfig={title:i.get("translate"),items:e.model.get("genres").map(function(e){return{text:e,value:e}}),selectedValue:e.model.get("currentGenre"),cancelButtonLabel:n.get("translate")};e.filterSelectConfig={title:o.get("translate"),items:t.map(function(e,t){return{text:s[t].get("translate"),value:e}}),selectedValue:e.model.get("currentTrackFilter"),cancelButtonLabel:n.get("translate")};e.countrySelectConfig={title:a.get("translate"),items:e.model.get("countries").map(function(e){return{text:e.name,value:e.code}}),selectedValue:e.model.get("currentCountry"),cancelButtonLabel:n.get("translate")}})};t.prototype.events=function(){var e="plugins"in window&&"listpicker"in window.plugins,t={};t[(e?"click":"change")+" #select_genre"]=e?"showGenrePicker":"onChangeGenre";t[(e?"click":"change")+" #select_filter_tracks"]=e?"showFilterPicker":"onChangeFilter";t[(e?"click":"change")+" #select_country"]=e?"showCountryPicker":"onChangeCountry";return t};t.prototype.onChangeFilter=function(){this.tracksCollection.reset();this.collection.reset();this.setUrl(this.$("#select_filter_tracks>option:selected").val(),this.$("#select_country>option:selected").val())};t.prototype.onChangeGenre=function(){var e=this.$("#select_genre>option:selected").val(),t=f.default.getUrl("community",{name:e,subpage:"tracks"})+this.getCurrentFilterParam()+this.getCurrentCountryParam();i.trigger("navigate",{url:t})};t.prototype.onChangeCountry=function(){this.tracksCollection.reset();this.collection.reset();this.setUrl(this.$("#select_filter_tracks>option:selected").val(),this.$("#select_country>option:selected").val())};t.prototype.showGenrePicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.genreSelectConfig,function(e){t.$("#select_genre").val(e);t.genreSelectConfig.selectedValue=e;t.onChangeGenre()},function(){""})};t.prototype.showFilterPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.filterSelectConfig,function(e){t.$("#select_filter_tracks").val(e);t.filterSelectConfig.selectedValue=e;t.onChangeFilter()},function(){""})};t.prototype.showCountryPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.countrySelectConfig,function(e){t.$("#select_country").val(e);t.countrySelectConfig.selectedValue=e;t.onChangeCountry()},function(){""})};t.prototype.getCurrentFilterParam=function(e){void 0===e&&(e=this.model.get("currentTrackFilter"));return e!==o.default.application.chartsFilter.BestOf?"?filter="+e:""};t.prototype.getCurrentCountryParam=function(e,t){void 0===e&&(e=this.model.get("currentCountry"));void 0===t&&(t=this.model.get("currentTrackFilter"));return"_ALL_"!==e?(t===o.default.application.chartsFilter.BestOf?"?":"&")+"country="+e:""};t.prototype.onGetMoreRow=function(e){var t=this;return new u(function(r,n){t.collection.length+e.length>=t.tracksCollection.length?t.getChart(t.options.entitiesPerRequest,t.tracksCollection.length).then(function(){r(e)}).catch(n):r(e)})};Object.defineProperty(t.prototype,"listener",{set:function(e){this._listener&&i.off(this._listener,this.notifyPlayer,this);this._listener=e;e&&i.on(this._listener,this.notifyPlayer,this)},enumerable:!0,configurable:!0});t.prototype.close=function(){if(this.tracksCollection){p.closeModel(this.tracksCollection.models);this.tracksCollection=null}this.listener=null;e.prototype.close.call(this)};t.Context="COMMUNITYPAGE";return t}(a.default);t.default=v});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/communities/albums",["require","exports","underscore","ribsjs","../../../configuration/configuration","../../../library/view/scroll","FSPromise","../../../library/utilities/display","../../../library/utilities/object","../../../library/utilities/route","../../../managers/manager","../../partials/albums/item"],e)}(function(e,t){"use strict";
51Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../configuration/configuration"),a=e("../../../library/view/scroll"),s=e("FSPromise"),l=s.FSPromise,u=e("../../../library/utilities/display"),c=e("../../../library/utilities/object"),d=e("../../../library/utilities/route"),p=e("../../../managers/manager"),f=e("../../partials/albums/item"),h=function(e){function t(t){var n=e.call(this,r.extend({listSelector:".js-community-albumsList",idList:"albumItems",ModelView:f.default,ModelViewOptions:{templateVariables:{from:"charts"}},entitiesPerRequest:u.default.getMaxEntitiesCount(u.default.EntityType.Album,!1),loadingStyle:{page:!0}},t))||this;n.allGenreChartName="all genres";n.genres={};n.allGenreChartName=p.TagsManager.getAllGenreTagName(n.options.language);return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/communities/albums"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this)};t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);var i=r.values(o.default.application.chartsFilter);i.indexOf(this.model.get("currentAlbumFilter"))<0&&this.model.set({currentAlbumFilter:o.default.application.chartsFilter.BestOf},{silent:!0});var a=d.default.getParams().country||"_ALL_",s=r.values(o.default.application.countriesFilter),l=s.includes(a)?a:"_ALL_";this.model.set({currentCountry:l},{
52silent:!0});var u=s.map(function(e){return{code:e,name:"",lang:t.options.language}});u.unshift({code:"_ALL_",name:p.TagsManager.getAllCountriesName(this.options.language),lang:this.options.language});this.albumsCollection=new n.Collection;this.model.set({currentGenre:this.model.get("name"),albumFilters:i,countries:u,hiddenEmptyAlbumsMessage:"hidden",albumItems:this.albumsCollection});this.setUrl();p.StaticManager.getByAttribute({type:"country"},{userData:this.options.userData}).then(function(e){var r=e.reduce(function(e,t){s.includes(t.attributes.code)&&e.push(t.attributes);return e},[]);r.unshift({code:"_ALL_",name:p.TagsManager.getAllCountriesName(t.options.language),lang:t.options.language});t.model.set("countries",r)})};t.prototype.onAttributeChange=function(){var t=this;e.prototype.onAttributeChange.call(this);var n=this.model.changedAttributes();r.keys(n).forEach(function(e){switch(e){case"currentAlbumFilter":case"currentCountry":t.getChart(2*t.options.entitiesPerRequest).then(function(){t.onNeedMoreEntities()});t.setUrl()}})};t.prototype.getChart=function(e,t){void 0===e&&(e=this.options.entitiesPerRequest);switch(this.model.get("currentAlbumFilter")){case o.default.application.chartsFilter.Latest:return this.getLatest(e,t);case o.default.application.chartsFilter.Trending:return this.getTrending(e,t);case o.default.application.chartsFilter.BestOf:default:return this.getBestOf(e,t)}};t.prototype.getBestOf=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),limit:e}:{limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return p.ChartsManager.getByAttribute({type:"album"},{dataParameters:i,userData:n}).then(function(t){var r=t.map(function(e){return e.get("id")});c.closeModel(t);return p.AlbumsManager.get(r,{dataParameters:{limit:e},userData:n})}).then(function(e){r.checkFilters(o.default.application.chartsFilter.BestOf)&&r.addAlbums(e)})};t.prototype.getTrending=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),order:"hotness",limit:e}:{order:"hotness",limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return p.AlbumsManager.getByAttribute({},{dataParameters:i,userData:n}).then(function(e){r.checkFilters(o.default.application.chartsFilter.Trending)&&r.addAlbums(e)})};t.prototype.getLatest=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),order:"dateCreated_desc",limit:e}:{order:"dateCreated_desc",limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return p.AlbumsManager.getByAttribute({},{dataParameters:i,userData:n}).then(function(e){r.checkFilters(o.default.application.chartsFilter.Latest)&&r.addAlbums(e)})};t.prototype.addAlbums=function(e){if(this.albumsCollection){this.albumsCollection.length||this.collection.set(e.slice(0,this.options.entitiesPerRequest));this.albumsCollection.add(e);0===this.albumsCollection.models.length&&this.$el.find("#js-community-noAlbums").removeClass("hidden")}};t.prototype.checkFilters=function(e){return this.model&&this.model.get("currentAlbumFilter")===e&&(!this.$("#select_country").length||this.model.get("currentCountry")===this.$("#select_country>option:selected").val())};t.prototype.setUrl=function(e,t){void 0===e&&(e=this.model.get("currentAlbumFilter"));void 0===t&&(t=this.model.get("currentCountry"));var r=d.default.getUrl("community",{name:this.model.get("name"),subpage:"albums"})+this.getCurrentFilterParam(e)+this.getCurrentCountryParam(t,e);this.model.set({currentAlbumFilter:e,currentCountry:t,href:r,listTitle:e+" "+this.model.get("name")}
52);this.$el.find("#js-community-noAlbums").addClass("hidden");i.trigger("change:filter",{url:r})};t.prototype.render=function(){var t=this,n=this.options.language,i={order:"featuredRank",limit:40,lang:n,category:["genre"]};return p.TagsManager.getByAttribute({},{dataParameters:i,userData:this.options.userData}).then(function(e){if(!t.isClose){var i=p.TagsManager.getAllGenreTagModel(n);e.unshift(i);e=r.reject(e,function(e){return 100===e.get("id")});e.forEach(function(e){t.genres[e.get("name")]={id:e.get("id"),idstr:e.get("idstr")}});r.keys(t.genres).indexOf(t.model.get("name"))<0&&(t.genres[t.model.get("name")]={id:t.model.get("id"),idstr:t.model.get("idstr")});t.model.set({genres:Object.keys(t.genres)},{silent:!0});return t.getChart(2*t.options.entitiesPerRequest)}}).then(function(){if(!t.isClose)return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);"plugins"in window&&"listpicker"in window.plugins&&this.configureSelect()};t.prototype.configureSelect=function(){var e=this,t=this.model.get("albumFilters"),r=t.map(function(e){return"_TKEY_GENERIC_FILTER_"+e});r.unshift("_TKEY_WWW_GENERIC_cancel","_TKEY_GENERIC_GENRE_select-title","_TKEY_GENERIC_FILTER_select-title","_TKEY_GENERIC_COUNTRY_select-title");return p.LocalizationManager.get(r,{userData:this.options.userData}).then(function(r){var n=r[0],i=r[1],o=r[2],a=r[3],s=r.slice(4);e.genreSelectConfig={title:i.get("translate"),items:e.model.get("genres").map(function(e){return{text:e,value:e}}),selectedValue:e.model.get("currentGenre"),cancelButtonLabel:n.get("translate")};e.filterSelectConfig={title:o.get("translate"),items:t.map(function(e,t){return{text:s[t].get("translate"),value:e}}),selectedValue:e.model.get("currentAlbumFilter"),cancelButtonLabel:n.get("translate")};e.countrySelectConfig={title:a.get("translate"),items:e.model.get("countries").map(function(e){return{text:e.name,value:e.code}}),selectedValue:e.model.get("currentCountry"),cancelButtonLabel:n.get("translate")}})};t.prototype.events=function(){var e="plugins"in window&&"listpicker"in window.plugins,t={};t[(e?"click":"change")+" #select_genre"]=e?"showGenrePicker":"onChangeGenre";t[(e?"click":"change")+" #select_filter_albums"]=e?"showFilterPicker":"onChangeFilter";t[(e?"click":"change")+" #select_country"]=e?"showCountryPicker":"onChangeCountry";return t};t.prototype.onChangeFilter=function(){this.albumsCollection.reset();this.collection.reset();this.setUrl(this.$("#select_filter_albums>option:selected").val(),this.$("#select_country>option:selected").val())};t.prototype.onChangeGenre=function(){var e=this.$("#select_genre>option:selected").val(),t=d.default.getUrl("community",{name:e,subpage:"albums"})+this.getCurrentFilterParam()+this.getCurrentCountryParam();i.trigger("navigate",{url:t})};t.prototype.onChangeCountry=function(){this.albumsCollection.reset();this.collection.reset();this.setUrl(this.$("#select_filter_albums>option:selected").val(),this.$("#select_country>option:selected").val())};t.prototype.onGetMoreRow=function(e){this.collection.length+e.length>=this.albumsCollection.length&&this.getChart(this.options.entitiesPerRequest,this.albumsCollection.length);return l.resolve(e)};t.prototype.showGenrePicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.genreSelectConfig,function(e){t.$("#select_genre").val(e);t.genreSelectConfig.selectedValue=e;t.onChangeGenre()},function(){""})};t.prototype.showFilterPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.filterSelectConfig,function(e){t.$("#select_filter_albums").val(e);t.filterSelectConfig.selectedValue=e;t.onChangeFilter()},function(){""})};t.prototype.showCountryPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.countrySelectConfig,function(e){t.$("#select_country").val(e);t.countrySelectConfig.selectedValue=e;t.onChangeCountry()},function(){""})};t.prototype.getCurrentFilterParam=function(e){void 0===e&&(e=this.model.get("currentAlbumFilter"));return e!==o.default.application.chartsFilter.BestOf?"?filter="+e:""};t.prototype.getCurrentCountryParam=function(e,t){void 0===e&&(e=this.model.get("currentCountry"));void 0===t&&(t=this.model.get("currentAlbumFilter"));return"_ALL_"!==e?(t===o.default.application.chartsFilter.BestOf?"?":"&")+"country="+e:""};t.prototype.close=function(){if(this.albumsCollection){c.closeModel(this.albumsCollection.slice(this.collection.length));this.albumsCollection=null}e.prototype.close.call(this)};return t}(a.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/communities/artists",["require","exports","underscore","ribsjs","../../../configuration/configuration","../../../library/view/scroll","FSPromise","../../../library/utilities/display","../../../library/utilities/object","../../../library/utilities/route","../../../managers/manager","../../partials/artists/item"],e)}(function(e,t){"use strict";
52Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../configuration/configuration"),a=e("../../../library/view/scroll"),s=e("FSPromise"),l=s.FSPromise,u=e("../../../library/utilities/display"),c=e("../../../library/utilities/object"),d=e("../../../library/utilities/route"),p=e("../../../managers/manager"),f=e("../../partials/artists/item"),h=function(e){function t(t){var n=e.call(this,r.extend({listSelector:".js-community-artistsList",idList:"artistItems",ModelView:f.default,entitiesPerRequest:u.default.getMaxEntitiesCount(u.default.EntityType.Artist,!1),loadingStyle:{page:!0}},t))||this;n.allGenreChartName="all genres";n.genres={};n.allGenreChartName=p.TagsManager.getAllGenreTagName(n.options.language);return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/communities/artists"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this)};t.prototype.onInitialize=function(){var t=this;e.prototype.onInitialize.call(this);var i=r.values(o.default.application.chartsFilter);i.indexOf(this.model.get("currentArtistFilter"))<0&&this.model.set({currentArtistFilter:o.default.application.chartsFilter.BestOf},{silent:!0});var a=d.default.getParams().country||"_ALL_",s=r.values(o.default.application.countriesFilter),l=s.includes(a)?a:"_ALL_";this.model.set({currentCountry:l},{silent:!0});var u=s.map(function(e){return{code:e,name:"",lang:t.options.language}});u.unshift({code:"_ALL_",name:p.TagsManager.getAllCountriesName(this.options.language),lang:this.options.language});this.artistsCollection=new n.Collection;this.model.set({currentGenre:this.model.get("name"),artistFilters:i,countries:u,hiddenEmptyArtistsMessage:"hidden",artistItems:this.artistsCollection});this.setUrl();p.StaticManager.getByAttribute({type:"country"},{userData:this.options.userData}).then(function(e){var r=e.reduce(function(e,t){s.includes(t.attributes.code)&&e.push(t.attributes);return e},[]);r.unshift({code:"_ALL_",name:p.TagsManager.getAllCountriesName(t.options.language),lang:t.options.language});t.model.set("countries",r)})};t.prototype.onAttributeChange=function(){var t=this;e.prototype.onAttributeChange.call(this);var n=this.model.changedAttributes();r.keys(n).forEach(function(e){switch(e){case"currentArtistFilter":case"currentCountry":t.getChart(2*t.options.entitiesPerRequest).then(function(){t.onNeedMoreEntities()});t.setUrl()}})};t.prototype.getChart=function(e,t){void 0===e&&(e=this.options.entitiesPerRequest);switch(this.model.get("currentArtistFilter")){case o.default.application.chartsFilter.Latest:return this.getLatest(e,t);case o.default.application.chartsFilter.Trending:return this.getTrending(e,t);case o.default.application.chartsFilter.BestOf:default:return this.getBestOf(e,t)}};t.prototype.getBestOf=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),limit:e}:{limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return p.ChartsManager.getByAttribute({type:"artist"},{dataParameters:i,userData:n}).then(function(t){var r=t.map(function(e){return e.get("id")});c.closeModel(t);return p.ArtistsManager.get(r,{dataParameters:{limit:e},userData:n})}).then(function(e){r.checkFilters(o.default.application.chartsFilter.BestOf)&&r.addArtists(e)})};t.prototype.getTrending=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),order:"hotness",limit:e}:{order:"hotness",limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return p.ArtistsManager.getByAttribute({},{dataParameters:i,userData:n}).then(function(e){r.checkFilters(o.default.application.chartsFilter.Trending)&&r.addArtists(e)})};t.prototype.getLatest=function(e,t){var r=this,n=this.options.userData,i=this.model.get("id")?{tagId:this.model.get("id"),order:"dateJoin_desc",limit:e}:{order:"dateJoin_desc",limit:e};t&&(i.offset=t);var a=this.model.get("currentCountry");"_ALL_"!==a&&(i.country=a);return p.ArtistsManager.getByAttribute({},{dataParameters:i,userData:n}).then(function(e){r.checkFilters(o.default.application.chartsFilter.Latest)&&r.addArtists(e)})};t.prototype.addArtists=function(e){if(this.artistsCollection){this.artistsCollection.length||this.collection.set(e.slice(0,this.options.entitiesPerRequest));this.artistsCollection.add(e);0===this.artistsCollection.models.length&&this.$el.find("#js-community-noArtists").removeClass("hidden")}};t.prototype.checkFilters=function(e){return this.model&&this.model.get("currentArtistFilter")===e&&(!this.$("#select_country").length||this.model.get("currentCountry")===this.$("#select_country>option:selected").val())};t.prototype.setUrl=function(e,t){void 0===e&&(e=this.model.get("currentArtistFilter"));void 0===t&&(t=this.model.get("currentCountry"));var r=d.default.getUrl("community",{name:this.model.get("name"),subpage:"artists"})+this.getCurrentFilterParam(e)+this.getCurrentCountryParam(t,e);this.model.set({currentArtistFilter:e,currentCountry:t,href:r,listTitle:e+" "+this.model.get("name")}
52);this.$el.find("#js-community-noArtists").addClass("hidden");i.trigger("change:filter",{url:r})};t.prototype.render=function(){var t=this,n=this.options.language,i={order:"featuredRank",limit:40,lang:n,category:["genre"]};return p.TagsManager.getByAttribute({},{dataParameters:i,userData:this.options.userData}).then(function(e){if(!t.isClose){var i=p.TagsManager.getAllGenreTagModel(n);e.unshift(i);e=r.reject(e,function(e){return 100===e.get("id")});e.forEach(function(e){t.genres[e.get("name")]={id:e.get("id"),idstr:e.get("idstr")}});r.keys(t.genres).indexOf(t.model.get("name"))<0&&(t.genres[t.model.get("name")]={id:t.model.get("id"),idstr:t.model.get("idstr")});t.model.set({genres:Object.keys(t.genres)},{silent:!0});return t.getChart(2*t.options.entitiesPerRequest)}}).then(function(){if(!t.isClose)return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);"plugins"in window&&"listpicker"in window.plugins&&this.configureSelect()};t.prototype.configureSelect=function(){var e=this,t=this.model.get("artistFilters"),r=t.map(function(e){return"_TKEY_GENERIC_FILTER_"+e});r.unshift("_TKEY_WWW_GENERIC_cancel","_TKEY_GENERIC_GENRE_select-title","_TKEY_GENERIC_FILTER_select-title","_TKEY_GENERIC_COUNTRY_select-title");return p.LocalizationManager.get(r,{userData:this.options.userData}).then(function(r){var n=r[0],i=r[1],o=r[2],a=r[3],s=r.slice(4);e.genreSelectConfig={title:i.get("translate"),items:e.model.get("genres").map(function(e){return{text:e,value:e}}),selectedValue:e.model.get("currentGenre"),cancelButtonLabel:n.get("translate")};e.filterSelectConfig={title:o.get("translate"),items:t.map(function(e,t){return{text:s[t].get("translate"),value:e}}),selectedValue:e.model.get("currentArtistFilter"),cancelButtonLabel:n.get("translate")};e.countrySelectConfig={title:a.get("translate"),items:e.model.get("countries").map(function(e){return{text:e.name,value:e.code}}),selectedValue:e.model.get("currentCountry"),cancelButtonLabel:n.get("translate")}})};t.prototype.events=function(){var e="plugins"in window&&"listpicker"in window.plugins,t={};t[(e?"click":"change")+" #select_genre"]=e?"showGenrePicker":"onChangeGenre";t[(e?"click":"change")+" #select_filter_artists"]=e?"showFilterPicker":"onChangeFilter";t[(e?"click":"change")+" #select_country"]=e?"showCountryPicker":"onChangeCountry";return t};t.prototype.onChangeFilter=function(){this.artistsCollection.reset();this.collection.reset();this.setUrl(this.$("#select_filter_artists>option:selected").val(),this.$("#select_country>option:selected").val())};t.prototype.onChangeGenre=function(){var e=this.$("#select_genre>option:selected").val(),t=d.default.getUrl("community",{name:e,subpage:"artists"})+this.getCurrentFilterParam()+this.getCurrentCountryParam();i.trigger("navigate",{url:t})};t.prototype.onChangeCountry=function(){this.artistsCollection.reset();this.collection.reset();this.setUrl(this.$("#select_filter_artists>option:selected").val(),this.$("#select_country>option:selected").val())};t.prototype.showGenrePicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.genreSelectConfig,function(e){t.$("#select_genre").val(e);t.genreSelectConfig.selectedValue=e;t.onChangeGenre()},function(){""})};t.prototype.showFilterPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.filterSelectConfig,function(e){t.$("#select_filter_artists").val(e);t.filterSelectConfig.selectedValue=e;t.onChangeFilter()},function(){""})};t.prototype.showCountryPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.countrySelectConfig,function(e){t.$("#select_country").val(e);t.countrySelectConfig.selectedValue=e;t.onChangeCountry()},function(){""})};t.prototype.getCurrentFilterParam=function(e){void 0===e&&(e=this.model.get("currentArtistFilter"));return e!==o.default.application.chartsFilter.BestOf?"?filter="+e:""};t.prototype.getCurrentCountryParam=function(e,t){void 0===e&&(e=this.model.get("currentCountry"));void 0===t&&(t=this.model.get("currentArtistFilter"));return"_ALL_"!==e?(t===o.default.application.chartsFilter.BestOf?"?":"&")+"country="+e:""};t.prototype.onGetMoreRow=function(e){this.collection.length+e.length>=this.artistsCollection.length&&this.getChart(this.options.entitiesPerRequest,this.artistsCollection.length);return l.resolve(e)};t.prototype.close=function(){if(this.artistsCollection){c.closeModel(this.artistsCollection.slice(this.collection.length));this.artistsCollection=null}e.prototype.close.call(this)};return t}(a.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/communities/index",["require","exports","ribsjs","../../../library/view/swipe","../../../library/utilities/route","../../partials/communities/header","./tracks","./albums","./artists","../../pages/reviews/page"],e)}(function(e,t){"use strict";
52Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("../../../library/view/swipe"),i=e("../../../library/utilities/route"),o=e("../../partials/communities/header"),a=e("./tracks"),s=e("./albums"),l=e("./artists"),u=e("../../pages/reviews/page"),c=function(e){function t(n,c){var d=this,p=n[0],f=n[1],h=n[2],m=n[3],y=n[4],g=n[5],v=n[6],_=n[7],b=n[8],w=n[9],x=n[10],M=n[11],S=(c.model,[{metaTitle:m,metaDescription:y,metaKeywords:g,name:t.Views.Tracks,titleKey:"_TKEY_WWW_GENERIC_tracks",viewClass:a.default,options:Object.assign({type:"community",context:"COMMUNITYPAGE"},c,{model:c.model.getModelProjection(r.Model)})},{metaTitle:v,metaDescription:_,metaKeywords:b,name:t.Views.Albums,titleKey:"_TKEY_WWW_GENERIC_albums",viewClass:s.default,options:Object.assign({context:"COMMUNITYPAGE"},c,{model:c.model.getModelProjection(r.Model)})},{metaTitle:w,metaDescription:x,metaKeywords:M,name:t.Views.Artists,titleKey:"_TKEY_WWW_GENERIC_artists",viewClass:l.default,options:Object.assign({context:"COMMUNITYPAGE"},c,{model:c.model.getModelProjection(r.Model)})},{metaTitle:p,metaDescription:f,metaKeywords:h,name:t.Views.Reviews,titleKey:"_TKEY_WWW_TRACK_comments-tab-title",viewClass:u.default,options:Object.assign({type:"community",context:"COMMUNITYPAGE",router:c.router},c,{model:c.model.getModelProjection(r.Model)})}]);d=e.call(this,Object.assign({},c,{swipeSelector:".js-swipe-container",swipeViews:S,headerView:new o.default(Object.assign({},c,{model:c.model.getModelProjection(r.Model)})),prefix:i.default.getUrl("community",{name:c.model.get("name")}),manageUrl:!0,isCircular:!1}))||this;return d}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/communities/index"};t.prototype.getUrl=function(t){var r="";"getCurrentFilterParam"in this.options.swipeViews[this.currentViewIndex].view&&(r=this.options.swipeViews[this.currentViewIndex].view.getCurrentFilterParam());return e.prototype.getUrl.call(this,t)+r};t.prototype.getHeaderElement=function(){var t=this;return this.options.swipeViews.map(function(r){return{title:r.titleKey,href:e.prototype.getUrl.call(t,r.name),name:r.name}})};t.Views={Tracks:"tracks",Albums:"albums",Artists:"artists",Reviews:"reviews"};return t}(n.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/communities/index",["require","exports","ribsjs","../../library/controller/pageController","../../library/error/error","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","chrisweb-utilities","../../library/utilities/user","../../library/utilities/route","../../library/utilities/object","../../library/utilities/image","../../views/pages/communities/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../library/controller/pageController"),o=e("../../library/error/error"),a=e("../../managers/manager"),s=e("../../vendor/phpjs/phpjs"),l=e("../../configuration/configuration"),u=e("chrisweb-utilities"),c=e("../../library/utilities/user"),d=e("../../library/utilities/route"),p=e("../../library/utilities/object"),f=e("../../library/utilities/image"),h=e("../../views/pages/communities/index"),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;e.prototype.create.call(this,t);if(!this.promise){var i=this.options.userData,u=c.default.getUserLanguage(i);this.promise=a.TagsManager.getByAttribute({name:this.options.name},{userData:i,dataParameters:{lang:u}}).then(function(e){if(0===e.length)throw new o.default(r.errorDefinitions.NOT_FOUND.message,{userData:r.options.userData,id:r.options.name});var c=e[0],m=d.default.getParams(r.options.url),y={currentTrackFilter:m.filter||l.default.application.chartsFilter.BestOf,currentAlbumFilter:m.filter||l.default.application.chartsFilter.BestOf,currentArtistFilter:m.filter||l.default.application.chartsFilter.BestOf};529===c.get("id")&&(y.cover={"hero-xl":f.default.getImageUrl("jamendomusic/communities/community-abstract-hero-xl.gif"),"hero-l":f.default.getImageUrl("jamendomusic/communities/community-abstract-hero-l.g
52if"),"hero-m":f.default.getImageUrl("jamendomusic/communities/community-abstract-hero-m.gif"),"hero-s":f.default.getImageUrl("jamendomusic/communities/community-abstract-hero-s.gif"),"hero-xs":f.default.getImageUrl("jamendomusic/communities/community-abstract-hero-xs.gif")});c.set(y,{silent:!0});var g={currentView:r.options.subpage,router:r.router,model:c,userData:i,templateVariables:{websiteName:l.default.application.websiteName,language:u},language:u,templateStyle:"cover"in c.attributes&&0!==c.attributes.cover.length?"cover":"noCover"};return a.LocalizationManager.get(["_TKEY_WWW_META_TITLE_communities-x-community-x-website","_TKEY_WWW_META_DESCRIPTION_communities-x-community-x-website","_TKEY_WWW_META_KEYWORDS_communities-community","_TKEY_WWW_COMMUNITY_tracks","_TKEY_WWW_COMMUNITY_albums","_TKEY_WWW_COMMUNITY_artists","_TKEY_WWW_COMMUNITY_page-title"],{userData:i}).then(function(e){var i=e[0],o=e[1],a=e[2],u=e[3],d=e[4],f=e[5],m=e[6],y=s.default.strings.sprintf(i.get("translate")||i.get("id"),c.get("name"),l.default.application.websiteName),v=s.default.strings.sprintf(o.get("translate"),c.get("name"),l.default.application.websiteName),_=a.get("translate"),b=s.default.strings.sprintf(u.get("translate"),c.get("name"))+" | "+l.default.application.websiteName,w=v,x=_,M=s.default.strings.sprintf(d.get("translate"),c.get("name"))+" | "+l.default.application.websiteName,S=v,k=_,T=s.default.strings.sprintf(f.get("translate"),c.get("name"))+" | "+l.default.application.websiteName,A=v,E=_,P=new h.default([y,v,_,b,w,x,M,S,k,T,A,E],g);r.listenToSwipe(P);n.on("change:filter",r.onChangeFilter,r);var O=P.getTabMetaData();r.skeleton.setTitle(O.metaTitle);r.skeleton.setDescription(O.metaDescription);r.skeleton.setKeywords(O.metaKeywords);var j=s.default.strings.sprintf(m.get("translate"),c.get("name"),P.getHeaderElement()),D=P.getUrl(r.options.subpage);t.setHeader(j);t.addContent(P);t.setOpenGraph({app_id:l.default.application.facebookAppId,url:D,title:y,image:c.get("cover")["hero-xl"],site_name:l.default.application.websiteName,description:v,type:"website",locale_alternate:l.default.application.getLocales()});p.closeModel(e);return t})})}return this.promise};t.prototype.onChangeFilter=function(e){u.default.isClient()&&this.router.navigate(e.url,{trigger:!1,replace:!0})};t.prototype.clear=function(){n.off("change:filter",this.onChangeFilter,this);e.prototype.clear.call(this)};t.prototype.uniqueInstanceId=function(){return""+this.options.name};return t}(i.default);t.default=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/error/4xx",["require","exports","../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/error/4xx"};t.prototype.onInitializeStart=function(){console.debug("[4XX ERROR VIEW] initializing ...");e.prototype.onInitializeStart.call(this)};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/error/5xx",["require","exports","../../library/view/view","jquery"],e)}(function(e,t){"use strict";
52Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=e("jquery"),i=function(e){function t(t){var r=e.call(this,t)||this;r.$retryButton=n();return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/error/5xx"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this)};t.prototype.events=function(){return{"click .js-retry":"onClickRetry"}};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$retryButton=this.$(".js-retry")};t.prototype.onClickRetry=function(e){var t=this;location.reload(!0);this.$retryButton.addClass("is-disabled");setTimeout(function(){t.$retryButton.removeClass("is-disabled")},1e4)};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/error/oldBrowser",["require","exports","../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/error/oldBrowser"};t.prototype.onInitializeStart=function(){console.debug("[OLD BROWSER ERROR VIEW] initializing ...");e.prototype.onInitializeStart.call(this)};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/error/disconnect",["require","exports","../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/error/disconnect"};t.prototype.onInitializeStart=function(){console.debug("[DISCONNECT ERROR VIEW] initializing ...");e.prototype.onInitializeStart.call(this)};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)
53}else"function"==typeof define&&define.amd&&define("Server/scripts/views/error/notConnected",["require","exports","../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/view"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/error/notConnected"};t.prototype.onInitializeStart=function(){console.debug("[NOT CONNECTED ERROR VIEW] initializing ...");e.prototype.onInitializeStart.call(this)};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/error/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../views/error/4xx","../../views/error/5xx","../../views/error/oldBrowser","../../views/error/disconnect","../../views/error/notConnected","FSPromise"],e)}(function(e,t){"use strict";
53Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../views/error/4xx"),o=e("../../views/error/5xx"),a=e("../../views/error/oldBrowser"),s=e("../../views/error/disconnect"),l=e("../../views/error/notConnected"),u=e("FSPromise"),c=u.FSPromise,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var t=this;if(!this.promise){var r=this.options.userData;this.promise=new c(function(u,c){if(500===t.options.code){var d=new o.default({userData:r});n.LocalizationManager.get(["_TKEY_WWW_500_page-title"],{userData:r}).then(function(t){var r=t[0];e.setTitle(r.get("translate"));e.setHeader(r.get("translate"));r.close();e.addContent(d);u(e)}).catch(c)}else if(425===t.options.code){var p=new a.default({userData:r});n.LocalizationManager.get(["_TKEY_WWW_OLD_btn-choice"],{userData:r}).then(function(t){var r=t[0];e.setTitle(r.get("translate"));e.setHeader(r.get("translate"));r.close();e.addContent(p);u(e)}).catch(c)}else if(404===parseInt(t.options.code)){var f=new i.default({userData:r});n.LocalizationManager.get(["_TKEY_WWW_404_page-title"],{userData:r}).then(function(t){var r=t[0];e.setTitle(r.get("translate"));e.setHeader(r.get("translate"));r.close();e.addContent(f);u(e)}).catch(c);e.addContent(f);u(e)}else if(401===parseInt(t.options.code)){var h=new l.default({userData:r});n.LocalizationManager.get(["_TKEY_WWW_GENERIC_must-login-title"],{userData:r}).then(function(t){var r=t[0];e.setTitle(r.get("translate"));e.setHeader(r.get("translate"));r.close();e.addContent(h);u(e)}).catch(c)}else if(0===parseInt(t.options.code)){var m=new s.default({userData:r});n.LocalizationManager.get(["_TKEY_WWW_401_page-title"],{userData:r}).then(function(t){var r=t[0];e.setTitle(r.get("translate"));e.setHeader(r.get("translate"));r.close();e.addContent(m);u(e)}).catch(c)}else{var y=new o.default({userData:r});n.LocalizationManager.get(["_TKEY_WWW_GENERIC_error-unknown"],{userData:r}).then(function(t){var r=t[0];e.setTitle(r.get("translate"));e.setHeader(r.get("translate"));r.close();e.addContent(y);u(e)}).catch(c)}})}return this.promise};return t}(r.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/view/dynamicList",["require","exports","underscore","jquery","ribsjs","../model/model","../utilities/display","chrisweb-utilities","./loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("ribsjs"),o=e("../model/model"),a=e("../utilities/display"),s=e("chrisweb-utilities"),l=e("./loading"),u=function(e){function t(t){var n=e.call(this,Object.assign({collection:new i.Collection,listSelector:".js-list"},t,{reRenderOnChange:!0}))||this;n.options.templateVariables=Object.assign({listStyle:"",listTitleSprintf:{},listSubtitleKey:""},t.templateVariables);n.options.ModelViewOptions=Object.assign({userData:t.userData},t.ModelViewOptions);n.onDebounceResize=r.debounce(n.onResize.bind(n),350);return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/dynamicList/index"};t.prototype.onInitializeStart=function(){this.maxEntitiesCount=a.default.getMaxEntitiesCount(this.options.entityType);this.collection=this.collection.getRange(0,this.maxEntitiesCount);var t={hideMore:"hidden",context:this.options.entityType.toLowerCase()};this.model?this.model.set(t,{silent:!0}):this.model=new o.default(t,{silent:!0});e.prototype.onInitializeStart.call(this)};t.prototype.onResize=function(){if(this.isClose)console.warn('Event "dynamiclist onResize" triggered in closed view...');else{var e=a.default.getMaxEntitiesCount(this.options.entityType);if(this.maxEntitiesCount!==e){this.maxEntitiesCount=e;this.collection.setRangeLength(this.maxEntitiesCount);this.displayMore()}}};t.prototype.onUpdate=function(){if(this.isClose)console.warn('Event "dynamiclist onUpdate" triggered in closed view...');else{this.maxEntitiesCount=a.default.getMaxEntitiesCount(this.options.entityType);this.displayMore()}};t.prototype.onRenderAll=function(){e.prototype.onRenderAll.call(this);s.default.isClient()&&n(window).on("resize",this.onDebounceResize);this.collection.on("update",this.onUpdate,this);this.onUpdate()};t.prototype.displayMore=function(){this.collection.length>=this.maxEntitiesCount&&!this.model.get("noMoreButton")?this.$(".js-more-button").removeClass("hidden"):this.$(".js-more-button").addClass("hidden")};t.prototype.close=function(){n(window).off("resize",this.onDebounceResize);this.onDebounceResize=null;this.collection&&this.collection.off("update",this.onUpdate,this);e.prototype.close.call(this)};return t}(l.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/communities/item",["require","exports","ribsjs","../../../library/view/view","../../components/search/form"],e)}(function(e,t){"use strict";
53Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../../library/view/view"),o=e("../../components/search/form"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/communities/item";"templateStyle"in this.options.templateVariables&&"noCover"===this.options.templateVariables.templateStyle&&(e+="NoCover");return e};t.prototype.events=function(){return Object.assign(e.prototype.events.call(this),{"click a":"searchTagOnClick"})};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this)};t.prototype.searchTagOnClick=function(e){if(this.options.directSearch){e.preventDefault();e.stopPropagation();n.trigger(o.default.Event.Direct,{name:this.model.get("name"),id:this.model.get("id")})}};return t}(i.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/playlists/item",["require","exports","underscore","../../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/view"),i=function(e){function t(t){var n=e.call(this,t)||this;r.defaults(n.options.templateVariables,{isCol:!1});n.options.templateVariables.userData=n.options.templateVariables.userData||t.userData;n.options.templateVariables.nbTrackInPlaylist=n.model.get("tracks").length;return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/playlists/item"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/radios/item",["require","exports","../../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/view"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/radios/item";this.options.isCol&&(e="/partials/radios/item-col");return e};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/singles/item",["require","exports","underscore","../../../library/view/view"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/view"),i=function(e){function t(t){return e.call(this,r.extend({context:"ALBUMITEM"},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/singles/item"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/dynamicList/index",["require","exports","underscore","../../../library/view/dynamicList","../albums/item","../artists/item","../communities/item","../playlists/item","../post/item","../radios/item","../singles/item","../tracks/item"],e)}(function(e,t){"use strict";
53Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/dynamicList"),i=e("../albums/item"),o=e("../artists/item"),a=e("../communities/item"),s=e("../playlists/item"),l=e("../post/item"),u=e("../radios/item"),c=e("../singles/item"),d=e("../tracks/item"),p=function(e){function t(n){return e.call(this,r.extend({},t.DynamicType[n.entityType],n))||this}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);if("track"===(this.options.entityType||"").toLowerCase()){var t=this.options.ModelViewOptions;this.model.set({type:t.type,virtualId:t.virtualId,listTitle:t.listTitle,href:t.href,context:t.context})}};t.DynamicType={Album:{ModelView:i.default},AlbumInCol:{ModelView:i.default},Artist:{ModelView:o.default},ArtistInCol:{ModelView:o.default},Community:{ModelView:a.default},CommunityNoPicture:{ModelView:a.default,ModelViewOptions:{templateVariables:{templateStyle:"noCover"}}},Playlist:{ModelView:s.default},PlaylistInCol:{ModelView:s.default},Post:{ModelView:l.default},Radio:{ModelView:u.default},RadiosHome:{ModelView:u.default},Single:{ModelView:c.default},Tag:{ModelView:a.default,ModelViewOptions:{templateVariables:{templateStyle:"noCover"}}},Track:{ModelView:d.default},HotSelections:{ModelView:s.default},TheBestOfTheBest:{ModelView:l.default}};return t}(n.default);t.default=p});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/explore/overview",["require","exports","ribsjs","../../../library/view/loading","../../../managers/manager","../../../library/utilities/display","../../../library/utilities/object","../../partials/dynamicList/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("../../../library/view/loading"),i=e("../../../managers/manager"),o=e("../../../library/utilities/display"),a=e("../../../library/utilities/object"),s=e("../../partials/dynamicList/index"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.exploreCommunityCollection=new r.Collection([]);this.explorePlaylistCollection=new r.Collection([]);this.exploreCommunityListView=new s.default({collection:this.exploreCommunityCollection,entityType:o.default.EntityType.Community,listSelector:".js-list",userData:this.options.userData,templateVariables:{listTitleKey:"_TKEY_WWW_EXPLORE_COMMUNITIES_header-title",moreTitleKey:"_TKEY_WWW_GENERIC_more-communities",moreUrl:{urlName:"explore",subpage:"communities"}},loadingStyle:{block:!0},renderPromise:this.getFeaturedCommunities()});this.explorePlaylistListView=new s.default({collection:this.explorePlaylistCollection,entityType:o.default.EntityType.Playlist,listSelector:".js-list",userData:this.options.userData,templateVariables:{listTitleKey:"_TKEY_WWW_EXPLORE_PLAYLISTS_header-title",moreTitleKey:"_TKEY_WWW_GENERIC_more-playlists",moreUrl:{urlName:"explore",subpage:"playlists"}},ModelViewOptions:{templateVariables:{from:"overview",fromId:"playlists"}},loadingStyle:{block:!0},renderPromise:this.getFeaturedPlaylists()});this.addView(".js-explore-featured-communities",this.exploreCommunityListView);this.addView(".js-explore-featured-playlists",this.explorePlaylistListView)};t.prototype.getTemplateId=function(){return"/pages/explore/overview"};t.prototype.getFeaturedCommunities=function(){var e=this,t=this.options.templateVariables.language,r=o.default.getMaxEntitiesCount("Community",!1),n={limit:r,lang:t,category:"genre",order:"featuredRank"};return i.TagsManager.getByAttribute({},{dataParameters:n,userData:this.options.userData}).then(function(t){e.isClose||e.exploreCommunityCollection.set(t.slice(0,r));return t})};t.prototype.getFeaturedPlaylists=function(){var e=this,t=o.default.getMaxEntitiesCount("Playlist",!1),r={limit:t};return i.PlaylistsManager.getFeatured({dataParameters:r,userData:this.options.userData}).then(function(r){e.explorePlaylistCollection.set(r.slice(0,t));return r})};t.prototype.close=function(){if(this.exploreCommunityCollection){a.closeModel(this.exploreCommunityCollection.models);this.exploreCommunityCollection=null}if(this.explorePlaylistCollection){a.closeModel(this.explorePlaylistCollection.models);this.explorePlaylistCollection=null}e.prototype.close.call(this)};return t}(n.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/explore/communities",["require","exports","underscore","ribsjs","../../../library/view/scroll","../../../managers/manager","FSPromise","../../../library/utilities/object","../../partials/communities/item"],e)}(function(e,t){"use strict";
53Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("../../../library/view/scroll"),o=e("../../../managers/manager"),a=e("FSPromise"),s=a.FSPromise,l=e("../../../library/utilities/object"),u=e("../../partials/communities/item"),c=function(e){function t(t){return e.call(this,r.extend({listSelector:".js-explore-communities-list",idList:"communityItems",ModelView:u.default,entitiesPerRequest:40},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/explore/communities"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this);this.tagsCollection=new n.Collection([],{comparator:"featuredRank"});this.model.set({communityItems:this.tagsCollection},{silent:!0})};t.prototype.render=function(){var t=this,n=this.options.entitiesPerRequest,i=this.options.templateVariables.language,a={order:"featuredRank",limit:n,lang:i,category:["genre","mood","theme"]};return o.TagsManager.getByAttribute({},{dataParameters:a,userData:this.options.userData}).then(function(n){if(!t.isClose){n.unshift(o.TagsManager.getAllGenreTagModel(i));n=r.reject(n,function(e){return[3138,2401,3363,4073].indexOf(e.get("id"))>-1});t.collection.set(n,{silent:!0});t.tagsCollection.add(n,{silent:!0});return e.prototype.render.call(t)}})};t.prototype.onGetMoreRow=function(e){var t=this;if(this.collection.length+e.length>=this.tagsCollection.length){var r=this.options.entitiesPerRequest;return o.TagsManager.getByAttribute({},{dataParameters:{order:"featuredRank",limit:r,offset:this.tagsCollection.length,lang:this.options.templateVariables.language,category:["genre","mood"]},userData:this.options.userData}).then(function(r){t.tagsCollection.add(r);return e})}return s.resolve(e)};t.prototype.close=function(){if(this.tagsCollection){l.closeModel(this.tagsCollection.slice(this.collection.length));this.tagsCollection=null}e.prototype.close.call(this)};return t}(i.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/explore/playlists",["require","exports","underscore","ribsjs","../../../library/view/scroll","../../../managers/manager","FSPromise","../../../library/utilities/display","../../../library/utilities/object","../../partials/playlists/item"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("../../../library/view/scroll"),o=e("../../../managers/manager"),a=e("FSPromise"),s=a.FSPromise,l=e("../../../library/utilities/display"),u=e("../../../library/utilities/object"),c=e("../../partials/playlists/item"),d=function(e){function t(t){return e.call(this,r.extend({listSelector:".js-explore-playlists-list",idList:"playlistItems",ModelView:c.default,ModelViewOptions:{templateVariables:{from:"swipe",fromId:"playlists"}},entitiesPerRequest:2*l.default.getMaxEntitiesCount("Playlist",!1)},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/explore/playlists"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this);this.playlistCollection=new n.Collection([]);this.model.set({playlistItems:this.playlistCollection},{silent:!0})};t.prototype.render=function(){var t=this,r=this.options.entitiesPerRequest;return o.PlaylistsManager.getFeatured({dataParameters:{limit:r},userData:this.options.userData}).then(function(r){if(!t.isClose){t.collection.set(r.slice(0,t.options.entitiesPerRequest));t.playlistCollection.set(r);return e.prototype.render.call(t)}})};t.prototype.onGetMoreRow=function(e){var t=this;return this.collection.length+e.length>=this.playlistCollection.length?o.PlaylistsManager.getFeatured({dataParameters:{limit:this.options.entitiesPerRequest,offset:this.playlistCollection.length},userData:this.options.userData}).then(function(r){t.playlistCollection.add(r);e.push.apply(e,r);return e}):s.resolve(e)};t.prototype.close=function(){if(this.playlistCollection){u.closeModel(this.playlistCollection.slice(this.collection.length));this.playlistCollection=null}e.prototype.close.call(this)};return t}(i.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/explore/latestReleases",["require","exports","underscore","ribsjs","../../../library/view/scroll","../../../managers/manager","FSPromise","../../../library/utilities/display","../../../library/utilities/object","../../partials/albums/item"],e)}(function(e,t){"use strict";
53Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("../../../library/view/scroll"),o=e("../../../managers/manager"),a=e("FSPromise"),s=a.FSPromise,l=e("../../../library/utilities/display"),u=e("../../../library/utilities/object"),c=e("../../partials/albums/item"),d=function(e){function t(t){var n=e.call(this,r.extend({listSelector:".js-explore-latest-releases-list",idList:"latestReleaseItems",ModelView:c.default,ModelViewOptions:{templateVariables:{from:"swipe",fromId:"latest"}},entitiesPerRequest:2*l.default.getMaxEntitiesCount("Album",!1)},t))||this;n.comparator=function(e,t){return t.get("dateCreated")-e.get("dateCreated")};return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/explore/latestReleases"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this);this.latestReleasesCollection=new n.Collection([],{comparator:this.comparator});this.albumsLength=0;this.singlesLength=0;this.model.set({latestReleaseItems:this.latestReleasesCollection},{silent:!0})};t.prototype.getLatest=function(e){var t=this;void 0===e&&(e=this.options.entitiesPerRequest);var n={order:"dateCreated_desc",limit:e},i=[];i.push(o.AlbumsManager.getByAttribute({},{dataParameters:r.extend({offset:this.albumsLength},n),userData:this.options.userData}).then(function(e){if(!t.isClose){t.albumsLength+=e.length;e.forEach(function(e){e.set({type:"album"},{silent:!0});t.latestReleasesCollection.add(e)})}}));i.push(o.TracksManager.getByAttribute({albumId:null},{dataParameters:r.extend({offset:this.singlesLength},n),userData:this.options.userData}).then(function(e){if(!t.isClose){t.singlesLength+=e.length;e.forEach(function(e){e.set({type:"track"},{silent:!0});t.latestReleasesCollection.add(e)})}}));return s.all(i).then(function(){if(!t.isClose){var e=void 0;e=t.isDispatch?t.latestReleasesCollection.slice(0,t.collection.length):t.latestReleasesCollection.slice(0,t.latestReleasesCollection.length);t.collection.set(e)}})};t.prototype.onGetMoreRow=function(e){this.collection.length+e.length>=this.latestReleasesCollection.length&&this.getLatest();return s.resolve(e)};t.prototype.render=function(){var t=this;return this.getLatest().then(function(){if(!t.isClose)return e.prototype.render.call(t)})};t.prototype.close=function(){if(this.latestReleasesCollection){u.closeModel(this.latestReleasesCollection.models);this.latestReleasesCollection=null}e.prototype.close.call(this)};return t}(i.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/explore/index",["require","exports","../../../library/view/swipe","../../../library/utilities/route","./overview","./communities","./playlists","./latestReleases"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/swipe"),n=e("../../../library/utilities/route"),i=e("./overview"),o=e("./communities"),a=e("./playlists"),s=e("./latestReleases"),l=function(e){function t(r,l){var u=this,c=r[0],d=r[1],p=r[2],f=r[3],h=r[4],m=r[5],y=r[6],g=r[7],v=r[8],_=r[9],b=r[10],w=r[11],x=[{metaTitle:c,metaDescription:d,metaKeywords:p,name:t.Views.Overview,titleKey:"_TKEY_WWW_EXPLORE_OVERVIEW_sub-page-tab",viewClass:i.default,options:Object.assign({context:"EXPLOREOVERVIEWPAGE"},l)},{metaTitle:f,metaDescription:h,metaKeywords:m,name:t.Views.Communities,titleKey:"_TKEY_WWW_EXPLORE_COMMUNITIES_header-title",viewClass:o.default,options:Object.assign({context:"EXPLORECOMMUNITIESPAGE"},l)}
53,{metaTitle:y,metaDescription:g,metaKeywords:v,name:t.Views.Playlists,titleKey:"_TKEY_WWW_EXPLORE_PLAYLISTS_sub-page-tab",viewClass:a.default,options:Object.assign({context:"EXPLOREPLAYLISTSPAGE"},l)},{metaTitle:_,metaDescription:b,metaKeywords:w,name:t.Views.LatestReleases,titleKey:"_TKEY_WWW_EXPLORE_LATEST_sub-page-tab",viewClass:s.default,options:Object.assign({context:"EXPLORELATESTPAGE"},l)}];u=e.call(this,Object.assign({},l,{swipeSelector:".js-swipe-container",swipeViews:x,prefix:n.default.getUrl("explore"),manageUrl:!0,isCircular:!1}))||this;return u}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/explore/index"};t.Views={Overview:"",Communities:"communities",Playlists:"playlists",LatestReleases:"latestreleases"};return t}(r.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/explore/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../views/pages/explore/index","../../library/utilities/object","../../library/utilities/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../views/pages/explore/index"),s=e("../../library/utilities/object"),l=e("../../library/utilities/user"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;e.prototype.create.call(this,t);if(!this.promise){var u=this.options.userData;this.promise=n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_explore-x-website","_TKEY_WWW_META_DESCRIPTION_explore-x-website","_TKEY_WWW_META_KEYWORDS_explore","_TKEY_WWW_META_TITLE_explore-communities-x-website","_TKEY_WWW_META_DESCRIPTION_explore-communities-x-website","_TKEY_WWW_META_KEYWORDS_explore-communities","_TKEY_WWW_META_TITLE_explore-playlists-x-website","_TKEY_WWW_META_DESCRIPTION_explore-playlists-x-website","_TKEY_WWW_META_KEYWORDS_explore-playlists","_TKEY_WWW_META_TITLE_explore-latest-x-website","_TKEY_WWW_META_DESCRIPTION_explore-latest-x-website","_TKEY_WWW_META_KEYWORDS_explore-latest","_TKEY_WWW_EXPLORE_page-title"],{userData:u}).then(function(e){var t=r.options.subpage?r.options.subpage:"",n=o.default.application.websiteName,c=l.default.getUserLanguage(u),d=e[0],p=e[1],f=e[2],h=e[3],m=e[4],y=e[5],g=e[6],v=e[7],_=e[8],b=e[9],w=e[10],x=e[11],M=e[12],S=i.default.strings.sprintf(d.get("translate"),n),k=i.default.strings.sprintf(p.get("translate"),n),T=f.get("translate"),A=i.default.strings.sprintf(h.get("translate"),n),E=i.default.strings.sprintf(m.get("translate"),n),P=y.get("translate"),O=i.default.strings.sprintf(g.get("translate"),n),j=i.default.strings.sprintf(v.get("translate"),n),D=_.get("translate"),C=i.default.strings.sprintf(b.get("translate"),n),L=i.default.strings.sprintf(w.get("translate"),n),I=x.get("translate"),R=M.get("translate"),Y=new a.default([S,k,T,A,E,P,O,j,D,C,L,I],{currentView:t,userData:u,templateVariables:{websiteName:o.default.application.websiteName,language:c}});r.listenToSwipe(Y);var N=Y.getTabMetaData();r.skeleton.setTitle(N.metaTitle);r.skeleton.setDescription(N.metaDescription);r.skeleton.setKeywords(N.metaKeywords);r.skeleton.setHeader(R);r.skeleton.addContent(Y);s.closeModel(e);return r.skeleton})}return this.promise};t.prototype.uniqueInstanceId=function(){return"_"};return t}(r.default);t.default=u});var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){
54return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/paging/listBuilder",["require","exports","../error/error"],e)}(function(e,t){"use strict";
54Object.defineProperty(t,"__esModule",{value:!0});var r=e("../error/error"),n=function(){function e(e,t,r,n){void 0===n&&(n=function(e){return e});this.numItemsPerList=e;this.totalNumItems=t;this.loadItems=r;this.transformAndFilterItems=n}e.prototype.buildListStartingAt=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.buildListStartingAtInternal(e,!0)]})})};e.prototype.buildListStartingAtInternal=function(e,t){return __awaiter(this,void 0,void 0,function(){var n,i,o,a,s,l,u,c,d;return __generator(this,function(p){switch(p.label){case 0:n=e+this.numItemsPerList;if(e>this.totalNumItems)throw new r.default("Out of range: Only "+this.totalNumItems+" available, but list starting at item "+e+" requested");if(e<0)throw new r.default("Out of range: rangeStart must be >= 0");p.label=1;case 1:p.trys.push([1,4,,5]);return[4,this.loadItems(e,n)];case 2:i=p.sent();return[4,this.transformAndFilterItems(i)];case 3:o=p.sent();return[3,5];case 4:a=p.sent();throw new r.default("Loading items failed: "+a);case 5:if(!t)return[3,12];s=1;p.label=6;case 6:if(!(e+s*this.numItemsPerList<this.totalNumItems))return[3,12];l=this.numItemsPerList-o.length;if(l<=0)return[3,12];u=e+s*this.numItemsPerList;p.label=7;case 7:p.trys.push([7,9,,10]);return[4,this.buildListStartingAtInternal(u,!1)];case 8:c=p.sent();return[3,10];case 9:d=p.sent();throw new r.default("Error collapsing list starting at index "+u+": "+d);case 10:o.push.apply(o,c.slice(0,l));p.label=11;case 11:s++;return[3,6];case 12:return[2,o]}})})};return e}();t.ListBuilder=n;t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/tracks/infiniteList",["require","exports","underscore","../../../library/view/scroll","../../../managers/manager","../../../library/utilities/display","../../../library/paging/listBuilder","./item","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/scroll"),i=e("../../../managers/manager"),o=e("../../../library/utilities/display"),a=e("../../../library/paging/listBuilder"),s=e("./item"),l=e("FSPromise"),u=function(e){function t(t){return e.call(this,r.extend({idList:"trackIdList",listSelector:".js-tracklist",ModelView:s.default,reRenderOnChange:!0,entitiesPerRequest:o.default.getMaxEntitiesCount("InfiniteTrack",!1)},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/tracks/infiniteList"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.getMoreTracks.bind(this)};t.prototype.render=function(){var t=this,r=this.model.get("trackIdList"),n=new a.default(2*this.options.entitiesPerRequest,r.length,function(e,t){return r.slice(e,t)},function(e){return __awaiter(t,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return[4,this.getMoreTracks(e)];case 1:return[2,t.sent()]}})})});return new l.FSPromise(function(r){n.buildListStartingAt(0).then(function(n){t.collection.set(n);r(e.prototype.render.call(t))})})};t.prototype.getMoreTracks=function(e,t,r){var n=this;void 0!==t&&void 0!==r&&(e=e.slice(t,r));var o=e.map(function(e){return e.get("id")});return i.TracksManager.get(o,{userData:this.options.userData}).then(function(e){t||(t=n.collection.length);e.forEach(function(e,r){e.set({offset:t+r})});return e})};return t}(n.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/playlists/secondaryInformation",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";
54Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/playlists/secondaryInformation"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.options.templateVariables=this.options.templateVariables||{};var t=this.model.get("description");this.options.templateVariables.hasDescription="string"==typeof t&&t.trim().length>0};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/playlists/overview",["require","exports","ribsjs","../../../library/view/loading","../../../library/model/model","../../../library/collection/collection","../../../library/utilities/display","../../partials/tracks/infiniteList","../../partials/tracks/item","../../partials/playlists/secondaryInformation"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../../library/view/loading"),o=e("../../../library/model/model"),a=e("../../../library/collection/collection"),s=e("../../../library/utilities/display"),l=e("../../partials/tracks/infiniteList"),u=e("../../partials/tracks/item"),c=e("../../partials/playlists/secondaryInformation"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/playlists/overview"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.playlistTracksCollection=new a.default([],{comparator:"position"});var t=this.model.get("tracks").map(function(e){return new o.default(e)}),r=new l.default({model:new o.default({trackIdList:t}),collection:this.playlistTracksCollection,userData:this.options.userData,templateVariables:{isTracklist:!0,count:t.length},ModelViewOptions:{type:u.default.TrackItemType.Playlist,playlistId:this.model.get("id"),context:"PLAYLISTPAGE",isCol:!0,templateVariables:{isTracklist:!0,from:"overview",fromId:"tracks",entity:"playlist",entityId:this.model.get("id")}}});this.addView(".js-playlistOverview-tracksList",r);if(s.default.getMaxEntitiesCount("DesktopDesign")>0){var i=new c.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables});this.addView(".js-secondary-desktop",i)}n.on("playlist:edit",this.onPlaylistEdited,this)};t.prototype.onPlaylistEdited=function(e){"attributes"in e&&this.model.set(e.attributes);"models"in e&&this.playlistTracksCollection.set(e.models)};t.prototype.close=function(){n.off("playlist:edit",this.onPlaylistEdited,this);e.prototype.close.call(this)};return t}(i.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/playlists/header",["require","exports","../../../library/view/loading","../../../library/utilities/display"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../library/utilities/display"),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.isExpanded=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/playlists/header";n.default.getMaxEntitiesCount("DesktopDesign")>0&&(e+="Desktop");return e};t.prototype.events=function(){return{"click .js-expand":"onClickExpand"}};t.prototype.onClickExpand=function(e){this.isExpanded=!this.isExpanded;
54if(this.isExpanded){this.$(".js-expand").addClass("is-toggled");$(".js-secondary-mobile").removeClass("hidden")}else{this.$(".js-expand").removeClass("is-toggled");$(".js-secondary-mobile").addClass("hidden")}};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/playlists/index",["require","exports","underscore","ribsjs","../../../library/view/swipe","../../../library/utilities/route","../../../library/utilities/display","../../../library/utilities/user","./overview","../../pages/reviews/page","../../partials/playlists/header","../../partials/playlists/secondaryInformation"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../library/view/swipe"),a=e("../../../library/utilities/route"),s=e("../../../library/utilities/display"),l=e("../../../library/utilities/user"),u=e("./overview"),c=e("../../pages/reviews/page"),d=e("../../partials/playlists/header"),p=e("../../partials/playlists/secondaryInformation"),f=function(e){function t(i,o){var s=this,l=i[0],p=i[1],f=i[2],h=[{metaTitle:l,metaDescription:p,metaKeywords:f,name:t.Vie
54ws.Overview,titleKey:"_TKEY_WWW_GENERIC_playlist",viewClass:u.default,options:Object.assign({context:"PLAYLISTPAGE"},o,{model:o.model.getModelProjection(n.Model)})},{metaTitle:l,metaDescription:p,metaKeywords:f,name:t.Views.Reviews,titleKey:"_TKEY_WWW_TRACK_comments-tab-title",viewClass:c.default,options:Object.assign({context:"PLAYLISTPAGE",type:"playlist"},o,{model:o.model.getModelProjection(n.Model),highlightReview:o.currentEntity})}];s=e.call(this,r.extend({},o,{swipeViews:h,swipeSelector:".js-swipe-container",headerView:new d.default(Object.assign({},o,{model:o.model.getModelProjection(n.Model)})),prefix:a.default.getUrl("playlist",{id:o.model.get("id"),name:o.model.get("name")}),manageUrl:!0,isCircular:!1}))||this;return s}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/playlists/index"};t.prototype.isOwner=function(e){void 0===e&&(e=this.options);return l.default.getIsLogged(e.userData)&&e.model.get("userId")===e.userData.session.get("me").id};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);if(s.default.getMaxEntitiesCount("DesktopDesign")<0){var t=new p.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables});this.addView(".js-secondary-mobile",t)}i.on("playlist:edit",this.onPlaylistEdited,this)};t.prototype.onPlaylistEdited=function(e){"attributes"in e&&this.options.model.set(e.attributes);this.options.headerView.reRenderModelView()};t.prototype.close=function(){i.off("playlist:edit",this.onPlaylistEdited,this);e.prototype.close.call(this)};t.Views={Overview:"",Reviews:"reviews"};return t}(o.default);t.default=f});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/playlists/index",["require","exports","../../library/controller/pageController","../../library/error/error","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","FSPromise","ribsjs","chrisweb-utilities","../../library/utilities/user","../../library/utilities/object","../../library/utilities/route","speakingurl","../../views/pages/playlists/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../library/error/error"),i=e("../../managers/manager"),o=e("../../vendor/phpjs/phpjs"),a=e("../../configuration/configuration"),s=e("FSPromise"),l=s.FSPromise,u=e("ribsjs"),c=u.EventsManager,d=e("chrisweb-utilities"),p=e("../../library/utilities/user"),f=e("../../library/utilities/object"),h=e("../../library/utilities/route"),m=e("speakingurl"),y=e("../../views/pages/playlists/index"),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;if(isNaN(this.options.id))throw new n.default(this.errorDefinitions.NOT_FOUND.message,{userData:this.options.userData,id:this.options.id});e.prototype.create.call(this,t);if(!this.promise){var s=this.options.userData;this.promise=i.PlaylistsManager.get(this.options.id,{userData:s}).then(function(e){if(0===e.length)throw new n.default(r.errorDefinitions.NOT_FOUND.message,r.options);r.playlistModel=e[0];var u=m(d.default.safeUnescape(r.playlistModel.get("name")));""===u&&(u="_");r.redirectIfUrlIncomplete({cleanName:u,generateURL:function(){var e=h.default.getUrl("playlist",{id:r.playlistModel.get("id"),name:r.playlistModel.get("name")});"string"==typeof r.options.subpage&&r.options.subpage.length>0&&(e+="/"+r.options.subpage);return e}});var g,v=[],_=p.default.getUserLanguage(s),b=a.default.application.websiteName,w=r.options.url.match(/^.*?#?([0-9]+)$/);w&&w.length&&(g=parseInt(w[1],10));var x={currentView:r.options.subpage,currentEntity:g,model:r.playlistModel,userData:s,templateVariables:{websiteName:a.default.application.websiteName,language:_},router:r.router};v.push(i.LocalizationManager.get(["_TKEY_WWW_META_TITLE_playlist-x-title-x-username-x-website","_TKEY_WWW_META_DESCRIPTION_playlist-x-title-x-username-x-website-x-username","_TKEY_WWW_META_KEYWORDS_playlist","_TKEY_WWW_PLAYLIST_page-title","_TKEY_WWW_GENERIC_share-message"],{userData:s}));v.push(i.UserManager.get(r.playlistModel.get("userId"),{userData:s}));return l.all(v).then(function(e){var i=e[0],s=e[1],l=i[0],u=i[1],p=i[2],h=i[3],m=i[4],g=s[0];r.metaTitleModel=l;r.pageTitleModel=h;if(!g)throw new n.default(r.errorDefinitions.NOT_FOUND.message,r.options);var v=o.default.strings.sprintf(l.get("translate")||l.get("id"),r.playlistModel.get("name"),g.get("dispname"),b),_=o.default.strings.sprintf(u.get("translate"),r.playlistModel.get("name"),g.get("dispname"),b,g.get("dispname")),w=p.get("translate"),M=o.default.strings.sprintf(m.get("translate")||m.get("id"),r.playlistModel.get("name"),b),S=o.default.strings.sprintf(h.get("translate"),r.playlistModel.get("name")),k=new y.default([v,_,w],x);r.listenToSwipe(k);c.on("playlist:delete:finished",r.onPlaylistDeleted,r);r.playlistModel.on("change:name",function(){t.setTitle(o.default.strings.sprintf(l.get("translate"),r.playlistModel.get("name"),g.get("dispname"),b));t.setHeader(o.default.strings.sprintf(h.get("translate"),r.playlistModel.get("name")))});var T=k.getUrl(r.options.subpage),A=r.playlistModel.get("description");""===A&&(A=M);t.setHeader(d.default.safeUnescape(S));t.setTitle(d.default.safeUnescape(v));t.setDescription(d.default.safeUnescape(_));t.setKeywords(w);t.setCanonicalUrl(T);t.addContent(k);var E="",P=r.playlistModel.get("cover");P&&P.big&&P.big.image1&&P.big.image1.size600&&(E=P.big.image1.size600);
54t.setOpenGraph({app_id:a.default.application.facebookAppId,url:T,title:d.default.safeUnescape(v),image:E,site_name:a.default.application.websiteName,description:d.default.safeUnescape(A),type:"music.playlist",locale_alternate:a.default.application.getLocales()});t.setSchema({itemtype:"http://schema.org/MusicPlaylist",name:d.default.safeUnescape(r.playlistModel.get("name")),description:d.default.safeUnescape(r.playlistModel.get("description")||A).replace(/"/g,""),image:E,url:T});u.close();p.close();m.close();f.closeModel(s);return t})})}return this.promise};t.prototype.updateMetadata=function(e){this.skeleton.setTitle(d.default.safeUnescape(e.metaTitle));this.skeleton.setDescription(d.default.safeUnescape(e.metaDescription));this.skeleton.setKeywords(e.metaKeywords)};t.prototype.clear=function(){c.off("playlist:delete:finished",this.onPlaylistDeleted,this);this.playlistModel&&this.playlistModel.off("change:name");this.metaTitleModel&&this.metaTitleModel.close();this.pageTitleModel&&this.pageTitleModel.close();e.prototype.clear.call(this)};t.prototype.onPlaylistDeleted=function(e,t){var r=h.default.getUrl("user",{id:e,name:t,subpage:"playlists"});this.router.navigate(r,{trigger:!0,replace:!1})};t.prototype.uniqueInstanceId=function(){return this.options.id+"_"+this.options.name};return t}(r.default);t.default=g});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/radios/header",["require","exports","../../../library/view/view","../../../library/utilities/display"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/view"),n=e("../../../library/utilities/display"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/radios/header";n.default.getMaxEntitiesCount("DesktopDesign")>0&&(e+="Desktop");return e};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/radios/radio",["require","exports","../../../library/view/loading","../../partials/radios/header"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../partials/radios/header"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/radios/radio"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var t=new n.default(this.options);this.addView(".js-radio-header",t)};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/radios/index",["require","exports","../../library/controller/pageController","../../library/error/error","../../vendor/phpjs/phpjs","../../configuration/configuration","../../managers/manager","../../library/utilities/route","../../library/utilities/image","../../library/utilities/user","../../library/utilities/object","../../views/pages/radios/radio"],e)}(function(e,t){"use strict";
54Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../library/error/error"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../managers/manager"),s=e("../../library/utilities/route"),l=e("../../library/utilities/image"),u=e("../../library/utilities/user"),c=e("../../library/utilities/object"),d=e("../../views/pages/radios/radio"),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var t=this;if(!this.promise){var r=this.options.userData;this.promise=a.RadiosManager.getByAttribute({idstr:this.options.subpage},{userData:r}).then(function(p){if(0===p.length)throw new n.default(t.errorDefinitions.NOT_FOUND.message,{userData:t.options.userData,id:t.options.subpage});var f=p[0];return a.LocalizationManager.get(["_TKEY_WWW_META_TITLE_radios-x-radio-x-website","_TKEY_WWW_META_DESCRIPTION_radios-x-title","_TKEY_WWW_META_KEYWORDS_radios-radio","_TKEY_WWW_RADIO_"+f.get("idstr")+"-header"],{userData:r}).then(function(t){var n=t[0],a=t[1],p=t[2],h=t[3],m=u.default.getUserLanguage(r),y=i.default.strings.sprintf(n.get("translate"),h.get("translate"),o.default.application.websiteName),g=i.default.strings.sprintf(a.get("translate"),h.get("translate")),v=s.default.getUrl("radios",{subpage:f.get("idstr")});e.setTitle(y);e.setDescription(g);e.setKeywords(p.get("translate"));e.setHeader(h.get("translate"));e.setOpenGraph({app_id:o.default.application.facebookAppId,url:v,title:y,image:l.default.getImageUrl("jamendomusic/radios/radio-"+f.get("idstr").toLowerCase()+"-hero-m.jpg"),site_name:o.default.application.websiteName,description:g,type:"music.radio_station",locale_alternate:o.default.application.getLocales()});f.set({listTitle:h.get("translate")});var _=new d.default({model:f,templateVariables:{websiteName:o.default.application.websiteName,language:m},userData:r});e.addContent(_);c.closeModel(t);return e})})}return this.promise};return t}(r.default);t.default=p});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/tracks/secondaryInformation",["require","exports","../secondaryInformationView","../../../managers/manager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../secondaryInformationView"),n=e("../../../managers/manager"),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.secondaryInformationViewFeatures=7;t.modelManager=n.TracksManager;t.modelType="track";return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/tracks/secondaryInformation"};return t}(r.BaseSecondaryInformationView);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/tracks/overview",["require","exports","underscore","../../../managers/manager","../../../library/utilities/display","../../../library/utilities/app","../../../library/view/loading","../../partials/reviews/index","../../partials/reviews/item","../../partials/tracks/secondaryInformation"],e)}(function(e,t){"use strict";
54Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../managers/manager"),i=e("../../../library/utilities/display"),o=e("../../../library/utilities/app"),a=e("../../../library/view/loading"),s=e("../../partials/reviews/index"),l=e("../../partials/reviews/item"),u=e("../../partials/tracks/secondaryInformation"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/tracks/overview"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var t=new s.default({model:this.model.clone(),listSelector:".js-reviews-list-selector",ModelView:l.default,ModelViewOptions:{context:"TRACKPAGE",userData:this.options.userData,router:this.options.router,parentItem:this.model,parentItemType:"track",templateVariables:{from:"overview",fromId:"reviews"}},type:"track",closeModelOnClose:!1,context:"TRACKPAGE",displayMore:!1,userData:this.options.userData});this.addView(".js-reviews-section",t);if(i.default.getMaxEntitiesCount("DesktopDesign")>0){this.options.templateVariables.showLicensingBtn=o.getDevicePlatform()!==o.Platform.iOS;var r=new u.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables});this.addView(".js-secondary-desktop",r)}};t.prototype.render=function(){var t=this;return n.ArtistsManager.get(this.model.get("artistId"),{userData:this.options.userData}).then(function(r){t.model.set({isOnLicensing:t.model.get("types").indexOf("cut")>-1&&r[0].get("types").indexOf("cut")>-1});r[0].close();return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$revealButton=this.$(".reveal>button");this.$asideDiv=this.$(".entity-aside")};t.prototype.events=function(){return r.extend({"click .reveal":"onClickReveal"},e.prototype.events.call(this))};t.prototype.onClickReveal=function(e){if(this.$revealButton.hasClass("is-toggled")){this.$revealButton.removeClass("is-toggled");this.$asideDiv.removeClass("revealed")}else{this.$revealButton.addClass("is-toggled");this.$asideDiv.addClass("revealed")}};return t}(a.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/tracks/lyrics",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/tracks/lyrics"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)
55}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/tracks/header",["require","exports","../../../library/view/loading","../../../managers/manager","../../../library/utilities/route","../../../library/utilities/display","../../../library/utilities/app"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../managers/manager"),i=e("../../../library/utilities/route"),o=e("../../../library/utilities/display"),a=e("../../../library/utilities/app"),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.isExpanded=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/tracks/header";o.default.getMaxEntitiesCount("DesktopDesign")>0&&(e+="Desktop");return e};t.prototype.events=function(){return{"click .js-expand":"onClickExpand"}};t.prototype.onInitialize=function(){var t=this;this.options.templateVariables.showLicensingHeaderBtn=a.getDevicePlatform()!==a.Platform.iOS;this.options.templateVariables.albumUrl="";this.options.templateVariables.albumName="";var r=this.model.get("albumId");if(null!==r){var o=n.AlbumsManager.get(r,{userData:this.options.userData}).then(function(n){var o=n[0].get("name");t.options.templateVariables.albumName=o;var a=t.options.userData.location.protocol+"//"+t.options.userData.location.host;t.options.templateVariables.albumUrl=a+i.default.getUrl("album",{id:r,name:o});e.prototype.onInitialize.call(t)});this.options.renderPromise?this.options.renderPromise.then(function(){return o}
55):this.options.renderPromise=o}else e.prototype.onInitialize.call(this)};t.prototype.onClickExpand=function(e){this.isExpanded=!this.isExpanded;if(this.isExpanded){this.$(".js-expand").addClass("is-toggled");$(".js-secondary-mobile").removeClass("hidden")}else{this.$(".js-expand").removeClass("is-toggled");$(".js-secondary-mobile").addClass("hidden")}};return t}(r.default);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/tracks/index",["require","exports","underscore","ribsjs","../../../models/manager/track","../../../library/view/swipe","../../../library/utilities/route","../../../library/utilities/display","./overview","./lyrics","../../partials/similar/index","../../partials/tracks/item","../../partials/tracks/header","../../partials/tracks/secondaryInformation"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("../../../models/manager/track"),o=e("../../../library/view/swipe"),a=e("../../../library/utilities/route"),s=e("../../../library/utilities/display"),l=e("./overview"),u=e("./lyrics"),c=e("../../partials/similar/index"),d=e("../../partials/tracks/item"),p=e("../../partials/tracks/header"),f=e("../../partials/tracks/secondaryInformation"),h=function(e){function t(i,o){var s=this,f=o.model,h=i[0],m=i[1],y=i[2],g=i[3],v=i[4],_=i[5],b=i[6],w=i[7],x=i[8],M=[{metaTitle:h,metaDescription:m,metaKeywords:y,name:t.Views.Overview,titleKey:"_TKEY_WWW_GENERIC_track",viewClass:l.default,options:Object.assign({type:"track",context:"TRACKPAGE"},o,{model:o.model.getModelProjection(n.Model)})},{metaTitle:g,metaDescription:v,metaKeywords:_,name:t.Views.Similar,titleKey:"_TKEY_WWW_TRACK_similartracks-tab-title",viewClass:c.default,options:Object.assign({type:"track",ModelView:d.default,ModelViewOptions:{templateVariables:{from:"swipe",fromId:"similar"}},context:"TRACKPAGE"},o,{model:o.model.getModelProjection(n.Model)})}];f.get("lyrics")&&M.splice(1,0,{metaTitle:b,metaDescription:w,metaKeywords:x,name:t.Views.Lyrics,titleKey:"_TKEY_WWW_TRACK_lyrics-tab-title",viewClass:u.default,options:Object.assign({context:"TRACKPAGE"},o,{model:o.model.getModelProjection(n.Model)})});s=e.call(this,Object.assign({},o,{swipeSelector:".js-track-swipe-container",swipeViews:M,headerView:new p.default(r.extend({},o,{model:o.model.getModelProjection(n.Model)})),prefix:a.default.getUrl("track",{id:f.get("id"),name:f.get("name")}),manageUrl:!0,isCircular:!1}))||this;return s}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/tracks/index"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);if(s.default.getMaxEntitiesCount("DesktopDesign")<0){var t=new f.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables});this.addView(".js-secondary-mobile",t)}};t.prototype.generateStructuredData=function(){return i.Track.generateStructuredData(this.model,15)};t.Views={Overview:"",Lyrics:"lyrics",Similar:"similar"};return t}(o.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/tracks/index",["require","exports","../../library/controller/pageController","../../library/error/error","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","FSPromise","chrisweb-utilities","../../library/utilities/route","../../library/utilities/user","../../library/utilities/object","speakingurl","../../views/pages/tracks/index"],e)}(function(e,t){"use strict";
55Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../library/error/error"),i=e("../../managers/manager"),o=e("../../vendor/phpjs/phpjs"),a=e("../../configuration/configuration"),s=e("FSPromise"),l=s.FSPromise,u=e("chrisweb-utilities"),c=e("../../library/utilities/route"),d=e("../../library/utilities/user"),p=e("../../library/utilities/object"),f=e("speakingurl"),h=e("../../views/pages/tracks/index"),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;if(isNaN(this.options.id))throw new n.default(this.errorDefinitions.NOT_FOUND.message,{id:this.options.id,userData:this.options.userData});e.prototype.create.call(this,t);if(!this.promise){var s=this.options.userData;this.promise=i.TracksManager.get(this.options.id,{userData:s}).then(function(e){if(0===e.length)throw new n.default(r.errorDefinitions.NOT_FOUND.message,{id:r.options.id,userData:r.options.userData});var m=e[0];if(!m.get("status")||!m.get("status").available)throw new n.default(r.errorDefinitions.NOT_FOUND.message,{id:r.options.id,userData:r.options.userData});var y=f(u.default.safeUnescape(m.get("name")));""===y&&(y="_");r.redirectIfUrlIncomplete({cleanName:y,generateURL:function(){var e;e="string"==typeof r.options.subpage&&r.options.subpage.length>0?c.default.getUrl("track",{id:m.get("id"),name:y,subpage:r.options.subpage}):c.default.getUrl("track",{id:m.get("id"),name:y});return e}});""===m.get("stats").notesCount&&(m.get("stats").notesCount=1);var g=[],v=a.default.application.websiteName,_=d.default.getUserLanguage(s);g.push(i.LocalizationManager.get(["_TKEY_WWW_META_TITLE_track-x-artistname-x-title-x-website","_TKEY_WWW_META_DESCRIPTION_track-x-artistname-x-title-x-website","_TKEY_WWW_META_KEYWORDS_track","_TKEY_WWW_META_TITLE_track-similar-x-artistname-x-title-x-website","_TKEY_WWW_META_DESCRIPTION_track-similar-x-artistname-x-title","_TKEY_WWW_META_KEYWORDS_track-similar","_TKEY_WWW_META_TITLE_track-lyrics-x-artistname-x-title-x-website","_TKEY_WWW_META_DESCRIPTION_track-lyrics-x-title-x-artistname-x-lyrics","_TKEY_WWW_META_KEYWORDS_track-lyrics","_TKEY_WWW_TRACK_page-title","_TKEY_WWW_GENERIC_share-message"],{userData:s}));g.push(i.ArtistsManager.get(m.get("artistId"),{userData:s}));m.get("albumId")&&g.push(i.AlbumsManager.get(m.get("albumId"),{userData:s}));return l.all(g).then(function(e){var i=e[0],l=e[1],c=e[2],d=i[0],f=i[1],y=i[2],g=i[3],b=i[4],w=i[5],x=i[6],M=i[7],S=i[8],k=i[9],T=i[10],A=l[0],E=c?c[0]:void 0;if(!A)throw new n.default(r.errorDefinitions.NOT_FOUND.message,{userData:r.options.userData,id:r.options.id});m.set("artist",A.getModelProjection());E&&m.set("album",E.getModelProjection());var P=o.default.strings.sprintf(d.get("translate")||d.get("id"),A.get("name"),m.get("name"),v),O=o.default.strings.sprintf(f.get("translate")||f.get("id"),A.get("name"),m.get("name"),v),j=y.get("translate")||y.get("id"),D=o.default.strings.sprintf(g.get("translate")||g.get("id"),A.get("name"),m.get("name"),v),C=o.default.strings.sprintf(b.get("translate")||b.get("id"),A.get("name"),m.get("name"),v),L=w.get("translate")||w.get("id"),I=o.default.strings.sprintf(x.get("translate")||x.get("id"),A.get("name"),m.get("name"),v),R=o.default.strings.sprintf(M.get("translate")||M.get("id"),A.get("name"),m.get("name"),v),Y=S.get("translate")||S.get("id"),N=o.default.strings.sprintf(T.get("translate")||T.get("id"),m.get("name"),v),F=m.get("description")||"";F=F.replace(/[<]br[^>]*[>]/gi," ").trim();var W=m.get("credits")||"";W=W.replace(/[<]br[^>]*[>]/gi," ").trim();""!==F?O=F:""!==W&&(O=W);var U=m.get("lyrics");""!==U&&(R=U);var q=new h.default([P,O,j,D,C,L,I,R,Y],{currentView:r.options.subpage,router:r.router,userData:s,templateVariables:{websiteName:v,language:_,description:F,credits:W},model:m});r.listenToSwipe(q);var H=q.getTabMetaData();r.skeleton.setTitle(u.default.safeUnescape(H.metaTitle));r.skeleton.setDescription(u.default.safeUnescape(H.metaDescription));r.skeleton.setKeywords(H.metaKeywords);var V=o.default.strings.sprintf(k.get("translate")||k.get("id"),A.get("name"),m.get("name")),B=q.getUrl(r.options.subpage),z=N;t.setHeader(u.default.safeUnescape(V));t.setCanonicalUrl(B);t.addContent(q);
55t.setOpenGraph({app_id:a.default.application.facebookAppId,url:B,title:u.default.safeUnescape(P),image:m.get("cover").big.size600,site_name:a.default.application.websiteName,description:u.default.safeUnescape(z),type:"music.song",locale_alternate:a.default.application.getLocales(),audio:m.get("stream").mp3.replace("https","http"),audio_secure_url:m.get("stream").mp3,audio_type:"audio/mpeg"});var K=s.location.protocol+"//"+s.location.host;t.setSchema({itemtype:"http://schema.org/MusicRecording",name:u.default.safeUnescape(m.get("name")),description:u.default.safeUnescape(O).replace(/"/g,""),image:m.get("cover").small.size600,url:K+B});p.closeModel(i);A.close();return t})})}return this.promise};t.prototype.updateMetadata=function(e){this.skeleton.setTitle(u.default.safeUnescape(e.metaTitle));this.skeleton.setDescription(u.default.safeUnescape(e.metaDescription));this.skeleton.setKeywords(e.metaKeywords);-1!==e.url.indexOf("lyrics")?this.skeleton.setCanonicalUrl(e.url,!1):this.skeleton.setCanonicalUrl(e.url)};t.prototype.uniqueInstanceId=function(){return this.options.id+"_"+this.options.name};return t}(r.default);t.default=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/about/index",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/about/index"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/about/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../configuration/configuration","../../library/utilities/object","../../views/pages/about/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../configuration/configuration"),o=e("../../library/utilities/object"),a=e("../../views/pages/about/index"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){if(!this.promise){var t=this.options.userData;this.promise=n.LocalizationManager.get(["_TKEY_WWW_META_DESCRIPTION_about-x-website","_TKEY_WWW_META_KEYWORDS_about","_TKEY_GENERIC_about-us"],{userData:t}).then(function(r){var n=r[0],s=r[1],l=r[2];e.setTitle(l.get("translate")+" | "+i.default.application.websiteName);e.setDescription(n.get("translate"));e.setKeywords(s.get("translate"));e.setHeader(l.get("translate"));o.closeModel(r);var u=new a.default({userData:t});e.addContent(u);return e})}return this.promise};return t}(r.default);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/apps/index",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";
55Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/apps/index"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/apps/index",["require","exports","../../library/controller/pageController","../../views/pages/apps/index","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../library/utilities/object"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../views/pages/apps/index"),i=e("../../managers/manager"),o=e("../../vendor/phpjs/phpjs"),a=e("../../configuration/configuration"),s=e("../../library/utilities/object"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){if(!this.promise){var t=this.options.userData;this.promise=i.LocalizationManager.get(["_TKEY_WWW_META_TITLE_apps-x-website","_TKEY_WWW_META_DESCRIPTION_apps-x-website","_TKEY_WWW_META_KEYWORDS_apps","_TKEY_WWW_NAVIGATION_app-link"],{userData:t}).then(function(r){var i=r[0],l=r[1],u=r[2],c=r[3];e.setTitle(o.default.strings.sprintf(i.get("translate"),a.default.application.websiteName));e.setDescription(o.default.strings.sprintf(l.get("translate"),a.default.application.websiteName));e.setKeywords(u.get("translate"));e.setHeader(c.get("translate"));s.closeModel(r);var d=new n.default({userData:t});e.addContent(d);return e})}return this.promise};return t}(r.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/contact/index",["require","exports","../../../library/view/loading","../../layout","../../../configuration/configuration","../../../library/adapter/clientAdapter","../../../library/model/model","../../messages/item"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("../../../library/view/loading"),i=e("../../layout"),o=e("../../../configuration/configuration"),a=e("../../../library/adapter/clientAdapter"),s=e("../../../library/model/model"),l=e("../../messages/item");!function(e){e[e.ideas_and_suggestions=1]="ideas_and_suggestions";e[e.report_bug=2]="report_bug";e[e.report_abuse=3]="report_abuse";e[e.copyright_infringement=4]="copyright_infringement";e[e.submit_app=5]="submit_app"}(r||(r={}));var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/contact/index"};t.prototype.events=function(){var e={"submit .js-contact-form":"onSubmit"};e["click .js-cancel-button"]="onCancel";return e};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.options.templateVariables.showCancelButton=this.options.showCancelButton;this.options.templateVariables.showSubjectDropdown=this.options.showSubjectDropdown};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$(".js-contact-form-username").addClass("hidden")};t.prototype.onCancel=function(){window.history.back()};t.prototype.onSubmit=function(e){var t=this;e.preventDefault();e.stopPropagation();var n={captcha:e.currentTarget[0].value,email:e.currentTarget[1].value,subject:r[e.currentTarget[2].value],text:e.currentTarget[3].value,hiddenType:e.currentTarget[4].value,hiddenId:e.currentTarget[5].value};if(n.email&&n.text){var u=new s.default({});u.adapter=new a.ClientAdapter;u.save(n,{url:o.default.api.getUrl("contact"),success:function(){i.default.getInstance().addMessage(new l.default({model:new s.default({message:"_TKEY_WWW_CONTACT_feedback-success-message",status:l.default.Status.Success})}));t.$(".js-contact-form").trigger("reset");t.options.historyBackAfterSubmit&&window.history.back()},error:function(){i.default.getInstance().addMessage(new l.default({model:new s.default({message:"_TKEY_WWW_CONTACT_feedback-error-message",status:l.default.Status.Warning})}))},wait:!0,userData:this.options.userData})}};return t}(n.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/contact/index",["require","exports","../../library/controller/pageController","../../views/pages/contact/index","../../managers/manager","../../configuration/configuration","../../library/model/model","../../vendor/phpjs/phpjs","../../library/utilities/object"],e)}(function(e,t){"use strict";
55Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../views/pages/contact/index"),i=e("../../managers/manager"),o=e("../../configuration/configuration"),a=e("../../library/model/model"),s=e("../../vendor/phpjs/phpjs"),l=e("../../library/utilities/object"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var r=this;if(!this.promise){var u=this.options.userData;this.promise=i.LocalizationManager.get(["_TKEY_WWW_META_TITLE_contact-x-website","_TKEY_WWW_META_DESCRIPTION_contact","_TKEY_WWW_META_KEYWORDS_contact","_TKEY_WWW_NAVIGATION_contact-link"],{userData:u}).then(function(i){var c=i[0],d=i[1],p=i[2],f=i[3];e.setTitle(s.default.strings.sprintf(c.get("translate"),o.default.application.websiteName));e.setDescription(d.get("translate"));e.setKeywords(p.get("translate"));e.setHeader(f.get("translate"));l.closeModel(i);var h,m,y,g=r.options.category?t.Category[r.options.category]:2;switch(r.options.category){default:h=!1;m=!0;y=!1;break;case t.Category.AbuseReport:case"AbuseReport":h=!0;m=!1;y=!0}var v=new n.default({showCancelButton:h,showSubjectDropdown:m,historyBackAfterSubmit:y,model:new a.default({defaultCategory:g,hiddenType:r.options.type?r.options.type:"",hiddenId:r.options.id?r.options.id:""}),userData:u});e.addContent(v);e.hideVeil();return e})}return this.promise};t.Category={Suggestions:1,BugReport:2,AbuseReport:3,Copyright:4,AppSubmit:5};return t}(r.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/faq/index",["require","exports","../../../library/view/loading","../../overlays","../../../library/utilities/route"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../overlays"),i=e("../../../library/utilities/route"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/faq/index"};t.prototype.events=function(){return{"click .js-faq-contactUs > a":"onClickContactUs","click .js-goto-signup":"onClickSignUp"}};t.prototype.onClickContactUs=function(e){e.preventDefault();var t=i.default.getUrl("contact");this.options.router.navigate(t,{trigger:!0,replace:!1})};t.prototype.onClickSignUp=function(e){e.preventDefault();n.default.add(n.default.DefinitionPath.LoginCreateAccount,{userData:this.options.userData})};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/faq/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../library/utilities/object","../../views/pages/faq/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../library/utilities/object"),s=e("../../views/pages/faq/index"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var t=this;if(!this.promise){var r=this.options.userData;this.promise=n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_faq-x-website","_TKEY_WWW_META_DESCRIPTION_faq","_TKEY_WWW_META_KEYWORDS_faq","_TKEY_WWW_NAVIGATION_faq-link"],{userData:r}).then(function(n){var l=n[0],u=n[1],c=n[2],d=n[3];e.setTitle(i.default.strings.sprintf(l.get("translate"),o.default.application.websiteName));e.setDescription(u.get("translate"));e.setKeywords(c.get("translate"));e.setHeader(d.get("translate"));a.closeModel(n);var p=new s.default({router:t.router,userData:r});e.addContent(p);return e})}return this.promise};return t}(r.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/homepage/index",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";
55Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/homepage/index"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/homepage/exploreCategory",["require","exports","underscore","../../../library/view/view","../../../managers/manager","../../../library/utilities/route"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/view"),i=e("../../../managers/manager"),o=e("../../../library/utilities/route"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/homepage/exploreCategory"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var t=i.TagsManager.getAllGenreTagName(this.options.language),n=o.default.getUrl("community",{name:t,subpage:"tracks"})+"?filter=latest";r.extend(this.options.templateVariables,{allGenresUrl:n})};return t}(n.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/homepage/charts",["require","exports","underscore","ribsjs","../../../configuration/configuration","../../../library/view/loading","../../../managers/manager","../../../library/utilities/object","../../../library/utilities/route","../../partials/tracks/item","../../layout/player","FSPromise"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../configuration/configuration"),a=e("../../../library/view/loading"),s=e("../../../managers/manager"),l=e("../../../library/utilities/object"),u=e("../../../library/utilities/route"),c=e("../../partials/tracks/item"),d=e("../../layout/player"),p=e("FSPromise"),f=p.FSPromise,h=function(e){function t(t){var n=e.call(this,r.extend({listSelector:".js-homepage-charts-list",ModelView:c.default,ModelViewOptions:{type:c.default.TrackItemType.VirtualList,isCol:!0,templateVariables:{from:"homepage",fromId:"charts"}}},t))||this;n.allGenreChartName="all genres";n.genres={};n.allGenreChartName=s.TagsManager.getAllGenreTagName(n.options.language);return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/homepage/charts"};t.prototype.onInitializeStart=function(){var t=this;e.prototype.onInitializeStart.call(this);var n=r.values(o.default.application.chartsFilter);n.indexOf(this.model.get("currentFilter"))<0&&this.model.set({currentFilter:o.default.application.chartsFilter.BestOf},{silent:!0});var i=u.default.getParams().country||"_ALL_",a=r.values(o.default.application.countriesFilter),l=a.includes(i)?i:"_ALL_";this.model.set({currentCountry:l},{silent:!0});var c=a.map(function(e){return{code:e,name:"",lang:t.options.language}});c.unshift({code:"_ALL_",name:s.TagsManager.getAllCountriesName(this.options.language),lang:this.options.language});this.listenTo(this.model,"change",this.onAttributeChange);this.model.set({filters:n,countries:c,listTitle:this.model.get("currentFilter")+" "+this.model.get("currentGenre"),tracklist:this.collection},{silent:!0});s.StaticManager.getByAttribute({type:"country"},{userData:this.options.userData}).then(function(e){var r=e.reduce(function(e,t){a.includes(t.attributes.code)&&e.push(t.attributes);return e},[]);r.unshift({code:"_ALL_",name:s.TagsManager.getAllCountriesName(t.options.language),lang:t.options.language});t.model.set("countries",r)})};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();r.keys(t).forEach(function(t){switch(t){case"listTitle":case"href":case"virtualId":e.play&&e.play.model.set(t,e.model.get(t));e.options.ModelViewOptions[t]=e.model.get(t);break;case"currentFilter":case"currentGenre":case"currentCountry":e.updateStats();e.getChart()}})};t.prototype.updateStats=function(){if(!this.play)return this;var e=this.play.model.get("stats");e.entityId=this.getChartsId();this.play.model.set({stats:e},{silent:!0});return this};t.prototype.getChartsId=function(){return this.model.get("currentFilter").toLowerCase()+"_"+this.genres[this.model.get("currentGenre")].idstr+"_"+this.model.get("currentCountry").toLowerCase()};t.prototype.applyStats=function(e){var t={entity:"tracklist",entityId:this.getChartsId()};e.forEach(function(e){e.set(t,{silent:!0})});return this};t.prototype.getChart=function(){
56var e=this.model.get("currentFilter");this.collection.reset();switch(e){case o.default.application.chartsFilter.BestOf:return this.getBestOf();case o.default.application.chartsFilter.Trending:return this.getTrending();case o.default.application.chartsFilter.Latest:return this.getLatest()}};t.prototype.getBestOf=function(){var e=this,t=this.options.userData,r=this.model.get("currentGenre"),n=r===this.allGenreChartName?{limit:20}:{tagId:this.genres[r].id,limit:20},i=this.model.get("currentCountry");"_ALL_"!==i&&(n.country=i);return s.ChartsManager.getByAttribute({type:"track"},{dataParameters:n,userData:t,reset:!0}).then(function(e){var r=e.map(function(e){return e.get("id")});return f.all([s.TracksManager.get(r,{userData:t}),e])}).then(function(t){var n=t[0],i=t[1];if(e.checkFilters(r,o.default.application.chartsFilter.BestOf)){n.forEac
56h(function(e){var t=i.find(function(t){return t.get("id")===e.get("id")}),r=t.get("extra");e.set({extra:r},{silent:!0})});e.addTracks(n)}l.closeModel(i)})};t.prototype.getTrending=function(){var e=this,t=this.options.userData,r=this.model.get("currentGenre"),n=r===this.allGenreChartName?{order:"trending",limit:20}:{tagId:this.genres[r].id,order:"hotness",limit:20},i=this.model.get("currentCountry");"_ALL_"!==i&&(n.country=i);return r===this.allGenreChartName?s.ChartsManager.getByAttribute({type:"track"},{dataParameters:n,userData:t,reset:!0}).then(function(e){var r=e.map(function(e){return e.get("id")});r=r.slice(0,6);return f.all([s.TracksManager.get(r,{userData:t}),e])}).then(function(t){var n=t[0],i=t[1];if(e.checkFilters(r,o.default.application.chartsFilter.Trending)){n.forEach(function(e){var t=i.find(function(t){return t.get("id")===e.get("id")}),r=t.get("extra");e.set({extra:r},{silent:!0})});e.addTracks(n)}l.closeModel(i)}):s.TracksManager.getByAttribute({},{dataParameters:n,userData:t}).then(function(t){e.checkFilters(r,o.default.application.chartsFilter.Trending)&&e.addTracks(t)})};t.prototype.getLatest=function(){var e=this,t=this.options.userData,r=this.model.get("currentGenre"),n=r===this.allGenreChartName?{order:"dateCreated_desc",limit:20}:{tagId:this.genres[r].id,order:"dateCreated_desc",limit:20},i=this.model.get("currentCountry");"_ALL_"!==i&&(n.country=i);return s.TracksManager.getByAttribute({},{dataParameters:n,userData:t}).then(function(t){e.checkFilters(r,o.default.application.chartsFilter.Latest)&&e.addTracks(t)})};t.prototype.addTracks=function(e){this.applyStats(e);this.options.ModelViewOptions.templateVariables.tracklist=this.collection;this.collection.set(e.slice(0,6).map(function(e,t){e.set({offset:t},{silent:!0});return e}));this.notifyPlayer()};t.prototype.notifyPlayer=function(){!this.isClose&&this.collection.length&&d.default.trigger(d.default.Event.QUEUE,{type:c.default.TrackItemType.VirtualList,id:this.model.get("virtualId"),collection:this.collection})};t.prototype.checkFilters=function(e,t){return this.model&&this.model.get("currentFilter")===t&&this.model.get("currentGenre")===e&&(!this.$("#select_country").length||this.model.get("currentCountry")===this.$("#select_country>option:selected").val())};t.prototype.setUrl=function(e,t,r){void 0===e&&(e=this.model.get("currentFilter"));void 0===t&&(t=this.model.get("currentGenre"));void 0===r&&(r=this.model.get("currentCountry"));var n=u.default.getUrl("community",{name:t,subpage:"tracks"}),i=u.default.getUrl("homepage"),a=this.getChartsId();if(t!==this.allGenreChartName){i+="?genre="+t;if(e!==o.default.application.chartsFilter.BestOf){n+="&filter="+e;i+="&filter="+e}if("_ALL_"!==r){n+="&country="+r;i+="&country="+r}}else if(e!==o.default.application.chartsFilter.BestOf){n+="?filter="+e;i+="?filter="+e;if("_ALL_"!==r){n+="&country="+r;i+="&country="+r}}else if("_ALL_"!==r){n+="?country="+r;i+="?country="+r}this.model.set({currentGenre:t,currentFilter:e,currentCountry:r,href:n,listTitle:e+" "+t,virtualId:a});this.$(".js-homepage-charts-link").attr("href",n);this.trigger("change:filter",{url:i});this.listener=a};t.prototype.render=function(){var t=this,n=this.options.language,i={order:"featuredRank",limit:40,lang:n,category:["genre"]};return s.TagsManager.getByAttribute({},{dataParameters:i,userData:this.options.userData}).then(function(i){var o=s.TagsManager.getAllGenreTagModel(n);i.unshift(o);i=r.reject(i,function(e){return 100===e.get("id")});i.forEach(function(e){t.genres[e.get("name")]={id:e.get("id"),idstr:e.get("idstr")}});t.model.set({genres:Object.keys(t.genres)},{silent:!0});if(t.model.get("currentGenre")in t.genres){t.setUrl();return t.getChart().then(function(){return e.prototype.render.call(t)})}t.model.set("currentGenre",t.allGenreChartName);return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.updateStats();"plugins"in window&&"listpicker"in window.plugins&&this.configureSelect()};t.prototype.events=function(){var e="plugins"in window&&"listpicker"in window.plugins,t={};t[(e?"click":"change")+" #select_genre"]=e?"showGenrePicker":"onChangeSelect";t[(e?"click":"change")+" #select_filter"]=e?"showFilterPicker":"onChangeSelect";t[(e?"click":"change")+" #select_country"]=e?"showCountryPicker":"onChangeSelect";return t};t.prototype.configureSelect=function(){var e=this,t=this.model.get("filters"),r=t.map(function(e){return"_TKEY_GENERIC_FILTER_"+e});r.unshift("_TKEY_WWW_GENERIC_cancel","_TKEY_GENERIC_GENRE_select-title","_TKEY_GENERIC_FILTER_select-title","_TKEY_GENERIC_COUNTRY_select-title");return s.LocalizationManager.get(r,{userData:this.options.userData}).then(function(r){var n=r[0],i=r[1],o=r[2],a=r[3],s=r.slice(4);e.genreSelectConfig={title:i.get("translate"),items:e.model.get("genres").map(function(e){return{text:e,value:e}}),selectedValue:e.model.get("currentGenre"),cancelButtonLabel:n.get("translate")};e.filterSelectConfig={title:o.get("translate"),items:t.map(function(e,t){return{text:s[t].get("translate"),value:e}}),selectedValue:e.model.get("currentFilter"),cancelButtonLabel:n.get("translate")};e.countrySelectConfig={title:a.get("translate"),items:e.model.get("countries").map(function(e){return{text:e.name,value:e.code}}),selectedValue:e.model.get("currentCountry"),cancelButtonLabel:n.get("translate")}})};t.prototype.onChangeSelect=function(e){this.setUrl(this.$("#select_filter>option:selected").val(),this.$("#select_genre>option:selected").val(),this.$("#select_country>option:selected").val())};t.prototype.showGenrePicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.genreSelectConfig,function(e){t.$("#select_genre").val(e);t.genreSelectConfig.selectedValue=e;t.onChangeSelect()},function(){""})};t.prototype.showFilterPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.filterSelectConfig,function(e){t.$("#select_filter").val(e);t.filterSelectConfig.selectedValue=e;t.onChangeSelect()},function(){""})};t.prototype.showCountryPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.countrySelectConfig,function(e){t.$("#select_country").val(e);t.countrySelectConfig.selectedValue=e;t.onChangeSelect()},function(){""})};Object.defineProperty(t.prototype,"listener",{set:function(e){this._listener&&i.off(this._listener,this.notifyPlayer,this);this._listener=e;e&&i.on(this._listener,this.notifyPlayer,this)},enumerable:!0,configurable:!0});t.prototype.close=function(){this.stopListening(this.model,"change",this.onAttributeChange);this.listener=null;e.prototype.close.call(this)};return t}(a.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/homepage/musicForVideos",["require","exports","underscore","../../../configuration/configuration","../../../library/view/loading","../../partials/tracks/item"],e)}(function(e,t){"use strict";
56Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../configuration/configuration"),i=e("../../../library/view/loading"),o=e("../../partials/tracks/item"),a=function(e){function t(t){return e.call(this,r.extend({listSelector:".js-homepage-music-for-videos-list",ModelView:o.default,ModelViewOptions:{type:o.default.TrackItemType.Playlist,templateStyle:o.default.TemplateStyles.Licensing,playlistId:n.default.application.musicForVideosPlaylistId,templateVariables:{licensingBaseUrl:t.templateVariables.licensingBaseUrl,language:t.templateVariables.language}}},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/homepage/musicForVideos"};return t}(i.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/homepage/index",["require","exports","ribsjs","../../managers/manager","../../vendor/phpjs/phpjs","FSPromise","../../library/controller/pageController","../../library/model/model","../../configuration/configuration","../../library/error/error","chrisweb-utilities","../../library/utilities/display","../../library/utilities/route","../../library/utilities/image","../../library/utilities/object","../../library/utilities/user","../../views/pages/homepage/index","../../views/pages/homepage/exploreCategory","../../views/pages/homepage/charts","../../views/pages/homepage/musicForVideos","../../views/partials/dynamicList/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("FSPromise"),a=o.FSPromise,s=e("../../library/controller/pageController"),l=e("../../library/model/model"),u=e("../../configuration/configuration"),c=e("../../library/error/error"),d=e("chrisweb-utilities"),p=e("../../library/utilities/display"),f=e("../../library/utilities/route"),h=e("../../library/utilities/image"),m=e("../../library/utilities/object"),y=e("../../library/utilities/user"),g=e("../../views/pages/homepage/index"),v=e("../../views/pages/homepage/exploreCategory"),_=e("../../views/pages/homepage/charts"),b=e("../../views/pages/homepage/musicForVideos"),w=e("../../views/partials/dynamicList/index"),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var t=this;if(!this.promise){var o=this.options.userData;this.promise=new a(function(a,s){var x=new g.default({userData:o,subviewAsyncRender:d.default.isClient()}),M=f.default.getParams(t.options.url),S=y.default.getUserLanguage(o);e.addContent(x);var k=function(e,t){return t.get("dateStart")-e.get("dateStart")||t.get("id")-e.get("id")},T=new r.Collection,A=new r.Collection,E=new r.Collection,P=new r.Collection,O=new r.Collection([],{comparator:k}),j=M.filter||u.default.application.chartsFilter.BestOf,D=M.genre||n.TagsManager.getAllGenreTagName(S),C=new l.default({listTitle:j+" "+D,trackList:[],currentFilter:j,currentGenre:D,genres:[]});t.homeChartsView=new _.default({userData:o,loadingStyle:{block:!0},collection:T,model:C,language:S});t.homeChartsView.on("change:filter",t.onChangeFilter,t);x.addView(".js-homepage-section-charts",t.homeChartsView);x.addView(".js-homepage-section-music-for-videos",new b.default({collection:A,userData:o,loadingStyle:{block:!0},templateVariables:{licensingBaseUrl:"https://licensing.jamendo.com",language:y.default.getUserLanguage(o),catalogRouteUrl:"_TKEY_ROUTE_URL_PART_catalog",catalogSearchRouteUrl:"_TKEY_ROUTE_URL_PART_search"},renderPromise:n.PlaylistsManager.get(u.default.application.musicForVideosPlaylistId,{userData:o}).then(function(e){if(0===e.length)throw new c.default(t.errorDefinitions.NOT_FOUND.message,t.options);var r=e[0],i=r.get("tracks").map(function(e){return e.id});i=i.slice(0,6);m.closeModel(r);return n.TracksManager.get(i,{userData:o})}).then(function(e){e.forEach(function(e,t){e.set("offset",t)});A.add(e)}).catch(s)}));x.addView(".js-homepage-section-hot-selections",new w.default({collection:E,entityType:p.default.EntityType.HotSelections,userData:o,loadingStyle:{block:!0},templateVariables:{listTitleKey:"_TKEY_WWW_HOMEPAGE_hot-selections-title",listSubtitleKey:"_TKEY_WWW_HOMEPAGE_hot-selections-subtitle",moreTitleKey:"_TKEY_WWW_GENERIC_more-playlists",moreUrl:{urlName:"explore",subpage:"playlists"}},ModelViewOptions:{templateVariables:{from:"homepage",fromId:"hot-selections"}},renderPromise:n.PlaylistsManager.getFeatured({userData:o,dataParameters:{limit:12}}).then(function(e){E.add(e)}).catch(s)}));x.addView(".js-homepage-section-explore",new v.default({userData:o,loadingStyle:{block:!0},language:S}));x.addView(".js-homepage-section-radios",new w.default({collection:P,entityType:p.default.EntityType.RadiosHome,userData:o,loadingStyle:{block:!0},templateVariables:{listTitleKey:"_TKEY_WWW_HOMEPAGE_our-radios-title",listSubtitleKey:"_TKEY_WWW_HOMEPAGE_our-radios-subtitle",moreTitleKey:"_TKEY_WWW_GENERIC_more-radios",moreUrl:{urlName:"radios"}},ModelViewOptions:{isCol:!0,templateVariables:{from:"homepage",fromId:"radios"}},renderPromise:n.RadiosManager.getByAttribute({},{userData:o,dataParameters:{limit:200}}).then(function(e){var t=[],r=u.default.application.featuredRadio.slice(0,6);e.forEach(function(e){r.indexOf(e.get("idstr").toLowerCase())>-1&&t.push(e)});P.add(t)}
56).catch(s)}));x.addView(".js-homepage-section-posts",new w.default({collection:O,entityType:p.default.EntityType.Post,userData:o,loadingStyle:{block:!0},templateVariables:{listTitleKey:"_TKEY_WWW_HOMEPAGE_posts-title",listSubtitleKey:"_TKEY_WWW_HOMEPAGE_posts-subtitle",moreTitleKey:"_TKEY_WWW_GENERIC_more-posts",moreUrl:{urlName:"blog"}},ModelViewOptions:{templateVariables:{from:"homepage_posts"}},renderPromise:n.PostsManager.getByAttribute({},{dataParameters:{limit:4},userData:t.options.userData}).then(function(e){O.add(e)}).catch(s)}));n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_homepage-x-website","_TKEY_WWW_META_DESCRIPTION_homepage","_TKEY_WWW_META_KEYWORDS_homepage","_TKEY_WWW_HOMEPAGE_header-title","_TKEY_WWW_HOMEPAGE_top-10"],{userData:o}).then(function(t){var r=f.default.getUrl("homepage"),n=t[0],o=t[1],s=t[2],l=t[3],c=t[4],d=i.default.strings.sprintf(n.get("translate"),u.default.application.websiteName),p=o.get("translate");e.setTitle(d);e.setDescription(p);e.setKeywords(s.get("translate"));C.set("listTitle",c.get("translate"));e.setHeader(l.get("translate"));e.setCanonicalUrl(r);e.setOpenGraph({app_id:u.default.application.facebookAppId,url:r,title:d,image:h.default.getImageUrl("jamendomusic/static/identity/share/facebook-share-site-image.jpg"),site_name:u.default.application.websiteName,description:p,type:"website",locale_alternate:u.default.application.getLocales()});m.closeModel(t);a(e)}).catch(s)})}return this.promise};t.prototype.onChangeFilter=function(e){d.default.isClient()&&this.router.navigate(e.url,{trigger:!1,replace:!0})};t.prototype.clear=function(){this.homeChartsView&&this.homeChartsView.off("change:filter",this.onChangeFilter,this);e.prototype.clear.call(this)};return t}(s.default);t.default=x});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/jobs/index",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/jobs/index"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/jobs/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../library/utilities/object","../../views/pages/jobs/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../library/utilities/object"),s=e("../../views/pages/jobs/index"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var r=this;if(!this.promise){var s=this.options.userData;this.promise=n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_jobs-x-website","_TKEY_WWW_META_DESCRIPTION_jobs","_TKEY_WWW_META_KEYWORDS_jobs","_TKEY_WWW_NAVIGATION_jobs-link"],{userData:s}).then(function(n){var l=n[0],u=n[1],c=n[2],d=n[3];e.setTitle(i.default.strings.sprintf(l.get("translate"),o.default.application.websiteName));e.setDescription(u.get("translate"));e.setKeywords(c.get("translate"));e.setHeader(d.get("translate"));a.closeModel(n);var p=r.options.subpage||"",f=new t.JobsOffer[p]({userData:s,templateVariables:{websiteName:o.default.application.websiteName}});e.addContent(f);return e})}return this.promise};t.JobsOffer={"":s.default};return t}(r.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/legal/overview",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";
56Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/legal/overview"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/legal/licenses",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/legal/licenses"};return t}(r.default);t.default=n});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/data/legal/tos",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
57;t.en='=TERMS OF USE – JAMENDO=\n\nLast Updated: April 22, 2025\n\n-1. INTRODUCTION-\n\nWe are Jamendo, a platform for the online distribution of musical works providing services for artists, users, and companies. The Jamendo services are operated by the company under Luxembourg law:\n\n```organization\nname: <u>JAMENDO S.A</u>\naddress: 51 Rue de Strasbourg\nzipcode: L-2561\ncity: LUXEMBOURG\ncountry: LUXEMBOURG\nphone: +33 1 76 39 01 45\ncontacttype: customer service\ncontactlanguage: English, French, Spanish, German\nhours: Mo 09:00-18:00,Tu 09:00-18:00,We 09:00-18:00,Th 09:00-18:00,Fr 09:00-18:00\nemail: [email protected]\nrcs: B0104301\ntva: LU22234927\nlogo: https://images.jamendo.com/logo/logo-hd-jamendo-music.jpg\nwebsite: https://www.jamendo.com\nfacebook: https://www.facebook.com/jamendo\ngoogleplus: https://plus.google.com/u/0/+jamendo/posts\ntwitter: https://twitter.com/Jamendo\ninstagram: https://instagram.com/jamendo/\nlinkedin: https://www.linkedin.com/company/jamendo\n```\n\n\nHereinafter "Jamendo", “we”, “us”, “our”.\n\nJamendo does not act as an Internet access provider or as an electronic public communications service.\n\nThese Terms of Use govern your use of Jamendo’s website and services, all musical works (“Works”) in the Jamendo catalog, and all content such as designs, text, graphics, pictures, and videos (“Material”) published on Jamendo’s website.\n\n<u>This is a contract between you and Jamendo. By accessing, visiting, or using the Jamendo website and services, whether or not you register, you agree to be bound by these Terms of Use.</u> If you are using the Jamendo website on behalf of your employer or a company, you confirm that you have the authority to bind your employer/company to these Terms of Use and any License/Subscription you may purchase. References to "you" and "your" in these Terms of Use will apply to both you and your employer/company, as applicable. Do not agree to these Terms or any License on behalf of your employer/company if you are not authorized to do so. <u>Please read them carefully. If you do not accept these Terms of Use, do not use Jamendo\'s website or services.</u>\n\n-2.\tPARENTAL CONSENT-\n\nIf you are under 18 years of age (or the alternative age of consent in your country), we request that a parent or legal guardian consent to your use of the Jamendo website and services (or enter into these Terms of Use on your behalf) and explain to you these Terms of Use.\n\n-3.\tMODIFICATION OF TERMS OF USE-\n\nJamendo reserves the right to modify these Terms of Use at any time. These modifications may be made to ensure compliance with legal requirements, improve user experience, and reflect changes to improve our services and products. Unregistered users should refer to the latest version available on Jamendo\'s website. Registered members will be notified of any changes through their user account or via a newsletter. If a user does not express their intention to unregister from Jamendo, the new version of the Terms of Use will be considered tacitly accepted fifteen (15) days after Jamendo notifies the user of the changes.\n\n-4.\tLANGUAGE-\n\nWe may provide translations of these Terms of Use into other languages for your convenience. However, for non-consumers as defined by your local laws, the English version will always prevail.\n\n-5.\tYOUR ACCOUNT-\n\nTo access certain services on Jamendo, whether you’re a user, an artist, or a company, you may 
57need to register and create an account (“User Account” / “Artist Account” / “Licensing Account”, respectively). By doing so, you agree to:\n\n1.\tProvide accurate, current, and complete information, and keep it updated.\n2.\tAdhere to these Terms of Use.\n\nPlease avoid using a username that impersonates someone else, is illegal, protected by trademark or other proprietary rights, vulgar, offensive, or likely to cause confusion. We reserve the right to reject or disable any username/identifier at our discretion.\n\nYou are responsible for maintaining the confidentiality of your account and password, and for all activities that occur under your account. You agree to notify us immediately of any unauthorized access or use of your account or password by sending an e-mail to [email protected]. Be cautious when accessing your account from a public or shared computer or public Wi-Fi to prevent others from viewing or recording your password or personal information. We will not be liable for any loss you incur as a result of someone else using your account and password, with or without your permission.\n\n-6.\tUSE OF JAMENDO WEBSITE AND SERVICES-\n\n--Publication of Works--\nArtists can publish their Works directly online through their Artist Account by clicking on "Upload your music". For each publication, the Artist commits to complete the requested information sheet by specifying for each Work and each collection of Works (“Album”), notably the real name of all right holders and the License selected (as defined below). The Artist is responsible for providing Jamendo with the Materials needed for the distribution and promotion of the Works at the same time as the Works are uploaded.\n\n--Effect of Artist Withdrawal--\nThe Artist may withdraw all or part of their Works at any time, through their Artist Account. However, the Artist acknowledges and accepts that any Works downloaded by Users or any third party authorized by Jamendo before their withdrawal may continue to be distributed, shared, and reproduced by any means. The Artist agrees to hold Jamendo harmless from and against any third-party claims in this regard.\n\n--Choosing a Creative Commons (CC) License--\nWhen publishing on Jamendo, the Artist must select a Creative Commons (CC) License for each Work or Album. The chosen license will determine the rights Users have over the Works and Materials. For more details on the different types of CC Licenses and their implications, please refer to the Creative Commons guidelines.\n\n--Rights Granted to Jamendo--\nBy uploading Works and Materials to Jamendo, the Artist grants Jamendo the following worldwide, royalty-free, and non-exclusive rights for as long as the Works and Materials are available online:\n\n•\t<u>Reproduction and Distribution:</u> The right to reproduce, fix, publish, broadcast, distribute, and transfer the Works and Materials in any format.\n•\t<u>Adaptation:</u> The right to adapt the Works and Materials to meet the format requirements of Jamendo or its partners.\n•\t<u>Promotion:</u> The right to use the Works and Materials on any media to promote the Artist and Jamendo.\n•\t<u>Monetization:</u> The right to monetize Jamendo’s services by inserting advertisements, which may or may not provide remuneration to the Artists.\n\n--Artist Obligations--\nThe Artist guarantees that they are the sole right holder of the Work(s) or have the authority to represent and commit on behalf of all right holders. They confirm they hold sufficient rights to the Works and are not bound by any entity, including any collecting society, that would restrict granting rights to Jamendo or its Users.\n\nThe Artist commits to comply with these Terms of Use while their Works are published on Jamendo and not act against the rights of third parties, including Users, even after withdrawal of the Works. The Artist agrees to indemnify Jamendo against any claims from breaches of these obligations.\n\nThe Artist commits not to promote Jamendo’s competitors on the Services provided by Jamendo, including but not limited to Jamendo’s website, forums, chatting areas, and pages dedicated to Jamendo. To this end, Jamendo will request the Artist to sign a Certification reiterating key obligations contained in these Terms of Use when uploading Works.\n\n--Use of Artists\' Works--\nEach Work is available to Users under one of the Licenses provided by Jamendo. The selected License is indicated on the page dedicated to each Work by an icon or any other means. By clicking on this icon, you can find information about the terms and conditions under which the Artist and Jamendo allow you to use the Work. You agree and commit to use the Work in accordance with these Terms of Use and the License under which the Work has been published, and commit to respect and not to infringe any intellectual property rights held by Art
57ists.\n\nJamendo allows Artists and Users to embed a code, widget, and player on their blogs, personal websites, social network profiles, and other websites, enabling one or more Works to be played. This embedding and the distribution of the Works must comply with the provisions of the Licenses and these Terms of Use, as well as the guidelines of your hosting provider. You agree to indemnify and hold Jamendo harmless from and against any claims from third parties related to any complaints and/or action regarding the embedding and/or distribution of the Works.\n\n--Use of Jamendo Services--\nBy using Jamendo Services, you agree to act in good faith towards Jamendo, its Users, artists, and clients. You must not post inappropriate or abusive content. Specifically, you agree not to publish any content or information that:\n\n•\tMay directly or indirectly harm any third party (individual, entity, or group);\n•\tIs defamatory, insulting, obscene, immoral, offensive, or violent, or incites any type of political, racist, or xenophobic violence (whether physical, verbal, or psychological), and that violates any applicable laws;\n•\tContains personal information about another User or any third party without their explicit consent;\n•\tInfringes on the intellectual property rights of authors and/or other right holders, whether alone or in combination with other content;\n•\tUses technologies that disrupt, reduce, disrupt, or prevent the normal operation of the Services.\nYou also undertake not to infringe the intellectual property rights of the content you access through the Services. You are solely liable for the distribution of any text, information, data, hypertext links, music, sound recordings, photographs, drawings, videos, messages, tags, or any other Materials through the Services.\n\n--Compliance--\nIf a User fails to comply with any provisions of the Terms of Use, Jamendo may, without prior warning, take appropriate measures, including shutting down the User’s Account. Jamendo reserves its rights to initiate legal proceedings against the User and claim any damages it has suffered due to the User’s non-compliance with these Terms.\n\nIn the event of a claim, complaint, or legal action arising from a user\'s wrongful conduct that breaches these General Terms of Use, Jamendo may take action against the user or member responsible for the conduct.\n\n-7.\tDISCLAIMER-\n\nYOU ACKNOWLEDGE AND AGREE THAT THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE." TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, JAMENDO DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF (A) MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, (B) NON-INFRINGEMENT, (C) AVAILABILITY, QUALITY, OR PERFORMANCE OF THE MATERIALS, INFORMATION, GOODS, SERVICES, TECHNOLOGY, AND/OR CONTENT PROVIDED UNDER OR IN CONNECTION WITH THIS AGREEMENT, INCLUDING ANY LIMITATIONS ON USER ACCESS TO OR USE OF CONTENT, AND (D) THE PERFORMANCE OF COMPUTERS, TECHNOLOGY, AND/OR NETWORKS. YOU ALSO ACKNOWLEDGE THAT FREEDOM FROM PROGRAM ERRORS CANNOT BE GUARANTEED IN THE SOFTWARE INDUSTRY. NEITHER JAMENDO NOR ANY OTHER OWNER OF CONTENT WARRANTS THAT THE SERVICE IS FREE OF MALWARE OR OTHER HARMFUL COMPONENTS.\n\nJAMENDO RESERVES THE RIGHT TO MODIFY OR DISCONTINUE, TEMPORARILY OR PERMANENTLY, FUNCTIONS AND FEATURES OF THE SITE WITH OR WITHOUT NOTICE, AND SHALL HAVE NO LIABILITY TO YOU IF SUCH RIGHTS ARE EXERCISED. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES OR LIMITATIONS ON APPLICABLE STATUTORY RIGHTS OF A CONSUMER, SO THE EXCLUSIONS AND LIMITATIONS IN THIS SECTION MAY NOT APPLY TO YOU AND NOTHING WILL AFFECT YOUR STATUTORY RIGHTS.\n\n-8.\tPRIVACY-\n\nWe process personal data about you and your use of the Jamedo website and Services in accordance with our Privacy Notice and Cookie Policy, as applicable from time to time. Jamendo’s Privacy Notice and Cookie Policy applies to the use of Jamendo’s website and Services and is made part of these Terms of Use by reference. We encourage you to read our Privacy Policy [here](https://www.jamendo.com/legal/privacy).\n\n-9.\tINTELLECTUAL PROPERTY-\n\nJamendo holds all intellectual property rights related to the trademarks, patents, software, logos, graphics, photographs, and animations contained within the Services, excluding the intellectual property rights regarding the Works. These elements may not be reproduced without Jamendo\'s express consent.\n\nJamendo grants you a limited license to access, download, and reproduce these elements on any digital media for private and personal use only, within the framework of your use of the Services and for as long as you are registered for the Services.\n\nWhen you provide Jamendo with any content, excluding Works which are subject to specific treatment in these Terms of Use, you grant Jamendo a worldwide, royalty-free license for the duration of the publication of said content. This license allows Jamendo to reproduce, display, translate, digitize, use for advertising, commercial or non-commercial purposes, modify, and adapt all of the content for its Services. Jamendo is also authorized to grant these rights to any third party or partners, in accordance with these Terms of Use.\n\n-10.\tLIABILITY-\n\nTo the fullest extent permitted by applicable law, Jamendo and its affiliates, officers, directors, employees, agents, and partners shall not be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, resulting from:\n\n•\tYour use or inability to use the Services;\n•\tAny unauthorized access to or use of our servers and/or any personal information stored therein;\n•\tAny interruption or cessation of transmission to or from the Services;\n•\tAny bugs, viruses, trojan horses, or the like that may be transmitted to or through our Services by any third party;\n•\tAny errors or omissions in any content or for any loss or damage incurred as a result of the use of any content posted, emailed, transmitted, or otherwise made available through the Services.\n\n-11.\tINDEMNIFICATION-\n\nYou agree to defend, indemnify, and hold harmless Jamendo and its affiliates, officers, directors, employees, agents, and partners from and against any claims, liabilities, damages, losses, and expenses, including without limitation reasonable legal and accounting fees, arising out of or in any way connected with:\n\n•\tYour access to or use of the Services;\n•\tYour violation of these Terms of Service;\n•\tYour violation of any third-party right, including without limitation any intellectual property right, publicity, confidentiality, property, or privacy right;\n•\tAny claim that your content caused damage to a third party.\n\n-12.\tMONITORING-\n\nJamendo is under no obligation to monitor the content on its websites or any associated servers. If you encounter content on Jamendo that is clearly illegal or violates these Terms of Use, you can report it by emailing  [email protected] or by clicking the "Report abuse or copyrighted content" link found on the Works\' pages. For more information on how to report abuse, please visit the "Report Abuse" page.\n\n-13.\tSERVICES AND CONTENT PROVIDED BY THIRD PARTIES-\n\nJamendo\'s Services may include links to other websites, as well as services and content provided by third parties, such as but not limited to social network sharing buttons (e.g., Twitter and Facebook) and third-party payment solutions for donations to Artists (e.g., PayPal). Jamendo does not control these services, content, or the websites accessible via these links and is not liable for their use. By using these services, you agree to their respective terms of use, and Jamendo declines any liability arising from the use of such payment solutions.\n\n-14.\tEXPORT CONTROL AND SANCTIONS-\n\nJamendo products and services may be subject to export control and economic sanctions laws of Luxembourg, the US, and other jurisdictions. You agree to comply with all applicable trade control laws.\nYou warrant that you:\n\n1.\tAre not located in, organized under the laws of, or ordinarily resident in a sanctioned country or territory.\n2.\tAre not listed on any sanctions-related list of prohibited parties.\n\nYou agree not to use, sell, export, re-export, transfer, or dispose of any product, softw
57are, or technology from Jamendo in violation of any applicable trade control laws.\n\nJamendo reserves the right to restrict access to its services in sanctioned regions and may terminate or suspend your access if you violate this clause.\n\n-15.\tPROHIBITION OF TEXT AND DATA MINING-\n\nUsers are prohibited from using any content from Jamendo for commercial text and data mining purposes, including but not limited to machine learning, artificial intelligence, or any other automated data analysis techniques. Such unnauthorized use may result in legal action. Content from Jamendo may be used for research and scientific purposes, only for non-commercial use, under certain circumstances. We request that you seek prior written authorisation from Jamendo before using Jamendo content for such purposes. \n\n-16.\tTAKEDOWNS-\n\nIf you believe that any content on Jamendo.com infringes your intellectual property rights or violates any applicable laws, you may submit a takedown request. To do so, please provide the following information:\n\n1.\tIdentification of the content: A detailed description of the content you believe infringes your rights or violates the law.\n2.\tProof of ownership: Documentation or evidence demonstrating your ownership of the intellectual property rights in question.\n3.\tContact information: Your name, address, email address, and telephone number.\n4.\tStatement of good faith: A statement confirming that you believe in good faith that the use of the content is not authorized by the intellectual property owner, its agent, or the law.\n5.\tSignature: A physical or electronic signature of the intellectual property owner or a person authorized to act on their behalf.\n\nPlease send your takedown request to [email protected]. Upon receipt of a valid takedown request, Jamendo will promptly investigate and take appropriate action, which may include removing or disabling access to the infringing content.\n\n-17.\tSEVERABILITY-\n\nIf any provision of these Terms of Use is held to be invalid or unenforceable, the parties hereby agree that the remaining provisions shall remain valid and enforceable and that the Terms of Use will remain in full force and effect.\n\n-18.\tAPPLICABLE LAW-\n\nThese Terms of Use are governed by the laws of Luxembourg. Any dispute relating to their interpretation and/or execution shall be referred to the courts of Luxembourg. This does not affect any rights you may have as a consumer to bring a claim in the courts of your country of residence under applicable consumer protection laws.\n'
58;t.fr='=TERMS OF USE – JAMENDO=\n\nLast Updated: April 22, 2025\n\n-1. INTRODUCTION-\n\nWe are Jamendo, a platform for the online distribution of musical works providing services for artists, users, and companies. The Jamendo services are operated by the company under Luxembourg law:\n\n```organization\nname: <u>JAMENDO S.A</u>\naddress: 51 Rue de Strasbourg\nzipcode: L-2561\ncity: LUXEMBOURG\ncountry: LUXEMBOURG\nphone: +33 1 76 39 01 45\ncontacttype: customer service\ncontactlanguage: English, French, Spanish, German\nhours: Mo 09:00-18:00,Tu 09:00-18:00,We 09:00-18:00,Th 09:00-18:00,Fr 09:00-18:00\nemail: [email protected]\nrcs: B0104301\ntva: LU22234927\nlogo: https://images.jamendo.com/logo/logo-hd-jamendo-music.jpg\nwebsite: https://www.jamendo.com\nfacebook: https://www.facebook.com/jamendo\ngoogleplus: https://plus.google.com/u/0/+jamendo/posts\ntwitter: https://twitter.com/Jamendo\ninstagram: https://instagram.com/jamendo/\nlinkedin: https://www.linkedin.com/company/jamendo\n```\n\n\nHereinafter "Jamendo", “we”, “us”, “our”.\n\nJamendo does not act as an Internet access provider or as an electronic public communications service.\n\nThese Terms of Use govern your use of Jamendo’s website and services, all musical works (“Works”) in the Jamendo catalog, and all content such as designs, text, graphics, pictures, and videos (“Material”) published on Jamendo’s website.\n\n<u>This is a contract between you and Jamendo. By accessing, visiting, or using the Jamendo website and services, whether or not you register, you agree to be bound by these Terms of Use.</u> If you are using the Jamendo website on behalf of your employer or a company, you confirm that you have the authority to bind your employer/company to these Terms of Use and any License/Subscription you may purchase. References to "you" and "your" in these Terms of Use will apply to both you and your employer/company, as applicable. Do not agree to these Terms or any License on behalf of your employer/company if you are not authorized to do so. <u>Please read them carefully. If you do not accept these Terms of Use, do not use Jamendo\'s website or services.</u>\n\n-2.\tPARENTAL CONSENT-\n\nIf you are under 18 years of age (or the alternative age of consent in your country), we request that a parent or legal guardian consent to your use of the Jamendo website and services (or enter into these Terms of Use on your behalf) and explain to you these Terms of Use.\n\n-3.\tMODIFICATION OF TERMS OF USE-\n\nJamendo reserves the right to modify these Terms of Use at any time. These modifications may be made to ensure compliance with legal requirements, improve user experience, and reflect changes to improve our services and products. Unregistered users should refer to the latest version available on Jamendo\'s website. Registered members will be notified of any changes through their user account or via a newsletter. If a user does not express their intention to unregister from Jamendo, the new version of the Terms of Use will be considered tacitly accepted fifteen (15) days after Jamendo notifies the user of the changes.\n\n-4.\tLANGUAGE-\n\nWe may provide translations of these Terms of Use into other languages for your convenience. However, for non-consumers as defined by your local laws, the English version will always prevail.\n\n-5.\tYOUR ACCOUNT-\n\nTo access certain services on Jamendo, whether you’re a user, an artist, or a company, you may 
58need to register and create an account (“User Account” / “Artist Account” / “Licensing Account”, respectively). By doing so, you agree to:\n\n1.\tProvide accurate, current, and complete information, and keep it updated.\n2.\tAdhere to these Terms of Use.\n\nPlease avoid using a username that impersonates someone else, is illegal, protected by trademark or other proprietary rights, vulgar, offensive, or likely to cause confusion. We reserve the right to reject or disable any username/identifier at our discretion.\n\nYou are responsible for maintaining the confidentiality of your account and password, and for all activities that occur under your account. You agree to notify us immediately of any unauthorized access or use of your account or password by sending an e-mail to [email protected]. Be cautious when accessing your account from a public or shared computer or public Wi-Fi to prevent others from viewing or recording your password or personal information. We will not be liable for any loss you incur as a result of someone else using your account and password, with or without your permission.\n\n-6.\tUSE OF JAMENDO WEBSITE AND SERVICES-\n\n--Publication of Works--\nArtists can publish their Works directly online through their Artist Account by clicking on "Upload your music". For each publication, the Artist commits to complete the requested information sheet by specifying for each Work and each collection of Works (“Album”), notably the real name of all right holders and the License selected (as defined below). The Artist is responsible for providing Jamendo with the Materials needed for the distribution and promotion of the Works at the same time as the Works are uploaded.\n\n--Effect of Artist Withdrawal--\nThe Artist may withdraw all or part of their Works at any time, through their Artist Account. However, the Artist acknowledges and accepts that any Works downloaded by Users or any third party authorized by Jamendo before their withdrawal may continue to be distributed, shared, and reproduced by any means. The Artist agrees to hold Jamendo harmless from and against any third-party claims in this regard.\n\n--Choosing a Creative Commons (CC) License--\nWhen publishing on Jamendo, the Artist must select a Creative Commons (CC) License for each Work or Album. The chosen license will determine the rights Users have over the Works and Materials. For more details on the different types of CC Licenses and their implications, please refer to the Creative Commons guidelines.\n\n--Rights Granted to Jamendo--\nBy uploading Works and Materials to Jamendo, the Artist grants Jamendo the following worldwide, royalty-free, and non-exclusive rights for as long as the Works and Materials are available online:\n\n•\t<u>Reproduction and Distribution:</u> The right to reproduce, fix, publish, broadcast, distribute, and transfer the Works and Materials in any format.\n•\t<u>Adaptation:</u> The right to adapt the Works and Materials to meet the format requirements of Jamendo or its partners.\n•\t<u>Promotion:</u> The right to use the Works and Materials on any media to promote the Artist and Jamendo.\n•\t<u>Monetization:</u> The right to monetize Jamendo’s services by inserting advertisements, which may or may not provide remuneration to the Artists.\n\n--Artist Obligations--\nThe Artist guarantees that they are the sole right holder of the Work(s) or have the authority to represent and commit on behalf of all right holders. They confirm they hold sufficient rights to the Works and are not bound by any entity, including any collecting society, that would restrict granting rights to Jamendo or its Users.\n\nThe Artist commits to comply with these Terms of Use while their Works are published on Jamendo and not act against the rights of third parties, including Users, even after withdrawal of the Works. The Artist agrees to indemnify Jamendo against any claims from breaches of these obligations.\n\nThe Artist commits not to promote Jamendo’s competitors on the Services provided by Jamendo, including but not limited to Jamendo’s website, forums, chatting areas, and pages dedicated to Jamendo. To this end, Jamendo will request the Artist to sign a Certification reiterating key obligations contained in these Terms of Use when uploading Works.\n\n--Use of Artists\' Works--\nEach Work is available to Users under one of the Licenses provided by Jamendo. The selected License is indicated on the page dedicated to each Work by an icon or any other means. By clicking on this icon, you can find information about the terms and conditions under which the Artist and Jamendo allow you to use the Work. You agree and commit to use the Work in accordance with these Terms of Use and the License under which the Work has been published, and commit to respect and not to infringe any intellectual property rights held by Art
58ists.\n\nJamendo allows Artists and Users to embed a code, widget, and player on their blogs, personal websites, social network profiles, and other websites, enabling one or more Works to be played. This embedding and the distribution of the Works must comply with the provisions of the Licenses and these Terms of Use, as well as the guidelines of your hosting provider. You agree to indemnify and hold Jamendo harmless from and against any claims from third parties related to any complaints and/or action regarding the embedding and/or distribution of the Works.\n\n--Use of Jamendo Services--\nBy using Jamendo Services, you agree to act in good faith towards Jamendo, its Users, artists, and clients. You must not post inappropriate or abusive content. Specifically, you agree not to publish any content or information that:\n\n•\tMay directly or indirectly harm any third party (individual, entity, or group);\n•\tIs defamatory, insulting, obscene, immoral, offensive, or violent, or incites any type of political, racist, or xenophobic violence (whether physical, verbal, or psychological), and that violates any applicable laws;\n•\tContains personal information about another User or any third party without their explicit consent;\n•\tInfringes on the intellectual property rights of authors and/or other right holders, whether alone or in combination with other content;\n•\tUses technologies that disrupt, reduce, disrupt, or prevent the normal operation of the Services.\nYou also undertake not to infringe the intellectual property rights of the content you access through the Services. You are solely liable for the distribution of any text, information, data, hypertext links, music, sound recordings, photographs, drawings, videos, messages, tags, or any other Materials through the Services.\n\n--Compliance--\nIf a User fails to comply with any provisions of the Terms of Use, Jamendo may, without prior warning, take appropriate measures, including shutting down the User’s Account. Jamendo reserves its rights to initiate legal proceedings against the User and claim any damages it has suffered due to the User’s non-compliance with these Terms.\n\nIn the event of a claim, complaint, or legal action arising from a user\'s wrongful conduct that breaches these General Terms of Use, Jamendo may take action against the user or member responsible for the conduct.\n\n-7.\tDISCLAIMER-\n\nYOU ACKNOWLEDGE AND AGREE THAT THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE." TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, JAMENDO DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF (A) MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, (B) NON-INFRINGEMENT, (C) AVAILABILITY, QUALITY, OR PERFORMANCE OF THE MATERIALS, INFORMATION, GOODS, SERVICES, TECHNOLOGY, AND/OR CONTENT PROVIDED UNDER OR IN CONNECTION WITH THIS AGREEMENT, INCLUDING ANY LIMITATIONS ON USER ACCESS TO OR USE OF CONTENT, AND (D) THE PERFORMANCE OF COMPUTERS, TECHNOLOGY, AND/OR NETWORKS. YOU ALSO ACKNOWLEDGE THAT FREEDOM FROM PROGRAM ERRORS CANNOT BE GUARANTEED IN THE SOFTWARE INDUSTRY. NEITHER JAMENDO NOR ANY OTHER OWNER OF CONTENT WARRANTS THAT THE SERVICE IS FREE OF MALWARE OR OTHER HARMFUL COMPONENTS.\n\nJAMENDO RESERVES THE RIGHT TO MODIFY OR DISCONTINUE, TEMPORARILY OR PERMANENTLY, FUNCTIONS AND FEATURES OF THE SITE WITH OR WITHOUT NOTICE, AND SHALL HAVE NO LIABILITY TO YOU IF SUCH RIGHTS ARE EXERCISED. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES OR LIMITATIONS ON APPLICABLE STATUTORY RIGHTS OF A CONSUMER, SO THE EXCLUSIONS AND LIMITATIONS IN THIS SECTION MAY NOT APPLY TO YOU AND NOTHING WILL AFFECT YOUR STATUTORY RIGHTS.\n\n-8.\tPRIVACY-\n\nWe process personal data about you and your use of the Jamedo website and Services in accordance with our Privacy Notice and Cookie Policy, as applicable from time to time. Jamendo’s Privacy Notice and Cookie Policy applies to the use of Jamendo’s website and Services and is made part of these Terms of Use by reference. We encourage you to read our Privacy Policy [here](https://www.jamendo.com/legal/privacy).\n\n-9.\tINTELLECTUAL PROPERTY-\n\nJamendo holds all intellectual property rights related to the trademarks, patents, software, logos, graphics, photographs, and animations contained within the Services, excluding the intellectual property rights regarding the Works. These elements may not be reproduced without Jamendo\'s express consent.\n\nJamendo grants you a limited license to access, download, and reproduce these elements on any digital media for private and personal use only, within the framework of your use of the Services and for as long as you are registered for the Services.\n\nWhen you provide Jamendo with any content, excluding Works which are subject to specific treatment in these Terms of Use, you grant Jamendo a worldwide, royalty-free license for the duration of the publication of said content. This license allows Jamendo to reproduce, display, translate, digitize, use for advertising, commercial or non-commercial purposes, modify, and adapt all of the content for its Services. Jamendo is also authorized to grant these rights to any third party or partners, in accordance with these Terms of Use.\n\n-10.\tLIABILITY-\n\nTo the fullest extent permitted by applicable law, Jamendo and its affiliates, officers, directors, employees, agents, and partners shall not be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, resulting from:\n\n•\tYour use or inability to use the Services;\n•\tAny unauthorized access to or use of our servers and/or any personal information stored therein;\n•\tAny interruption or cessation of transmission to or from the Services;\n•\tAny bugs, viruses, trojan horses, or the like that may be transmitted to or through our Services by any third party;\n•\tAny errors or omissions in any content or for any loss or damage incurred as a result of the use of any content posted, emailed, transmitted, or otherwise made available through the Services.\n\n-11.\tINDEMNIFICATION-\n\nYou agree to defend, indemnify, and hold harmless Jamendo and its affiliates, officers, directors, employees, agents, and partners from and against any claims, liabilities, damages, losses, and expenses, including without limitation reasonable legal and accounting fees, arising out of or in any way connected with:\n\n•\tYour access to or use of the Services;\n•\tYour violation of these Terms of Service;\n•\tYour violation of any third-party right, including without limitation any intellectual property right, publicity, confidentiality, property, or privacy right;\n•\tAny claim that your content caused damage to a third party.\n\n-12.\tMONITORING-\n\nJamendo is under no obligation to monitor the content on its websites or any associated servers. If you encounter content on Jamendo that is clearly illegal or violates these Terms of Use, you can report it by emailing  [email protected] or by clicking the "Report abuse or copyrighted content" link found on the Works\' pages. For more information on how to report abuse, please visit the "Report Abuse" page.\n\n-13.\tSERVICES AND CONTENT PROVIDED BY THIRD PARTIES-\n\nJamendo\'s Services may include links to other websites, as well as services and content provided by third parties, such as but not limited to social network sharing buttons (e.g., Twitter and Facebook) and third-party payment solutions for donations to Artists (e.g., PayPal). Jamendo does not control these services, content, or the websites accessible via these links and is not liable for their use. By using these services, you agree to their respective terms of use, and Jamendo declines any liability arising from the use of such payment solutions.\n\n-14.\tEXPORT CONTROL AND SANCTIONS-\n\nJamendo products and services may be subject to export control and economic sanctions laws of Luxembourg, the US, and other jurisdictions. You agree to comply with all applicable trade control laws.\nYou warrant that you:\n\n1.\tAre not located in, organized under the laws of, or ordinarily resident in a sanctioned country or territory.\n2.\tAre not listed on any sanctions-related list of prohibited parties.\n\nYou agree not to use, sell, export, re-export, transfer, or dispose of any product, softw
58are, or technology from Jamendo in violation of any applicable trade control laws.\n\nJamendo reserves the right to restrict access to its services in sanctioned regions and may terminate or suspend your access if you violate this clause.\n\n-15.\tPROHIBITION OF TEXT AND DATA MINING-\n\nUsers are prohibited from using any content from Jamendo for commercial text and data mining purposes, including but not limited to machine learning, artificial intelligence, or any other automated data analysis techniques. Such unnauthorized use may result in legal action. Content from Jamendo may be used for research and scientific purposes, only for non-commercial use, under certain circumstances. We request that you seek prior written authorisation from Jamendo before using Jamendo content for such purposes. \n\n-16.\tTAKEDOWNS-\n\nIf you believe that any content on Jamendo.com infringes your intellectual property rights or violates any applicable laws, you may submit a takedown request. To do so, please provide the following information:\n\n1.\tIdentification of the content: A detailed description of the content you believe infringes your rights or violates the law.\n2.\tProof of ownership: Documentation or evidence demonstrating your ownership of the intellectual property rights in question.\n3.\tContact information: Your name, address, email address, and telephone number.\n4.\tStatement of good faith: A statement confirming that you believe in good faith that the use of the content is not authorized by the intellectual property owner, its agent, or the law.\n5.\tSignature: A physical or electronic signature of the intellectual property owner or a person authorized to act on their behalf.\n\nPlease send your takedown request to [email protected]. Upon receipt of a valid takedown request, Jamendo will promptly investigate and take appropriate action, which may include removing or disabling access to the infringing content.\n\n-17.\tSEVERABILITY-\n\nIf any provision of these Terms of Use is held to be invalid or unenforceable, the parties hereby agree that the remaining provisions shall remain valid and enforceable and that the Terms of Use will remain in full force and effect.\n\n-18.\tAPPLICABLE LAW-\n\nThese Terms of Use are governed by the laws of Luxembourg. Any dispute relating to their interpretation and/or execution shall be referred to the courts of Luxembourg. This does not affect any rights you may have as a consumer to bring a claim in the courts of your country of residence under applicable consumer protection laws.\n'});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/block/blockformatter",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BlockFormatter={rule:/<<<blockblock[0-9]+>>>/,format:function(e,r){return t.BlockFormatter._blockList[e]},isFullLine:!0,_blockList:{},_id:0,addBlock:function(e){var r="<<<blockblock"+ ++t.BlockFormatter._id+">>>";t.BlockFormatter._blockList[r]=e;return r}}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/block/quote/organization",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BlockQuoteOrganizationFormatter={id:"organization",formatter:function(e){var t=e.match(/```([\w\W]*)```/),r=(t[0],t[1]),n=r.split("\n"),i=(n.shift(),n.reduce(function(e,t){if(!t)return e;var r=t.split(":"),n=r[0],i=r.slice(1),o=i.join(":").trim();e[n]=o;return e},{})),o=["facebook","twitter","googleplus","instagram","linkedin"],a=o.map(function(e){if(e in i)return'<meta itemprop="sameAs" content="'+i[e]+'">'}).filter(Boolean).join("\n");return'<p itemscope itemtype="http://schema.org/Organization">
58\n                    <meta itemprop="url" content="'+i.website+'">\n                    <meta itemprop="logo" content="'+i.logo+'">\n                '+['<b itemprop="name">'+i.name+"</b>",'<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">\n                    <span itemprop="streetAddress">'+i.address+"</span>",'<span itemprop="postalCode">'+i.zipcode+'</span> <span itemprop="addressLocality">'+i.city+"</span>",'<span itemprop="addressCountry">'+i.country+"</span>\n                </span>","RCS n°: "+i.rcs,'TVA n°: <span itemprop="vatID">'+i.tva+"</span>"].join("\n<br>\n")+"\n                "+a+"\n                </p>"}}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/block/quote/index",["require","exports","./organization"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(e("./organization"))});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/block/blockquote",["require","exports","./blockformatter","./quote/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./blockformatter"),n=e("./quote/index"),i={};Object.keys(n).forEach(function(e){var t=n[e];i[t.id]=t});t.BlockQuote={rule:/```[\w\W]*?```/g,format:function(e,t){e=t.reduce(function(e,t){var n=t.match(/^```(.*)/),o=(n[0],n[1]);return o in i?e.replace(t,r.BlockFormatter.addBlock(i[o].formatter(t))):e},e);return e},isFullLine:!1}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/block/list",["require","exports","./blockformatter"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./blockformatter");t.List={rule:/^(\* (.+)$)/gm,format:function(e,n){for(var i,o=new RegExp(t.List.rule),a=[];i=o.exec(e);)a.push(i);var s,l=[];a.reduce(function(e,t){(-1===e||t.index-e>2)&&l.push(s=[]);s.push(t);return t.index+t[1].length},-1);l.forEach(function(t){var n=t.length-1;e=t.reduce(function(e,t,i){var o="";0===i&&(o+="<ul>\n");o+="<li>"+t[2]+"</li>";i===n&&(o+="\n</ul>");return e.replace(t[1],r.BlockFormatter.addBlock(o))},e)});return e},isFullLine:!1}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/line/anchor",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={rule:/^mailto\:/,converter:function(e,t){return'<a href="'+e+'">'+t+"</a>"}},n={rule:/.*/,converter:function(e,t,r){var n=e.match(/^(.*:)?\/\/([A-Za-z0-9\-\.]+)(:([0-9]+))?(.*)$/),i=(n[0],n[1]),o=n[2],a=(n[3],n[4]),s=(n[5],r.location);return i&&i!==s.protocol||o!==s.hostname||a!=s.port?'<a href="'+e+'" target="_blank">'+t+"</a>":'<a href="'+e+'">'+t+"</a>"}},i=[r,n];t.Anchor={rule:/\[.*?\]\(.*?\)/g,format:function(e,t,r){e=t.reduce(function(e,t){var n=t.match(/\[(.*)\]\((.*)\)/),o=(n[0],n[1]),a=n[2],s=i.find(function(e){return!!a.match(e.rule)});return s?e.replace(t,s.converter(a,o,r)):e},e);return e},isFullLine:!1}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/line/headtitle",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.HeadTitle={rule:/^(=+).*?(=+)$/,format:function(e,t){var r=t[1].length<t[2].length?t[1]:t[2],n=new RegExp("^"+r+"(.*?)"+r+"$"),i=Math.min(r.length,6);return e.replace(n,"<h"+i+">$1</h"+i+">")},isFullLine:!0}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/line/title",["require","exports"],e)}(function(e,t){"use strict";
58Object.defineProperty(t,"__esModule",{value:!0});t.Title={rule:/^(-+).*?(-+)$/,format:function(e,t){var r=t[1].length<t[2].length?t[1]:t[2],n=new RegExp("^"+r+"(.*?)"+r+"$");return r.length<2?e.replace(n,"<p><b>$1</b></p>"):e.replace(n,"<p><u>$1</u></p>")},isFullLine:!0}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/line/bold",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Bold={rule:/\*{2}(.*?)\*{2}/g,format:function(e,t){return t.reduce(function(e,t){return e.replace(t,"<b>"+t.replace(/\*{2}(.*?)\*{2}/,"$1")+"</b>")},e)},isFullLine:!1}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/line/italics",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Italics={rule:/\_{2}(.*?)\_{2}/g,format:function(e,t){return t.reduce(function(e,t){return e.replace(t,"<i>"+t.replace(/\_{2}(.*?)\_{2}/,"$1")+"</i>")},e)},isFullLine:!1}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/formatter/line/strikethrough",["require","exports"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Strikethrough={rule:/\~{2}(.*?)\~{2}/g,format:function(e,t){return t.reduce(function(e,t){return e.replace(t,"<del>"+t.replace(/\~{2}(.*?)\~{2}/,"$1")+"</del>")},e)},isFullLine:!1}});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/text/markdown/index",["require","exports","./formatter/block/blockformatter","./formatter/block/blockquote","./formatter/block/list","./formatter/line/anchor","./formatter/line/headtitle","./formatter/line/title","./formatter/line/bold","./formatter/line/italics","./formatter/line/strikethrough"],e)}(function(e,t){"use strict";function r(e,t){return f.reduce(function(e,r){var n=e.match(r.rule);if(n){return r.format(e,n,t)}return e},e).split("\n").map(function(e){if(!e.length)return"<br>";var r=!1;e=p.reduce(function(e,n){var i=e.match(n.rule);if(i){var o=n.format(e,i,t);r=r||n.isFullLine;return o}return e},e);return r?e:"<p>"+e+"</p>"}).join("\n")}Object.defineProperty(t,"__esModule",{value:!0});var n=e("./formatter/block/blockformatter"),i=e("./formatter/block/blockquote"),o=e("./formatter/block/list"),a=e("./formatter/line/anchor"),s=e("./formatter/line/headtitle"),l=e("./formatter/line/title"),u=e("./formatter/line/bold"),c=e("./formatter/line/italics"),d=e("./formatter/line/strikethrough"),p=[s.HeadTitle,u.Bold,c.Italics,d.Strikethrough,a.Anchor,l.Title,n.BlockFormatter],f=[o.List,i.BlockQuote];t.format=r});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/legal/tos",["require","exports","../../../library/view/loading","../../../library/utilities/user","../../../data/legal/tos","../../../library/text/markdown/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../library/utilities/user"),i=e("../../../data/legal/tos"),o=e("../../../library/text/markdown/index"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/legal/tos"};t.prototype.render=function(){var t=n.default.getUserLanguage(this.options.userData),r="fr"===t?"fr":"en";this.options.templateVariables.tosContent=o.format(i[r],this.options.userData);return e.prototype.render.call(this)};return t}(r.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/legal/privacy",["require","exports","../../../library/view/loading","../../../managers/manager","../../../library/utilities/user"],e)}(function(e,t){"use strict";
58Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../managers/manager"),i=e("../../../library/utilities/user"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/legal/privacy"};t.prototype.render=function(){var t=this,r=i.default.getUserLanguage(this.options.userData),o="fr"===r?"fr":"en";return n.LegalsManager.getByAttribute({id:"proprivacypolicy",lang:o},{userData:this.options.userData}).then(function(r){var n=r[0];t.options.templateVariables.privacyContent=n.get("content");n.close();return e.prototype.render.call(t)})};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/legal/creativeCommons",["require","exports","../../../library/view/loading"],e)
59}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/legal/creativeCommons"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/legal/index",["require","exports","underscore","../../../library/view/swipe","../../../library/utilities/route","./overview","./licenses","./tos","./privacy","./creativeCommons"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/swipe"),i=e("../../../library/utilities/route"),o=e("./overview"),a=e("./licenses"),s=e("./tos"),l=e("./privacy"),u=e("./creativeCommons"),c=function(e){function t(n,c){var d=this,p=n[0],f=n[1],h=n[2],m=n[3],y=n[4],g=n[5],v=n[6],_=n[7],b=n[8],w=n[9],x=n[10],M=n[11],S=n[12],k=n[13],T=n[14],A=[{metaTitle:p,metaDescription:f,metaKeywords:h,name:t.Views.Overview,titleKey:"_TKEY_WWW_LEGAL_overview-tab-title",viewClass:o.default,options:Object.assign({},c)}
59,{metaTitle:m,metaDescription:y,metaKeywords:g,name:t.Views.Licenses,titleKey:"_TKEY_WWW_LEGAL_licenses-tab-title",viewClass:a.default,options:Object.assign({},c)},{metaTitle:v,metaDescription:_,metaKeywords:b,name:t.Views.Tos,titleKey:"_TKEY_WWW_LEGAL_tos-tab-title",viewClass:s.default,options:Object.assign({},c)},{metaTitle:w,metaDescription:x,metaKeywords:M,name:t.Views.Privacy,titleKey:"_TKEY_WWW_LEGAL_privacy-tab-title",viewClass:l.default,options:Object.assign({},c)},{metaTitle:S,metaDescription:k,metaKeywords:T,name:t.Views.CreativeCommons,titleKey:"_TKEY_WWW_LICENSES_licenses-title",viewClass:u.default,options:Object.assign({},c)}];d=e.call(this,r.extend({},c,{swipeSelector:".js-swipe-container",swipeViews:A,prefix:i.default.getUrl("legal"),manageUrl:!0,isCircular:!1}))||this;return d}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/legal/index"};t.Views={Overview:"",Licenses:"licenses",Tos:"terms-of-use",Privacy:"privacy",CreativeCommons:"creative-commons"};return t}(n.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/legal/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../library/utilities/user","../../library/utilities/object","../../views/pages/legal/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../library/utilities/user"),s=e("../../library/utilities/object"),l=e("../../views/pages/legal/index"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){var r=this;e.prototype.create.call(this,t);if(!this.promise){var u=this.options.userData;this.promise=n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_legal-x-website","_TKEY_WWW_META_DESCRIPTION_legal","_TKEY_WWW_META_KEYWORDS_legal","_TKEY_WWW_META_TITLE_licenses-x-web
59site","_TKEY_WWW_META_DESCRIPTION_licenses-x-website","_TKEY_WWW_META_KEYWORDS_licenses","_TKEY_WWW_META_TITLE_terms-x-website","_TKEY_WWW_META_DESCRIPTION_terms-x-website","_TKEY_WWW_META_KEYWORDS_terms","_TKEY_WWW_META_TITLE_policy-x-website","_TKEY_WWW_META_DESCRIPTION_policy-x-website","_TKEY_WWW_META_KEYWORDS_policy","_TKEY_WWW_META_TITLE_creative-commons-x-website","_TKEY_WWW_META_DESCRIPTION_creative-commons","_TKEY_WWW_META_KEYWORDS_creative-commons","_TKEY_WWW_LEGAL_legal-title"],{userData:u}).then(function(e){var n=a.default.getUserLanguage(u),c=o.default.application.websiteName,d=e[0],p=e[1],f=e[2],h=e[3],m=e[4],y=e[5],g=e[6],v=e[7],_=e[8],b=e[9],w=e[10],x=e[11],M=e[12],S=e[13],k=e[14],T=e[15],A=i.default.strings.sprintf(d.get("translate"),c),E=p.get("translate"),P=f.get("translate"),O=i.default.strings.sprintf(h.get("translate"),c),j=i.default.strings.sprintf(m.get("translate"),c),D=y.get("translate"),C=i.default.strings.sprintf(g.get("translate"),c),L=i.default.strings.sprintf(v.get("translate"),c),I=_.get("translate"),R=i.default.strings.sprintf(b.get("translate"),c),Y=i.default.strings.sprintf(w.get("translate"),c),N=x.get("translate"),F=i.default.strings.sprintf(M.get("translate"),c),W=i.default.strings.sprintf(S.get("translate"),c),U=k.get("translate"),q=T.get("translate"),H=new l.default([A,E,P,O,j,D,C,L,I,R,Y,N,F,W,U],{currentView:r.options.subpage,templateVariables:{websiteName:c,language:n,licensingBaseUrl:"https://licensing.jamendo.com",catalogRouteUrl:"_TKEY_ROUTE_URL_PART_catalog",instoreRouteUrl:"_TKEY_ROUTE_URL_PART_in-store"},userData:u});r.listenToSwipe(H);var V=H.getTabMetaData();r.skeleton.setTitle(V.metaTitle);r.skeleton.setDescription(V.metaDescription);r.skeleton.setKeywords(V.metaKeywords);t.setHeader(q);t.addContent(H);s.closeModel(e);return t})}return this.promise};t.prototype.updateMetadata=function(e){this.skeleton.setTitle(e.metaTitle);this.skeleton.setDescription(e.metaDescription);this.skeleton.setKeywords(e.metaKeywords)};t.prototype.uniqueInstanceId=function(){return"_"};return t}(r.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/post/index",["require","exports","underscore","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/loading"),i=function(e){function t(t){return e.call(this,r.extend({templateVariables:{mode:"single"}},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/post/index"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/post/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","FSPromise","../../views/pages/post/index","../../library/utilities/object"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("FSProm
59ise"),s=a.FSPromise,l=e("../../views/pages/post/index"),u=e("../../library/utilities/object"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){if(!this.promise){var t=this.options.userData,r=[];r.push(n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_wallpost-x-username-x-item-x-website","_TKEY_WWW_META_DESCRIPTION_wallpost-x-post","_TKEY_WWW_META_KEYWORDS_wallpost","_TKEY_WWW_WALLPOST_page-title"],{userData:t}));r.push(n.PostsManager.get(this.options.id,{userData:t}));this.promise=s.all(r).then(function(r){var a=r[0],c=r[1],d=a[0],p=a[1],f=a[2],h=a[3],m=c[0],y=[];y.push(n.UserManager.get(m.get("authorId"),{userData:t}));y.push(n.LocalizationManager.get("_TKEY_WWW_POST_item_"+m.get("category"),{userData:t}));s.all(y).then(function(r){var n=r[0],s=r[1],c=n[0],y=s[0];e.setTitle(i.default.strings.sprintf(d.get("translate"),c.get("dispname"),y.get("translate"),o.default.application.websiteName));e.setDescription(i.default.strings.sprintf(p.get("translate"),y.get("translate")));e.setKeywords(f.get("translate"));e.setHeader(i.default.strings.sprintf(h.get("translate"),c.get("dispname"),y.get("translate")));e.addContent(new l.default({model:m,userData:t}));u.closeModel(a);u.closeModel(n);u.closeModel(s);return e})})}return this.promise};return t}(r.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/radios/index",["require","exports","../../../library/view/loading","../../../managers/manager"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../managers/manager"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/radios/index"};t.prototype.render=function(){var t=this;return n.RadiosManager.getByAttribute({},{userData:this.options.userData,dataParameters:{limit:200}}).then(function(r){t.collection.set(r);return e.prototype.render.call(t)})};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/radios/radios",["require","exports","../../library/controller/pageController","ribsjs","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../library/utilities/route","../../library/utilities/image","../../library/utilities/object","../../views/pages/radios/index","../../views/partials/radios/item"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("ribsjs"),i=e("../../managers/manager"),o=e("../../vendor/phpjs/phpjs"),a=e("../../configuration/configuration"),s=e("../../library/utilities/route"),l=e("../../library/utilities/image"),u=e("../../library/utilities/object"),c=e("../../views/pages/radios/index"),d=e("../../views/partials/radios/item"),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){if(!this.promise){var t=this.options.userData;this.promise=i.LocalizationManager.get(["_TKEY_WWW_META_TITLE_radios-x-website","_TKEY_WWW_META_DESCRIPTION_radios-x-website","_TKEY_WWW_META_KEYWORDS_radios","_TKEY_WWW_RADIO_header-title"],{userData:t}).then(function(r){var i=r[0],p=r[1],f=r[2],h=r[3],m=s.default.getUrl("radios"),y=o.default.strings.sprintf(i.get("translate"),a.default.application.websiteName),g=o.default.strings.sprintf(p.get("translate"),a.default.application.websiteName),v=f.get("translate"),_=h.get("translate");e.setTitle(y);e.setDescription(g);e.setKeywords(v);e.setHeader(_);
59e.setOpenGraph({app_id:a.default.application.facebookAppId,url:m,title:y,image:l.default.getImageUrl("jamendomusic/radios/radio-bestof-hero-xl.jpg"),site_name:a.default.application.websiteName,description:g,type:"website",locale_alternate:a.default.application.getLocales()});e.setCanonicalUrl(m);u.closeModel(r);var b=new c.default({listSelector:".js-radios-list-selector",collection:new n.Collection([]),ModelView:d.default,userData:t});e.addContent(b);return e})}return this.promise};return t}(r.default);t.default=p});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/utilities/css",["require","exports"],e)}(function(e,t){"use strict";function r(e){return Object.keys(e).filter(function(t){return e[t]}).join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){e[e.AND=0]="AND";e[e.OR=1]="OR"}(n=t.CSSClassOperator||(t.CSSClassOperator={}));var i=function(){function e(){this.list={}}e.prototype.setClass=function(e,t,r){void 0===r&&(r=n.OR);if(r===n.AND){e in this.list||(this.list[e]=!0);this.list[e]=this.list[e]&&t}else this.list[e]=this.list[e]||t;return this};e.prototype.setClasses=function(e,t){var r=this;void 0===t&&(t=n.OR);Object.keys(e).map(function(n){r.setClass(n,e[n],t)});return this};e.prototype.compute=function(){return this.toString()};e.prototype.toString=function(){return r(this.list)};return e}();t.CSSClass=i;t.computeClass=r;t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/search/category",["require","exports","ribsjs","../../../vendor/phpjs/phpjs","../../../library/utilities/display","../../../library/utilities/route","chrisweb-utilities","../../../library/utilities/object","../../../library/view/scroll","../../components/search/form","../../layout/player","../../partials/tracks/item","../../../stats/search"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../../vendor/phpjs/phpjs"),o=e("../../../library/utilities/display"),a=e("../../../library/utilities/route"),s=e("chrisweb-utilities"),l=e("../../../library/utilities/object"),u=e("../../../library/view/scroll"),c=e("../../components/search/form"),d=e("../../layout/player"),p=e("../../partials/tracks/item"),f=e("../../../stats/search"),h=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.events=function(){return Object.assign(e.prototype.events.call(this),{"mousemove .js-search-item.js-search-item-link":"onMoveSeeAll"})};t.prototype.onMoveSeeAll=function(e){n.trigger(c.default.Event.MoveSelect,$(e.currentTarget))};t.prototype.getTemplateId=function(){return"/partials/search/category"+(this.options.style||t.Style.Normal)};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.currentQuery="";this.sourceCollection=new r.Collection([]);if(this.model.get("fullMode")){this.options.callback=this.onGetMoreRow.bind(this);this.model.set({searchItems:this.sourceCollection},{silent:!0})}s.utilities.isClient()&&c.default.Instance&&this.onSearchFormResult(c.default.Instance.currentSearchResult);this.collection=this.sourceCollection.getRange(0,this.options.maxEntitiesCount);this.listenTo(this.collection,"update",this.onUpdateCollection.bind(this));this.listenTo(this.collection,"reset",this.onUpdateCollection.bind(this));n.on(c.default.Event.Reset,this.onSearchFormReset,this);n.on(c.default.Event.Result,this.onSearchFormResult,this);n.on(c.default.Event.Update,this.onSearchFormUpdate,this);n.on(f.Events.Update,this.onSearchStatsUpdate,this)};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.onUpdateCollection()};t.prototype.onGetMoreRow=function(e){this.collection.length+e.length>=this.sourceCollection.length&&n.trigger(c.default.Event.SearchMore,{limit:this.options.entitiesPerRequest,offset:this.sourceCollection.length});return Promise.resolve(e)};t.prototype.onUpdateCollection=function(){if(this.collection.length){this.$el.removeClass("empty");this.collection.collectionSource.length>this.options.maxEntitiesCount?this.$(".js-search-item.js-search-item-link:not(.js-search-back)").each(function(e,t){t.style.display=null}):this.$(".js-search-item.js-search-item-link:not(.js-search-back)").hide()}else this.model.get("fullMode")?this.$(".js-search-not-empty").hide():this.$el.addClass("empty")};t.prototype.onSearchFormResult=function(e){if(e){var t=e.query;if(t!==this.currentQuery){this.resetItem();this.currentQuery=t;this.updateMoreUrl(t)}switch(this.options.entityType){case o.default.EntityType.Track:if(e.tracks.length){var r="search-tracks-"+t;this.listener=r;this.options.entityType=o.default.EntityType.Track;this.options.ModelViewOptions.listTitle=i.default.strings.sprintf(this.options.translateTitleQuery.get("translate"),t);this.options.ModelViewOptions.originId=r;this.options.ModelViewOptions.href=a.default.getUrl("search")+"?q="+t}this.sourceCollection.add(e.tracks.map(function(t){return Object.assign({selected:t.attributes.type+"_"+t.attributes.id===e.currentSelection},t.attributes)}));break;case o.default.EntityType.Album:this.sourceCollection.add(e.albums.map(function(t){return Object.assign({selected:t.attributes.type+"_"+t.attributes.id===e.currentSelection},t.attributes)}));break;
59case o.default.EntityType.Artist:this.sourceCollection.add(e.artists.map(function(t){return Object.assign({selected:t.attributes.type+"_"+t.attributes.id===e.currentSelection},t.attributes)}));break;case o.default.EntityType.Tag:this.sourceCollection.add(e.tags.map(function(t){return Object.assign({selected:t.type+"_"+t.idstr===e.currentSelection},t)}))}}};t.prototype.resetItem=function(){this.sourceCollection.reset();this.collection.reset()};t.prototype.updateMoreUrl=function(e){var t={};e&&(t.q=e);var r=this.model.get("fullMode")?{}:{type:this.model.get("type")};this.model.set("moreUrl",a.default.getUrl("search",r,t))};t.prototype.onSearchFormReset=function(e){this.resetItem()};t.prototype.onSearchFormUpdate=function(e){if(e!==this.currentQuery){this.resetItem();this.updateMoreUrl(e)}};t.prototype.onSearchStatsUpdate=function(e){this.sourceCollection.each(function(t){t.set({custom:{searchResultId:e}},{silent:!0})})};t.prototype.notifyPlayer=function(){!this.isClose&&s.default.isClient()&&this.sourceCollection.length&&d.default.trigger(d.default.Event.QUEUE,{type:p.default.TrackItemType.VirtualList,id:this._listener,collection:this.sourceCollection})};Object.defineProperty(t.prototype,"listener",{set:function(e){this._listener&&n.off(this._listener,this.notifyPlayer,this);this._listener=e;e&&n.on(this._listener,this.notifyPlayer,this)},enumerable:!0,configurable:!0});t.prototype.close=function(){this.listener=null;this.stopListening(this.collection,"update");this.stopListening(this.collection,"reset");n.off(c.default.Event.Reset,this.onSearchFormReset,this);n.off(c.default.Event.Result,this.onSearchFormResult,this);n.off(c.default.Event.Update,this.onSearchFormUpdate,this);n.off(f.Events.Update,this.onSearchStatsUpdate,this);if(this.sourceCollection){l.closeModel(this.sourceCollection.models);this.sourceCollection=null}e.prototype.close.call(this)};t.Style={Normal:"",Tag:"-tag"};return t}(u.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/search/empty",["require","exports","../../../library/view/view","ribsjs","../../components/search/form"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/view"),n=e("ribsjs"),i=n.EventsManager,o=e("../../components/search/form"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/search/empty"};t.prototype.events=function(){return{"click .js-clear-search":"onResetForm"}};t.prototype.onResetForm=function(e){i.trigger(o.default.Event.Reset)};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);i.on(o.default.Event.Update,this.onSearchFormUpdate,this);i.on(o.default.Event.Result,this.onSearchFormResult,this)};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$el.hide()};t.prototype.onSearchFormResult=function(e,t){void 0===t&&(t=!1);if(t||e.isProcessing)return this.$el.hide();!Object.keys(e).find(function(t){return e[t]instanceof Array&&e[t].length>0})?this.$el.show():this.$el.hide()};t.prototype.onSearchFormUpdate=function(e){this.$el.hide()};t.prototype.close=function(){i.off(o.default.Event.Result,this.onSearchFormResult,this);i.off(o.default.Event.Update,this.onSearchFormUpdate,this);e.prototype.close.call(this)};return t}(r.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/search/item",["require","exports","ribsjs","../../components/search/form","../../../library/view/loading"],e)}(function(e,t){"use strict";
59Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../components/search/form"),o=e("../../../library/view/loading"),a=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.events=function(){return{click:"onClick",mousemove:"onMove"}};t.prototype.onMove=function(){n.trigger(i.default.Event.MoveSelect,this.$el)};t.prototype.onClick=function(){n.trigger(i.default.Event.Select,this.$el)};t.prototype.getTemplateId=function(){return"/partials/search/item"+(this.options.style||t.Style.Normal)};t.Style={Normal:"",Artist:"-artist",Tag:"-tag"};return t}(o.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/search/index",["require","exports","underscore","ribsjs","jquery","../../../library/view/loading","../../../managers/manager","../../layout","../../../configuration/configuration","FSPromise","../../../library/model/model","../../../library/collection/collection","../../../library/utilities/display","../../../library/utilities/route","../../../library/utilities/css","../../partials/search/category","../../partials/search/empty","../../components/search/form","../../partials/tracks/item","../../partials/search/item","../../partials/dynamicList/index","chrisweb-utilities"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("jquery"),o=n.EventsManager,a=e("../../../library/view/loading"),s=e("../../../managers/manager"),l=e("../../layout"),u=e("../../../configuration/configuration"),c=e("FSPromise"),d=c.FSPromise,p=e("../../../library/model/model"),f=e("../../../library/collection/collection"),h=e("../../../library/utilities/display"),m=e("../../../library/utilities/route"),y=e("../../../library/utilities/css"),g=e("../../partials/search/category"),v=e("../../partials/search/empty"),_=e("../../components/search/form"),b=e("../../partials/tracks/item"),w=e("../../partials/search/item"),x=e("../../partials/dynamicList/index"),M=e("chrisweb-utilities"),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/search/index"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.moveStack=new Map;this.currentY=this.currentX=0;Object.assign(this.options.templateVariables,{lang:this.options.userData.cookie.get(u.default.cookies.lang.name)});this.showOrHideViewportScrollbar();if(M.utilities.isClient()){this.windowResizeListener=this.windowResizeListener||r.debounce(this.handleWindowResize.bind(this),300,!1);i(window).on("resize",this.windowResizeListener);i(document).on("keydown",this.onGlobalKeyDown=this.onGlobalKeyDown.bind(this))}o.on(_.default.Event.Update,this.updateDisplayAlternatives,this);o.on(_.default.Event.Move,this.onMoveSearchItem,this);o.on(_.default.Event.MovePage,this.onMovePageSearchItem,this);o.on(_.default.Event.MoveSelect,this.onMoveSelectSearchItem,this);o.on(_.default.Event.Select,this.onSelectSearchItem,this);o.on(_.default.Event.FocusInput,this.onFocusInput,this)};t.prototype.onGlobalKeyDown=function(e){l.default.getHeaderInstance().getSearchInstance().$searchInput.is(":focus")||l.default.getInstance().hasOverlays()||o.trigger(_.default.Event.Focus,e)};t.prototype.render=function(){var r=this,n=this.options.userData,i=(this.model.get("params"),this.model.get("language")),o={userData:n,listSelector:".js-search-category-content",maxEntitiesCount:this.options.type?Number.POSITIVE_INFINITY:u.default.controller.search.countElementsPerCategory,idList:"searchItems",entitiesPerRequest:h.default.getMaxEntitiesCount("Search",!1)},a=new v.default({userData:n});this.addView(".js-search-category",a);var l=new g.default(Object.assign({ModelView:w.default,ModelViewOptions:{userData:n,templateVariables:{templateStyle:"noCover",context:"SEARCHPAGE"},style:w.default.Style.Tag,reRenderOnChange:!0},model:new p.default({title:"_TKEY_WWW_EXPLORE_COMMUNITIES_sub-page-tab",moreText:"communities",moreUrl:"",noMoreButton:!0,templateStyle:"community"}),style:g.default.Style.Tag,entityType:h.default.EntityType.Tag},o,{maxEntitiesCount:Number.POSITIVE_INFINITY}));this.addView(".js-search-category",l);if(!this.options.type||this.options.type===t.Type.Artists){var c=this.options.type===t.Type.Artists,y=c?{}:{type:t.Type.Artists},_=new g.default(Object.assign({ModelView:w.default,ModelViewOptions:{userData:n,templateVariables:{context:"SEARCHPAGE"},style:w.default.Style.Artist,fromId:"artists"+(this.options.type?"-full":""),reRenderOnChange:!0},model:new p.default({title:"_TKEY_WWW_GENERIC_artists",type:t.Type.Artists,moreUrl:m.default.getUrl("search",y,this.model.get("params")),fullMode:c,templateStyle:"artist"}
59),reRenderOnChange:!0,entityType:h.default.EntityType.Artist},o));this.addView(".js-search-category",_)}if(!this.options.type||this.options.type===t.Type.Tracks){var c=this.options.type===t.Type.Tracks,y=c?{}:{type:t.Type.Tracks},M=new g.default(Object.assign({ModelView:w.default,ModelViewOptions:{userData:n,templateVariables:{context:"SEARCHPAGE"},type:b.default.TrackItemType.VirtualList,subviewAsyncRender:!0,fromId:"tracks"+(this.options.type?"-full":""),reRenderOnChange:!0},model:new p.default({title:"_TKEY_WWW_GENERIC_songs",type:t.Type.Tracks,moreUrl:m.default.getUrl("search",y,this.model.get("params")),fullMode:c,templateStyle:"track"}),reRenderOnChange:!0,translateTitleQuery:this.options.translateTitleQuery,entityType:h.default.EntityType.Track},o));this.addView(".js-search-category",M)}if(!this.options.type||this.options.type===t.Type.Albums){var c=this.options.type===t.Type.Albums,y=c?{}:{type:t.Type.Albums},S=new g.default(Object.assign({ModelView:w.default,ModelViewOptions:{userData:n,templateVariables:{context:"SEARCHPAGE"},subviewAsyncRender:!0,fromId:"albums"+(this.options.type?"-full":""),reRenderOnChange:!0},model:new p.default({title:"_TKEY_WWW_GENERIC_albums",type:t.Type.Albums,moreUrl:m.default.getUrl("search",y,this.model.get("params")),fullMode:c,templateStyle:"album"}),reRenderOnChange:!0,entityType:h.default.EntityType.Album},o));this.addView(".js-search-category",S)}var k=[{name:"pop"},{name:"electronic"},{name:"rock"},{name:"dubstep"},{name:"hiphop"},{name:"jazz"},{name:"country"},{name:"ambient"},{name:"dance"},{name:"house"},{name:"rap"},{name:"folk"},{name:"blues"},{name:"reggae"},{name:"lounge"}],T=[{name:"instrumental"},{name:"happy"},{name:"piano"},{name:"epic"},{name:"corporate"},{name:"soundtrack"},{name:"sad"},{name:"summer"},{name:"travel"},{name:"sport"},{name:"cinematic"},{name:"love"},{name:"guitar"},{name:"relax"},{name:"ukulele"}],A={lang:i},E=new f.default,P=new x.default({collection:E,userData:n,loadingStyle:{block:!0},templateVariables:{listTitleKey:"_TKEY_WWW_SEARCH_homepage-search-title-genre",moreTitleKey:"_TKEY_WWW_GENERIC_more-communities",moreUrl:{urlName:"explore",subpage:"communities"},style:"full",displayMore:"hidden"},ModelViewOptions:{templateVariables:{templateStyle:"noCover",style:"brand"},directSearch:!1},entityType:h.default.EntityType.Tag}),O=new f.default,j=new x.default({collection:O,userData:n,loadingStyle:{block:!0},templateVariables:{listTitleKey:"_TKEY_WWW_SEARCH_homepage-search-title-mood",moreTitleKey:"_TKEY_WWW_GENERIC_more-communities",moreUrl:{urlName:"explore",subpage:"communities"},style:"full",displayMore:""},ModelViewOptions:{templateVariables:{templateStyle:"noCover",style:"brand"},directSearch:!1},entityType:h.default.EntityType.Tag}),D=[];D.push(s.TagsManager.getByAttribute(k,{dataParameters:A,userData:n}).then(function(e){E.set(e);r.addView("#js-search-communitiesList",P)}));D.push(s.TagsManager.getByAttribute(T,{dataParameters:A,userData:n}).then(function(e){O.set(e);r.addView("#js-search-communitiesList",j)}));return d.all(D).then(function(){return e.prototype.render.call(r)})};t.prototype.onRender=function(){var t=this
60;e.prototype.onRender.call(this);var r=this.model.get("params");this.updateDisplayAlternatives(this.hasHadSearchQueryDuringFirstRender()?r.q:"");var n=this.$(".js-search-category");if(M.utilities.isClient()){var i=function(){if(!t.isClose){if(!n.is(":visible"))return setTimeout(i,16);t.searchResultObserver=new MutationObserver(function(e){e.find(function(e){return!!e.addedNodes.length||!!e.removedNodes.length})&&t.reloadGrid()});t.searchResultObserver.observe(n[0],{attributes:!1,childList:!0,characterData:!1,subtree:!0});t.reloadGrid(!0)}};i()}};t.sortGrid=function(e,t){return parseInt(e)-parseInt(t)};t.getClosestCoord=function(e,t,r){void 0===r&&(r=10);var n=e.find(function(e){return Math.abs(e-t)<r});if(void 0===n){e.push(t);return t}return n};t.prototype.reloadGrid=function(e){var r=this;void 0===e&&(e=!1);if(l.default.getHeaderInstance().mobileMode){this.grid=[];this.gridPosition=[]}else{e&&this.$(".js-search-item.highlight");var n=(this.getCurrentSearchItem(),{}),o=[],a=[];this.$(".js-search-item:visible").each(function(e,r){var s=i(r),l=s.offset(),u=t.getClosestCoord(o,Math.floor(l.left),30),c=t.getClosestCoord(a,Math.floor(l.top),30);c in n||(n[c]={});n[c][u]=s;s.removeClass("selected highlight")});this.gridPosition=[];var s=-1;this.grid=Object.keys(n).sort(t.sortGrid).map(function(e){++s;r.gridPosition.push([]);return Object.keys(n[e]).sort(t.sortGrid).map(function(t){r.gridPosition[s].push({x:parseInt(t),y:parseInt(e)});return n[e][t]})});this.moveStack&&this.moveStack.clear()}};t.prototype.getCurrentSearchItem=function(){return this.grid&&this.grid[this.currentY]&&this.grid[this.currentY][this.currentX]?this.grid[this.currentY][this.currentX]:i()};t.prototype.getCurrentSearchItemPosition=function(){return this.gridPosition&&this.gridPosition[this.currentY]&&this.gridPosition[this.currentY][this.currentX]?this.gridPosition[this.currentY][this.currentX]:{x:0,y:0}};t.prototype.selectCurrentSearchItem=function(){var e=this.getCurrentSearchItem();e.addClass(y.computeClass({highlight:!0,selected:!l.default.getHeaderInstance().getSearchInstance().$el.hasClass("highlight")}));if(e.length&&M.utilities.isClient()){var t=e.position().top-window.scrollY,r=t+e.height(),n=i(window).height(),a=l.default.getHeaderInstance().$el.height();r>n?window.scrollBy(0,r-n):t<a&&window.scrollBy(0,t-a)}o.trigger(_.default.Event.SelectTerm,e)};t.prototype.onMovePageSearchItem=function(e,t){void 0===t&&(t=!1);if(this.grid){var r=0;
60this.grid.forEach(function(e){if(0!==e.length){var t=e[0],n=t.position().top-window.scrollY,o=n+t.height(),a=i(window).height(),s=l.default.getHeaderInstance().$el.height();o<a&&n>s&&++r}});this.onMoveSearchItem({x:0,y:r*e},t,!0)}};t.prototype.getMoveStackTarget=function(e,t,r,n){for(;t;){if(!this.moveStack.has(e))return null;var i=this.moveStack.get(e);if(t>0){if(!i[r]){e=null;return null}e=i[r];--t}else if(t<0){if(!i[n]){e=null;return null}e=i[n];++t}}return e};t.prototype.onMoveSearchItem=function(e,t,r){var n=this;void 0===t&&(t=!1);void 0===r&&(r=!1);var i,o=this.getCurrentSearchItem().removeClass("selected highlight");e.y?i=this.getMoveStackTarget(o,e.y,"down","up"):e.x&&(i=this.getMoveStackTarget(o,e.x,"right","left"));if(i)this.onMoveSelectSearchItem(i);else{var a=this.getCurrentSearchItemPosition();if(e.y){this.currentY+=e.y;if(this.grid.length<=this.currentY)if(r)this.currentY=this.grid.length-1;else{l.default.getHeaderInstance().getSearchInstance().$el.focus();l.default.getHeaderInstance().getSearchInstance().$el.addClass("highlight");this.currentY=0}else if(this.currentY<0)if(t&&!r)this.currentY=Math.max(0,this.grid.length-1);else{this.currentY=0;l.default.getHeaderInstance().getSearchInstance().$el.focus();l.default.getHeaderInstance().getSearchInstance().$el.addClass("highlight")}this.currentX=0;if(this.grid[this.currentY]){var s=a.x,u=Number.POSITIVE_INFINITY;this.gridPosition[this.currentY].forEach(function(e,t){var r=e.x,i=s-r,o=Math.abs(i<0?i+i:i);if(o<u){u=o;n.currentX=t}})}}if(this.grid[this.currentY]&&e.x){this.currentX+=e.x;this.grid[this.currentY].length<=this.currentX?this.currentX=0:this.currentX<0&&(this.currentX=Math.max(0,this.grid[this.currentY].length-1))}var c=this.getCurrentSearchItem();if(c[0]!==o[0]&&1===Math.abs(e.x+e.y)){this.moveStack.has(c)||this.moveStack.set(c,{});var d=this.moveStack.get(c);e.y>0?d.up=o:e.y<0?d.down=o:e.x>0?d.left=o:e.x<0&&(d.right=o)}this.selectCurrentSearchItem()}};t.prototype.onMoveSelectSearchItem=function(e,t){var r=this;void 0===t&&(t=!1);var n=this.getCurrentSearchItem();if((t||n[0]!==e[0]||!e.hasClass("selected"))&&this.grid&&!l.default.getHeaderInstance().mobileMode){n.removeClass("selected highlight");t||l.default.getHeaderInstance().getSearchInstance().$el.removeClass("highlight");var i=Object.keys(this.grid).find(function(t){var n=Object.keys(r.grid[t]).find(function(n){return r.grid[t][n][0]===e[0]});if(void 0!==n){r.currentX=parseInt(n);return!0}});this.currentY=void 0!==i?parseInt(i):this.currentX=0;this.selectCurrentSearchItem()}};t.prototype.onSelectSearchItem=function(e){var t=e||this.getCurrentSearchItem();if(t.length){var r=t.find(".js-search-item-link").add(t.filter(".js-search-item-link"));if(r.length)o.trigger("navigate",{url:r.attr("href")});else{var n=t.find("[data-search-item-term]"),i=n.data("searchItemTerm"),a=n.text();o.trigger(_.default.Event.AddTerm,{term:a,type:i},!0,!!e)}}};t.prototype.onFocusInput=function(e){e?this.getCurrentSearchItem().removeClass("selected"):this.getCurrentSearchItem().addClass("selected")};t.prototype.updateDisplayAlternatives=function(e){if(!this.isClose){var t=this.hasSearchQueryNow(e);this.showOrHideViewportScrollbar(t);t?this.$el.removeClass("no-query"):this.$el.addClass("no-query")}};t.prototype.handleWindowResize=function(){this.reloadGrid();if(!this.hasHadSearchQueryDuringFirstRender()){this.showOrHideViewportScrollbar();window.scrollTo(0,0)}};t.prototype.hasSearchQueryNow=function(e){return"string"==typeof e&&e.length>0};t.prototype.hasHadSearchQueryDuringFirstRender=function(){var e=this.model.get("params");return"q"in e&&void 0!==e.q&&e.q.length>0};t.prototype.hasHiddenViewportScrollbar=function(){return void 0!==t.hideScrollbarToken&&null!==t.hideScrollbarToken};t.prototype.showOrHideViewportScrollbar=function(e){void 0===e&&(e=this.hasHadSearchQueryDuringFirstRender());e?this.showViewportScrollbar():window.innerWidth<992?this.showViewportScrollbar():this.hideViewportScrollbar()};t.prototype.showViewportScrollbar=function(){if(this.hasHiddenViewportScrollbar()){l.default.getInstance().showScrollbar({hidingToken:t.hideScrollbarToken});
60t.hideScrollbarToken=void 0}};t.prototype.hideViewportScrollbar=function(){this.hasHiddenViewportScrollbar()||(t.hideScrollbarToken=l.default.getInstance().hideScrollbar())};t.prototype.close=function(){o.off(_.default.Event.Update,this.updateDisplayAlternatives,this);o.off(_.default.Event.Move,this.onMoveSearchItem,this);o.off(_.default.Event.MovePage,this.onMovePageSearchItem,this);o.off(_.default.Event.MoveSelect,this.onMoveSelectSearchItem,this);o.off(_.default.Event.Select,this.onSelectSearchItem,this);o.off(_.default.Event.FocusInput,this.onFocusInput,this);this.showViewportScrollbar();if(M.utilities.isClient()){this.windowResizeListener&&i(window).off("resize",this.windowResizeListener);i(document).off("keydown",this.onGlobalKeyDown)}if(this.searchResultObserver){this.searchResultObserver.disconnect();this.searchResultObserver=null}if(this.moveStack){this.moveStack.clear();this.moveStack=null}e.prototype.close.call(this)};t.Type={Albums:"albums",Artists:"artists",Playlists:"playlists",Tracks:"tracks",Users:"users"};return t}(a.default);t.default=S});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/search/index",["require","exports","underscore","../../library/controller/pageController","../../library/model/model","ribsjs","../../configuration/configuration","../../managers/manager","../../vendor/phpjs/phpjs","../../library/error/error","chrisweb-utilities","../../library/utilities/route","../../library/utilities/user","../../views/pages/search/index","../../views/components/search/form"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../library/controller/pageController"),i=e("../../library/model/model"),o=e("ribsjs"),a=o.EventsManager,s=e("../../configuration/configuration"),l=e("../../managers/manager"),u=e("../../vendor/phpjs/phpjs"),c=e("../../library/error/error"),d=e("chrisweb-utilities"),p=e("../../library/utilities/route"),f=e("../../library/utilities/user"),h=e("../../views/pages/search/index"),m=e("../../views/components/search/form"),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var r=this;if(!this.promise){var n=this.options.userData;this.promise=l.LocalizationManager.get(["_TKEY_WWW_META_TITLE_search-x-website","_TKEY_WWW_META_TITLE_search-x-keyword-x-website","_TKEY_WWW_META_KEYWORDS_search","_TKEY_WWW_META_KEYWORDS_search-keyword","_TKEY_WWW_META_DESCRIPTION_search","_TKEY_WWW_SEARCH_page-title","_TKEY_WWW_SEARCH_KEYWORD_page-title"],{userData:n}).then(function(o){var l=o[0],y=o[1],g=o[2],v=o[3],_=o[4],b=o[5],w=o[6],x=p.default.getParams(r.options.url);if(r.options.type&&!t.TypeList.includes(r.options.type)){var M=p.default.getUrl("search");
60throw new c.default(r.errorDefinitions.MOVED_PERMANENTLY.message,{newUrl:M})}if(x.q)try{x.q=r.sanitizeQuery(decodeURI(x.q))}catch(e){x.q=""}else if(x.qs){var S=p.default.getParams(r.options.url.replace(/qs=/g,""));if(void 0!==S.q)try{x.q=r.sanitizeQuery(decodeURI(S.q))}catch(e){x.q=""}}else if(""!==window.location.search){var k=p.default.getParams(window.location.search);if(void 0!==k.q)try{x.q=r.sanitizeQuery(decodeURI(k.q))}catch(e){x.q=""}}var T=d.default.isClient()?r.router.getCurrentRoute():"";T&&(T=T.split("?")[0]);var A=f.default.getUserLanguage(n);r.searchView=new h.default({userData:n,model:new i.default({language:A,params:x}),translateTitleQuery:w,type:r.options.type});e.addContent(r.searchView);var E=function(t){if(t&&t.length>0){e.setTitle(u.default.strings.sprintf(y.get("translate"),t,s.default.application.websiteName));e.setDescription(_.get("translate"));e.setKeywords(v.get("translate"));e.setHeader(u.default.strings.sprintf(w.get("translate"),t))}else{e.setTitle(u.default.strings.sprintf(l.get("translate"),s.default.application.websiteName));e.setDescription(_.get("translate"));e.setKeywords(g.get("translate"));e.setHeader(u.default.strings.sprintf(b.get("translate"),s.default.application.websiteName))}};r.onQueryCallback=r.onQuery(E).bind(r);a.on(m.default.Event.Update,r.onQueryCallback);a.on(m.default.Event.Reset,r.onQueryCallback);a.on(m.default.Event.Result,r.onResult,r);if("q"in x&&void 0!==x.q&&x.q.length>0){E(x.q);a.trigger(m.default.Event.Search)}else E("");return e})}return this.promise};t.prototype.onQuery=function(e){var t=this;return function(r){e(r);if(d.default.isClient()){var n={};r&&(n.q=r);var i={};t.options.type&&(i.type=t.options.type);var o=p.default.getUrl("search",i,n);t.router.navigate(o,{trigger:!1,silent:!1,replace:!0})}}};t.prototype.onResult=function(e){a.trigger("STATS:SEARCH:QUERY",{query:e.query})};t.prototype.sanitizeQuery=function(e){var t="";if(-1!==e.indexOf("tags_idstr")){var n=e.match(/"((?:\\.|[^"\\])*)"/);null!==n&&(t=n[1].replace(/_/g," "))}else t=e.replace(/_/g," ");t=r.escape(t);return t.trim()};t.prototype.clear=function(){a.off(m.default.Event.Update,this.onQueryCallback);a.off(m.default.Event.Reset,this.onQueryCallback);a.off(m.default.Event.Result,this.onResult,this);e.prototype.clear.call(this)};t.TypeList=Object.values(h.default.Type);return t}(n.default);t.default=y});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/welcome/index",["require","exports","underscore","../../../library/view/scrollable","../../../configuration/configuration","../../../library/utilities/deployment","../../overlays","ribsjs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/scrollable"),i=e("../../../configuration/configuration"),o=e("../../../library/utilities/deployment"),a=e("../../overlays"),s=e("ribsjs"),l=s.EventsManager,u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/welcome/index"+(t.viewVersion[0].toUpperCase()+t.viewVersion.slice(1))};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.options.templateVariables=Object.assign(this.options.templateVariables,{isLoggedIn:!!(this.options.userData&&this.options.userData.session&&this.options.userData.session.get("me")&&parseInt(this.options.userData.session.get("me").id,10)>0),inStoreFreeTrialDurationInWeeks:i.default.inStoreFreeTrial.durationInWeeks});"old"===t.viewVersion?this.initializeOldWelcomePage():this.initializeNewWelcomePage()};t.prototype.onRender=function(){e.prototype.onRender.call(this);try{this.bindRouterLinkHandlers()}catch(e){}};t.prototype.events=function(){return{"click .js-user-login":"onLogin","click .js-redirect-to-licensing-catalog":"onRedirectToLicensingCatalog","click .js-redirect-to-licensing-instore":"onRedirectToLicensingInStore"}};t.prototype.bindRouterLinkHandlers=function(){var e=this.options.router;this.$("*[data-target]").one("click touchend",r.debounce(function(t){t.preventDefault();t.stopPropagation();e.navigate($(this).attr("data-target"),{trigger:!0,replace:!0})},1,!0))};t.prototype.initializeNewWelcomePage=function(){Object.assign(this.options.templateVariables,{lang:this.options.userData.cookie.get(i.default.cookies.lang.name)})};t.prototype.onMusicSectionClick=function(e){e.stopPropagation();window.location.href=this.$(".music-redirect").attr("data-target")};t.prototype.initializeOldWelcomePage=function(){var e=this.options.userData.cookie.get(i.default.cookies.welcomeVersion.name)||this.getRandomInt(1,4);this.options.templateVariables=Object.assign(this.options.templateVariables,{randomBackgroun
60d:e});this.options.userData.cookie.set(i.default.cookies.welcomeVersion.name,e,{path:"/",secure:!o.default.isEnvironment("development"),sameSite:"strict"})};t.prototype.getRandomInt=function(e,t){e=Math.ceil(e);t=Math.floor(t);return Math.floor(Math.random()*(t-e))+e};t.prototype.onLogin=function(e){a.default.add(a.default.DefinitionPath.LoginRedirection,{userData:this.options.userData,overlaySelector:"#skeleton-overlay .redirection-container",transparentBackground:!0});l.trigger("STATS:SPLASH:LOGIN",{})};t.prototype.onRedirectToLicensingCatalog=function(e){l.trigger("STATS:SPLASH:REDIRECT:LICENSING",{type:"catalog"})};t.prototype.onRedirectToLicensingInStore=function(e){l.trigger("STATS:SPLASH:REDIRECT:LICENSING",{type:"instore"})};t.viewVersion="sep19";return t}(n.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/welcome/index",["require","exports","../../library/controller/pageController","../../vendor/phpjs/phpjs","../../configuration/configuration","../../managers/manager","../../library/utilities/route","../../library/utilities/image","../../library/utilities/object","../../views/pages/welcome/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../vendor/phpjs/phpjs"),i=e("../../configuration/configuration"),o=e("../../managers/manager"),a=e("../../library/utilities/route"),s=e("../../library/utilities/image"),l=e("../../library/utilities/object"),u=e("../../views/pages/welcome/index"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){var t=this;this.skeleton=e;if(!this.promise){var r=this.options.userData;this.promise=o.LocalizationManager.get(["_TKEY_WWW_META_TITLE_homepage-x-website","_TKEY_WWW_META_DESCRIPTION_homepage","_TKEY_WWW_META_KEYWORDS_homepage","_TKEY_WWW_HOMEPAGE_header-title"],{userData:r}).then(function(o){var c=o[0],d=o[1],p=o[2],f=o[3],h=a.default.getUrl("welcome"),m=n.default.strings.sprintf(c.get("translate"),i.default.application.websiteName),y=d.get("translate");e.setTitle(m);e.setDescription(y);e.setKeywords(p.get("translate"));e.setHeader(f.get("translate"),!0);e.setCanonicalUrl(h);e.setOpenGraph({app_id:i.default.application.facebookAppId,url:h,title:m,image:s.default.getImageUrl("jamendomusic/static/identity/share/facebook-share-site-image.jpg"),site_name:i.default.application.websiteName,description:y,type:"website",locale_alternate:i.default.application.getLocales()});l.closeModel(o);var g=new u.default({userData:r,router:t.router});e.addOverlays(g,!0);return e})}return this.promise};t.prototype.clear=function(){this.skeleton&&this.skeleton.closeOverlays();e.prototype.clear.call(this)};return t}(r.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/retrospective/2015",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/retrospective/2015"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/retrospective/2016",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";
60Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/retrospective/2016"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/retrospective/2017",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/retrospective/2017"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/retrospective/2018",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/retrospective/2018"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/retrospective/2019",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/retrospective/2019"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/retrospective/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../library/utilities/route","../../library/utilities/image","../../library/utilities/object","../../views/pages/retrospective/2015","../../views/pages/retrospective/2016","../../views/pages/retrospective/2017","../../views/pages/retrospective/2018","../../views/pages/retrospective/2019"],e)}(function(e,t){"use strict";
60Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../library/utilities/route"),s=e("../../library/utilities/image"),l=e("../../library/utilities/object"),u=e("../../views/pages/retrospective/2015"),c=e("../../views/pages/retrospective/2016"),d=e("../../views/pages/retrospective/2017"),p=e("../../views/pages/retrospective/2018"),f=e("../../views/pages/retrospective/2019"),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){if(!this.promise){var r=this.options.userData,u=this.options.name,c=a.default.getUrl("retrospective"+u);this.promise=n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_retrospective-"+u+"-x-website","_TKEY_WWW_META_DESCRIPTION_retrospective-"+u,"_TKEY_WWW_META_KEYWORDS_retrospective-"+u,"_TKEY_WWW_YEARINREVIEW"+u+"_header-title"],{userData:r}).then(function(n){var a=n[0],d=n[1],p=n[2],f=n[3],h=i.default.strings.sprintf(a.get("translate"),o.default.application.websiteName),m=i.default.strings.sprintf(d.get("translate"),o.default.application.websiteName),y=p.get("translate"),g=f.get("translate");e.setTitle(h);e.setDescription(m);e.setKeywords(y);e.setHeader(g);e.setOpenGraph({app_id:o.default.application.facebookAppId,url:c,title:h,image:s.default.getImageUrl("jamendomusic/static/retrospective/"+u+"/"+u+"-in-review-hero-lg.jpg"),site_name:o.default.application.websiteName,description:m,type:"website",locale_alternate:o.default.application.getLocales()});e.setCanonicalUrl(c);l.closeModel(n);var v={userData:r,templateVariables:{websiteName:o.default.application.websiteName,pageUrl:c,year:u,pageNameKey:g},scrollable:!0},_=new t.RetrospectiveViews[u](v);e.addContent(_);return e})}return this.promise};t.RetrospectiveViews={2015:u.default,2016:c.default,2017:d.default,2018:p.default,2019:f.default};return t}(r.default);t.default=h});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/cookies/index",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/cookies/index"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/cookies/index",["require","exports","../../library/controller/pageController","../../managers/manager","../../vendor/phpjs/phpjs","../../configuration/configuration","../../library/utilities/object","../../views/pages/cookies/index"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/controller/pageController"),n=e("../../managers/manager"),i=e("../../vendor/phpjs/phpjs"),o=e("../../configuration/configuration"),a=e("../../library/utilities/object"),s=e("../../views/pages/cookies/index"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(e){if(!this.promise){var t=this.options.userData;this.promise=n.LocalizationManager.get(["_TKEY_WWW_META_TITLE_cookie-policy-x-website","_TKEY_WWW_META_DESCRIPTION_cookie-policy","_TKEY_WWW_META_KEYWORDS_cookie-policy"],{userData:t}).then(function(r){var n=r[0],l=r[1],u=r[2],c=i.default.strings.sprintf(n.get("translate"),o.default.application.websiteName),d=l.get("translate"),p=u.get("translate");e.setTitle(c);e.setDescription(d);e.setKeywords(p);e.setHeader(c);a.closeModel(r);var f=new s.default({userData:t});e.addContent(f);return e})}return this.promise};return t}(r.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/users/biography",["require","exports","underscore","jquery","../../../library/view/loggedComponent","../../../managers/manager","../../../models/manager/user","../../../configuration/configuration","../../../vendor/phpjs/phpjs"],e)}(function(e,t){"use strict";
60Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("../../../library/view/loggedComponent"),o=e("../../../managers/manager"),a=e("../../../models/manager/user"),s=e("../../../configuration/configuration"),l=e("../../../vendor/phpjs/phpjs"),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.$charsLeft=n();return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/users/biography"};t.prototype.events=function(){return{click:"onClickEdit","input #biography-textarea":"onModifyInput","submit .js-user-edit-bio":"onSubmitBiography"}};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.model.get("biography")||this.model.set({biography:""});this.originalModel=this.model};t.prototype.onClickEdit=function(e){var t=this;this.activateComponent();this.isLogged().then(function(){var e=t.options.userData.session.get("me");if(t.isAllowed(e.id)){t.$(".js-user-edit-bio").removeClass("hidden");t.$(".js-user-display-bio").addClass("hidden");t.$(".js-display-user-no-bio").addClass("hidden")}})};t.prototype.onSubmitBiography=function(e){var t=this;e.preventDefault();e.stopPropagation();var r={biography:this.$("#biography-textarea").val()};this.model.unset("password",{silent:!0});this.model.unset("password_check",{silent:!0});o.UserManager.update(this.model,r,{success:function(){t.options.userData.session.set("me",t.model.toJSON());t.$(".js-user-edit-bio").addClass("hidden");t.$(".js-user-display-bio").removeClass("hidden").filter("p").text(r.biography);o.UserManager.trigger("userupdated",t.model)},error:function(e,t,r){""},wait:!0,userData:this.options.userData})};t.prototype.render=function(){var t=this,n={openDialog:!1};return this.getCharsLeft(this.model.get("biography").length).then(function(e){t.options.templateVariables.charsLeft=e;return t.isLogged(n)}).then(function(){var n=t.options.userData.session.get("me");t.isAllowed(n.id)?t.model=new a.default(r.extend({charsLeft:t.model.get("charsLeft"),editClass:"",biography:t.model.get("biography")
61},n)):t.model.set({editClass:"hidden"});return e.prototype.render.call(t)}).catch(function(){t.model.set({editClass:"hidden"});return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);if(""===this.model.get("biography")){this.$(".js-user-display-no-bio").removeClass("hidden");this.$("p.js-user-display-bio").addClass("hidden")}this.$charsLeft=this.$("#chars-left")};t.prototype.getCharsLeft=function(e){return o.LocalizationManager.get("_TKEY_WWW_COMMENT_chars-left",{userData:this.options.userData}).then(function(t){var r=t[0].get("translate");return r?l.default.strings.sprintf(r,s.default.application.biographyMaxChars-e):""+(s.default.application.reviewsMaxChars-e)})};t.prototype.onModifyInput=function(e){var t=this;this.getCharsLeft(e.currentTarget.textLength).then(function(e){t.$charsLeft.text(e)})};t.prototype.onUserConnected=function(e){var t=this.isAllowed(e.get("id"));this.model=new a.default(r.extend({editClass:t?"":"hidden"},this.originalModel.attributes));t&&this.$el.removeClass("hidden")};t.prototype.onUserDisconnected=function(e){this.model=this.originalModel.set({editClass:"hidden"});""===this.model.get("biography")&&this.$el.addClass("hidden")};t.prototype.isAllowed=function(e){return this.model.get("id")===e};return t}(i.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/users/secondaryInformation",["require","exports","../../../library/view/loading","../../components/users/biography"],e)}(function(e,t){"use strict";
61Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../components/users/biography"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/users/secondaryInformation"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var t=this.options,r=new n.default({model:this.model.clone(),context:t.context,userData:t.userData,templateVariables:t.templateVariables});this.addView(".js-user-biography",r)};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/incentives/index",["require","exports","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/incentives/"+t.TemplateStyle[this.options.type]};t.TemplateStyle={Biography:"noBiography",Album:"noFavoriteAlbums",Artist:"noFollowedArtists",Track:"noFavoriteTracks",Playlist:"noPlaylists",User:"noFollowedUsers"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/user/overview",["require","exports","underscore","ribsjs","../../../library/view/loading","../../layout/player","../../../managers/manager","FSPromise","chrisweb-utilities","../../../library/utilities/display","../../../library/utilities/object","../../partials/dynamicList/index","../../partials/reviews/index","../../partials/reviews/item","../../partials/tracks/item","../../partials/users/secondaryInformation","../../partials/incentives/index","../../components/favorites/favorite"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("underscore"),i=e("ribsjs"),o=i.EventsManager,a=e("../../../library/view/loading"),s=e("../../layout/player"),l=e("../../../managers/manager"),u=e("FSPromise"),c=u.FSPromise,d=e("chrisweb-utilities"),p=e("../../../library/utilities/display"),f=e("../../../library/utilities/object"),h=e("../../partials/dynamicList/index"),m=e("../../partials/reviews/index"),y=e("../../partials/reviews/item"),g=e("../../partials/tracks/item"),v=e("../../partials/users/secondaryInformation"),_=e("../../partials/incentives/index"),b=e("../../components/favorites/favorite");!function(e){e[e.Track=0]="Track";e[e.Playlist=1]="Playlist";e[e.Artist=2]="Artist";e[e.Album=3]="Album"}(r||(r={}));var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/user/overview"};t.prototype.onInitialize=function(){var a=this;e.prototype.onInitialize.call(this);var s=this.options,l=s.userData,u=this.model.get("dispname")+"-favorite-tracks";this.$el;this.trackCollection=new i.Collection([]);this.playlistsCollection=new i.Collection([]);this.artistsCollection=new i.Collection([]);this.albumsCollection=new i.Collection([]);this.usersCollection=new i.Collection([]);var c=l.session.get("me");!!c&&(c.id,this.model.get("id"));this.categories=[{collection:this.trackCollection,listKey:"trackIdList",selector:".js-favorite-tracks",ModelViewOptions:{templateVariables:{itemprop:"",originType:"user.favorites",originId:this.model.get("id"),from:"overview",fromId:"tracks",entity:"tracklist",entityId:"favorites_tracks"},virtualId:u,type:g.default.TrackItemType.VirtualList,originType:"user.favorites",originId:this.model.get("id")},callback:this.getMoreTracks.bind(this),entity:r[0],listTitleKey:"_TKEY_WWW_FAVORITE_track-header-title",moreTitleKey:"_TKEY_WWW_GENERIC_more-tracks",moreUrl:{urlName:"user",id:this.model.get("id"),name:this.model.get("dispname"),subpage:"favorites",filter:"track"}},{collection:this.playlistsCollection,listKey:"myPlaylistIdList",selector:".js-user-playlists",callback:this.getMorePlaylists.bind(this),entity:r[1]+"InCol",listTitleKey:"_TKEY_WWW_ME_playlists-mine",moreTitleKey:"_TKEY_WWW_GENERIC_more-playlists",moreUrl:{urlName:"user",id:this.model.get("id"),name:this.model.get("dispname"),subpage:"playlists"},ModelViewOptions:{templateVariables:{from:"overview",fromId:"playlists"}}},{collection:this.artistsCollection,listKey:"artistIdList",selector:".js-favorite-artists",callback:this.getMoreArtists.bind(this),entity:r[2]+"InCol",listTitleKey:"_TKEY_WWW_FAVORITE_artist-header-title",moreTitleKey:"_TKEY_WWW_GENERIC_more-artists",moreUrl:{urlName:"user",id:this.model.get("id"),name:this.model.get("dispname"),subpage:"favorites",filter:"artist"},ModelViewOptions:{templateVariables:{from:"overview",fromId:"artists"}}},{collection:this.albumsCollection,listKey:"albumIdList",selector:".js-favorite-albums",callback:this.getMoreAlbums.bind(this),entity:r[3]+"InCol",listTitleKey:"_TKEY_WWW_FAVORITE_album-header-title",moreTitleKey:"_TKEY_WWW_GENERIC_more-albums",moreUrl:{urlName:"user",id:this.model.get("id"),name:this.model.get("dispname"),subpage:"favorites",filter:"album"},ModelViewOptions:{templateVariables:{itemprop:"",from:"overview",fromId:"albums"}}}];
61this.categories.forEach(function(e,r){var i=new h.default({collection:e.collection,ModelViewOptions:__assign({},e.ModelViewOptions,{context:t.Context,templateVariables:n.extend({isCol:!0},s.templateVariables,e.ModelViewOptions?e.ModelViewOptions.templateVariables:{})}),userData:l,loadingStyle:{block:!0},entityType:p.default.EntityType[e.entity],templateVariables:{context:t.Context,listTitleKey:e.listTitleKey,moreTitleKey:e.moreTitleKey,moreUrl:e.moreUrl}});a.addView(e.selector,i);a.categories[r].listView=i});var d=new m.default({model:this.model.clone(),listSelector:".js-reviews-list-selector",ModelView:y.default,ModelViewOptions:{context:t.Context,router:this.options.router,userData:l,templateVariables:{from:"overview",fromId:"reviews"}},type:"user",context:t.Context,userData:l,displayMore:!0,templateVariables:{isCol:!0},router:this.options.router});this.addView(".js-reviews-section",d);if(p.default.getMaxEntitiesCount("DesktopDesign")>0){var f=new v.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables,context:t.Context});this.addView(".js-secondary-desktop",f)}o.on(b.default.Events.RemoveFromFavorite,this.onRemoveFromFavorites,this);o.on(u,this.notifyPlayer,this)};t.prototype.render=function(){var t=this;return c.all([this.getTrackPromise(),this.getPlaylistPromise(),this.getAlbumPromise(),this.getArtistPromise()]).then(function(){if(!t.isClose)return e.prototype.render.call(t)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$asideDiv=this.$(".entity-aside");this.$revealButton=this.$(".reveal>button")};t.prototype.events=function(){return{"click .reveal":"onClickReveal"}};t.prototype.onClickReveal=function(e){if(this.$revealButton.hasClass("is-toggled")){this.$revealButton.removeClass("is-toggled");this.$asideDiv.removeClass("revealed")}else{this.$revealButton.addClass("is-toggled");this.$asideDiv.addClass("revealed")}};t.prototype.getTrackPromise=function(){var e=this,t=this.options.userData;return l.FavoritesManager.getByAttribute({type:"track",userId:this.model.get("id")},{userData:t,dataParameters:{order:"dateFavorite_desc",limit:20}}).then(function(i){if(!e.isClose){var o=i.filter(function(e){return 1===e.get("favorite")});e.model.set({trackIdList:o},{silent:!0});if(o.length>0)e.getMoreTracks(o);else{var a=new _.default({userData:t,type:r[0],templateVariables:n.extend({dispname:e.model.get("dispname")},e.options.templateVariables)});e.addView(".js-favorite-tracks",a)}}})};t.prototype.getPlaylistPromise=function(){var e=this,t=this.options.userData;return l.PlaylistsManager.getByAttribute({},{userData:t,dataParameters:{userId:this.model.get("id"),order:"dateCreated_desc"}}).then(function(i){if(!e.isClose){e.model.set({myPlaylistIdList:i},{silent:!0});if(i.length>0)e.playlistsCollection.add(i);else{var o=new _.default({userData:t,type:r[1],templateVariables:n.extend({dispname:e.model.get("dispname")},e.options.templateVariables)});e.addView(".js-user-playlists",o)}}})};t.prototype.getAlbumPromise=function(){var e=this,t=this.options.userData;return l.FavoritesManager.getByAttribute({type:"album",userId:this.model.get("id")},{userData:t,dataParameters:{order:"dateFavorite_desc",limit:20}}).then(function(i){if(!e.isClose){var o=i.filter(function(e){return 1===e.get("favorite")});e.model.set({albumIdList:o},{silent:!0});if(i.length>0)e.getMoreAlbums(i);else{var a=new _.default({userData:t,type:r[3],templateVariables:n.extend({dispname:e.model.get("dispname")},e.options.templateVariables)});e.addView(".js-favorite-albums",a)}}})};t.prototype.getArtistPromise=function(){var e=this,t=this.options.userData;return l.FavoritesManager.getByAttribute({type:"artist",userId:this.model.get("id")},{userData:t,dataParameters:{order:"dateFavorite_desc",limit:20}}).then(function(i){if(!e.isClose){var o=i.filter(function(e){return 1===e.get("favorite")});e.model.set({artistIdList:o},{silent:!0});if(o.length>0)e.getMoreArtists(o);else{var a=new _.default({userData:t,type:r[2],templateVariables:n.extend({dispname:e.model.get("dispname")},e.options.templateVariables)});e.addView(".js-favorite-artists",a)}}})};t.prototype.getMoreTracks=function(e,t,r){var n,i=this,o=e.map(function(e){return e.get("id")});n=void 0!==t&&void 0!==r?o.slice(t,r):o;return l.TracksManager.get(n,{userData:this.options.userData}).then(function(e){if(!i.isClose){i.trackCollection.add(e);i.notifyPlayer()}return e})};t.prototype.getMorePlaylists=function(e,t,r){return new c(function(t,r){t(e)})};t.prototype.getMoreAlbums=function(e,t,r){var n,i=this,o=e.map(function(e){return e.get("id")});n=void 0!==t&&void 0!==r?o.slice(t,r):o;return l.AlbumsManager.get(n,{userData:this.options.userData}).then(function(e){i.isClose||i.albumsCollection.add(e);return e})};t.prototype.getMoreArtists=function(e,t,r){var n,i=this,o=e.map(function(e){return e.get("id")});n=void 0!==t&&void 0!==r?o.slice(t,r):o;return l.ArtistsManager.get(n,{userData:this.options.userData}).then(function(e){i.isClose||i.artistsCollection.add(e);return e})};t.prototype.notifyPlayer=function(){!this.isClose&&d.default.isClient()&&this.trackCollection.length&&s.default.trigger(s.default.Event.QUEUE,{type:g.default.TrackItemType.VirtualList,i
61d:this.categories[0].ModelViewOptions.virtualId,collection:this.trackCollection})};t.prototype.onRemoveFromFavorites=function(e){var t=e.id,i=e.type;if(!this.isClose&&"track"==i&&this.trackCollection.length){var o=this.trackCollection.filter(function(e){return!("id"in e)||e.get("id")!==t});this.trackCollection.reset(o);this.notifyPlayer();var a=this.options.userData;if(!o.length){var s=new _.default({userData:a,type:r[0],templateVariables:n.extend({dispname:this.model.get("dispname")},this.options.templateVariables)});this.addView(".js-favorite-tracks",s)}}};t.prototype.close=function(){o.off(b.default.Events.RemoveFromFavorite,this.onRemoveFromFavorites,this);this.categories&&o.off(this.categories[0].ModelViewOptions.virtualId,this.notifyPlayer,this);if(this.trackCollection){f.closeModel(this.trackCollection.models);this.trackCollection=null}if(this.playlistsCollection){f.closeModel(this.playlistsCollection.models);this.playlistsCollection=null}if(this.artistsCollection){f.closeModel(this.artistsCollection.models);this.artistsCollection=null}if(this.albumsCollection){f.closeModel(this.albumsCollection.models);this.albumsCollection=null}e.prototype.close.call(this)};t.Context="USERFAVORITESPAGE";return t}(a.default);t.default=w});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/users/item",["require","exports","underscore","../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/loading"),i=function(e){function t(t){var n=e.call(this,t)||this;r.defaults(n.options.templateVariables,{isCol:!1});return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/users/item"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/user/favorites",["require","exports","underscore","ribsjs","../../../library/view/scroll","../../../managers/manager","../../layout/player","../../../managers/favorites","../../components/favorites/favorite","chrisweb-utilities","../../../library/utilities/display","../../../library/utilities/route","../../../library/utilities/object","../../partials/tracks/item","../../partials/albums/item","../../partials/artists/item","../../partials/playlists/item","../../partials/users/item","../../partials/incentives/index","FSPromise"],e)}(function(e,t){"use strict";
61Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=n.EventsManager,o=e("../../../library/view/scroll"),a=e("../../../managers/manager"),s=e("../../layout/player"),l=e("../../../managers/favorites"),u=e("../../components/favorites/favorite"),c=e("chrisweb-utilities"),d=e("../../../library/utilities/display"),p=e("../../../library/utilities/route"),f=e("../../../library/utilities/object"),h=e("../../partials/tracks/item"),m=e("../../partials/albums/item"),y=e("../../partials/artists/item"),g=e("../../partials/playlists/item"),v=e("../../partials/users/item"),_=e("../../partials/incentives/index"),b=e("FSPromise"),w=function(e){function t(t){var n=e.call(this,r.extend({listSelector:".js-favorites-entityList",idList:"trackIdList",reRenderOnChange:!1,ModelView:h.default,ModelViewOptions:{type:h.default.TrackItemType.VirtualList,isCol:!1,virtualId:t.model.get("dispname")+"-favorite-tracks",listTitle:t.model.get("dispname"),href:p.default.getUrl("user",{id:t.model.get("id"),name:t.model.get("dispname"),subpage:"favorites"}),templateVariables:{itemprop:""},originType:"user.favorites",originId:t.model.get("id")},entitiesPerRequest:d.default.getMaxEntitiesCount("InfiniteTrack",!1),loadingStyle:{block:!0}},t))||this;n.renderNextEvenIfEmpty=!1;i.on(u.default.Events.RemoveFromFavorite,n.onRemoveFromFavorites,n);a.FavoritesManager.on(l.FavoritesManager.Event.RemovedFavorite,function(e){if(!n.isClose&&"track"!=n.model.get("currentFavoriteFilter")&&n.collection){n.collection.remove(e);setTimeout(function(){return n.collection.trigger("update")},1)}});return n}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/user/favorites"};t.prototype.events=function(){var e="plugins"in window&&"listpicker"in window.plugins,t=e?"showFilterPicker":"onChangeFilter",r=(e?"click":"change")+" #select_filter_favorite",n={};n[r]=t;return n};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.virtualId=this.options.ModelViewOptions.virtualId;this.trackCollection=new n.Collection([]);this.options.callback=this.onGetMoreRow.bind(this);i.on(this.virtualId,this.notifyPlayer,this)};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var r=Object.keys(t.FavoriteType),n=this.model.get("getParams");(!n||r.indexOf(n)<0)&&(n=r[0]);var i=this.options.ModelViewOptions;this.model.set({favoriteFilters:r,virtualId:this.virtualId,listTitle:i.listTitle,href:i.href,context:"USERFAVORITESPAGE"},{silent:!0});this.setUrl(n)};t.prototype.onAttributeChange=function(){var r=this;e.prototype.onAttributeChange.call(this);var n=this.model.changedAttributes();if("object"==typeof n&&null!==n&&"currentFavoriteFilter"in n){var i=n.currentFavoriteFilter,o=t.FavoriteType[i];this.$(this.options.listSelector).empty();this.options.ModelView=o.modelView;Object.assign(this.options.ModelViewOptions.templateVariables,o.modelViewOptions.templateVariables);this.options.idList=o.listKey;this.onGetMoreRow(this.model.get(this.options.idList)).then(function(e){try{r.collection.reset()}catch(e){}r.collection.add(e.map(function(e){return e.getModelProjection()}));r.collection.forEach(function(e,t){e.set({offset:t},{silent:!0})});if(!r.collection.length){var t=r.model.get("currentFavoriteFilter");r.showEmptyFavoritesIncentiveView(t)}}).catch(function(e){throw e})}};t.prototype.onRender=function(){e.prototype.onRender.call(this);"plugins"in window&&"listpicker"in window.plugins&&this.configureSelect();if(this.model.get("currentFavoriteFilter")===Object.keys(t.FavoriteType)[0])this.$(".js-favorites-entityList").addClass("list-track");else{this.$(".js-user-favorite-is-track").addClass("hidden");this.$(".js-favorites-entityList").addClass("row--list-grid row")}};t.prototype.getFavorites=function(e,t){var r=this;void 0===e&&(e=this.options.entitiesPerRequest);var n=this.model.get("currentFavoriteFilter"),i=this.options.userData,o={type:n,userId:this.model.get("id")},s={limit:e,order:"dateFavorite_desc"};t&&(s.offset=t);return a.FavoritesManager.getByAttribute(o,{userData:i,dataParameters:s}).then(function(e){if(r.checkFilters(n)&&(e.length>0||r.renderNextEvenIfEmpty)){r.renderNextEvenIfEmpty=!1;
61r.addFavorites(e,n)}})};t.prototype.showEmptyFavoritesIncentiveView=function(e){var t=this;new _.default({userData:this.options.userData,type:e.charAt(0).toUpperCase()+e.substr(1).toLowerCase(),templateVariables:Object.assign({dispname:this.model.get("dispname")},this.options.templateVariables)}).create().then(function(e){t.$(t.options.listSelector).empty().append(e)})};t.prototype.addFavorites=function(e,n){if(!this.isClose){var i=t.FavoriteType[n],o=this.model.get(i.listKey),a=r.uniq(o.concat(e),!1,function(e){return e.get("id")||e.get("toUserId")});o.length||this.$(this.options.listSelector).empty();this.model.set(i.listKey,a);!a.length&&this.isDispatch&&this.showEmptyFavoritesIncentiveView(n)}};t.prototype.onGetMoreRow=function(e){return __awaiter(this,void 0,b.FSPromise,function(){var r,n,i,o,a,s=this;return __generator(this,function(l){switch(l.label){case 0:r=this.options.userData;n=this.model.get("currentFavoriteFilter");i=t.FavoriteType[n];o=this.model.get(i.listKey);return this.collection.length+e.length>=o.length?[4,this.getFavorites(this.options.entitiesPerRequest,o.length)]:[3,2];case 1:l.sent();l.label=2;case 2:a=this.model.get(i.listKey).map(function(e){var t="user"===e.get("type")?"toUserId":"id";return e.get(t)});return[2,i.manager.get(a,{userData:r}).then(function(e){if(s.checkFilters(n)&&n===Object.keys(t.FavoriteType)[0]){s.applyStats(e);s.trackCollection.add(e);s.trackCollection.forEach(function(e,t){e.set({offset:t},{silent:!0})});s.notifyPlayer()}return e})]}})})};t.prototype.applyStats=function(e){var t={entity:"tracklist",entityId:"favorite_latest",tracklist:this.collection};e.forEach(function(e){e.set(t,{silent:!0})});return this};t.prototype.onChangeFilter=function(){this.setUrl(this.$("#select_filter_favorite>option:selected").val())};t.prototype.getCurrentFilterParam=function(e){void 0===e&&(e=this.model.get("currentFavoriteFilter"));return e!==Object.keys(t.FavoriteType)[0]?"?filter="+e:""};t.prototype.checkFilters=function(e){return this.model&&this.model.get("currentFavoriteFilter")===e};t.prototype.setUrl=function(e){void 0===e&&(e=this.model.get("currentFavoriteFilter"));var r=p.default.getUrl("user",{id:(this.model.get("id")||"").toString(),name:this.model.get("dispname"),subpage:"favorites"})+this.getCurrentFilterParam(e);this.model.set({currentFavoriteFilter:e});this.renderNextEvenIfEmpty=!0;if(this.isDispatch&&!this.isClose)if(e===Object.keys(t.FavoriteType)[0]){this.$(".js-user-favorite-is-track").removeClass("hidden");this.$(".js-favorites-entityList").removeClass("row--list-grid row").addClass("list-track")}else{this.$(".js-user-favorite-is-track").addClass("hidden");this.$(".js-favorites-entityList").removeClass("list-track").addClass("row--list-grid row")}i.trigger("change:filter",{url:r})};t.prototype.configureSelect=function(){var e=this,t=this.model.get("favoriteFilters"),r=t.map(function(e){return"_TKEY_WWW_GENERIC_"+e+"s"});r.unshift("_TKEY_WWW_GENERIC_cancel","_TKEY_GENERIC_FILTER_select-title");return a.LocalizationManager.get(r,{userData:this.options.userData}).then(function(r){var n=r[0],i=r[1],o=r.slice(2);e.filterSelectConfig={title:i.get("translate"),items:t.map(function(e,t){return{text:o[t].get("translate"),value:e}}),selectedValue:e.model.get("currentFavoriteFilter"),cancelButtonLabel:n.get("translate")}})};t.prototype.showFilterPicker=function(e){var t=this;window.plugins.listpicker.showPicker(this.filterSelectConfig,function(e){t.$("#select_filter_favorite").val(e);t.filterSelectConfig.selectedValue=e;t.onChangeFilter()},function(){})};t.prototype.onRemoveFromFavorites=function(e){var r=e.id,n=e.type;if(!this.isClose){var i=t.FavoriteType[n].listKey,o=this.model.get(i).filter(function(e){return!("id"in e)||e.get("id")!==r});this.model.set(i,o);if(!o.length){var a=this.model.get("currentFavoriteFilter");this.showEmptyFavoritesIncentiveView(a)}}};t.prototype.notifyPlayer=function(){!this.isClose&&c.default.isClient()&&this.trackCollection.length&&s.default.trigger(s.default.Event.QUEUE,{type:h.default.TrackItemType.VirtualList,id:this.virtualId,collection:this.trackCollection})};t.prototype.close=function(){if(this.trackCollection){f.closeModel(this.trackCollection.models);this.trackCollection=null}i.off(this.virtualId,this.notifyPlayer,this);i.off(u.default.Events.RemoveFromFavorite,this.onRemoveFromFavorites,this);e.prototype.close.call(this)};t.FavoriteType={track:{listKey:"trackIdList",manager:a.TracksManager,modelView:h.default,modelViewOptions:{templateVariables:{from:"favorites",fromId:"tracks"}}},album:{listKey:"albumIdList",manager:a.AlbumsManager,modelView:m.default,modelViewOptions:{templateVariables:{from:"favorites",fromId:"albums"}}},artist:{listKey:"artistIdList",manager:a.ArtistsManager,modelView:y.default,modelViewOptions:{templateVariables:{from:"favorites",fromId:"artists"}}},playlist:{listKey:"favPlaylistIdList",manager:a.PlaylistsManager,modelView:g.default,modelViewOptions:{templateVariables:{from:"favorites",fromId:"playlists"}}},user:{listKey:"favUserIdList",manager:a.UserManager,modelView:v.default,modelViewOptions:{templateVariables:{from:"favorites",fromId:"users"}}}};return t}(o.default);t.default=w});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/user/playlists",["require","exports","underscore","../../../managers/manager","../../../library/view/scroll","FSPromise","../../../library/utilities/display","../../partials/playlists/item","../../partials/incentives/index"],e)}(function(e,t){"use strict";
61Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../managers/manager"),i=e("../../../library/view/scroll"),o=e("FSPromise"),a=o.FSPromise,s=e("../../../library/utilities/display"),l=e("../../partials/playlists/item"),u=e("../../partials/incentives/index"),c=function(e){function t(t){return e.call(this,r.extend({listSelector:".js-user-playlists-list",idList:"myPlaylistIdList",ModelView:l.default,ModelViewOptions:{templateVariables:Object.assign(t.templateVariables,{from:"playlists",fromId:""})},entitiesPerRequest:s.default.getMaxEntitiesCount("Playlist",!1)},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/user/playlists"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);this.options.callback=this.onGetMoreRow.bind(this);this.playlistCollection=this.model.get("myPlaylistIdList")};t.prototype.render=function(){var t=this;if(this.playlistCollection.length)return e.prototype.render.call(this);var r=this.options.userData,i=2*this.options.entitiesPerRequest;return n.PlaylistsManager.getByAttribute({},{userData:r,dataParameters:{userId:this.model.get("id"),order:"dateCreated_desc",limit:i}}).then(function(r){if(!t.isClose){if(t.options.isOwner)t.playlistCollection=r;else{var n=[];r.forEach(function(e){e.get("tracks").length>0&&n.push(e)});t.playlistCollection=n}t.model.set(t.options.idList,t.playlistCollection);t.collection.set(t.playlistCollection.slice(0,t.options.entitiesPerRequest));return e.prototype.render.call(t)}})};t.prototype.onRender=function(){e.prototype.onRender.call(this);0===this.collection.length?this.showEmptyView():this.closeEmptyViewIfNecessary()};t.prototype.onGetMoreRow=function(e){var t=this;if(this.collection.length+e.length>=this.playlistCollection.length){var r=this.options.userData;return n.PlaylistsManager.getByAttribute({},{userData:r,dataParameters:{userId:this.model.get("id"),limit:this.options.entitiesPerRequest,offset:this.playlistCollection.length,order:"dateCreated_desc"}}).then(function(r){var n;(n=t.playlistCollection).push.apply(n,r);t.model.set(t.options.idList,t.playlistCollection);return e})}return a.resolve(e)};t.prototype.closeEmptyViewIfNecessary=function(){if(this.emptyView){this.$(this.options.listSelector).empty();this.emptyView.close()}this.emptyView=void 0};t.prototype.showEmptyView=function(){var e=this;this.closeEmptyViewIfNecessary();this.emptyView=new u.default({userData:this.options.userData,type:"Playlist",templateVariables:r.extend({dispname:this.model.get("dispname")},this.options.templateVariables)});this.emptyView.create().then(function(t){e.$(e.options.listSelector).empty().append(t)})};return t}(i.default);t.default=c});!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/library/user/auth",["require","exports","../../configuration/configuration"],e)}(function(e,t){"use strict";function r(e){var t=e.datecreated;return new Date(t).getTime()<=n.default.application.legacyUserAuthDeprecatedAfter}Object.defineProperty(t,"__esModule",{value:!0});var n=e("../../configuration/configuration");t.usesLegacyAuthSystem=r});var __extends=this&&this.__extends||function(){var e=function(t,r){
62e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/user/settings",["require","exports","underscore","jquery","moment","../../../managers/manager","../../../managers/user","../../../models/manager/user","../../../library/dialog/toast","../../../vendor/phpjs/phpjs","../../../library/view/loading","../../overlays","../../../library/utilities/form","../../../library/utilities/object","../../../library/user/auth"],e)}(function(e,t){"use strict";
62Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("moment"),o=e("../../../managers/manager"),a=e("../../../managers/user"),s=e("../../../models/manager/user"),l=e("../../../library/dialog/toast"),u=e("../../../vendor/phpjs/phpjs"),c=e("../../../library/view/loading"),d=e("../../overlays"),p=e("../../../library/utilities/form"),f=e("../../../library/utilities/object"),h=e("../../../library/user/auth"),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/user/settings"};t.prototype.events=function(){return{"submit form":"onSubmitForm","click .js-personaldata-delete":"onDeleteAccount","change #personaldata_email":"onEmailChange"}};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.model=new s.default(r.extend(t.DefaultUserSettings,this.options.userData.session.get("me")));this.options.ModelViewOptions={templateVariables:this.model.get("location")};this.options.templateVariables=this.options.templateVariables||{};this.options.templateVariables.accountType=this.model.get("email")||-1!==(this.model.get("idstr")||"").indexOf("@")?"jamendo":"external"};t.prototype.render=function(){var t=this;return o.StaticManager.getByAttribute({type:"country"},{userData:this.options.userData}).then(function(r){t.model.set("countries",r.map(function(e){return e.attributes}));t.model.set("usesLegacyAuth",h.usesLegacyAuthSystem(t.model.attributes));return e.prototype.render.call(t)})};t.prototype.onSubmitForm=function(e){var t=this;e.preventDefault();var u=!1,c=n(e.currentTarget),d=p.default.extractDataFromForm(c.serializeArray());c.find("button[type=submit]").prop("disabled",!0).addClass("is-active");c.find("#js-form-birthdate-feedback").text("");c.find("#js-form-feedback").text("");c.find("#js-form-birthdate").removeClass("has-error");c.find("#js-form-password").removeClass("has-error");c.find("#js-form-password-copy").removeClass("has-error");c.find("#js-form-password-feedback").text("");if(-1!==["year","month","day"].findIndex(function(e){return"string"==typeof d[e]&&d[e].trim().length>0})){d.birthdate=d.year+"-"+d.month+"-"+d.day;if(!i(d.birthdate,["YYYY-MM-DD"],!0).isValid()){c.find("#js-form-birthdate").addClass("has-error");o.LocalizationManager.get(["_TKEY_WWW_GENERIC_invalid-form","_TKEY_WWW_GENERIC_invalid-date"],{userData:this.options.userData}).then(function(e){var t=e[0],r=e[1];c.find("#js-form-feedback").text(t.get("translate"));c.find("#js-form-birthdate-feedback").text(r.get("translate"));f.closeModel(e)});u=!0}}delete d.day;delete d.month;delete d.year;if(""!=this.model.get("email")&&this.model.get("email")!=d.email){d.askUpdateEmailBy={current:this.model.get("email"),new:d.email};delete d.email}if(d.password!==d.password_check){c.find("#js-form-password").addClass("has-error");c.find("#js-form-password-copy").addClass("has-error");o.LocalizationManager.get(["_TKEY_WWW_GENERIC_invalid-form","_TKEY_WWW_GENERIC_invalid-password"],{userData:this.options.userData}).then(function(e){var t=e[0],r=e[1];c.find("#js-form-feedback").text(t.get("translate"));c.find("#js-form-password-feedback").text(r.get("translate"));f.closeModel(e)});u=!0}d.location={country:d.country,city:d.city};delete d.country;delete d.city;c.find("button[type=submit]").prop("disabled",!0).addClass("is-active");c.find(".js-avatar-input").removeClass("has-error").remove("has-warning");c.find(".js-feedback-block").text("");if(u){c.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");return!1}var h=new s.default(this.model.attributes);h.unset("countries",{silent:!0});h.cleanupNewsletterPreferencesArray();o.UserManager.update(h,d,{success:function(){t.model.set(h.attributes,{silent:!0});o.UserManager.trigger(a.UserManager.Event.UserDispname,t.model);t.model.unset("password",{silent:!0});t.model.unset("password_check",{silent:!0});delete d.password;delete d.passwordCheck;var e=t.options.userData.session.get("me");t.options.userData.session.set("me",r.extend(e,d));o.LocalizationManager.get("_TKEY_WWW_SETTINGS_feedback-changes-saved",{userData:t.options.userData}).then(function(e){l.show(e[0].get("translate"));e[0].close()});o.UserManager.trigger("userupdated",t.model);c.find("button[type=submit]").prop("disabled",!1).removeClass("is-active")}
62,error:function(e,r,n){var i="_TKEY_WWW_GENERIC_invalid-form";504===r.status&&(i="_TKEY_WWW_GENERIC_error-unknown");22===r.responseJSON.error&&(i="_TKEY_WWW_ERROR_email-exists");o.LocalizationManager.get(i,{userData:t.options.userData}).then(function(e){c.find("#js-form-feedback").text(e[0].get("translate"));e[0].close()});c.find("button[type=submit]").prop("disabled",!1).removeClass("is-active");return!1},wait:!0,userData:this.options.userData})};t.prototype.onDeleteAccount=function(e){var t=this;this.$(".js-personaldata-delete").addClass("is-disabled");d.default.add(d.default.DefinitionPath.DeleteUser,{model:this.model,userData:this.options.userData,closeModelOnClose:!1}).then(function(e){t.listenTo(e,e.Events.DELETE_AGREE,function(){t.deleteAccountConfirmed()});t.listenTo(e,e.Events.DELETE_CANCEL,function(){t.$(".js-personaldata-delete").removeClass("is-disabled")})})};t.prototype.onEmailChange=function(e){var t=this;e.target.value!=this.model.get("email")?o.LocalizationManager.get("_TKEY_GENERIC_ask-update-email-before-save-form",{userData:this.options.userData}).then(function(r){t.$("#js-userAskUpdateEmail").html(u.default.strings.sprintf(r[0].get("translate"),t.model.get("email"),e.target.value));r[0].close()}):this.$("#js-userAskUpdateEmail").html("")};t.prototype.deleteAccountConfirmed=function(){var e=this,t=this.model.get("managedArtistIds");void 0!==t&&t.length>0?o.ArtistsManager.get(t,{userData:this.options.userData}).then(function(t){if(t instanceof Array&&t.length>0){var r=void 0;r=t.map(function(e){return"&quot;"+e.get("name")+"&quot;"});var n=r.join(", ");d.default.add(d.default.DefinitionPath.DeleteArtists,{model:e.model,userData:e.options.userData,closeModelOnClose:!1,templateVariables:{artistsNames:n}}).then(function(t){e.listenTo(t,t.Events.DELETE_ARTISTS_AGREE,function(){e.deleteAccount()});e.listenTo(t,t.Events.DELETE_ARTISTS_CANCEL,function(){e.$(".js-personaldata-delete").removeClass("is-disabled")})})}else e.deleteAccount()}):this.deleteAccount()};t.prototype.deleteAccount=function(){var e=this,t=this.options.userData.session;o.LocalizationManager.get("_TKEY_WWW_SETTINGS_PERSONALDATA_deleted-account",{userData:this.options.userData}).then(function(r){o.UserManager.delete(e.model,e.options.userData).then(function(e){o.UserManager.logout(t).then(function(){l.show(r[0].get("translate"));r[0].close()})}).catch(function(){e.$(".js-personaldata-delete").removeClass("is-disabled")})})};t.prototype.close=function(){this.stopListening();e.prototype.close.call(this)};t.DefaultUserSettings={imageUploaded:!1};return t}(c.default);t.default=m});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};return __assign.apply(this,arguments)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/user/subscriptionSettings",["require","exports","../../../managers/manager","../../../models/manager/user","../../../managers/user","../../layout","../../../library/view/loading","../../partials/users/subscriptionSettingsForm"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../managers/manager"),n=e("../../../models/manager/user"),i=e("../../../managers/user"),o=e("../../layout"),a=e("../../../library/view/loading"),s=e("../../partials/users/subscriptionSettingsForm"),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.suspendRerenderOnUserUpdated=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/user/subscriptionSettings"};t.prototype.events=function(){return __assign({},e.prototype.events.call(this),{"click .js-subscription-settings-form-submit":"onSubmitForm"})};t.prototype.onInitialize=function(){r.UserManager.on(i.UserManager.Event.UserUpdated,this.onUserUpdated,this)};t.prototype.render=function(){var t=this;return r.UserManager.get(this.options.userData.session.get("me").id,{userData:this.options.userData}).then(function(r){if(r&&0!==r.length){t.form=new s.default(__assign({},t.options,{model:r[0].getModelProjection(n.default)}));t.addView(".js-subscription-settings-form-container",t.form);return e.prototype.render.call(t)}})};t.prototype.close=function(){this.stopListening();r.UserManager.off(i.UserManager.Event.UserUpdated,this.onUserUpdated,this);e.prototype.close.call(this)};t.prototype.onSubmitForm=function(e){var t=this;e.preventDefault();e.stopPropagation();this.suspendRerenderOnUserUpdated=!0;this.form.submit().then(function(){t.suspendRerenderOnUserUpdated=!1})};t.prototype.onUserUpdated=function(){this.suspendRerenderOnUserUpdated||o.default.getInstance().trigger(o.default.Events.CHANGE_DISPLAY_SIZE)};return t}(a.default);t.default=l});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/users/header",["require","exports","jquery","../../../library/view/loading","../../components/image/edit","../../../managers/manager","../../../managers/user","chrisweb-utilities","../../../library/utilities/image","../../../library/utilities/route"],e)}(function(e,t){"use strict";
62Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("../../../library/view/loading"),i=e("../../components/image/edit"),o=e("../../../managers/manager"),a=e("../../../managers/user"),s=e("chrisweb-utilities"),l=e("../../../library/utilities/image"),u=e("../../../library/utilities/route"),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.isExpanded=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/partials/users/headerDesktop"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);var t=this.model.get("cover");Object.keys(t.big).forEach(function(e){t.big[e]=l.default.getUpdatedImage(t.big[e])});Object.keys(t.small).forEach(function(e){t.small[e]=l.default.getUpdatedImage(t.small[e])});this.model.set({cover:t,href:u.default.getUrl("user",{id:this.model.get("id"),name:this.model.get("dispname"),subpage:"favorites"})+"?filter=tracks",virtualId:this.model.get("dispname")+"-favorite-tracks",listTitle:this.model.get("dispname")},{silent:!0});var r=new i.default({userData:this.options.userData,model:this.model,type:"profile"}),n=new i.default({userData:this.options.userData,model:this.model,type:"userCover"});this.addView(".js-edit-profile",r);this.addView(".js-edit-cover",n);o.UserManager.on(a.UserManager.Event.UserAvatar,this.updateCover,this)};t.prototype.events=function(){return{"click .js-expand":"onClickExpand"}};t.prototype.onClickExpand=function(e){this.isExpanded=!this.isExpanded;if(this.isExpanded){this.$(".js-expand").addClass("is-toggled");r(".js-secondary-mobile").removeClass("hidden")}else{this.$(".js-expand").removeClass("is-toggled");r(".js-secondary-mobile").addClass("hidden")}};t.prototype.updateCover=function(e){this.$(".js-"+e.type).prev().find(" > source").each(function(){r(this).prop("srcset",e.image)});this.$(".js-"+e.type).prev().find(" > img").each(function(){r(this).prop("src",e.image)});s.default.isClient()&&"picturefill"in window&&("HTMLPictureElement"in window&&"srcset"in document.createElement("img")||window.picturefill())};t.prototype.close=function(){o.UserManager.off(a.UserManager.Event.UserAvatar,this.updateCover,this);e.prototype.close.call(this)};return t}(n.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/user/index",["require","exports","underscore","../../../library/view/swipe","../../../managers/manager","../../../managers/user","ribsjs","../../../library/utilities/route","../../../library/utilities/display","../../../library/utilities/user","./overview","./favorites","./playlists","./settings","./subscriptionSettings","../reviews/page","../../partials/users/header","../../partials/users/secondaryInformation","../../layout"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/swipe"),i=e("../../../managers/manager"),o=e("../../../managers/user"),a=e("ribsjs"),s=a.EventsManager,l=e("../../../library/utilities/route"),u=e("../../../library/utilities/display"),c=e("../../../library/utilities/user"),d=e("./overview"),p=e("./favorites"),f=e("./playlists"),h=e("./settings"),m=e("./subscriptionSettings"),y=e("../reviews/page"),g=e("../../partials/users/header"),v=e("../../partials/users/secondaryInformation"),_=e("../../layout"),b=function(e){function t(n,i){return e.call(this,r.extend({},i,{headerView:new g.default(Object.assign({},i,{model:i.model.getModelProjection(a.Model)}
62)),swipeSelector:".js-user-swipe-container",swipeViews:t.extendedOptions(n,i),prefix:t.generatePrefix(i),manageUrl:!0,isCircular:!1}))||this}__extends(t,e);t.extendedOptions=function(e,n){var i=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],g=e[6],v=e[7],_=e[8],b=e[9],w=e[10],x=e[11],M=e[12],S=e[13],k=e[14],T=e[15],A=e[16],E=e[17],P=t.isOwner(n);r.extend(n.templateVariables,{isOwner:P});var O=P?"_TKEY_WWW_NAVIGATION_me_playlists":"_TKEY_WWW_GENERIC_playlists",j=P?"_TKEY_WWW_NAVIGATION_me_favorites":"_TKEY_WWW_GENERIC-fav-counter",D=[{metaTitle:i,metaDescription:o,metaKeywords:s,name:t.Views.Overview,titleKey:"_TKEY_WWW_USER_overview-tab-title",viewClass:d.default,options:Object.assign({context:"USEROVERVIEWPAGE"},n,{model:n.model.getModelProjection(a.Model)})},{metaTitle:l,metaDescription:u,metaKeywords:c,name:t.Views.Playlists,titleKey:O,viewClass:f.default,options:Object.assign({context:"USERPLAYLISTSPAGE",isOwner:P},n,{model:n.model.getModelProjection(a.Model)})},{metaTitle:g,metaDescription:v,metaKeywords:_,name:t.Views.Favorites,titleKey:j,viewClass:p.default,options:Object.assign({context:"USERFAVORITESPAGE"},n,{model:n.model.getModelProjection(a.Model)})},{metaTitle:b,metaDescription:w,metaKeywords:x,name:t.Views.Reviews,titleKey:"_TKEY_WWW_USER_activity-tab-title",viewClass:y.default,options:Object.assign({userFilters:!0,type:"user",context:"USERACTIVITYPAGE"},n,{model:n.model.getModelProjection(a.Model)})}];P&&D.push({metaTitle:M,metaDescription:S,metaKeywords:k,name:t.Views.Settings,titleKey:"_TKEY_WWW_SETTINGS_personaldata-tab-title",viewClass:h.default,fullUrl:"/settings",options:r.extend({context:"USERSETTINGSPAGE"},n,{model:n.model.getModelProjection(a.Model)})},{metaTitle:T,metaDescription:A,metaKeywords:E,name:t.Views.SubscriptionSettings,titleKey:"_TKEY_WWW_USER_subscription-settings-tab-title",viewClass:m.default,options:r.extend({context:"USERSETTINGSPAGE"},n,{model:n.model.getModelProjection(a.Model)})});return D};t.generatePrefix=function(e){return l.default.getUrl("user",{id:e.model.get("id"),name:e.model.get("dispname")})};t.prototype.getTemplateId=function(){return"/pages/user/index"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);i.UserManager.on(o.UserManager.Event.UserConnected,this.onUserConnected,this);i.UserManager.on(o.UserManager.Event.UserDisconnected,this.onUserDisconnected,this);i.UserManager.on(o.UserManager.Event.UserDeleted,this.onUserDeleted,this);i.UserManager.on(o.UserManager.Event.UserDispname,this.onUserDisplayNameChanged,this);if(u.default.getMaxEntitiesCount("DesktopDesign")<0){var t=new v.default({model:this.model.clone(),userData:this.options.userData,templateVariables:this.options.templateVariables});this.addView(".js-secondary-mobile",t)}};t.isOwner=function(e){return c.default.getIsLogged(e.userData)&&e.model.get("id")===e.userData.session.get("me").id};t.prototype.onUserConnected=function(e){t.isOwner(this.options)&&_.default.getInstance().trigger(_.default.Events.CHANGE_DISPLAY_SIZE)};t.prototype.onUserDisconnected=function(e){this.options.swipeViews.length>=5&&_.default.getInstance().trigger(_.default.Events.CHANGE_DISPLAY_SIZE)};t.prototype.onUserDeleted=function(e){if(this.options.model.get("id")===e){i.UserManager.off(o.UserManager.Event.UserDisconnected,this.onUserDisconnected,this);s.trigger("navigate",l.default.getUrl("homepage"))}};t.prototype.onUserDisplayNameChanged=function(e){this.model=e;this.options.model=e;this.options.headerView.model=e;this.options.headerView.reRenderModelView();this.options.prefix=t.generatePrefix(this.options);this.trigger(t.Events.DisplayNameChanged)};t.prototype.isClosed=function(){return this.isClose};t.prototype.close=function(){i.UserManager.off(o.UserManager.Event.UserConnected,this.onUserConnected,this);i.UserManager.off(o.UserManager.Event.UserDisconnected,this.onUserDisconnected,this);i.UserManager.off(o.UserManager.Event.UserDeleted,this.onUserDeleted,this);i.UserManager.off(o.UserManager.Event.UserDispname,this.onUserDisplayNameChanged,this);e.prototype.close.call(this)};t.Events=Object.assign(n.default.Events,{DisplayNameChanged:"dispnamechanged"});t.Views={Overview:"",Playlists:"playlists",Favorites:"favorites",Reviews:"reviews",Settings:"settings",SubscriptionSettings:"subscriptionsettings"};return t}(n.default);t.default=b});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/pages/user/login",["require","exports","../../../library/view/view","../../overlays","ribsjs","../../../library/view/overlays","../../../configuration/routesDefinitions","../../../library/utilities/user","chrisweb-utilities"],e)}(function(e,t){"use strict";
62Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/view"),n=e("../../overlays"),i=e("ribsjs"),o=e("../../../library/view/overlays"),a=e("../../../configuration/routesDefinitions"),s=e("../../../library/utilities/user"),l=e("chrisweb-utilities"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/pages/user/login"};t.prototype.onRenderAll=function(){var t=this;e.prototype.onRenderAll.call(this);if(l.default.isClient()){i.EventsManager.once(o.default.Events.OVERLAY_CLOSE,function(){s.default.getIsLogged(t.options.userData)?t.options.router.navigate(a.default.settings.path,{trigger:!0,replace:!0}):t.options.router.navigate(a.default.homepage.path,{trigger:!0,replace:!0})});setTimeout(function(){n.default.add(n.default.DefinitionPath.LoginSignin,{userData:t.options.userData,templateVariables:{dialogType:""},overlaySelector:"#skeleton-overlay",transparentBackground:!0})},100)}};return t}(r.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;(o=0,a)&&(r=[2&r[0],a.value]);switch(r[0]){case 0:case 1:a=r;break;case 4:l.label++;return{value:r[1],done:!1};case 5:l.label++;o=r[1];r=[0];continue;case 7:r=l.ops.pop();l.trys.pop();continue;default:if(!(a=l.trys,a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){l.label=r[1];break}if(6===r[0]&&l.label<a[1]){l.label=a[1];a=r;break}if(a&&l.label<a[2]){l.label=a[2];l.ops.push(r);break}a[2]&&l.ops.pop();l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e];o=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,a,s,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/controllers/user/index",["require","exports","ribsjs","../../library/controller/pageController","../../vendor/phpjs/phpjs","../../configuration/configuration","../../managers/manager","../../managers/user","../../library/error/error","../../views/error/4xx","chrisweb-utilities","../../library/utilities/object","../../library/utilities/user","../../library/utilities/route","speakingurl","../../views/pages/user/index","../../views/pages/user/login"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("../../library/controller/pageController"),o=e("../../vendor/phpjs/phpjs"),a=e("../../configuration/configuration"),s=e("../../managers/manager"),l=e("../../managers/user"),u=e("../../library/error/error"),c=e("../../views/error/4xx"),d=e("chrisweb-utilities"),p=e("../../library/utilities/object"),f=e("../../library/utilities/user"),h=e("../../library/utilities/route"),m=e("speakingurl"),y=e("../../views/pages/user/index"),g=e("../../views/pages/user/login"),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.create=function(t){e.prototype.create.call(this,t);s.UserManager.on(l.UserManager.Event.UserConnected,this.onConnected,this);var r=this.determineUserId();isNaN(r)?this.promise=this.promise||this.createLoginRenderPromise():this.promise=this.promise||this.createNormalRenderPromise(r);return this.promise};t.prototype.createErrorRenderPromise=function(){return __awaiter(this,void 0,void 0,function(){var e,t,r=this;return __generator(this,function(n){e=this.options.userData;t=new c.default({userData:e});return[2,s.LocalizationManager.get(["_TKEY_WWW_404_page-title"],{userData:e}).then(function(e){var n=e[0];r.skeleton.clear();r.skeleton.setTitle(n.get("translate"));r.skeleton.setHeader(n.get("translate"));n.close();r.skeleton.addContent(t);return r.skeleton})]})})};t.prototype.createLoginRenderPromise=function(){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(t){e=new g.default({router:this.router});this.skeleton.addContent(e);return[2,this.skeleton]})})};t.prototype.createNormalRenderPromise=function(e){return __awaiter(this,void 0,void 0,function(){var t,r=this;return __generator(this,function(i){t=this.options.userData;return[2,s.UserManager.get(e,{userData:t}).then(function(e){if(!e.length)return r.createErrorRenderPromise();var i=e[0],l=a.default.application.websiteName,u=h.default.getParams(r.options.url),c=m(d.default.safeUnescape(i.get("dispname")));""===c&&(c="_");r.redirectToCleanUrlIfNecessary(i,c);i.set({trackIdList:[],myPlaylistIdList:[],favPlaylistIdList:[],favUserIdList:[],albumIdList:[],artistIdList:[],getParams:u.filter});var f={currentView:r.options.subpage,model:i,userData:t,swipeSelector:null,swipeViews:null,prefix:null,manageUrl:!0,isCircular:!1,router:r.router,templateVariables:{websiteName:l}};return s.LocalizationManager.get(["_TKEY_WWW_USER_overview-header-title","_TKEY_WWW_USER_overview-desc","_TKEY_WWW_USER_overview-meta","_TKEY_WWW_USER_playlists-header-title","_TKEY_WWW_USER_playlists-desc","_TKEY_WWW_USER_playlists-meta","_TKEY_WWW_USER_favorites-header-title","_TKEY_WWW_USER_favorites-desc","_TKEY_WWW_USER_favorites-meta","_TKEY_WWW_USER_activity-header-title","_TKEY_WWW_USER_activity-desc","_TKEY_WWW_USER_activity-meta","_TKEY_WWW_USER-settings-header-title","_TKEY_WWW_USER_settings-desc","_TKEY_WWW_USER_settings-meta","_TKEY_WWW_USER-subscription-settings-header-title","_TKEY_WWW_USER_subscription-settings-desc","_TKEY_WWW_USER_subscription-settings-meta"],{userData:t}).then(function(e){var t=e[0],a=e[1],s=e[2],u=e[3],h=e[4],g=e[5],v=e[6],_=e[7],b=e[8],w=e[9],x=e[10],M=e[11],S=e[12],k=e[13],T=e[14],A=o.default.strings.sprintf(t.get("translate"),c,l),E=o.default.strings.sprintf(a.get("translate"),c),P=s.get("translate"),O=o.default.strings.sprintf(u.get("translate"),c,l),j=o.default.strings.sprintf(h.get("translate"),c),D=g.get("translate"),C=o.default.strings.sprintf(v.get("translate"),c,l),L=o.default.strings.sprintf(_.get("translate"),c),I=b.get("translate"),R=o.default.strings.sprintf(w.get("translate"),c),Y=o.default.strings.sprintf(x.get("translate"),c),N=M.get("translate"),F=S.get("translate"),W=function(e){return o.default.strings.sprintf(F,m(d.default.safeUnescape(e.get("dispname")))
62)},U=o.default.strings.sprintf(k.get("translate"),c),q=T.get("translate"),H=(S.get("translate"),function(e){return o.default.strings.sprintf(F,m(d.default.safeUnescape(e.get("dispname"))))}),V=o.default.strings.sprintf(k.get("translate"),c),B=T.get("translate");r.userIndexView=new y.default([A,E,P,O,j,D,C,L,I,R,Y,N,W,U,q,H,V,B],f);r.listenToSwipe(r.userIndexView);r.userIndexView.on(y.default.Events.DisplayNameChanged,r.onUserDisplayNameChanged,r);n.on("change:filter",r.onChangeFilter,r);r.skeleton.clear();var z=r.userIndexView.getTabMetaData();r.skeleton.setTitle(d.default.safeUnescape(z.metaTitle));r.skeleton.setDescription(d.default.safeUnescape(z.metaDescription));r.skeleton.setKeywords(z.metaKeywords);r.skeleton.setHeader(P);r.skeleton.addContent(r.userIndexView);var K=r.userIndexView.getUrl(r.options.subpage);r.skeleton.setSchema({itemtype:"http://schema.org/Person",name:d.default.safeUnescape(i.get("dispname")),description:d.default.safeUnescape(i.get("biography")).replace(/"/g,""),image:i.get("cover").small.size600,url:K});p.closeModel(e);return r.skeleton})})]})})};t.prototype.redirectToCleanUrlIfNecessary=function(e,t){var r=this;this.options.subpage&&"settings"===this.options.subpage||this.redirectIfUrlIncomplete({cleanName:t,generateURL:function(){var n;n="string"==typeof r.options.subpage&&r.options.subpage.length>0?h.default.getUrl("user",{id:e.get("id"),name:t,subpage:r.options.subpage}):h.default.getUrl("user",{id:e.get("id"),name:t});return n}})};t.prototype.determineUserId=function(){if("number"==typeof this.options.id&&!isNaN(this.options.id))return this.options.id;if(f.default.getIsLogged(this.options.userData))try{return this.options.userData.session.get("me").id}catch(e){return}};t.prototype.createNotFoundError=function(e){return new u.default(this.errorDefinitions.NOT_FOUND.message,{userData:this.options.userData,id:e})};t.prototype.updateMetadata=function(e){this.skeleton.setTitle(d.default.safeUnescape(e.metaTitle));this.skeleton.setDescription(d.default.safeUnescape(e.metaDescription));this.skeleton.setKeywords(e.metaKeywords)};t.prototype.onUserDisplayNameChanged=function(){var e=this.userIndexView.getTabMetaData();d.default.isClient()&&this.router.navigate(e.url,{trigger:!1,replace:!0});this.updateMetadata(e)};t.prototype.onChangeFilter=function(e){d.default.isClient()&&this.router.navigate(e.url,{trigger:!1,replace:!0})};t.prototype.onConnected=function(){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(t){switch(t.label){case 0:e=this.determineUserId();return[4,this.createNormalRenderPromise(e)];case 1:t.sent();this.skeleton.render();return[2]}})})};t.prototype.clear=function(){if(this.userIndexView){this.userIndexView.off(y.default.Events.DisplayNameChanged);this.userIndexView.isClosed()||this.userIndexView.close()}n.off("change:filter",this.onChangeFilter,this);s.UserManager.off(l.UserManager.Event.UserConnected,this.onConnected,this);e.prototype.clear.call(this)};t.prototype.uniqueInstanceId=function(){return this.options.id+"_"+this.options.name};return t}(i.default);t.default=v});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/live/update",["require","exports","../../../library/view/component","FSEventDispatcher"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=e("FSEventDispatcher"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/live/update"};t.prototype.events=function(){return{
63click:"onClickUpdate"}};t.prototype.onClickUpdate=function(e){this.activateComponent();n.default.Mediator.triggerResult("live:update")};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/download/download",["require","exports","underscore","../../overlays","../../../library/view/component","../../../managers/manager","FSEventDispatcher","../../../library/dialog/toast","../../../library/utilities/user","chrisweb-utilities","../../../vendor/chromedevtools/elements/dompath"],e)}(function(e,t){"use strict";
63Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../overlays"),i=e("../../../library/view/component"),o=e("../../../managers/manager"),a=e("FSEventDispatcher"),s=e("../../../library/dialog/toast"),l=e("../../../library/utilities/user"),u=e("chrisweb-utilities"),c=e("../../../vendor/chromedevtools/elements/dompath"),d=function(e){function t(t){return e.call(this,r.extend(t,{subviewAsyncRender:u.default.isClient()}))||this}__extends(t,e);t.prototype.getTemplateId=function(){switch(this.model.get("templateStyle")){case t.TemplateStyle.Fat:case t.TemplateStyle.Hero:case t.TemplateStyle.HeroDesktop:case t.TemplateStyle.Icon:case t.TemplateStyle.IconOnBg:case t.TemplateStyle.IconRound:return"/components/download/"+this.model.get("templateStyle");default:return"/components/download/icon"}};t.prototype.events=function(){return{click:"onClickDownload"}};t.prototype.onRender=function(){var n=this;e.prototype.onRender.call(this);var i=a.default.Mediator.triggerResult(t.DownloadEvents.CanDownloadType,this.model.get("type"));i.length>0&&-1===i.indexOf(!0)?r.defer(function(){return n.close()}):this.setId(this.model.get("id"))};t.startDownload=function(e,r,i){var u=a.default.Mediator.triggerResult(t.DownloadEvents.CanDownloadDevice);if(u.length>0&&-1===u.indexOf(!0))o.LocalizationManager.get("_TKEY_MUSIC_download-not-allowed-ios",{userData:e}).then(function(e){var t=e[0];s.show(t.get("translate"));t.close()});else{var d=l.default.getUserLanguage(e),p=r.get("context");r.set({context:t.Context[p],stats:Object.assign({selector:c.default.cssPath(i[0])},r.get("stats")||{})},{silent:!0});var f=i.data("jamAbtestingVariation")||"";n.default.add(n.default.DefinitionPath.Download,{model:r,userData:e,templateVariables:{language:d},closeModelOnClose:!1,abTestingVariation:f})}};t.prototype.onClickDownload=function(e){if(!this.isActive){this.activateComponent();t.startDownload(this.options.userData,this.model,this.$el)}};t.prototype.setId=function(e){var r=this;t.DownloadType[this.model.get("type")].manager.get(e,{userData:this.options.userData}).then(function(e){if(!r.isClose){var t=r.model.get("stats");r.model.set(e[0].attributes);r.model.set({stats:Object.assign(t,r.model.get("stats")||{})},{silent:!0})}e[0].close()})};t.DownloadEvents={CanDownloadType:"candownloadtype",CanDownloadDevice:"candownloaddevice"};t.TemplateStyle={Fat:"fat",Hero:"hero",HeroDesktop:"heroDesktop",Icon:"icon",IconOnBg:"iconOnBg",IconRound:"iconRound"};t.DownloadType={track:{manager:o.TracksManager},album:{manager:o.AlbumsManager},playlist:{manager:o.PlaylistsManager}};return t}(i.default);t.default=d});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/edit/edit",["require","exports","underscore","../../overlays","../../../library/view/loggedComponent","../../../library/utilities/user"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../overlays"),i=e("../../../library/view/loggedComponent"),o=e("../../../library/utilities/user"),a=function(e){function t(n){return e.call(this,r.extend({},t.defaultOptions,n))||this}__extends(t,e);t.prototype.getTemplateId=function(){switch(this.model.get("templateStyle")){case t.TemplateStyle.Hero:case t.TemplateStyle.HeroDesktop:case t.TemplateStyle.Edit:return"/components/edit/"+this.model.get("templateStyle");default:return"/components/edit/"+t.TemplateStyle.Edit}};t.prototype.events=function(){return{click:"onClickEdit"}};t.prototype.onClickEdit=function(e){var r=this;this.activateComponent();this.isLogged().then(function(){switch(r.model.get("type")){case t.EditType.Playlist:n.default.add(n.default.DefinitionPath.EditPlaylist,{model:r.model,userData:r.options.userData,closeModelOnClose:!1});break;case t.EditType.Artist:var e=o.default.getUserLanguage(r.options.userData),i="https://artists.jamendo.com/"+e+"/artist/"+r.model.get("id")+"/"+r.model.get("name");window.open(i);break;case t.EditType.Biography:}})};t.prototype.render=function(){var t=this,r={openDialog:!1};return this.isLogged(r).then(function(){var r=t.options.userData.session.get("me");
63t.model.set({optionalHiddenClass:t.checkIfAllowed(r.id)?"":"hidden"});return e.prototype.render.call(t)}).catch(function(){t.model.set({optionalHiddenClass:"hidden"});return e.prototype.render.call(t)})};t.prototype.onUserConnected=function(e){this.checkIfAllowed(e.get("id"))&&this.model.set({optionalHiddenClass:""})};t.prototype.onUserDisconnected=function(e){this.model.set({optionalHiddenClass:"hidden"})};t.prototype.checkIfAllowed=function(e){switch(this.model.get("type")){case t.EditType.Playlist:return this.model.get("userId")===e;case t.EditType.Artist:var r=this.options.userData.session.get("me");return r.managedArtistIds.indexOf(this.model.get("id"))>-1||!0===r.superAdmin;case t.EditType.Biography:return this.model.get("id")===e}};t.EditType={Artist:"artist",Playlist:"playlist",User:"user",Biography:"biography"};t.TemplateStyle={Hero:"hero",HeroDesktop:"heroDesktop",Edit:"edit"};t.defaultOptions={reRenderOnChange:!0};return t}(i.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/delete/delete",["require","exports","ribsjs","underscore","../../overlays","../../../library/view/loggedComponent","../../../library/error/error","../../../configuration/errorDefinitions","../../../managers/manager","chrisweb-utilities","speakingurl"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=r.EventsManager,i=e("underscore"),o=e("../../overlays"),a=e("../../../library/view/loggedComponent"),s=e("../../../library/error/error"),l=e("../../../configuration/errorDefinitions"),u=e("../../../managers/manager"),c=e("chrisweb-utilities"),d=e("speakingurl"),p=function(e){function t(r){return e.call(this,i.extend({},t.defaultOptions,r))||this}__extends(t,e);t.prototype.getTemplateId=function(){switch(this.model.get("templateStyle")){case t.TemplateStyle.Hero:case t.TemplateStyle.HeroDesktop:case t.TemplateStyle.Delete:return"/components/delete/"+this.model.get("templateStyle");default:return"/components/delete/"+t.TemplateStyle.Delete}};t.prototype.events=function(){return{click:"onClickDelete"}};t.prototype.onClickDelete=function(e){var r=this;this.activateComponent();this.isLogged().then(function(){switch(r.model.get("type")){case t.DeleteType.Playlist:o.default.add(o.default.DefinitionPath.DeletePlaylist,{model:r.model,userData:r.options.userData,closeModelOnClose:!1}).then(function(e){r.listenTo(e,e.Events.DELETE_AGREE,function(){$(r.el).addClass("is-disabled");$(r.el).addClass("hidden");u.UserManager.get(r.options.model.get("userId"),{userData:r.options.userData}).then(function(e){if(!e.length)throw new s.default(l.default.NOT_FOUND.message,{userData:r.options.userData});var t=e[0],i=d(c.default.safeUnescape(t.get("dispname")));n.trigger("playlist:delete:finished",t.get("id"),i)});r.listenTo(e,e.Events.DELETE_CANCEL,function(){$(r.el).removeClass("is-disabled");$(r.el).removeClass("hidden")})})})}})};t.prototype.render=function(){var t=this,r={openDialog:!1};return this.isLogged(r).then(function(){var r=t.options.userData.session.get("me");t.model.set({optionalHiddenClass:t.checkIfAllowed(r.id)?"":"hidden"});return e.prototype.render.call(t)}).catch(function(){t.model.set({optionalHiddenClass:"hidden"});return e.prototype.render.call(t)})};t.prototype.onUserConnected=function(e){this.checkIfAllowed(e.get("id"))&&this.model.set({optionalHiddenClass:""})};t.prototype.onUserDisconnected=function(e){this.model.set({optionalHiddenClass:"hidden"})};t.prototype.checkIfAllowed=function(e){switch(this.model.get("type")){case t.DeleteType.Playlist:return this.model.get("userId")===e;default:return!1}};t.DeleteType={Playlist:"playlist"};t.TemplateStyle={Hero:"hero",HeroDesktop:"heroDesktop",Delete:"delete"};t.defaultOptions={reRenderOnChange:!0};return t}(a.default);t.default=p});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/navigation/back",["require","exports","../../../library/view/component","ribsjs","../../layout"],e)}(function(e,t){"use strict";
63Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=e("ribsjs"),i=n.EventsManager,o=e("../../layout"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/navigation/back"};t.prototype.events=function(){return{click:"onClickBack"}};t.prototype.onClickBack=function(e){this.activateComponent();i.trigger("STATS:HEADER:BACKCLICK",{});o.default.getNavigationInstance().isOpen?o.default.getInstance().closeMenu():window.history.back()};return t}(r.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/navigation/menu",["require","exports","../../layout","../../../library/view/component","ribsjs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../layout"),n=e("../../../library/view/component"),i=e("ribsjs"),o=i.EventsManager,a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/navigation/menu"};t.prototype.events=function(){return{click:"onClickMenu"}};t.prototype.onClickMenu=function(e){this.activateComponent();o.trigger("STATS:HEADER:NAVIGATIONCLICK",{});r.default.getInstance().openMenu()};return t}(n.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/options/menu",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/options/menu"};t.fixMenuPosition=function(e,t){void 0===t&&(t={top:0,left:0,width:window.innerWidth,height:window.innerHeight});var r=e.attr("menu-position-class");e.removeClass(r||"");var n=this.getBestPosition(this.getFrameOverlaps(e,t));e.attr("menu-position-class",n).addClass(n)};t.getBestPosition=function(e){if(15===e)return"";var t="";t=8&e?"left":"right";var r="";r=4&e?"top":"bottom";return r+"-"+t};t.getFrameOverlaps=function(e,t){var r=e.offset(),n=e.width(),i=e.height(),o=0;r.top-window.scrollY+i>Math.min(t.top-window.scrollY+t.height,window.innerHeight)&&(o|=4);r.top-window.scrollY<Math.max(t.top,0)&&(o|=1);r.left<Math.max(t.left,0)&&(o|=8);r.left-window.scrollX+n>Math.min(t.left-window.scrollX+t.width,window.innerWidth)&&(o|=2);return o};t.IFrame=void 0;return t}(r.default);t.OptionsMenuView=n;t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/options/options",["require","exports","jquery","../../../library/view/component","./menu","../../layout"],e)}(function(e,t){"use strict";
63Object.defineProperty(t,"__esModule",{value:!0});var r=e("jquery"),n=e("../../../library/view/component"),i=e("./menu"),o=e("../../layout"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.menuOpen=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/options/options"};t.prototype.events=function(){return{click:"onClickOptions"}};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this)};t.prototype.close=function(){e.prototype.close.call(this);r("body").off("click",this.clickHandler).off("keyup",this.keyupHandler)};t.prototype.onClickOptions=function(e){this.activateComponent();this.toggleMenu()};t.prototype.toggleMenu=function(){this.menuOpen?this.closeMenu():this.openMenu()};t.prototype.closeMenu=function(){o.default.getInstance().hideVeil();this.$menuContent.removeClass("desktop-secondary-menu is-visible").addClass("desktop-secondary-menu").attr("id","").appendTo(this.$el);r("body").off("click",this.clickHandler).off("keyup",this.keyupHandler);this.menuOpen=!1};t.prototype.openMenu=function(){window.innerWidth<768?this.openMenuMobile():this.openMenuDesktop();setTimeout(this.bindOpenHandlers.bind(this),1);this.menuOpen=!0};t.prototype.bindOpenHandlers=function(){var e=this;this.clickHandler=this.clickHandler||this.closeMenu.bind(this);this.keyupHandler=this.keyupHandler||function(t){27===t.keyCode&&e.closeMenu()};r("body").on("click touchend",this.clickHandler).on("keyup",this.keyupHandler)};t.prototype.openMenuDesktop=function(){var e=this.$el.parent().find(".desktop-secondary-menu");e.addClass("is-visible");this.$menuContent=e;var t,n=this.options.model.get("frameSelector");if("string"==typeof n&&n.trim().length>0){var o=r(n),a=o.offset();t={left:a.left,top:a.top,width:o.width(),height:o.height()}}i.default.fixMenuPosition(e,t)};t.prototype.openMenuMobile=function(){o.default.getInstance().showVeil();var e=this.$el.parent().find(".desktop-secondary-menu");e.attr("id","skeleton-secondary-menu-mobile").removeClass("desktop-secondary-menu").insertAfter(o.default.getInstance().getVeilElement()).addClass("is-visible");this.$menuContent=e};return t}(n.default);t.default=a});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/options/option",["require","exports","../../../library/view/loggedComponent"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loggedComponent"),n=function(e){function t(t){var r=e.call(this,t)||this;t.templateVariables=t.templateVariables||{};var n=t.templateVariables;n.icon=n.icon||"";n.target=n.target||"";n.text=n.text||"";
63n.cssClasses=n.cssClasses||[];return r}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/options/option"};t.prototype.events=function(){return{click:"onClick"}};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/player/play",["require","exports","underscore","ribsjs","player/dist/browser-register","chrisweb-utilities","../../../library/view/component","../../../managers/manager","../../layout/player"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("ribsjs"),i=e("player/dist/browser-register"),o=n.EventsManager,a=e("chrisweb-utilities"),s=e("../../../library/view/component"),l=e("../../../managers/manager"),u=e("../../layout/player"),c=function(e){function t(t){var r=e.call(this,t)||this;r.listenTo(u.default,u.default.Event.UPDATE,r.updateComponent);r.isDisabled=!1;return r}__extends(t,e);t.prototype.getTemplateId=function(){switch(this.model.get("templateStyle")){case t.TemplateStyle.Row:return"blank.png"===this.model.get("cover").split("/").pop()?"/components/player/rowNoCover":"/components/player/rowWithCover";case t.TemplateStyle.Corner:case t.TemplateStyle.Hero:case t.TemplateStyle.HeroDesktop:case t.TemplateStyle.Homepage:case t.TemplateStyle.Wallpost:return"/components/player/"+this.model.get("templateStyle");default:return"/components/player/button"}};t.prototype.onInitialize=function(){var r=this;e.prototype.onInitialize.call(this);var n=a.default.isClient();if(n){this.options.subviewAsyncRender=n;var i=this.model.get("id"),o=this.model.get("type"),s={userData:this.options.userData},u={};void 0===this.model.get("offset")&&(u.offset=-1);o||(u.type="track");this.model.get("templateStyle")===t.TemplateStyle.Homepage&&(u.restart=!0);this.model.set(u,{silent:!0});var c;this.model.get("offset");switch(o){case"radio":c=function(){return l.RadiosManager.getPlanning(i).then(function(e){r.model.set({trackList:e});var t=r.findNextRadioTrack(e),n=0;void 0!==t&&(n=t.get("trackId"));return l.TracksManager.get(n,s)})};break;case"album":c=function(){return l.AlbumsManager.get(i,s).then(function(e){if(0!==e.length){var t=e[0].get("tracks").map(function(e){return e.id});e[0].close();if(t.length)return l.TracksManager.get(t,s)}else{console.warn("No album "+i+" found...");r.isDisabled=!0}})};break;case"playlist":c=function(){return l.PlaylistsManager.get(i,{userData:s.userData}).then(function(e){if(0!==e.length){var t=e[0].get("tracks").map(function(e){return e.id});e[0].close();if(t.length)return l.TracksManager.get(t,s).then(function(e){return e});console.warn("No track found. Disabled Play button.");r.isDisabled=!0}else{console.warn("No playlist "+i+" found...");r.isDisabled=!0}})};break;case"virtual":c=function(){return new Promise(function(e){var t=r.model.get("tracklist");t||(t=r.model.collection);if("toArray"in t)return e(t.toArray());e(t)})};break;case"track":default:c=function(){return l.TracksManager.get(i,s)}}c&&this.model.set({playOnClick:c},{silent:!0})}};t.prototype.updateVirtualTracklist=function(e){this.model.get("type")===e.type&&this.model.get("id")===e.id&&e.collection.length>0&&!this.isClose&&this.model.set({playOnClick:e.collection.first()})};t.prototype.onVirtualTrackListChange=function(){var e=this,t=this.model.changedAttributes();r.keys(t).forEach(function(t){var r=e.model.get(t);switch(t){case"virtualId":e.model.set("id",r);e.updateComponent(u.default.model.get("origin"),u.default.model.get("status"));u.default.on(u.default.Event.QUEUE,e.updateVirtualTracklist,e);o.trigger(e.model.get("id"))}})};t.prototype.render=function(){var t=this;return e.prototype.render.call(this).then(function(e){t.updateComponent(u.default.model.get("origin"),u.default.model.get("status"));return e})};t.prototype.events=function(){return{click:"onClickPlay"}};t.prototype.onClickPlay=function(e){i.createWebEnvironment();if(!this.isDisabled){this.activateComponent();if(this.$el.hasClass("is-toggled")){u.default.trigger(u.default.Event.PAUSE);this.$el.removeClass("is-toggled");this.$el.prop("title",this.$el.data("jam-title-play"))}else{if("radio"===this.model.get("type")){var r=this.model.get("context");this.model.set({context:t.Context[r]},{silent:!0});u.default.playRadio(this.model,this.$el)}else{var r=this.model.get("context");this.model.set({context:t.Context[r],wallpostId:this.model.get("wallpostId"),wallpostText:this.model.get("wallpostText")},{silent:!0});u.default.play(this.model.getModelProjection(),this.$el)}}return!1}};t.prototype.updateComponent=function(e,t){if("play"===t&&!this.model.get("restart")&&e.type===this.model.get("type")&&e.id===this.model.get("id")&&(this.model.get("offset")<0||e.offset===this.model.get("offset")||0===this.model.get("offset")&&e.offset<0)){this.$el.addClass("is-toggled");this.$el.prop("title",this.$el.data("jam-title-pause"))}else{this.$el.removeClass("is-toggled");this.$el.prop("title",this.$el.data("jam-title-play"))}this.$el.prop("disabled",this.isDisabled)};t.prototype.findNextRadioTrack=function(e){for(var t=Date.now()/1e3;e.models[1]&&e.models[1].get("datePlay")<t;)e.shift();return e.first()};t.prototype.close=function(){this.stopListening(u.default,u.default.Event.UPDATE,this.updateComponent);this.stopListening(this.model,"change",this.onVirtualTrackListChange);u.default.off(u.default.Event.QUEUE,this.updateVirtualTracklist,this);e.prototype.close.call(this)};t.TemplateStyle={Row:"row",Corner:"corner",Default:"button",Homepage:"homepage",Wallpost:"wallpost",Hero:"hero",HeroDesktop:"heroDesktop"};return t}(s.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/player/queue",["require","exports","../../../library/view/component","../../layout/player"],e)}(function(e,t){"use strict";
63Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=e("../../layout/player"),i=function(e){function t(t){return e.call(this,t)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/player/queue"};t.prototype.events=function(){return{click:"onClickQueue"}};t.prototype.onClickQueue=function(e){this.activateComponent();n.default.trigger(n.default.Event.QUEUE,this.model)};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/playlist/add",["require","exports","../../overlays","../../../library/view/loggedComponent"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../overlays"),n=e("../../../library/view/loggedComponent"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){switch(this.model.get("templateStyle")){case t.TemplateStyle.Hero:case t.TemplateStyle.HeroDesktop:case t.TemplateStyle.Icon:case t.TemplateStyle.IconOnBg:case t.TemplateStyle.IconRound:return"/components/playlist/"+this.model.get("templateStyle");default:return"/components/playlist/icon"}};t.prototype.events=function(){return{click:"onClickAddToPlaylist"}};t.prototype.onClickAddToPlaylist=function(e){var n=this;if(!this.isActive){this.activateComponent();var i={dialogType:"playlist"};this.isLogged(i).then(function(){var e=n.model.get("context");n.model.set({context:t.Context[e]},{silent:!0});r.default.add(r.default.DefinitionPath.AddToPlaylist,{model:n.model,userData:n.options.userData,closeModelOnClose:!1})})}};t.prototype.setId=function(e){this.model.set({id:e})};t.TemplateStyle={Hero:"hero",HeroDesktop:"heroDesktop",Icon:"icon",IconOnBg:"iconOnBg",IconRound:"iconRound"};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/playlist/downloadOptionButton",["require","exports","underscore","../options/option","../download/download"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../options/option"),i=e("../download/download"),o=function(e){function t(t){return e.call(this,r.extend(t,{templateVariables:{icon:"download",text:"_TKEY_WWW_MUSIC_download-fat"}}))||this}__extends(t,e);t.prototype.onClick=function(){this.activateComponent();this.model.set("type","playlist");i.default.startDownload(this.options.userData,this.model,this.$el)};return t}(n.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/playlist/favoriteOptionButton",["require","exports","underscore","../options/option","../../../managers/manager","../../../models/manager/favorite","ribsjs","../../../library/view/component","../../../library/dialog/toast"],e)}(function(e,t){"use strict";
63Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../options/option"),i=e("../../../managers/manager"),o=e("../../../models/manager/favorite"),a=e("ribsjs"),s=a.EventsManager,l=e("../../../library/view/component"),u=e("../../../library/dialog/toast"),c=function(e){function t(t){var n=e.call(this,r.extend(t,{templateVariables:{icon:"heart-on",text:"_TKEY_WWW_TOOLTIP_add-to-favorites"},model:new o.default(r.extend(t.model.attributes,{type:"playlist"}))}))||this;n.hasLoadedModel=!1;return n}__extends(t,e);t.prototype.onUserConnected=function(e){this.hasLoadedModel=!1;this.loadModelAndUpdateComponent()};t.prototype.onUserDisconnected=function(e){this.model.set("favorite",0);this.updateComponent()};t.prototype.onRenderStart=function(){e.prototype.onRenderStart.call(this);this.loadModelAndUpdateComponent()};t.prototype.onClick=function(){var e=this;this.activateComponent();this.isLogged({dialogType:"favorite"}).then(function(t){return e.executeFavoriteAction()})};t.prototype.loadModelAndUpdateComponent=function(){var e=this;if(this.hasLoadedModel)this.updateComponent();else{this.hasLoadedModel=!0;i.FavoritesManager.getByAttribute({id:this.model.get("id"),type:"playlist"},{userData:this.options.userData,fetchById:!0}).then(function(t){if(0===t.length)e.model.set({favorite:0},{reset:!1});else{e.model.set(t[0].attributes,{reset:!1});t[0].close()}e.updateComponent()})}};t.prototype.updateComponent=function(e){void 0===e&&(e=1===this.model.get("favorite"));
63if(e){this.options.templateVariables.cssClasses=["is-on"];this.options.templateVariables.text="_TKEY_WWW_TOOLTIP_remove-from-favorites"}else{this.options.templateVariables.cssClasses=[];this.options.templateVariables.text="_TKEY_WWW_TOOLTIP_add-to-favorites"}this.reRenderModelView()};t.prototype.showFavoriteChangedToast=function(e){void 0===e&&(e=1===this.model.get("favorite"));var t=e?"PLAYLIST_added-to-favorites":"PLAYLIST_removed-from-favorites";i.LocalizationManager.get("_TKEY_WWW_"+t,{userData:this.options.userData}).then(function(e){u.show(e[0].get("translate"));e[0].close()})};t.prototype.executeFavoriteAction=function(){var e=1===this.model.get("favorite");e?this.unFavorite():this.favorite();this.updateComponent(!e);this.showFavoriteChangedToast(!e)};t.prototype.unFavorite=function(){i.FavoritesManager.update(this.model,{favorite:0},{wait:!1,userData:this.options.userData});this.setFavorite(0,!0)({id:this.model.get("id"),type:"playlist"});s.trigger(t.Events.RemoveFromFavorite,{id:this.model.get("id"),type:"playlist"})};t.prototype.favorite=function(){var e=this,n=i.FavoritesManager.addFavorite({
64type:"playlist",id:this.model.get("id"),favorite:1},{wait:!1,userData:this.options.userData});this.model.set("favorite",1);n.once("change",function(){e.model.set(r.omit(n.attributes,"name"));e.setFavorite(1,!0)({id:e.model.get("id"),type:"playlist"})});s.trigger(t.Events.AddToFavorite,{id:this.model.get("id"),type:"playlist",favorite:this.model.get("favorite")})};t.prototype.setFavorite=function(e,t){var r=this;void 0===t&&(t=!0);return function(n){if(n.id===r.model.get("id")&&"playlist"===n.type){r.model.set("favorite",e);if(t){var i={id:r.model.get("id"),name:r.model.get("name"),type:"playlist",context:l.default.Context.PLAYLISTITEM};1===e?s.trigger("STATS:FAVORITE:ADD",i):s.trigger("STATS:FAVORITE:REMOVE",i)}}}};t.Events={AddToFavorite:"favorite:add",RemoveFromFavorite:"favorite:remove"};return t}(n.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/rating/rating",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/rating/rating"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/share/report",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/share/report"};return t}(r.default);t.default=n});!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("clipboard/clipboard",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;t.Clipboard=e()}}(function(){var e;return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){function n(e,t){for(;e&&e.nodeType!==i;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}var i=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var o=Element.prototype;o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector}t.exports=n},{}],2:[function(e,t,r){function n(e,t,r,n,o){var a=i.apply(this,arguments);e.addEventListener(r,a,o);return{destroy:function(){e.removeEventListener(r,a,o)}}}function i(e,t,r,n){return function(r){r.delegateTarget=o(r.target,t);r.delegateTarget&&n.call(e,r)}}
64var o=e("./closest");t.exports=n},{"./closest":1}],3:[function(e,t,r){r.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType};r.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||r.node(e[0]))};r.string=function(e){return"string"==typeof e||e instanceof String};r.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,r){function n(e,t,r){if(!e&&!t&&!r)throw new Error("Missing required arguments");if(!s.string(t))throw new TypeError("Second argument must be a String");if(!s.fn(r))throw new TypeError("Third argument must be a Function");if(s.node(e))return i(e,t,r);if(s.nodeList(e))return o(e,t,r);if(s.string(e))return a(e,t,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(e,t,r){e.addEventListener(t,r);return{destroy:function(){e.removeEventListener(t,r)}}}function o(e,t,r){Array.prototype.forEach.call(e,function(e){e.addEventListener(t,r)});return{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,r)})}}}function a(e,t,r){return l(document.body,e,t,r)}var s=e("./is"),l=e("delegate");t.exports=n},{"./is":3,delegate:2}],5:[function(e,t,r){function n(e){var t;if("SELECT"===e.nodeName){e.focus();t=e.value}else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var r=e.hasAttribute("readonly");r||e.setAttribute("readonly","");e.select();e.setSelectionRange(0,e.value.length);r||e.removeAttribute("readonly");t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),i=document.createRange();i.selectNodeContents(e);n.removeAllRanges();n.addRange(i);t=n.toString()}return t}t.exports=n},{}],6:[function(e,t,r){function n(){}n.prototype={on:function(e,t,r){var n=this.e||(this.e={});(n[e]||(n[e]=[])).push({fn:t,ctx:r});return this},once:function(e,t,r){function n(){i.off(e,n);t.apply(r,arguments)}var i=this;n._=t;return this.on(e,n,r)},emit:function(e){var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=r.length;for(n;n<i;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],i=[];if(n&&t)for(var o=0,a=n.length;o<a;o++)n[o].fn!==t&&n[o].fn._!==t&&i.push(n[o]);i.length?r[e]=i:delete r[e];return this}};t.exports=n},{}],7:[function(t,r,n){!function(i,o){if("function"==typeof e&&e.amd)e(["module","select"],o);else if(void 0!==n)o(r,t("select"));else{var a={exports:{}};o(a,i.select);i.clipboardAction=a.exports}}(this,function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=function(e){return e&&e.__esModule?e:{default:e}}(t),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(t,r,n){r&&e(t.prototype,r);n&&e(t,n);return t}}(),a=function(){function e(t){r(this,e);this.resolveOptions(t);this.initSelection()}o(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action;this.container=e.container;this.emitter=e.emitter;this.target=e.target;this.text=e.text;this.trigger=e.trigger;this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake();this.fakeHandlerCallback=function(){return e.removeFake()};this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0;this.fakeElem=document.createElement("textarea");this.fakeElem.style.fontSize="12pt";this.fakeElem.style.border="0";this.fakeElem.style.padding="0";this.fakeElem.style.margin="0";this.fakeElem.style.position="absolute";this.fakeElem.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=r+"px";this.fakeElem.setAttribute("readonly","");this.fakeElem.value=this.text;this.container.appendChild(this.fakeElem);this.selectedText=(0,n.default)(this.fakeElem);this.copyText()}},{key:"removeFake",value:function(){if(this.fakeHandler){this.container.removeEventListener("click",this.fakeHandlerCallback);this.fakeHandler=null;this.fakeHandlerCallback=null}if(this.fakeElem){this.container.removeChild(this.fakeElem);this.fakeElem=null}}},{key:"selectTarget",value:function(){this.selectedText=(0,n.default)(this.target);this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus();window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";this._action=e;if("copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]);return e}();e.exports=a})},{select:5}],8:[function(t,r,n){!function(i,o){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],o);else if(void 0!==n)o(r,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var a={exports:{}};o(a,i.clipboardAction,i.tinyEmitter,i.goodListener);i.clipboard=a.exports}}(this,function(e,t,r,n){"use strict";
64function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var r="data-clipboard-"+e;if(t.hasAttribute(r))return t.getAttribute(r)}var u=i(t),c=i(r),d=i(n),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(t,r,n){r&&e(t.prototype,r);n&&e(t,n);return t}}(),h=function(e){function t(e,r){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.resolveOptions(r);n.listenClick(e);return n}s(t,e);f(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction;this.target="function"==typeof e.target?e.target:this.defaultTarget;this.text="function"==typeof e.text?e.text:this.defaultText;this.container="object"===p(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,d.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null);this.clipboardAction=new u.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return l("action",e)}},{key:"defaultTarget",value:function(e){var t=l("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return l("text",e)}},{key:"destroy",value:function(){this.listener.destroy();if(this.clipboardAction){this.clipboardAction.destroy();this.clipboardAction=null}}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,r=!!document.queryCommandSupported;t.forEach(function(e){r=r&&!!document.queryCommandSupported(e)});return r}}]);return t}(c.default);e.exports=h})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)});define("clipboard",["clipboard/clipboard"],function(e){return e});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/share/share",["require","exports","ribsjs","clipboard","../../../library/view/component","../../../library/dialog/toast","../../../managers/manager","FSEventDispatcher"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("ribsjs"),n=e("clipboard"),i=e("../../../library/view/component"),o=e("../../../library/dialog/toast"),a=e("../../../managers/manager"),s=e("FSEventDispatcher"),l=r.EventsManager,u=function(e){function t(t){var r=e.call(this,t)||this;if("clipboard"===r.model.get("serviceName")){r.clipboard=new n(".js-clipboard-btn");r.clipboard.on("success",function(e){a.LocalizationManager.get("_TKEY_WWW_TOOLTIP_share-on-clipboard-success",{userData:r.options.userData}).then(function(e){var t=e[0].get("translate");o.show(t);e[0].close()})});r.clipboard.on("error",function(e){a.LocalizationManager.get("_TKEY_WWW_TOOLTIP_share-on-clipboard-error",{userData:r.options.userData}).then(function(e){var t=e[0].get("translate");o.show(t);e[0].close()})})}return r}__extends(t,e);t.prototype.close=function(){"clipboard"===this.model.get("serviceName")&&this.clipboard.destroy();e.prototype.close.call(this)};t.prototype.getTemplateId=function(){var e="";switch(this.model.get("serviceName")){case"facebook":e="/components/share/facebookIconRound";break;case"twitter":e="/components/share/twitterIconRound";break;case"google":e="/components/share/googleIconRound";break;case"reddit":e="/components/share/redditIconRound";break;case"os":e="/components/share/osIconRound";break;case"vk":e="/components/share/vkIconRound";break;case"clipboard":e="/components/share/clipboardIconRound"}"big"===this.model.get("templateStyle")&&(e+="Big");return e};t.prototype.events=function(){return{"click a":"onClickShare"}};t.prototype.onClickShare=function(e){this.activateComponent();l.trigger("STATS:SHARE:CLICK",{id:this.model.get("id"),name:this.model.get("name"),type:this.model.get("type"),service:this.model.get("serviceName"),context:t.Context[this.model.get("context")]});switch(this.model.get("serviceName")){case"facebook":if(s.default.Mediator.triggerResult(t.ShareEvents.ShareFacebook,this.model).indexOf(!0)>-1){e.preventDefault();return!1}break;case"twitter":if(s.default.Mediator.triggerResult(t.ShareEvents.ShareTwitter,this.model).indexOf(!0)>-1){e.preventDefault();return!1}break;case"google":if(s.default.Mediator.triggerResult(t.ShareEvents.ShareGoogle,this.model).indexOf(!0)>-1){e.preventDefault();return!1}break;case"reddit":if(s.default.Mediator.triggerResult(t.ShareEvents.ShareReddit,this.model).indexOf(!0)>-1){e.preventDefault();return!1}break;case"os":if(s.default.Mediator.triggerResult(t.ShareEvents.ShareOS,this.model).indexOf(!0)>-1){e.preventDefault();return!1}break;case"vk":if(s.default.Mediator.triggerResult(t.ShareEvents.ShareVK,this.model).indexOf(!0)>-1){e.preventDefault();return!1}break;case"clipboard":if(s.default.Mediator.triggerResult(t.ShareEvents.ShareClipboard,this.model).indexOf(!0)>-1){e.preventDefault();return!1}}};
64t.ShareEvents={ShareFacebook:"sharefacebook",ShareTwitter:"sharetwitter",ShareGoogle:"sharegoogle",ShareReddit:"sharereddit",ShareOS:"shareos",ShareVK:"sharevk",ShareClipboard:"shareclipboard"};return t}(i.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/share/shareMgr",["require","exports","underscore","FSEventDispatcher","../../../library/model/model","../../../library/view/component","../../../configuration/configuration","../../../vendor/phpjs/phpjs","../../../managers/manager","./share"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("FSEventDispatcher"),i=e("../../../library/model/model"),o=e("../../../library/view/component"),a=e("../../../configuration/configuration"),s=e("../../../vendor/phpjs/phpjs"),l=e("../../../managers/manager"),u=e("./share"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/share/shareMgrHero"};t.prototype.render=function(){var t=this;return l.LocalizationManager.get("_TKEY_WWW_GENERIC_share-message",{userData:this.options.userData}).then(function(r){t.checkService(r[0].get("translate"));r[0].close();return e.prototype.render.call(t)})};t.prototype.checkService=function(e){var o="",l="";if("retrospective"!==this.model.get("type")||"user"!==this.model.get("type")){var c=void 0;c=void 0!==this.model.get("idstr")?this.model.get("idstr"):this.model.get("id");o=s.default.strings.sprintf(a.default.application.shortUrl[this.model.get("type")],c)}else o=a.default.application.websiteProtocol+a.default.application.websiteHostname+this.model.get("pageUrl");/\.[a-z]+[0-9]$/.test(o)&&(o=o.slice(0,o.length-1));l=this.model.get("name");var d=this.model.get("cover"),p={pageUrl:o,pageText:s.default.strings.sprintf(e,l,a.default.application.websiteName),pageVia:"Jamendo",pageRelated:"Jamendo",pageTags:this.model.get("tags"),pageImage:d&&"object"==typeof d.small&&null!==d.small?d.small.size50:void 0,pageTitle:"",id:this.model.get("id"),name:this.model.get("name"),type:this.model.get("type"),context:this.model.get("context")};-1===n.default.Mediator.triggerResult(t.ShareEvents.CanShareViaFacebook).indexOf(!1)&&this.addView(".js-sharemgr",new u.default({model:new i.default(r.extend({serviceName:"facebook"},p)),userData:this.options.userData}));-1===n.default.Mediator.triggerResult(t.ShareEvents.CanShareViaTwitter).indexOf(!1)&&this.addView(".js-sharemgr",new u.default({model:new i.default(r.extend({serviceName:"twitter"},p,{pageText:s.default.strings.sprintf(e,encodeURIComponent(l),a.default.application.websiteName),pageTags:encodeURIComponent(this.model.get("tags"))})),userData:this.options.userData}));-1===n.default.Mediator.triggerResult(t.ShareEvents.CanShareViaGoogle).indexOf(!1)&&this.addView(".js-sharemgr",new u.default({model:new i.default(r.extend({serviceName:"google"},p)),userData:this.options.userData}));-1===n.default.Mediator.triggerResult(t.ShareEvents.CanShareViaReddit).indexOf(!1)&&this.addView(".js-sharemgr",new u.default({model:new i.default(r.extend({serviceName:"reddit"},p,{pageTitle:s.default.strings.sprintf(e,encodeURIComponent(l),a.default.application.websiteName)})),userData:this.options.userData}));n.default.Mediator.triggerResult(t.ShareEvents.CanShareViaOS).indexOf(!0)>-1&&this.addView(".js-sharemgr",new u.default({model:new i.default(r.extend({serviceName:"os"},p)),userData:this.options.userData}));n.default.Mediator.triggerResult(t.ShareEvents.CanShareViaVK).indexOf(!0)>-1&&this.addView(".js-sharemgr",new u.default({model:new i.default(r.extend({serviceName:"vk"},p)),userData:this.options.userData}));n.default.Mediator.triggerResult(t.ShareEvents.CanShareViaClipboard).indexOf(!0)>-1&&this.addView(".js-sharemgr",new u.default({model:new i.default(r.extend({serviceName:"clipboard"},p)),userData:this.options.userData}))};t.ShareEvents={CanShareViaFacebook:"canshareviafacebook",CanShareViaGoogle:"canshareviagoogle",CanShareViaTwitter:"canshareviatwitter",CanShareViaReddit:"canshareviareddit",CanShareViaOS:"canshareviaos",CanShareViaVK:"canshareviavk",CanShareViaClipboard:"canshareviaclipboard"};return t}(o.default);t.default=c});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/share/social",["require","exports","underscore","../../../library/view/component","../../overlays","../../../managers/manager","FSEventDispatcher","../../../vendor/phpjs/phpjs","../../../configuration/configuration","../../../library/model/model","FSPromise","chrisweb-utilities","../../../library/utilities/user","../../../library/utilities/route","speakingurl","./share"],e)}(function(e,t){"use strict";
64Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../library/view/component"),i=e("../../overlays"),o=e("../../../managers/manager"),a=e("FSEventDispatcher"),s=e("../../../vendor/phpjs/phpjs"),l=e("../../../configuration/configuration"),u=e("../../../library/model/model"),c=e("FSPromise"),d=c.FSPromise,p=e("chrisweb-utilities"),f=e("../../../library/utilities/user"),h=e("../../../library/utilities/route"),m=e("speakingurl"),y=e("./share"),g=function(e){function t(t){return e.call(this,r.extend({loadingStyle:{template:"li"}},t))||this}__extends(t,e);t.prototype.getTemplateId=function(){switch(this.model.get("templateStyle")){case t.TemplateStyle.Hero:case t.TemplateStyle.HeroDesktop:case t.TemplateStyle.HeroOverlay:case t.TemplateStyle.HeroDesktopOverlay:case t.TemplateStyle.Icon:case t.TemplateStyle.IconOnBg:case t.TemplateStyle.IconRound:return"/components/share/"+this.model.get("templateStyle");default:return"/components/share/icon"}};t.prototype.events=function(){return{click:"onClickShare"}};t.prototype.render=function(){var t=this;return o.LocalizationManager.get("_TKEY_WWW_GENERIC_share-message",{userData:this.options.userData}).then(function(r){t.shareMessage=r[0].get("translate");r[0].close();return e.prototype.render.call(t)})};t.prototype.onClickShare=function(e){var r=this;this.activateComponent();var n,s=this.model.get("type"),l=this.options.userData;switch(s){case"community":n=t.SocialType[s].manager.getByAttribute({name:this.model.get("idstr")},{userData:l,dataParameters:{lang:f.default.getUserLanguage(l)}});break;default:n=t.SocialType[s].manager.get(this.model.get("id"),{userData:l})}n.then(function(e){if(e.length){var t=e[0];r.model.set(t.attributes);t.close();return new d(function(e,t){switch(s){case"playlist":"public"!==r.model.get("status")?i.default.add(i.default.DefinitionPath.SharePrivatePlaylist,{model:r.model,userData:l,closeModelOnClose:!1,resolve:e,reject:t}):e();break;case"radio":o.LocalizationManager.get("_TKEY_WWW_RADIO_"+r.model.get("idstr")+"-title",{userData:r.options.userData}).then(function(e){r.model.set("name",e[0].get("translate"));e[0].close()});e();break;case"user":var n=m(p.default.safeUnescape(r.model.get("dispname")));r.model.set("name",n);e();break;default:e()}})}}).then(function(e){-1===a.default.Mediator.triggerResult(y.default.ShareEvents.ShareOS,new u.default(r.getDataShare())).indexOf(!0)&&i.default.add(i.default.DefinitionPath.Share,{model:r.model,userData:l,closeModelOnClose:!1})})};t.prototype.getDataShare=function(){var e="";switch(this.model.get("type")){case"track":e=s.default.strings.sprintf(l.default.application.shortUrl.track,this.model.get("id"));break;case"album":e=s.default.strings.sprintf(l.default.application.shortUrl.album,this.model.get("id"));break;case"playlist":e=s.default.strings.sprintf(l.default.application.shortUrl.playlist,this.model.get("id"));break;case"community":e=s.default.strings.sprintf(l.default.application.shortUrl.community,this.model.get("name"));break;case"radio":e=s.default.strings.sprintf(l.default.application.shortUrl.radio,this.model.get("idstr"));break;case"artist":e=s.default.strings.sprintf(l.default.application.shortUrl.artist,this.model.get("id"));break;case"user":e=s.default.strings.sprintf(l.default.application.shortUrl.retrospective,h.default.getUrl("user",{id:this.model.get("id"),name:this.model.get("name")}))}return{pageUrl:e,pageText:s.default.strings.sprintf(this.shareMessage,this.model.get("name"),l.default.application.websiteName),pageVia:"Jamendo",pageRelated:"Jamendo",pageTags:"",pageImage:"",pageTitle:""}};t.TemplateStyle={Hero:"hero",HeroDesktop:"heroDesktop",HeroOverlay:"heroOverlay",HeroDesktopOverlay:"heroDesktopOverlay",Icon:"icon",IconOnBg:"iconOnBg",IconRound:"iconRound"};t.SocialType={track:{manager:o.TracksManager},album:{manager:o.AlbumsManager},artist:{manager:o.ArtistsManager},playlist:{manager:o.PlaylistsManager},radio:{manager:o.RadiosManager},community:{manager:o.TagsManager},user:{manager:o.UserManager}};return t}(n.default);t.default=g});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/users/sentiment",["require","exports","underscore","../../../library/view/loggedComponent","../../../managers/manager","FSPromise","../../../models/manager/sentiment"],e)}(function(e,t){"use strict";
64Object.defineProperty(t,"__esModule",{value:!0});var r,n=e("underscore"),i=e("../../../library/view/loggedComponent"),o=e("../../../managers/manager"),a=e("FSPromise"),s=a.FSPromise,l=e("../../../models/manager/sentiment");!function(e){e[e.Disagree=0]="Disagree";e[e.Agree=1]="Agree";e[e.Neutral=-1]="Neutral"}(r||(r={}));var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.listenTo(this.model,"change",this.onAttributeChange)};t.prototype.render=function(){var r=this,n={openDialog:!1};return new s(function(e,i){r.isLogged(n).then(function(){return r.onUserConnected()}).then(function(){e()}).catch(function(){r.sentiment=new l.default(t.DefaultSentiment);e()})}).then(function(){if(!r.isClose)return e.prototype.render.call(r)})};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.$agreeButton=this.$(".js-sentiment-agreeCnt-button");this.$agreeCount=this.$(".js-sentiment-agreeCnt");this.$disagreeButton=this.$(".js-sentiment-disagreeCnt-button");this.$disagreeCount=this.$(".js-sentiment-disagreeCnt");if(this.sentiment&&this.sentiment.get("agreeType")>-1)if(this.sentiment.get("agreeType")){this.$agreeButton.addClass("is-on");this.model.set("agreeCnt",this.model.get("agreeCnt")+1)}else{this.$disagreeButton.addClass("is-on");this.model.set("disagreeCnt",this.model.get("disagreeCnt")+1)}};t.prototype.onAttributeChange=function(){var e=this,t=this.model.changedAttributes();n.keys(t).forEach(function(t){var r=e.model.get(t);switch(t){case"agreeCnt":e.$agreeCount.text(r);break;case"disagreeCnt":e.$disagreeCount.text(r)}})};t.prototype.events=function(){return{"click .js-sentiment-agreeCnt-button":"onClickThumbsUp","click .js-sentiment-disagreeCnt-button":"onClickThumbsDown"}};t.prototype.getTemplateId=function(){return"/components/users/sentiment"};t.prototype.onClickThumbsUp=function(e){this.setSentiment(1)};t.prototype.onClickThumbsDown=function(e){this.setSentiment(0)};t.prototype.setSentiment=function(e){var t=this,r={dialogType:"sentiment"};this.isLogged(r).then(function(){if(t.sentiment.get("agreeType")!==e){var r=e?"agreeCnt":"disagreeCnt",i=e?"disagreeCnt":"agreeCnt",a={userData:t.options.userData};if(t.sentiment.get("agreeDate")){n.extend(a,{type:"PATCH",patch:!0});t.model.set(i,parseInt(t.model.get(i),10)-1)}else n.extend(a,{type:"POST"});t.sentiment.set({agreeDate:Date.now(),agreeType:e});t.model.set(r,parseInt(t.model.get(r),10)+1);o.SentimentManager.update(t.sentiment,{agreeType:e,reviewId:t.model.get("reviewId")},a);t.trigger("change:sentiment",{agreeCnt:t.model.get("agreeCnt"),disagreeCnt:t.model.get("disagreeCnt")});if(e){t.$agreeButton.addClass("is-on");t.$disagreeButton.removeClass("is-on")}else{t.$disagreeButton.addClass("is-on");t.$agreeButton.removeClass("is-on")}}})};t.prototype.onUserConnected=function(e){var r=this;return o.SentimentManager.getByAttribute({reviewId:this.model.get("reviewId")},{userData:this.options.userData,projection:l.default}).then(function(e){var n=r.sentiment=e[0];if(r.sentiment&&r.sentiment.get("agreeType")>-1)r.$agreeButton&&r.$disagreeButton&&(r.sentiment.get("agreeType")?r.$agreeButton.addClass("is-on"):r.$disagreeButton.addClass("is-on"));else{r.sentiment=o.SentimentManager.add(new l.default(t.DefaultSentiment));n&&n.close()}})};t.prototype.onUserDisconnected=function(e){if(this.$agreeButton&&this.$disagreeButton){this.$agreeButton.removeClass("is-on");this.$disagreeButton.removeClass("is-on")}};t.prototype.close=function(){this.stopListening(this.model,"change",this.onAttributeChange);if(this.sentiment){this.sentiment.close();this.sentiment=null}e.prototype.close.call(this)};t.SentimentType={Review:"review",Artist:"artist",Playlist:"playlist",Track:"track"};t.DefaultSentiment={reviewId:0,agreeType:r.Neutral};return t}(i.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r)
65;t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/date/birth",["require","exports","underscore","jquery","moment","chrisweb-utilities","../../../library/view/component"],e)}(function(e,t){"use strict";
65Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("jquery"),i=e("moment"),o=e("chrisweb-utilities"),a=e("../../../library/view/component"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/date/birth"};t.prototype.onInitializeStart=function(){e.prototype.onInitializeStart.call(this);var t="other";o.default.isClient()&&"undefined"!=typeof navigator&&void 0!==navigator.language&&"us"===navigator.language.slice(-2).toLowerCase()&&(t="us");this.model.set("dateCountry",t)};t.prototype.onRender=function(){e.prototype.onRender.call(this);var t,o,a;if(void 0!==this.model.get("birthdate")&&""!==this.model.get("birthdate")){var s=this.model.get("birthdate");t=i(s).format("DD");o=i(s).format("MM");a=i(s).format("YYYY")}for(var l=(i.locale(this.model.get("userLanguage")),r.range(1,32)),u=r.map(l,function(e){return e<10?"0"+e:e}),c=r.range(1,13),d=r.map(c,function(e){return e<10?"0"+e:e}),p=[],f=parseInt(i().format("YYYY")),h=f-100,m=f;m>=h;m--)p.push(m);var y=this.$("#birthdateDay"),g=this.$("#birthdateMonth"),v=this.$("#birthdateYear");u.forEach(function(e){y.append(n("<option></option>").attr("value",e).text(e))});void 0!==t&&y.val(t);d.forEach(function(e){g.append(n("<option></option>").attr("value",e).text(e))});void 0!==o&&g.val(o);p.forEach(function(e){v.append(n("<option></option>").attr("value",e).text(e))});void 0!==a&&v.val(a)};return t}(a.default);t.default=s});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/retrospective/album",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/retrospective/album"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/retrospective/newcomer",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/retrospective/newcomer"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/search/formSuggest",["require","exports","../../../library/view/component"],e)}(function(e,t){"use strict";
65Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/search/formSuggest"};return t}(r.default);t.default=n});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/logo/button",["require","exports","../../../library/view/component","ribsjs"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/component"),n=e("ribsjs"),i=n.EventsManager,o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/components/logo/button"};t.prototype.events=function(){return{click:"onClickButton"}};t.prototype.onClickButton=function(e){e.preventDefault();this.activateComponent();i.trigger("STATS:HEADER:LOGOCLICK",{});var t=e.target.pathname;i.trigger("navigate",{url:t})};return t}(r.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/review/deleteOptionButton",["require","exports","underscore","../../../managers/manager","ribsjs","../options/option","../../../library/dialog/toast","../../overlays"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../managers/manager"),i=e("ribsjs"),o=i.EventsManager,a=e("../options/option"),s=e("../../../library/dialog/toast"),l=e("../../overlays"),u=function(e){function t(t){return e.call(this,r.extend(t,{templateVariables:{icon:"trash",text:"_TKEY_WWW_REVIEW_delete-review"}}))||this}__extends(t,e);t.prototype.onClick=function(){var e=this,t=this.options.userData;l.default.add(l.default.DefinitionPath.DeleteComment,{model:this.model,userData:this.options.userData,closeModelOnClose:!1}).then(function(r){e.listenTo(r,r.Events.DELETE_CONFIRM,function(){$(e.el).addClass("is-disabled");n.ReviewsManager.remove({id:e.model.get("id"),joinId:e.model.get("joinId"),type:e.model.get("type")},{userData:t}).then(function(){$(e.model.get("selector")).addClass("hidden").remove();n.LocalizationManager.get("_TKEY_WWW_REVIEW_review-deleted",{userData:t}).then(function(e){s.show(e[0].get("translate"));e[0].close()})}).catch(function(){$(e.el).removeClass("is-disabled");n.LocalizationManager.get("_TKEY_WWW_ERROR_error-occured",{userData:t}).then(function(e){s.show(e[0].get("translate"));e[0].close()})});o.trigger("comment:delete:finished",e.model.get("id"))});e.listenTo(r,r.Events.DELETE_CANCEL,function(){$(e.el).removeClass("is-disabled")})})};return t}(a.default);t.default=u});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/components/review/reportAbuseOptionButton",["require","exports","underscore","../options/option","../../../library/utilities/route"],e)}(function(e,t){"use strict";
65Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../options/option"),i=e("../../../library/utilities/route"),o=function(e){function t(t){return e.call(this,r.extend(t,{templateVariables:{icon:"flag",text:"_TKEY_WWW_TOOLTIP_report-abuse"}}))||this}__extends(t,e);t.prototype.onClick=function(){var e=this.model.get("router");if(e&&"function"==typeof e.navigate){var t=i.default.getUrl("contact",{category:"AbuseReport",type:"review",id:this.model.get("id")});e.navigate(t,{trigger:!0})}};return t}(n.default);t.default=o});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/overlays/header",["require","exports","../../library/view/loading","underscore"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../library/view/loading"),n=e("underscore"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){return"/overlays/header"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);this.model.set(n.defaults(this.model.attributes,t.DefaultInformation))};t.prototype.onRender=function(){e.prototype.onRender.call(this);this.model.get("prefix")||this.$(".js-overlay-bar-info").find("br").remove()};t.DefaultInformation={prefix:"",title:""};return t}(r.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/section/header/header",["require","exports","underscore","../../../../library/view/loading"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("underscore"),n=e("../../../../library/view/loading"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/section/header/";return this.options.hasAction?this.options.hasSelect?e+"selectAction":e+"basicAction":this.options.hasEdit?e+"basicEdit":e+"basic"};t.prototype.onInitialize=function(){e.prototype.onInitialize.call(this);r.extend(this.options.templateVariables,{headingKey:this.options.headingKey,headingSprintf:this.options.headingSprintf,subheadingKey:this.options.subheadingKey})};return t}(n.default);t.default=i});var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r);t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("Server/scripts/views/partials/jobs/header",["require","exports","../../../library/view/loading","../../../library/utilities/display"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../../library/view/loading"),n=e("../../../library/utilities/display"),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;t.isExpanded=!1;return t}__extends(t,e);t.prototype.getTemplateId=function(){var e="/partials/jobs/header";n.default.getMaxEntitiesCount("DesktopDesign")>0&&(e+="Desktop");return e};return t}(r.default);t.default=i});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.