diff --git a/dashboard-ui/bower_components/emby-lazyload-image/lazyload-image.html b/dashboard-ui/bower_components/emby-lazyload-image/lazyload-image.html new file mode 100644 index 000000000..2fedd0397 --- /dev/null +++ b/dashboard-ui/bower_components/emby-lazyload-image/lazyload-image.html @@ -0,0 +1,105 @@ + \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index f8057767e..77029be32 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.2.35", - "_release": "1.2.35", + "version": "1.2.38", + "_release": "1.2.38", "_resolution": { "type": "version", - "tag": "1.2.35", - "commit": "7fe2a2677888e953d429ea985a8690af179faa06" + "tag": "1.2.38", + "commit": "ab981369a76f26211bc81fa383c3cb64f2298399" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js b/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js index b63e71681..4b3f17b24 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js +++ b/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js @@ -4,16 +4,8 @@ define([], function () { if (elem.tagName !== "IMG") { - return new Promise(function (resolve, reject) { - - var tmp = new Image(); - - tmp.onload = function () { - elem.style.backgroundImage = "url('" + url + "')"; - resolve(elem); - }; - tmp.src = url; - }); + elem.style.backgroundImage = "url('" + url + "')"; + return Promise.resolve(elem); } else { elem.setAttribute("src", url); diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js b/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js index 4a0c5b588..bc1ebc769 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js +++ b/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js @@ -4,16 +4,8 @@ define(['cryptojs-md5'], function () { if (elem.tagName !== "IMG") { - return new Promise(function (resolve, reject) { - - var tmp = new Image(); - - tmp.onload = function () { - elem.style.backgroundImage = "url('" + url + "')"; - resolve(elem); - }; - tmp.src = url; - }); + elem.style.backgroundImage = "url('" + url + "')"; + return Promise.resolve(elem); } else { elem.setAttribute("src", url); diff --git a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js index 7347a3605..f7bdc50b3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js +++ b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js @@ -1,4 +1,4 @@ -define(['layoutManager', 'MaterialSpinner', 'css!./loading'], function (layoutManager) { +define(['MaterialSpinner', 'css!./loading'], function () { return { show: function () { @@ -11,10 +11,6 @@ define(['layoutManager', 'MaterialSpinner', 'css!./loading'], function (layoutMa elem.classList.add('mdl-spinner'); elem.classList.add('mdl-js-spinner'); - if (layoutManager.tv) { - elem.classList.add('tv'); - } - document.body.appendChild(elem); componentHandler.upgradeElement(elem, 'MaterialSpinner'); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css b/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css index e9638958e..84e3f23f4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css +++ b/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css @@ -1,21 +1,14 @@ .docspinner { - margin-top: -4vh; - margin-left: -4vh; - width: 7vh; - height: 7vh; + margin-top: -5vh; + margin-left: -5vh; + width: 10vh; + height: 10vh; position: fixed; top: 50%; left: 50%; z-index: 9999999; } - .docspinner.tv { - margin-top: -5vh; - margin-left: -5vh; - width: 10vh; - height: 10vh; - } - .loadingHide { display: none !important; -} \ No newline at end of file +} diff --git a/dashboard-ui/bower_components/emby-webcomponents/loading/loading.js b/dashboard-ui/bower_components/emby-webcomponents/loading/loading.js index 88c405269..c900612b2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/loading/loading.js +++ b/dashboard-ui/bower_components/emby-webcomponents/loading/loading.js @@ -1,4 +1,4 @@ -define(['layoutManager', 'paper-spinner', 'css!./loading'], function (layoutManager) { +define(['paper-spinner', 'css!./loading'], function () { return { show: function () { @@ -9,10 +9,6 @@ define(['layoutManager', 'paper-spinner', 'css!./loading'], function (layoutMana elem = document.createElement("paper-spinner"); elem.classList.add('docspinner'); - if (layoutManager.tv) { - elem.classList.add('tv'); - } - document.body.appendChild(elem); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css b/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css index adfc96e80..3be6d92da 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css +++ b/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css @@ -1,4 +1,4 @@ -.smoothScrollX { +.smoothScrollX, .hiddenScrollX { overflow-x: auto; -webkit-overflow-scrolling: touch; overflow-y: hidden; @@ -6,45 +6,30 @@ white-space: nowrap; } -.hiddenScrollX { - overflow-x: scroll; - -webkit-overflow-scrolling: touch; - overflow-y: hidden; - white-space: nowrap; - scroll-behavior: smooth; -} - -.hiddenScrollX, .layout-tv .smoothScrollX, .layout-mobile .smoothScrollX { +.hiddenScrollX, .layout-tv .smoothScrollX { -ms-overflow-style: none; overflow: -moz-scrollbars-none; } - .hiddenScrollX::-webkit-scrollbar, .layout-tv .smoothScrollX::-webkit-scrollbar, .layout-mobile .smoothScrollX::-webkit-scrollbar { + .hiddenScrollX::-webkit-scrollbar, .layout-tv .smoothScrollX::-webkit-scrollbar { height: 0 !important; display: none; } -.smoothScrollY { +.smoothScrollY, .hiddenScrollY { overflow-y: auto; -webkit-overflow-scrolling: touch; overflow-x: hidden; scroll-behavior: smooth; } -.hiddenScrollY, .layout-tv .smoothScrollY, .layout-mobile .smoothScrollY { - overflow-y: auto; - -webkit-overflow-scrolling: touch; - overflow-x: hidden; - scroll-behavior: smooth; -} - -.hiddenScrollY { +.hiddenScrollY, .layout-tv .smoothScrollY { -ms-overflow-style: none; overflow: -moz-scrollbars-none; } - .hiddenScrollY::-webkit-scrollbar, .layout-tv .smoothScrollY::-webkit-scrollbar, .layout-mobile .smoothScrollY::-webkit-scrollbar { + .hiddenScrollY::-webkit-scrollbar, .layout-tv .smoothScrollY::-webkit-scrollbar { width: 0 !important; display: none; } diff --git a/dashboard-ui/bower_components/fingerprintjs2/.bower.json b/dashboard-ui/bower_components/fingerprintjs2/.bower.json index 27ed05f07..f88ebae8e 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/.bower.json +++ b/dashboard-ui/bower_components/fingerprintjs2/.bower.json @@ -23,15 +23,14 @@ "spec" ], "homepage": "https://github.com/Valve/fingerprintjs2", - "version": "1.1.3", - "_release": "1.1.3", + "version": "1.1.4", + "_release": "1.1.4", "_resolution": { "type": "version", - "tag": "1.1.3", - "commit": "49e2c11cf08c13e12bf38185cec9ae159025e526" + "tag": "1.1.4", + "commit": "ae5719db3d942a1a84ab43b707d4d1c34138934e" }, "_source": "https://github.com/Valve/fingerprintjs2.git", "_target": "^1.1.3", - "_originalSource": "fingerprintjs2", - "_direct": true + "_originalSource": "fingerprintjs2" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js b/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js index a011c60e5..c2a5d2c02 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js +++ b/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js @@ -1,2 +1,2 @@ -!function(e,t,i){"use strict";"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define(i):t[e]=i()}("Fingerprint2",this,function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var i;if(null==this)throw new TypeError("'this' is null or undefined");var a=Object(this),r=a.length>>>0;if(0===r)return-1;var n=+t||0;if(Math.abs(n)===1/0&&(n=0),n>=r)return-1;for(i=Math.max(n>=0?n:r-Math.abs(n),0);r>i;){if(i in a&&a[i]===e)return i;i++}return-1});var e=function(e){var t={swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",detectScreenOrientation:!0,sortPluginsFor:[/palemoon/i]};this.options=this.extend(e,t),this.nativeForEach=Array.prototype.forEach,this.nativeMap=Array.prototype.map};return e.prototype={extend:function(e,t){if(null==e)return t;for(var i in e)null!=e[i]&&t[i]!==e[i]&&(t[i]=e[i]);return t},log:function(e){window.console&&console.log(e)},get:function(e){var t=[];t=this.userAgentKey(t),t=this.languageKey(t),t=this.colorDepthKey(t),t=this.screenResolutionKey(t),t=this.availableScreenResolutionKey(t),t=this.timezoneOffsetKey(t),t=this.sessionStorageKey(t),t=this.localStorageKey(t),t=this.indexedDbKey(t),t=this.addBehaviorKey(t),t=this.openDatabaseKey(t),t=this.cpuClassKey(t),t=this.platformKey(t),t=this.doNotTrackKey(t),t=this.pluginsKey(t),t=this.canvasKey(t),t=this.webglKey(t),t=this.adBlockKey(t),t=this.hasLiedLanguagesKey(t),t=this.hasLiedResolutionKey(t),t=this.hasLiedOsKey(t),t=this.hasLiedBrowserKey(t),t=this.touchSupportKey(t);var i=this;this.fontsKey(t,function(t){var a=[];i.each(t,function(e){var t=e.value;"undefined"!=typeof e.value.join&&(t=e.value.join(";")),a.push(t)});var r=i.x64hash128(a.join("~~~"),31);return e(r,t)})},userAgentKey:function(e){return this.options.excludeUserAgent||e.push({key:"user_agent",value:this.getUserAgent()}),e},getUserAgent:function(){return navigator.userAgent},languageKey:function(e){return this.options.excludeLanguage||e.push({key:"language",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),e},colorDepthKey:function(e){return this.options.excludeColorDepth||e.push({key:"color_depth",value:screen.colorDepth}),e},screenResolutionKey:function(e){return this.options.excludeScreenResolution?e:this.getScreenResolution(e)},getScreenResolution:function(e){var t;return t=this.options.detectScreenOrientation&&screen.height>screen.width?[screen.height,screen.width]:[screen.width,screen.height],"undefined"!=typeof t&&e.push({key:"resolution",value:t}),e},availableScreenResolutionKey:function(e){return this.options.excludeAvailableScreenResolution?e:this.getAvailableScreenResolution(e)},getAvailableScreenResolution:function(e){var t;return screen.availWidth&&screen.availHeight&&(t=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]),"undefined"!=typeof t&&e.push({key:"available_resolution",value:t}),e},timezoneOffsetKey:function(e){return this.options.excludeTimezoneOffset||e.push({key:"timezone_offset",value:(new Date).getTimezoneOffset()}),e},sessionStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasSessionStorage()&&e.push({key:"session_storage",value:1}),e},localStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasLocalStorage()&&e.push({key:"local_storage",value:1}),e},indexedDbKey:function(e){return!this.options.excludeIndexedDB&&this.hasIndexedDB()&&e.push({key:"indexed_db",value:1}),e},addBehaviorKey:function(e){return document.body&&!this.options.excludeAddBehavior&&document.body.addBehavior&&e.push({key:"add_behavior",value:1}),e},openDatabaseKey:function(e){return!this.options.excludeOpenDatabase&&window.openDatabase&&e.push({key:"open_database",value:1}),e},cpuClassKey:function(e){return this.options.excludeCpuClass||e.push({key:"cpu_class",value:this.getNavigatorCpuClass()}),e},platformKey:function(e){return this.options.excludePlatform||e.push({key:"navigator_platform",value:this.getNavigatorPlatform()}),e},doNotTrackKey:function(e){return this.options.excludeDoNotTrack||e.push({key:"do_not_track",value:this.getDoNotTrack()}),e},canvasKey:function(e){return!this.options.excludeCanvas&&this.isCanvasSupported()&&e.push({key:"canvas",value:this.getCanvasFp()}),e},webglKey:function(e){return this.options.excludeWebGL?e:this.isWebGlSupported()?(e.push({key:"webgl",value:this.getWebglFp()}),e):e},adBlockKey:function(e){return this.options.excludeAdBlock||e.push({key:"adblock",value:this.getAdBlock()}),e},hasLiedLanguagesKey:function(e){return this.options.excludeHasLiedLanguages||e.push({key:"has_lied_languages",value:this.getHasLiedLanguages()}),e},hasLiedResolutionKey:function(e){return this.options.excludeHasLiedResolution||e.push({key:"has_lied_resolution",value:this.getHasLiedResolution()}),e},hasLiedOsKey:function(e){return this.options.excludeHasLiedOs||e.push({key:"has_lied_os",value:this.getHasLiedOs()}),e},hasLiedBrowserKey:function(e){return this.options.excludeHasLiedBrowser||e.push({key:"has_lied_browser",value:this.getHasLiedBrowser()}),e},fontsKey:function(e,t){return this.options.excludeJsFonts?this.flashFontsKey(e,t):this.jsFontsKey(e,t)},flashFontsKey:function(e,t){return this.options.excludeFlashFonts?t(e):this.hasSwfObjectLoaded()&&this.hasMinFlashInstalled()?"undefined"==typeof this.options.swfPath?t(e):void this.loadSwfAndDetectFonts(function(i){e.push({key:"swf_fonts",value:i.join(";")}),t(e)}):t(e)},jsFontsKey:function(e,t){var i=this;return setTimeout(function(){var a=["monospace","sans-serif","serif"],r="mmmmmmmmmmlli",n="72px",o=document.getElementsByTagName("body")[0],s=document.createElement("span");s.style.position="absolute",s.style.left="-9999px",s.style.fontSize=n,s.innerHTML=r;for(var l={},h={},u=0,d=a.length;d>u;u++)s.style.fontFamily=a[u],o.appendChild(s),l[a[u]]=s.offsetWidth,h[a[u]]=s.offsetHeight,o.removeChild(s);var c=function(e){for(var t=!1,i=0,r=a.length;r>i;i++){s.style.fontFamily=e+","+a[i],o.appendChild(s);var n=s.offsetWidth!==l[a[i]]||s.offsetHeight!==h[a[i]];o.removeChild(s),t=t||n}return t},g=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],p=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"];i.options.extendedJsFonts&&(g=g.concat(p));for(var f=[],m=0,S=g.length;S>m;m++)c(g[m])&&f.push(g[m]);e.push({key:"js_fonts",value:f}),t(e)},1)},pluginsKey:function(e){return this.options.excludePlugins||(this.isIE()?e.push({key:"ie_plugins",value:this.getIEPlugins()}):e.push({key:"regular_plugins",value:this.getRegularPlugins()})),e},getRegularPlugins:function(){for(var e=[],t=0,i=navigator.plugins.length;i>t;t++)e.push(navigator.plugins[t]);return this.pluginsShouldBeSorted()&&(e=e.sort(function(e,t){return e.name>t.name?1:e.namet;t++){var a=this.options.sortPluginsFor[t];if(navigator.userAgent.match(a)){e=!0;break}}return e},touchSupportKey:function(e){return this.options.excludeTouchSupport||e.push({key:"touch_support",value:this.getTouchSupport()}),e},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(e){return!0}},hasIndexedDB:function(){return!!window.indexedDB},getNavigatorCpuClass:function(){return navigator.cpuClass?navigator.cpuClass:"unknown"},getNavigatorPlatform:function(){return navigator.platform?navigator.platform:"unknown"},getDoNotTrack:function(){return navigator.doNotTrack?navigator.doNotTrack:"unknown"},getTouchSupport:function(){var e=0,t=!1;"undefined"!=typeof navigator.maxTouchPoints?e=navigator.maxTouchPoints:"undefined"!=typeof navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(i){}var a="ontouchstart"in window;return[e,t,a]},getCanvasFp:function(){var e=[],t=document.createElement("canvas");t.width=2e3,t.height=200,t.style.display="inline";var i=t.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(i.isPointInPath(5,5,"evenodd")===!1?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",this.options.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),i.fillStyle="rgba(102, 204, 0, 0.7)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),e.push("canvas fp:"+t.toDataURL()),e.join("~")},getWebglFp:function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"},i=function(e){var t,i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");return i?(t=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),0===t&&(t=2),t):null};if(e=this.getWebglCanvas(),!e)return null;var a=[],r="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",n="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o);var s=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o.itemSize=3,o.numItems=3;var l=e.createProgram(),h=e.createShader(e.VERTEX_SHADER);e.shaderSource(h,r),e.compileShader(h);var u=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(u,n),e.compileShader(u),e.attachShader(l,h),e.attachShader(l,u),e.linkProgram(l),e.useProgram(l),l.vertexPosAttrib=e.getAttribLocation(l,"attrVertex"),l.offsetUniform=e.getUniformLocation(l,"uniformOffset"),e.enableVertexAttribArray(l.vertexPosArray),e.vertexAttribPointer(l.vertexPosAttrib,o.itemSize,e.FLOAT,!1,0,0),e.uniform2f(l.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,o.numItems),null!=e.canvas&&a.push(e.canvas.toDataURL()),a.push("extensions:"+e.getSupportedExtensions().join(";")),a.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),a.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),a.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),a.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),a.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),a.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),a.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),a.push("webgl max anisotropy:"+i(e)),a.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),a.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),a.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),a.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),a.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),a.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),a.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),a.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),a.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),a.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),a.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),a.push("webgl red bits:"+e.getParameter(e.RED_BITS)),a.push("webgl renderer:"+e.getParameter(e.RENDERER)),a.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),a.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),a.push("webgl vendor:"+e.getParameter(e.VENDOR)),a.push("webgl version:"+e.getParameter(e.VERSION)),e.getShaderPrecisionFormat?(a.push("webgl vertex shader high float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision),a.push("webgl vertex shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl vertex shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl vertex shader medium float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl vertex shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl vertex shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl vertex shader low float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).precision),a.push("webgl vertex shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl vertex shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl fragment shader high float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision),a.push("webgl fragment shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl fragment shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl fragment shader medium float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl fragment shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl fragment shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl fragment shader low float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).precision),a.push("webgl fragment shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl fragment shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl vertex shader high int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).precision),a.push("webgl vertex shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMin),a.push("webgl vertex shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMax),a.push("webgl vertex shader medium int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).precision),a.push("webgl vertex shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl vertex shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl vertex shader low int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).precision),a.push("webgl vertex shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMin),a.push("webgl vertex shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMax),a.push("webgl fragment shader high int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).precision),a.push("webgl fragment shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMin),a.push("webgl fragment shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMax),a.push("webgl fragment shader medium int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).precision),a.push("webgl fragment shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl fragment shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl fragment shader low int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).precision),a.push("webgl fragment shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMin),a.push("webgl fragment shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMax),a.join("~")):a.join("~")},getAdBlock:function(){var e=document.createElement("div");e.setAttribute("id","ads");try{return document.body.appendChild(e),!document.getElementById("ads")}catch(t){return!1}},getHasLiedLanguages:function(){if("undefined"!=typeof navigator.languages)try{var e=navigator.languages[0].substr(0,2);if(e!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},getHasLiedResolution:function(){return screen.width=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other";var r;if(r="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,r&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if("undefined"!=typeof i){if(i=i.toLowerCase(),i.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(i.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(i.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if(0===i.indexOf("win")&&0===i.indexOf("linux")&&i.indexOf("mac")>=0&&"other"!==e)return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e?!0:(a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e?!0:(a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e?!0:0===a.indexOf("win")&&0===a.indexOf("linux")&&a.indexOf("mac")>=0&&"other"!==e?!0:"undefined"==typeof navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e},getHasLiedBrowser:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.productSub;if(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other",("Chrome"===e||"Safari"===e||"Opera"===e)&&"20030107"!==i)return!0;var a=eval.toString().length;if(37===a&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===a&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===a&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;var r;try{throw"a"}catch(n){try{n.toSource(),r=!0}catch(o){r=!1}}return!(!r||"Firefox"===e||"Other"===e)},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},isWebGlSupported:function(){if(!this.isCanvasSupported())return!1;var e,t=document.createElement("canvas");try{e=t.getContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(i){e=!1}return!!window.WebGLRenderingContext&&!!e},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName?!0:!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},hasSwfObjectLoaded:function(){return"undefined"!=typeof window.swfobject},hasMinFlashInstalled:function(){return swfobject.hasFlashPlayerVersion("9.0.0")},addFlashDivNode:function(){var e=document.createElement("div");e.setAttribute("id",this.options.swfContainerId),document.body.appendChild(e)},loadSwfAndDetectFonts:function(e){var t="___fp_swf_loaded";window[t]=function(t){e(t)};var i=this.options.swfContainerId;this.addFlashDivNode();var a={onReady:t},r={allowScriptAccess:"always",menu:"false"};swfobject.embedSWF(this.options.swfPath,i,"1","1","9.0.0",!1,a,r,{})},getWebglCanvas:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(i){}return t||(t=null),t},each:function(e,t,i){if(null!==e)if(this.nativeForEach&&e.forEach===this.nativeForEach)e.forEach(t,i);else if(e.length===+e.length){for(var a=0,r=e.length;r>a;a++)if(t.call(i,e[a],a,e)==={})return}else for(var n in e)if(e.hasOwnProperty(n)&&t.call(i,e[n],n,e)==={})return},map:function(e,t,i){var a=[];return null==e?a:this.nativeMap&&e.map===this.nativeMap?e.map(t,i):(this.each(e,function(e,r,n){a[a.length]=t.call(i,e,r,n)}),a)},x64Add:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]+t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]+t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]+t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]+t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Multiply:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]*t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]*t[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=e[3]*t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]*t[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[2]*t[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[3]*t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Rotl:function(e,t){return t%=64,32===t?[e[1],e[0]]:32>t?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])},x64LeftShift:function(e,t){return t%=64,0===t?e:32>t?[e[0]<>>32-t,e[1]<>>1]),e=this.x64Multiply(e,[4283543511,3981806797]),e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[3301882366,444984403]),e=this.x64Xor(e,[0,e[0]>>>1])},x64hash128:function(e,t){e=e||"",t=t||0;for(var i=e.length%16,a=e.length-i,r=[0,t],n=[0,t],o=[0,0],s=[0,0],l=[2277735313,289559509],h=[1291169091,658871167],u=0;a>u;u+=16)o=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],s=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o),r=this.x64Rotl(r,27),r=this.x64Add(r,n),r=this.x64Add(this.x64Multiply(r,[0,5]),[0,1390208809]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s),n=this.x64Rotl(n,31),n=this.x64Add(n,r),n=this.x64Add(this.x64Multiply(n,[0,5]),[0,944331445]);switch(o=[0,0],s=[0,0],i){case 15:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+14)],48));case 14:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+13)],40));case 13:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+12)],32));case 12:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+11)],24));case 11:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+10)],16));case 10:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+9)],8));case 9:s=this.x64Xor(s,[0,e.charCodeAt(u+8)]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33), -s=this.x64Multiply(s,l),n=this.x64Xor(n,s);case 8:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+7)],56));case 7:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+6)],48));case 6:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+5)],40));case 5:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+4)],32));case 4:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+3)],24));case 3:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+2)],16));case 2:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+1)],8));case 1:o=this.x64Xor(o,[0,e.charCodeAt(u)]),o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o)}return r=this.x64Xor(r,[0,e.length]),n=this.x64Xor(n,[0,e.length]),r=this.x64Add(r,n),n=this.x64Add(n,r),r=this.x64Fmix(r),n=this.x64Fmix(n),r=this.x64Add(r,n),n=this.x64Add(n,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(n[0]>>>0).toString(16)).slice(-8)+("00000000"+(n[1]>>>0).toString(16)).slice(-8)}},e.VERSION="1.1.3",e}); \ No newline at end of file +!function(e,t,i){"use strict";"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define(i):t[e]=i()}("Fingerprint2",this,function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var i;if(null==this)throw new TypeError("'this' is null or undefined");var a=Object(this),r=a.length>>>0;if(0===r)return-1;var n=+t||0;if(Math.abs(n)===1/0&&(n=0),n>=r)return-1;for(i=Math.max(n>=0?n:r-Math.abs(n),0);r>i;){if(i in a&&a[i]===e)return i;i++}return-1});var e=function(e){var t={swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",detectScreenOrientation:!0,sortPluginsFor:[/palemoon/i]};this.options=this.extend(e,t),this.nativeForEach=Array.prototype.forEach,this.nativeMap=Array.prototype.map};return e.prototype={extend:function(e,t){if(null==e)return t;for(var i in e)null!=e[i]&&t[i]!==e[i]&&(t[i]=e[i]);return t},log:function(e){window.console&&console.log(e)},get:function(e){var t=[];t=this.userAgentKey(t),t=this.languageKey(t),t=this.colorDepthKey(t),t=this.screenResolutionKey(t),t=this.availableScreenResolutionKey(t),t=this.timezoneOffsetKey(t),t=this.sessionStorageKey(t),t=this.localStorageKey(t),t=this.indexedDbKey(t),t=this.addBehaviorKey(t),t=this.openDatabaseKey(t),t=this.cpuClassKey(t),t=this.platformKey(t),t=this.doNotTrackKey(t),t=this.pluginsKey(t),t=this.canvasKey(t),t=this.webglKey(t),t=this.adBlockKey(t),t=this.hasLiedLanguagesKey(t),t=this.hasLiedResolutionKey(t),t=this.hasLiedOsKey(t),t=this.hasLiedBrowserKey(t),t=this.touchSupportKey(t);var i=this;this.fontsKey(t,function(t){var a=[];i.each(t,function(e){var t=e.value;"undefined"!=typeof e.value.join&&(t=e.value.join(";")),a.push(t)});var r=i.x64hash128(a.join("~~~"),31);return e(r,t)})},userAgentKey:function(e){return this.options.excludeUserAgent||e.push({key:"user_agent",value:this.getUserAgent()}),e},getUserAgent:function(){return navigator.userAgent},languageKey:function(e){return this.options.excludeLanguage||e.push({key:"language",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),e},colorDepthKey:function(e){return this.options.excludeColorDepth||e.push({key:"color_depth",value:screen.colorDepth}),e},screenResolutionKey:function(e){return this.options.excludeScreenResolution?e:this.getScreenResolution(e)},getScreenResolution:function(e){var t;return t=this.options.detectScreenOrientation&&screen.height>screen.width?[screen.height,screen.width]:[screen.width,screen.height],"undefined"!=typeof t&&e.push({key:"resolution",value:t}),e},availableScreenResolutionKey:function(e){return this.options.excludeAvailableScreenResolution?e:this.getAvailableScreenResolution(e)},getAvailableScreenResolution:function(e){var t;return screen.availWidth&&screen.availHeight&&(t=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]),"undefined"!=typeof t&&e.push({key:"available_resolution",value:t}),e},timezoneOffsetKey:function(e){return this.options.excludeTimezoneOffset||e.push({key:"timezone_offset",value:(new Date).getTimezoneOffset()}),e},sessionStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasSessionStorage()&&e.push({key:"session_storage",value:1}),e},localStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasLocalStorage()&&e.push({key:"local_storage",value:1}),e},indexedDbKey:function(e){return!this.options.excludeIndexedDB&&this.hasIndexedDB()&&e.push({key:"indexed_db",value:1}),e},addBehaviorKey:function(e){return document.body&&!this.options.excludeAddBehavior&&document.body.addBehavior&&e.push({key:"add_behavior",value:1}),e},openDatabaseKey:function(e){return!this.options.excludeOpenDatabase&&window.openDatabase&&e.push({key:"open_database",value:1}),e},cpuClassKey:function(e){return this.options.excludeCpuClass||e.push({key:"cpu_class",value:this.getNavigatorCpuClass()}),e},platformKey:function(e){return this.options.excludePlatform||e.push({key:"navigator_platform",value:this.getNavigatorPlatform()}),e},doNotTrackKey:function(e){return this.options.excludeDoNotTrack||e.push({key:"do_not_track",value:this.getDoNotTrack()}),e},canvasKey:function(e){return!this.options.excludeCanvas&&this.isCanvasSupported()&&e.push({key:"canvas",value:this.getCanvasFp()}),e},webglKey:function(e){return this.options.excludeWebGL?e:this.isWebGlSupported()?(e.push({key:"webgl",value:this.getWebglFp()}),e):e},adBlockKey:function(e){return this.options.excludeAdBlock||e.push({key:"adblock",value:this.getAdBlock()}),e},hasLiedLanguagesKey:function(e){return this.options.excludeHasLiedLanguages||e.push({key:"has_lied_languages",value:this.getHasLiedLanguages()}),e},hasLiedResolutionKey:function(e){return this.options.excludeHasLiedResolution||e.push({key:"has_lied_resolution",value:this.getHasLiedResolution()}),e},hasLiedOsKey:function(e){return this.options.excludeHasLiedOs||e.push({key:"has_lied_os",value:this.getHasLiedOs()}),e},hasLiedBrowserKey:function(e){return this.options.excludeHasLiedBrowser||e.push({key:"has_lied_browser",value:this.getHasLiedBrowser()}),e},fontsKey:function(e,t){return this.options.excludeJsFonts?this.flashFontsKey(e,t):this.jsFontsKey(e,t)},flashFontsKey:function(e,t){return this.options.excludeFlashFonts?t(e):this.hasSwfObjectLoaded()&&this.hasMinFlashInstalled()?"undefined"==typeof this.options.swfPath?t(e):void this.loadSwfAndDetectFonts(function(i){e.push({key:"swf_fonts",value:i.join(";")}),t(e)}):t(e)},jsFontsKey:function(e,t){var i=this;return setTimeout(function(){var a=["monospace","sans-serif","serif"],r="mmmmmmmmmmlli",n="72px",o=document.getElementsByTagName("body")[0],s=document.createElement("span");s.style.position="absolute",s.style.left="-9999px",s.style.fontSize=n,s.innerHTML=r;for(var l={},h={},u=0,d=a.length;d>u;u++)s.style.fontFamily=a[u],o.appendChild(s),l[a[u]]=s.offsetWidth,h[a[u]]=s.offsetHeight,o.removeChild(s);var c=function(e){for(var t=!1,i=0,r=a.length;r>i;i++){s.style.fontFamily=e+","+a[i],o.appendChild(s);var n=s.offsetWidth!==l[a[i]]||s.offsetHeight!==h[a[i]];o.removeChild(s),t=t||n}return t},g=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],p=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"];i.options.extendedJsFonts&&(g=g.concat(p));for(var f=[],m=0,S=g.length;S>m;m++)c(g[m])&&f.push(g[m]);e.push({key:"js_fonts",value:f}),t(e)},1)},pluginsKey:function(e){return this.options.excludePlugins||(this.isIE()?this.options.excludeIEPlugins||e.push({key:"ie_plugins",value:this.getIEPlugins()}):e.push({key:"regular_plugins",value:this.getRegularPlugins()})),e},getRegularPlugins:function(){for(var e=[],t=0,i=navigator.plugins.length;i>t;t++)e.push(navigator.plugins[t]);return this.pluginsShouldBeSorted()&&(e=e.sort(function(e,t){return e.name>t.name?1:e.namet;t++){var a=this.options.sortPluginsFor[t];if(navigator.userAgent.match(a)){e=!0;break}}return e},touchSupportKey:function(e){return this.options.excludeTouchSupport||e.push({key:"touch_support",value:this.getTouchSupport()}),e},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(e){return!0}},hasIndexedDB:function(){return!!window.indexedDB},getNavigatorCpuClass:function(){return navigator.cpuClass?navigator.cpuClass:"unknown"},getNavigatorPlatform:function(){return navigator.platform?navigator.platform:"unknown"},getDoNotTrack:function(){return navigator.doNotTrack?navigator.doNotTrack:"unknown"},getTouchSupport:function(){var e=0,t=!1;"undefined"!=typeof navigator.maxTouchPoints?e=navigator.maxTouchPoints:"undefined"!=typeof navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(i){}var a="ontouchstart"in window;return[e,t,a]},getCanvasFp:function(){var e=[],t=document.createElement("canvas");t.width=2e3,t.height=200,t.style.display="inline";var i=t.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(i.isPointInPath(5,5,"evenodd")===!1?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",this.options.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),i.fillStyle="rgba(102, 204, 0, 0.7)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),e.push("canvas fp:"+t.toDataURL()),e.join("~")},getWebglFp:function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"},i=function(e){var t,i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");return i?(t=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),0===t&&(t=2),t):null};if(e=this.getWebglCanvas(),!e)return null;var a=[],r="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",n="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o);var s=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o.itemSize=3,o.numItems=3;var l=e.createProgram(),h=e.createShader(e.VERTEX_SHADER);e.shaderSource(h,r),e.compileShader(h);var u=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(u,n),e.compileShader(u),e.attachShader(l,h),e.attachShader(l,u),e.linkProgram(l),e.useProgram(l),l.vertexPosAttrib=e.getAttribLocation(l,"attrVertex"),l.offsetUniform=e.getUniformLocation(l,"uniformOffset"),e.enableVertexAttribArray(l.vertexPosArray),e.vertexAttribPointer(l.vertexPosAttrib,o.itemSize,e.FLOAT,!1,0,0),e.uniform2f(l.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,o.numItems),null!=e.canvas&&a.push(e.canvas.toDataURL()),a.push("extensions:"+e.getSupportedExtensions().join(";")),a.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),a.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),a.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),a.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),a.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),a.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),a.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),a.push("webgl max anisotropy:"+i(e)),a.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),a.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),a.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),a.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),a.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),a.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),a.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),a.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),a.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),a.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),a.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),a.push("webgl red bits:"+e.getParameter(e.RED_BITS)),a.push("webgl renderer:"+e.getParameter(e.RENDERER)),a.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),a.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),a.push("webgl vendor:"+e.getParameter(e.VENDOR)),a.push("webgl version:"+e.getParameter(e.VERSION)),e.getShaderPrecisionFormat?(a.push("webgl vertex shader high float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision),a.push("webgl vertex shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl vertex shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl vertex shader medium float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl vertex shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl vertex shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl vertex shader low float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).precision),a.push("webgl vertex shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl vertex shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl fragment shader high float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision),a.push("webgl fragment shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl fragment shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl fragment shader medium float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl fragment shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl fragment shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl fragment shader low float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).precision),a.push("webgl fragment shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl fragment shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl vertex shader high int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).precision),a.push("webgl vertex shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMin),a.push("webgl vertex shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMax),a.push("webgl vertex shader medium int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).precision),a.push("webgl vertex shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl vertex shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl vertex shader low int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).precision),a.push("webgl vertex shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMin),a.push("webgl vertex shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMax),a.push("webgl fragment shader high int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).precision),a.push("webgl fragment shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMin),a.push("webgl fragment shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMax),a.push("webgl fragment shader medium int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).precision),a.push("webgl fragment shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl fragment shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl fragment shader low int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).precision),a.push("webgl fragment shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMin),a.push("webgl fragment shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMax),a.join("~")):a.join("~")},getAdBlock:function(){var e=document.createElement("div");e.setAttribute("id","ads");try{return document.body.appendChild(e),!document.getElementById("ads")}catch(t){return!1}},getHasLiedLanguages:function(){if("undefined"!=typeof navigator.languages)try{var e=navigator.languages[0].substr(0,2);if(e!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},getHasLiedResolution:function(){return screen.width=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other";var r;if(r="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,r&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if("undefined"!=typeof i){if(i=i.toLowerCase(),i.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(i.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(i.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if(0===i.indexOf("win")&&0===i.indexOf("linux")&&i.indexOf("mac")>=0&&"other"!==e)return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e?!0:(a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e?!0:(a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e?!0:0===a.indexOf("win")&&0===a.indexOf("linux")&&a.indexOf("mac")>=0&&"other"!==e?!0:"undefined"==typeof navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e},getHasLiedBrowser:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.productSub;if(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other",("Chrome"===e||"Safari"===e||"Opera"===e)&&"20030107"!==i)return!0;var a=eval.toString().length;if(37===a&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===a&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===a&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;var r;try{throw"a"}catch(n){try{n.toSource(),r=!0}catch(o){r=!1}}return!(!r||"Firefox"===e||"Other"===e)},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},isWebGlSupported:function(){if(!this.isCanvasSupported())return!1;var e,t=document.createElement("canvas");try{e=t.getContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(i){e=!1}return!!window.WebGLRenderingContext&&!!e},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName?!0:!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},hasSwfObjectLoaded:function(){return"undefined"!=typeof window.swfobject},hasMinFlashInstalled:function(){return swfobject.hasFlashPlayerVersion("9.0.0")},addFlashDivNode:function(){var e=document.createElement("div");e.setAttribute("id",this.options.swfContainerId),document.body.appendChild(e)},loadSwfAndDetectFonts:function(e){var t="___fp_swf_loaded";window[t]=function(t){e(t)};var i=this.options.swfContainerId;this.addFlashDivNode();var a={onReady:t},r={allowScriptAccess:"always",menu:"false"};swfobject.embedSWF(this.options.swfPath,i,"1","1","9.0.0",!1,a,r,{})},getWebglCanvas:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(i){}return t||(t=null),t},each:function(e,t,i){if(null!==e)if(this.nativeForEach&&e.forEach===this.nativeForEach)e.forEach(t,i);else if(e.length===+e.length){for(var a=0,r=e.length;r>a;a++)if(t.call(i,e[a],a,e)==={})return}else for(var n in e)if(e.hasOwnProperty(n)&&t.call(i,e[n],n,e)==={})return},map:function(e,t,i){var a=[];return null==e?a:this.nativeMap&&e.map===this.nativeMap?e.map(t,i):(this.each(e,function(e,r,n){a[a.length]=t.call(i,e,r,n)}),a)},x64Add:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]+t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]+t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]+t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]+t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Multiply:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]*t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]*t[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=e[3]*t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]*t[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[2]*t[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[3]*t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Rotl:function(e,t){return t%=64,32===t?[e[1],e[0]]:32>t?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])},x64LeftShift:function(e,t){return t%=64,0===t?e:32>t?[e[0]<>>32-t,e[1]<>>1]),e=this.x64Multiply(e,[4283543511,3981806797]),e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[3301882366,444984403]),e=this.x64Xor(e,[0,e[0]>>>1])},x64hash128:function(e,t){e=e||"",t=t||0;for(var i=e.length%16,a=e.length-i,r=[0,t],n=[0,t],o=[0,0],s=[0,0],l=[2277735313,289559509],h=[1291169091,658871167],u=0;a>u;u+=16)o=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],s=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o),r=this.x64Rotl(r,27),r=this.x64Add(r,n),r=this.x64Add(this.x64Multiply(r,[0,5]),[0,1390208809]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s),n=this.x64Rotl(n,31),n=this.x64Add(n,r),n=this.x64Add(this.x64Multiply(n,[0,5]),[0,944331445]);switch(o=[0,0],s=[0,0],i){case 15:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+14)],48));case 14:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+13)],40));case 13:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+12)],32));case 12:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+11)],24));case 11:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+10)],16));case 10:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+9)],8));case 9:s=this.x64Xor(s,[0,e.charCodeAt(u+8)]),s=this.x64Multiply(s,h), +s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s);case 8:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+7)],56));case 7:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+6)],48));case 6:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+5)],40));case 5:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+4)],32));case 4:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+3)],24));case 3:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+2)],16));case 2:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+1)],8));case 1:o=this.x64Xor(o,[0,e.charCodeAt(u)]),o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o)}return r=this.x64Xor(r,[0,e.length]),n=this.x64Xor(n,[0,e.length]),r=this.x64Add(r,n),n=this.x64Add(n,r),r=this.x64Fmix(r),n=this.x64Fmix(n),r=this.x64Add(r,n),n=this.x64Add(n,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(n[0]>>>0).toString(16)).slice(-8)+("00000000"+(n[1]>>>0).toString(16)).slice(-8)}},e.VERSION="1.1.4",e}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js b/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js index e272440c0..e622ba930 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js +++ b/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js @@ -1,5 +1,5 @@ /* -* Fingerprintjs2 1.1.3 - Modern & flexible browser fingerprint library v2 +* Fingerprintjs2 1.1.4 - Modern & flexible browser fingerprint library v2 * https://github.com/Valve/fingerprintjs2 * Copyright (c) 2015 Valentin Vasilyev (valentin.vasilyev@outlook.com) * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. @@ -438,7 +438,9 @@ pluginsKey: function(keys) { if(!this.options.excludePlugins){ if(this.isIE()){ - keys.push({key: "ie_plugins", value: this.getIEPlugins()}); + if(!this.options.excludeIEPlugins) { + keys.push({key: "ie_plugins", value: this.getIEPlugins()}); + } } else { keys.push({key: "regular_plugins", value: this.getRegularPlugins()}); } @@ -1204,6 +1206,6 @@ return ("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8); } }; - Fingerprint2.VERSION = "1.1.3"; + Fingerprint2.VERSION = "1.1.4"; return Fingerprint2; }); diff --git a/dashboard-ui/bower_components/fingerprintjs2/package.json b/dashboard-ui/bower_components/fingerprintjs2/package.json index 510e13b9d..b7d16a8b4 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/package.json +++ b/dashboard-ui/bower_components/fingerprintjs2/package.json @@ -1,6 +1,6 @@ { "name": "fingerprintjs2", - "version": "1.1.3", + "version": "1.1.4", "description": "Modern & flexible browser fingerprinting library", "main": "dist/fingerprint2.min.js", "devDependencies": { diff --git a/dashboard-ui/bower_components/fingerprintjs2/specs/specs.js b/dashboard-ui/bower_components/fingerprintjs2/specs/specs.js index 8d00c96a1..21c7d3f0f 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/specs/specs.js +++ b/dashboard-ui/bower_components/fingerprintjs2/specs/specs.js @@ -97,6 +97,16 @@ describe("Fingerprint2", function () { done(); }); }); + + it("does not use IE plugins info when excluded", function (done) { + var fp2 = new Fingerprint2({excludeIEPlugins: true}); + spyOn(fp2, "getIEPlugins"); + fp2.get(function(result) { + expect(fp2.getIEPlugins).not.toHaveBeenCalled(); + done(); + }); + }); + }); describe("returns components", function () { diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json index f0167baf1..9784e3a3b 100644 --- a/dashboard-ui/bower_components/iron-icon/.bower.json +++ b/dashboard-ui/bower_components/iron-icon/.bower.json @@ -32,14 +32,14 @@ "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/polymerelements/iron-icon", + "homepage": "https://github.com/PolymerElements/iron-icon", "_release": "1.0.8", "_resolution": { "type": "version", "tag": "v1.0.8", "commit": "f36b38928849ef3853db727faa8c9ef104d611eb" }, - "_source": "git://github.com/polymerelements/iron-icon.git", + "_source": "git://github.com/PolymerElements/iron-icon.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-icon" + "_originalSource": "PolymerElements/iron-icon" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index bbad7fe7b..3e8a4009a 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -34,6 +34,6 @@ "commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514" }, "_source": "git://github.com/Polymer/polymer.git", - "_target": "^1.1.0", + "_target": "^1.0.0", "_originalSource": "Polymer/polymer" } \ No newline at end of file diff --git a/dashboard-ui/components/ironcardlist/ironcardlist.js b/dashboard-ui/components/ironcardlist/ironcardlist.js new file mode 100644 index 000000000..84486662f --- /dev/null +++ b/dashboard-ui/components/ironcardlist/ironcardlist.js @@ -0,0 +1,32 @@ +define(['iron-list', 'lazyload-image'], function () { + + function getTemplate(scrollTarget) { + + var maxPhysical = 80; + + // is="lazyload-image" + + return new Promise(function (resolve, reject) { + + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'components/ironcardlist/ironcardlist.template.html', true); + + xhr.onload = function (e) { + + var html = this.response; + + html = html.replace('${maxphysical}', maxPhysical); + html = html.replace('${scrolltarget}', scrollTarget); + + resolve(html); + } + + xhr.send(); + }); + } + + return { + getTemplate: getTemplate + }; + +}); \ No newline at end of file diff --git a/dashboard-ui/components/ironcardlist/ironcardlist.template.html b/dashboard-ui/components/ironcardlist/ironcardlist.template.html new file mode 100644 index 000000000..46edb0cf1 --- /dev/null +++ b/dashboard-ui/components/ironcardlist/ironcardlist.template.html @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/dashboard-ui/components/scrollthreshold.js b/dashboard-ui/components/scrollthreshold.js new file mode 100644 index 000000000..a52c3a423 --- /dev/null +++ b/dashboard-ui/components/scrollthreshold.js @@ -0,0 +1,95 @@ +define(['events'], function (events) { + + function thresholdMonitor(elem, horizontal, lowerTolerance, upperTolerance) { + + var defaultTolerance = horizontal ? (screen.availWidth / 3) : (screen.availHeight / 3); + lowerTolerance = lowerTolerance || defaultTolerance; + upperTolerance = upperTolerance || defaultTolerance; + + var self = this; + var upperTriggered = true; + var lowerTriggered = false; + var isWindow = elem == window || elem.tagName == 'HTML' || elem.tagName == 'BODY'; + + var scrollSize; + + function getScrollSize() { + + if (!scrollSize) { + + if (isWindow) { + scrollSize = horizontal ? (document.documentElement.scrollWidth - document.documentElement.offsetWidth) : (document.documentElement.scrollHeight - document.documentElement.offsetHeight); + } else { + scrollSize = horizontal ? (elem.scrollWidth - elem.offsetWidth) : (elem.scrollHeight - elem.offsetHeight); + } + } + return scrollSize; + } + + function onScroll(e) { + + if (lowerTriggered && upperTriggered) { + return; + } + + var position; + + if (isWindow) { + position = horizontal ? window.pageXOffset : window.pageYOffset; + } else { + position = horizontal ? elem.scrollLeft : elem.scrollTop; + } + + //console.log('onscroll: ' + position + '-' + getScrollSize()); + + // Detect upper threshold + if (position < upperTolerance) { + if (!upperTriggered) { + upperTriggered = true; + events.trigger(self, 'upper-threshold'); + } + } else { + upperTriggered = false; + } + + // Detect lower threshold + if (position >= (getScrollSize() - lowerTolerance)) { + if (!lowerTriggered) { + lowerTriggered = true; + events.trigger(self, 'lower-threshold'); + } + } else { + lowerTriggered = false; + } + } + + self.reset = function () { + self.resetSize(); + upperTriggered = true; + lowerTriggered = false; + }; + + self.resetSize = function () { + scrollSize = null; + }; + + self.enabled = function (enabled) { + + self.reset(); + + if (enabled) { + elem.addEventListener('scroll', onScroll, true); + } else { + elem.removeEventListener('scroll', onScroll, true); + } + }; + + self.enabled(true); + + self.destroy = function () { + self.enabled(false); + }; + } + + return thresholdMonitor; +}); \ No newline at end of file diff --git a/dashboard-ui/components/servertestermessage.js b/dashboard-ui/components/servertestermessage.js index d38cc6161..e99f9cb13 100644 --- a/dashboard-ui/components/servertestermessage.js +++ b/dashboard-ui/components/servertestermessage.js @@ -1,4 +1,4 @@ -define(['appSettings'], function (appSettings) { +define(['appSettings', 'paper-button'], function (appSettings) { function getReleases() { diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 15e9a07ec..f3194e702 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -62,10 +62,18 @@ padding-bottom: 0; } -.pageWithAbsoluteTabs .pageTabContent, .libraryPage > .ui-content { +.pageWithAbsoluteTabs .pageTabsContainer, .libraryPage > .ui-content { padding-top: 10px; } +.absolutePageTabContent { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + /*.pageWithAbsoluteTabs .pageTabContent { padding-left: .5em !important; padding-right: .5em !important; @@ -1174,7 +1182,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { .alphabetPicker { position: fixed; - right: 0; + right: 5px; bottom: 0; z-index: 999; text-align: center; @@ -1183,16 +1191,20 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { line-height: 1; } - .alphabetPicker a { - display: block; - text-decoration: none; - padding: 1px 5px 1px 10px; - font-weight: 500; - } +.layout-desktop .absolutePageTabContent .alphabetPicker { + right: 15px; +} - .alphabetPicker a:not(.selectedCharacter) { - color: #bbb !important; - } +.alphabetPicker a { + display: block; + text-decoration: none; + padding: 1px 2px 1px 5px; + font-weight: 500; +} + + .alphabetPicker a:not(.selectedCharacter) { + color: #bbb !important; + } .selectedCharacter { @@ -1256,6 +1268,17 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { .itemsContainerWithAlphaPicker { margin-right: 20px; } + + .absolutePageTabContent .itemsContainerWithAlphaPicker { + margin-right: 30px; + } +} + +@media all and (min-height: 480px) and (max-width: 800px) { + + .absolutePageTabContent .itemsContainerWithAlphaPicker iron-list { + width: 99.5% !important; + } } @media all and (min-height: 500px) { @@ -1267,7 +1290,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { @media all and (min-width: 1200px) { - .itemsContainerWithAlphaPicker { + .itemsContainerWithAlphaPicker, .absolutePageTabContent .itemsContainerWithAlphaPicker { margin-right: 0; } } diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index c99f2111c..9c4134a8d 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -10,6 +10,12 @@ padding-top: 98px !important; } +.absolutePageTabContent { + margin: 0 !important; + width: 100% !important; + top: 98px !important; +} + .sidebarDivider { height: 1px; background: #eaeaea; diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 8192ece39..3c75a8911 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -287,7 +287,7 @@ html { } body { - overflow-y: scroll !important; + overflow-y: auto !important; /* This is needed to prevent a horizontal scrollbar while neon-animated-pages are animating. */ overflow-x: hidden; /*Can't use this with safari or it causes some content to disappear*/ @@ -870,7 +870,7 @@ paper-input + .fieldDescription { padding: 1em; } -.page > .ui-content, .pageWithAbsoluteTabs .pageTabContent { +.page > .ui-content, .pageWithAbsoluteTabs .pageTabContent, .absolutePageTabContent .itemsContainer { /* Need this so that the audio player doesn't cover content, but also for unveil lazy loading. */ padding-bottom: 160px; } diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js index 9af648e49..6429b087e 100644 --- a/dashboard-ui/scripts/episodes.js +++ b/dashboard-ui/scripts/episodes.js @@ -1,8 +1,9 @@ -define(['jQuery'], function ($) { +define(['ironCardList', 'scrollThreshold', 'events', 'libraryBrowser', 'jQuery'], function (ironCardList, scrollThreshold, events, libraryBrowser, $) { return function (view, params, tabContent) { - var self = this; + var self = this; + var pageSize = libraryBrowser.getDefaultPageSize(); var data = {}; @@ -23,13 +24,13 @@ ImageTypeLimit: 1, EnableImageTypes: "Primary,Backdrop,Banner,Thumb", StartIndex: 0, - Limit: LibraryBrowser.getDefaultPageSize() + Limit: pageSize }, - view: LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('Poster', 'Poster') + view: libraryBrowser.getSavedView(key) || libraryBrowser.getDefaultItemsView('Poster', 'Poster') }; pageData.query.ParentId = params.topParentId; - LibraryBrowser.loadSavedQueryValues(key, pageData.query); + libraryBrowser.loadSavedQueryValues(key, pageData.query); } return pageData; } @@ -42,164 +43,111 @@ function getSavedQueryKey(context) { if (!context.savedQueryKey) { - context.savedQueryKey = LibraryBrowser.getSavedQueryKey('episodes'); + context.savedQueryKey = libraryBrowser.getSavedQueryKey('episodes'); } return context.savedQueryKey; } + function setCardOptions(result) { + + var cardOptions; + + var view = self.getCurrentViewStyle(); + + if (view == "List") { + + html = libraryBrowser.getListViewHtml({ + items: result.Items, + sortBy: query.SortBy + }); + } + else if (view == "PosterCard") { + cardOptions = { + items: result.Items, + shape: "backdrop", + showTitle: true, + showParentTitle: true, + lazy: true, + cardLayout: true, + showDetailsMenu: true + }; + } + else { + // poster + cardOptions = { + items: result.Items, + shape: "backdrop", + showTitle: true, + showParentTitle: true, + overlayText: true, + lazy: true, + showDetailsMenu: true, + overlayPlayButton: true + }; + } + + self.cardOptions = cardOptions; + } + function reloadItems(page) { + self.isLoading = true; Dashboard.showLoadingMsg(); var query = getQuery(page); + var startIndex = query.StartIndex; + var reloadList = !self.cardOptions || startIndex == 0; + ApiClient.getItems(Dashboard.getCurrentUserId(), query).then(function (result) { - // Scroll back up so they can see the results from the beginning - window.scrollTo(0, 0); - - var view = getPageData(page).view; - - var html = ''; - var pagingHtml = LibraryBrowser.getQueryPagingHtml({ - startIndex: query.StartIndex, - limit: query.Limit, - totalRecordCount: result.TotalRecordCount, - showLimit: false, - updatePageSizeSetting: false, - addLayoutButton: true, - sortButton: true, - currentLayout: view, - layouts: 'Poster,PosterCard', - filterButton: true - }); - - page.querySelector('.listTopPaging').innerHTML = pagingHtml; - updateFilterControls(page); - if (view == "List") { + var pushItems = true; + if (reloadList) { + setCardOptions(result); + pushItems = false; + } + libraryBrowser.setPosterViewData(self.cardOptions); + libraryBrowser.setPosterViewDataOnItems(self.cardOptions, result.Items); - html = LibraryBrowser.getListViewHtml({ - items: result.Items, - sortBy: query.SortBy - }); - } - else if (view == "Poster") { - html += LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: "backdrop", - showTitle: true, - showParentTitle: true, - overlayText: true, - lazy: true, - showDetailsMenu: true, - overlayPlayButton: true - }); - } - else if (view == "PosterCard") { - html += LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: "backdrop", - showTitle: true, - showParentTitle: true, - lazy: true, - cardLayout: true, - showDetailsMenu: true - }); + var ironList = page.querySelector('#ironList'); + if (pushItems) { + for (var i = 0, length = result.Items.length; i < length; i++) { + ironList.push('items', result.Items[i]); + } + } else { + ironList.items = result.Items; } - var elem = page.querySelector('.itemsContainer'); - elem.innerHTML = html + pagingHtml; - ImageLoader.lazyChildren(elem); + // Hack: notifyResize needs to be done after the items have been rendered + setTimeout(function () { + ironList.notifyResize(); + self.scrollThreshold.resetSize(); + }, 300); - $('.btnNextPage', page).on('click', function () { - query.StartIndex += query.Limit; - reloadItems(page); - }); - - $('.btnPreviousPage', page).on('click', function () { - query.StartIndex -= query.Limit; - reloadItems(page); - }); - - $('.btnChangeLayout', page).on('layoutchange', function (e, layout) { - getPageData(page).view = layout; - LibraryBrowser.saveViewSetting(getSavedQueryKey(page), layout); - reloadItems(page); - }); - - $('.btnFilter', page).on('click', function () { - showFilterMenu(page); - }); - - // On callback make sure to set StartIndex = 0 - $('.btnSort', page).on('click', function () { - LibraryBrowser.showSortMenu({ - items: [{ - name: Globalize.translate('OptionNameSort'), - id: 'SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionTvdbRating'), - id: 'CommunityRating,SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionDateAdded'), - id: 'DateCreated,SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionPremiereDate'), - id: 'PremiereDate,SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionDatePlayed'), - id: 'DatePlayed,SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionParentalRating'), - id: 'OfficialRating,SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionPlayCount'), - id: 'PlayCount,SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionRuntime'), - id: 'Runtime,SeriesSortName,SortName' - }, - { - name: Globalize.translate('OptionVideoBitrate'), - id: 'VideoBitRate,SeriesSortName,SortName' - }], - callback: function () { - reloadItems(page); - }, - query: query - }); - }); - - LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query); + libraryBrowser.saveQueryValues(getSavedQueryKey(page), query); Dashboard.hideLoadingMsg(); + self.hasMoreItems = result.TotalRecordCount > (startIndex + result.Items.length); + self.isLoading = false; }); } - function showFilterMenu(page) { - + self.showFilterMenu = function () { require(['components/filterdialog/filterdialog'], function (filterDialogFactory) { var filterDialog = new filterDialogFactory({ - query: getQuery(page), + query: getQuery(tabContent), mode: 'episodes' }); Events.on(filterDialog, 'filterchange', function () { - reloadItems(page); + reloadItems(tabContent); }); filterDialog.show(); }); - } + }; function updateFilterControls(tabContent) { @@ -230,13 +178,113 @@ reloadItems(tabContent); }); + + tabContent.querySelector('.btnFilter').addEventListener('click', function () { + self.showFilterMenu(); + }); + + tabContent.querySelector('.btnSort').addEventListener('click', function () { + libraryBrowser.showSortMenu({ + items: [{ + name: Globalize.translate('OptionNameSort'), + id: 'SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionTvdbRating'), + id: 'CommunityRating,SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionDateAdded'), + id: 'DateCreated,SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionPremiereDate'), + id: 'PremiereDate,SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionDatePlayed'), + id: 'DatePlayed,SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionParentalRating'), + id: 'OfficialRating,SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionPlayCount'), + id: 'PlayCount,SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionRuntime'), + id: 'Runtime,SeriesSortName,SortName' + }, + { + name: Globalize.translate('OptionVideoBitrate'), + id: 'VideoBitRate,SeriesSortName,SortName' + }], + callback: function () { + reloadItems(tabContent); + }, + query: getQuery(tabContent) + }); + }); + + tabContent.querySelector('.btnSelectView').addEventListener('click', function (e) { + + libraryBrowser.showLayoutMenu(e.target, self.getCurrentViewStyle(), 'List,Poster,PosterCard'.split(',')); + }); + + tabContent.querySelector('.btnSelectView').addEventListener('layoutchange', function (e) { + + var viewStyle = e.detail.viewStyle; + getPageData(tabContent).view = viewStyle; + libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent), viewStyle); + reloadItems(tabContent); + }); } - initPage(tabContent); - self.renderTab = function () { + self.getCurrentViewStyle = function () { + return getPageData(tabContent).view; + }; - reloadItems(tabContent); - updateFilterControls(tabContent); + initPage(tabContent); + function createList() { + + if (self.listCreated) { + return Promise.resolve(); + } + + return ironCardList.getTemplate('episodesTab').then(function (html) { + + tabContent.querySelector('.itemsContainer').innerHTML = html; + self.listCreated = true; + }); + } + + function loadMoreItems() { + + if (!self.isLoading && self.hasMoreItems) { + + getQuery(tabContent).StartIndex += pageSize; + reloadItems(tabContent); + } + } + + self.scrollThreshold = new scrollThreshold(tabContent, false); + events.on(self.scrollThreshold, 'lower-threshold', loadMoreItems); + + self.renderTab = function () { + + createList().then(function () { + reloadItems(tabContent); + updateFilterControls(tabContent); + }); + }; + + self.destroy = function () { + events.off(self.scrollThreshold, 'lower-threshold', loadMoreItems); + if (self.scrollThreshold) { + self.scrollThreshold.destroy(); + } }; }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index c65220fb2..73e7d402d 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -45,7 +45,6 @@ getPromise().then(function (item) { reloadFromItem(page, item); - window.scrollTo(0, 0); }); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 8c1f995a8..9be0e43ff 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -173,6 +173,7 @@ enableFullPaperTabs: function () { + return true; if (browserInfo.animate && !browserInfo.mobile) { //return true; } @@ -1489,49 +1490,94 @@ return outerHtml; }, - getItemDataAttributes: function (item, options, index) { + getItemDataAttributesList: function (item, options, index) { var atts = []; var itemCommands = LibraryBrowser.getItemCommands(item, options); - atts.push('data-itemid="' + item.Id + '"'); - atts.push('data-commands="' + itemCommands.join(',') + '"'); + atts.push({ + name: 'itemid', + value: item.Id + }); + atts.push({ + name: 'commands', + value: itemCommands.join(',') + }); if (options.context) { - atts.push('data-context="' + (options.context || '') + '"'); + atts.push({ + name: 'context', + value: options.context || '' + }); } if (item.IsFolder) { - atts.push('data-isfolder="' + item.IsFolder + '"'); + atts.push({ + name: 'isfolder', + value: item.IsFolder + }); } - atts.push('data-itemtype="' + item.Type + '"'); + atts.push({ + name: 'itemtype', + value: item.Type + }); if (item.MediaType) { - atts.push('data-mediatype="' + (item.MediaType || '') + '"'); + atts.push({ + name: 'mediatype', + value: item.MediaType || '' + }); } if (item.UserData.PlaybackPositionTicks) { - atts.push('data-positionticks="' + (item.UserData.PlaybackPositionTicks || 0) + '"'); + atts.push({ + name: 'positionticks', + value: (item.UserData.PlaybackPositionTicks || 0) + }); } - atts.push('data-playaccess="' + (item.PlayAccess || '') + '"'); - atts.push('data-locationtype="' + (item.LocationType || '') + '"'); - atts.push('data-index="' + index + '"'); + atts.push({ + name: 'playaccess', + value: item.PlayAccess || '' + }); + + atts.push({ + name: 'locationtype', + value: item.LocationType || '' + }); if (item.AlbumId) { - atts.push('data-albumid="' + item.AlbumId + '"'); + atts.push({ + name: 'albumid', + value: item.AlbumId + }); } if (item.ChannelId) { - atts.push('data-channelid="' + item.ChannelId + '"'); + atts.push({ + name: 'channelid', + value: item.ChannelId + }); } if (item.ArtistItems && item.ArtistItems.length) { - atts.push('data-artistid="' + item.ArtistItems[0].Id + '"'); + atts.push({ + name: 'artistid', + value: item.ArtistItems[0].Id + }); } + return atts; + }, + + getItemDataAttributes: function (item, options, index) { + + var atts = LibraryBrowser.getItemDataAttributesList(item, options, index).map(function (i) { + return 'data-' + i.name + '="' + i.value + '"'; + }); + var html = atts.join(' '); if (html) { @@ -1754,15 +1800,12 @@ return result; }, - getPosterViewHtml: function (options) { + setPosterViewData: function (options) { var items = options.items; - var currentIndexValue; options.shape = options.shape || "portrait"; - var html = ""; - var primaryImageAspectRatio = LibraryBrowser.getAveragePrimaryImageAspectRatio(items); var isThumbAspectRatio = primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3; var isSquareAspectRatio = primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .33 || @@ -1827,8 +1870,446 @@ thumbWidth = 320; } + options.uiAspect = getDesiredAspect(options.shape); + options.primaryImageAspectRatio = primaryImageAspectRatio; + options.posterWidth = posterWidth; + options.thumbWidth = thumbWidth; + options.bannerWidth = bannerWidth; + options.squareSize = squareSize; + }, + + setPosterViewDataOnItems: function (options, items) { + + LibraryBrowser.setPosterViewData(options); + + options.shape = options.shape || "portrait"; + + var html = ""; + + var primaryImageAspectRatio; + var thumbWidth = options.thumbWidth; + var posterWidth = options.posterWidth; + var squareSize = options.squareSize; + var bannerWidth = options.bannerWidth; + + var uiAspect = options.uiAspect; + + for (var i = 0, length = items.length; i < length; i++) { + + var item = items[i]; + + primaryImageAspectRatio = LibraryBrowser.getAveragePrimaryImageAspectRatio([item]); + + LibraryBrowser.setPosterViewDataOnItem(item, i, options, primaryImageAspectRatio, thumbWidth, posterWidth, squareSize, bannerWidth, uiAspect); + } + + return html; + }, + + setPosterViewDataOnItem: function (item, index, options, primaryImageAspectRatio, thumbWidth, posterWidth, squareSize, bannerWidth, uiAspect) { + + var imgUrl = null; + var icon; + var width = null; + var height = null; + + var forceName = false; + + var enableImageEnhancers = options.enableImageEnhancers !== false; + + var cssClass = "card"; + + if (options.fullWidthOnMobile) { + cssClass += " fullWidthCardOnMobile"; + } + + var showTitle = options.showTitle == 'auto' ? true : options.showTitle; + var coverImage = options.coverImage; + + if (options.autoThumb && item.ImageTags && item.ImageTags.Primary && item.PrimaryImageAspectRatio && item.PrimaryImageAspectRatio >= 1.34) { + + width = posterWidth; + height = primaryImageAspectRatio ? Math.round(posterWidth / primaryImageAspectRatio) : null; + + imgUrl = ApiClient.getImageUrl(item.Id, { + type: "Primary", + maxHeight: height, + maxWidth: width, + tag: item.ImageTags.Primary, + enableImageEnhancers: enableImageEnhancers + }); + + if (primaryImageAspectRatio) { + if (uiAspect) { + if (Math.abs(primaryImageAspectRatio - uiAspect) <= .2) { + coverImage = true; + } + } + } + + } else if (options.autoThumb && item.ImageTags && item.ImageTags.Thumb) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Thumb", + maxWidth: thumbWidth, + tag: item.ImageTags.Thumb, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (options.preferBackdrop && item.BackdropImageTags && item.BackdropImageTags.length) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Backdrop", + maxWidth: thumbWidth, + tag: item.BackdropImageTags[0], + enableImageEnhancers: enableImageEnhancers + }); + + } else if (options.preferThumb && item.ImageTags && item.ImageTags.Thumb) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Thumb", + maxWidth: thumbWidth, + tag: item.ImageTags.Thumb, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (options.preferBanner && item.ImageTags && item.ImageTags.Banner) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Banner", + maxWidth: bannerWidth, + tag: item.ImageTags.Banner, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (options.preferThumb && item.SeriesThumbImageTag && options.inheritThumb !== false) { + + imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, { + type: "Thumb", + maxWidth: thumbWidth, + tag: item.SeriesThumbImageTag, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (options.preferThumb && item.ParentThumbItemId && options.inheritThumb !== false) { + + imgUrl = ApiClient.getThumbImageUrl(item.ParentThumbItemId, { + type: "Thumb", + maxWidth: thumbWidth, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (options.preferThumb && item.BackdropImageTags && item.BackdropImageTags.length) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Backdrop", + maxWidth: thumbWidth, + tag: item.BackdropImageTags[0], + enableImageEnhancers: enableImageEnhancers + }); + + forceName = true; + + } else if (item.ImageTags && item.ImageTags.Primary) { + + width = posterWidth; + height = primaryImageAspectRatio ? Math.round(posterWidth / primaryImageAspectRatio) : null; + + imgUrl = ApiClient.getImageUrl(item.Id, { + type: "Primary", + maxHeight: height, + maxWidth: width, + tag: item.ImageTags.Primary, + enableImageEnhancers: enableImageEnhancers + }); + + if (primaryImageAspectRatio) { + if (uiAspect) { + if (Math.abs(primaryImageAspectRatio - uiAspect) <= .2) { + coverImage = true; + } + } + } + } + else if (item.ParentPrimaryImageTag) { + + imgUrl = ApiClient.getImageUrl(item.ParentPrimaryImageItemId, { + type: "Primary", + maxWidth: posterWidth, + tag: item.ParentPrimaryImageTag, + enableImageEnhancers: enableImageEnhancers + }); + } + else if (item.AlbumId && item.AlbumPrimaryImageTag) { + + height = squareSize; + width = primaryImageAspectRatio ? Math.round(height * primaryImageAspectRatio) : null; + + imgUrl = ApiClient.getScaledImageUrl(item.AlbumId, { + type: "Primary", + maxHeight: height, + maxWidth: width, + tag: item.AlbumPrimaryImageTag, + enableImageEnhancers: enableImageEnhancers + }); + + if (primaryImageAspectRatio) { + if (uiAspect) { + if (Math.abs(primaryImageAspectRatio - uiAspect) <= .2) { + coverImage = true; + } + } + } + } + else if (item.Type == 'Season' && item.ImageTags && item.ImageTags.Thumb) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Thumb", + maxWidth: thumbWidth, + tag: item.ImageTags.Thumb, + enableImageEnhancers: enableImageEnhancers + }); + + } + else if (item.BackdropImageTags && item.BackdropImageTags.length) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Backdrop", + maxWidth: thumbWidth, + tag: item.BackdropImageTags[0], + enableImageEnhancers: enableImageEnhancers + }); + + } else if (item.ImageTags && item.ImageTags.Thumb) { + + imgUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Thumb", + maxWidth: thumbWidth, + tag: item.ImageTags.Thumb, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (item.SeriesThumbImageTag) { + + imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, { + type: "Thumb", + maxWidth: thumbWidth, + tag: item.SeriesThumbImageTag, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (item.ParentThumbItemId) { + + imgUrl = ApiClient.getThumbImageUrl(item, { + type: "Thumb", + maxWidth: thumbWidth, + enableImageEnhancers: enableImageEnhancers + }); + + } else if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist") { + + if (item.Name && showTitle) { + icon = 'library-music'; + } + cssClass += " defaultBackground"; + + } else if (item.Type == "Recording" || item.Type == "Program" || item.Type == "TvChannel") { + + if (item.Name && showTitle) { + icon = 'folder-open'; + } + + cssClass += " defaultBackground"; + } else if (item.MediaType == "Video" || item.Type == "Season" || item.Type == "Series") { + + if (item.Name && showTitle) { + icon = 'videocam'; + } + cssClass += " defaultBackground"; + } else if (item.Type == "Person") { + + if (item.Name && showTitle) { + icon = 'person'; + } + cssClass += " defaultBackground"; + } else { + if (item.Name && showTitle) { + icon = 'folder-open'; + } + cssClass += " defaultBackground"; + } + + icon = item.icon || icon; + cssClass += ' ' + options.shape + 'Card'; + + var mediaSourceCount = item.MediaSourceCount || 1; + + var href = options.linkItem === false ? '#' : LibraryBrowser.getHref(item, options.context); + + if (options.showChildCountIndicator && item.ChildCount && options.showLatestItemsPopup !== false) { + cssClass += ' groupedCard'; + } + + if ((showTitle || options.showItemCounts) && !options.overlayText) { + cssClass += ' bottomPaddedCard'; + } + + var dataAttributes = LibraryBrowser.getItemDataAttributesList(item, options, index); + + for (var i = 0, length = dataAttributes.length; i < length; i++) { + var att = dataAttributes[i]; + if (att.value) { + item['data-' + att.name] = att.value; + } + } + console.log(item['data-commands']); + + var defaultAction = options.defaultAction; + if (defaultAction == 'play' || defaultAction == 'playallfromhere') { + if (item.PlayAccess != 'Full') { + defaultAction = null; + } + } + + // card + //html += ''; + item.elemClass = cssClass; + item.defaultAction = defaultAction; + + var style = ""; + + if (imgUrl && !options.lazy) { + style += 'background-image:url(\'' + imgUrl + '\');'; + } + + var imageCssClass = 'cardImage'; + + if (icon) { + imageCssClass += " iconCardImage"; + } + + if (coverImage) { + imageCssClass += " coveredCardImage"; + if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder' || item.Type == 'Program' || item.Type == 'Recording') { + imageCssClass += " noScale"; + } + } + if (options.centerImage) { + imageCssClass += " centeredCardImage"; + } + + var dataSrc = ""; + + if (options.lazy && imgUrl) { + imageCssClass += " lazy"; + dataSrc = ' data-src="' + imgUrl + '"'; + } + + var cardboxCssClass = 'cardBox'; + + if (options.cardLayout) { + cardboxCssClass += ' visualCardBox'; + } + + item.cardBoxClass = cardboxCssClass; + + var anchorCssClass = "cardContent"; + + anchorCssClass += ' mediaItem'; + + if (defaultAction) { + anchorCssClass += ' itemWithAction'; + } + + item.anchorClass = anchorCssClass; + item.href = href; + item.imgUrl = imgUrl; + item.imageClass = imageCssClass; + + if (imgUrl) { + item.imageStyle = 'background-image:url("' + imgUrl + '");'; + } else { + item.imageStyle = null; + } + + var overlayHtml = ''; + + if (item.LocationType == "Virtual" || item.LocationType == "Offline") { + if (options.showLocationTypeIndicator !== false) { + overlayHtml += LibraryBrowser.getOfflineIndicatorHtml(item); + } + } else if (options.showUnplayedIndicator !== false) { + overlayHtml += LibraryBrowser.getPlayedIndicatorHtml(item); + } else if (options.showChildCountIndicator) { + overlayHtml += LibraryBrowser.getGroupCountIndicator(item); + } + + overlayHtml += LibraryBrowser.getSyncIndicator(item); + + if (mediaSourceCount > 1) { + overlayHtml += '
' + mediaSourceCount + '
'; + } + + var progressHtml = options.showProgress === false || item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); + + var footerOverlayed = false; + + if (options.overlayText || (forceName && !showTitle)) { + + var footerCssClass = progressHtml ? 'cardFooter fullCardFooter' : 'cardFooter'; + + overlayHtml += LibraryBrowser.getCardFooterText(item, options, showTitle, imgUrl, forceName, footerCssClass, progressHtml); + footerOverlayed = true; + } + else if (progressHtml) { + overlayHtml += '
'; + overlayHtml += "
"; + overlayHtml += progressHtml; + overlayHtml += "
"; + //cardFooter + overlayHtml += "
"; + + progressHtml = ''; + } + + if (options.overlayPlayButton && !item.IsPlaceHolder && (item.LocationType != 'Virtual' || !item.MediaType || item.Type == 'Program') && item.Type != 'Person') { + overlayHtml += '
'; + } + if (options.overlayMoreButton) { + overlayHtml += '
'; + } + + //// cardScalable + + if (!options.overlayText && !footerOverlayed) { + item.footerHtml = LibraryBrowser.getCardFooterText(item, options, showTitle, imgUrl, forceName, 'cardFooter outerCardFooter', progressHtml); + } else { + item.footerHtml = ''; + } + + item.overlayHtml = overlayHtml; + }, + + getPosterViewHtml: function (options) { + + LibraryBrowser.setPosterViewData(options); + + var items = options.items; + var currentIndexValue; + + options.shape = options.shape || "portrait"; + + var html = ""; + + var primaryImageAspectRatio; + var thumbWidth = options.thumbWidth; + var posterWidth = options.posterWidth; + var squareSize = options.squareSize; + var bannerWidth = options.bannerWidth; + var dateText; - var uiAspect = getDesiredAspect(options.shape); + var uiAspect = options.uiAspect; for (var i = 0, length = items.length; i < length; i++) { @@ -2765,23 +3246,24 @@ } }, - getDefaultPageSizeSelections: function () { + showLayoutMenu: function (button, currentLayout, views) { - return [20, 50, 100, 200, 300, 400, 500]; - }, + var dispatchEvent = true; - showLayoutMenu: function (button, currentLayout) { + if (!views) { - // Add banner and list once all screens support them - var views = button.getAttribute('data-layouts'); + dispatchEvent = false; + // Add banner and list once all screens support them + views = button.getAttribute('data-layouts'); - views = views ? views.split(',') : ['List', 'Poster', 'PosterCard', 'Thumb', 'ThumbCard']; + views = views ? views.split(',') : ['List', 'Poster', 'PosterCard', 'Thumb', 'ThumbCard']; + } var menuItems = views.map(function (v) { return { name: Globalize.translate('Option' + v), id: v, - ironIcon: currentLayout == v ? 'check' : null + selected: currentLayout == v }; }); @@ -2792,10 +3274,20 @@ positionTo: button, callback: function (id) { - // TODO: remove jQuery - require(['jQuery'], function ($) { - $(button).trigger('layoutchange', [id]); - }); + if (dispatchEvent) { + button.dispatchEvent(new CustomEvent('layoutchange', { + detail: { + viewStyle: id + }, + bubbles: true, + cancelable: false + })); + } else { + // TODO: remove jQuery + require(['jQuery'], function ($) { + $(button).trigger('layoutchange', [id]); + }); + } } }); @@ -2866,7 +3358,7 @@ var id = "selectPageSize"; - var pageSizes = options.pageSizes || LibraryBrowser.getDefaultPageSizeSelections(); + var pageSizes = options.pageSizes || [20, 50, 100, 200, 300, 400, 500]; var optionsHtml = pageSizes.map(function (val) { diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 7863f6cc9..59b0a5d1e 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -1,4 +1,4 @@ -define(['imageLoader', 'layoutManager', 'jQuery', 'paper-icon-button', 'emby-icons'], function (imageLoader, layoutManager, $) { +define(['imageLoader', 'layoutManager', 'jQuery'], function (imageLoader, layoutManager, $) { var mainDrawerPanel = document.querySelector('.mainDrawerPanel'); @@ -87,7 +87,7 @@ var url = user.imageUrl; if (user.supportsImageParams) { - url += "&height=" + (userButtonHeight * Math.max(window.devicePixelRatio || 1, 2)); + url += "&height=" + Math.round((userButtonHeight * Math.max(window.devicePixelRatio || 1, 2))); } if (headerUserButton) { @@ -993,7 +993,7 @@ if (!e.detail.isRestored) { // Scroll back up so in case vertical scroll was messed with - window.scrollTo(0, 0); + //window.scrollTo(0, 0); } updateTitle(page); @@ -1126,8 +1126,19 @@ } mainDrawerPanel.addEventListener('iron-select', onMainDrawerSelect); + var headerCreated; + var userRequiresUpdateAfterHeader; - renderHeader(); + require(['paper-icon-button', 'emby-icons'], function () { + renderHeader(); + headerCreated = true; + + var user = userRequiresUpdateAfterHeader; + if (user) { + updateUserInHeader(user); + } + userRequiresUpdateAfterHeader = null; + }); Events.on(ConnectionManager, 'apiclientcreated', function (e, apiClient) { initializeApiClient(apiClient); @@ -1138,7 +1149,12 @@ var apiClient = ConnectionManager.getApiClient(user.ServerId); ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(function (user) { refreshLibraryDrawer(user); - updateUserInHeader(user); + + if (headerCreated) { + updateUserInHeader(user); + } else { + userRequiresUpdateAfterHeader = user; + } }); if (!AppInfo.isNativeApp) { diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 32dd58cd1..dd1ff4ad2 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1606,6 +1606,8 @@ var AppInfo = {}; var paths = { velocity: bowerPath + "/velocity/velocity.min", tvguide: 'components/tvguide/tvguide', + ironCardList: 'components/ironcardlist/ironcardlist', + scrollThreshold: 'components/scrollthreshold', directorybrowser: 'components/directorybrowser/directorybrowser', collectioneditor: 'components/collectioneditor/collectioneditor', playlisteditor: 'components/playlisteditor/playlisteditor', @@ -1714,6 +1716,7 @@ var AppInfo = {}; // Done define("emby-icons", ["html!" + bowerPath + "/emby-icons/emby-icons.html"]); + define("lazyload-image", ["html!" + bowerPath + "/emby-lazyload-image/lazyload-image.html"]); define("paper-spinner", ["html!" + bowerPath + "/paper-spinner/paper-spinner.html"]); define("paper-toast", ["html!" + bowerPath + "/paper-toast/paper-toast.html"]); define("paper-slider", ["html!" + bowerPath + "/paper-slider/paper-slider.html"]); @@ -2732,7 +2735,7 @@ var AppInfo = {}; defineRoute({ path: '/tv.html', - dependencies: ['paper-tabs', 'paper-checkbox'], + dependencies: ['paper-tabs', 'paper-checkbox', 'paper-button'], autoFocus: false, controller: 'scripts/tvrecommended' }); diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js index 43d844da6..49b11cae8 100644 --- a/dashboard-ui/scripts/tvgenres.js +++ b/dashboard-ui/scripts/tvgenres.js @@ -17,8 +17,7 @@ IncludeItemTypes: "Series", Recursive: true, Fields: "DateCreated,SyncInfo,ItemCounts", - StartIndex: 0, - Limit: LibraryBrowser.getDefaultPageSize() + StartIndex: 0 }, view: LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('Thumb', 'Thumb') }; @@ -46,23 +45,9 @@ ApiClient.getGenres(Dashboard.getCurrentUserId(), query).then(function (result) { - // Scroll back up so they can see the results from the beginning - window.scrollTo(0, 0); - var html = ''; - var viewStyle = getPageData().view; - - $('.listTopPaging', context).html(LibraryBrowser.getQueryPagingHtml({ - startIndex: query.StartIndex, - limit: query.Limit, - totalRecordCount: result.TotalRecordCount, - viewButton: false, - showLimit: false, - updatePageSizeSetting: false, - addLayoutButton: true, - currentLayout: viewStyle - })); + var viewStyle = self.getCurrentViewStyle(); if (viewStyle == "Thumb") { html = LibraryBrowser.getPosterViewHtml({ @@ -116,30 +101,40 @@ elem.innerHTML = html; ImageLoader.lazyChildren(elem); - $('.btnNextPage', context).on('click', function () { - query.StartIndex += query.Limit; - reloadItems(context); - }); - - $('.btnPreviousPage', context).on('click', function () { - query.StartIndex -= query.Limit; - reloadItems(context); - }); - - $('.btnChangeLayout', context).on('layoutchange', function (e, layout) { - getPageData().view = layout; - LibraryBrowser.saveViewSetting(getSavedQueryKey(), layout); - reloadItems(context); - }); - LibraryBrowser.saveQueryValues(getSavedQueryKey(), query); Dashboard.hideLoadingMsg(); }); } - self.renderTab = function () { + self.getViewStyles = function () { + return 'Poster,PosterCard,Thumb,ThumbCard'.split(','); + }; + + self.getCurrentViewStyle = function () { + return getPageData(tabContent).view; + }; + + self.setCurrentViewStyle = function(viewStyle) { + getPageData(tabContent).view = viewStyle; + LibraryBrowser.saveViewSetting(getSavedQueryKey(tabContent), viewStyle); + reloadItems(tabContent); + }; + + self.enableViewSelection = true; + + self.renderTab = function () { reloadItems(tabContent); }; + + tabContent.querySelector('.btnSelectView').addEventListener('click', function (e) { + + LibraryBrowser.showLayoutMenu(e.target, self.getCurrentViewStyle(), self.getViewStyles()); + }); + + tabContent.querySelector('.btnSelectView').addEventListener('layoutchange', function (e) { + + self.setCurrentViewStyle(e.detail.viewStyle); + }); }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index bdf848f38..fca3580f2 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -294,5 +294,14 @@ Events.off(MediaController, 'playbackstop', onPlaybackStop); }); + + view.addEventListener('viewdestroy', function (e) { + + tabControllers.forEach(function (t) { + if (t.destroy) { + t.destroy(); + } + }); + }); }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 6841b1da8..405af3b5f 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -1,8 +1,9 @@ -define(['jQuery'], function ($) { +define(['ironCardList', 'scrollThreshold', 'events', 'libraryBrowser', 'jQuery'], function (ironCardList, scrollThreshold, events, libraryBrowser, $) { return function (view, params, tabContent) { - var self = this; + var self = this; + var pageSize = libraryBrowser.getDefaultPageSize(); var data = {}; @@ -21,13 +22,13 @@ ImageTypeLimit: 1, EnableImageTypes: "Primary,Backdrop,Banner,Thumb", StartIndex: 0, - Limit: LibraryBrowser.getDefaultPageSize() + Limit: pageSize }, - view: LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('Poster', 'Thumb') + view: libraryBrowser.getSavedView(key) || libraryBrowser.getDefaultItemsView('Poster', 'Poster') }; pageData.query.ParentId = params.topParentId; - LibraryBrowser.loadSavedQueryValues(key, pageData.query); + libraryBrowser.loadSavedQueryValues(key, pageData.query); } return pageData; } @@ -40,192 +41,143 @@ function getSavedQueryKey(context) { if (!context.savedQueryKey) { - context.savedQueryKey = LibraryBrowser.getSavedQueryKey('series'); + context.savedQueryKey = libraryBrowser.getSavedQueryKey('series'); } return context.savedQueryKey; } + function setCardOptions(result) { + + var cardOptions; + + var view = self.getCurrentViewStyle(); + + if (view == "Thumb") { + + cardOptions = { + items: result.Items, + shape: "backdrop", + preferThumb: true, + context: 'tv', + lazy: true, + overlayPlayButton: true + }; + } + else if (view == "ThumbCard") { + + cardOptions = { + items: result.Items, + shape: "backdrop", + preferThumb: true, + context: 'tv', + lazy: true, + cardLayout: true, + showTitle: true, + showSeriesYear: true + }; + } + else if (view == "Banner") { + + cardOptions = { + items: result.Items, + shape: "banner", + preferBanner: true, + context: 'tv', + lazy: true + }; + } + else if (view == "List") { + + html = libraryBrowser.getListViewHtml({ + items: result.Items, + context: 'tv', + sortBy: query.SortBy + }); + } + else if (view == "PosterCard") { + cardOptions = { + items: result.Items, + shape: "portrait", + context: 'tv', + showTitle: true, + showYear: true, + lazy: true, + cardLayout: true + }; + } + else { + + // Poster + cardOptions = { + items: result.Items, + shape: "portrait", + context: 'tv', + centerText: true, + lazy: true, + overlayPlayButton: true + }; + } + + self.cardOptions = cardOptions; + } + function reloadItems(page) { + self.isLoading = true; Dashboard.showLoadingMsg(); var query = getQuery(page); + var startIndex = query.StartIndex; + var reloadList = !self.cardOptions || startIndex == 0; ApiClient.getItems(Dashboard.getCurrentUserId(), query).then(function (result) { - // Scroll back up so they can see the results from the beginning - window.scrollTo(0, 0); - - var view = getPageData(page).view; - - var html = ''; - var pagingHtml = LibraryBrowser.getQueryPagingHtml({ - startIndex: query.StartIndex, - limit: query.Limit, - totalRecordCount: result.TotalRecordCount, - showLimit: false, - updatePageSizeSetting: false, - addLayoutButton: true, - sortButton: true, - currentLayout: view, - layouts: 'Banner,List,Poster,PosterCard,Thumb,ThumbCard', - filterButton: true - }); - - page.querySelector('.listTopPaging').innerHTML = pagingHtml; - updateFilterControls(page); - if (view == "Thumb") { - - html = LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: "backdrop", - preferThumb: true, - context: 'tv', - lazy: true, - overlayPlayButton: true - }); - + var pushItems = true; + if (reloadList) { + setCardOptions(result); + pushItems = false; } - else if (view == "ThumbCard") { + libraryBrowser.setPosterViewData(self.cardOptions); + libraryBrowser.setPosterViewDataOnItems(self.cardOptions, result.Items); - html = LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: "backdrop", - preferThumb: true, - context: 'tv', - lazy: true, - cardLayout: true, - showTitle: true, - showSeriesYear: true - }); - } - else if (view == "Banner") { - - html = LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: "banner", - preferBanner: true, - context: 'tv', - lazy: true - }); - } - else if (view == "List") { - - html = LibraryBrowser.getListViewHtml({ - items: result.Items, - context: 'tv', - sortBy: query.SortBy - }); - } - else if (view == "PosterCard") { - html = LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: "portrait", - context: 'tv', - showTitle: true, - showYear: true, - lazy: true, - cardLayout: true - }); - } - else { - - // Poster - html = LibraryBrowser.getPosterViewHtml({ - items: result.Items, - shape: "portrait", - context: 'tv', - centerText: true, - lazy: true, - overlayPlayButton: true - }); + var ironList = page.querySelector('#ironList'); + if (pushItems) { + for (var i = 0, length = result.Items.length; i < length; i++) { + ironList.push('items', result.Items[i]); + } + } else { + ironList.items = result.Items; } - var elem = page.querySelector('#items'); - elem.innerHTML = html + pagingHtml; - ImageLoader.lazyChildren(elem); + // Hack: notifyResize needs to be done after the items have been rendered + setTimeout(function () { - $('.btnNextPage', page).on('click', function () { - query.StartIndex += query.Limit; - reloadItems(page); - }); + ironList.notifyResize(); + self.scrollThreshold.resetSize(); + }, 300); - $('.btnPreviousPage', page).on('click', function () { - query.StartIndex -= query.Limit; - reloadItems(page); - }); - - $('.btnChangeLayout', page).on('layoutchange', function (e, layout) { - getPageData(page).view = layout; - LibraryBrowser.saveViewSetting(getSavedQueryKey(page), layout); - reloadItems(page); - }); - - $('.btnFilter', page).on('click', function () { - showFilterMenu(page); - }); - - // On callback make sure to set StartIndex = 0 - $('.btnSort', page).on('click', function () { - LibraryBrowser.showSortMenu({ - items: [{ - name: Globalize.translate('OptionNameSort'), - id: 'SortName' - }, - { - name: Globalize.translate('OptionImdbRating'), - id: 'CommunityRating,SortName' - }, - { - name: Globalize.translate('OptionDateAdded'), - id: 'DateCreated,SortName' - }, - { - name: Globalize.translate('OptionDatePlayed'), - id: 'DatePlayed,SortName' - }, - { - name: Globalize.translate('OptionMetascore'), - id: 'Metascore,SortName' - }, - { - name: Globalize.translate('OptionParentalRating'), - id: 'OfficialRating,SortName' - }, - { - name: Globalize.translate('OptionPlayCount'), - id: 'PlayCount,SortName' - }, - { - name: Globalize.translate('OptionReleaseDate'), - id: 'PremiereDate,SortName' - }], - callback: function () { - reloadItems(page); - }, - query: query - }); - }); - - LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query); + libraryBrowser.saveQueryValues(getSavedQueryKey(page), query); Dashboard.hideLoadingMsg(); + self.hasMoreItems = result.TotalRecordCount > (startIndex + result.Items.length); + self.isLoading = false; }); } - function showFilterMenu(page) { + self.showFilterMenu = function () { require(['components/filterdialog/filterdialog'], function (filterDialogFactory) { var filterDialog = new filterDialogFactory({ - query: getQuery(page), + query: getQuery(tabContent), mode: 'series' }); Events.on(filterDialog, 'filterchange', function () { - reloadItems(page); + getQuery(tabContent).StartIndex = 0; + reloadItems(tabContent); }); filterDialog.show(); @@ -252,16 +204,117 @@ var query = getQuery(tabContent); query.NameStartsWithOrGreater = ''; + getQuery(tabContent).StartIndex = 0; reloadItems(tabContent); }); + + tabContent.querySelector('.btnFilter').addEventListener('click', function () { + self.showFilterMenu(); + }); + + tabContent.querySelector('.btnSort').addEventListener('click', function () { + libraryBrowser.showSortMenu({ + items: [{ + name: Globalize.translate('OptionNameSort'), + id: 'SortName' + }, + { + name: Globalize.translate('OptionImdbRating'), + id: 'CommunityRating,SortName' + }, + { + name: Globalize.translate('OptionDateAdded'), + id: 'DateCreated,SortName' + }, + { + name: Globalize.translate('OptionDatePlayed'), + id: 'DatePlayed,SortName' + }, + { + name: Globalize.translate('OptionMetascore'), + id: 'Metascore,SortName' + }, + { + name: Globalize.translate('OptionParentalRating'), + id: 'OfficialRating,SortName' + }, + { + name: Globalize.translate('OptionPlayCount'), + id: 'PlayCount,SortName' + }, + { + name: Globalize.translate('OptionReleaseDate'), + id: 'PremiereDate,SortName' + }], + callback: function () { + getQuery(tabContent).StartIndex = 0; + reloadItems(tabContent); + }, + query: getQuery(tabContent) + }); + }); + + tabContent.querySelector('.btnSelectView').addEventListener('click', function (e) { + + libraryBrowser.showLayoutMenu(e.target, self.getCurrentViewStyle(), 'Banner,List,Poster,PosterCard,Thumb,ThumbCard'.split(',')); + }); + + tabContent.querySelector('.btnSelectView').addEventListener('layoutchange', function (e) { + + var viewStyle = e.detail.viewStyle; + + getPageData(tabContent).view = viewStyle; + libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent), viewStyle); + getQuery(tabContent).StartIndex = 0; + reloadItems(tabContent); + }); } - initPage(tabContent); - self.renderTab = function () { + self.getCurrentViewStyle = function () { + return getPageData(tabContent).view; + }; - reloadItems(tabContent); - updateFilterControls(tabContent); + initPage(tabContent); + + function createList() { + + if (self.listCreated) { + return Promise.resolve(); + } + + return ironCardList.getTemplate('seriesTab').then(function (html) { + + tabContent.querySelector('.itemsContainer').innerHTML = html; + self.listCreated = true; + }); + } + + function loadMoreItems() { + + if (!self.isLoading && self.hasMoreItems) { + + getQuery(tabContent).StartIndex += pageSize; + reloadItems(tabContent); + } + } + + self.scrollThreshold = new scrollThreshold(tabContent, false); + events.on(self.scrollThreshold, 'lower-threshold', loadMoreItems); + + self.renderTab = function () { + + createList().then(function () { + reloadItems(tabContent); + updateFilterControls(tabContent); + }); + }; + + self.destroy = function () { + events.off(self.scrollThreshold, 'lower-threshold', loadMoreItems); + if (self.scrollThreshold) { + self.scrollThreshold.destroy(); + } }; }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js index 812198cd8..4cf1e60b9 100644 --- a/dashboard-ui/scripts/tvstudios.js +++ b/dashboard-ui/scripts/tvstudios.js @@ -16,8 +16,7 @@ IncludeItemTypes: "Series", Recursive: true, Fields: "DateCreated,ItemCounts", - StartIndex: 0, - Limit: LibraryBrowser.getDefaultPageSize() + StartIndex: 0 } }; @@ -40,18 +39,8 @@ ApiClient.getStudios(Dashboard.getCurrentUserId(), query).then(function (result) { - // Scroll back up so they can see the results from the beginning - window.scrollTo(0, 0); - var html = ''; - $('.listTopPaging', context).html(LibraryBrowser.getQueryPagingHtml({ - startIndex: query.StartIndex, - limit: query.Limit, - totalRecordCount: result.TotalRecordCount, - showLimit: false - })); - html += LibraryBrowser.getPosterViewHtml({ items: result.Items, shape: "backdrop", @@ -68,16 +57,6 @@ elem.innerHTML = html; ImageLoader.lazyChildren(elem); - $('.btnNextPage', context).on('click', function () { - query.StartIndex += query.Limit; - reloadItems(context, params); - }); - - $('.btnPreviousPage', context).on('click', function () { - query.StartIndex -= query.Limit; - reloadItems(context, params); - }); - LibraryBrowser.saveQueryValues(getSavedQueryKey(), query); Dashboard.hideLoadingMsg(); }); diff --git a/dashboard-ui/tv.html b/dashboard-ui/tv.html index 18f0ea453..6137fc651 100644 --- a/dashboard-ui/tv.html +++ b/dashboard-ui/tv.html @@ -22,6 +22,7 @@
+
@@ -63,26 +64,32 @@

-
+
+ +
+ + + +
+
-
-
-
+ +
-
-
-
-
-
+
+
+ + + +
+
-
-
-
-
+
+