./html/artist.html0000644000000000000000000015670414732745326013103 0ustar rootroot Audify - Music HTML Template

​Calmly (Nature)

Felix Carter Presents: Beats Beyond Boundaries – An Epic Journey
Into the Heart of Music and Sound ...

./html/coming-soon.html0000644000000000000000000000665414732467506014024 0ustar rootroot Audify - Music HTML Template
  • 365

    Days
  • 24

    Hrs
  • 60

    Min
  • 60

    Secs
./html/favorites-track.html0000644000000000000000000021470714732745326014677 0ustar rootroot Audify - Music HTML Template

​Calmly (Nature)

Felix Carter Presents: Beats Beyond Boundaries – An Epic Journey
Into the Heart of Music and Sound ...

./html/index.html0000644000000000000000000030654514732745326012704 0ustar rootroot Audify - Music HTML Template
Chasing Lost Memories Under Moonlight Sky
Whispers of the Midnight Breeze
Echoes Beneath Starlit Skies
Dancing Shadows of Twilight Dreams
Harmonies Beyond the Horizon
Chasing Lost Memories Under Moonlight Sky
Whispers of the Midnight Breeze
Echoes Beneath Starlit Skies
Dancing Shadows of Twilight Dreams
Harmonies Beyond the Horizon

Shows You Might Like

Shows You Might Like

Trending Tracks

./html/iptv.m3u0000644000000000000000000002024115144314436012271 0ustar rootroot#EXTM3U #EXTINF:-1 ,CCTV1 http://192.168.1.1:7200/udp/239.81.0.102:4056 #EXTINF:-1 ,CCTV2 http://192.168.1.1:7200/udp/239.81.0.115:4056 #EXTINF:-1 ,CCTV3 http://192.168.1.1:7200/udp/239.81.0.231:4056 #EXTINF:-1 ,CCTV4 http://192.168.1.1:7200/udp/239.81.0.96:4056 #EXTINF:-1 ,CCTV5 http://192.168.1.1:7200/udp/239.81.0.232:4056 #EXTINF:-1 ,CCTV5+ http://192.168.1.1:7200/udp/239.81.0.101:4056 #EXTINF:-1 ,CCTV6 http://192.168.1.1:7200/udp/239.81.0.233:4056 #EXTINF:-1 ,CCTV7 http://192.168.1.1:7200/udp/239.81.0.116:4056 #EXTINF:-1 ,CCTV8 http://192.168.1.1:7200/udp/239.81.0.234:4056 #EXTINF:-1 ,CCTV9 http://192.168.1.1:7200/udp/239.81.0.117:4056 #EXTINF:-1 ,CCTV10 http://192.168.1.1:7200/udp/239.81.0.118:4056 #EXTINF:-1 ,CCTV11 http://192.168.1.1:7200/udp/239.81.0.229:4056 #EXTINF:-1 ,CCTV12 http://192.168.1.1:7200/udp/239.81.0.119:4056 #EXTINF:-1 ,CCTV13 http://192.168.1.1:7200/udp/239.81.0.206:4056 #EXTINF:-1 ,CCTV14 http://192.168.1.1:7200/udp/239.81.0.120:4056 #EXTINF:-1 ,CCTV15 http://192.168.1.1:7200/udp/239.81.0.230:4056 #EXTINF:-1 ,CCTV16 http://192.168.1.1:7200/udp/239.81.0.142:4056 #EXTINF:-1 ,CCTV17 http://192.168.1.1:7200/udp/239.81.0.228:4056 #EXTINF:-1 ,CCTV4K http://192.168.1.1:7200/udp/239.81.0.196:4056 #EXTINF:-1 ,CETV1 http://192.168.1.1:7200/udp/239.81.0.92:4056 #EXTINF:-1 ,CETV2 http://192.168.1.1:7200/udp/239.81.0.245:4056 #EXTINF:-1 ,CETV4 http://192.168.1.1:7200/udp/239.81.0.188:4056 #EXTINF:-1 ,CGTN http://192.168.1.1:7200/udp/239.81.0.28:4056 #EXTINF:-1 ,CCTV4K http://192.168.1.1:7200/udp/239.81.0.196:4056 #EXTINF:-1 ,CCTV16 4K http://192.168.1.1:7200/udp/239.81.0.144:4056 #EXTINF:-1 ,北京卫视4K http://192.168.1.1:7200/udp/239.81.0.226:4056 #EXTINF:-1 ,北京卫视4K http://192.168.1.1:7200/udp/239.81.0.225:4056 #EXTINF:-1 ,东方卫视4K http://192.168.1.1:7200/udp/239.81.0.76:4056 #EXTINF:-1 ,广东卫视4K http://192.168.1.1:7200/udp/239.81.0.252:4056 #EXTINF:-1 ,深圳卫视4K http://192.168.1.1:7200/udp/239.81.0.254:4056 #EXTINF:-1 ,湖南卫视4K http://192.168.1.1:7200/udp/239.81.0.72:4056 #EXTINF:-1 ,山东卫视4K http://192.168.1.1:7200/udp/239.81.0.78:4056 #EXTINF:-1 ,四川卫视4K http://192.168.1.1:7200/udp/239.81.0.80:4056 #EXTINF:-1 ,浙江卫视4K http://192.168.1.1:7200/udp/239.81.0.75:4056 #EXTINF:-1 ,江苏卫视4K http://192.168.1.1:7200/udp/239.81.0.73:4056 #EXTINF:-1 ,华数电影4K http://192.168.1.1:7200/udp/239.81.0.123:4056 #EXTINF:-1 ,重庆卫视 http://192.168.1.1:7200/udp/239.81.0.47:4056 #EXTINF:-1 ,江苏卫视 http://192.168.1.1:7200/udp/239.81.0.106:4056 #EXTINF:-1 ,浙江卫视 http://192.168.1.1:7200/udp/239.81.0.108:4056 #EXTINF:-1 ,东方卫视 http://192.168.1.1:7200/udp/239.81.0.111:4056 #EXTINF:-1 ,深圳卫视 http://192.168.1.1:7200/udp/239.81.0.57:4056 #EXTINF:-1 ,北京卫视 http://192.168.1.1:7200/udp/239.81.0.109:4056 #EXTINF:-1 ,山东卫视 http://192.168.1.1:7200/udp/239.81.0.114:4056 #EXTINF:-1 ,天津卫视 http://192.168.1.1:7200/udp/239.81.0.113:4056 #EXTINF:-1 ,贵州卫视 http://192.168.1.1:7200/udp/239.81.0.95:4056 #EXTINF:-1 ,四川卫视 http://192.168.1.1:7200/udp/239.81.0.130:4056 #EXTINF:-1 ,云南卫视 http://192.168.1.1:7200/udp/239.81.0.44:4056 #EXTINF:-1 ,广西卫视 http://192.168.1.1:7200/udp/239.81.0.107:4056 #EXTINF:-1 ,黑龙江卫视 http://192.168.1.1:7200/udp/239.81.0.105:4056 #EXTINF:-1 ,安徽卫视 http://192.168.1.1:7200/udp/239.81.0.211:4056 #EXTINF:-1 ,江西卫视 http://192.168.1.1:7200/udp/239.81.0.204:4056 #EXTINF:-1 ,湖北卫视 http://192.168.1.1:7200/udp/239.81.0.112:4056 #EXTINF:-1 ,海南卫视 http://192.168.1.1:7200/udp/239.81.0.199:4056 #EXTINF:-1 ,海南卫视 http://192.168.1.1:7200/udp/239.81.0.48:4056 #EXTINF:-1 ,陕西卫视 http://192.168.1.1:7200/udp/239.81.0.89:4056 #EXTINF:-1 ,东南卫视 http://192.168.1.1:7200/udp/239.81.0.215:4056 #EXTINF:-1 ,厦门卫视 http://192.168.1.1:7200/udp/239.81.0.212:4056 #EXTINF:-1 ,吉林卫视 http://192.168.1.1:7200/udp/239.81.0.143:4056 #EXTINF:-1 ,辽宁卫视 http://192.168.1.1:7200/udp/239.81.0.210:4056 #EXTINF:-1 ,内蒙古卫视 http://192.168.1.1:7200/udp/239.81.0.54:4056 #EXTINF:-1 ,湖南卫视 http://192.168.1.1:7200/udp/239.81.0.110:4056 #EXTINF:-1 ,广东卫视 http://192.168.1.1:7200/udp/239.81.0.104:4056 #EXTINF:-1 ,河南卫视 http://192.168.1.1:7200/udp/239.81.0.220:4056 #EXTINF:-1 ,河北卫视 http://192.168.1.1:7200/udp/239.81.0.94:4056 #EXTINF:-1 ,宁夏卫视 http://192.168.1.1:7200/udp/239.81.0.200:4056 #EXTINF:-1 ,甘肃卫视 http://192.168.1.1:7200/udp/239.81.0.207:4056 #EXTINF:-1 ,青海卫视 http://192.168.1.1:7200/udp/239.81.0.53:4056 #EXTINF:-1 ,新疆卫视 http://192.168.1.1:7200/udp/239.81.0.122:4056 #EXTINF:-1 ,西藏卫视 http://192.168.1.1:7200/udp/239.81.0.90:4056 #EXTINF:-1 ,兵团卫视 http://192.168.1.1:7200/udp/239.81.0.223:4056 #EXTINF:-1 ,三沙卫视 http://192.168.1.1:7200/udp/239.81.0.242:4056 #EXTINF:-1 ,大湾区卫狈 http://192.168.1.1:7200/udp/239.81.0.32:4056 #EXTINF:-1 ,金鹰卡通 http://192.168.1.1:7200/udp/239.81.0.61:4056 #EXTINF:-1 ,金鹰卡通 http://192.168.1.1:7200/udp/239.81.0.148:4056 #EXTINF:-1 ,嘉佳卡通 http://192.168.1.1:7200/udp/239.81.0.64:4056 #EXTINF:-1 ,卡酷少儿 http://192.168.1.1:7200/udp/239.81.0.62:4056 #EXTINF:-1 ,山东教育卫视 http://192.168.1.1:7200/udp/239.81.0.93:4056 #EXTINF:-1 ,北京纪实科教 http://192.168.1.1:7200/udp/239.81.0.195:4056 #EXTINF:-1 ,求索纪录 http://192.168.1.1:7200/udp/239.81.0.153:4056 #EXTINF:-1 ,IPTV动画 http://192.168.1.1:7200/udp/239.81.0.100:4056 #EXTINF:-1 ,CHC影迷电影 http://192.168.1.1:7200/udp/239.81.0.240:4056 #EXTINF:-1 ,CHC家庭影院 http://192.168.1.1:7200/udp/239.81.0.238:4056 #EXTINF:-1 ,CHC动作电影 http://192.168.1.1:7200/udp/239.81.0.239:4056 #EXTINF:-1 ,金鹰纪实 http://192.168.1.1:7200/udp/239.81.0.91:4056 #EXTINF:-1 ,新动漫 http://192.168.1.1:7200/udp/239.81.0.235:4056 #EXTINF:-1 ,中国天气 http://192.168.1.1:7200/udp/239.81.0.63:4056 #EXTINF:-1 ,先锋乒羽 http://192.168.1.1:7200/udp/239.81.0.236:4056 #EXTINF:-1 ,精彩影视 http://192.168.1.1:7200/udp/239.81.0.152:4056 #EXTINF:-1 ,广西影视 http://192.168.1.1:7200/udp/239.81.0.250:4056 #EXTINF:-1 ,广西新闻 http://192.168.1.1:7200/udp/239.81.0.248:4056 #EXTINF:-1 ,广西移动 http://192.168.1.1:7200/udp/239.81.0.216:4056 #EXTINF:-1 ,广西综艺旅游 http://192.168.1.1:7200/udp/239.81.0.214:4056 #EXTINF:-1 ,广西都市 http://192.168.1.1:7200/udp/239.81.0.247:4056 #EXTINF:-1 ,广西乐思购 http://192.168.1.1:7200/udp/239.81.0.9:4056 #EXTINF:-1 ,广西国际 http://192.168.1.1:7200/udp/239.81.0.8:4056 704×576 #EXTINF:-1 ,广西视听 http://192.168.1.1:7200/udp/239.81.0.208:4056 #EXTINF:-1 ,南宁影视娱乐 http://192.168.1.1:7200/udp/239.81.0.140:4056 #EXTINF:-1 ,南宁文旅生活 http://192.168.1.1:7200/udp/239.81.0.139:4056 #EXTINF:-1 ,南宁新闻综合 http://192.168.1.1:7200/udp/239.81.0.241:4056 #EXTINF:-1 ,南宁公共 http://192.168.1.1:7200/udp/239.81.0.141:4056 #EXTINF:-1 ,北海综合 http://192.168.1.1:7200/udp/239.81.0.154:4056 #EXTINF:-1 ,防城港综合 http://192.168.1.1:7200/udp/239.81.0.151:4056 #EXTINF:-1 ,桂林综合 http://192.168.1.1:7200/udp/239.81.0.174:4056 #EXTINF:-1 ,桂林公共 http://192.168.1.1:7200/udp/239.81.0.222:4056 #EXTINF:-1 ,桂林科教 http://192.168.1.1:7200/udp/239.81.0.221:4056 #EXTINF:-1 ,崇左综合 http://192.168.1.1:7200/udp/239.81.0.218:4056 #EXTINF:-1 ,来宾综合 http://192.168.1.1:7200/udp/239.81.0.173:4056 #EXTINF:-1 ,柳州综合 http://192.168.1.1:7200/udp/239.81.0.175:4056 #EXTINF:-1 ,梧州综合 http://192.168.1.1:7200/udp/239.81.0.176:4056 #EXTINF:-1 ,河池综合 http://192.168.1.1:7200/udp/239.81.0.168:4056 #EXTINF:-1 ,玉林综合 http://192.168.1.1:7200/udp/239.81.0.177:4056 #EXTINF:-1 ,百色综合 http://192.168.1.1:7200/udp/239.81.0.150:4056 #EXTINF:-1 ,钦州综合 http://192.168.1.1:7200/udp/239.81.0.164:4056 #EXTINF:-1 ,贵港综合 http://192.168.1.1:7200/udp/239.81.0.172:4056 #EXTINF:-1 ,贺州综合 http://192.168.1.1:7200/udp/239.81.0.163:4056 #EXTINF:-1 ,央广购物 http://192.168.1.1:7200/udp/239.81.0.131:4056 #EXTINF:-1 ,优购物 http://192.168.1.1:7200/udp/239.81.0.132:4056 #EXTINF:-1 ,聚鲨环球精选 http://192.168.1.1:7200/udp/239.81.0.98:4056 #EXTINF:-1 ,家有购物 http://192.168.1.1:7200/udp/239.81.0.224:4056./html/login.html0000644000000000000000000015463414732745326012705 0ustar rootroot Audify - Music HTML Template
./html/popular-grid-1.html0000644000000000000000000021116714732745326014333 0ustar rootroot Audify - Music HTML Template
./html/popular-grid-2.html0000644000000000000000000022147614732745326014340 0ustar rootroot Audify - Music HTML Template

​Calmly (Nature)

Felix Carter Presents: Beats Beyond Boundaries – An Epic Journey
Into the Heart of Music and Sound ...

Trending Tracks

./html/popular-listing.html0000644000000000000000000022247514732745326014725 0ustar rootroot Audify - Music HTML Template

Untamed I (Nature)

Felix Carter Presents: Beats Beyond Boundaries – An Epic Journey
Into the Heart of Music and Sound ...

Trending Tracks

Recommendation For You

./html/show-like.html0000644000000000000000000015414214732745326013471 0ustar rootroot Audify - Music HTML Template

Chill Hits

Felix Carter Presents: Beats Beyond Boundaries – An Epic Journey
Into the Heart of Music and Sound ...

./html/static/0000755000000000000000000000000015035143774012155 5ustar rootroot./html/static/js/0000755000000000000000000000000015035143703012561 5ustar rootroot./html/static/js/jquery.countdown.min.js0000644000000000000000000001236014732467506017256 0ustar rootroot/*! * The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/) * Copyright (c) 2016 Edson Hilios * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});./html/static/js/mediaelement-and-player.js0000644000000000000000000132203714732467506017627 0ustar rootroot/*! * MediaElement.js * http://www.mediaelementjs.com/ * * Wrapper that mimics native HTML5 MediaElement (audio and video) * using a variety of technologies (pure JavaScript, Flash, iframe) * * Copyright 2010-2017, John Dyer (http://j.hn/) * License: MIT * */ (function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw ((f.code = "MODULE_NOT_FOUND"), f); } var l = (n[o] = { exports: {} }); t[o][0].call( l.exports, function (e) { var n = t[o][1][e]; return s(n ? n : e); }, l, l.exports, e, t, n, r ); } return n[o].exports; } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++) s(r[o]); return s; })( { 1: [function (_dereq_, module, exports) {}, {}], 2: [ function (_dereq_, module, exports) { (function (global) { var topLevel = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : {}; var minDoc = _dereq_(1); if (typeof document !== "undefined") { module.exports = document; } else { var doccy = topLevel["__GLOBAL_DOCUMENT_CACHE@4"]; if (!doccy) { doccy = topLevel["__GLOBAL_DOCUMENT_CACHE@4"] = minDoc; } module.exports = doccy; } }).call( this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {} ); }, { 1: 1 }, ], 3: [ function (_dereq_, module, exports) { (function (global) { if (typeof window !== "undefined") { module.exports = window; } else if (typeof global !== "undefined") { module.exports = global; } else if (typeof self !== "undefined") { module.exports = self; } else { module.exports = {}; } }).call( this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {} ); }, {}, ], 4: [ function (_dereq_, module, exports) { (function (root) { var setTimeoutFunc = setTimeout; function noop() {} function bind(fn, thisArg) { return function () { fn.apply(thisArg, arguments); }; } function Promise(fn) { if (typeof this !== "object") throw new TypeError("Promises must be constructed via new"); if (typeof fn !== "function") throw new TypeError("not a function"); this._state = 0; this._handled = false; this._value = undefined; this._deferreds = []; doResolve(fn, this); } function handle(self, deferred) { while (self._state === 3) { self = self._value; } if (self._state === 0) { self._deferreds.push(deferred); return; } self._handled = true; Promise._immediateFn(function () { var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected; if (cb === null) { (self._state === 1 ? resolve : reject)( deferred.promise, self._value ); return; } var ret; try { ret = cb(self._value); } catch (e) { reject(deferred.promise, e); return; } resolve(deferred.promise, ret); }); } function resolve(self, newValue) { try { if (newValue === self) throw new TypeError( "A promise cannot be resolved with itself." ); if ( newValue && (typeof newValue === "object" || typeof newValue === "function") ) { var then = newValue.then; if (newValue instanceof Promise) { self._state = 3; self._value = newValue; finale(self); return; } else if (typeof then === "function") { doResolve(bind(then, newValue), self); return; } } self._state = 1; self._value = newValue; finale(self); } catch (e) { reject(self, e); } } function reject(self, newValue) { self._state = 2; self._value = newValue; finale(self); } function finale(self) { if (self._state === 2 && self._deferreds.length === 0) { Promise._immediateFn(function () { if (!self._handled) { Promise._unhandledRejectionFn(self._value); } }); } for (var i = 0, len = self._deferreds.length; i < len; i++) { handle(self, self._deferreds[i]); } self._deferreds = null; } function Handler(onFulfilled, onRejected, promise) { this.onFulfilled = typeof onFulfilled === "function" ? onFulfilled : null; this.onRejected = typeof onRejected === "function" ? onRejected : null; this.promise = promise; } function doResolve(fn, self) { var done = false; try { fn( function (value) { if (done) return; done = true; resolve(self, value); }, function (reason) { if (done) return; done = true; reject(self, reason); } ); } catch (ex) { if (done) return; done = true; reject(self, ex); } } Promise.prototype["catch"] = function (onRejected) { return this.then(null, onRejected); }; Promise.prototype.then = function (onFulfilled, onRejected) { var prom = new this.constructor(noop); handle(this, new Handler(onFulfilled, onRejected, prom)); return prom; }; Promise.all = function (arr) { var args = Array.prototype.slice.call(arr); return new Promise(function (resolve, reject) { if (args.length === 0) return resolve([]); var remaining = args.length; function res(i, val) { try { if ( val && (typeof val === "object" || typeof val === "function") ) { var then = val.then; if (typeof then === "function") { then.call( val, function (val) { res(i, val); }, reject ); return; } } args[i] = val; if (--remaining === 0) { resolve(args); } } catch (ex) { reject(ex); } } for (var i = 0; i < args.length; i++) { res(i, args[i]); } }); }; Promise.resolve = function (value) { if ( value && typeof value === "object" && value.constructor === Promise ) { return value; } return new Promise(function (resolve) { resolve(value); }); }; Promise.reject = function (value) { return new Promise(function (resolve, reject) { reject(value); }); }; Promise.race = function (values) { return new Promise(function (resolve, reject) { for (var i = 0, len = values.length; i < len; i++) { values[i].then(resolve, reject); } }); }; Promise._immediateFn = (typeof setImmediate === "function" && function (fn) { setImmediate(fn); }) || function (fn) { setTimeoutFunc(fn, 0); }; Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) { if (typeof console !== "undefined" && console) { console.warn("Possible Unhandled Promise Rejection:", err); } }; Promise._setImmediateFn = function _setImmediateFn(fn) { Promise._immediateFn = fn; }; Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn( fn ) { Promise._unhandledRejectionFn = fn; }; if (typeof module !== "undefined" && module.exports) { module.exports = Promise; } else if (!root.Promise) { root.Promise = Promise; } })(this); }, {}, ], 5: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _en = _dereq_(15); var _general = _dereq_(26); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var i18n = { lang: "en", en: _en.EN }; i18n.language = function () { for ( var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++ ) { args[_key] = arguments[_key]; } if (args !== null && args !== undefined && args.length) { if (typeof args[0] !== "string") { throw new TypeError("Language code must be a string value"); } if (!/^[a-z]{2}(\-[a-z]{2})?$/i.test(args[0])) { throw new TypeError( "Language code must have format `xx` or `xx-xx`" ); } i18n.lang = args[0]; if (i18n[args[0]] === undefined) { args[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === "object" ? args[1] : {}; i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN; } else if ( args[1] !== null && args[1] !== undefined && _typeof(args[1]) === "object" ) { i18n[args[0]] = args[1]; } } return i18n.lang; }; i18n.t = function (message) { var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; if (typeof message === "string" && message.length) { var str = void 0, pluralForm = void 0; var language = i18n.language(); var _plural = function _plural(input, number, form) { if ( (typeof input === "undefined" ? "undefined" : _typeof(input)) !== "object" || typeof number !== "number" || typeof form !== "number" ) { return input; } var _pluralForms = (function () { return [ function () { return arguments.length <= 1 ? undefined : arguments[1]; }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) !== 0 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20 ) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 0 || ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20) ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return [3]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20) ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20) ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2 ) { return arguments.length <= 3 ? undefined : arguments[3]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4 ) { return arguments.length <= 4 ? undefined : arguments[4]; } else { return arguments.length <= 1 ? undefined : arguments[1]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 2 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7 ) { return arguments.length <= 3 ? undefined : arguments[3]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11 ) { return arguments.length <= 4 ? undefined : arguments[4]; } else { return arguments.length <= 5 ? undefined : arguments[5]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 0 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 2 ) { return arguments.length <= 3 ? undefined : arguments[3]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10 ) { return arguments.length <= 4 ? undefined : arguments[4]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11 ) { return arguments.length <= 5 ? undefined : arguments[5]; } else { return arguments.length <= 6 ? undefined : arguments[6]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 0 || ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) ) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20 ) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20) ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 2 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11 ) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 2 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 3 ) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { if ( (arguments.length <= 0 ? undefined : arguments[0]) === 0 ) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ( (arguments.length <= 0 ? undefined : arguments[0]) === 1 ) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, ]; })(); return _pluralForms[form].apply(null, [number].concat(input)); }; if (i18n[language] !== undefined) { str = i18n[language][message]; if (pluralParam !== null && typeof pluralParam === "number") { pluralForm = i18n[language]["mejs.plural-form"]; str = _plural.apply(null, [str, pluralParam, pluralForm]); } } if (!str && i18n.en) { str = i18n.en[message]; if (pluralParam !== null && typeof pluralParam === "number") { pluralForm = i18n.en["mejs.plural-form"]; str = _plural.apply(null, [str, pluralParam, pluralForm]); } } str = str || message; if (pluralParam !== null && typeof pluralParam === "number") { str = str.replace("%1", pluralParam); } return (0, _general.escapeHTML)(str); } return message; }; _mejs2.default.i18n = i18n; if (typeof mejsL10n !== "undefined") { _mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings); } exports.default = i18n; }, { 15: 15, 26: 26, 7: 7 }, ], 6: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _general = _dereq_(26); var _media2 = _dereq_(27); var _renderer = _dereq_(8); var _constants = _dereq_(24); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var MediaElement = function MediaElement(idOrNode, options, sources) { var _this = this; _classCallCheck(this, MediaElement); var t = this; sources = Array.isArray(sources) ? sources : null; t.defaults = { renderers: [], fakeNodeName: "mediaelementwrapper", pluginPath: "build/", shimScriptAccess: "sameDomain", customError: "", }; options = Object.assign(t.defaults, options); t.mediaElement = _document2.default.createElement( options.fakeNodeName ); var id = idOrNode, error = false; if (typeof idOrNode === "string") { t.mediaElement.originalNode = _document2.default.getElementById(idOrNode); } else { t.mediaElement.originalNode = idOrNode; id = idOrNode.id; } if ( t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null ) { return null; } t.mediaElement.options = options; id = id || "mejs_" + Math.random().toString().slice(2); t.mediaElement.originalNode.setAttribute("id", id + "_from_mejs"); var tagName = t.mediaElement.originalNode.tagName.toLowerCase(); if ( ["video", "audio"].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute("preload") ) { t.mediaElement.originalNode.setAttribute("preload", "none"); } t.mediaElement.originalNode.parentNode.insertBefore( t.mediaElement, t.mediaElement.originalNode ); t.mediaElement.appendChild(t.mediaElement.originalNode); var processURL = function processURL(url, type) { if ( _mejs2.default.html5media.mediaTypes.indexOf(type) > -1 && _window2.default.location.protocol === "https:" && _constants.IS_IOS ) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (this.readyState === 4 && this.status === 200) { var _url = _window2.default.URL || _window2.default.webkitURL, blobUrl = _url.createObjectURL(this.response); t.mediaElement.originalNode.setAttribute("src", blobUrl); return blobUrl; } return url; }; xhr.open("GET", url); xhr.responseType = "blob"; xhr.send(); } return url; }; var mediaFiles = void 0; if (sources !== null) { mediaFiles = sources; } else if (t.mediaElement.originalNode !== null) { mediaFiles = []; switch (t.mediaElement.originalNode.nodeName.toLowerCase()) { case "iframe": mediaFiles.push({ type: "", src: t.mediaElement.originalNode.getAttribute("src"), }); break; case "audio": case "video": var _sources = t.mediaElement.originalNode.children.length, nodeSource = t.mediaElement.originalNode.getAttribute("src"); if (nodeSource) { var node = t.mediaElement.originalNode, type = (0, _media2.formatType)( nodeSource, node.getAttribute("type") ); mediaFiles.push({ type: type, src: processURL(nodeSource, type), }); } for (var i = 0; i < _sources; i++) { var n = t.mediaElement.originalNode.children[i]; if (n.tagName.toLowerCase() === "source") { var src = n.getAttribute("src"), _type = (0, _media2.formatType)( src, n.getAttribute("type") ); mediaFiles.push({ type: _type, src: processURL(src, _type), }); } } break; } } t.mediaElement.id = id; t.mediaElement.renderers = {}; t.mediaElement.events = {}; t.mediaElement.promises = []; t.mediaElement.renderer = null; t.mediaElement.rendererName = null; t.mediaElement.changeRenderer = function (rendererName, mediaFiles) { var t = _this, media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src; if ( t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName ) { t.mediaElement.renderer.pause(); if (t.mediaElement.renderer.stop) { t.mediaElement.renderer.stop(); } t.mediaElement.renderer.show(); t.mediaElement.renderer.setSrc(media); return true; } if ( t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ) { t.mediaElement.renderer.pause(); if (t.mediaElement.renderer.stop) { t.mediaElement.renderer.stop(); } t.mediaElement.renderer.hide(); } var newRenderer = t.mediaElement.renderers[rendererName], newRendererType = null; if (newRenderer !== undefined && newRenderer !== null) { newRenderer.show(); newRenderer.setSrc(media); t.mediaElement.renderer = newRenderer; t.mediaElement.rendererName = rendererName; return true; } var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order; for (var _i = 0, total = rendererArray.length; _i < total; _i++) { var index = rendererArray[_i]; if (index === rendererName) { var rendererList = _renderer.renderer.renderers; newRendererType = rendererList[index]; var renderOptions = Object.assign( newRendererType.options, t.mediaElement.options ); newRenderer = newRendererType.create( t.mediaElement, renderOptions, mediaFiles ); newRenderer.name = rendererName; t.mediaElement.renderers[newRendererType.name] = newRenderer; t.mediaElement.renderer = newRenderer; t.mediaElement.rendererName = rendererName; newRenderer.show(); return true; } } return false; }; t.mediaElement.setSize = function (width, height) { if ( t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ) { t.mediaElement.renderer.setSize(width, height); } }; t.mediaElement.createErrorMessage = function (urlList) { urlList = Array.isArray(urlList) ? urlList : []; var errorContainer = _document2.default.createElement("div"); errorContainer.className = "me_cannotplay"; errorContainer.style.width = "100%"; errorContainer.style.height = "100%"; var errorContent = t.mediaElement.options.customError; if (!errorContent) { var poster = t.mediaElement.originalNode.getAttribute("poster"); if (poster) { errorContent += '' +
                  _mejs2.default.i18n.t('; } for (var _i2 = 0, total = urlList.length; _i2 < total; _i2++) { var url = urlList[_i2]; errorContent += '' + _mejs2.default.i18n.t("mejs.download-file") + ": " + url.src + ""; } } errorContainer.innerHTML = errorContent; t.mediaElement.originalNode.parentNode.insertBefore( errorContainer, t.mediaElement.originalNode ); t.mediaElement.originalNode.style.display = "none"; error = true; }; var props = _mejs2.default.html5media.properties, methods = _mejs2.default.html5media.methods, addProperty = function addProperty(obj, name, onGet, onSet) { var oldValue = obj[name]; var getFn = function getFn() { return onGet.apply(obj, [oldValue]); }, setFn = function setFn(newValue) { oldValue = onSet.apply(obj, [newValue]); return oldValue; }; Object.defineProperty(obj, name, { get: getFn, set: setFn }); }, assignGettersSetters = function assignGettersSetters(propName) { if (propName !== "src") { var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1), getFn = function getFn() { return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer["get" + capName] === "function" ? t.mediaElement.renderer["get" + capName]() : null; }, setFn = function setFn(value) { if ( t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer["set" + capName] === "function" ) { t.mediaElement.renderer["set" + capName](value); } }; addProperty(t.mediaElement, propName, getFn, setFn); t.mediaElement["get" + capName] = getFn; t.mediaElement["set" + capName] = setFn; } }, getSrc = function getSrc() { return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null; }, setSrc = function setSrc(value) { var mediaFiles = []; if (typeof value === "string") { mediaFiles.push({ src: value, type: value ? (0, _media2.getTypeFromFile)(value) : "", }); } else if ( (typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" && value.src !== undefined ) { var _src = (0, _media2.absolutizeUrl)(value.src), _type2 = value.type, media = Object.assign(value, { src: _src, type: (_type2 === "" || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2, }); mediaFiles.push(media); } else if (Array.isArray(value)) { for (var _i3 = 0, total = value.length; _i3 < total; _i3++) { var _src2 = (0, _media2.absolutizeUrl)(value[_i3].src), _type3 = value[_i3].type, _media = Object.assign(value[_i3], { src: _src2, type: (_type3 === "" || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3, }); mediaFiles.push(_media); } } var renderInfo = _renderer.renderer.select( mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : [] ), event = void 0; if (!t.mediaElement.paused) { t.mediaElement.pause(); event = (0, _general.createEvent)("pause", t.mediaElement); t.mediaElement.dispatchEvent(event); } t.mediaElement.originalNode.setAttribute( "src", mediaFiles[0].src || "" ); if (t.mediaElement.querySelector(".me_cannotplay")) { t.mediaElement.querySelector(".me_cannotplay").remove(); } if (renderInfo === null) { t.mediaElement.createErrorMessage(mediaFiles); event = (0, _general.createEvent)("error", t.mediaElement); event.message = "No renderer found"; t.mediaElement.dispatchEvent(event); return; } return t.mediaElement.changeRenderer( renderInfo.rendererName, mediaFiles ); }, assignMethods = function assignMethods(methodName) { t.mediaElement[methodName] = function () { for ( var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++ ) { args[_key] = arguments[_key]; } if ( t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === "function" ) { try { if (methodName === "play") { if (t.mediaElement.promises.length) { Promise.all(t.mediaElement.promises) .then(function () { setTimeout(function () { t.mediaElement.renderer[methodName](args); }, 250); }) .catch(function (e) { if ( t.mediaElement.renderer === undefined || t.mediaElement.renderer === null ) { var event = (0, _general.createEvent)( "error", t.mediaElement ); event.message = e; t.mediaElement.dispatchEvent(event); t.mediaElement.createErrorMessage(mediaFiles); } }); } else { t.mediaElement.renderer[methodName](args); } } else { t.mediaElement.renderer[methodName](args); } } catch (e) { t.mediaElement.createErrorMessage(); } } return null; }; }; addProperty(t.mediaElement, "src", getSrc, setSrc); t.mediaElement.getSrc = getSrc; t.mediaElement.setSrc = setSrc; for (var _i4 = 0, total = props.length; _i4 < total; _i4++) { assignGettersSetters(props[_i4]); } for (var _i5 = 0, _total = methods.length; _i5 < _total; _i5++) { assignMethods(methods[_i5]); } t.mediaElement.addEventListener = function (eventName, callback) { t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || []; t.mediaElement.events[eventName].push(callback); }; t.mediaElement.removeEventListener = function (eventName, callback) { if (!eventName) { t.mediaElement.events = {}; return true; } var callbacks = t.mediaElement.events[eventName]; if (!callbacks) { return true; } if (!callback) { t.mediaElement.events[eventName] = []; return true; } for (var _i6 = 0; _i6 < callbacks.length; _i6++) { if (callbacks[_i6] === callback) { t.mediaElement.events[eventName].splice(_i6, 1); return true; } } return false; }; t.mediaElement.dispatchEvent = function (event) { var callbacks = t.mediaElement.events[event.type]; if (callbacks) { for (var _i7 = 0; _i7 < callbacks.length; _i7++) { callbacks[_i7].apply(null, [event]); } } }; if (mediaFiles.length) { t.mediaElement.src = mediaFiles; } if (t.mediaElement.promises.length) { Promise.all(t.mediaElement.promises) .then(function () { if (t.mediaElement.options.success) { t.mediaElement.options.success( t.mediaElement, t.mediaElement.originalNode ); } }) .catch(function () { if (error && t.mediaElement.options.error) { t.mediaElement.options.error( t.mediaElement, t.mediaElement.originalNode ); } }); } else { if (t.mediaElement.options.success) { t.mediaElement.options.success( t.mediaElement, t.mediaElement.originalNode ); } if (error && t.mediaElement.options.error) { t.mediaElement.options.error( t.mediaElement, t.mediaElement.originalNode ); } } return t.mediaElement; }; _window2.default.MediaElement = MediaElement; exports.default = MediaElement; }, { 2: 2, 24: 24, 26: 26, 27: 27, 3: 3, 7: 7, 8: 8 }, ], 7: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var mejs = {}; mejs.version = "4.1.2"; mejs.html5media = { properties: [ "volume", "src", "currentTime", "muted", "duration", "paused", "ended", "buffered", "error", "networkState", "readyState", "seeking", "seekable", "currentSrc", "preload", "bufferedBytes", "bufferedTime", "initialTime", "startOffsetTime", "defaultPlaybackRate", "playbackRate", "played", "autoplay", "loop", "controls", ], readOnlyProperties: [ "duration", "paused", "ended", "buffered", "error", "networkState", "readyState", "seeking", "seekable", ], methods: ["load", "play", "pause", "canPlayType"], events: [ "loadstart", "durationchange", "loadedmetadata", "loadeddata", "progress", "canplay", "canplaythrough", "suspend", "abort", "error", "emptied", "stalled", "play", "playing", "pause", "waiting", "seeking", "seeked", "timeupdate", "ended", "ratechange", "volumechange", ], mediaTypes: [ "audio/mp3", "audio/ogg", "audio/oga", "audio/wav", "audio/x-wav", "audio/wave", "audio/x-pn-wav", "audio/mpeg", "audio/mp4", "video/mp4", "video/webm", "video/ogg", "video/ogv", ], }; _window2.default.mejs = mejs; exports.default = mejs; }, { 3: 3 }, ], 8: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderer = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Renderer = (function () { function Renderer() { _classCallCheck(this, Renderer); this.renderers = {}; this.order = []; } _createClass(Renderer, [ { key: "add", value: function add(renderer) { if (renderer.name === undefined) { throw new TypeError( "renderer must contain at least `name` property" ); } this.renderers[renderer.name] = renderer; this.order.push(renderer.name); }, }, { key: "select", value: function select(mediaFiles) { var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var renderersLength = renderers.length; renderers = renderers.length ? renderers : this.order; if (!renderersLength) { var rendererIndicator = [ /^(html5|native)/i, /^flash/i, /iframe$/i, ], rendererRanking = function rendererRanking(renderer) { for ( var i = 0, total = rendererIndicator.length; i < total; i++ ) { if (rendererIndicator[i].test(renderer)) { return i; } } return rendererIndicator.length; }; renderers.sort(function (a, b) { return rendererRanking(a) - rendererRanking(b); }); } for (var i = 0, total = renderers.length; i < total; i++) { var key = renderers[i], _renderer = this.renderers[key]; if (_renderer !== null && _renderer !== undefined) { for (var j = 0, jl = mediaFiles.length; j < jl; j++) { if ( typeof _renderer.canPlayType === "function" && typeof mediaFiles[j].type === "string" && _renderer.canPlayType(mediaFiles[j].type) ) { return { rendererName: _renderer.name, src: mediaFiles[j].src, }; } } } } return null; }, }, { key: "order", set: function set(order) { if (!Array.isArray(order)) { throw new TypeError("order must be an array of strings."); } this._order = order; }, get: function get() { return this._order; }, }, { key: "renderers", set: function set(renderers) { if ( renderers !== null && (typeof renderers === "undefined" ? "undefined" : _typeof(renderers)) !== "object" ) { throw new TypeError("renderers must be an array of objects."); } this._renderers = renderers; }, get: function get() { return this._renderers; }, }, ]); return Renderer; })(); var renderer = (exports.renderer = new Renderer()); _mejs2.default.Renderers = renderer; }, { 7: 7 }, ], 9: [ function (_dereq_, module, exports) { "use strict"; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _player = _dereq_(17); var _player2 = _interopRequireDefault(_player); var _constants = _dereq_(24); var Features = _interopRequireWildcard(_constants); var _general = _dereq_(26); var _dom = _dereq_(25); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } Object.assign(_player.config, { usePluginFullScreen: true, fullscreenText: null, }); Object.assign(_player2.default.prototype, { isFullScreen: false, isNativeFullScreen: false, isInIframe: false, isPluginClickThroughCreated: false, fullscreenMode: "", containerSizeTimeout: null, buildfullscreen: function buildfullscreen(player) { if (!player.isVideo) { return; } player.isInIframe = _window2.default.location !== _window2.default.parent.location; player.detectFullscreenMode(); var t = this, fullscreenTitle = (0, _general.isString)(t.options.fullscreenText) ? t.options.fullscreenText : _i18n2.default.t("mejs.fullscreen"), fullscreenBtn = _document2.default.createElement("div"); fullscreenBtn.className = t.options.classPrefix + "button " + t.options.classPrefix + "fullscreen-button"; fullscreenBtn.innerHTML = ''; t.addControlElement(fullscreenBtn, "fullscreen"); fullscreenBtn.addEventListener("click", function () { var isFullScreen = (Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN) || player.isFullScreen; if (isFullScreen) { player.exitFullScreen(); } else { player.enterFullScreen(); } }); player.fullscreenBtn = fullscreenBtn; t.globalBind("keydown", function (e) { var key = e.which || e.keyCode || 0; if ( key === 27 && ((Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN) || t.isFullScreen) ) { player.exitFullScreen(); } }); t.normalHeight = 0; t.normalWidth = 0; if (Features.HAS_TRUE_NATIVE_FULLSCREEN) { var fullscreenChanged = function fullscreenChanged() { if (player.isFullScreen) { if (Features.isFullScreen()) { player.isNativeFullScreen = true; player.setControlsSize(); } else { player.isNativeFullScreen = false; player.exitFullScreen(); } } }; player.globalBind( Features.FULLSCREEN_EVENT_NAME, fullscreenChanged ); } }, detectFullscreenMode: function detectFullscreenMode() { var t = this, isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName); var mode = ""; if (Features.HAS_TRUE_NATIVE_FULLSCREEN && isNative) { mode = "native-native"; } else if (Features.HAS_TRUE_NATIVE_FULLSCREEN && !isNative) { mode = "plugin-native"; } else if ( t.usePluginFullScreen && Features.SUPPORT_POINTER_EVENTS ) { mode = "plugin-click"; } else { mode = "fullwindow"; } t.fullscreenMode = mode; return mode; }, cleanfullscreen: function cleanfullscreen(player) { player.exitFullScreen(); }, enterFullScreen: function enterFullScreen() { var t = this, isNative = t.media.rendererName !== null && /(html5|native)/i.test(t.media.rendererName), containerStyles = getComputedStyle(t.container); if (Features.IS_IOS && Features.HAS_IOS_FULLSCREEN) { if (typeof t.media.webkitEnterFullscreen === "function") { t.media.webkitEnterFullscreen(); } else { t.media.originalNode.webkitEnterFullscreen(); } return; } (0, _dom.addClass)( _document2.default.documentElement, t.options.classPrefix + "fullscreen" ); (0, _dom.addClass)( t.container, t.options.classPrefix + "container-fullscreen" ); t.normalHeight = parseFloat(containerStyles.height); t.normalWidth = parseFloat(containerStyles.width); if ( t.fullscreenMode === "native-native" || t.fullscreenMode === "plugin-native" ) { Features.requestFullScreen(t.container); if (t.isInIframe) { setTimeout(function checkFullscreen() { if (t.isNativeFullScreen) { var percentErrorMargin = 0.002, windowWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth, screenWidth = screen.width, absDiff = Math.abs(screenWidth - windowWidth), marginError = screenWidth * percentErrorMargin; if (absDiff > marginError) { t.exitFullScreen(); } else { setTimeout(checkFullscreen, 500); } } }, 1000); } } t.container.style.width = "100%"; t.container.style.height = "100%"; t.containerSizeTimeout = setTimeout(function () { t.container.style.width = "100%"; t.container.style.height = "100%"; t.setControlsSize(); }, 500); if (isNative) { t.node.style.width = "100%"; t.node.style.height = "100%"; } else { var elements = t.container.querySelectorAll( "iframe, embed, object, video" ), _total = elements.length; for (var i = 0; i < _total; i++) { elements[i].style.width = "100%"; elements[i].style.height = "100%"; } } if ( t.options.setDimensions && typeof t.media.setSize === "function" ) { t.media.setSize(screen.width, screen.height); } var layers = t.layers.children, total = layers.length; for (var _i = 0; _i < total; _i++) { layers[_i].style.width = "100%"; layers[_i].style.height = "100%"; } if (t.fullscreenBtn) { (0, _dom.removeClass)( t.fullscreenBtn, t.options.classPrefix + "fullscreen" ); (0, _dom.addClass)( t.fullscreenBtn, t.options.classPrefix + "unfullscreen" ); } t.setControlsSize(); t.isFullScreen = true; var zoomFactor = Math.min( screen.width / t.width, screen.height / t.height ), captionText = t.container.querySelector( "." + t.options.classPrefix + "captions-text" ); if (captionText) { captionText.style.fontSize = zoomFactor * 100 + "%"; captionText.style.lineHeight = "normal"; t.container.querySelector( "." + t.options.classPrefix + "captions-position" ).style.bottom = "45px"; } var event = (0, _general.createEvent)( "enteredfullscreen", t.container ); t.container.dispatchEvent(event); }, exitFullScreen: function exitFullScreen() { var t = this, isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName); clearTimeout(t.containerSizeTimeout); if ( Features.HAS_TRUE_NATIVE_FULLSCREEN && (Features.IS_FULLSCREEN || t.isFullScreen) ) { Features.cancelFullScreen(); } (0, _dom.removeClass)( _document2.default.documentElement, t.options.classPrefix + "fullscreen" ); (0, _dom.removeClass)( t.container, t.options.classPrefix + "container-fullscreen" ); if (t.options.setDimensions) { t.container.style.width = t.normalWidth + "px"; t.container.style.height = t.normalHeight + "px"; if (isNative) { t.node.style.width = t.normalWidth + "px"; t.node.style.height = t.normalHeight + "px"; } else { var elements = t.container.querySelectorAll( "iframe, embed, object, video" ), _total2 = elements.length; for (var i = 0; i < _total2; i++) { elements[i].style.width = t.normalWidth + "px"; elements[i].style.height = t.normalHeight + "px"; } } if (typeof t.media.setSize === "function") { t.media.setSize(t.normalWidth, t.normalHeight); } var layers = t.layers.children, total = layers.length; for (var _i2 = 0; _i2 < total; _i2++) { layers[_i2].style.width = t.normalWidth + "px"; layers[_i2].style.height = t.normalHeight + "px"; } } if (t.fullscreenBtn) { (0, _dom.removeClass)( t.fullscreenBtn, t.options.classPrefix + "unfullscreen" ); (0, _dom.addClass)( t.fullscreenBtn, t.options.classPrefix + "fullscreen" ); } t.setControlsSize(); t.isFullScreen = false; var captionText = t.container.querySelector( "." + t.options.classPrefix + "captions-text" ); if (captionText) { captionText.style.fontSize = ""; captionText.style.lineHeight = ""; t.container.querySelector( "." + t.options.classPrefix + "captions-position" ).style.bottom = ""; } var event = (0, _general.createEvent)( "exitedfullscreen", t.container ); t.container.dispatchEvent(event); }, }); }, { 17: 17, 2: 2, 24: 24, 25: 25, 26: 26, 3: 3, 5: 5 }, ], 10: [ function (_dereq_, module, exports) { "use strict"; var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _player = _dereq_(17); var _player2 = _interopRequireDefault(_player); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _general = _dereq_(26); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } Object.assign(_player.config, { playText: null, pauseText: null }); Object.assign(_player2.default.prototype, { buildplaypause: function buildplaypause( player, controls, layers, media ) { var t = this, op = t.options, playTitle = (0, _general.isString)(op.playText) ? op.playText : _i18n2.default.t("mejs.play"), pauseTitle = (0, _general.isString)(op.pauseText) ? op.pauseText : _i18n2.default.t("mejs.pause"), play = _document2.default.createElement("div"); play.className = t.options.classPrefix + "button " + t.options.classPrefix + "playpause-button " + t.options.classPrefix + "play"; play.innerHTML = ''; play.addEventListener("click", function () { if (media.paused) { media.play(); } else { media.pause(); } }); var playBtn = play.querySelector("button"); t.addControlElement(play, "playpause"); function togglePlayPause(which) { if ("play" === which) { (0, _dom.removeClass)(play, t.options.classPrefix + "play"); (0, _dom.removeClass)(play, t.options.classPrefix + "replay"); (0, _dom.addClass)(play, t.options.classPrefix + "pause"); playBtn.setAttribute("title", pauseTitle); playBtn.setAttribute("aria-label", pauseTitle); } else { (0, _dom.removeClass)(play, t.options.classPrefix + "pause"); (0, _dom.removeClass)(play, t.options.classPrefix + "replay"); (0, _dom.addClass)(play, t.options.classPrefix + "play"); playBtn.setAttribute("title", playTitle); playBtn.setAttribute("aria-label", playTitle); } } togglePlayPause("pse"); media.addEventListener("loadedmetadata", function () { if (media.rendererName.indexOf("flash") === -1) { togglePlayPause("pse"); } }); media.addEventListener("play", function () { togglePlayPause("play"); }); media.addEventListener("playing", function () { togglePlayPause("play"); }); media.addEventListener("pause", function () { togglePlayPause("pse"); }); media.addEventListener("ended", function () { if (!player.options.loop) { (0, _dom.removeClass)(play, t.options.classPrefix + "pause"); (0, _dom.removeClass)(play, t.options.classPrefix + "play"); (0, _dom.addClass)(play, t.options.classPrefix + "replay"); playBtn.setAttribute("title", playTitle); playBtn.setAttribute("aria-label", playTitle); } }); }, }); }, { 17: 17, 2: 2, 25: 25, 26: 26, 5: 5 }, ], 11: [ function (_dereq_, module, exports) { "use strict"; var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _player = _dereq_(17); var _player2 = _interopRequireDefault(_player); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _constants = _dereq_(24); var _time = _dereq_(29); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } Object.assign(_player.config, { enableProgressTooltip: true, useSmoothHover: true, }); Object.assign(_player2.default.prototype, { buildprogress: function buildprogress( player, controls, layers, media ) { var lastKeyPressTime = 0, mouseIsDown = false, startedPaused = false; var t = this, autoRewindInitial = player.options.autoRewind, tooltip = player.options.enableProgressTooltip ? '' + ('00:00') + ('') + "" : "", rail = _document2.default.createElement("div"); rail.className = t.options.classPrefix + "time-rail"; rail.innerHTML = '' + ('') + ('') + ('') + ('') + ('') + ("" + tooltip) + ""; t.addControlElement(rail, "progress"); controls.querySelector( "." + t.options.classPrefix + "time-buffering" ).style.display = "none"; t.rail = controls.querySelector( "." + t.options.classPrefix + "time-rail" ); t.total = controls.querySelector( "." + t.options.classPrefix + "time-total" ); t.loaded = controls.querySelector( "." + t.options.classPrefix + "time-loaded" ); t.current = controls.querySelector( "." + t.options.classPrefix + "time-current" ); t.handle = controls.querySelector( "." + t.options.classPrefix + "time-handle" ); t.timefloat = controls.querySelector( "." + t.options.classPrefix + "time-float" ); t.timefloatcurrent = controls.querySelector( "." + t.options.classPrefix + "time-float-current" ); t.slider = controls.querySelector( "." + t.options.classPrefix + "time-slider" ); t.hovered = controls.querySelector( "." + t.options.classPrefix + "time-hovered" ); t.newTime = 0; t.forcedHandlePause = false; t.setTransformStyle = function (element, value) { element.style.transform = value; element.style.webkitTransform = value; element.style.MozTransform = value; element.style.msTransform = value; element.style.OTransform = value; }; var handleMouseMove = function handleMouseMove(e) { var totalStyles = getComputedStyle(t.total), offsetStyles = (0, _dom.offset)(t.total), width = parseFloat(totalStyles.width), transform = (function () { if (totalStyles.webkitTransform !== undefined) { return "webkitTransform"; } else if (totalStyles.mozTransform !== undefined) { return "mozTransform "; } else if (totalStyles.oTransform !== undefined) { return "oTransform"; } else if (totalStyles.msTransform !== undefined) { return "msTransform"; } else { return "transform"; } })(), cssMatrix = (function () { if ("WebKitCSSMatrix" in window) { return "WebKitCSSMatrix"; } else if ("MSCSSMatrix" in window) { return "MSCSSMatrix"; } else if ("CSSMatrix" in window) { return "CSSMatrix"; } })(); var percentage = 0, pos = 0, x = void 0; if (e.originalEvent && e.originalEvent.changedTouches) { x = e.originalEvent.changedTouches[0].pageX; } else if (e.changedTouches) { x = e.changedTouches[0].pageX; } else { x = e.pageX; } if (t.getDuration()) { if (x < offsetStyles.left) { x = offsetStyles.left; } else if (x > width + offsetStyles.left) { x = width + offsetStyles.left; } pos = x - offsetStyles.left; percentage = pos / width; t.newTime = percentage <= 0.02 ? 0 : percentage * t.getDuration(); if ( mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4) ) { t.setCurrentRailHandle(t.newTime); t.updateCurrent(t.newTime); } if ( !_constants.IS_IOS && !_constants.IS_ANDROID && t.timefloat ) { if (pos < 0) { pos = 0; } if ( t.options.useSmoothHover && cssMatrix !== null && typeof window[cssMatrix] !== "undefined" ) { var matrix = new window[cssMatrix]( getComputedStyle(t.handle)[transform] ), handleLocation = matrix.m41, hoverScaleX = pos / parseFloat(getComputedStyle(t.total).width) - handleLocation / parseFloat(getComputedStyle(t.total).width); t.hovered.style.left = handleLocation + "px"; t.setTransformStyle( t.hovered, "scaleX(" + hoverScaleX + ")" ); t.hovered.setAttribute("pos", pos); if (hoverScaleX >= 0) { (0, _dom.removeClass)(t.hovered, "negative"); } else { (0, _dom.addClass)(t.hovered, "negative"); } } t.timefloat.style.left = pos + "px"; t.timefloatcurrent.innerHTML = (0, _time.secondsToTimeCode)( t.newTime, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength ); t.timefloat.style.display = "block"; } } }, updateSlider = function updateSlider() { var seconds = t.getCurrentTime(), timeSliderText = _i18n2.default.t("mejs.time-slider"), time = (0, _time.secondsToTimeCode)( seconds, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength ), duration = t.getDuration(); t.slider.setAttribute("role", "slider"); t.slider.tabIndex = 0; if (media.paused) { t.slider.setAttribute("aria-label", timeSliderText); t.slider.setAttribute("aria-valuemin", 0); t.slider.setAttribute("aria-valuemax", duration); t.slider.setAttribute("aria-valuenow", seconds); t.slider.setAttribute("aria-valuetext", time); } else { t.slider.removeAttribute("aria-label"); t.slider.removeAttribute("aria-valuemin"); t.slider.removeAttribute("aria-valuemax"); t.slider.removeAttribute("aria-valuenow"); t.slider.removeAttribute("aria-valuetext"); } }, restartPlayer = function restartPlayer() { if (new Date() - lastKeyPressTime >= 1000) { media.play(); } }, handleMouseup = function handleMouseup() { if ( mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4) ) { t.setCurrentTime(t.newTime); player.setCurrentRail(); t.updateCurrent(t.newTime); } if (t.forcedHandlePause) { t.media.play(); } t.forcedHandlePause = false; }; t.slider.addEventListener("focus", function () { player.options.autoRewind = false; }); t.slider.addEventListener("blur", function () { player.options.autoRewind = autoRewindInitial; }); t.slider.addEventListener("keydown", function (e) { if (new Date() - lastKeyPressTime >= 1000) { startedPaused = media.paused; } if (t.options.keyActions.length) { var keyCode = e.which || e.keyCode || 0, duration = t.getDuration(), seekForward = player.options.defaultSeekForwardInterval(media), seekBackward = player.options.defaultSeekBackwardInterval(media); var seekTime = t.getCurrentTime(); switch (keyCode) { case 37: case 40: if (t.getDuration() !== Infinity) { seekTime -= seekBackward; } break; case 39: case 38: if (t.getDuration() !== Infinity) { seekTime += seekForward; } break; case 36: seekTime = 0; break; case 35: seekTime = duration; break; case 32: if (!_constants.IS_FIREFOX) { if (media.paused) { media.play(); } else { media.pause(); } } return; case 13: if (media.paused) { media.play(); } else { media.pause(); } return; default: return; } seekTime = seekTime < 0 ? 0 : seekTime >= duration ? duration : Math.floor(seekTime); lastKeyPressTime = new Date(); if (!startedPaused) { media.pause(); } if (seekTime < t.getDuration() && !startedPaused) { setTimeout(restartPlayer, 1100); } t.setCurrentTime(seekTime); e.preventDefault(); e.stopPropagation(); } }); var events = ["mousedown", "touchstart"]; t.slider.addEventListener("dragstart", function () { return false; }); for (var i = 0, total = events.length; i < total; i++) { t.slider.addEventListener(events[i], function (e) { t.forcedHandlePause = false; if (t.getDuration() !== Infinity) { if (e.which === 1 || e.which === 0) { if (!media.paused) { t.media.pause(); t.forcedHandlePause = true; } mouseIsDown = true; handleMouseMove(e); var endEvents = ["mouseup", "touchend"]; for ( var j = 0, totalEvents = endEvents.length; j < totalEvents; j++ ) { t.container.addEventListener( endEvents[j], function (event) { var target = event.target; if ( target === t.slider || target.closest( "." + t.options.classPrefix + "time-slider" ) ) { handleMouseMove(event); } } ); } t.globalBind("mouseup.dur touchend.dur", function () { handleMouseup(); mouseIsDown = false; if (t.timefloat) { t.timefloat.style.display = "none"; } t.globalUnbind( "mousemove.dur touchmove.dur mouseup.dur touchend.dur" ); }); } } }); } t.slider.addEventListener("mouseenter", function (e) { if (e.target === t.slider && t.getDuration() !== Infinity) { t.container.addEventListener("mousemove", function (event) { var target = event.target; if ( target === t.slider || target.closest("." + t.options.classPrefix + "time-slider") ) { handleMouseMove(event); } }); if ( t.timefloat && !_constants.IS_IOS && !_constants.IS_ANDROID ) { t.timefloat.style.display = "block"; } if ( t.hovered && !_constants.IS_IOS && !_constants.IS_ANDROID && t.options.useSmoothHover ) { (0, _dom.removeClass)(t.hovered, "no-hover"); } } }); t.slider.addEventListener("mouseleave", function () { if (t.getDuration() !== Infinity) { if (!mouseIsDown) { t.globalUnbind("mousemove.dur"); if (t.timefloat) { t.timefloat.style.display = "none"; } if (t.hovered && t.options.useSmoothHover) { (0, _dom.addClass)(t.hovered, "no-hover"); } } } }); media.addEventListener("progress", function (e) { var broadcast = controls.querySelector( "." + t.options.classPrefix + "broadcast" ); if (t.getDuration() !== Infinity) { if (broadcast) { t.slider.style.display = ""; broadcast.remove(); } player.setProgressRail(e); if (!t.forcedHandlePause) { player.setCurrentRail(e); } } else if (!broadcast) { var label = _document2.default.createElement("span"); label.className = t.options.classPrefix + "broadcast"; label.innerText = _i18n2.default.t("mejs.live-broadcast"); t.slider.style.display = "none"; } }); media.addEventListener("timeupdate", function (e) { var broadcast = controls.querySelector( "." + t.options.classPrefix + "broadcast" ); if (t.getDuration() !== Infinity) { if (broadcast) { t.slider.style.display = ""; broadcast.remove(); } player.setProgressRail(e); if (!t.forcedHandlePause) { player.setCurrentRail(e); } updateSlider(e); } else if (!broadcast) { var label = _document2.default.createElement("span"); label.className = t.options.classPrefix + "broadcast"; label.innerText = _i18n2.default.t("mejs.live-broadcast"); controls .querySelector("." + t.options.classPrefix + "time-rail") .appendChild(label); t.slider.style.display = "none"; } }); t.container.addEventListener("controlsresize", function (e) { if (t.getDuration() !== Infinity) { player.setProgressRail(e); if (!t.forcedHandlePause) { player.setCurrentRail(e); } } }); }, setProgressRail: function setProgressRail(e) { var t = this, target = e !== undefined ? e.detail.target || e.target : t.media; var percent = null; if ( target && target.buffered && target.buffered.length > 0 && target.buffered.end && t.getDuration() ) { percent = target.buffered.end(target.buffered.length - 1) / t.getDuration(); } else if ( target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined ) { percent = target.bufferedBytes / target.bytesTotal; } else if (e && e.lengthComputable && e.total !== 0) { percent = e.loaded / e.total; } if (percent !== null) { percent = Math.min(1, Math.max(0, percent)); if (t.loaded) { t.setTransformStyle(t.loaded, "scaleX(" + percent + ")"); } } }, setCurrentRailHandle: function setCurrentRailHandle(fakeTime) { var t = this; t.setCurrentRailMain(t, fakeTime); }, setCurrentRail: function setCurrentRail() { var t = this; t.setCurrentRailMain(t); }, setCurrentRailMain: function setCurrentRailMain(t, fakeTime) { if (t.getCurrentTime() !== undefined && t.getDuration()) { var nTime = typeof fakeTime === "undefined" ? t.getCurrentTime() : fakeTime; if (t.total && t.handle) { var tW = parseFloat(getComputedStyle(t.total).width); var newWidth = Math.round((tW * nTime) / t.getDuration()), handlePos = newWidth - Math.round(t.handle.offsetWidth / 2); handlePos = handlePos < 0 ? 0 : handlePos; t.setTransformStyle(t.current, "scaleX(" + newWidth / tW + ")"); t.setTransformStyle( t.handle, "translateX(" + handlePos + "px)" ); if ( t.options.useSmoothHover && !(0, _dom.hasClass)(t.hovered, "no-hover") ) { var pos = parseInt(t.hovered.getAttribute("pos")); pos = isNaN(pos) ? 0 : pos; var hoverScaleX = pos / tW - handlePos / tW; t.hovered.style.left = handlePos + "px"; t.setTransformStyle(t.hovered, "scaleX(" + hoverScaleX + ")"); if (hoverScaleX >= 0) { (0, _dom.removeClass)(t.hovered, "negative"); } else { (0, _dom.addClass)(t.hovered, "negative"); } } } } }, }); }, { 17: 17, 2: 2, 24: 24, 25: 25, 29: 29, 5: 5 }, ], 12: [ function (_dereq_, module, exports) { "use strict"; var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _player = _dereq_(17); var _player2 = _interopRequireDefault(_player); var _time = _dereq_(29); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } Object.assign(_player.config, { duration: 0, timeAndDurationSeparator: " | ", }); Object.assign(_player2.default.prototype, { buildcurrent: function buildcurrent(player, controls, layers, media) { var t = this, time = _document2.default.createElement("div"); time.className = t.options.classPrefix + "time"; time.setAttribute("role", "timer"); time.setAttribute("aria-live", "off"); time.innerHTML = '' + (0, _time.secondsToTimeCode)( 0, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength ) + ""; t.addControlElement(time, "current"); media.addEventListener("timeupdate", function () { if (t.controlsAreVisible) { player.updateCurrent(); } }); }, buildduration: function buildduration( player, controls, layers, media ) { var t = this, currTime = controls.lastChild.querySelector( "." + t.options.classPrefix + "currenttime" ); if (currTime) { controls.querySelector( "." + t.options.classPrefix + "time" ).innerHTML += t.options.timeAndDurationSeparator + '' + ((0, _time.secondsToTimeCode)( t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength ) + ""); } else { if ( controls.querySelector( "." + t.options.classPrefix + "currenttime" ) ) { (0, _dom.addClass)( controls.querySelector( "." + t.options.classPrefix + "currenttime" ).parentNode, t.options.classPrefix + "currenttime-container" ); } var duration = _document2.default.createElement("div"); duration.className = t.options.classPrefix + "time " + t.options.classPrefix + "duration-container"; duration.innerHTML = '' + ((0, _time.secondsToTimeCode)( t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength ) + ""); t.addControlElement(duration, "duration"); } media.addEventListener("timeupdate", function () { if (t.controlsAreVisible) { player.updateDuration(); } }); }, updateCurrent: function updateCurrent() { var t = this; var currentTime = t.getCurrentTime(); if (isNaN(currentTime)) { currentTime = 0; } if ( t.controls.querySelector( "." + t.options.classPrefix + "currenttime" ) ) { t.controls.querySelector( "." + t.options.classPrefix + "currenttime" ).innerText = (0, _time.secondsToTimeCode)( currentTime, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength ); } }, updateDuration: function updateDuration() { var t = this; var duration = t.getDuration(); if (isNaN(duration) || duration === Infinity || duration < 0) { t.media.duration = t.options.duration = duration = 0; } if (t.options.duration > 0) { duration = t.options.duration; } var timecode = (0, _time.secondsToTimeCode)( duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength ); if (timecode.length > 5) { (0, _dom.toggleClass)( t.container, t.options.classPrefix + "long-video" ); } if ( t.controls.querySelector( "." + t.options.classPrefix + "duration" ) && duration > 0 ) { t.controls.querySelector( "." + t.options.classPrefix + "duration" ).innerHTML = timecode; } }, }); }, { 17: 17, 2: 2, 25: 25, 29: 29 }, ], 13: [ function (_dereq_, module, exports) { "use strict"; var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _player = _dereq_(17); var _player2 = _interopRequireDefault(_player); var _time = _dereq_(29); var _general = _dereq_(26); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } Object.assign(_player.config, { startLanguage: "", tracksText: null, chaptersText: null, tracksAriaLive: false, hideCaptionsButtonWhenEmpty: true, toggleCaptionsButtonWhenOnlyOne: false, slidesSelector: "", }); Object.assign(_player2.default.prototype, { hasChapters: false, buildtracks: function buildtracks(player, controls, layers, media) { if ( !player.tracks.length && (!player.trackFiles || !player.trackFiles.length === 0) ) { return; } var t = this, attr = t.options.tracksAriaLive ? ' role="log" aria-live="assertive" aria-atomic="false"' : "", tracksTitle = (0, _general.isString)(t.options.tracksText) ? t.options.tracksText : _i18n2.default.t("mejs.captions-subtitles"), chaptersTitle = (0, _general.isString)(t.options.chaptersText) ? t.options.chaptersText : _i18n2.default.t("mejs.captions-chapters"), total = player.trackFiles === null ? player.tracks.length : player.trackFiles.length; if (t.domNode.textTracks) { for (var i = t.domNode.textTracks.length - 1; i >= 0; i--) { t.domNode.textTracks[i].mode = "hidden"; } } t.cleartracks(player); player.captions = _document2.default.createElement("div"); player.captions.className = t.options.classPrefix + "captions-layer " + t.options.classPrefix + "layer"; player.captions.innerHTML = '
" + ('') + "
"; player.captions.style.display = "none"; layers.insertBefore(player.captions, layers.firstChild); player.captionsText = player.captions.querySelector( "." + t.options.classPrefix + "captions-text" ); player.captionsButton = _document2.default.createElement("div"); player.captionsButton.className = t.options.classPrefix + "button " + t.options.classPrefix + "captions-button"; player.captionsButton.innerHTML = '' + ('
') + ('" + "
"; t.addControlElement(player.captionsButton, "tracks"); player.captionsButton.querySelector( "." + t.options.classPrefix + "captions-selector-input" ).disabled = false; player.chaptersButton = _document2.default.createElement("div"); player.chaptersButton.className = t.options.classPrefix + "button " + t.options.classPrefix + "chapters-button"; player.chaptersButton.innerHTML = '' + ('
') + ('') + "
"; var subtitleCount = 0; for (var _i = 0; _i < total; _i++) { var kind = player.tracks[_i].kind; if (kind === "subtitles" || kind === "captions") { subtitleCount++; } else if ( kind === "chapters" && !controls.querySelector( "." + t.options.classPrefix + "chapter-selector" ) ) { player.captionsButton.parentNode.insertBefore( player.chaptersButton, player.captionsButton ); } } player.trackToLoad = -1; player.selectedTrack = null; player.isLoadingTrack = false; for (var _i2 = 0; _i2 < total; _i2++) { var _kind = player.tracks[_i2].kind; if (_kind === "subtitles" || _kind === "captions") { player.addTrackButton( player.tracks[_i2].trackId, player.tracks[_i2].srclang, player.tracks[_i2].label ); } } player.loadNextTrack(); var inEvents = ["mouseenter", "focusin"], outEvents = ["mouseleave", "focusout"]; if ( t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount === 1 ) { player.captionsButton.addEventListener("click", function () { var trackId = "none"; if (player.selectedTrack === null) { trackId = player.tracks[0].trackId; } player.setTrack(trackId); }); } else { var labels = player.captionsButton.querySelectorAll( "." + t.options.classPrefix + "captions-selector-label" ), captions = player.captionsButton.querySelectorAll("input[type=radio]"); for (var _i3 = 0, _total = inEvents.length; _i3 < _total; _i3++) { player.captionsButton.addEventListener( inEvents[_i3], function () { (0, _dom.removeClass)( this.querySelector( "." + t.options.classPrefix + "captions-selector" ), t.options.classPrefix + "offscreen" ); } ); } for ( var _i4 = 0, _total2 = outEvents.length; _i4 < _total2; _i4++ ) { player.captionsButton.addEventListener( outEvents[_i4], function () { (0, _dom.addClass)( this.querySelector( "." + t.options.classPrefix + "captions-selector" ), t.options.classPrefix + "offscreen" ); } ); } for ( var _i5 = 0, _total3 = captions.length; _i5 < _total3; _i5++ ) { captions[_i5].addEventListener("click", function () { player.setTrack(this.value); }); } for (var _i6 = 0, _total4 = labels.length; _i6 < _total4; _i6++) { labels[_i6].addEventListener("click", function () { var radio = (0, _dom.siblings)(this, function (el) { return el.tagName === "INPUT"; })[0], event = (0, _general.createEvent)("click", radio); radio.dispatchEvent(event); }); } player.captionsButton.addEventListener("keydown", function (e) { e.stopPropagation(); }); } for (var _i7 = 0, _total5 = inEvents.length; _i7 < _total5; _i7++) { player.chaptersButton.addEventListener( inEvents[_i7], function () { if ( this.querySelector( "." + t.options.classPrefix + "chapters-selector-list" ).children.length ) { (0, _dom.removeClass)( this.querySelector( "." + t.options.classPrefix + "chapters-selector" ), t.options.classPrefix + "offscreen" ); } } ); } for ( var _i8 = 0, _total6 = outEvents.length; _i8 < _total6; _i8++ ) { player.chaptersButton.addEventListener( outEvents[_i8], function () { (0, _dom.addClass)( this.querySelector( "." + t.options.classPrefix + "chapters-selector" ), t.options.classPrefix + "offscreen" ); } ); } player.chaptersButton.addEventListener("keydown", function (e) { e.stopPropagation(); }); if (!player.options.alwaysShowControls) { player.container.addEventListener("controlsshown", function () { (0, _dom.addClass)(player.container.querySelector("." + t.options.classPrefix + "captions-position"), t.options.classPrefix + "captions-position-hover"); }); player.container.addEventListener("controlshidden", function () { if (!media.paused) { (0, _dom.removeClass)( player.container.querySelector( "." + t.options.classPrefix + "captions-position" ), t.options.classPrefix + "captions-position-hover" ); } }); } else { (0, _dom.addClass)( player.container.querySelector( "." + t.options.classPrefix + "captions-position" ), t.options.classPrefix + "captions-position-hover" ); } media.addEventListener("timeupdate", function () { player.displayCaptions(); }); if (player.options.slidesSelector !== "") { player.slidesContainer = _document2.default.querySelectorAll( player.options.slidesSelector ); media.addEventListener("timeupdate", function () { player.displaySlides(); }); } }, cleartracks: function cleartracks(player) { if (player) { if (player.captions) { player.captions.remove(); } if (player.chapters) { player.chapters.remove(); } if (player.captionsText) { player.captionsText.remove(); } if (player.captionsButton) { player.captionsButton.remove(); } if (player.chaptersButton) { player.chaptersButton.remove(); } } }, rebuildtracks: function rebuildtracks() { var t = this; t.findTracks(); t.buildtracks(t, t.controls, t.layers, t.media); }, findTracks: function findTracks() { var t = this, tracktags = t.trackFiles === null ? t.node.querySelectorAll("track") : t.trackFiles, total = tracktags.length; t.tracks = []; for (var i = 0; i < total; i++) { var track = tracktags[i], srclang = track.getAttribute("srclang").toLowerCase() || "", trackId = t.id + "_track_" + i + "_" + track.getAttribute("kind") + "_" + srclang; t.tracks.push({ trackId: trackId, srclang: srclang, src: track.getAttribute("src"), kind: track.getAttribute("kind"), label: track.getAttribute("label") || "", entries: [], isLoaded: false, }); } }, setTrack: function setTrack(trackId) { var t = this, radios = t.captionsButton.querySelectorAll('input[type="radio"]'), captions = t.captionsButton.querySelectorAll( "." + t.options.classPrefix + "captions-selected" ), track = t.captionsButton.querySelector( 'input[value="' + trackId + '"]' ); for (var i = 0, total = radios.length; i < total; i++) { radios[i].checked = false; } for (var _i9 = 0, _total7 = captions.length; _i9 < _total7; _i9++) { (0, _dom.removeClass)( captions[_i9], t.options.classPrefix + "captions-selected" ); } track.checked = true; var labels = (0, _dom.siblings)(track, function (el) { return (0, _dom.hasClass)(el, t.options.classPrefix + "captions-selector-label"); }); for ( var _i10 = 0, _total8 = labels.length; _i10 < _total8; _i10++ ) { (0, _dom.addClass)( labels[_i10], t.options.classPrefix + "captions-selected" ); } if (trackId === "none") { t.selectedTrack = null; (0, _dom.removeClass)( t.captionsButton, t.options.classPrefix + "captions-enabled" ); } else { for ( var _i11 = 0, _total9 = t.tracks.length; _i11 < _total9; _i11++ ) { var _track = t.tracks[_i11]; if (_track.trackId === trackId) { if (t.selectedTrack === null) { (0, _dom.addClass)( t.captionsButton, t.options.classPrefix + "captions-enabled" ); } t.selectedTrack = _track; t.captions.setAttribute("lang", t.selectedTrack.srclang); t.displayCaptions(); break; } } } var event = (0, _general.createEvent)("captionschange", t.media); event.detail.caption = t.selectedTrack; t.media.dispatchEvent(event); }, loadNextTrack: function loadNextTrack() { var t = this; t.trackToLoad++; if (t.trackToLoad < t.tracks.length) { t.isLoadingTrack = true; t.loadTrack(t.trackToLoad); } else { t.isLoadingTrack = false; t.checkForTracks(); } }, loadTrack: function loadTrack(index) { var t = this, track = t.tracks[index]; if ( track !== undefined && (track.src !== undefined || track.src !== "") ) { (0, _dom.ajax)( track.src, "text", function (d) { track.entries = typeof d === "string" && /' + ('') + ('") + ""; }, checkForTracks: function checkForTracks() { var t = this; var hasSubtitles = false; if (t.options.hideCaptionsButtonWhenEmpty) { for (var i = 0, total = t.tracks.length; i < total; i++) { var kind = t.tracks[i].kind; if ( (kind === "subtitles" || kind === "captions") && t.tracks[i].isLoaded ) { hasSubtitles = true; break; } } t.captionsButton.style.display = hasSubtitles ? "" : "none"; t.setControlsSize(); } }, displayCaptions: function displayCaptions() { if (this.tracks === undefined) { return; } var t = this, track = t.selectedTrack, sanitize = function sanitize(html) { var div = _document2.default.createElement("div"); div.innerHTML = html; var scripts = div.getElementsByTagName("script"); var i = scripts.length; while (i--) { scripts[i].remove(); } var allElements = div.getElementsByTagName("*"); for (var _i12 = 0, n = allElements.length; _i12 < n; _i12++) { var attributesObj = allElements[_i12].attributes, attributes = Array.prototype.slice.call(attributesObj); for (var j = 0, total = attributes.length; j < total; j++) { if ( attributes[j].name.startsWith("on") || attributes[j].value.startsWith("javascript") ) { allElements[_i12].remove(); } else if (attributes[j].name === "style") { allElements[_i12].removeAttribute(attributes[j].name); } } } return div.innerHTML; }; if (track !== null && track.isLoaded) { var i = t.searchTrackPosition(track.entries, t.media.currentTime); if (i > -1) { t.captionsText.innerHTML = sanitize(track.entries[i].text); t.captionsText.className = t.options.classPrefix + "captions-text " + (track.entries[i].identifier || ""); t.captions.style.display = ""; t.captions.style.height = "0px"; return; } t.captions.style.display = "none"; } else { t.captions.style.display = "none"; } }, setupSlides: function setupSlides(track) { var t = this; t.slides = track; t.slides.entries.imgs = [t.slides.entries.length]; t.showSlide(0); }, showSlide: function showSlide(index) { var _this = this; var t = this; if (t.tracks === undefined || t.slidesContainer === undefined) { return; } var url = t.slides.entries[index].text; var img = t.slides.entries[index].imgs; if (img === undefined || img.fadeIn === undefined) { var image = _document2.default.createElement("img"); image.src = url; image.addEventListener("load", function () { var self = _this, visible = (0, _dom.siblings)(self, function (el) { return visible(el); }); self.style.display = "none"; t.slidesContainer.innerHTML += self.innerHTML; (0, _dom.fadeIn)(t.slidesContainer.querySelector(image)); for (var i = 0, total = visible.length; i < total; i++) { (0, _dom.fadeOut)(visible[i], 400); } }); t.slides.entries[index].imgs = img = image; } else if (!(0, _dom.visible)(img)) { var _visible = (0, _dom.siblings)(self, function (el) { return _visible(el); }); (0, _dom.fadeIn)(t.slidesContainer.querySelector(img)); for (var i = 0, total = _visible.length; i < total; i++) { (0, _dom.fadeOut)(_visible[i]); } } }, displaySlides: function displaySlides() { var t = this; if (this.slides === undefined) { return; } var slides = t.slides, i = t.searchTrackPosition(slides.entries, t.media.currentTime); if (i > -1) { t.showSlide(i); } }, drawChapters: function drawChapters(chapters) { var t = this, total = chapters.entries.length; if (!total) { return; } t.chaptersButton.querySelector("ul").innerHTML = ""; for (var i = 0; i < total; i++) { t.chaptersButton.querySelector("ul").innerHTML += '
  • ' + ('') + ('") + "
  • "; } var radios = t.chaptersButton.querySelectorAll( 'input[type="radio"]' ), labels = t.chaptersButton.querySelectorAll( "." + t.options.classPrefix + "chapters-selector-label" ); for ( var _i13 = 0, _total10 = radios.length; _i13 < _total10; _i13++ ) { radios[_i13].disabled = false; radios[_i13].checked = false; radios[_i13].addEventListener("click", function () { var self = this, listItems = t.chaptersButton.querySelectorAll("li"), label = (0, _dom.siblings)(self, function (el) { return (0, _dom.hasClass)(el, t.options.classPrefix + "chapters-selector-label"); })[0]; self.checked = true; self.parentNode.setAttribute("aria-checked", true); (0, _dom.addClass)(label, t.options.classPrefix + "chapters-selected"); (0, _dom.removeClass)(t.chaptersButton.querySelector("." + t.options.classPrefix + "chapters-selected"), t.options.classPrefix + "chapters-selected"); for ( var _i14 = 0, _total11 = listItems.length; _i14 < _total11; _i14++ ) { listItems[_i14].setAttribute("aria-checked", false); } t.media.setCurrentTime(parseFloat(self.value)); if (t.media.paused) { t.media.play(); } }); } for ( var _i15 = 0, _total12 = labels.length; _i15 < _total12; _i15++ ) { labels[_i15].addEventListener("click", function () { var radio = (0, _dom.siblings)(this, function (el) { return el.tagName === "INPUT"; })[0], event = (0, _general.createEvent)("click", radio); radio.dispatchEvent(event); }); } }, searchTrackPosition: function searchTrackPosition( tracks, currentTime ) { var lo = 0, hi = tracks.length - 1, mid = void 0, start = void 0, stop = void 0; while (lo <= hi) { mid = (lo + hi) >> 1; start = tracks[mid].start; stop = tracks[mid].stop; if (currentTime >= start && currentTime < stop) { return mid; } else if (start < currentTime) { lo = mid + 1; } else if (start > currentTime) { hi = mid - 1; } } return -1; }, }); _mejs2.default.language = { codes: { af: "mejs.afrikaans", sq: "mejs.albanian", ar: "mejs.arabic", be: "mejs.belarusian", bg: "mejs.bulgarian", ca: "mejs.catalan", zh: "mejs.chinese", "zh-cn": "mejs.chinese-simplified", "zh-tw": "mejs.chines-traditional", hr: "mejs.croatian", cs: "mejs.czech", da: "mejs.danish", nl: "mejs.dutch", en: "mejs.english", et: "mejs.estonian", fl: "mejs.filipino", fi: "mejs.finnish", fr: "mejs.french", gl: "mejs.galician", de: "mejs.german", el: "mejs.greek", ht: "mejs.haitian-creole", iw: "mejs.hebrew", hi: "mejs.hindi", hu: "mejs.hungarian", is: "mejs.icelandic", id: "mejs.indonesian", ga: "mejs.irish", it: "mejs.italian", ja: "mejs.japanese", ko: "mejs.korean", lv: "mejs.latvian", lt: "mejs.lithuanian", mk: "mejs.macedonian", ms: "mejs.malay", mt: "mejs.maltese", no: "mejs.norwegian", fa: "mejs.persian", pl: "mejs.polish", pt: "mejs.portuguese", ro: "mejs.romanian", ru: "mejs.russian", sr: "mejs.serbian", sk: "mejs.slovak", sl: "mejs.slovenian", es: "mejs.spanish", sw: "mejs.swahili", sv: "mejs.swedish", tl: "mejs.tagalog", th: "mejs.thai", tr: "mejs.turkish", uk: "mejs.ukrainian", vi: "mejs.vietnamese", cy: "mejs.welsh", yi: "mejs.yiddish", }, }; _mejs2.default.TrackFormatParser = { webvtt: { pattern: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, parse: function parse(trackText) { var lines = trackText.split(/\r?\n/), entries = []; var timecode = void 0, text = void 0, identifier = void 0; for (var i = 0, total = lines.length; i < total; i++) { timecode = this.pattern.exec(lines[i]); if (timecode && i < lines.length) { if (i - 1 >= 0 && lines[i - 1] !== "") { identifier = lines[i - 1]; } i++; text = lines[i]; i++; while (lines[i] !== "" && i < lines.length) { text = text + "\n" + lines[i]; i++; } text = text .trim() .replace( /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, "$1" ); entries.push({ identifier: identifier, start: (0, _time.convertSMPTEtoSeconds)(timecode[1]) === 0 ? 0.2 : (0, _time.convertSMPTEtoSeconds)(timecode[1]), stop: (0, _time.convertSMPTEtoSeconds)(timecode[3]), text: text, settings: timecode[5], }); } identifier = ""; } return entries; }, }, dfxp: { parse: function parse(trackText) { trackText = $(trackText).filter("tt"); var container = trackText.firstChild, lines = container.querySelectorAll("p"), styleNode = trackText.getElementById( "" + container.attr("style") ), entries = []; var styles = void 0; if (styleNode.length) { styleNode.removeAttribute("id"); var attributes = styleNode.attributes; if (attributes.length) { styles = {}; for (var i = 0, total = attributes.length; i < total; i++) { styles[attributes[i].name.split(":")[1]] = attributes[i].value; } } } for ( var _i16 = 0, _total13 = lines.length; _i16 < _total13; _i16++ ) { var style = void 0, _temp = { start: null, stop: null, style: null, text: null }; if (lines.eq(_i16).attr("begin")) { _temp.start = (0, _time.convertSMPTEtoSeconds)( lines.eq(_i16).attr("begin") ); } if (!_temp.start && lines.eq(_i16 - 1).attr("end")) { _temp.start = (0, _time.convertSMPTEtoSeconds)( lines.eq(_i16 - 1).attr("end") ); } if (lines.eq(_i16).attr("end")) { _temp.stop = (0, _time.convertSMPTEtoSeconds)( lines.eq(_i16).attr("end") ); } if (!_temp.stop && lines.eq(_i16 + 1).attr("begin")) { _temp.stop = (0, _time.convertSMPTEtoSeconds)( lines.eq(_i16 + 1).attr("begin") ); } if (styles) { style = ""; for (var _style in styles) { style += _style + ":" + styles[_style] + ";"; } } if (style) { _temp.style = style; } if (_temp.start === 0) { _temp.start = 0.2; } _temp.text = lines .eq(_i16) .innerHTML.trim() .replace( /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, "$1" ); entries.push(_temp); } return entries; }, }, }; }, { 17: 17, 2: 2, 25: 25, 26: 26, 29: 29, 5: 5, 7: 7 }, ], 14: [ function (_dereq_, module, exports) { "use strict"; var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _player = _dereq_(17); var _player2 = _interopRequireDefault(_player); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _constants = _dereq_(24); var _general = _dereq_(26); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } Object.assign(_player.config, { muteText: null, unmuteText: null, allyVolumeControlText: null, hideVolumeOnTouchDevices: true, audioVolume: "horizontal", videoVolume: "vertical", startVolume: 0.8, }); Object.assign(_player2.default.prototype, { buildvolume: function buildvolume(player, controls, layers, media) { if ( (_constants.IS_ANDROID || _constants.IS_IOS) && this.options.hideVolumeOnTouchDevices ) { return; } var t = this, mode = t.isVideo ? t.options.videoVolume : t.options.audioVolume, muteText = (0, _general.isString)(t.options.muteText) ? t.options.muteText : _i18n2.default.t("mejs.mute"), unmuteText = (0, _general.isString)(t.options.unmuteText) ? t.options.unmuteText : _i18n2.default.t("mejs.unmute"), volumeControlText = (0, _general.isString)( t.options.allyVolumeControlText ) ? t.options.allyVolumeControlText : _i18n2.default.t("mejs.volume-help-text"), mute = _document2.default.createElement("div"); mute.className = t.options.classPrefix + "button " + t.options.classPrefix + "volume-button " + t.options.classPrefix + "mute"; mute.innerHTML = mode === "horizontal" ? '' : '' + ('' + ('' + volumeControlText + "") + ('
    ') + ('
    ') + ('
    ') + "
    " + "
    "; t.addControlElement(mute, "volume"); if (mode === "horizontal") { var anchor = _document2.default.createElement("a"); anchor.className = t.options.classPrefix + "horizontal-volume-slider"; anchor.href = "javascript:void(0);"; anchor.setAttribute( "aria-label", _i18n2.default.t("mejs.volume-slider") ); anchor.setAttribute("aria-valuemin", 0); anchor.setAttribute("aria-valuemax", 100); anchor.setAttribute("role", "slider"); anchor.innerHTML += '' + volumeControlText + "" + ('
    ') + ('
    ') + ('
    ') + "
    "; mute.parentNode.insertBefore(anchor, mute.nextSibling); } var mouseIsDown = false, mouseIsOver = false, modified = false, updateVolumeSlider = function updateVolumeSlider() { var volume = Math.floor(media.volume * 100); volumeSlider.setAttribute("aria-valuenow", volume); volumeSlider.setAttribute("aria-valuetext", volume + "%"); }; var volumeSlider = mode === "vertical" ? t.container.querySelector( "." + t.options.classPrefix + "volume-slider" ) : t.container.querySelector( "." + t.options.classPrefix + "horizontal-volume-slider" ), volumeTotal = mode === "vertical" ? t.container.querySelector( "." + t.options.classPrefix + "volume-total" ) : t.container.querySelector( "." + t.options.classPrefix + "horizontal-volume-total" ), volumeCurrent = mode === "vertical" ? t.container.querySelector( "." + t.options.classPrefix + "volume-current" ) : t.container.querySelector( "." + t.options.classPrefix + "horizontal-volume-current" ), volumeHandle = mode === "vertical" ? t.container.querySelector( "." + t.options.classPrefix + "volume-handle" ) : t.container.querySelector( "." + t.options.classPrefix + "horizontal-volume-handle" ), positionVolumeHandle = function positionVolumeHandle(volume) { if (volume === null || isNaN(volume) || volume === undefined) { return; } volume = Math.max(0, volume); volume = Math.min(volume, 1); if (volume === 0) { (0, _dom.removeClass)(mute, t.options.classPrefix + "mute"); (0, _dom.addClass)(mute, t.options.classPrefix + "unmute"); var button = mute.firstElementChild; button.setAttribute("title", unmuteText); button.setAttribute("aria-label", unmuteText); } else { (0, _dom.removeClass)(mute, t.options.classPrefix + "unmute"); (0, _dom.addClass)(mute, t.options.classPrefix + "mute"); var _button = mute.firstElementChild; _button.setAttribute("title", muteText); _button.setAttribute("aria-label", muteText); } var volumePercentage = volume * 100 + "%", volumeStyles = getComputedStyle(volumeHandle); if (mode === "vertical") { volumeCurrent.style.bottom = 0; volumeCurrent.style.height = volumePercentage; volumeHandle.style.bottom = volumePercentage; volumeHandle.style.marginBottom = -parseFloat(volumeStyles.height) / 2 + "px"; } else { volumeCurrent.style.left = 0; volumeCurrent.style.width = volumePercentage; volumeHandle.style.left = volumePercentage; volumeHandle.style.marginLeft = -parseFloat(volumeStyles.width) / 2 + "px"; } }, handleVolumeMove = function handleVolumeMove(e) { var totalOffset = (0, _dom.offset)(volumeTotal), volumeStyles = getComputedStyle(volumeTotal); modified = true; var volume = null; if (mode === "vertical") { var railHeight = parseFloat(volumeStyles.height), newY = e.pageY - totalOffset.top; volume = (railHeight - newY) / railHeight; if (totalOffset.top === 0 || totalOffset.left === 0) { return; } } else { var railWidth = parseFloat(volumeStyles.width), newX = e.pageX - totalOffset.left; volume = newX / railWidth; } volume = Math.max(0, volume); volume = Math.min(volume, 1); positionVolumeHandle(volume); media.setMuted(volume === 0); media.setVolume(volume); e.preventDefault(); e.stopPropagation(); }, toggleMute = function toggleMute() { if (media.muted) { positionVolumeHandle(0); (0, _dom.removeClass)(mute, t.options.classPrefix + "mute"); (0, _dom.addClass)(mute, t.options.classPrefix + "unmute"); } else { positionVolumeHandle(media.volume); (0, _dom.removeClass)(mute, t.options.classPrefix + "unmute"); (0, _dom.addClass)(mute, t.options.classPrefix + "mute"); } }; mute.addEventListener("mouseenter", function (e) { if (e.target === mute) { volumeSlider.style.display = "block"; mouseIsOver = true; e.preventDefault(); e.stopPropagation(); } }); mute.addEventListener("focusin", function () { volumeSlider.style.display = "block"; mouseIsOver = true; }); mute.addEventListener("focusout", function (e) { if ( (!e.relatedTarget || (e.relatedTarget && !e.relatedTarget.matches( "." + t.options.classPrefix + "volume-slider" ))) && mode === "vertical" ) { volumeSlider.style.display = "none"; } }); mute.addEventListener("mouseleave", function () { mouseIsOver = false; if (!mouseIsDown && mode === "vertical") { volumeSlider.style.display = "none"; } }); mute.addEventListener("focusout", function () { mouseIsOver = false; }); mute.addEventListener("keydown", function (e) { if (t.options.keyActions.length) { var keyCode = e.which || e.keyCode || 0, volume = media.volume; switch (keyCode) { case 38: volume = Math.min(volume + 0.1, 1); break; case 40: volume = Math.max(0, volume - 0.1); break; default: return true; } mouseIsDown = false; positionVolumeHandle(volume); media.setVolume(volume); e.preventDefault(); e.stopPropagation(); } }); mute.querySelector("button").addEventListener("click", function () { media.setMuted(!media.muted); var event = (0, _general.createEvent)("volumechange", media); media.dispatchEvent(event); }); volumeSlider.addEventListener("dragstart", function () { return false; }); volumeSlider.addEventListener("mouseover", function () { mouseIsOver = true; }); volumeSlider.addEventListener("focusin", function () { volumeSlider.style.display = "block"; mouseIsOver = true; }); volumeSlider.addEventListener("focusout", function () { mouseIsOver = false; if (!mouseIsDown && mode === "vertical") { volumeSlider.style.display = "none"; } }); volumeSlider.addEventListener("mousedown", function (e) { handleVolumeMove(e); t.globalBind("mousemove.vol", function (event) { var target = event.target; if ( mouseIsDown && (target === volumeSlider || target.closest( mode === "vertical" ? "." + t.options.classPrefix + "volume-slider" : "." + t.options.classPrefix + "horizontal-volume-slider" )) ) { handleVolumeMove(event); } }); t.globalBind("mouseup.vol", function () { mouseIsDown = false; t.globalUnbind("mousemove.vol mouseup.vol"); if (!mouseIsOver && mode === "vertical") { volumeSlider.style.display = "none"; } }); mouseIsDown = true; e.preventDefault(); e.stopPropagation(); }); media.addEventListener("volumechange", function (e) { if (!mouseIsDown) { toggleMute(); } updateVolumeSlider(e); }); var rendered = false; media.addEventListener("rendererready", function () { if (!modified) { setTimeout(function () { rendered = true; if ( player.options.startVolume === 0 || media.originalNode.muted ) { media.setMuted(true); player.options.startVolume = 0; } media.setVolume(player.options.startVolume); t.setControlsSize(); }, 250); } }); media.addEventListener("loadedmetadata", function () { setTimeout(function () { if (!modified && !rendered) { if ( player.options.startVolume === 0 || media.originalNode.muted ) { media.setMuted(true); player.options.startVolume = 0; } media.setVolume(player.options.startVolume); t.setControlsSize(); } rendered = false; }, 250); }); if (player.options.startVolume === 0 || media.originalNode.muted) { media.setMuted(true); player.options.startVolume = 0; toggleMute(); } t.container.addEventListener("controlsresize", function () { toggleMute(); }); }, }); }, { 17: 17, 2: 2, 24: 24, 25: 25, 26: 26, 5: 5 }, ], 15: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var EN = (exports.EN = { "mejs.plural-form": 1, "mejs.download-file": "Download File", "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", "mejs.fullscreen": "Fullscreen", "mejs.play": "Play", "mejs.pause": "Pause", "mejs.time-slider": "Time Slider", "mejs.time-help-text": "Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.", "mejs.live-broadcast": "Live Broadcast", "mejs.volume-help-text": "Use Up/Down Arrow keys to increase or decrease volume.", "mejs.unmute": "Unmute", "mejs.mute": "Mute", "mejs.volume-slider": "Volume Slider", "mejs.video-player": "Video Player", "mejs.audio-player": "Audio Player", "mejs.captions-subtitles": "Captions/Subtitles", "mejs.captions-chapters": "Chapters", "mejs.none": "None", "mejs.afrikaans": "Afrikaans", "mejs.albanian": "Albanian", "mejs.arabic": "Arabic", "mejs.belarusian": "Belarusian", "mejs.bulgarian": "Bulgarian", "mejs.catalan": "Catalan", "mejs.chinese": "Chinese", "mejs.chinese-simplified": "Chinese (Simplified)", "mejs.chinese-traditional": "Chinese (Traditional)", "mejs.croatian": "Croatian", "mejs.czech": "Czech", "mejs.danish": "Danish", "mejs.dutch": "Dutch", "mejs.english": "English", "mejs.estonian": "Estonian", "mejs.filipino": "Filipino", "mejs.finnish": "Finnish", "mejs.french": "French", "mejs.galician": "Galician", "mejs.german": "German", "mejs.greek": "Greek", "mejs.haitian-creole": "Haitian Creole", "mejs.hebrew": "Hebrew", "mejs.hindi": "Hindi", "mejs.hungarian": "Hungarian", "mejs.icelandic": "Icelandic", "mejs.indonesian": "Indonesian", "mejs.irish": "Irish", "mejs.italian": "Italian", "mejs.japanese": "Japanese", "mejs.korean": "Korean", "mejs.latvian": "Latvian", "mejs.lithuanian": "Lithuanian", "mejs.macedonian": "Macedonian", "mejs.malay": "Malay", "mejs.maltese": "Maltese", "mejs.norwegian": "Norwegian", "mejs.persian": "Persian", "mejs.polish": "Polish", "mejs.portuguese": "Portuguese", "mejs.romanian": "Romanian", "mejs.russian": "Russian", "mejs.serbian": "Serbian", "mejs.slovak": "Slovak", "mejs.slovenian": "Slovenian", "mejs.spanish": "Spanish", "mejs.swahili": "Swahili", "mejs.swedish": "Swedish", "mejs.tagalog": "Tagalog", "mejs.thai": "Thai", "mejs.turkish": "Turkish", "mejs.ukrainian": "Ukrainian", "mejs.vietnamese": "Vietnamese", "mejs.welsh": "Welsh", "mejs.yiddish": "Yiddish", }); }, {}, ], 16: [ function (_dereq_, module, exports) { "use strict"; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } if (typeof jQuery !== "undefined") { _mejs2.default.$ = _window2.default.jQuery = _window2.default.$ = jQuery; } else if (typeof Zepto !== "undefined") { _mejs2.default.$ = _window2.default.Zepto = _window2.default.$ = Zepto; } else if (typeof ender !== "undefined") { _mejs2.default.$ = _window2.default.ender = _window2.default.$ = ender; } }, { 3: 3, 7: 7 }, ], 17: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.config = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _mediaelement = _dereq_(6); var _mediaelement2 = _interopRequireDefault(_mediaelement); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _constants = _dereq_(24); var _general = _dereq_(26); var _time = _dereq_(29); var _media = _dereq_(27); var _dom = _dereq_(25); var dom = _interopRequireWildcard(_dom); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } _mejs2.default.mepIndex = 0; _mejs2.default.players = {}; var config = (exports.config = { poster: "", showPosterWhenEnded: false, showPosterWhenPaused: false, defaultVideoWidth: 480, defaultVideoHeight: 270, videoWidth: -1, videoHeight: -1, defaultAudioWidth: 400, defaultAudioHeight: 40, defaultSeekBackwardInterval: function defaultSeekBackwardInterval( media ) { return media.getDuration() * 0.05; }, defaultSeekForwardInterval: function defaultSeekForwardInterval( media ) { return media.getDuration() * 0.05; }, setDimensions: true, audioWidth: -1, audioHeight: -1, loop: false, autoRewind: true, enableAutosize: true, timeFormat: "", alwaysShowHours: false, showTimecodeFrameCount: false, framesPerSecond: 25, alwaysShowControls: false, hideVideoControlsOnLoad: false, hideVideoControlsOnPause: false, clickToPlayPause: true, controlsTimeoutDefault: 1500, controlsTimeoutMouseEnter: 2500, controlsTimeoutMouseLeave: 1000, iPadUseNativeControls: false, iPhoneUseNativeControls: false, AndroidUseNativeControls: false, features: [ "playpause", "current", "progress", "duration", "tracks", "volume", "fullscreen", ], isVideo: true, stretching: "auto", classPrefix: "mejs__", enableKeyboard: true, pauseOtherPlayers: true, secondsDecimalLength: 0, keyActions: [ { keys: [32, 179], action: function action(player, media) { if (!_constants.IS_FIREFOX) { if (media.paused || media.ended) { media.play(); } else { media.pause(); } } }, }, { keys: [38], action: function action(player, media) { if ( player.container .querySelector( "." + config.classPrefix + "volume-button>button" ) .matches(":focus") || player.container .querySelector("." + config.classPrefix + "volume-slider") .matches(":focus") ) { player.container.querySelector( "." + config.classPrefix + "volume-slider" ).style.display = ""; } if (player.isVideo) { player.showControls(); player.startControlsTimer(); } var newVolume = Math.min(media.volume + 0.1, 1); media.setVolume(newVolume); if (newVolume > 0) { media.setMuted(false); } }, }, { keys: [40], action: function action(player, media) { if ( player.container .querySelector( "." + config.classPrefix + "volume-button>button" ) .matches(":focus") || player.container .querySelector("." + config.classPrefix + "volume-slider") .matches(":focus") ) { player.container.querySelector( "." + config.classPrefix + "volume-slider" ).style.display = ""; } if (player.isVideo) { player.showControls(); player.startControlsTimer(); } var newVolume = Math.max(media.volume - 0.1, 0); media.setVolume(newVolume); if (newVolume <= 0.1) { media.setMuted(true); } }, }, { keys: [37, 227], action: function action(player, media) { if (!isNaN(media.duration) && media.duration > 0) { if (player.isVideo) { player.showControls(); player.startControlsTimer(); } var newTime = Math.max( media.currentTime - player.options.defaultSeekBackwardInterval(media), 0 ); media.setCurrentTime(newTime); } }, }, { keys: [39, 228], action: function action(player, media) { if (!isNaN(media.duration) && media.duration > 0) { if (player.isVideo) { player.showControls(); player.startControlsTimer(); } var newTime = Math.min( media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration ); media.setCurrentTime(newTime); } }, }, { keys: [70], action: function action(player, media, key, event) { if (!event.ctrlKey) { if (typeof player.enterFullScreen !== "undefined") { if (player.isFullScreen) { player.exitFullScreen(); } else { player.enterFullScreen(); } } } }, }, { keys: [77], action: function action(player) { player.container.querySelector( "." + config.classPrefix + "volume-slider" ).style.display = ""; if (player.isVideo) { player.showControls(); player.startControlsTimer(); } if (player.media.muted) { player.setMuted(false); } else { player.setMuted(true); } }, }, ], }); _mejs2.default.MepDefaults = config; var MediaElementPlayer = (function () { function MediaElementPlayer(node, o) { _classCallCheck(this, MediaElementPlayer); var t = this, element = typeof node === "string" ? _document2.default.getElementById(node) : node; t.hasFocus = false; t.controlsAreVisible = true; t.controlsEnabled = true; t.controlsTimer = null; if (!(t instanceof MediaElementPlayer)) { return new MediaElementPlayer(element, o); } t.node = t.media = element; if (!t.node) { return; } if (t.media.player !== undefined) { return t.media.player; } if (o === undefined) { var options = t.node.getAttribute("data-mejsoptions"); o = options ? JSON.parse(options) : {}; } t.options = Object.assign({}, config, o); if (t.options.loop && !t.media.getAttribute("loop")) { t.media.loop = true; t.node.loop = true; } else if (t.media.loop) { t.options.loop = true; } if (!t.options.timeFormat) { t.options.timeFormat = "mm:ss"; if (t.options.alwaysShowHours) { t.options.timeFormat = "hh:mm:ss"; } if (t.options.showTimecodeFrameCount) { t.options.timeFormat += ":ff"; } } (0, _time.calculateTimeFormat)( 0, t.options, t.options.framesPerSecond || 25 ); t.id = "mep_" + _mejs2.default.mepIndex++; _mejs2.default.players[t.id] = t; var meOptions = Object.assign({}, t.options, { success: function success(media, domNode) { t._meReady(media, domNode); }, error: function error(e) { t._handleError(e); }, }), tagName = t.node.tagName.toLowerCase(); t.isDynamic = tagName !== "audio" && tagName !== "video"; t.isVideo = t.isDynamic ? t.options.isVideo : tagName !== "audio" && t.options.isVideo; t.mediaFiles = null; t.trackFiles = null; if ( (_constants.IS_IPAD && t.options.iPadUseNativeControls) || (_constants.IS_IPHONE && t.options.iPhoneUseNativeControls) ) { t.node.setAttribute("controls", true); if (_constants.IS_IPAD && t.node.getAttribute("autoplay")) { t.play(); } } else if ( (t.isVideo || (!t.isVideo && t.options.features.length)) && !(_constants.IS_ANDROID && t.options.AndroidUseNativeControls) ) { t.node.removeAttribute("controls"); var videoPlayerTitle = t.isVideo ? _i18n2.default.t("mejs.video-player") : _i18n2.default.t("mejs.audio-player"); var offscreen = _document2.default.createElement("span"); offscreen.className = t.options.classPrefix + "offscreen"; offscreen.innerText = videoPlayerTitle; t.media.parentNode.insertBefore(offscreen, t.media); t.container = _document2.default.createElement("div"); t.container.id = t.id; t.container.className = t.options.classPrefix + "container " + t.options.classPrefix + "container-keyboard-inactive " + t.media.className; t.container.tabIndex = 0; t.container.setAttribute("role", "application"); t.container.setAttribute("aria-label", videoPlayerTitle); t.container.innerHTML = '
    ' + ('
    ') + ('
    ') + ('
    ') + ('
    ') + "
    "; t.container.addEventListener("focus", function (e) { if (!t.controlsAreVisible && !t.hasFocus && t.controlsEnabled) { t.showControls(true); var btnSelector = (0, _general.isNodeAfter)( e.relatedTarget, t.container ) ? "." + t.options.classPrefix + "controls ." + t.options.classPrefix + "button:last-child > button" : "." + t.options.classPrefix + "playpause-button > button", button = t.container.querySelector(btnSelector); button.focus(); } }); t.node.parentNode.insertBefore(t.container, t.node); if (!t.options.features.length) { t.container.style.background = "transparent"; t.container.querySelector( "." + t.options.classPrefix + "controls" ).style.display = "none"; } if ( t.isVideo && t.options.stretching === "fill" && !dom.hasClass( t.container.parentNode, t.options.classPrefix + "fill-container" ) ) { t.outerContainer = t.media.parentNode; var wrapper = _document2.default.createElement("div"); wrapper.className = t.options.classPrefix + "fill-container"; t.container.parentNode.insertBefore(wrapper, t.container); wrapper.appendChild(t.container); } if (_constants.IS_ANDROID) { dom.addClass(t.container, t.options.classPrefix + "android"); } if (_constants.IS_IOS) { dom.addClass(t.container, t.options.classPrefix + "ios"); } if (_constants.IS_IPAD) { dom.addClass(t.container, t.options.classPrefix + "ipad"); } if (_constants.IS_IPHONE) { dom.addClass(t.container, t.options.classPrefix + "iphone"); } dom.addClass( t.container, t.isVideo ? t.options.classPrefix + "video" : t.options.classPrefix + "audio" ); if (_constants.IS_SAFARI && !_constants.IS_IOS) { dom.addClass(t.container, t.options.classPrefix + "hide-cues"); var cloneNode = t.node.cloneNode(), children = t.node.children, mediaFiles = [], tracks = []; for (var i = 0, total = children.length; i < total; i++) { var childNode = children[i]; (function () { switch (childNode.tagName.toLowerCase()) { case "source": var elements = {}; Array.prototype.slice .call(childNode.attributes) .forEach(function (item) { elements[item.name] = item.value; }); elements.type = (0, _media.formatType)( elements.src, elements.type ); mediaFiles.push(elements); break; case "track": childNode.mode = "hidden"; tracks.push(childNode); break; default: cloneNode.appendChild(childNode); break; } })(); } t.node.remove(); t.node = t.media = cloneNode; if (mediaFiles.length) { t.mediaFiles = mediaFiles; } if (tracks.length) { t.trackFiles = tracks; } } t.container .querySelector("." + t.options.classPrefix + "mediaelement") .appendChild(t.node); t.media.player = t; t.controls = t.container.querySelector( "." + t.options.classPrefix + "controls" ); t.layers = t.container.querySelector( "." + t.options.classPrefix + "layers" ); var tagType = t.isVideo ? "video" : "audio", capsTagName = tagType.substring(0, 1).toUpperCase() + tagType.substring(1); if ( t.options[tagType + "Width"] > 0 || t.options[tagType + "Width"].toString().indexOf("%") > -1 ) { t.width = t.options[tagType + "Width"]; } else if ( t.node.style.width !== "" && t.node.style.width !== null ) { t.width = t.node.style.width; } else if (t.node.getAttribute("width")) { t.width = t.node.getAttribute("width"); } else { t.width = t.options["default" + capsTagName + "Width"]; } if ( t.options[tagType + "Height"] > 0 || t.options[tagType + "Height"].toString().indexOf("%") > -1 ) { t.height = t.options[tagType + "Height"]; } else if ( t.node.style.height !== "" && t.node.style.height !== null ) { t.height = t.node.style.height; } else if (t.node.getAttribute("height")) { t.height = t.node.getAttribute("height"); } else { t.height = t.options["default" + capsTagName + "Height"]; } t.initialAspectRatio = t.height >= t.width ? t.width / t.height : t.height / t.width; t.setPlayerSize(t.width, t.height); meOptions.pluginWidth = t.width; meOptions.pluginHeight = t.height; } else if (!t.isVideo && !t.options.features.length) { t.node.style.display = "none"; } new _mediaelement2.default(t.media, meOptions, t.mediaFiles); if ( t.container !== undefined && t.options.features.length && t.controlsAreVisible && !t.options.hideVideoControlsOnLoad ) { var event = (0, _general.createEvent)( "controlsshown", t.container ); t.container.dispatchEvent(event); } return t; } _createClass(MediaElementPlayer, [ { key: "showControls", value: function showControls(doAnimation) { var t = this; doAnimation = doAnimation === undefined || doAnimation; if (t.controlsAreVisible || !t.isVideo) { return; } if (doAnimation) { (function () { dom.fadeIn(t.controls, 200, function () { dom.removeClass( t.controls, t.options.classPrefix + "offscreen" ); var event = (0, _general.createEvent)( "controlsshown", t.container ); t.container.dispatchEvent(event); }); var controls = t.container.querySelectorAll( "." + t.options.classPrefix + "control" ); var _loop = function _loop(i, total) { dom.fadeIn(controls[i], 200, function () { dom.removeClass( controls[i], t.options.classPrefix + "offscreen" ); }); }; for (var i = 0, total = controls.length; i < total; i++) { _loop(i, total); } })(); } else { dom.removeClass( t.controls, t.options.classPrefix + "offscreen" ); t.controls.style.display = ""; t.controls.style.opacity = 1; var controls = t.container.querySelectorAll( "." + t.options.classPrefix + "control" ); for (var i = 0, total = controls.length; i < total; i++) { dom.removeClass( controls[i], t.options.classPrefix + "offscreen" ); controls[i].style.display = ""; } var event = (0, _general.createEvent)( "controlsshown", t.container ); t.container.dispatchEvent(event); } t.controlsAreVisible = true; t.setControlsSize(); }, }, { key: "hideControls", value: function hideControls(doAnimation, forceHide) { var t = this; doAnimation = doAnimation === undefined || doAnimation; if ( forceHide !== true && (!t.controlsAreVisible || t.options.alwaysShowControls || t.keyboardAction || (t.media.paused && t.media.readyState === 4 && ((!t.options.hideVideoControlsOnLoad && t.media.currentTime <= 0) || (!t.options.hideVideoControlsOnPause && t.media.currentTime > 0))) || (t.isVideo && !t.options.hideVideoControlsOnLoad && !t.media.readyState) || t.media.ended) ) { return; } if (doAnimation) { (function () { dom.fadeOut(t.controls, 200, function () { dom.addClass( t.controls, t.options.classPrefix + "offscreen" ); t.controls.style.display = ""; var event = (0, _general.createEvent)( "controlshidden", t.container ); t.container.dispatchEvent(event); }); var controls = t.container.querySelectorAll( "." + t.options.classPrefix + "control" ); var _loop2 = function _loop2(i, total) { dom.fadeOut(controls[i], 200, function () { dom.addClass( controls[i], t.options.classPrefix + "offscreen" ); controls[i].style.display = ""; }); }; for (var i = 0, total = controls.length; i < total; i++) { _loop2(i, total); } })(); } else { dom.addClass(t.controls, t.options.classPrefix + "offscreen"); t.controls.style.display = ""; t.controls.style.opacity = 0; var controls = t.container.querySelectorAll( "." + t.options.classPrefix + "control" ); for (var i = 0, total = controls.length; i < total; i++) { dom.addClass( controls[i], t.options.classPrefix + "offscreen" ); controls[i].style.display = ""; } var event = (0, _general.createEvent)( "controlshidden", t.container ); t.container.dispatchEvent(event); } t.controlsAreVisible = false; }, }, { key: "startControlsTimer", value: function startControlsTimer(timeout) { var t = this; timeout = typeof timeout !== "undefined" ? timeout : t.options.controlsTimeoutDefault; t.killControlsTimer("start"); t.controlsTimer = setTimeout(function () { t.hideControls(); t.killControlsTimer("hide"); }, timeout); }, }, { key: "killControlsTimer", value: function killControlsTimer() { var t = this; if (t.controlsTimer !== null) { clearTimeout(t.controlsTimer); delete t.controlsTimer; t.controlsTimer = null; } }, }, { key: "disableControls", value: function disableControls() { var t = this; t.killControlsTimer(); t.controlsEnabled = true; t.hideControls(false, true); }, }, { key: "enableControls", value: function enableControls() { var t = this; t.controlsEnabled = true; t.showControls(false); }, }, { key: "_meReady", value: function _meReady(media, domNode) { var t = this, autoplayAttr = domNode.getAttribute("autoplay"), autoplay = !( autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === "false" ), isNative = media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName); if (t.controls) { t.enableControls(); } if ( t.container && t.container.querySelector( "." + t.options.classPrefix + "overlay-play" ) ) { t.container.querySelector( "." + t.options.classPrefix + "overlay-play" ).style.display = ""; } if (t.created) { return; } t.created = true; t.media = media; t.domNode = domNode; if ( !( _constants.IS_ANDROID && t.options.AndroidUseNativeControls ) && !(_constants.IS_IPAD && t.options.iPadUseNativeControls) && !(_constants.IS_IPHONE && t.options.iPhoneUseNativeControls) ) { if (!t.isVideo && !t.options.features.length) { if (autoplay && isNative) { t.play(); } if (t.options.success) { if (typeof t.options.success === "string") { _window2.default[t.options.success]( t.media, t.domNode, t ); } else { t.options.success(t.media, t.domNode, t); } } return; } t.buildposter(t, t.controls, t.layers, t.media); t.buildkeyboard(t, t.controls, t.layers, t.media); t.buildoverlays(t, t.controls, t.layers, t.media); t.findTracks(); t.featurePosition = {}; for ( var i = 0, total = t.options.features.length; i < total; i++ ) { var feature = t.options.features[i]; if (t["build" + feature]) { try { t["build" + feature](t, t.controls, t.layers, t.media); } catch (e) { console.error("error building " + feature, e); } } } var event = (0, _general.createEvent)( "controlsready", t.container ); t.container.dispatchEvent(event); t.setPlayerSize(t.width, t.height); t.setControlsSize(); if (t.isVideo) { t.clickToPlayPauseCallback = function () { if (t.options.clickToPlayPause) { var button = t.container.querySelector( "." + t.options.classPrefix + "overlay-button" ), pressed = button.getAttribute("aria-pressed"); if (t.media.paused && pressed) { t.pause(); } else if (t.media.paused) { t.play(); } else { t.pause(); } button.setAttribute("aria-pressed", !pressed); } }; t.createIframeLayer(); t.media.addEventListener( "click", t.clickToPlayPauseCallback ); if ( (_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls ) { t.node.addEventListener("touchstart", function () { if (t.controlsAreVisible) { t.hideControls(false); } else { if (t.controlsEnabled) { t.showControls(false); } } }); } else { t.container.addEventListener("mouseenter", function () { if (t.controlsEnabled) { if (!t.options.alwaysShowControls) { t.killControlsTimer("enter"); t.showControls(); t.startControlsTimer( t.options.controlsTimeoutMouseEnter ); } } }); t.container.addEventListener("mousemove", function () { if (t.controlsEnabled) { if (!t.controlsAreVisible) { t.showControls(); } if (!t.options.alwaysShowControls) { t.startControlsTimer( t.options.controlsTimeoutMouseEnter ); } } }); t.container.addEventListener("mouseleave", function () { if (t.controlsEnabled) { if ( !t.media.paused && !t.options.alwaysShowControls ) { t.startControlsTimer( t.options.controlsTimeoutMouseLeave ); } } }); } if (t.options.hideVideoControlsOnLoad) { t.hideControls(false); } if (autoplay && !t.options.alwaysShowControls) { t.hideControls(); } if (t.options.enableAutosize) { t.media.addEventListener("loadedmetadata", function (e) { var target = e !== undefined ? e.detail.target || e.target : t.media; if ( t.options.videoHeight <= 0 && !t.domNode.getAttribute("height") && target !== null && !isNaN(target.videoHeight) ) { t.setPlayerSize( target.videoWidth, target.videoHeight ); t.setControlsSize(); t.media.setSize( target.videoWidth, target.videoHeight ); } }); } } t.media.addEventListener("play", function () { t.hasFocus = true; for (var playerIndex in _mejs2.default.players) { if (_mejs2.default.players.hasOwnProperty(playerIndex)) { var p = _mejs2.default.players[playerIndex]; if ( p.id !== t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended ) { p.pause(); p.hasFocus = false; } } } }); t.media.addEventListener("ended", function () { if (t.options.autoRewind) { try { t.media.setCurrentTime(0); setTimeout(function () { var loadingElement = t.container.querySelector( "." + t.options.classPrefix + "overlay-loading" ); if (loadingElement && loadingElement.parentNode) { loadingElement.parentNode.style.display = "none"; } }, 20); } catch (exp) {} } if (typeof t.media.stop === "function") { t.media.stop(); } else { t.media.pause(); } if (t.setProgressRail) { t.setProgressRail(); } if (t.setCurrentRail) { t.setCurrentRail(); } if (t.options.loop) { t.play(); } else if ( !t.options.alwaysShowControls && t.controlsEnabled ) { t.showControls(); } }); t.media.addEventListener("loadedmetadata", function () { (0, _time.calculateTimeFormat)(t.duration, t.options, t.options.framesPerSecond || 25); if (t.updateDuration) { t.updateDuration(); } if (t.updateCurrent) { t.updateCurrent(); } if (!t.isFullScreen) { t.setPlayerSize(t.width, t.height); t.setControlsSize(); } }); var duration = null; t.media.addEventListener("timeupdate", function () { if ( !isNaN(t.media.getDuration()) && duration !== t.media.getDuration() ) { duration = t.media.getDuration(); (0, _time.calculateTimeFormat)( duration, t.options, t.options.framesPerSecond || 25 ); if (t.updateDuration) { t.updateDuration(); } if (t.updateCurrent) { t.updateCurrent(); } t.setControlsSize(); } }); t.container.addEventListener("click", function (e) { dom.addClass( e.currentTarget, t.options.classPrefix + "container-keyboard-inactive" ); }); t.container.addEventListener("focusin", function (e) { dom.removeClass( e.currentTarget, t.options.classPrefix + "container-keyboard-inactive" ); if (t.controlsEnabled && !t.options.alwaysShowControls) { t.showControls(false); } }); t.container.addEventListener("focusout", function (e) { setTimeout(function () { if (e.relatedTarget) { if ( t.keyboardAction && !e.relatedTarget.closest( "." + t.options.classPrefix + "container" ) ) { t.keyboardAction = false; if (t.isVideo && !t.options.alwaysShowControls) { t.hideControls(true); } } } }, 0); }); setTimeout(function () { t.setPlayerSize(t.width, t.height); t.setControlsSize(); }, 0); t.globalBind("resize", function () { if ( !( t.isFullScreen || (_constants.HAS_TRUE_NATIVE_FULLSCREEN && _document2.default.webkitIsFullScreen) ) ) { t.setPlayerSize(t.width, t.height); } t.setControlsSize(); }); } if (autoplay && isNative) { t.play(); } if (t.options.success) { if (typeof t.options.success === "string") { _window2.default[t.options.success](t.media, t.domNode, t); } else { t.options.success(t.media, t.domNode, t); } } }, }, { key: "_handleError", value: function _handleError(e) { var t = this; if (t.controls) { t.disableControls(); } var play = t.layers.querySelector( "." + t.options.classPrefix + "overlay-play" ); if (play) { play.style.display = "none"; } if (t.options.error) { t.options.error(e); } }, }, { key: "setPlayerSize", value: function setPlayerSize(width, height) { var t = this; if (!t.options.setDimensions) { return false; } if (typeof width !== "undefined") { t.width = width; } if (typeof height !== "undefined") { t.height = height; } switch (t.options.stretching) { case "fill": if (t.isVideo) { t.setFillMode(); } else { t.setDimensions(t.width, t.height); } break; case "responsive": t.setResponsiveMode(); break; case "none": t.setDimensions(t.width, t.height); break; default: if (t.hasFluidMode() === true) { t.setResponsiveMode(); } else { t.setDimensions(t.width, t.height); } break; } }, }, { key: "hasFluidMode", value: function hasFluidMode() { var t = this; return ( t.height.toString().indexOf("%") !== -1 || (t.node && t.node.style.maxWidth && t.node.style.maxWidth !== "none" && t.node.style.maxWidth !== t.width) || (t.node && t.node.currentStyle && t.node.currentStyle.maxWidth === "100%") ); }, }, { key: "setResponsiveMode", value: function setResponsiveMode() { var t = this, parent = (function () { var parentEl = void 0, el = t.container; while (el) { try { if ( _constants.IS_FIREFOX && el.tagName.toLowerCase() === "html" && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null ) { return _window2.default.frameElement; } else { parentEl = el.parentElement; } } catch (e) { parentEl = el.parentElement; } if (parentEl && dom.visible(parentEl)) { return parentEl; } el = parentEl; } return null; })(), parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null), nativeWidth = (function () { if (t.isVideo) { if (t.media.videoWidth && t.media.videoWidth > 0) { return t.media.videoWidth; } else if (t.node.getAttribute("width")) { return t.node.getAttribute("width"); } else { return t.options.defaultVideoWidth; } } else { return t.options.defaultAudioWidth; } })(), nativeHeight = (function () { if (t.isVideo) { if (t.media.videoHeight && t.media.videoHeight > 0) { return t.media.videoHeight; } else if (t.node.getAttribute("height")) { return t.node.getAttribute("height"); } else { return t.options.defaultVideoHeight; } } else { return t.options.defaultAudioHeight; } })(), aspectRatio = (function () { var ratio = 1; if (!t.isVideo) { return ratio; } if ( t.media.videoWidth && t.media.videoWidth > 0 && t.media.videoHeight && t.media.videoHeight > 0 ) { ratio = t.height >= t.width ? t.media.videoWidth / t.media.videoHeight : t.media.videoHeight / t.media.videoWidth; } else { ratio = t.initialAspectRatio; } if (isNaN(ratio) || ratio < 0.01 || ratio > 100) { ratio = 1; } return ratio; })(), parentHeight = parseFloat(parentStyles.height); var newHeight = void 0, parentWidth = parseFloat(parentStyles.width); if (t.isVideo) { if (t.height === "100%") { newHeight = parseFloat( (parentWidth * nativeHeight) / nativeWidth, 10 ); } else { newHeight = t.height >= t.width ? parseFloat(parentWidth / aspectRatio, 10) : parseFloat(parentWidth * aspectRatio, 10); } } else { newHeight = nativeHeight; } if (isNaN(newHeight)) { newHeight = parentHeight; } if ( t.container.parentNode.length > 0 && t.container.parentNode.tagName.toLowerCase() === "body" ) { parentWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth; newHeight = _window2.default.innerHeight || _document2.default.documentElement.clientHeight || _document2.default.body.clientHeight; } if (newHeight && parentWidth) { t.container.style.width = parentWidth + "px"; t.container.style.height = newHeight + "px"; t.node.style.width = "100%"; t.node.style.height = "100%"; if (t.isVideo && t.media.setSize) { t.media.setSize(parentWidth, newHeight); } var layerChildren = t.layers.children; for ( var i = 0, total = layerChildren.length; i < total; i++ ) { layerChildren[i].style.width = "100%"; layerChildren[i].style.height = "100%"; } } }, }, { key: "setFillMode", value: function setFillMode() { var t = this; var parent = void 0, isIframe = false; try { if (_window2.default.self !== _window2.default.top) { isIframe = true; parent = _window2.default.frameElement; } else { parent = t.outerContainer; } } catch (e) { parent = t.outerContainer; } var parentStyles = getComputedStyle(parent); if ( t.node.style.height !== "none" && t.node.style.height !== t.height ) { t.node.style.height = "auto"; } if ( t.node.style.maxWidth !== "none" && t.node.style.maxWidth !== t.width ) { t.node.style.maxWidth = "none"; } if ( t.node.style.maxHeight !== "none" && t.node.style.maxHeight !== t.height ) { t.node.style.maxHeight = "none"; } if (t.node.currentStyle) { if (t.node.currentStyle.height === "100%") { t.node.currentStyle.height = "auto"; } if (t.node.currentStyle.maxWidth === "100%") { t.node.currentStyle.maxWidth = "none"; } if (t.node.currentStyle.maxHeight === "100%") { t.node.currentStyle.maxHeight = "none"; } } if (!isIframe && !parseFloat(parentStyles.width)) { parent.style.width = t.media.offsetWidth + "px"; } if (!isIframe && !parseFloat(parentStyles.height)) { parent.style.height = t.media.offsetHeight + "px"; } parentStyles = getComputedStyle(parent); var parentWidth = parseFloat(parentStyles.width), parentHeight = parseFloat(parentStyles.height); t.setDimensions("100%", "100%"); var poster = t.container.querySelector( t.options.classPrefix + "poster img" ); if (poster) { poster.style.display = ""; } var targetElement = t.container.querySelectorAll( "object, embed, iframe, video" ), initHeight = t.height, initWidth = t.width, scaleX1 = parentWidth, scaleY1 = (initHeight * parentWidth) / initWidth, scaleX2 = (initWidth * parentHeight) / initHeight, scaleY2 = parentHeight, bScaleOnWidth = scaleX2 > parentWidth === false, finalWidth = bScaleOnWidth ? Math.floor(scaleX1) : Math.floor(scaleX2), finalHeight = bScaleOnWidth ? Math.floor(scaleY1) : Math.floor(scaleY2), width = bScaleOnWidth ? parentWidth + "px" : finalWidth + "px", height = bScaleOnWidth ? finalHeight + "px" : parentHeight + "px"; for (var i = 0, total = targetElement.length; i < total; i++) { targetElement[i].style.height = height; targetElement[i].style.width = width; if (t.media.setSize) { t.media.setSize(width, height); } targetElement[i].style.marginLeft = Math.floor((parentWidth - finalWidth) / 2) + "px"; targetElement[i].style.marginTop = 0; } }, }, { key: "setDimensions", value: function setDimensions(width, height) { var t = this; width = (0, _general.isString)(width) && width.indexOf("%") > -1 ? width : parseFloat(width) + "px"; height = (0, _general.isString)(height) && height.indexOf("%") > -1 ? height : parseFloat(height) + "px"; t.container.style.width = width; t.container.style.height = height; var layers = t.layers.children; for (var i = 0, total = layers.length; i < total; i++) { layers[i].style.width = width; layers[i].style.height = height; } }, }, { key: "setControlsSize", value: function setControlsSize() { var t = this; if (!dom.visible(t.container)) { return; } if (t.rail && dom.visible(t.rail)) { var totalStyles = t.total ? getComputedStyle(t.total, null) : null, totalMargin = totalStyles ? parseFloat(totalStyles.marginLeft) + parseFloat(totalStyles.marginRight) : 0, railStyles = getComputedStyle(t.rail), railMargin = parseFloat(railStyles.marginLeft) + parseFloat(railStyles.marginRight); var siblingsWidth = 0; var siblings = dom.siblings(t.rail, function (el) { return el !== t.rail; }), total = siblings.length; for (var i = 0; i < total; i++) { siblingsWidth += siblings[i].offsetWidth; } siblingsWidth += totalMargin + (totalMargin === 0 ? railMargin * 2 : railMargin) + 1; t.container.style.minWidth = siblingsWidth + "px"; var controlsWidth = parseFloat(t.controls.offsetWidth); t.rail.style.width = (siblingsWidth > controlsWidth ? 0 : controlsWidth - siblingsWidth) + "px"; var event = (0, _general.createEvent)( "controlsresize", t.container ); t.container.dispatchEvent(event); } else { var children = t.controls.children; var minWidth = 0; for ( var _i = 0, _total = children.length; _i < _total; _i++ ) { minWidth += children[_i].offsetWidth; } t.container.style.minWidth = minWidth + "px"; } }, }, { key: "addControlElement", value: function addControlElement(element, key) { var t = this; if (t.featurePosition[key] !== undefined) { var child = t.controls.children[t.featurePosition[key] - 1]; child.parentNode.insertBefore(element, child.nextSibling); } else { t.controls.appendChild(element); var children = t.controls.children; for (var i = 0, total = children.length; i < total; i++) { if (element == children[i]) { t.featurePosition[key] = i; break; } } } }, }, { key: "createIframeLayer", value: function createIframeLayer() { var t = this; if ( t.isVideo && t.media.rendererName !== null && t.media.rendererName.indexOf("iframe") > -1 && !_document2.default.getElementById( t.media.id + "-iframe-overlay" ) ) { var layer = _document2.default.createElement("div"), target = _document2.default.getElementById( t.media.id + "_" + t.media.rendererName ); layer.id = t.media.id + "-iframe-overlay"; layer.className = t.options.classPrefix + "iframe-overlay"; layer.addEventListener("click", function (e) { if (t.options.clickToPlayPause) { if (t.media.paused) { t.media.play(); } else { t.media.pause(); } e.preventDefault(); e.stopPropagation(); } }); target.parentNode.insertBefore(layer, target); } }, }, { key: "resetSize", value: function resetSize() { var t = this; setTimeout(function () { t.setPlayerSize(t.width, t.height); t.setControlsSize(); }, 50); }, }, { key: "setPoster", value: function setPoster(url) { var t = this, posterDiv = t.container.querySelector( "." + t.options.classPrefix + "poster" ); var posterImg = posterDiv.querySelector("img"); if (!posterImg) { posterImg = _document2.default.createElement("img"); posterImg.className = t.options.classPrefix + "poster-img"; posterImg.width = "100%"; posterImg.height = "100%"; posterDiv.appendChild(posterImg); } posterImg.setAttribute("src", url); posterDiv.style.backgroundImage = 'url("' + url + '")'; }, }, { key: "changeSkin", value: function changeSkin(className) { var t = this; t.container.className = t.options.classPrefix + "container " + className; t.setPlayerSize(t.width, t.height); t.setControlsSize(); }, }, { key: "globalBind", value: function globalBind(events, callback) { var t = this, doc = t.node ? t.node.ownerDocument : _document2.default; events = (0, _general.splitEvents)(events, t.id); if (events.d) { var eventList = events.d.split(" "); for (var i = 0, total = eventList.length; i < total; i++) { eventList[i].split(".").reduce(function (part, e) { doc.addEventListener(e, callback, false); return e; }, ""); } } if (events.w) { var _eventList = events.w.split(" "); for ( var _i2 = 0, _total2 = _eventList.length; _i2 < _total2; _i2++ ) { _eventList[_i2].split(".").reduce(function (part, e) { _window2.default.addEventListener(e, callback, false); return e; }, ""); } } }, }, { key: "globalUnbind", value: function globalUnbind(events, callback) { var t = this, doc = t.node ? t.node.ownerDocument : _document2.default; events = (0, _general.splitEvents)(events, t.id); if (events.d) { var eventList = events.d.split(" "); for (var i = 0, total = eventList.length; i < total; i++) { eventList[i].split(".").reduce(function (part, e) { doc.removeEventListener(e, callback, false); return e; }, ""); } } if (events.w) { var _eventList2 = events.d.split(" "); for ( var _i3 = 0, _total3 = _eventList2.length; _i3 < _total3; _i3++ ) { _eventList2[_i3].split(".").reduce(function (part, e) { _window2.default.removeEventListener(e, callback, false); return e; }, ""); } } }, }, { key: "buildposter", value: function buildposter(player, controls, layers, media) { var t = this, poster = _document2.default.createElement("div"); poster.className = t.options.classPrefix + "poster " + t.options.classPrefix + "layer"; layers.appendChild(poster); var posterUrl = player.media.getAttribute("poster"); if (player.options.poster !== "") { posterUrl = player.options.poster; } if (posterUrl) { t.setPoster(posterUrl); } else { poster.style.display = "none"; } media.addEventListener("play", function () { poster.style.display = "none"; }); media.addEventListener("playing", function () { poster.style.display = "none"; }); if ( player.options.showPosterWhenEnded && player.options.autoRewind ) { media.addEventListener("ended", function () { poster.style.display = ""; }); } media.addEventListener("error", function () { poster.style.display = "none"; }); if (player.options.showPosterWhenPaused) { media.addEventListener("pause", function () { if (!media.ended) { poster.style.display = ""; } }); } }, }, { key: "buildoverlays", value: function buildoverlays(player, controls, layers, media) { if (!player.isVideo) { return; } var t = this, loading = _document2.default.createElement("div"), error = _document2.default.createElement("div"), bigPlay = _document2.default.createElement("div"), buffer = controls.querySelector( "." + t.options.classPrefix + "time-buffering" ); loading.style.display = "none"; loading.className = t.options.classPrefix + "overlay " + t.options.classPrefix + "layer"; loading.innerHTML = '
    ' + ('') + "
    "; layers.appendChild(loading); error.style.display = "none"; error.className = t.options.classPrefix + "overlay " + t.options.classPrefix + "layer"; error.innerHTML = '
    '; layers.appendChild(error); bigPlay.className = t.options.classPrefix + "overlay " + t.options.classPrefix + "layer " + t.options.classPrefix + "overlay-play"; bigPlay.innerHTML = '
    '); bigPlay.addEventListener("click", function () { if (t.options.clickToPlayPause) { var button = t.container.querySelector( "." + t.options.classPrefix + "overlay-button" ), pressed = button.getAttribute("aria-pressed"); if (media.paused) { media.play(); } else { media.pause(); } button.setAttribute("aria-pressed", !!pressed); } }); bigPlay.addEventListener("keydown", function (e) { var keyPressed = e.keyCode || e.which || 0; if ( keyPressed === 13 || (_constants.IS_FIREFOX && keyPressed === 32) ) { var event = (0, _general.createEvent)("click", bigPlay); bigPlay.dispatchEvent(event); return false; } }); layers.appendChild(bigPlay); if ( t.media.rendererName !== null && ((/(youtube|facebook)/i.test(t.media.rendererName) && !( player.media.originalNode.getAttribute("poster") || player.options.poster )) || _constants.IS_STOCK_ANDROID) ) { bigPlay.style.display = "none"; } media.addEventListener("play", function () { bigPlay.style.display = "none"; loading.style.display = "none"; if (buffer) { buffer.style.display = "none"; } error.style.display = "none"; }); media.addEventListener("playing", function () { bigPlay.style.display = "none"; loading.style.display = "none"; if (buffer) { buffer.style.display = "none"; } error.style.display = "none"; }); media.addEventListener("seeking", function () { bigPlay.style.display = "none"; loading.style.display = ""; if (buffer) { buffer.style.display = ""; } }); media.addEventListener("seeked", function () { bigPlay.style.display = media.paused && !_constants.IS_STOCK_ANDROID ? "" : "none"; loading.style.display = "none"; if (buffer) { buffer.style.display = ""; } }); media.addEventListener("pause", function () { loading.style.display = "none"; if (!_constants.IS_STOCK_ANDROID) { bigPlay.style.display = ""; } if (buffer) { buffer.style.display = "none"; } }); media.addEventListener("waiting", function () { loading.style.display = ""; if (buffer) { buffer.style.display = ""; } }); media.addEventListener("loadeddata", function () { loading.style.display = ""; if (buffer) { buffer.style.display = ""; } if (_constants.IS_ANDROID) { media.canplayTimeout = setTimeout(function () { if (_document2.default.createEvent) { var evt = _document2.default.createEvent("HTMLEvents"); evt.initEvent("canplay", true, true); return media.dispatchEvent(evt); } }, 300); } }); media.addEventListener("canplay", function () { loading.style.display = "none"; if (buffer) { buffer.style.display = "none"; } clearTimeout(media.canplayTimeout); }); media.addEventListener("error", function (e) { t._handleError(e); loading.style.display = "none"; bigPlay.style.display = "none"; if (buffer) { buffer.style.display = "none"; } if (e.message) { error.style.display = "block"; error.querySelector( "." + t.options.classPrefix + "overlay-error" ).innerHTML = e.message; } }); media.addEventListener("keydown", function (e) { t.onkeydown(player, media, e); }); }, }, { key: "buildkeyboard", value: function buildkeyboard(player, controls, layers, media) { var t = this; t.container.addEventListener("keydown", function () { t.keyboardAction = true; }); t.globalBind("keydown", function (event) { var container = _document2.default.activeElement.closest( "." + t.options.classPrefix + "container" ), target = t.media.closest( "." + t.options.classPrefix + "container" ); t.hasFocus = !!( container && target && container.id === target.id ); return t.onkeydown(player, media, event); }); t.globalBind("click", function (event) { t.hasFocus = !!event.target.closest( "." + t.options.classPrefix + "container" ); }); }, }, { key: "onkeydown", value: function onkeydown(player, media, e) { if (player.hasFocus && player.options.enableKeyboard) { for ( var i = 0, total = player.options.keyActions.length; i < total; i++ ) { var keyAction = player.options.keyActions[i]; for (var j = 0, jl = keyAction.keys.length; j < jl; j++) { if (e.keyCode === keyAction.keys[j]) { keyAction.action(player, media, e.keyCode, e); e.preventDefault(); e.stopPropagation(); } } } } return true; }, }, { key: "play", value: function play() { var t = this; if (t.media.getCurrentTime() <= 0) { t.load(); } t.media.play(); }, }, { key: "pause", value: function pause() { try { this.media.pause(); } catch (e) {} }, }, { key: "load", value: function load() { var t = this; if (!t.isLoaded) { t.media.load(); } t.isLoaded = true; }, }, { key: "setMuted", value: function setMuted(muted) { this.media.setMuted(muted); }, }, { key: "setCurrentTime", value: function setCurrentTime(time) { this.media.setCurrentTime(time); }, }, { key: "getCurrentTime", value: function getCurrentTime() { return this.media.currentTime; }, }, { key: "getDuration", value: function getDuration() { return this.media.duration; }, }, { key: "setVolume", value: function setVolume(volume) { this.media.setVolume(volume); }, }, { key: "getVolume", value: function getVolume() { return this.media.volume; }, }, { key: "setSrc", value: function setSrc(src) { var t = this, layer = _document2.default.getElementById( t.media.id + "-iframe-overlay" ); if (layer) { layer.remove(); } t.media.setSrc(src); t.createIframeLayer(); }, }, { key: "remove", value: function remove() { var t = this, rendererName = t.media.rendererName; if (!t.media.paused) { t.media.pause(); } var src = t.media.getSrc(); t.media.setSrc(""); for (var featureIndex in t.options.features) { var feature = t.options.features[featureIndex]; if (t["clean" + feature]) { try { t["clean" + feature](t); } catch (e) { console.error("error cleaning " + feature, e); } } } var nativeWidth = t.node.getAttribute("width"), nativeHeight = t.node.getAttribute("height"); if (nativeWidth) { if (nativeWidth.indexOf("%") === -1) { nativeWidth = nativeWidth + "px"; } } else { nativeWidth = "auto"; } if (nativeHeight) { if (nativeHeight.indexOf("%") === -1) { nativeHeight = nativeHeight + "px"; } } else { nativeHeight = "auto"; } t.node.style.width = nativeWidth; t.node.style.height = nativeHeight; if (!t.isDynamic) { (function () { t.node.setAttribute("controls", true); t.node.setAttribute( "id", t.node .getAttribute("id") .replace("_" + rendererName, "") .replace("_from_mejs", "") ); delete t.node.autoplay; if ( t.media.canPlayType((0, _media.getTypeFromFile)(src)) !== "" ) { t.node.setAttribute("src", src); } if (~rendererName.indexOf("iframe")) { var layer = _document2.default.getElementById( t.media.id + "-iframe-overlay" ); layer.remove(); } var node = t.node.cloneNode(); node.style.display = ""; t.container.parentNode.insertBefore(node, t.container); t.node.remove(); if (t.mediaFiles) { for ( var i = 0, total = t.mediaFiles.length; i < total; i++ ) { var source = _document2.default.createElement("source"); source.setAttribute("src", t.mediaFiles[i].src); source.setAttribute("type", t.mediaFiles[i].type); node.appendChild(source); } } if (t.trackFiles) { var _loop3 = function _loop3(_i4, _total4) { var track = t.trackFiles[_i4]; var newTrack = _document2.default.createElement("track"); newTrack.kind = track.kind; newTrack.label = track.label; newTrack.srclang = track.srclang; newTrack.src = track.src; node.appendChild(newTrack); newTrack.addEventListener("load", function () { this.mode = "showing"; node.textTracks[_i4].mode = "showing"; }); }; for ( var _i4 = 0, _total4 = t.trackFiles.length; _i4 < _total4; _i4++ ) { _loop3(_i4, _total4); } } delete t.node; delete t.mediaFiles; delete t.trackFiles; })(); } else { t.container.parentNode.insertBefore(t.node, t.container); } if (typeof t.media.destroy === "function") { t.media.destroy(); } delete _mejs2.default.players[t.id]; if (_typeof(t.container) === "object") { var offscreen = t.container.parentNode.querySelector( "." + t.options.classPrefix + "offscreen" ); offscreen.remove(); t.container.remove(); } t.globalUnbind(); delete t.media.player; }, }, ]); return MediaElementPlayer; })(); _window2.default.MediaElementPlayer = MediaElementPlayer; exports.default = MediaElementPlayer; (function ($) { if (typeof $ !== "undefined") { $.fn.mediaelementplayer = function (options) { if (options === false) { this.each(function () { var player = $(this).data("mediaelementplayer"); if (player) { player.remove(); } $(this).removeData("mediaelementplayer"); }); } else { this.each(function () { $(this).data( "mediaelementplayer", new MediaElementPlayer(this, options) ); }); } return this; }; $(_document2.default).ready(function () { $("." + config.classPrefix + "player").mediaelementplayer(); }); } })(_mejs2.default.$); }, { 2: 2, 24: 24, 25: 25, 26: 26, 27: 27, 29: 29, 3: 3, 5: 5, 6: 6, 7: 7 }, ], 18: [ function (_dereq_, module, exports) { "use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(26); var _media = _dereq_(27); var _constants = _dereq_(24); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NativeDash = { promise: null, load: function load(settings) { if (typeof dashjs !== "undefined") { NativeDash.promise = new Promise(function () { NativeDash._createPlayer(settings); }); } else if (!NativeDash.promise) { settings.options.path = typeof settings.options.path === "string" ? settings.options.path : "https://cdn.dashjs.org/latest/dash.all.min.js"; NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path); NativeDash.promise.then(function () { NativeDash._createPlayer(settings); }); } return NativeDash.promise; }, _createPlayer: function _createPlayer(settings) { var player = dashjs.MediaPlayer().create(); _window2.default["__ready__" + settings.id](player); }, }; var DashNativeRenderer = { name: "native_dash", options: { prefix: "native_dash", dash: { path: "https://cdn.dashjs.org/latest/dash.all.min.js", debug: false, drm: {}, robustnessLevel: "", }, }, canPlayType: function canPlayType(type) { return ( _constants.HAS_MSE && ["application/dash+xml"].indexOf(type.toLowerCase()) > -1 ); }, create: function create(mediaElement, options, mediaFiles) { var originalNode = mediaElement.originalNode, id = mediaElement.id + "_" + options.prefix, autoplay = originalNode.autoplay; var node = null, dashPlayer = null; node = originalNode.cloneNode(true); options = Object.assign(options, mediaElement.options); var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); node["get" + capName] = function () { return dashPlayer !== null ? node[propName] : null; }; node["set" + capName] = function (value) { if ( _mejs2.default.html5media.readOnlyProperties.indexOf( propName ) === -1 ) { if (propName === "src") { if (typeof value === "string") { node[propName] = value; if (dashPlayer !== null) { dashPlayer.attachSource(value); if (autoplay) { dashPlayer.play(); } } } else if ( value && (typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" && value.src ) { node[propName] = value.src; if (dashPlayer !== null) { if ( value && (typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" && _typeof(value.drm) === "object" ) { dashPlayer.setProtectionData(value.drm); if ( (0, _general.isString)( options.dash.robustnessLevel ) && options.dash.robustnessLevel ) { dashPlayer .getProtectionController() .setRobustnessLevel( options.dash.robustnessLevel ); } } dashPlayer.attachSource(value.src); if (autoplay) { dashPlayer.play(); } } } } else { node[propName] = value; } } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } _window2.default["__ready__" + id] = function (_dashPlayer) { mediaElement.dashPlayer = dashPlayer = _dashPlayer; var events = _mejs2.default.html5media.events.concat([ "click", "mouseover", "mouseout", ]), dashEvents = dashjs.MediaPlayer.events, assignEvents = function assignEvents(eventName) { if (eventName === "loadedmetadata") { dashPlayer .getDebug() .setLogToBrowserConsole(options.dash.debug); dashPlayer.initialize(); dashPlayer.setScheduleWhilePaused(false); dashPlayer.setFastSwitchEnabled(true); dashPlayer.attachView(node); dashPlayer.setAutoPlay(false); if ( _typeof(options.dash.drm) === "object" && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm) ) { dashPlayer.setProtectionData(options.dash.drm); if ( (0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel ) { dashPlayer .getProtectionController() .setRobustnessLevel(options.dash.robustnessLevel); } } dashPlayer.attachSource(node.getSrc()); } node.addEventListener(eventName, function (e) { var event = (0, _general.createEvent)(e.type, mediaElement); mediaElement.dispatchEvent(event); }); }; for (var _i = 0, _total = events.length; _i < _total; _i++) { assignEvents(events[_i]); } var assignMdashEvents = function assignMdashEvents(e) { var event = (0, _general.createEvent)(e.type, node); event.data = e; mediaElement.dispatchEvent(event); if (e.type.toLowerCase() === "error") { console.error(e); } }; for (var eventType in dashEvents) { if (dashEvents.hasOwnProperty(eventType)) { dashPlayer.on(dashEvents[eventType], assignMdashEvents); } } }; if (mediaFiles && mediaFiles.length > 0) { for ( var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++ ) { if ( _renderer.renderer.renderers[options.prefix].canPlayType( mediaFiles[_i2].type ) ) { node.setAttribute("src", mediaFiles[_i2].src); if (typeof mediaFiles[_i2].drm !== "undefined") { options.dash.drm = mediaFiles[_i2].drm; } break; } } } node.setAttribute("id", id); originalNode.parentNode.insertBefore(node, originalNode); originalNode.autoplay = false; originalNode.style.display = "none"; node.setSize = function (width, height) { node.style.width = width + "px"; node.style.height = height + "px"; return node; }; node.hide = function () { node.pause(); node.style.display = "none"; return node; }; node.show = function () { node.style.display = ""; return node; }; var event = (0, _general.createEvent)("rendererready", node); mediaElement.dispatchEvent(event); mediaElement.promises.push( NativeDash.load({ options: options.dash, id: id }) ); return node; }, }; _media.typeChecks.push(function (url) { return ~url.toLowerCase().indexOf(".mpd") ? "application/dash+xml" : null; }); _renderer.renderer.add(DashNativeRenderer); }, { 24: 24, 25: 25, 26: 26, 27: 27, 3: 3, 7: 7, 8: 8 }, ], 19: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PluginDetector = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _renderer = _dereq_(8); var _general = _dereq_(26); var _constants = _dereq_(24); var _media = _dereq_(27); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PluginDetector = (exports.PluginDetector = { plugins: [], hasPluginVersion: function hasPluginVersion(plugin, v) { var pv = PluginDetector.plugins[plugin]; v[1] = v[1] || 0; v[2] = v[2] || 0; return ( pv[0] > v[0] || (pv[0] === v[0] && pv[1] > v[1]) || (pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2]) ); }, addPlugin: function addPlugin( p, pluginName, mimeType, activeX, axDetect ) { PluginDetector.plugins[p] = PluginDetector.detectPlugin( pluginName, mimeType, activeX, axDetect ); }, detectPlugin: function detectPlugin( pluginName, mimeType, activeX, axDetect ) { var version = [0, 0, 0], description = void 0, ax = void 0; if ( _constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === "object" ) { description = _constants.NAV.plugins[pluginName].description; if ( description && !( typeof _constants.NAV.mimeTypes !== "undefined" && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin ) ) { version = description .replace(pluginName, "") .replace(/^\s+/, "") .replace(/\sr/gi, ".") .split("."); for (var i = 0, total = version.length; i < total; i++) { version[i] = parseInt(version[i].match(/\d+/), 10); } } } else if (_window2.default.ActiveXObject !== undefined) { try { ax = new ActiveXObject(activeX); if (ax) { version = axDetect(ax); } } catch (e) {} } return version; }, }); PluginDetector.addPlugin( "flash", "Shockwave Flash", "application/x-shockwave-flash", "ShockwaveFlash.ShockwaveFlash", function (ax) { var version = [], d = ax.GetVariable("$version"); if (d) { d = d.split(" ")[1].split(","); version = [ parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10), ]; } return version; } ); var FlashMediaElementRenderer = { create: function create(mediaElement, options, mediaFiles) { var flash = {}; flash.options = options; flash.id = mediaElement.id + "_" + flash.options.prefix; flash.mediaElement = mediaElement; flash.flashState = {}; flash.flashApi = null; flash.flashApiStack = []; var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { flash.flashState[propName] = null; var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); flash["get" + capName] = function () { if (flash.flashApi !== null) { if ( typeof flash.flashApi["get_" + propName] === "function" ) { var value = flash.flashApi["get_" + propName](); if (propName === "buffered") { return { start: function start() { return 0; }, end: function end() { return value; }, length: 1, }; } return value; } else { return null; } } else { return null; } }; flash["set" + capName] = function (value) { if (propName === "src") { value = (0, _media.absolutizeUrl)(value); } if ( flash.flashApi !== null && flash.flashApi["set_" + propName] !== undefined ) { try { flash.flashApi["set_" + propName](value); } catch (e) {} } else { flash.flashApiStack.push({ type: "set", propName: propName, value: value, }); } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } var methods = _mejs2.default.html5media.methods, assignMethods = function assignMethods(methodName) { flash[methodName] = function () { if (flash.flashApi !== null) { if (flash.flashApi["fire_" + methodName]) { try { flash.flashApi["fire_" + methodName](); } catch (e) {} } else { } } else { flash.flashApiStack.push({ type: "call", methodName: methodName, }); } }; }; methods.push("stop"); for (var _i = 0, _total = methods.length; _i < _total; _i++) { assignMethods(methods[_i]); } var initEvents = ["rendererready"]; for ( var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++ ) { var event = (0, _general.createEvent)(initEvents[_i2], flash); mediaElement.dispatchEvent(event); } _window2.default["__ready__" + flash.id] = function () { flash.flashReady = true; flash.flashApi = _document2.default.getElementById( "__" + flash.id ); if (flash.flashApiStack.length) { for ( var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++ ) { var stackItem = flash.flashApiStack[_i3]; if (stackItem.type === "set") { var propName = stackItem.propName, capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); flash["set" + capName](stackItem.value); } else if (stackItem.type === "call") { flash[stackItem.methodName](); } } } }; _window2.default["__event__" + flash.id] = function ( eventName, message ) { var event = (0, _general.createEvent)(eventName, flash); event.message = message || ""; flash.mediaElement.dispatchEvent(event); }; flash.flashWrapper = _document2.default.createElement("div"); if ( ["always", "sameDomain"].indexOf( flash.options.shimScriptAccess ) === -1 ) { flash.options.shimScriptAccess = "sameDomain"; } var autoplay = mediaElement.originalNode.autoplay, flashVars = [ "uid=" + flash.id, "autoplay=" + autoplay, "allowScriptAccess=" + flash.options.shimScriptAccess, ], isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === "video", flashHeight = isVideo ? mediaElement.originalNode.height : 1, flashWidth = isVideo ? mediaElement.originalNode.width : 1; if (mediaElement.originalNode.getAttribute("src")) { flashVars.push( "src=" + mediaElement.originalNode.getAttribute("src") ); } if (flash.options.enablePseudoStreaming === true) { flashVars.push( "pseudostreamstart=" + flash.options.pseudoStreamingStartQueryParam ); flashVars.push( "pseudostreamtype=" + flash.options.pseudoStreamingType ); } mediaElement.appendChild(flash.flashWrapper); if (mediaElement.originalNode !== null) { mediaElement.originalNode.style.display = "none"; } var settings = []; if (_constants.IS_IE) { var specialIEContainer = _document2.default.createElement("div"); flash.flashWrapper.appendChild(specialIEContainer); settings = [ 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"', ]; if (!isVideo) { settings.push( 'style="clip: rect(0 0 0 0); position: absolute;"' ); } specialIEContainer.outerHTML = "" + ('') + ('') + '' + '' + '' + ('') + '' + ("
    " + _i18n2.default.t("mejs.install-flash") + "
    ") + "
    "; } else { settings = [ 'id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join("&") + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"', ]; if (!isVideo) { settings.push( 'style="clip: rect(0 0 0 0); position: absolute;"' ); } flash.flashWrapper.innerHTML = ""; } flash.flashNode = flash.flashWrapper.lastChild; flash.hide = function () { if (isVideo) { flash.flashNode.style.display = "none"; } }; flash.show = function () { if (isVideo) { flash.flashNode.style.display = ""; } }; flash.setSize = function (width, height) { flash.flashNode.style.width = width + "px"; flash.flashNode.style.height = height + "px"; if ( flash.flashApi !== null && typeof flash.flashApi.fire_setSize === "function" ) { flash.flashApi.fire_setSize(width, height); } }; flash.destroy = function () { flash.flashNode.remove(); }; if (mediaFiles && mediaFiles.length > 0) { for ( var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++ ) { if ( _renderer.renderer.renderers[options.prefix].canPlayType( mediaFiles[_i4].type ) ) { flash.setSrc(mediaFiles[_i4].src); break; } } } return flash; }, }; var hasFlash = PluginDetector.hasPluginVersion("flash", [10, 0, 0]); if (hasFlash) { _media.typeChecks.push(function (url) { url = url.toLowerCase(); if (url.startsWith("rtmp")) { if (~url.indexOf(".mp3")) { return "audio/rtmp"; } else { return "video/rtmp"; } } else if (/\.og(a|g)/i.test(url)) { return "audio/ogg"; } else if (~url.indexOf(".m3u8")) { return "application/x-mpegURL"; } else if (~url.indexOf(".mpd")) { return "application/dash+xml"; } else if (~url.indexOf(".flv")) { return "video/flv"; } else { return null; } }); var FlashMediaElementVideoRenderer = { name: "flash_video", options: { prefix: "flash_video", filename: "mediaelement-flash-video.swf", enablePseudoStreaming: false, pseudoStreamingStartQueryParam: "start", pseudoStreamingType: "byte", }, canPlayType: function canPlayType(type) { return ~[ "video/mp4", "video/rtmp", "audio/rtmp", "rtmp/mp4", "audio/mp4", "video/flv", "video/x-flv", ].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create, }; _renderer.renderer.add(FlashMediaElementVideoRenderer); var FlashMediaElementHlsVideoRenderer = { name: "flash_hls", options: { prefix: "flash_hls", filename: "mediaelement-flash-video-hls.swf", }, canPlayType: function canPlayType(type) { return ~[ "application/x-mpegurl", "vnd.apple.mpegurl", "audio/mpegurl", "audio/hls", "video/hls", ].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create, }; _renderer.renderer.add(FlashMediaElementHlsVideoRenderer); var FlashMediaElementMdashVideoRenderer = { name: "flash_dash", options: { prefix: "flash_dash", filename: "mediaelement-flash-video-mdash.swf", }, canPlayType: function canPlayType(type) { return ~["application/dash+xml"].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create, }; _renderer.renderer.add(FlashMediaElementMdashVideoRenderer); var FlashMediaElementAudioRenderer = { name: "flash_audio", options: { prefix: "flash_audio", filename: "mediaelement-flash-audio.swf", }, canPlayType: function canPlayType(type) { return ~["audio/mp3"].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create, }; _renderer.renderer.add(FlashMediaElementAudioRenderer); var FlashMediaElementAudioOggRenderer = { name: "flash_audio_ogg", options: { prefix: "flash_audio_ogg", filename: "mediaelement-flash-audio-ogg.swf", }, canPlayType: function canPlayType(type) { return ~["audio/ogg", "audio/oga", "audio/ogv"].indexOf( type.toLowerCase() ); }, create: FlashMediaElementRenderer.create, }; _renderer.renderer.add(FlashMediaElementAudioOggRenderer); } }, { 2: 2, 24: 24, 26: 26, 27: 27, 3: 3, 5: 5, 7: 7, 8: 8 }, ], 20: [ function (_dereq_, module, exports) { "use strict"; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(26); var _constants = _dereq_(24); var _media = _dereq_(27); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NativeFlv = { promise: null, load: function load(settings) { if (typeof flvjs !== "undefined") { NativeFlv.promise = new Promise(function () { NativeFlv._createPlayer(settings); }); } else if (!NativeFlv.promise) { settings.options.path = typeof settings.options.path === "string" ? settings.options.path : "https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.2.0/flv.min.js"; NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path); NativeFlv.promise.then(function () { NativeFlv._createPlayer(settings); }); } return NativeFlv.promise; }, _createPlayer: function _createPlayer(settings) { flvjs.LoggingControl.enableDebug = settings.options.debug; flvjs.LoggingControl.enableVerbose = settings.options.debug; var player = flvjs.createPlayer(settings.options); _window2.default["__ready__" + settings.id](player); return player; }, }; var FlvNativeRenderer = { name: "native_flv", options: { prefix: "native_flv", flv: { path: "https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.2.0/flv.min.js", cors: true, debug: false, }, }, canPlayType: function canPlayType(type) { return ( _constants.HAS_MSE && ["video/x-flv", "video/flv"].indexOf(type.toLowerCase()) > -1 ); }, create: function create(mediaElement, options, mediaFiles) { var originalNode = mediaElement.originalNode, id = mediaElement.id + "_" + options.prefix; var node = null, flvPlayer = null; node = originalNode.cloneNode(true); options = Object.assign(options, mediaElement.options); var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); node["get" + capName] = function () { return flvPlayer !== null ? node[propName] : null; }; node["set" + capName] = function (value) { if ( _mejs2.default.html5media.readOnlyProperties.indexOf( propName ) === -1 ) { node[propName] = value; if (flvPlayer !== null) { if (propName === "src") { var _flvOptions = {}; _flvOptions.type = "flv"; _flvOptions.url = value; _flvOptions.cors = options.flv.cors; _flvOptions.debug = options.flv.debug; _flvOptions.path = options.flv.path; flvPlayer.destroy(); flvPlayer = NativeFlv._createPlayer({ options: _flvOptions, id: id, }); flvPlayer.attachMediaElement(node); flvPlayer.load(); } } } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } _window2.default["__ready__" + id] = function (_flvPlayer) { mediaElement.flvPlayer = flvPlayer = _flvPlayer; var events = _mejs2.default.html5media.events.concat([ "click", "mouseover", "mouseout", ]), assignEvents = function assignEvents(eventName) { if (eventName === "loadedmetadata") { flvPlayer.unload(); flvPlayer.detachMediaElement(); flvPlayer.attachMediaElement(node); flvPlayer.load(); } node.addEventListener(eventName, function (e) { var event = (0, _general.createEvent)(e.type, mediaElement); mediaElement.dispatchEvent(event); }); }; for (var _i = 0, _total = events.length; _i < _total; _i++) { assignEvents(events[_i]); } }; if (mediaFiles && mediaFiles.length > 0) { for ( var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++ ) { if ( _renderer.renderer.renderers[options.prefix].canPlayType( mediaFiles[_i2].type ) ) { node.setAttribute("src", mediaFiles[_i2].src); break; } } } node.setAttribute("id", id); originalNode.parentNode.insertBefore(node, originalNode); originalNode.autoplay = false; originalNode.style.display = "none"; var flvOptions = {}; flvOptions.type = "flv"; flvOptions.url = node.src; flvOptions.cors = options.flv.cors; flvOptions.debug = options.flv.debug; flvOptions.path = options.flv.path; node.setSize = function (width, height) { node.style.width = width + "px"; node.style.height = height + "px"; return node; }; node.hide = function () { if (flvPlayer !== null) { flvPlayer.pause(); } node.style.display = "none"; return node; }; node.show = function () { node.style.display = ""; return node; }; node.destroy = function () { if (flvPlayer !== null) { flvPlayer.destroy(); } }; var event = (0, _general.createEvent)("rendererready", node); mediaElement.dispatchEvent(event); mediaElement.promises.push( NativeFlv.load({ options: flvOptions, id: id }) ); return node; }, }; _media.typeChecks.push(function (url) { return ~url.toLowerCase().indexOf(".flv") ? "video/flv" : null; }); _renderer.renderer.add(FlvNativeRenderer); }, { 24: 24, 25: 25, 26: 26, 27: 27, 3: 3, 7: 7, 8: 8 }, ], 21: [ function (_dereq_, module, exports) { "use strict"; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(26); var _constants = _dereq_(24); var _media = _dereq_(27); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NativeHls = { promise: null, load: function load(settings) { if (typeof Hls !== "undefined") { NativeHls.promise = new Promise(function () { NativeHls._createPlayer(settings); }); } else if (!NativeHls.promise) { settings.options.path = typeof settings.options.path === "string" ? settings.options.path : "http://cdn.jsdelivr.net/npm/hls.js@latest"; NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path); NativeHls.promise.then(function () { NativeHls._createPlayer(settings); }); } return NativeHls.promise; }, _createPlayer: function _createPlayer(settings) { var player = new Hls(settings.options); _window2.default["__ready__" + settings.id](player); return player; }, }; var HlsNativeRenderer = { name: "native_hls", options: { prefix: "native_hls", hls: { path: "http://cdn.jsdelivr.net/npm/hls.js@latest", autoStartLoad: false, debug: false, }, }, canPlayType: function canPlayType(type) { return ( _constants.HAS_MSE && [ "application/x-mpegurl", "vnd.apple.mpegurl", "audio/mpegurl", "audio/hls", "video/hls", ].indexOf(type.toLowerCase()) > -1 ); }, create: function create(mediaElement, options, mediaFiles) { var originalNode = mediaElement.originalNode, id = mediaElement.id + "_" + options.prefix, preload = originalNode.getAttribute("preload"), autoplay = originalNode.autoplay; var hlsPlayer = null, node = null; node = originalNode.cloneNode(true); options = Object.assign(options, mediaElement.options); options.hls.autoStartLoad = (preload && preload !== "none") || autoplay; var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); node["get" + capName] = function () { return hlsPlayer !== null ? node[propName] : null; }; node["set" + capName] = function (value) { if ( _mejs2.default.html5media.readOnlyProperties.indexOf( propName ) === -1 ) { node[propName] = value; if (hlsPlayer !== null) { if (propName === "src") { hlsPlayer.destroy(); hlsPlayer = NativeHls._createPlayer({ options: options.hls, id: id, }); hlsPlayer.loadSource(value); hlsPlayer.attachMedia(node); } } } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } _window2.default["__ready__" + id] = function (_hlsPlayer) { mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer; var events = _mejs2.default.html5media.events.concat([ "click", "mouseover", "mouseout", ]), hlsEvents = Hls.Events, assignEvents = function assignEvents(eventName) { if (eventName === "loadedmetadata") { var url = mediaElement.originalNode.src; hlsPlayer.detachMedia(); hlsPlayer.loadSource(url); hlsPlayer.attachMedia(node); } node.addEventListener(eventName, function (e) { var event = (0, _general.createEvent)(e.type, mediaElement); mediaElement.dispatchEvent(event); }); }; for (var _i = 0, _total = events.length; _i < _total; _i++) { assignEvents(events[_i]); } var recoverDecodingErrorDate = void 0, recoverSwapAudioCodecDate = void 0; var assignHlsEvents = function assignHlsEvents(e, data) { var event = (0, _general.createEvent)(e, node); event.data = data; mediaElement.dispatchEvent(event); if (e === "hlsError") { console.warn(e, data); if (data.fatal) { switch (data.type) { case "mediaError": var now = new Date().getTime(); if ( !recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000 ) { recoverDecodingErrorDate = new Date().getTime(); hlsPlayer.recoverMediaError(); } else if ( !recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000 ) { recoverSwapAudioCodecDate = new Date().getTime(); console.warn( "Attempting to swap Audio Codec and recover from media error" ); hlsPlayer.swapAudioCodec(); hlsPlayer.recoverMediaError(); } else { console.error( "Cannot recover, last media error recovery failed" ); } break; case "networkError": console.error("Network error"); break; default: hlsPlayer.destroy(); break; } } } }; for (var eventType in hlsEvents) { if (hlsEvents.hasOwnProperty(eventType)) { hlsPlayer.on(hlsEvents[eventType], assignHlsEvents); } } }; if (mediaFiles && mediaFiles.length > 0) { for ( var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++ ) { if ( _renderer.renderer.renderers[options.prefix].canPlayType( mediaFiles[_i2].type ) ) { node.setAttribute("src", mediaFiles[_i2].src); break; } } } if (preload !== "auto" && !autoplay) { node.addEventListener("play", function () { if (hlsPlayer !== null) { hlsPlayer.startLoad(); } }); node.addEventListener("pause", function () { if (hlsPlayer !== null) { hlsPlayer.stopLoad(); } }); } node.setAttribute("id", id); originalNode.parentNode.insertBefore(node, originalNode); originalNode.autoplay = false; originalNode.style.display = "none"; node.setSize = function (width, height) { node.style.width = width + "px"; node.style.height = height + "px"; return node; }; node.hide = function () { node.pause(); node.style.display = "none"; return node; }; node.show = function () { node.style.display = ""; return node; }; node.destroy = function () { if (hlsPlayer !== null) { hlsPlayer.destroy(); } }; node.stop = function () { if (hlsPlayer !== null) { hlsPlayer.stopLoad(); } }; var event = (0, _general.createEvent)("rendererready", node); mediaElement.dispatchEvent(event); mediaElement.promises.push( NativeHls.load({ options: options.hls, id: id }) ); return node; }, }; _media.typeChecks.push(function (url) { return ~url.toLowerCase().indexOf(".m3u8") ? "application/x-mpegURL" : null; }); _renderer.renderer.add(HlsNativeRenderer); }, { 24: 24, 25: 25, 26: 26, 27: 27, 3: 3, 7: 7, 8: 8 }, ], 22: [ function (_dereq_, module, exports) { "use strict"; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(26); var _constants = _dereq_(24); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var HtmlMediaElement = { name: "html5", options: { prefix: "html5" }, canPlayType: function canPlayType(type) { var mediaElement = _document2.default.createElement("video"); if ( (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type)) || (~[ "application/x-mpegurl", "vnd.apple.mpegurl", "audio/mpegurl", "audio/hls", "video/hls", ].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) ) { return "yes"; } else if (mediaElement.canPlayType) { return mediaElement .canPlayType(type.toLowerCase()) .replace(/no/, ""); } else { return ""; } }, create: function create(mediaElement, options, mediaFiles) { var id = mediaElement.id + "_" + options.prefix; var node = null; if ( mediaElement.originalNode === undefined || mediaElement.originalNode === null ) { node = _document2.default.createElement("audio"); mediaElement.appendChild(node); } else { node = mediaElement.originalNode; } node.setAttribute("id", id); var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); node["get" + capName] = function () { return node[propName]; }; node["set" + capName] = function (value) { if ( _mejs2.default.html5media.readOnlyProperties.indexOf( propName ) === -1 ) { node[propName] = value; } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } var events = _mejs2.default.html5media.events.concat([ "click", "mouseover", "mouseout", ]), assignEvents = function assignEvents(eventName) { node.addEventListener(eventName, function (e) { var event = (0, _general.createEvent)(e.type, mediaElement); mediaElement.dispatchEvent(event); }); }; for (var _i = 0, _total = events.length; _i < _total; _i++) { assignEvents(events[_i]); } node.setSize = function (width, height) { node.style.width = width + "px"; node.style.height = height + "px"; return node; }; node.hide = function () { node.style.display = "none"; return node; }; node.show = function () { node.style.display = ""; return node; }; if (mediaFiles && mediaFiles.length > 0) { for ( var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++ ) { if ( _renderer.renderer.renderers[options.prefix].canPlayType( mediaFiles[_i2].type ) ) { node.setAttribute("src", mediaFiles[_i2].src); break; } } } var event = (0, _general.createEvent)("rendererready", node); mediaElement.dispatchEvent(event); return node; }, }; _window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement; _renderer.renderer.add(HtmlMediaElement); }, { 2: 2, 24: 24, 26: 26, 3: 3, 7: 7, 8: 8 }, ], 23: [ function (_dereq_, module, exports) { "use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(26); var _media = _dereq_(27); var _dom = _dereq_(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var YouTubeApi = { isIframeStarted: false, isIframeLoaded: false, iframeQueue: [], enqueueIframe: function enqueueIframe(settings) { YouTubeApi.isLoaded = typeof YT !== "undefined" && YT.loaded; if (YouTubeApi.isLoaded) { YouTubeApi.createIframe(settings); } else { YouTubeApi.loadIframeApi(); YouTubeApi.iframeQueue.push(settings); } }, loadIframeApi: function loadIframeApi() { if (!YouTubeApi.isIframeStarted) { (0, _dom.loadScript)("https://www.youtube.com/player_api"); YouTubeApi.isIframeStarted = true; } }, iFrameReady: function iFrameReady() { YouTubeApi.isLoaded = true; YouTubeApi.isIframeLoaded = true; while (YouTubeApi.iframeQueue.length > 0) { var settings = YouTubeApi.iframeQueue.pop(); YouTubeApi.createIframe(settings); } }, createIframe: function createIframe(settings) { return new YT.Player(settings.containerId, settings); }, getYouTubeId: function getYouTubeId(url) { var youTubeId = ""; if (url.indexOf("?") > 0) { youTubeId = YouTubeApi.getYouTubeIdFromParam(url); if (youTubeId === "") { youTubeId = YouTubeApi.getYouTubeIdFromUrl(url); } } else { youTubeId = YouTubeApi.getYouTubeIdFromUrl(url); } return youTubeId; }, getYouTubeIdFromParam: function getYouTubeIdFromParam(url) { if (url === undefined || url === null || !url.trim().length) { return null; } var parts = url.split("?"), parameters = parts[1].split("&"); var youTubeId = ""; for (var i = 0, total = parameters.length; i < total; i++) { var paramParts = parameters[i].split("="); if (paramParts[0] === "v") { youTubeId = paramParts[1]; break; } } return youTubeId; }, getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) { if (url === undefined || url === null || !url.trim().length) { return null; } var parts = url.split("?"); url = parts[0]; return url.substring(url.lastIndexOf("/") + 1); }, getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) { if ( url === undefined || url === null || !url.trim().length || url.indexOf("//www.youtube") === -1 ) { return url; } var parts = url.split("/"); parts[2] = parts[2].replace(".com", "-nocookie.com"); return parts.join("/"); }, }; var YouTubeIframeRenderer = { name: "youtube_iframe", options: { prefix: "youtube_iframe", youtube: { autoplay: 0, controls: 0, disablekb: 1, end: 0, loop: 0, modestbranding: 0, playsinline: 0, rel: 0, showinfo: 0, start: 0, iv_load_policy: 3, nocookie: false, }, }, canPlayType: function canPlayType(type) { return ~["video/youtube", "video/x-youtube"].indexOf( type.toLowerCase() ); }, create: function create(mediaElement, options, mediaFiles) { var youtube = {}, apiStack = [], readyState = 4; var youTubeApi = null, paused = true, ended = false, youTubeIframe = null, volume = 1; youtube.options = options; youtube.id = mediaElement.id + "_" + options.prefix; youtube.mediaElement = mediaElement; var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); youtube["get" + capName] = function () { if (youTubeApi !== null) { var value = null; switch (propName) { case "currentTime": return youTubeApi.getCurrentTime(); case "duration": return youTubeApi.getDuration(); case "volume": volume = youTubeApi.getVolume() / 100; return volume; case "paused": return paused; case "ended": return ended; case "muted": return youTubeApi.isMuted(); case "buffered": var percentLoaded = youTubeApi.getVideoLoadedFraction(), duration = youTubeApi.getDuration(); return { start: function start() { return 0; }, end: function end() { return percentLoaded * duration; }, length: 1, }; case "src": return youTubeApi.getVideoUrl(); case "readyState": return readyState; } return value; } else { return null; } }; youtube["set" + capName] = function (value) { if (youTubeApi !== null) { switch (propName) { case "src": var url = typeof value === "string" ? value : value[0].src, _videoId = YouTubeApi.getYouTubeId(url); if (mediaElement.originalNode.autoplay) { youTubeApi.loadVideoById(_videoId); } else { youTubeApi.cueVideoById(_videoId); } break; case "currentTime": youTubeApi.seekTo(value); break; case "muted": if (value) { youTubeApi.mute(); } else { youTubeApi.unMute(); } setTimeout(function () { var event = (0, _general.createEvent)( "volumechange", youtube ); mediaElement.dispatchEvent(event); }, 50); break; case "volume": volume = value; youTubeApi.setVolume(value * 100); setTimeout(function () { var event = (0, _general.createEvent)( "volumechange", youtube ); mediaElement.dispatchEvent(event); }, 50); break; case "readyState": var event = (0, _general.createEvent)( "canplay", youtube ); mediaElement.dispatchEvent(event); break; default: break; } } else { apiStack.push({ type: "set", propName: propName, value: value, }); } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } var methods = _mejs2.default.html5media.methods, assignMethods = function assignMethods(methodName) { youtube[methodName] = function () { if (youTubeApi !== null) { switch (methodName) { case "play": paused = false; return youTubeApi.playVideo(); case "pause": paused = true; return youTubeApi.pauseVideo(); case "load": return null; } } else { apiStack.push({ type: "call", methodName: methodName }); } }; }; for (var _i = 0, _total = methods.length; _i < _total; _i++) { assignMethods(methods[_i]); } var youtubeContainer = _document2.default.createElement("div"); youtubeContainer.id = youtube.id; if (youtube.options.youtube.nocookie) { mediaElement.originalNode.setAttribute( "src", YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src) ); } mediaElement.originalNode.parentNode.insertBefore( youtubeContainer, mediaElement.originalNode ); mediaElement.originalNode.style.display = "none"; var isAudio = mediaElement.originalNode.tagName.toLowerCase() === "audio", height = isAudio ? "1" : mediaElement.originalNode.height, width = isAudio ? "1" : mediaElement.originalNode.width, videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src), youtubeSettings = { id: youtube.id, containerId: youtubeContainer.id, videoId: videoId, height: height, width: width, playerVars: Object.assign( { controls: 0, rel: 0, disablekb: 1, showinfo: 0, modestbranding: 0, html5: 1, playsinline: 0, start: 0, end: 0, iv_load_policy: 3, }, youtube.options.youtube ), origin: _window2.default.location.host, events: { onReady: function onReady(e) { mediaElement.youTubeApi = youTubeApi = e.target; mediaElement.youTubeState = { paused: true, ended: false }; if (apiStack.length) { for ( var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++ ) { var stackItem = apiStack[_i2]; if (stackItem.type === "set") { var propName = stackItem.propName, capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); youtube["set" + capName](stackItem.value); } else if (stackItem.type === "call") { youtube[stackItem.methodName](); } } } youTubeIframe = youTubeApi.getIframe(); if (mediaElement.originalNode.getAttribute("muted")) { youTubeApi.mute(); } var events = ["mouseover", "mouseout"], assignEvents = function assignEvents(e) { var newEvent = (0, _general.createEvent)( e.type, youtube ); mediaElement.dispatchEvent(newEvent); }; for ( var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++ ) { youTubeIframe.addEventListener( events[_i3], assignEvents, false ); } var initEvents = [ "rendererready", "loadedmetadata", "loadeddata", "canplay", ]; for ( var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++ ) { var event = (0, _general.createEvent)( initEvents[_i4], youtube ); mediaElement.dispatchEvent(event); } }, onStateChange: function onStateChange(e) { var events = []; switch (e.data) { case -1: events = ["loadedmetadata"]; paused = true; ended = false; break; case 0: events = ["ended"]; paused = false; ended = !youtube.options.youtube.loop; if (!youtube.options.youtube.loop) { youtube.stopInterval(); } break; case 1: events = ["play", "playing"]; paused = false; ended = false; youtube.startInterval(); break; case 2: events = ["pause"]; paused = true; ended = false; youtube.stopInterval(); break; case 3: events = ["progress"]; ended = false; break; case 5: events = ["loadeddata", "loadedmetadata", "canplay"]; paused = true; ended = false; break; } for ( var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++ ) { var event = (0, _general.createEvent)( events[_i5], youtube ); mediaElement.dispatchEvent(event); } }, onError: function onError(e) { var event = (0, _general.createEvent)("error", youtube); event.data = e.data; mediaElement.dispatchEvent(event); }, }, }; if (isAudio) { youtubeSettings.playerVars.playsinline = 1; } if (mediaElement.originalNode.autoplay) { youtubeSettings.playerVars.autoplay = 1; } if (mediaElement.originalNode.loop) { youtubeSettings.playerVars.loop = 1; } YouTubeApi.enqueueIframe(youtubeSettings); youtube.onEvent = function (eventName, player, _youTubeState) { if (_youTubeState !== null && _youTubeState !== undefined) { mediaElement.youTubeState = _youTubeState; } }; youtube.setSize = function (width, height) { if (youTubeApi !== null) { youTubeApi.setSize(width, height); } }; youtube.hide = function () { youtube.stopInterval(); youtube.pause(); if (youTubeIframe) { youTubeIframe.style.display = "none"; } }; youtube.show = function () { if (youTubeIframe) { youTubeIframe.style.display = ""; } }; youtube.destroy = function () { youTubeApi.destroy(); }; youtube.interval = null; youtube.startInterval = function () { youtube.interval = setInterval(function () { var event = (0, _general.createEvent)("timeupdate", youtube); mediaElement.dispatchEvent(event); }, 250); }; youtube.stopInterval = function () { if (youtube.interval) { clearInterval(youtube.interval); } }; return youtube; }, }; if ( _window2.default.postMessage && _typeof(_window2.default.addEventListener) ) { _window2.default.onYouTubePlayerAPIReady = function () { YouTubeApi.iFrameReady(); }; _media.typeChecks.push(function (url) { return /\/\/(www\.youtube|youtu\.be)/i.test(url) ? "video/x-youtube" : null; }); _renderer.renderer.add(YouTubeIframeRenderer); } }, { 2: 2, 25: 25, 26: 26, 27: 27, 3: 3, 7: 7, 8: 8 }, ], 24: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NAV = (exports.NAV = _window2.default.navigator); var UA = (exports.UA = NAV.userAgent.toLowerCase()); var IS_IPAD = (exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream); var IS_IPHONE = (exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream); var IS_IPOD = (exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream); var IS_IOS = (exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream); var IS_ANDROID = (exports.IS_ANDROID = /android/i.test(UA)); var IS_IE = (exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName)); var IS_EDGE = (exports.IS_EDGE = "msLaunchUri" in NAV && !("documentMode" in _document2.default)); var IS_CHROME = (exports.IS_CHROME = /chrome/i.test(UA)); var IS_FIREFOX = (exports.IS_FIREFOX = /firefox/i.test(UA)); var IS_SAFARI = (exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME); var IS_STOCK_ANDROID = (exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA)); var HAS_MSE = (exports.HAS_MSE = "MediaSource" in _window2.default); var SUPPORT_POINTER_EVENTS = (exports.SUPPORT_POINTER_EVENTS = (function () { var element = _document2.default.createElement("x"), documentElement = _document2.default.documentElement, getComputedStyle = _window2.default.getComputedStyle; if (!("pointerEvents" in element.style)) { return false; } element.style.pointerEvents = "auto"; element.style.pointerEvents = "x"; documentElement.appendChild(element); var supports = getComputedStyle && getComputedStyle(element, "").pointerEvents === "auto"; element.remove(); return !!supports; })()); var html5Elements = ["source", "track", "audio", "video"]; var video = void 0; for (var i = 0, total = html5Elements.length; i < total; i++) { video = _document2.default.createElement(html5Elements[i]); } var SUPPORTS_NATIVE_HLS = (exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || (IS_ANDROID && (IS_CHROME || IS_STOCK_ANDROID)) || (IS_IE && /edge/i.test(UA))); var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined; var hasNativeFullscreen = video.requestFullscreen !== undefined; if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) { hasNativeFullscreen = false; hasiOSFullScreen = false; } var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined; var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined; var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined; var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen; var nativeFullScreenEnabled = hasTrueNativeFullScreen; var fullScreenEventName = ""; var isFullScreen = void 0, requestFullScreen = void 0, cancelFullScreen = void 0; if (hasMozNativeFullScreen) { nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled; } else if (hasMsNativeFullScreen) { nativeFullScreenEnabled = _document2.default.msFullscreenEnabled; } if (IS_CHROME) { hasiOSFullScreen = false; } if (hasTrueNativeFullScreen) { if (hasWebkitNativeFullScreen) { fullScreenEventName = "webkitfullscreenchange"; } else if (hasMozNativeFullScreen) { fullScreenEventName = "mozfullscreenchange"; } else if (hasMsNativeFullScreen) { fullScreenEventName = "MSFullscreenChange"; } exports.isFullScreen = isFullScreen = function isFullScreen() { if (hasMozNativeFullScreen) { return _document2.default.mozFullScreen; } else if (hasWebkitNativeFullScreen) { return _document2.default.webkitIsFullScreen; } else if (hasMsNativeFullScreen) { return _document2.default.msFullscreenElement !== null; } }; exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) { if (hasWebkitNativeFullScreen) { el.webkitRequestFullScreen(); } else if (hasMozNativeFullScreen) { el.mozRequestFullScreen(); } else if (hasMsNativeFullScreen) { el.msRequestFullscreen(); } }; exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() { if (hasWebkitNativeFullScreen) { _document2.default.webkitCancelFullScreen(); } else if (hasMozNativeFullScreen) { _document2.default.mozCancelFullScreen(); } else if (hasMsNativeFullScreen) { _document2.default.msExitFullscreen(); } }; } var HAS_NATIVE_FULLSCREEN = (exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen); var HAS_WEBKIT_NATIVE_FULLSCREEN = (exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen); var HAS_MOZ_NATIVE_FULLSCREEN = (exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen); var HAS_MS_NATIVE_FULLSCREEN = (exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen); var HAS_IOS_FULLSCREEN = (exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen); var HAS_TRUE_NATIVE_FULLSCREEN = (exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen); var HAS_NATIVE_FULLSCREEN_ENABLED = (exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled); var FULLSCREEN_EVENT_NAME = (exports.FULLSCREEN_EVENT_NAME = fullScreenEventName); exports.isFullScreen = isFullScreen; exports.requestFullScreen = requestFullScreen; exports.cancelFullScreen = cancelFullScreen; _mejs2.default.Features = _mejs2.default.Features || {}; _mejs2.default.Features.isiPad = IS_IPAD; _mejs2.default.Features.isiPod = IS_IPOD; _mejs2.default.Features.isiPhone = IS_IPHONE; _mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad; _mejs2.default.Features.isAndroid = IS_ANDROID; _mejs2.default.Features.isIE = IS_IE; _mejs2.default.Features.isEdge = IS_EDGE; _mejs2.default.Features.isChrome = IS_CHROME; _mejs2.default.Features.isFirefox = IS_FIREFOX; _mejs2.default.Features.isSafari = IS_SAFARI; _mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID; _mejs2.default.Features.hasMSE = HAS_MSE; _mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS; _mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS; _mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN; _mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN; _mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN; _mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN; _mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN; _mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN; _mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED; _mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME; _mejs2.default.Features.isFullScreen = isFullScreen; _mejs2.default.Features.requestFullScreen = requestFullScreen; _mejs2.default.Features.cancelFullScreen = cancelFullScreen; }, { 2: 2, 3: 3, 7: 7 }, ], 25: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.removeClass = exports.addClass = exports.hasClass = undefined; exports.loadScript = loadScript; exports.offset = offset; exports.toggleClass = toggleClass; exports.fadeOut = fadeOut; exports.fadeIn = fadeIn; exports.siblings = siblings; exports.visible = visible; exports.ajax = ajax; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function loadScript(url) { return new Promise(function (resolve, reject) { var script = _document2.default.createElement("script"); script.src = url; script.async = true; script.onload = function () { script.remove(); resolve(); }; script.onerror = function () { script.remove(); reject(); }; _document2.default.head.appendChild(script); }); } function offset(el) { var rect = el.getBoundingClientRect(), scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft, scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop; return { top: rect.top + scrollTop, left: rect.left + scrollLeft }; } var hasClassMethod = void 0, addClassMethod = void 0, removeClassMethod = void 0; if ("classList" in _document2.default.documentElement) { hasClassMethod = function hasClassMethod(el, className) { return ( el.classList !== undefined && el.classList.contains(className) ); }; addClassMethod = function addClassMethod(el, className) { return el.classList.add(className); }; removeClassMethod = function removeClassMethod(el, className) { return el.classList.remove(className); }; } else { hasClassMethod = function hasClassMethod(el, className) { return new RegExp("\\b" + className + "\\b").test(el.className); }; addClassMethod = function addClassMethod(el, className) { if (!hasClass(el, className)) { el.className += " " + className; } }; removeClassMethod = function removeClassMethod(el, className) { el.className = el.className.replace( new RegExp("\\b" + className + "\\b", "g"), "" ); }; } var hasClass = (exports.hasClass = hasClassMethod); var addClass = (exports.addClass = addClassMethod); var removeClass = (exports.removeClass = removeClassMethod); function toggleClass(el, className) { hasClass(el, className) ? removeClass(el, className) : addClass(el, className); } function fadeOut(el) { var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400; var callback = arguments[2]; if (!el.style.opacity) { el.style.opacity = 1; } var start = null; _window2.default.requestAnimationFrame(function animate(timestamp) { start = start || timestamp; var progress = timestamp - start; var opacity = parseFloat(1 - progress / duration, 2); el.style.opacity = opacity < 0 ? 0 : opacity; if (progress > duration) { if (callback && typeof callback === "function") { callback(); } } else { _window2.default.requestAnimationFrame(animate); } }); } function fadeIn(el) { var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400; var callback = arguments[2]; if (!el.style.opacity) { el.style.opacity = 0; } var start = null; _window2.default.requestAnimationFrame(function animate(timestamp) { start = start || timestamp; var progress = timestamp - start; var opacity = parseFloat(progress / duration, 2); el.style.opacity = opacity > 1 ? 1 : opacity; if (progress > duration) { if (callback && typeof callback === "function") { callback(); } } else { _window2.default.requestAnimationFrame(animate); } }); } function siblings(el, filter) { var siblings = []; el = el.parentNode.firstChild; do { if (!filter || filter(el)) { siblings.push(el); } } while ((el = el.nextSibling)); return siblings; } function visible(elem) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); } function ajax(url, dataType, success, error) { var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); var type = "application/x-www-form-urlencoded; charset=UTF-8", completed = false, accept = "*/".concat("*"); switch (dataType) { case "text": type = "text/plain"; break; case "json": type = "application/json, text/javascript"; break; case "html": type = "text/html"; break; case "xml": type = "application/xml, text/xml"; break; } if (type !== "application/x-www-form-urlencoded") { accept = type + ", */*; q=0.01"; } if (xhr) { xhr.open("GET", url, true); xhr.setRequestHeader("Accept", accept); xhr.onreadystatechange = function () { if (completed) { return; } if (xhr.readyState === 4) { if (xhr.status === 200) { completed = true; var data = void 0; switch (dataType) { case "json": data = JSON.parse(xhr.responseText); break; case "xml": data = xhr.responseXML; break; default: data = xhr.responseText; break; } success(data); } else if (typeof error === "function") { error(xhr.status); } } }; xhr.send(); } } _mejs2.default.Utils = _mejs2.default.Utils || {}; _mejs2.default.Utils.offset = offset; _mejs2.default.Utils.hasClass = hasClass; _mejs2.default.Utils.addClass = addClass; _mejs2.default.Utils.removeClass = removeClass; _mejs2.default.Utils.toggleClass = toggleClass; _mejs2.default.Utils.fadeIn = fadeIn; _mejs2.default.Utils.fadeOut = fadeOut; _mejs2.default.Utils.siblings = siblings; _mejs2.default.Utils.visible = visible; _mejs2.default.Utils.ajax = ajax; _mejs2.default.Utils.loadScript = loadScript; }, { 2: 2, 3: 3, 7: 7 }, ], 26: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.escapeHTML = escapeHTML; exports.debounce = debounce; exports.isObjectEmpty = isObjectEmpty; exports.splitEvents = splitEvents; exports.createEvent = createEvent; exports.isNodeAfter = isNodeAfter; exports.isString = isString; var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function escapeHTML(input) { if (typeof input !== "string") { throw new Error("Argument passed must be a string"); } var map = { "&": "&", "<": "<", ">": ">", '"': """ }; return input.replace(/[&<>"]/g, function (c) { return map[c]; }); } function debounce(func, wait) { var _this = this, _arguments = arguments; var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; if (typeof func !== "function") { throw new Error("First argument must be a function"); } if (typeof wait !== "number") { throw new Error("Second argument must be a numeric value"); } var timeout = void 0; return function () { var context = _this, args = _arguments; var later = function later() { timeout = null; if (!immediate) { func.apply(context, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { func.apply(context, args); } }; } function isObjectEmpty(instance) { return Object.getOwnPropertyNames(instance).length <= 0; } function splitEvents(events, id) { var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/; var ret = { d: [], w: [] }; (events || "").split(" ").forEach(function (v) { var eventName = "" + v + (id ? "." + id : ""); if (eventName.startsWith(".")) { ret.d.push(eventName); ret.w.push(eventName); } else { ret[rwindow.test(v) ? "w" : "d"].push(eventName); } }); ret.d = ret.d.join(" "); ret.w = ret.w.join(" "); return ret; } function createEvent(eventName, target) { if (typeof eventName !== "string") { throw new Error("Event name must be a string"); } var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i), detail = { target: target }; if (eventFrags !== null) { eventName = eventFrags[1]; detail.namespace = eventFrags[2]; } return new window.CustomEvent(eventName, { detail: detail }); } function isNodeAfter(sourceNode, targetNode) { return !!( sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2 ); } function isString(value) { return typeof value === "string"; } _mejs2.default.Utils = _mejs2.default.Utils || {}; _mejs2.default.Utils.escapeHTML = escapeHTML; _mejs2.default.Utils.debounce = debounce; _mejs2.default.Utils.isObjectEmpty = isObjectEmpty; _mejs2.default.Utils.splitEvents = splitEvents; _mejs2.default.Utils.createEvent = createEvent; _mejs2.default.Utils.isNodeAfter = isNodeAfter; _mejs2.default.Utils.isString = isString; }, { 7: 7 }, ], 27: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.typeChecks = undefined; exports.absolutizeUrl = absolutizeUrl; exports.formatType = formatType; exports.getMimeFromType = getMimeFromType; exports.getTypeFromFile = getTypeFromFile; exports.getExtension = getExtension; exports.normalizeExtension = normalizeExtension; var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _general = _dereq_(26); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var typeChecks = (exports.typeChecks = []); function absolutizeUrl(url) { if (typeof url !== "string") { throw new Error("`url` argument must be a string"); } var el = document.createElement("div"); el.innerHTML = 'x'; return el.firstChild.href; } function formatType(url) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; return url && !type ? getTypeFromFile(url) : getMimeFromType(type); } function getMimeFromType(type) { if (typeof type !== "string") { throw new Error("`type` argument must be a string"); } return type && type.indexOf(";") > -1 ? type.substr(0, type.indexOf(";")) : type; } function getTypeFromFile(url) { if (typeof url !== "string") { throw new Error("`url` argument must be a string"); } for (var i = 0, total = typeChecks.length; i < total; i++) { var type = typeChecks[i](url); if (type) { return type; } } var ext = getExtension(url), normalizedExt = normalizeExtension(ext); var mime = "video/mp4"; if (normalizedExt) { if ( ~[ "mp4", "m4v", "ogg", "ogv", "webm", "flv", "mpeg", "mov", ].indexOf(normalizedExt) ) { mime = "video/" + normalizedExt; } else if ( ~["mp3", "oga", "wav", "mid", "midi"].indexOf(normalizedExt) ) { mime = "audio/" + normalizedExt; } } return mime; } function getExtension(url) { if (typeof url !== "string") { throw new Error("`url` argument must be a string"); } var baseUrl = url.split("?")[0], baseName = baseUrl.split("\\").pop().split("/").pop(); return ~baseName.indexOf(".") ? baseName.substring(baseName.lastIndexOf(".") + 1) : ""; } function normalizeExtension(extension) { if (typeof extension !== "string") { throw new Error("`extension` argument must be a string"); } switch (extension) { case "mp4": case "m4v": return "mp4"; case "webm": case "webma": case "webmv": return "webm"; case "ogg": case "oga": case "ogv": return "ogg"; default: return extension; } } _mejs2.default.Utils = _mejs2.default.Utils || {}; _mejs2.default.Utils.typeChecks = typeChecks; _mejs2.default.Utils.absolutizeUrl = absolutizeUrl; _mejs2.default.Utils.formatType = formatType; _mejs2.default.Utils.getMimeFromType = getMimeFromType; _mejs2.default.Utils.getTypeFromFile = getTypeFromFile; _mejs2.default.Utils.getExtension = getExtension; _mejs2.default.Utils.normalizeExtension = normalizeExtension; }, { 26: 26, 7: 7 }, ], 28: [ function (_dereq_, module, exports) { "use strict"; var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _promisePolyfill = _dereq_(4); var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } (function (arr) { arr.forEach(function (item) { if (item.hasOwnProperty("remove")) { return; } Object.defineProperty(item, "remove", { configurable: true, enumerable: true, writable: true, value: function remove() { this.parentNode.removeChild(this); }, }); }); })([ Element.prototype, CharacterData.prototype, DocumentType.prototype, ]); (function () { if (typeof window.CustomEvent === "function") { return false; } function CustomEvent(event, params) { params = params || { bubbles: false, cancelable: false, detail: undefined, }; var evt = _document2.default.createEvent("CustomEvent"); evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); return evt; } CustomEvent.prototype = window.Event.prototype; window.CustomEvent = CustomEvent; })(); if (typeof Object.assign !== "function") { Object.assign = function (target) { if (target === null || target === undefined) { throw new TypeError("Cannot convert undefined or null to object"); } var to = Object(target); for ( var index = 1, total = arguments.length; index < total; index++ ) { var nextSource = arguments[index]; if (nextSource !== null) { for (var nextKey in nextSource) { if ( Object.prototype.hasOwnProperty.call(nextSource, nextKey) ) { to[nextKey] = nextSource[nextKey]; } } } } return to; }; } if (!String.prototype.startsWith) { String.prototype.startsWith = function (searchString, position) { position = position || 0; return this.substr(position, searchString.length) === searchString; }; } if (!Element.prototype.matches) { Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) { var matches = ( this.document || this.ownerDocument ).querySelectorAll(s), i = matches.length - 1; while (--i >= 0 && matches.item(i) !== this) {} return i > -1; }; } if (window.Element && !Element.prototype.closest) { Element.prototype.closest = function (s) { var matches = ( this.document || this.ownerDocument ).querySelectorAll(s), i = void 0, el = this; do { i = matches.length; while (--i >= 0 && matches.item(i) !== el) {} } while (i < 0 && (el = el.parentElement)); return el; }; } (function () { var lastTime = 0; var vendors = ["ms", "moz", "webkit", "o"]; for ( var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x ) { window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"]; window.cancelAnimationFrame = window[vendors[x] + "CancelAnimationFrame"] || window[vendors[x] + "CancelRequestAnimationFrame"]; } if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function () { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) { clearTimeout(id); }; })(); if (/firefox/i.test(navigator.userAgent)) { window.mediaElementJsOldGetComputedStyle = window.getComputedStyle; window.getComputedStyle = function (el, pseudoEl) { var t = window.mediaElementJsOldGetComputedStyle(el, pseudoEl); return t === null ? { getPropertyValue: function getPropertyValue() {} } : t; }; } if (!window.Promise) { window.Promise = _promisePolyfill2.default; } (function (constructor) { if ( constructor && constructor.prototype && constructor.prototype.children === null ) { Object.defineProperty(constructor.prototype, "children", { get: function get() { var i = 0, node = void 0, nodes = this.childNodes, children = []; while ((node = nodes[i++])) { if (node.nodeType === 1) { children.push(node); } } return children; }, }); } })(window.Node || window.Element); }, { 2: 2, 4: 4 }, ], 29: [ function (_dereq_, module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDropFrame = isDropFrame; exports.secondsToTimeCode = secondsToTimeCode; exports.timeCodeToSeconds = timeCodeToSeconds; exports.calculateTimeFormat = calculateTimeFormat; exports.convertSMPTEtoSeconds = convertSMPTEtoSeconds; var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function isDropFrame() { var fps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 25; return !(fps % 1 === 0); } function secondsToTimeCode(time) { var forceHours = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var showFrameCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var fps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 25; var secondsDecimalLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; time = !time || typeof time !== "number" || time < 0 ? 0 : time; var dropFrames = Math.round(fps * 0.066666), timeBase = Math.round(fps), framesPer24Hours = Math.round(fps * 3600) * 24, framesPer10Minutes = Math.round(fps * 600), frameSep = isDropFrame(fps) ? ";" : ":", hours = void 0, minutes = void 0, seconds = void 0, frames = void 0, f = Math.round(time * fps); if (isDropFrame(fps)) { if (f < 0) { f = framesPer24Hours + f; } f = f % framesPer24Hours; var d = Math.floor(f / framesPer10Minutes); var m = f % framesPer10Minutes; f = f + dropFrames * 9 * d; if (m > dropFrames) { f = f + dropFrames * Math.floor( (m - dropFrames) / Math.round(timeBase * 60 - dropFrames) ); } var timeBaseDivision = Math.floor(f / timeBase); hours = Math.floor(Math.floor(timeBaseDivision / 60) / 60); minutes = Math.floor(timeBaseDivision / 60) % 60; if (showFrameCount) { seconds = timeBaseDivision % 60; } else { seconds = ((f / timeBase) % 60).toFixed(secondsDecimalLength); } } else { hours = Math.floor(time / 3600) % 24; minutes = Math.floor(time / 60) % 60; if (showFrameCount) { seconds = Math.floor(time % 60); } else { seconds = (time % 60).toFixed(secondsDecimalLength); } } hours = hours <= 0 ? 0 : hours; minutes = minutes <= 0 ? 0 : minutes; seconds = seconds <= 0 ? 0 : seconds; var result = forceHours || hours > 0 ? (hours < 10 ? "0" + hours : hours) + ":" : ""; result += (minutes < 10 ? "0" + minutes : minutes) + ":"; result += "" + (seconds < 10 ? "0" + seconds : seconds); if (showFrameCount) { frames = (f % timeBase).toFixed(0); frames = frames <= 0 ? 0 : frames; result += frames < 10 ? frameSep + "0" + frames : "" + frameSep + frames; } return result; } function timeCodeToSeconds(time) { var fps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25; if (typeof time !== "string") { throw new TypeError("Time must be a string"); } if (time.indexOf(";") > 0) { time = time.replace(";", ":"); } if (!/\d{2}(\:\d{2}){0,3}/i.test(time)) { throw new TypeError("Time code must have the format `00:00:00`"); } var parts = time.split(":"); var output = void 0, hours = 0, minutes = 0, seconds = 0, frames = 0, totalMinutes = 0, dropFrames = Math.round(fps * 0.066666), timeBase = Math.round(fps), hFrames = timeBase * 3600, mFrames = timeBase * 60; switch (parts.length) { default: case 1: seconds = parseInt(parts[0], 10); break; case 2: minutes = parseInt(parts[0], 10); seconds = parseInt(parts[1], 10); break; case 3: hours = parseInt(parts[0], 10); minutes = parseInt(parts[1], 10); seconds = parseInt(parts[2], 10); break; case 4: hours = parseInt(parts[0], 10); minutes = parseInt(parts[1], 10); seconds = parseInt(parts[2], 10); frames = parseInt(parts[3], 10); break; } if (isDropFrame(fps)) { totalMinutes = 60 * hours + minutes; output = hFrames * hours + mFrames * minutes + timeBase * seconds + frames - dropFrames * (totalMinutes - Math.floor(totalMinutes / 10)); } else { output = (hFrames * hours + mFrames * minutes + fps * seconds + frames) / fps; } return parseFloat(output.toFixed(3)); } function calculateTimeFormat(time, options) { var fps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 25; time = !time || typeof time !== "number" || time < 0 ? 0 : time; var hours = Math.floor(time / 3600) % 24, minutes = Math.floor(time / 60) % 60, seconds = Math.floor(time % 60), frames = Math.floor(((time % 1) * fps).toFixed(3)), lis = [ [frames, "f"], [seconds, "s"], [minutes, "m"], [hours, "h"], ]; var format = options.timeFormat, firstTwoPlaces = format[1] === format[0], separatorIndex = firstTwoPlaces ? 2 : 1, separator = format.length < separatorIndex ? format[separatorIndex] : ":", firstChar = format[0], required = false; for (var i = 0, len = lis.length; i < len; i++) { if (~format.indexOf(lis[i][1])) { required = true; } else if (required) { var hasNextValue = false; for (var j = i; j < len; j++) { if (lis[j][0] > 0) { hasNextValue = true; break; } } if (!hasNextValue) { break; } if (!firstTwoPlaces) { format = firstChar + format; } format = lis[i][1] + separator + format; if (firstTwoPlaces) { format = lis[i][1] + format; } firstChar = lis[i][1]; } } options.currentTimeFormat = format; } function convertSMPTEtoSeconds(SMPTE) { if (typeof SMPTE !== "string") { throw new TypeError("Argument must be a string value"); } SMPTE = SMPTE.replace(",", "."); var decimalLen = ~SMPTE.indexOf(".") ? SMPTE.split(".")[1].length : 0; var secs = 0, multiplier = 1; SMPTE = SMPTE.split(":").reverse(); for (var i = 0, total = SMPTE.length; i < total; i++) { multiplier = 1; if (i > 0) { multiplier = Math.pow(60, i); } secs += Number(SMPTE[i]) * multiplier; } return Number(secs.toFixed(decimalLen)); } _mejs2.default.Utils = _mejs2.default.Utils || {}; _mejs2.default.Utils.secondsToTimeCode = secondsToTimeCode; _mejs2.default.Utils.timeCodeToSeconds = timeCodeToSeconds; _mejs2.default.Utils.calculateTimeFormat = calculateTimeFormat; _mejs2.default.Utils.convertSMPTEtoSeconds = convertSMPTEtoSeconds; }, { 7: 7 }, ], }, {}, [28, 6, 5, 15, 22, 19, 18, 20, 21, 23, 16, 17, 9, 10, 11, 12, 13, 14] ); ./html/static/js/app.js0000644000000000000000000002055014732467506013716 0ustar rootroot/*---------------------------------------------" // Template Name: Audify // Description: Audify Html Template // Version: 1.0.0 --------------------------------------------*/ (function (window, document, $, undefined) { "use strict"; var MyScroll = ""; var Init = { i: function (e) { Init.s(); Init.methods(); }, s: function (e) { (this._window = $(window)), (this._document = $(document)), (this._body = $("body")), (this._html = $("html")); }, methods: function (e) { Init.w(); Init.preloader(); Init.BackToTop(); Init.uiHeader(); Init.passwordIcon(); Init.slick(); Init.countdownInit(".countdown", "2025/12/01"); }, w: function (e) { this._window.on("load", Init.l).on("scroll", Init.res); }, // ================= // Preloader // ================= preloader: function () { setTimeout(function () { $("#preloader").hide("slow"); }, 3000); }, // ================= // Bak to top // ================= BackToTop: function () { let scrollTop = $(".scroll-top path"); if (scrollTop.length) { var e = document.querySelector(".scroll-top path"), t = e.getTotalLength(); (e.style.transition = e.style.WebkitTransition = "none"), (e.style.strokeDasharray = t + " " + t), (e.style.strokeDashoffset = t), e.getBoundingClientRect(), (e.style.transition = e.style.WebkitTransition = "stroke-dashoffset 10ms linear"); var o = function () { var o = $(window).scrollTop(), r = $(document).height() - $(window).height(), i = t - (o * t) / r; e.style.strokeDashoffset = i; }; o(), $(window).scroll(o); var back = $(".scroll-top"), body = $("body, html"); $(window).on("scroll", function () { if ($(window).scrollTop() > $(window).height()) { back.addClass("scroll-top--active"); } else { back.removeClass("scroll-top--active"); } }); } }, // ======================= // UI Header // ======================= uiHeader: function () { function dynamicCurrentMenuClass(selector) { let FileName = window.location.href.split("/").reverse()[0]; selector.find("li").each(function () { let anchor = $(this).find("a"); if ($(anchor).attr("href") == FileName) { $(this).addClass("current"); } }); selector.children("li").each(function () { if ($(this).find(".current").length) { $(this).addClass("current"); } }); if ("" == FileName) { selector.find("li").eq(0).addClass("current"); } } if ($(".main-menu__list").length) { let mainNavUL = $(".main-menu__list"); dynamicCurrentMenuClass(mainNavUL); } if ($(".main-menu__nav").length && $(".sidebar-nav__container").length) { let navContent = document.querySelector(".main-menu__nav").innerHTML; let mobileNavContainer = document.querySelector(".sidebar-nav__container"); mobileNavContainer.innerHTML = navContent; } if ($(".sticky-header__content").length) { let navContent = document.querySelector(".main-menu").innerHTML; let mobileNavContainer = document.querySelector(".sticky-header__content"); mobileNavContainer.innerHTML = navContent; } if ($(".sidebar-nav__container .main-menu__list").length) { let dropdownAnchor = $( ".sidebar-nav__container .main-menu__list .dropdown > a" ); dropdownAnchor.each(function () { let self = $(this); let toggleBtn = document.createElement("BUTTON"); toggleBtn.setAttribute("aria-label", "dropdown toggler"); toggleBtn.innerHTML = ""; self.append(function () { return toggleBtn; }); self.find("button").on("click", function (e) { e.preventDefault(); let self = $(this); self.toggleClass("expanded"); self.parent().toggleClass("expanded"); self.parent().parent().children("ul").slideToggle(); }); }); } if ($(".sidebar-nav__toggler").length) { $(".sidebar-nav__toggler").on("click", function (e) { e.preventDefault(); $(".sidebar-nav__wrapper").toggleClass("expanded"); $("body").toggleClass("locked"); }); } $(window).on("scroll", function () { if ($(".stricked-menu").length) { var headerScrollPos = 130; var stricky = $(".stricked-menu"); if ($(window).scrollTop() > headerScrollPos) { stricky.addClass("stricky-fixed"); } else if ($(this).scrollTop() <= headerScrollPos) { stricky.removeClass("stricky-fixed"); } } // Check if the user scrolls to the footer and adjust sidebar-nav__wrapper if ($(".sidebar-nav__wrapper").length && $(".footer").length) { let sidebar = $(".sidebar-nav__wrapper"); let footerOffset = $(".footer").offset().top; let windowBottom = $(window).scrollTop() + $(window).height(); // Adjust position when near footer if (windowBottom >= footerOffset) { sidebar.css({ position: "absolute", top: footerOffset - sidebar.height() + "px", }); } else { sidebar.css({ position: "fixed", top: "0", }); } } }); }, // ======================= // Slick Slider // ======================= passwordIcon: function () { $("#eye , #eye-icon").click(function () { if ($(this).hasClass("fa-eye-slash")) { $(this).removeClass("fa-eye-slash"); $(this).addClass("fa-eye"); $(".password-input").attr("type", "text"); } else { $(this).removeClass("fa-eye"); $(this).addClass("fa-eye-slash"); $(".password-input").attr("type", "password"); } }); }, // ======================= // Slick Slider // ======================= slick: function () { if ($(".hero-images-slider").length) { $('.hero-images-slider').slick({ slidesToShow: 3, slidesToScroll: 1, autoplay: true, arrows: false, dots: false, centerMode: true, variableWidth: true, infinite: true, focusOnSelect: true, cssEase: 'linear', touchMove: true, responsive: [ { breakpoint: 1599, settings: { slidesToShow: 3, }, }, { breakpoint: 1499, settings: { slidesToShow: 3, }, }, { breakpoint: 1399, settings: { slidesToShow: 3, }, }, { breakpoint: 490, settings: { slidesToShow: 1, arrows: false, variableWidth: false, centerMode: false, }, }, ] }); } }, // ======================= // Coming Soon Countdown // ======================= countdownInit: function (countdownSelector, countdownTime) { var eventCounter = $(countdownSelector); if (eventCounter.length) { eventCounter.countdown(countdownTime, function (e) { $(this).html( e.strftime( '
  • %D

    Days
  • \
  • %H

    Hrs
  • \
  • %M

    Min
  • \
  • %S

    Sec
  • ' ) ); }); } }, }; Init.i(); })(window, document, jQuery); ./html/static/js/jquery-3.6.3.min.js0000644000000000000000000032240514732467506015710 0ustar rootroot/*! jQuery v3.6.3 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function (e, t) { "use strict"; "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) { if (!e.document) throw Error("jQuery requires a window with a document"); return t(e) } : t(e) }("undefined" != typeof window ? window : this, function (e, t) { "use strict"; var n = [], r = Object.getPrototypeOf, i = n.slice, o = n.flat ? function (e) { return n.flat.call(e) } : function (e) { return n.concat.apply([], e) }, s = n.push, a = n.indexOf, u = {}, l = u.toString, c = u.hasOwnProperty, f = c.toString, p = f.call(Object), d = {}, h = function (e) { return "function" == typeof e && "number" != typeof e.nodeType && "function" != typeof e.item }, g = function (e) { return null != e && e === e.window }, v = e.document, m = { type: !0, src: !0, nonce: !0, noModule: !0 }; function y(e, t, n) { var r, i, o = (n = n || v).createElement("script"); if (o.text = e, t) for (r in m) (i = t[r] || t.getAttribute && t.getAttribute(r)) && o.setAttribute(r, i); n.head.appendChild(o).parentNode.removeChild(o) } function $(e) { return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? u[l.call(e)] || "object" : typeof e } var x = "3.6.3", b = function (e, t) { return new b.fn.init(e, t) }; function _(e) { var t = !!e && "length" in e && e.length, n = $(e); return !h(e) && !g(e) && ("array" === n || 0 === t || "number" == typeof t && 0 < t && t - 1 in e) } b.fn = b.prototype = { jquery: x, constructor: b, length: 0, toArray: function () { return i.call(this) }, get: function (e) { return null == e ? i.call(this) : e < 0 ? this[e + this.length] : this[e] }, pushStack: function (e) { var t = b.merge(this.constructor(), e); return t.prevObject = this, t }, each: function (e) { return b.each(this, e) }, map: function (e) { return this.pushStack(b.map(this, function (t, n) { return e.call(t, n, t) })) }, slice: function () { return this.pushStack(i.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, even: function () { return this.pushStack(b.grep(this, function (e, t) { return (t + 1) % 2 })) }, odd: function () { return this.pushStack(b.grep(this, function (e, t) { return t % 2 })) }, eq: function (e) { var t = this.length, n = +e + (e < 0 ? t : 0); return this.pushStack(0 <= n && n < t ? [this[n]] : []) }, end: function () { return this.prevObject || this.constructor() }, push: s, sort: n.sort, splice: n.splice }, b.extend = b.fn.extend = function () { var e, t, n, r, i, o, s = arguments[0] || {}, a = 1, u = arguments.length, l = !1; for ("boolean" == typeof s && (l = s, s = arguments[a] || {}, a++), "object" == typeof s || h(s) || (s = {}), a === u && (s = this, a--); a < u; a++)if (null != (e = arguments[a])) for (t in e) r = e[t], "__proto__" !== t && s !== r && (l && r && (b.isPlainObject(r) || (i = Array.isArray(r))) ? (n = s[t], o = i && !Array.isArray(n) ? [] : i || b.isPlainObject(n) ? n : {}, i = !1, s[t] = b.extend(l, o, r)) : void 0 !== r && (s[t] = r)); return s }, b.extend({ expando: "jQuery" + (x + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (e) { throw Error(e) }, noop: function () { }, isPlainObject: function (e) { var t, n; return !(!e || "[object Object]" !== l.call(e)) && (!(t = r(e)) || "function" == typeof (n = c.call(t, "constructor") && t.constructor) && f.call(n) === p) }, isEmptyObject: function (e) { var t; for (t in e) return !1; return !0 }, globalEval: function (e, t, n) { y(e, { nonce: t && t.nonce }, n) }, each: function (e, t) { var n, r = 0; if (_(e)) for (n = e.length; r < n && !1 !== t.call(e[r], r, e[r]); r++); else for (r in e) if (!1 === t.call(e[r], r, e[r])) break; return e }, makeArray: function (e, t) { var n = t || []; return null != e && (_(Object(e)) ? b.merge(n, "string" == typeof e ? [e] : e) : s.call(n, e)), n }, inArray: function (e, t, n) { return null == t ? -1 : a.call(t, e, n) }, merge: function (e, t) { for (var n = +t.length, r = 0, i = e.length; r < n; r++)e[i++] = t[r]; return e.length = i, e }, grep: function (e, t, n) { for (var r = [], i = 0, o = e.length, s = !n; i < o; i++)!t(e[i], i) !== s && r.push(e[i]); return r }, map: function (e, t, n) { var r, i, s = 0, a = []; if (_(e)) for (r = e.length; s < r; s++)null != (i = t(e[s], s, n)) && a.push(i); else for (s in e) null != (i = t(e[s], s, n)) && a.push(i); return o(a) }, guid: 1, support: d }), "function" == typeof Symbol && (b.fn[Symbol.iterator] = n[Symbol.iterator]), b.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (e, t) { u["[object " + t + "]"] = t.toLowerCase() }); var T = function (e) { var t, n, r, i, o, s, a, u, l, c, f, p, d, h, g, v, m, y, $, x = "sizzle" + 1 * new Date, b = e.document, _ = 0, T = 0, w = el(), C = el(), S = el(), k = el(), E = function (e, t) { return e === t && (f = !0), 0 }, N = {}.hasOwnProperty, A = [], D = A.pop, j = A.push, q = A.push, L = A.slice, H = function (e, t) { for (var n = 0, r = e.length; n < r; n++)if (e[n] === t) return n; return -1 }, P = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", O = "[\\x20\\t\\r\\n\\f]", I = "(?:\\\\[\\da-fA-F]{1,6}" + O + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", M = "\\[" + O + "*(" + I + ")(?:" + O + "*([*^$|!~]?=)" + O + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + I + "))|)" + O + "*\\]", W = ":(" + I + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + M + ")*)|.*)\\)|)", B = RegExp(O + "+", "g"), R = RegExp("^" + O + "+|((?:^|[^\\\\])(?:\\\\.)*)" + O + "+$", "g"), F = RegExp("^" + O + "*," + O + "*"), z = RegExp("^" + O + "*([>+~]|" + O + ")" + O + "*"), X = RegExp(O + "|>"), U = RegExp(W), V = RegExp("^" + I + "$"), G = { ID: RegExp("^#(" + I + ")"), CLASS: RegExp("^\\.(" + I + ")"), TAG: RegExp("^(" + I + "|[*])"), ATTR: RegExp("^" + M), PSEUDO: RegExp("^" + W), CHILD: RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + O + "*(even|odd|(([+-]|)(\\d*)n|)" + O + "*(?:([+-]|)" + O + "*(\\d+)|))" + O + "*\\)|)", "i"), bool: RegExp("^(?:" + P + ")$", "i"), needsContext: RegExp("^" + O + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + O + "*((?:-\\d)?\\d*)" + O + "*\\)|)(?=[^-]|$)", "i") }, Y = /HTML$/i, Q = /^(?:input|select|textarea|button)$/i, K = /^h\d$/i, J = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ee = /[+~]/, et = RegExp("\\\\[\\da-fA-F]{1,6}" + O + "?|\\\\([^\\r\\n\\f])", "g"), en = function (e, t) { var n = "0x" + e.slice(1) - 65536; return t || (n < 0 ? String.fromCharCode(n + 65536) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320)) }, er = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, ei = function (e, t) { return t ? "\0" === e ? "�" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e }, eo = function () { p() }, es = eb(function (e) { return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase() }, { dir: "parentNode", next: "legend" }); try { q.apply(A = L.call(b.childNodes), b.childNodes), A[b.childNodes.length].nodeType } catch (ea) { q = { apply: A.length ? function (e, t) { j.apply(e, L.call(t)) } : function (e, t) { for (var n = e.length, r = 0; e[n++] = t[r++];); e.length = n - 1 } } } function eu(e, t, r, i) { var o, a, l, c, f, h, m, y = t && t.ownerDocument, b = t ? t.nodeType : 9; if (r = r || [], "string" != typeof e || !e || 1 !== b && 9 !== b && 11 !== b) return r; if (!i && (p(t), t = t || d, g)) { if (11 !== b && (f = Z.exec(e))) { if (o = f[1]) { if (9 === b) { if (!(l = t.getElementById(o))) return r; if (l.id === o) return r.push(l), r } else if (y && (l = y.getElementById(o)) && $(t, l) && l.id === o) return r.push(l), r } else { if (f[2]) return q.apply(r, t.getElementsByTagName(e)), r; if ((o = f[3]) && n.getElementsByClassName && t.getElementsByClassName) return q.apply(r, t.getElementsByClassName(o)), r } } if (n.qsa && !k[e + " "] && (!v || !v.test(e)) && (1 !== b || "object" !== t.nodeName.toLowerCase())) { if (m = e, y = t, 1 === b && (X.test(e) || z.test(e))) { for ((y = ee.test(e) && ey(t.parentNode) || t) === t && n.scope || ((c = t.getAttribute("id")) ? c = c.replace(er, ei) : t.setAttribute("id", c = x)), a = (h = s(e)).length; a--;)h[a] = (c ? "#" + c : ":scope") + " " + ex(h[a]); m = h.join(",") } try { if (n.cssSupportsSelector && !CSS.supports("selector(:is(" + m + "))")) throw Error(); return q.apply(r, y.querySelectorAll(m)), r } catch (_) { k(e, !0) } finally { c === x && t.removeAttribute("id") } } } return u(e.replace(R, "$1"), t, r, i) } function el() { var e = []; return function t(n, i) { return e.push(n + " ") > r.cacheLength && delete t[e.shift()], t[n + " "] = i } } function ec(e) { return e[x] = !0, e } function ef(e) { var t = d.createElement("fieldset"); try { return !!e(t) } catch (n) { return !1 } finally { t.parentNode && t.parentNode.removeChild(t), t = null } } function ep(e, t) { for (var n = e.split("|"), i = n.length; i--;)r.attrHandle[n[i]] = t } function ed(e, t) { var n = t && e, r = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; if (r) return r; if (n) { for (; n = n.nextSibling;)if (n === t) return -1 } return e ? 1 : -1 } function eh(e) { return function (t) { return "input" === t.nodeName.toLowerCase() && t.type === e } } function eg(e) { return function (t) { var n = t.nodeName.toLowerCase(); return ("input" === n || "button" === n) && t.type === e } } function ev(e) { return function (t) { return "form" in t ? t.parentNode && !1 === t.disabled ? "label" in t ? "label" in t.parentNode ? t.parentNode.disabled === e : t.disabled === e : t.isDisabled === e || !e !== t.isDisabled && es(t) === e : t.disabled === e : "label" in t && t.disabled === e } } function em(e) { return ec(function (t) { return t = +t, ec(function (n, r) { for (var i, o = e([], n.length, t), s = o.length; s--;)n[i = o[s]] && (n[i] = !(r[i] = n[i])) }) }) } function ey(e) { return e && void 0 !== e.getElementsByTagName && e } for (t in n = eu.support = {}, o = eu.isXML = function (e) { var t = e && e.namespaceURI, n = e && (e.ownerDocument || e).documentElement; return !Y.test(t || n && n.nodeName || "HTML") }, p = eu.setDocument = function (e) { var t, i, s = e ? e.ownerDocument || e : b; return s != d && 9 === s.nodeType && s.documentElement && (h = (d = s).documentElement, g = !o(d), b != d && (i = d.defaultView) && i.top !== i && (i.addEventListener ? i.addEventListener("unload", eo, !1) : i.attachEvent && i.attachEvent("onunload", eo)), n.scope = ef(function (e) { return h.appendChild(e).appendChild(d.createElement("div")), void 0 !== e.querySelectorAll && !e.querySelectorAll(":scope fieldset div").length }), n.cssSupportsSelector = ef(function () { return CSS.supports("selector(*)") && d.querySelectorAll(":is(:jqfake)") && !CSS.supports("selector(:is(*,:jqfake))") }), n.attributes = ef(function (e) { return e.className = "i", !e.getAttribute("className") }), n.getElementsByTagName = ef(function (e) { return e.appendChild(d.createComment("")), !e.getElementsByTagName("*").length }), n.getElementsByClassName = J.test(d.getElementsByClassName), n.getById = ef(function (e) { return h.appendChild(e).id = x, !d.getElementsByName || !d.getElementsByName(x).length }), n.getById ? (r.filter.ID = function (e) { var t = e.replace(et, en); return function (e) { return e.getAttribute("id") === t } }, r.find.ID = function (e, t) { if (void 0 !== t.getElementById && g) { var n = t.getElementById(e); return n ? [n] : [] } }) : (r.filter.ID = function (e) { var t = e.replace(et, en); return function (e) { var n = void 0 !== e.getAttributeNode && e.getAttributeNode("id"); return n && n.value === t } }, r.find.ID = function (e, t) { if (void 0 !== t.getElementById && g) { var n, r, i, o = t.getElementById(e); if (o) { if ((n = o.getAttributeNode("id")) && n.value === e) return [o]; for (i = t.getElementsByName(e), r = 0; o = i[r++];)if ((n = o.getAttributeNode("id")) && n.value === e) return [o] } return [] } }), r.find.TAG = n.getElementsByTagName ? function (e, t) { return void 0 !== t.getElementsByTagName ? t.getElementsByTagName(e) : n.qsa ? t.querySelectorAll(e) : void 0 } : function (e, t) { var n, r = [], i = 0, o = t.getElementsByTagName(e); if ("*" === e) { for (; n = o[i++];)1 === n.nodeType && r.push(n); return r } return o }, r.find.CLASS = n.getElementsByClassName && function (e, t) { if (void 0 !== t.getElementsByClassName && g) return t.getElementsByClassName(e) }, m = [], v = [], (n.qsa = J.test(d.querySelectorAll)) && (ef(function (e) { var t; h.appendChild(e).innerHTML = "", e.querySelectorAll("[msallowcapture^='']").length && v.push("[*^$]=" + O + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || v.push("\\[" + O + "*(?:value|" + P + ")"), e.querySelectorAll("[id~=" + x + "-]").length || v.push("~="), (t = d.createElement("input")).setAttribute("name", ""), e.appendChild(t), e.querySelectorAll("[name='']").length || v.push("\\[" + O + "*name" + O + "*=" + O + "*(?:''|\"\")"), e.querySelectorAll(":checked").length || v.push(":checked"), e.querySelectorAll("a#" + x + "+*").length || v.push(".#.+[+~]"), e.querySelectorAll("\\\f"), v.push("[\\r\\n\\f]") }), ef(function (e) { e.innerHTML = ""; var t = d.createElement("input"); t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && v.push("name" + O + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && v.push(":enabled", ":disabled"), h.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && v.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), v.push(",.*:") })), (n.matchesSelector = J.test(y = h.matches || h.webkitMatchesSelector || h.mozMatchesSelector || h.oMatchesSelector || h.msMatchesSelector)) && ef(function (e) { n.disconnectedMatch = y.call(e, "*"), y.call(e, "[s!='']:x"), m.push("!=", W) }), n.cssSupportsSelector || v.push(":has"), v = v.length && RegExp(v.join("|")), m = m.length && RegExp(m.join("|")), $ = (t = J.test(h.compareDocumentPosition)) || J.test(h.contains) ? function (e, t) { var n = 9 === e.nodeType && e.documentElement || e, r = t && t.parentNode; return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))) } : function (e, t) { if (t) { for (; t = t.parentNode;)if (t === e) return !0 } return !1 }, E = t ? function (e, t) { if (e === t) return f = !0, 0; var r = !e.compareDocumentPosition - !t.compareDocumentPosition; return r || (1 & (r = (e.ownerDocument || e) == (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !n.sortDetached && t.compareDocumentPosition(e) === r ? e == d || e.ownerDocument == b && $(b, e) ? -1 : t == d || t.ownerDocument == b && $(b, t) ? 1 : c ? H(c, e) - H(c, t) : 0 : 4 & r ? -1 : 1) } : function (e, t) { if (e === t) return f = !0, 0; var n, r = 0, i = e.parentNode, o = t.parentNode, s = [e], a = [t]; if (!i || !o) return e == d ? -1 : t == d ? 1 : i ? -1 : o ? 1 : c ? H(c, e) - H(c, t) : 0; if (i === o) return ed(e, t); for (n = e; n = n.parentNode;)s.unshift(n); for (n = t; n = n.parentNode;)a.unshift(n); for (; s[r] === a[r];)r++; return r ? ed(s[r], a[r]) : s[r] == b ? -1 : a[r] == b ? 1 : 0 }), d }, eu.matches = function (e, t) { return eu(e, null, null, t) }, eu.matchesSelector = function (e, t) { if (p(e), n.matchesSelector && g && !k[t + " "] && (!m || !m.test(t)) && (!v || !v.test(t))) try { var r = y.call(e, t); if (r || n.disconnectedMatch || e.document && 11 !== e.document.nodeType) return r } catch (i) { k(t, !0) } return 0 < eu(t, d, null, [e]).length }, eu.contains = function (e, t) { return (e.ownerDocument || e) != d && p(e), $(e, t) }, eu.attr = function (e, t) { (e.ownerDocument || e) != d && p(e); var i = r.attrHandle[t.toLowerCase()], o = i && N.call(r.attrHandle, t.toLowerCase()) ? i(e, t, !g) : void 0; return void 0 !== o ? o : n.attributes || !g ? e.getAttribute(t) : (o = e.getAttributeNode(t)) && o.specified ? o.value : null }, eu.escape = function (e) { return (e + "").replace(er, ei) }, eu.error = function (e) { throw Error("Syntax error, unrecognized expression: " + e) }, eu.uniqueSort = function (e) { var t, r = [], i = 0, o = 0; if (f = !n.detectDuplicates, c = !n.sortStable && e.slice(0), e.sort(E), f) { for (; t = e[o++];)t === e[o] && (i = r.push(o)); for (; i--;)e.splice(r[i], 1) } return c = null, e }, i = eu.getText = function (e) { var t, n = "", r = 0, o = e.nodeType; if (o) { if (1 === o || 9 === o || 11 === o) { if ("string" == typeof e.textContent) return e.textContent; for (e = e.firstChild; e; e = e.nextSibling)n += i(e) } else if (3 === o || 4 === o) return e.nodeValue } else for (; t = e[r++];)n += i(t); return n }, (r = eu.selectors = { cacheLength: 50, createPseudo: ec, match: G, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function (e) { return e[1] = e[1].replace(et, en), e[3] = (e[3] || e[4] || e[5] || "").replace(et, en), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) }, CHILD: function (e) { return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || eu.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && eu.error(e[0]), e }, PSEUDO: function (e) { var t, n = !e[6] && e[2]; return G.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && U.test(n) && (t = s(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) } }, filter: { TAG: function (e) { var t = e.replace(et, en).toLowerCase(); return "*" === e ? function () { return !0 } : function (e) { return e.nodeName && e.nodeName.toLowerCase() === t } }, CLASS: function (e) { var t = w[e + " "]; return t || (t = RegExp("(^|" + O + ")" + e + "(" + O + "|$)"), w(e, function (e) { return t.test("string" == typeof e.className && e.className || void 0 !== e.getAttribute && e.getAttribute("class") || "") })) }, ATTR: function (e, t, n) { return function (r) { var i = eu.attr(r, e); return null == i ? "!=" === t : !t || (i += "", "=" === t ? i === n : "!=" === t ? i !== n : "^=" === t ? n && 0 === i.indexOf(n) : "*=" === t ? n && -1 < i.indexOf(n) : "$=" === t ? n && i.slice(-n.length) === n : "~=" === t ? -1 < (" " + i.replace(B, " ") + " ").indexOf(n) : "|=" === t && (i === n || i.slice(0, n.length + 1) === n + "-")) } }, CHILD: function (e, t, n, r, i) { var o = "nth" !== e.slice(0, 3), s = "last" !== e.slice(-4), a = "of-type" === t; return 1 === r && 0 === i ? function (e) { return !!e.parentNode } : function (t, n, u) { var l, c, f, p, d, h, g = o !== s ? "nextSibling" : "previousSibling", v = t.parentNode, m = a && t.nodeName.toLowerCase(), y = !u && !a, $ = !1; if (v) { if (o) { for (; g;) { for (p = t; p = p[g];)if (a ? p.nodeName.toLowerCase() === m : 1 === p.nodeType) return !1; h = g = "only" === e && !h && "nextSibling" } return !0 } if (h = [s ? v.firstChild : v.lastChild], s && y) { for ($ = (d = (l = (c = (f = (p = v)[x] || (p[x] = {}))[p.uniqueID] || (f[p.uniqueID] = {}))[e] || [])[0] === _ && l[1]) && l[2], p = d && v.childNodes[d]; p = ++d && p && p[g] || ($ = d = 0) || h.pop();)if (1 === p.nodeType && ++$ && p === t) { c[e] = [_, d, $]; break } } else if (y && ($ = d = (l = (c = (f = (p = t)[x] || (p[x] = {}))[p.uniqueID] || (f[p.uniqueID] = {}))[e] || [])[0] === _ && l[1]), !1 === $) for (; (p = ++d && p && p[g] || ($ = d = 0) || h.pop()) && (!((a ? p.nodeName.toLowerCase() === m : 1 === p.nodeType) && ++$) || (y && ((c = (f = p[x] || (p[x] = {}))[p.uniqueID] || (f[p.uniqueID] = {}))[e] = [_, $]), p !== t));); return ($ -= i) === r || $ % r == 0 && 0 <= $ / r } } }, PSEUDO: function (e, t) { var n, i = r.pseudos[e] || r.setFilters[e.toLowerCase()] || eu.error("unsupported pseudo: " + e); return i[x] ? i(t) : 1 < i.length ? (n = [e, e, "", t], r.setFilters.hasOwnProperty(e.toLowerCase()) ? ec(function (e, n) { for (var r, o = i(e, t), s = o.length; s--;)e[r = H(e, o[s])] = !(n[r] = o[s]) }) : function (e) { return i(e, 0, n) }) : i } }, pseudos: { not: ec(function (e) { var t = [], n = [], r = a(e.replace(R, "$1")); return r[x] ? ec(function (e, t, n, i) { for (var o, s = r(e, null, i, []), a = e.length; a--;)(o = s[a]) && (e[a] = !(t[a] = o)) }) : function (e, i, o) { return t[0] = e, r(t, null, o, n), t[0] = null, !n.pop() } }), has: ec(function (e) { return function (t) { return 0 < eu(e, t).length } }), contains: ec(function (e) { return e = e.replace(et, en), function (t) { return -1 < (t.textContent || i(t)).indexOf(e) } }), lang: ec(function (e) { return V.test(e || "") || eu.error("unsupported lang: " + e), e = e.replace(et, en).toLowerCase(), function (t) { var n; do if (n = g ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return (n = n.toLowerCase()) === e || 0 === n.indexOf(e + "-"); while ((t = t.parentNode) && 1 === t.nodeType); return !1 } }), target: function (t) { var n = e.location && e.location.hash; return n && n.slice(1) === t.id }, root: function (e) { return e === h }, focus: function (e) { return e === d.activeElement && (!d.hasFocus || d.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) }, enabled: ev(!1), disabled: ev(!0), checked: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && !!e.checked || "option" === t && !!e.selected }, selected: function (e) { return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected }, empty: function (e) { for (e = e.firstChild; e; e = e.nextSibling)if (e.nodeType < 6) return !1; return !0 }, parent: function (e) { return !r.pseudos.empty(e) }, header: function (e) { return K.test(e.nodeName) }, input: function (e) { return Q.test(e.nodeName) }, button: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && "button" === e.type || "button" === t }, text: function (e) { var t; return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) }, first: em(function () { return [0] }), last: em(function (e, t) { return [t - 1] }), eq: em(function (e, t, n) { return [n < 0 ? n + t : n] }), even: em(function (e, t) { for (var n = 0; n < t; n += 2)e.push(n); return e }), odd: em(function (e, t) { for (var n = 1; n < t; n += 2)e.push(n); return e }), lt: em(function (e, t, n) { for (var r = n < 0 ? n + t : t < n ? t : n; 0 <= --r;)e.push(r); return e }), gt: em(function (e, t, n) { for (var r = n < 0 ? n + t : n; ++r < t;)e.push(r); return e }) } }).pseudos.nth = r.pseudos.eq, { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) r.pseudos[t] = eh(t); for (t in { submit: !0, reset: !0 }) r.pseudos[t] = eg(t); function e$() { } function ex(e) { for (var t = 0, n = e.length, r = ""; t < n; t++)r += e[t].value; return r } function eb(e, t, n) { var r = t.dir, i = t.next, o = i || r, s = n && "parentNode" === o, a = T++; return t.first ? function (t, n, i) { for (; t = t[r];)if (1 === t.nodeType || s) return e(t, n, i); return !1 } : function (t, n, u) { var l, c, f, p = [_, a]; if (u) { for (; t = t[r];)if ((1 === t.nodeType || s) && e(t, n, u)) return !0 } else for (; t = t[r];)if (1 === t.nodeType || s) { if (c = (f = t[x] || (t[x] = {}))[t.uniqueID] || (f[t.uniqueID] = {}), i && i === t.nodeName.toLowerCase()) t = t[r] || t; else { if ((l = c[o]) && l[0] === _ && l[1] === a) return p[2] = l[2]; if ((c[o] = p)[2] = e(t, n, u)) return !0 } } return !1 } } function e_(e) { return 1 < e.length ? function (t, n, r) { for (var i = e.length; i--;)if (!e[i](t, n, r)) return !1; return !0 } : e[0] } function eT(e, t, n, r, i) { for (var o, s = [], a = 0, u = e.length, l = null != t; a < u; a++)(o = e[a]) && (n && !n(o, r, i) || (s.push(o), l && t.push(a))); return s } function ew(e, t, n, r, i, o) { return r && !r[x] && (r = ew(r)), i && !i[x] && (i = ew(i, o)), ec(function (o, s, a, u) { var l, c, f, p = [], d = [], h = s.length, g = o || function (e, t, n) { for (var r = 0, i = t.length; r < i; r++)eu(e, t[r], n); return n }(t || "*", a.nodeType ? [a] : a, []), v = e && (o || !t) ? eT(g, p, e, a, u) : g, m = n ? i || (o ? e : h || r) ? [] : s : v; if (n && n(v, m, a, u), r) for (l = eT(m, d), r(l, [], a, u), c = l.length; c--;)(f = l[c]) && (m[d[c]] = !(v[d[c]] = f)); if (o) { if (i || e) { if (i) { for (l = [], c = m.length; c--;)(f = m[c]) && l.push(v[c] = f); i(null, m = [], l, u) } for (c = m.length; c--;)(f = m[c]) && -1 < (l = i ? H(o, f) : p[c]) && (o[l] = !(s[l] = f)) } } else m = eT(m === s ? m.splice(h, m.length) : m), i ? i(null, s, m, u) : q.apply(s, m) }) } function eC(e) { for (var t, n, i, o = e.length, s = r.relative[e[0].type], a = s || r.relative[" "], u = s ? 1 : 0, c = eb(function (e) { return e === t }, a, !0), f = eb(function (e) { return -1 < H(t, e) }, a, !0), p = [function (e, n, r) { var i = !s && (r || n !== l) || ((t = n).nodeType ? c(e, n, r) : f(e, n, r)); return t = null, i },]; u < o; u++)if (n = r.relative[e[u].type]) p = [eb(e_(p), n)]; else { if ((n = r.filter[e[u].type].apply(null, e[u].matches))[x]) { for (i = ++u; i < o && !r.relative[e[i].type]; i++); return ew(1 < u && e_(p), 1 < u && ex(e.slice(0, u - 1).concat({ value: " " === e[u - 2].type ? "*" : "" })).replace(R, "$1"), n, u < i && eC(e.slice(u, i)), i < o && eC(e = e.slice(i)), i < o && ex(e)) } p.push(n) } return e_(p) } return e$.prototype = r.filters = r.pseudos, r.setFilters = new e$, s = eu.tokenize = function (e, t) { var n, i, o, s, a, u, l, c = C[e + " "]; if (c) return t ? 0 : c.slice(0); for (a = e, u = [], l = r.preFilter; a;) { for (s in (!n || (i = F.exec(a))) && (i && (a = a.slice(i[0].length) || a), u.push(o = [])), n = !1, (i = z.exec(a)) && (n = i.shift(), o.push({ value: n, type: i[0].replace(R, " ") }), a = a.slice(n.length)), r.filter) (i = G[s].exec(a)) && (!l[s] || (i = l[s](i))) && (n = i.shift(), o.push({ value: n, type: s, matches: i }), a = a.slice(n.length)); if (!n) break } return t ? a.length : a ? eu.error(e) : C(e, u).slice(0) }, a = eu.compile = function (e, t) { var n, i, o, a, u, c, f = [], h = [], v = S[e + " "]; if (!v) { for (t || (t = s(e)), n = t.length; n--;)(v = eC(t[n]))[x] ? f.push(v) : h.push(v); (v = S(e, (i = h, a = 0 < (o = f).length, u = 0 < i.length, c = function (e, t, n, s, c) { var f, h, v, m = 0, y = "0", $ = e && [], x = [], b = l, T = e || u && r.find.TAG("*", c), w = _ += null == b ? 1 : Math.random() || .1, C = T.length; for (c && (l = t == d || t || c); y !== C && null != (f = T[y]); y++) { if (u && f) { for (h = 0, t || f.ownerDocument == d || (p(f), n = !g); v = i[h++];)if (v(f, t || d, n)) { s.push(f); break } c && (_ = w) } a && ((f = !v && f) && m--, e && $.push(f)) } if (m += y, a && y !== m) { for (h = 0; v = o[h++];)v($, x, t, n); if (e) { if (0 < m) for (; y--;)$[y] || x[y] || (x[y] = D.call(s)); x = eT(x) } q.apply(s, x), c && !e && 0 < x.length && 1 < m + o.length && eu.uniqueSort(s) } return c && (_ = w, l = b), $ }, a ? ec(c) : c))).selector = e } return v }, u = eu.select = function (e, t, n, i) { var o, u, l, c, f, p = "function" == typeof e && e, d = !i && s(e = p.selector || e); if (n = n || [], 1 === d.length) { if (2 < (u = d[0] = d[0].slice(0)).length && "ID" === (l = u[0]).type && 9 === t.nodeType && g && r.relative[u[1].type]) { if (!(t = (r.find.ID(l.matches[0].replace(et, en), t) || [])[0])) return n; p && (t = t.parentNode), e = e.slice(u.shift().value.length) } for (o = G.needsContext.test(e) ? 0 : u.length; o-- && (l = u[o], !r.relative[c = l.type]);)if ((f = r.find[c]) && (i = f(l.matches[0].replace(et, en), ee.test(u[0].type) && ey(t.parentNode) || t))) { if (u.splice(o, 1), !(e = i.length && ex(u))) return q.apply(n, i), n; break } } return (p || a(e, d))(i, t, !g, n, !t || ee.test(e) && ey(t.parentNode) || t), n }, n.sortStable = x.split("").sort(E).join("") === x, n.detectDuplicates = !!f, p(), n.sortDetached = ef(function (e) { return 1 & e.compareDocumentPosition(d.createElement("fieldset")) }), ef(function (e) { return e.innerHTML = "", "#" === e.firstChild.getAttribute("href") }) || ep("type|href|height|width", function (e, t, n) { if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) }), n.attributes && ef(function (e) { return e.innerHTML = "", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") }) || ep("value", function (e, t, n) { if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue }), ef(function (e) { return null == e.getAttribute("disabled") }) || ep(P, function (e, t, n) { var r; if (!n) return !0 === e[t] ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null }), eu }(e); b.find = T, b.expr = T.selectors, b.expr[":"] = b.expr.pseudos, b.uniqueSort = b.unique = T.uniqueSort, b.text = T.getText, b.isXMLDoc = T.isXML, b.contains = T.contains, b.escapeSelector = T.escape; var w = function (e, t, n) { for (var r = [], i = void 0 !== n; (e = e[t]) && 9 !== e.nodeType;)if (1 === e.nodeType) { if (i && b(e).is(n)) break; r.push(e) } return r }, C = function (e, t) { for (var n = []; e; e = e.nextSibling)1 === e.nodeType && e !== t && n.push(e); return n }, S = b.expr.match.needsContext; function k(e, t) { return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() } var E = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; function N(e, t, n) { return h(t) ? b.grep(e, function (e, r) { return !!t.call(e, r, e) !== n }) : t.nodeType ? b.grep(e, function (e) { return e === t !== n }) : "string" != typeof t ? b.grep(e, function (e) { return -1 < a.call(t, e) !== n }) : b.filter(t, e, n) } b.filter = function (e, t, n) { var r = t[0]; return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType ? b.find.matchesSelector(r, e) ? [r] : [] : b.find.matches(e, b.grep(t, function (e) { return 1 === e.nodeType })) }, b.fn.extend({ find: function (e) { var t, n, r = this.length, i = this; if ("string" != typeof e) return this.pushStack(b(e).filter(function () { for (t = 0; t < r; t++)if (b.contains(i[t], this)) return !0 })); for (n = this.pushStack([]), t = 0; t < r; t++)b.find(e, i[t], n); return 1 < r ? b.uniqueSort(n) : n }, filter: function (e) { return this.pushStack(N(this, e || [], !1)) }, not: function (e) { return this.pushStack(N(this, e || [], !0)) }, is: function (e) { return !!N(this, "string" == typeof e && S.test(e) ? b(e) : e || [], !1).length } }); var A, D = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; (b.fn.init = function (e, t, n) { var r, i; if (!e) return this; if (n = n || A, "string" == typeof e) { if (!(r = "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length ? [null, e, null] : D.exec(e)) || !r[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); if (r[1]) { if (t = t instanceof b ? t[0] : t, b.merge(this, b.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : v, !0)), E.test(r[1]) && b.isPlainObject(t)) for (r in t) h(this[r]) ? this[r](t[r]) : this.attr(r, t[r]); return this } return (i = v.getElementById(r[2])) && (this[0] = i, this.length = 1), this } return e.nodeType ? (this[0] = e, this.length = 1, this) : h(e) ? void 0 !== n.ready ? n.ready(e) : e(b) : b.makeArray(e, this) }).prototype = b.fn, A = b(v); var j = /^(?:parents|prev(?:Until|All))/, q = { children: !0, contents: !0, next: !0, prev: !0 }; function L(e, t) { for (; (e = e[t]) && 1 !== e.nodeType;); return e } b.fn.extend({ has: function (e) { var t = b(e, this), n = t.length; return this.filter(function () { for (var e = 0; e < n; e++)if (b.contains(this, t[e])) return !0 }) }, closest: function (e, t) { var n, r = 0, i = this.length, o = [], s = "string" != typeof e && b(e); if (!S.test(e)) { for (; r < i; r++)for (n = this[r]; n && n !== t; n = n.parentNode)if (n.nodeType < 11 && (s ? -1 < s.index(n) : 1 === n.nodeType && b.find.matchesSelector(n, e))) { o.push(n); break } } return this.pushStack(1 < o.length ? b.uniqueSort(o) : o) }, index: function (e) { return e ? "string" == typeof e ? a.call(b(e), this[0]) : a.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (e, t) { return this.pushStack(b.uniqueSort(b.merge(this.get(), b(e, t)))) }, addBack: function (e) { return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) } }), b.each({ parent: function (e) { var t = e.parentNode; return t && 11 !== t.nodeType ? t : null }, parents: function (e) { return w(e, "parentNode") }, parentsUntil: function (e, t, n) { return w(e, "parentNode", n) }, next: function (e) { return L(e, "nextSibling") }, prev: function (e) { return L(e, "previousSibling") }, nextAll: function (e) { return w(e, "nextSibling") }, prevAll: function (e) { return w(e, "previousSibling") }, nextUntil: function (e, t, n) { return w(e, "nextSibling", n) }, prevUntil: function (e, t, n) { return w(e, "previousSibling", n) }, siblings: function (e) { return C((e.parentNode || {}).firstChild, e) }, children: function (e) { return C(e.firstChild) }, contents: function (e) { return null != e.contentDocument && r(e.contentDocument) ? e.contentDocument : (k(e, "template") && (e = e.content || e), b.merge([], e.childNodes)) } }, function (e, t) { b.fn[e] = function (n, r) { var i = b.map(this, t, n); return "Until" !== e.slice(-5) && (r = n), r && "string" == typeof r && (i = b.filter(r, i)), 1 < this.length && (q[e] || b.uniqueSort(i), j.test(e) && i.reverse()), this.pushStack(i) } }); var H = /[^\x20\t\r\n\f]+/g; function P(e) { return e } function O(e) { throw e } function I(e, t, n, r) { var i; try { e && h(i = e.promise) ? i.call(e).done(t).fail(n) : e && h(i = e.then) ? i.call(e, t, n) : t.apply(void 0, [e].slice(r)) } catch (o) { n.apply(void 0, [o]) } } b.Callbacks = function (e) { e = "string" == typeof e ? (t = e, n = {}, b.each(t.match(H) || [], function (e, t) { n[t] = !0 }), n) : b.extend({}, e); var t, n, r, i, o, s, a = [], u = [], l = -1, c = function () { for (s = s || e.once, o = r = !0; u.length; l = -1)for (i = u.shift(); ++l < a.length;)!1 === a[l].apply(i[0], i[1]) && e.stopOnFalse && (l = a.length, i = !1); e.memory || (i = !1), r = !1, s && (a = i ? [] : "") }, f = { add: function () { return a && (i && !r && (l = a.length - 1, u.push(i)), function t(n) { b.each(n, function (n, r) { h(r) ? e.unique && f.has(r) || a.push(r) : r && r.length && "string" !== $(r) && t(r) }) }(arguments), i && !r && c()), this }, remove: function () { return b.each(arguments, function (e, t) { for (var n; -1 < (n = b.inArray(t, a, n));)a.splice(n, 1), n <= l && l-- }), this }, has: function (e) { return e ? -1 < b.inArray(e, a) : 0 < a.length }, empty: function () { return a && (a = []), this }, disable: function () { return s = u = [], a = i = "", this }, disabled: function () { return !a }, lock: function () { return s = u = [], i || r || (a = i = ""), this }, locked: function () { return !!s }, fireWith: function (e, t) { return s || (t = [e, (t = t || []).slice ? t.slice() : t], u.push(t), r || c()), this }, fire: function () { return f.fireWith(this, arguments), this }, fired: function () { return !!o } }; return f }, b.extend({ Deferred: function (t) { var n = [["notify", "progress", b.Callbacks("memory"), b.Callbacks("memory"), 2,], ["resolve", "done", b.Callbacks("once memory"), b.Callbacks("once memory"), 0, "resolved",], ["reject", "fail", b.Callbacks("once memory"), b.Callbacks("once memory"), 1, "rejected",],], r = "pending", i = { state: function () { return r }, always: function () { return o.done(arguments).fail(arguments), this }, catch: function (e) { return i.then(null, e) }, pipe: function () { var e = arguments; return b.Deferred(function (t) { b.each(n, function (n, r) { var i = h(e[r[4]]) && e[r[4]]; o[r[1]](function () { var e = i && i.apply(this, arguments); e && h(e.promise) ? e.promise().progress(t.notify).done(t.resolve).fail(t.reject) : t[r[0] + "With"](this, i ? [e] : arguments) }) }), e = null }).promise() }, then: function (t, r, i) { var o = 0; function s(t, n, r, i) { return function () { var a = this, u = arguments, l = function () { var e, l; if (!(t < o)) { if ((e = r.apply(a, u)) === n.promise()) throw TypeError("Thenable self-resolution"); h(l = e && ("object" == typeof e || "function" == typeof e) && e.then) ? i ? l.call(e, s(o, n, P, i), s(o, n, O, i)) : (o++, l.call(e, s(o, n, P, i), s(o, n, O, i), s(o, n, P, n.notifyWith))) : (r !== P && (a = void 0, u = [e]), (i || n.resolveWith)(a, u)) } }, c = i ? l : function () { try { l() } catch (e) { b.Deferred.exceptionHook && b.Deferred.exceptionHook(e, c.stackTrace), o <= t + 1 && (r !== O && (a = void 0, u = [e]), n.rejectWith(a, u)) } }; t ? c() : (b.Deferred.getStackHook && (c.stackTrace = b.Deferred.getStackHook()), e.setTimeout(c)) } } return b.Deferred(function (e) { n[0][3].add(s(0, e, h(i) ? i : P, e.notifyWith)), n[1][3].add(s(0, e, h(t) ? t : P)), n[2][3].add(s(0, e, h(r) ? r : O)) }).promise() }, promise: function (e) { return null != e ? b.extend(e, i) : i } }, o = {}; return b.each(n, function (e, t) { var s = t[2], a = t[5]; i[t[1]] = s.add, a && s.add(function () { r = a }, n[3 - e][2].disable, n[3 - e][3].disable, n[0][2].lock, n[0][3].lock), s.add(t[3].fire), o[t[0]] = function () { return o[t[0] + "With"](this === o ? void 0 : this, arguments), this }, o[t[0] + "With"] = s.fireWith }), i.promise(o), t && t.call(o, o), o }, when: function (e) { var t = arguments.length, n = t, r = Array(n), o = i.call(arguments), s = b.Deferred(), a = function (e) { return function (n) { r[e] = this, o[e] = 1 < arguments.length ? i.call(arguments) : n, --t || s.resolveWith(r, o) } }; if (t <= 1 && (I(e, s.done(a(n)).resolve, s.reject, !t), "pending" === s.state() || h(o[n] && o[n].then))) return s.then(); for (; n--;)I(o[n], a(n), s.reject); return s.promise() } }); var M = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; b.Deferred.exceptionHook = function (t, n) { e.console && e.console.warn && t && M.test(t.name) && e.console.warn("jQuery.Deferred exception: " + t.message, t.stack, n) }, b.readyException = function (e) { }; var W = b.Deferred(); function B() { v.removeEventListener("DOMContentLoaded", B), e.removeEventListener("load", B), b.ready() } b.fn.ready = function (e) { return W.then(e).catch(function (e) { b.readyException(e) }), this }, b.extend({ isReady: !1, readyWait: 1, ready: function (e) { (!0 === e ? --b.readyWait : b.isReady) || (b.isReady = !0) !== e && 0 < --b.readyWait || W.resolveWith(v, [b]) } }), b.ready.then = W.then, "complete" !== v.readyState && ("loading" === v.readyState || v.documentElement.doScroll) ? (v.addEventListener("DOMContentLoaded", B), e.addEventListener("load", B)) : e.setTimeout(b.ready); var R = function (e, t, n, r, i, o, s) { var a = 0, u = e.length, l = null == n; if ("object" === $(n)) for (a in i = !0, n) R(e, t, a, n[a], !0, o, s); else if (void 0 !== r && (i = !0, h(r) || (s = !0), l && (s ? (t.call(e, r), t = null) : (l = t, t = function (e, t, n) { return l.call(b(e), n) })), t)) for (; a < u; a++)t(e[a], n, s ? r : r.call(e[a], a, t(e[a], n))); return i ? e : l ? t.call(e) : u ? t(e[0], n) : o }, F = /^-ms-/, z = /-([a-z])/g; function X(e, t) { return t.toUpperCase() } function U(e) { return e.replace(F, "ms-").replace(z, X) } var V = function (e) { return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType }; function G() { this.expando = b.expando + G.uid++ } G.uid = 1, G.prototype = { cache: function (e) { var t = e[this.expando]; return t || (t = {}, V(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { value: t, configurable: !0 }))), t }, set: function (e, t, n) { var r, i = this.cache(e); if ("string" == typeof t) i[U(t)] = n; else for (r in t) i[U(r)] = t[r]; return i }, get: function (e, t) { return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][U(t)] }, access: function (e, t, n) { return void 0 === t || t && "string" == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t) }, remove: function (e, t) { var n, r = e[this.expando]; if (void 0 !== r) { if (void 0 !== t) for (n = (t = Array.isArray(t) ? t.map(U) : ((t = U(t)) in r) ? [t] : t.match(H) || []).length; n--;)delete r[t[n]]; (void 0 === t || b.isEmptyObject(r)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) } }, hasData: function (e) { var t = e[this.expando]; return void 0 !== t && !b.isEmptyObject(t) } }; var Y = new G, Q = new G, K = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, J = /[A-Z]/g; function Z(e, t, n) { var r, i; if (void 0 === n && 1 === e.nodeType) { if (r = "data-" + t.replace(J, "-$&").toLowerCase(), "string" == typeof (n = e.getAttribute(r))) { try { n = "true" === (i = n) || "false" !== i && ("null" === i ? null : i === +i + "" ? +i : K.test(i) ? JSON.parse(i) : i) } catch (o) { } Q.set(e, t, n) } else n = void 0 } return n } b.extend({ hasData: function (e) { return Q.hasData(e) || Y.hasData(e) }, data: function (e, t, n) { return Q.access(e, t, n) }, removeData: function (e, t) { Q.remove(e, t) }, _data: function (e, t, n) { return Y.access(e, t, n) }, _removeData: function (e, t) { Y.remove(e, t) } }), b.fn.extend({ data: function (e, t) { var n, r, i, o = this[0], s = o && o.attributes; if (void 0 === e) { if (this.length && (i = Q.get(o), 1 === o.nodeType && !Y.get(o, "hasDataAttrs"))) { for (n = s.length; n--;)s[n] && 0 === (r = s[n].name).indexOf("data-") && Z(o, r = U(r.slice(5)), i[r]); Y.set(o, "hasDataAttrs", !0) } return i } return "object" == typeof e ? this.each(function () { Q.set(this, e) }) : R(this, function (t) { var n; if (o && void 0 === t) return void 0 !== (n = Q.get(o, e)) ? n : void 0 !== (n = Z(o, e)) ? n : void 0; this.each(function () { Q.set(this, e, t) }) }, null, t, 1 < arguments.length, null, !0) }, removeData: function (e) { return this.each(function () { Q.remove(this, e) }) } }), b.extend({ queue: function (e, t, n) { var r; if (e) return t = (t || "fx") + "queue", r = Y.get(e, t), n && (!r || Array.isArray(n) ? r = Y.access(e, t, b.makeArray(n)) : r.push(n)), r || [] }, dequeue: function (e, t) { t = t || "fx"; var n = b.queue(e, t), r = n.length, i = n.shift(), o = b._queueHooks(e, t); "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, function () { b.dequeue(e, t) }, o)), !r && o && o.empty.fire() }, _queueHooks: function (e, t) { var n = t + "queueHooks"; return Y.get(e, n) || Y.access(e, n, { empty: b.Callbacks("once memory").add(function () { Y.remove(e, [t + "queue", n]) }) }) } }), b.fn.extend({ queue: function (e, t) { var n = 2; return "string" != typeof e && (t = e, e = "fx", n--), arguments.length < n ? b.queue(this[0], e) : void 0 === t ? this : this.each(function () { var n = b.queue(this, e, t); b._queueHooks(this, e), "fx" === e && "inprogress" !== n[0] && b.dequeue(this, e) }) }, dequeue: function (e) { return this.each(function () { b.dequeue(this, e) }) }, clearQueue: function (e) { return this.queue(e || "fx", []) }, promise: function (e, t) { var n, r = 1, i = b.Deferred(), o = this, s = this.length, a = function () { --r || i.resolveWith(o, [o]) }; for ("string" != typeof e && (t = e, e = void 0), e = e || "fx"; s--;)(n = Y.get(o[s], e + "queueHooks")) && n.empty && (r++, n.empty.add(a)); return a(), i.promise(t) } }); var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, et = RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"), en = ["Top", "Right", "Bottom", "Left"], er = v.documentElement, ei = function (e) { return b.contains(e.ownerDocument, e) }, eo = { composed: !0 }; er.getRootNode && (ei = function (e) { return b.contains(e.ownerDocument, e) || e.getRootNode(eo) === e.ownerDocument }); var es = function (e, t) { return "none" === (e = t || e).style.display || "" === e.style.display && ei(e) && "none" === b.css(e, "display") }; function ea(e, t, n, r) { var i, o, s = 20, a = r ? function () { return r.cur() } : function () { return b.css(e, t, "") }, u = a(), l = n && n[3] || (b.cssNumber[t] ? "" : "px"), c = e.nodeType && (b.cssNumber[t] || "px" !== l && +u) && et.exec(b.css(e, t)); if (c && c[3] !== l) { for (u /= 2, l = l || c[3], c = +u || 1; s--;)b.style(e, t, c + l), (1 - o) * (1 - (o = a() / u || .5)) <= 0 && (s = 0), c /= o; c *= 2, b.style(e, t, c + l), n = n || [] } return n && (c = +c || +u || 0, i = n[1] ? c + (n[1] + 1) * n[2] : +n[2], r && (r.unit = l, r.start = c, r.end = i)), i } var eu = {}; function el(e, t) { for (var n, r, i, o, s, a, u, l = [], c = 0, f = e.length; c < f; c++)(r = e[c]).style && (n = r.style.display, t ? ("none" === n && (l[c] = Y.get(r, "display") || null, l[c] || (r.style.display = "")), "" === r.style.display && es(r) && (l[c] = (u = s = o = void 0, s = (i = r).ownerDocument, (u = eu[a = i.nodeName]) || (o = s.body.appendChild(s.createElement(a)), u = b.css(o, "display"), o.parentNode.removeChild(o), "none" === u && (u = "block"), eu[a] = u)))) : "none" !== n && (l[c] = "none", Y.set(r, "display", n))); for (c = 0; c < f; c++)null != l[c] && (e[c].style.display = l[c]); return e } b.fn.extend({ show: function () { return el(this, !0) }, hide: function () { return el(this) }, toggle: function (e) { return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function () { es(this) ? b(this).show() : b(this).hide() }) } }); var ec, ef, ep = /^(?:checkbox|radio)$/i, ed = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i, eh = /^$|^module$|\/(?:java|ecma)script/i; ec = v.createDocumentFragment().appendChild(v.createElement("div")), (ef = v.createElement("input")).setAttribute("type", "radio"), ef.setAttribute("checked", "checked"), ef.setAttribute("name", "t"), ec.appendChild(ef), d.checkClone = ec.cloneNode(!0).cloneNode(!0).lastChild.checked, ec.innerHTML = "", d.noCloneChecked = !!ec.cloneNode(!0).lastChild.defaultValue, ec.innerHTML = "", d.option = !!ec.lastChild; var eg = { thead: [1, "", "
    "], col: [2, "", "
    "], tr: [2, "", "
    "], td: [3, "", "
    "], _default: [0, "", ""] }; function ev(e, t) { var n; return n = void 0 !== e.getElementsByTagName ? e.getElementsByTagName(t || "*") : void 0 !== e.querySelectorAll ? e.querySelectorAll(t || "*") : [], void 0 === t || t && k(e, t) ? b.merge([e], n) : n } function em(e, t) { for (var n = 0, r = e.length; n < r; n++)Y.set(e[n], "globalEval", !t || Y.get(t[n], "globalEval")) } eg.tbody = eg.tfoot = eg.colgroup = eg.caption = eg.thead, eg.th = eg.td, d.option || (eg.optgroup = eg.option = [1, ""]); var ey = /<|&#?\w+;/; function e$(e, t, n, r, i) { for (var o, s, a, u, l, c, f = t.createDocumentFragment(), p = [], d = 0, h = e.length; d < h; d++)if ((o = e[d]) || 0 === o) { if ("object" === $(o)) b.merge(p, o.nodeType ? [o] : o); else if (ey.test(o)) { for (s = s || f.appendChild(t.createElement("div")), u = eg[a = (ed.exec(o) || ["", ""])[1].toLowerCase()] || eg._default, s.innerHTML = u[1] + b.htmlPrefilter(o) + u[2], c = u[0]; c--;)s = s.lastChild; b.merge(p, s.childNodes), (s = f.firstChild).textContent = "" } else p.push(t.createTextNode(o)) } for (f.textContent = "", d = 0; o = p[d++];)if (r && -1 < b.inArray(o, r)) i && i.push(o); else if (l = ei(o), s = ev(f.appendChild(o), "script"), l && em(s), n) for (c = 0; o = s[c++];)eh.test(o.type || "") && n.push(o); return f } var ex = /^([^.]*)(?:\.(.+)|)/; function eb() { return !0 } function e_() { return !1 } function eT(e, t) { return e === function () { try { return v.activeElement } catch (e) { } }() == ("focus" === t) } function ew(e, t, n, r, i, o) { var s, a; if ("object" == typeof t) { for (a in "string" != typeof n && (r = r || n, n = void 0), t) ew(e, a, n, r, t[a], o); return e } if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ("string" == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), !1 === i) i = e_; else if (!i) return e; return 1 === o && (s = i, (i = function (e) { return b().off(e), s.apply(this, arguments) }).guid = s.guid || (s.guid = b.guid++)), e.each(function () { b.event.add(this, t, i, r, n) }) } function eC(e, t, n) { n ? (Y.set(e, t, !1), b.event.add(e, t, { namespace: !1, handler: function (e) { var r, o, s = Y.get(this, t); if (1 & e.isTrigger && this[t]) { if (s.length) (b.event.special[t] || {}).delegateType && e.stopPropagation(); else if (s = i.call(arguments), Y.set(this, t, s), r = n(this, t), this[t](), s !== (o = Y.get(this, t)) || r ? Y.set(this, t, !1) : o = {}, s !== o) return e.stopImmediatePropagation(), e.preventDefault(), o && o.value } else s.length && (Y.set(this, t, { value: b.event.trigger(b.extend(s[0], b.Event.prototype), s.slice(1), this) }), e.stopImmediatePropagation()) } })) : void 0 === Y.get(e, t) && b.event.add(e, t, eb) } b.event = { global: {}, add: function (e, t, n, r, i) { var o, s, a, u, l, c, f, p, d, h, g, v = Y.get(e); if (V(e)) for (n.handler && (n = (o = n).handler, i = o.selector), i && b.find.matchesSelector(er, i), n.guid || (n.guid = b.guid++), (u = v.events) || (u = v.events = Object.create(null)), (s = v.handle) || (s = v.handle = function (t) { return b.event.triggered !== t.type ? b.event.dispatch.apply(e, arguments) : void 0 }), l = (t = (t || "").match(H) || [""]).length; l--;)d = g = (a = ex.exec(t[l]) || [])[1], h = (a[2] || "").split(".").sort(), d && (f = b.event.special[d] || {}, d = (i ? f.delegateType : f.bindType) || d, f = b.event.special[d] || {}, c = b.extend({ type: d, origType: g, data: r, handler: n, guid: n.guid, selector: i, needsContext: i && b.expr.match.needsContext.test(i), namespace: h.join(".") }, o), (p = u[d]) || ((p = u[d] = []).delegateCount = 0, f.setup && !1 !== f.setup.call(e, r, h, s) || e.addEventListener && e.addEventListener(d, s)), f.add && (f.add.call(e, c), c.handler.guid || (c.handler.guid = n.guid)), i ? p.splice(p.delegateCount++, 0, c) : p.push(c), b.event.global[d] = !0) }, remove: function (e, t, n, r, i) { var o, s, a, u, l, c, f, p, d, h, g, v = Y.hasData(e) && Y.get(e); if (v && (u = v.events)) { for (l = (t = (t || "").match(H) || [""]).length; l--;)if (d = g = (a = ex.exec(t[l]) || [])[1], h = (a[2] || "").split(".").sort(), d) { for (f = b.event.special[d] || {}, p = u[d = (r ? f.delegateType : f.bindType) || d] || [], a = a[2] && RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), s = o = p.length; o--;)c = p[o], !i && g !== c.origType || n && n.guid !== c.guid || a && !a.test(c.namespace) || r && r !== c.selector && ("**" !== r || !c.selector) || (p.splice(o, 1), c.selector && p.delegateCount--, f.remove && f.remove.call(e, c)); s && !p.length && (f.teardown && !1 !== f.teardown.call(e, h, v.handle) || b.removeEvent(e, d, v.handle), delete u[d]) } else for (d in u) b.event.remove(e, d + t[l], n, r, !0); b.isEmptyObject(u) && Y.remove(e, "handle events") } }, dispatch: function (e) { var t, n, r, i, o, s, a = Array(arguments.length), u = b.event.fix(e), l = (Y.get(this, "events") || Object.create(null))[u.type] || [], c = b.event.special[u.type] || {}; for (a[0] = u, t = 1; t < arguments.length; t++)a[t] = arguments[t]; if (u.delegateTarget = this, !c.preDispatch || !1 !== c.preDispatch.call(this, u)) { for (s = b.event.handlers.call(this, u, l), t = 0; (i = s[t++]) && !u.isPropagationStopped();)for (u.currentTarget = i.elem, n = 0; (o = i.handlers[n++]) && !u.isImmediatePropagationStopped();)u.rnamespace && !1 !== o.namespace && !u.rnamespace.test(o.namespace) || (u.handleObj = o, u.data = o.data, void 0 !== (r = ((b.event.special[o.origType] || {}).handle || o.handler).apply(i.elem, a)) && !1 === (u.result = r) && (u.preventDefault(), u.stopPropagation())); return c.postDispatch && c.postDispatch.call(this, u), u.result } }, handlers: function (e, t) { var n, r, i, o, s, a = [], u = t.delegateCount, l = e.target; if (u && l.nodeType && !("click" === e.type && 1 <= e.button)) { for (; l !== this; l = l.parentNode || this)if (1 === l.nodeType && ("click" !== e.type || !0 !== l.disabled)) { for (o = [], s = {}, n = 0; n < u; n++)void 0 === s[i = (r = t[n]).selector + " "] && (s[i] = r.needsContext ? -1 < b(i, this).index(l) : b.find(i, this, null, [l]).length), s[i] && o.push(r); o.length && a.push({ elem: l, handlers: o }) } } return l = this, u < t.length && a.push({ elem: l, handlers: t.slice(u) }), a }, addProp: function (e, t) { Object.defineProperty(b.Event.prototype, e, { enumerable: !0, configurable: !0, get: h(t) ? function () { if (this.originalEvent) return t(this.originalEvent) } : function () { if (this.originalEvent) return this.originalEvent[e] }, set: function (t) { Object.defineProperty(this, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) } }) }, fix: function (e) { return e[b.expando] ? e : new b.Event(e) }, special: { load: { noBubble: !0 }, click: { setup: function (e) { var t = this || e; return ep.test(t.type) && t.click && k(t, "input") && eC(t, "click", eb), !1 }, trigger: function (e) { var t = this || e; return ep.test(t.type) && t.click && k(t, "input") && eC(t, "click"), !0 }, _default: function (e) { var t = e.target; return ep.test(t.type) && t.click && k(t, "input") && Y.get(t, "click") || k(t, "a") } }, beforeunload: { postDispatch: function (e) { void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) } } } }, b.removeEvent = function (e, t, n) { e.removeEventListener && e.removeEventListener(t, n) }, b.Event = function (e, t) { if (!(this instanceof b.Event)) return new b.Event(e, t); e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && !1 === e.returnValue ? eb : e_, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, t && b.extend(this, t), this.timeStamp = e && e.timeStamp || Date.now(), this[b.expando] = !0 }, b.Event.prototype = { constructor: b.Event, isDefaultPrevented: e_, isPropagationStopped: e_, isImmediatePropagationStopped: e_, isSimulated: !1, preventDefault: function () { var e = this.originalEvent; this.isDefaultPrevented = eb, e && !this.isSimulated && e.preventDefault() }, stopPropagation: function () { var e = this.originalEvent; this.isPropagationStopped = eb, e && !this.isSimulated && e.stopPropagation() }, stopImmediatePropagation: function () { var e = this.originalEvent; this.isImmediatePropagationStopped = eb, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation() } }, b.each({ altKey: !0, bubbles: !0, cancelable: !0, changedTouches: !0, ctrlKey: !0, detail: !0, eventPhase: !0, metaKey: !0, pageX: !0, pageY: !0, shiftKey: !0, view: !0, char: !0, code: !0, charCode: !0, key: !0, keyCode: !0, button: !0, buttons: !0, clientX: !0, clientY: !0, offsetX: !0, offsetY: !0, pointerId: !0, pointerType: !0, screenX: !0, screenY: !0, targetTouches: !0, toElement: !0, touches: !0, which: !0 }, b.event.addProp), b.each({ focus: "focusin", blur: "focusout" }, function (e, t) { b.event.special[e] = { setup: function () { return eC(this, e, eT), !1 }, trigger: function () { return eC(this, e), !0 }, _default: function (t) { return Y.get(t.target, e) }, delegateType: t } }), b.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (e, t) { b.event.special[e] = { delegateType: t, bindType: t, handle: function (e) { var n, r = e.relatedTarget, i = e.handleObj; return r && (r === this || b.contains(this, r)) || (e.type = i.origType, n = i.handler.apply(this, arguments), e.type = t), n } } }), b.fn.extend({ on: function (e, t, n, r) { return ew(this, e, t, n, r) }, one: function (e, t, n, r) { return ew(this, e, t, n, r, 1) }, off: function (e, t, n) { var r, i; if (e && e.preventDefault && e.handleObj) return r = e.handleObj, b(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this; if ("object" == typeof e) { for (i in e) this.off(i, t, e[i]); return this } return !1 !== t && "function" != typeof t || (n = t, t = void 0), !1 === n && (n = e_), this.each(function () { b.event.remove(this, e, n, t) }) } }); var eS = /\s*$/g; function eN(e, t) { return k(e, "table") && k(11 !== t.nodeType ? t : t.firstChild, "tr") && b(e).children("tbody")[0] || e } function eA(e) { return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e } function eD(e) { return "true/" === (e.type || "").slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute("type"), e } function ej(e, t) { var n, r, i, o, s, a; if (1 === t.nodeType) { if (Y.hasData(e) && (a = Y.get(e).events)) for (i in Y.remove(t, "handle events"), a) for (n = 0, r = a[i].length; n < r; n++)b.event.add(t, i, a[i][n]); Q.hasData(e) && (o = Q.access(e), s = b.extend({}, o), Q.set(t, s)) } } function eq(e, t, n, r) { t = o(t); var i, s, a, u, l, c, f = 0, p = e.length, g = p - 1, v = t[0], m = h(v); if (m || 1 < p && "string" == typeof v && !d.checkClone && ek.test(v)) return e.each(function (i) { var o = e.eq(i); m && (t[0] = v.call(this, i, o.html())), eq(o, t, n, r) }); if (p && (s = (i = e$(t, e[0].ownerDocument, !1, e, r)).firstChild, 1 === i.childNodes.length && (i = s), s || r)) { for (u = (a = b.map(ev(i, "script"), eA)).length; f < p; f++)l = i, f !== g && (l = b.clone(l, !0, !0), u && b.merge(a, ev(l, "script"))), n.call(e[f], l, f); if (u) for (c = a[a.length - 1].ownerDocument, b.map(a, eD), f = 0; f < u; f++)l = a[f], eh.test(l.type || "") && !Y.access(l, "globalEval") && b.contains(c, l) && (l.src && "module" !== (l.type || "").toLowerCase() ? b._evalUrl && !l.noModule && b._evalUrl(l.src, { nonce: l.nonce || l.getAttribute("nonce") }, c) : y(l.textContent.replace(eE, ""), l, c)) } return e } function eL(e, t, n) { for (var r, i = t ? b.filter(t, e) : e, o = 0; null != (r = i[o]); o++)n || 1 !== r.nodeType || b.cleanData(ev(r)), r.parentNode && (n && ei(r) && em(ev(r, "script")), r.parentNode.removeChild(r)); return e } b.extend({ htmlPrefilter: function (e) { return e }, clone: function (e, t, n) { var r, i, o, s, a, u, l, c = e.cloneNode(!0), f = ei(e); if (!(d.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || b.isXMLDoc(e))) for (s = ev(c), r = 0, i = (o = ev(e)).length; r < i; r++)a = o[r], "input" === (l = (u = s[r]).nodeName.toLowerCase()) && ep.test(a.type) ? u.checked = a.checked : "input" !== l && "textarea" !== l || (u.defaultValue = a.defaultValue); if (t) { if (n) for (o = o || ev(e), s = s || ev(c), r = 0, i = o.length; r < i; r++)ej(o[r], s[r]); else ej(e, c) } return 0 < (s = ev(c, "script")).length && em(s, !f && ev(e, "script")), c }, cleanData: function (e) { for (var t, n, r, i = b.event.special, o = 0; void 0 !== (n = e[o]); o++)if (V(n)) { if (t = n[Y.expando]) { if (t.events) for (r in t.events) i[r] ? b.event.remove(n, r) : b.removeEvent(n, r, t.handle); n[Y.expando] = void 0 } n[Q.expando] && (n[Q.expando] = void 0) } } }), b.fn.extend({ detach: function (e) { return eL(this, e, !0) }, remove: function (e) { return eL(this, e) }, text: function (e) { return R(this, function (e) { return void 0 === e ? b.text(this) : this.empty().each(function () { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) }) }, null, e, arguments.length) }, append: function () { return eq(this, arguments, function (e) { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || eN(this, e).appendChild(e) }) }, prepend: function () { return eq(this, arguments, function (e) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var t = eN(this, e); t.insertBefore(e, t.firstChild) } }) }, before: function () { return eq(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this) }) }, after: function () { return eq(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) }) }, empty: function () { for (var e, t = 0; null != (e = this[t]); t++)1 === e.nodeType && (b.cleanData(ev(e, !1)), e.textContent = ""); return this }, clone: function (e, t) { return e = null != e && e, t = null == t ? e : t, this.map(function () { return b.clone(this, e, t) }) }, html: function (e) { return R(this, function (e) { var t = this[0] || {}, n = 0, r = this.length; if (void 0 === e && 1 === t.nodeType) return t.innerHTML; if ("string" == typeof e && !eS.test(e) && !eg[(ed.exec(e) || ["", ""])[1].toLowerCase()]) { e = b.htmlPrefilter(e); try { for (; n < r; n++)1 === (t = this[n] || {}).nodeType && (b.cleanData(ev(t, !1)), t.innerHTML = e); t = 0 } catch (i) { } } t && this.empty().append(e) }, null, e, arguments.length) }, replaceWith: function () { var e = []; return eq(this, arguments, function (t) { var n = this.parentNode; 0 > b.inArray(this, e) && (b.cleanData(ev(this)), n && n.replaceChild(t, this)) }, e) } }), b.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (e, t) { b.fn[e] = function (e) { for (var n, r = [], i = b(e), o = i.length - 1, a = 0; a <= o; a++)n = a === o ? this : this.clone(!0), b(i[a])[t](n), s.apply(r, n.get()); return this.pushStack(r) } }); var eH = RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"), eP = /^--/, eO = function (t) { var n = t.ownerDocument.defaultView; return n && n.opener || (n = e), n.getComputedStyle(t) }, e0 = function (e, t, n) { var r, i, o = {}; for (i in t) o[i] = e.style[i], e.style[i] = t[i]; for (i in r = n.call(e), t) e.style[i] = o[i]; return r }, eI = RegExp(en.join("|"), "i"), eM = "[\\x20\\t\\r\\n\\f]", eW = RegExp("^" + eM + "+|((?:^|[^\\\\])(?:\\\\.)*)" + eM + "+$", "g"); function e9(e, t, n) { var r, i, o, s, a = eP.test(t), u = e.style; return (n = n || eO(e)) && (s = n.getPropertyValue(t) || n[t], a && s && (s = s.replace(eW, "$1") || void 0), "" !== s || ei(e) || (s = b.style(e, t)), !d.pixelBoxStyles() && eH.test(s) && eI.test(t) && (r = u.width, i = u.minWidth, o = u.maxWidth, u.minWidth = u.maxWidth = u.width = s, s = n.width, u.width = r, u.minWidth = i, u.maxWidth = o)), void 0 !== s ? s + "" : s } function e1(e, t) { return { get: function () { if (!e()) return (this.get = t).apply(this, arguments); delete this.get } } } !function () { function t() { if (c) { l.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0", c.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%", er.appendChild(l).appendChild(c); var t = e.getComputedStyle(c); r = "1%" !== t.top, u = 12 === n(t.marginLeft), c.style.right = "60%", s = 36 === n(t.right), i = 36 === n(t.width), c.style.position = "absolute", o = 12 === n(c.offsetWidth / 3), er.removeChild(l), c = null } } function n(e) { return Math.round(parseFloat(e)) } var r, i, o, s, a, u, l = v.createElement("div"), c = v.createElement("div"); c.style && (c.style.backgroundClip = "content-box", c.cloneNode(!0).style.backgroundClip = "", d.clearCloneStyle = "content-box" === c.style.backgroundClip, b.extend(d, { boxSizingReliable: function () { return t(), i }, pixelBoxStyles: function () { return t(), s }, pixelPosition: function () { return t(), r }, reliableMarginLeft: function () { return t(), u }, scrollboxSize: function () { return t(), o }, reliableTrDimensions: function () { var t, n, r, i; return null == a && (t = v.createElement("table"), n = v.createElement("tr"), r = v.createElement("div"), t.style.cssText = "position:absolute;left:-11111px;border-collapse:separate", n.style.cssText = "border:1px solid", n.style.height = "1px", r.style.height = "9px", r.style.display = "block", er.appendChild(t).appendChild(n).appendChild(r), a = parseInt((i = e.getComputedStyle(n)).height, 10) + parseInt(i.borderTopWidth, 10) + parseInt(i.borderBottomWidth, 10) === n.offsetHeight, er.removeChild(t)), a } })) }(); var eB = ["Webkit", "Moz", "ms"], eR = v.createElement("div").style, eF = {}; function e8(e) { return b.cssProps[e] || eF[e] || (e in eR ? e : eF[e] = function (e) { for (var t = e[0].toUpperCase() + e.slice(1), n = eB.length; n--;)if ((e = eB[n] + t) in eR) return e }(e) || e) } var ez = /^(none|table(?!-c[ea]).+)/, eX = { position: "absolute", visibility: "hidden", display: "block" }, e2 = { letterSpacing: "0", fontWeight: "400" }; function eU(e, t, n) { var r = et.exec(t); return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || "px") : t } function e3(e, t, n, r, i, o) { var s = "width" === t ? 1 : 0, a = 0, u = 0; if (n === (r ? "border" : "content")) return 0; for (; s < 4; s += 2)"margin" === n && (u += b.css(e, n + en[s], !0, i)), r ? ("content" === n && (u -= b.css(e, "padding" + en[s], !0, i)), "margin" !== n && (u -= b.css(e, "border" + en[s] + "Width", !0, i))) : (u += b.css(e, "padding" + en[s], !0, i), "padding" !== n ? u += b.css(e, "border" + en[s] + "Width", !0, i) : a += b.css(e, "border" + en[s] + "Width", !0, i)); return !r && 0 <= o && (u += Math.max(0, Math.ceil(e["offset" + t[0].toUpperCase() + t.slice(1)] - o - u - a - .5)) || 0), u } function e4(e, t, n) { var r = eO(e), i = (!d.boxSizingReliable() || n) && "border-box" === b.css(e, "boxSizing", !1, r), o = i, s = e9(e, t, r), a = "offset" + t[0].toUpperCase() + t.slice(1); if (eH.test(s)) { if (!n) return s; s = "auto" } return (!d.boxSizingReliable() && i || !d.reliableTrDimensions() && k(e, "tr") || "auto" === s || !parseFloat(s) && "inline" === b.css(e, "display", !1, r)) && e.getClientRects().length && (i = "border-box" === b.css(e, "boxSizing", !1, r), (o = a in e) && (s = e[a])), (s = parseFloat(s) || 0) + e3(e, t, n || (i ? "border" : "content"), o, r, s) + "px" } function e7(e, t, n, r, i) { return new e7.prototype.init(e, t, n, r, i) } b.extend({ cssHooks: { opacity: { get: function (e, t) { if (t) { var n = e9(e, "opacity"); return "" === n ? "1" : n } } } }, cssNumber: { animationIterationCount: !0, columnCount: !0, fillOpacity: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, gridArea: !0, gridColumn: !0, gridColumnEnd: !0, gridColumnStart: !0, gridRow: !0, gridRowEnd: !0, gridRowStart: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: {}, style: function (e, t, n, r) { if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { var i, o, s, a = U(t), u = eP.test(t), l = e.style; if (u || (t = e8(a)), s = b.cssHooks[t] || b.cssHooks[a], void 0 === n) return s && "get" in s && void 0 !== (i = s.get(e, !1, r)) ? i : l[t]; "string" == (o = typeof n) && (i = et.exec(n)) && i[1] && (n = ea(e, t, i), o = "number"), null != n && n == n && ("number" !== o || u || (n += i && i[3] || (b.cssNumber[a] ? "" : "px")), d.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (l[t] = "inherit"), s && "set" in s && void 0 === (n = s.set(e, n, r)) || (u ? l.setProperty(t, n) : l[t] = n)) } }, css: function (e, t, n, r) { var i, o, s, a = U(t); return eP.test(t) || (t = e8(a)), (s = b.cssHooks[t] || b.cssHooks[a]) && "get" in s && (i = s.get(e, !0, n)), void 0 === i && (i = e9(e, t, r)), "normal" === i && t in e2 && (i = e2[t]), "" === n || n ? (o = parseFloat(i), !0 === n || isFinite(o) ? o || 0 : i) : i } }), b.each(["height", "width"], function (e, t) { b.cssHooks[t] = { get: function (e, n, r) { if (n) return !ez.test(b.css(e, "display")) || e.getClientRects().length && e.getBoundingClientRect().width ? e4(e, t, r) : e0(e, eX, function () { return e4(e, t, r) }) }, set: function (e, n, r) { var i, o = eO(e), s = !d.scrollboxSize() && "absolute" === o.position, a = (s || r) && "border-box" === b.css(e, "boxSizing", !1, o), u = r ? e3(e, t, r, a, o) : 0; return a && s && (u -= Math.ceil(e["offset" + t[0].toUpperCase() + t.slice(1)] - parseFloat(o[t]) - e3(e, t, "border", !1, o) - .5)), u && (i = et.exec(n)) && "px" !== (i[3] || "px") && (e.style[t] = n, n = b.css(e, t)), eU(0, n, u) } } }), b.cssHooks.marginLeft = e1(d.reliableMarginLeft, function (e, t) { if (t) return (parseFloat(e9(e, "marginLeft")) || e.getBoundingClientRect().left - e0(e, { marginLeft: 0 }, function () { return e.getBoundingClientRect().left })) + "px" }), b.each({ margin: "", padding: "", border: "Width" }, function (e, t) { b.cssHooks[e + t] = { expand: function (n) { for (var r = 0, i = {}, o = "string" == typeof n ? n.split(" ") : [n]; r < 4; r++)i[e + en[r] + t] = o[r] || o[r - 2] || o[0]; return i } }, "margin" !== e && (b.cssHooks[e + t].set = eU) }), b.fn.extend({ css: function (e, t) { return R(this, function (e, t, n) { var r, i, o = {}, s = 0; if (Array.isArray(t)) { for (r = eO(e), i = t.length; s < i; s++)o[t[s]] = b.css(e, t[s], !1, r); return o } return void 0 !== n ? b.style(e, t, n) : b.css(e, t) }, e, t, 1 < arguments.length) } }), ((b.Tween = e7).prototype = { constructor: e7, init: function (e, t, n, r, i, o) { this.elem = e, this.prop = n, this.easing = i || b.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (b.cssNumber[n] ? "" : "px") }, cur: function () { var e = e7.propHooks[this.prop]; return e && e.get ? e.get(this) : e7.propHooks._default.get(this) }, run: function (e) { var t, n = e7.propHooks[this.prop]; return this.options.duration ? this.pos = t = b.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : e7.propHooks._default.set(this), this } }).init.prototype = e7.prototype, (e7.propHooks = { _default: { get: function (e) { var t; return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = b.css(e.elem, e.prop, "")) && "auto" !== t ? t : 0 }, set: function (e) { b.fx.step[e.prop] ? b.fx.step[e.prop](e) : 1 === e.elem.nodeType && (b.cssHooks[e.prop] || null != e.elem.style[e8(e.prop)]) ? b.style(e.elem, e.prop, e.now + e.unit) : e.elem[e.prop] = e.now } } }).scrollTop = e7.propHooks.scrollLeft = { set: function (e) { e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) } }, b.easing = { linear: function (e) { return e }, swing: function (e) { return .5 - Math.cos(e * Math.PI) / 2 }, _default: "swing" }, b.fx = e7.prototype.init, b.fx.step = {}; var eV, eG, eY, eQ, e6 = /^(?:toggle|show|hide)$/, eK = /queueHooks$/; function e5() { return e.setTimeout(function () { eV = void 0 }), eV = Date.now() } function eJ(e, t) { var n, r = 0, i = { height: e }; for (t = t ? 1 : 0; r < 4; r += 2 - t)i["margin" + (n = en[r])] = i["padding" + n] = e; return t && (i.opacity = i.width = e), i } function eZ(e, t, n) { for (var r, i = (te.tweeners[t] || []).concat(te.tweeners["*"]), o = 0, s = i.length; o < s; o++)if (r = i[o].call(n, t, e)) return r } function te(e, t, n) { var r, i, o = 0, s = te.prefilters.length, a = b.Deferred().always(function () { delete u.elem }), u = function () { if (i) return !1; for (var t = eV || e5(), n = Math.max(0, l.startTime + l.duration - t), r = 1 - (n / l.duration || 0), o = 0, s = l.tweens.length; o < s; o++)l.tweens[o].run(r); return a.notifyWith(e, [l, r, n]), r < 1 && s ? n : (s || a.notifyWith(e, [l, 1, 0]), a.resolveWith(e, [l]), !1) }, l = a.promise({ elem: e, props: b.extend({}, t), opts: b.extend(!0, { specialEasing: {}, easing: b.easing._default }, n), originalProperties: t, originalOptions: n, startTime: eV || e5(), duration: n.duration, tweens: [], createTween: function (t, n) { var r = b.Tween(e, l.opts, t, n, l.opts.specialEasing[t] || l.opts.easing); return l.tweens.push(r), r }, stop: function (t) { var n = 0, r = t ? l.tweens.length : 0; if (i) return this; for (i = !0; n < r; n++)l.tweens[n].run(1); return t ? (a.notifyWith(e, [l, 1, 0]), a.resolveWith(e, [l, t])) : a.rejectWith(e, [l, t]), this } }), c = l.props; for (!function (e, t) { var n, r, i, o, s; for (n in e) if (i = t[r = U(n)], Array.isArray(o = e[n]) && (i = o[1], o = e[n] = o[0]), n !== r && (e[r] = o, delete e[n]), (s = b.cssHooks[r]) && ("expand" in s)) for (n in o = s.expand(o), delete e[r], o) (n in e) || (e[n] = o[n], t[n] = i); else t[r] = i }(c, l.opts.specialEasing); o < s; o++)if (r = te.prefilters[o].call(l, e, c, l.opts)) return h(r.stop) && (b._queueHooks(l.elem, l.opts.queue).stop = r.stop.bind(r)), r; return b.map(c, eZ, l), h(l.opts.start) && l.opts.start.call(e, l), l.progress(l.opts.progress).done(l.opts.done, l.opts.complete).fail(l.opts.fail).always(l.opts.always), b.fx.timer(b.extend(u, { elem: e, anim: l, queue: l.opts.queue })), l } b.Animation = b.extend(te, { tweeners: { "*": [function (e, t) { var n = this.createTween(e, t); return ea(n.elem, e, et.exec(t), n), n },] }, tweener: function (e, t) { h(e) ? (t = e, e = ["*"]) : e = e.match(H); for (var n, r = 0, i = e.length; r < i; r++)n = e[r], te.tweeners[n] = te.tweeners[n] || [], te.tweeners[n].unshift(t) }, prefilters: [function (e, t, n) { var r, i, o, s, a, u, l, c, f = "width" in t || "height" in t, p = this, d = {}, h = e.style, g = e.nodeType && es(e), v = Y.get(e, "fxshow"); for (r in n.queue || (null == (s = b._queueHooks(e, "fx")).unqueued && (s.unqueued = 0, a = s.empty.fire, s.empty.fire = function () { s.unqueued || a() }), s.unqueued++, p.always(function () { p.always(function () { s.unqueued--, b.queue(e, "fx").length || s.empty.fire() }) })), t) if (i = t[r], e6.test(i)) { if (delete t[r], o = o || "toggle" === i, i === (g ? "hide" : "show")) { if ("show" !== i || !v || void 0 === v[r]) continue; g = !0 } d[r] = v && v[r] || b.style(e, r) } if ((u = !b.isEmptyObject(t)) || !b.isEmptyObject(d)) for (r in f && 1 === e.nodeType && (n.overflow = [h.overflow, h.overflowX, h.overflowY], null == (l = v && v.display) && (l = Y.get(e, "display")), "none" === (c = b.css(e, "display")) && (l ? c = l : (el([e], !0), l = e.style.display || l, c = b.css(e, "display"), el([e]))), ("inline" === c || "inline-block" === c && null != l) && "none" === b.css(e, "float") && (u || (p.done(function () { h.display = l }), null == l && (l = "none" === (c = h.display) ? "" : c)), h.display = "inline-block")), n.overflow && (h.overflow = "hidden", p.always(function () { h.overflow = n.overflow[0], h.overflowX = n.overflow[1], h.overflowY = n.overflow[2] })), u = !1, d) u || (v ? "hidden" in v && (g = v.hidden) : v = Y.access(e, "fxshow", { display: l }), o && (v.hidden = !g), g && el([e], !0), p.done(function () { for (r in g || el([e]), Y.remove(e, "fxshow"), d) b.style(e, r, d[r]) })), u = eZ(g ? v[r] : 0, r, p), r in v || (v[r] = u.start, g && (u.end = u.start, u.start = 0)) },], prefilter: function (e, t) { t ? te.prefilters.unshift(e) : te.prefilters.push(e) } }), b.speed = function (e, t, n) { var r = e && "object" == typeof e ? b.extend({}, e) : { complete: n || !n && t || h(e) && e, duration: e, easing: n && t || t && !h(t) && t }; return b.fx.off ? r.duration = 0 : "number" != typeof r.duration && (r.duration in b.fx.speeds ? r.duration = b.fx.speeds[r.duration] : r.duration = b.fx.speeds._default), null != r.queue && !0 !== r.queue || (r.queue = "fx"), r.old = r.complete, r.complete = function () { h(r.old) && r.old.call(this), r.queue && b.dequeue(this, r.queue) }, r }, b.fn.extend({ fadeTo: function (e, t, n, r) { return this.filter(es).css("opacity", 0).show().end().animate({ opacity: t }, e, n, r) }, animate: function (e, t, n, r) { var i = b.isEmptyObject(e), o = b.speed(t, n, r), s = function () { var t = te(this, b.extend({}, e), o); (i || Y.get(this, "finish")) && t.stop(!0) }; return s.finish = s, i || !1 === o.queue ? this.each(s) : this.queue(o.queue, s) }, stop: function (e, t, n) { var r = function (e) { var t = e.stop; delete e.stop, t(n) }; return "string" != typeof e && (n = t, t = e, e = void 0), t && this.queue(e || "fx", []), this.each(function () { var t = !0, i = null != e && e + "queueHooks", o = b.timers, s = Y.get(this); if (i) s[i] && s[i].stop && r(s[i]); else for (i in s) s[i] && s[i].stop && eK.test(i) && r(s[i]); for (i = o.length; i--;)o[i].elem !== this || null != e && o[i].queue !== e || (o[i].anim.stop(n), t = !1, o.splice(i, 1)); !t && n || b.dequeue(this, e) }) }, finish: function (e) { return !1 !== e && (e = e || "fx"), this.each(function () { var t, n = Y.get(this), r = n[e + "queue"], i = n[e + "queueHooks"], o = b.timers, s = r ? r.length : 0; for (n.finish = !0, b.queue(this, e, []), i && i.stop && i.stop.call(this, !0), t = o.length; t--;)o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0), o.splice(t, 1)); for (t = 0; t < s; t++)r[t] && r[t].finish && r[t].finish.call(this); delete n.finish }) } }), b.each(["toggle", "show", "hide"], function (e, t) { var n = b.fn[t]; b.fn[t] = function (e, r, i) { return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate(eJ(t, !0), e, r, i) } }), b.each({ slideDown: eJ("show"), slideUp: eJ("hide"), slideToggle: eJ("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (e, t) { b.fn[e] = function (e, n, r) { return this.animate(t, e, n, r) } }), b.timers = [], b.fx.tick = function () { var e, t = 0, n = b.timers; for (eV = Date.now(); t < n.length; t++)(e = n[t])() || n[t] !== e || n.splice(t--, 1); n.length || b.fx.stop(), eV = void 0 }, b.fx.timer = function (e) { b.timers.push(e), b.fx.start() }, b.fx.interval = 13, b.fx.start = function () { eG || (eG = !0, function t() { eG && (!1 === v.hidden && e.requestAnimationFrame ? e.requestAnimationFrame(t) : e.setTimeout(t, b.fx.interval), b.fx.tick()) }()) }, b.fx.stop = function () { eG = null }, b.fx.speeds = { slow: 600, fast: 200, _default: 400 }, b.fn.delay = function (t, n) { return t = b.fx && b.fx.speeds[t] || t, n = n || "fx", this.queue(n, function (n, r) { var i = e.setTimeout(n, t); r.stop = function () { e.clearTimeout(i) } }) }, eY = v.createElement("input"), eQ = v.createElement("select").appendChild(v.createElement("option")), eY.type = "checkbox", d.checkOn = "" !== eY.value, d.optSelected = eQ.selected, (eY = v.createElement("input")).value = "t", eY.type = "radio", d.radioValue = "t" === eY.value; var tt, tn = b.expr.attrHandle; b.fn.extend({ attr: function (e, t) { return R(this, b.attr, e, t, 1 < arguments.length) }, removeAttr: function (e) { return this.each(function () { b.removeAttr(this, e) }) } }), b.extend({ attr: function (e, t, n) { var r, i, o = e.nodeType; if (3 !== o && 8 !== o && 2 !== o) return void 0 === e.getAttribute ? b.prop(e, t, n) : (1 === o && b.isXMLDoc(e) || (i = b.attrHooks[t.toLowerCase()] || (b.expr.match.bool.test(t) ? tt : void 0)), void 0 !== n ? null === n ? void b.removeAttr(e, t) : i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ""), n) : i && "get" in i && null !== (r = i.get(e, t)) ? r : null == (r = b.find.attr(e, t)) ? void 0 : r) }, attrHooks: { type: { set: function (e, t) { if (!d.radioValue && "radio" === t && k(e, "input")) { var n = e.value; return e.setAttribute("type", t), n && (e.value = n), t } } } }, removeAttr: function (e, t) { var n, r = 0, i = t && t.match(H); if (i && 1 === e.nodeType) for (; n = i[r++];)e.removeAttribute(n) } }), tt = { set: function (e, t, n) { return !1 === t ? b.removeAttr(e, n) : e.setAttribute(n, n), n } }, b.each(b.expr.match.bool.source.match(/\w+/g), function (e, t) { var n = tn[t] || b.find.attr; tn[t] = function (e, t, r) { var i, o, s = t.toLowerCase(); return r || (o = tn[s], tn[s] = i, i = null != n(e, t, r) ? s : null, tn[s] = o), i } }); var tr = /^(?:input|select|textarea|button)$/i, ti = /^(?:a|area)$/i; function to(e) { return (e.match(H) || []).join(" ") } function ts(e) { return e.getAttribute && e.getAttribute("class") || "" } function ta(e) { return Array.isArray(e) ? e : "string" == typeof e && e.match(H) || [] } b.fn.extend({ prop: function (e, t) { return R(this, b.prop, e, t, 1 < arguments.length) }, removeProp: function (e) { return this.each(function () { delete this[b.propFix[e] || e] }) } }), b.extend({ prop: function (e, t, n) { var r, i, o = e.nodeType; if (3 !== o && 8 !== o && 2 !== o) return 1 === o && b.isXMLDoc(e) || (t = b.propFix[t] || t, i = b.propHooks[t]), void 0 !== n ? i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && "get" in i && null !== (r = i.get(e, t)) ? r : e[t] }, propHooks: { tabIndex: { get: function (e) { var t = b.find.attr(e, "tabindex"); return t ? parseInt(t, 10) : tr.test(e.nodeName) || ti.test(e.nodeName) && e.href ? 0 : -1 } } }, propFix: { for: "htmlFor", class: "className" } }), d.optSelected || (b.propHooks.selected = { get: function (e) { var t = e.parentNode; return t && t.parentNode && t.parentNode.selectedIndex, null }, set: function (e) { var t = e.parentNode; t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) } }), b.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable",], function () { b.propFix[this.toLowerCase()] = this }), b.fn.extend({ addClass: function (e) { var t, n, r, i, o, s; return h(e) ? this.each(function (t) { b(this).addClass(e.call(this, t, ts(this))) }) : (t = ta(e)).length ? this.each(function () { if (r = ts(this), n = 1 === this.nodeType && " " + to(r) + " ") { for (o = 0; o < t.length; o++)i = t[o], 0 > n.indexOf(" " + i + " ") && (n += i + " "); r !== (s = to(n)) && this.setAttribute("class", s) } }) : this }, removeClass: function (e) { var t, n, r, i, o, s; return h(e) ? this.each(function (t) { b(this).removeClass(e.call(this, t, ts(this))) }) : arguments.length ? (t = ta(e)).length ? this.each(function () { if (r = ts(this), n = 1 === this.nodeType && " " + to(r) + " ") { for (o = 0; o < t.length; o++)for (i = t[o]; -1 < n.indexOf(" " + i + " ");)n = n.replace(" " + i + " ", " "); r !== (s = to(n)) && this.setAttribute("class", s) } }) : this : this.attr("class", "") }, toggleClass: function (e, t) { var n, r, i, o, s = typeof e, a = "string" === s || Array.isArray(e); return h(e) ? this.each(function (n) { b(this).toggleClass(e.call(this, n, ts(this), t), t) }) : "boolean" == typeof t && a ? t ? this.addClass(e) : this.removeClass(e) : (n = ta(e), this.each(function () { if (a) for (o = b(this), i = 0; i < n.length; i++)r = n[i], o.hasClass(r) ? o.removeClass(r) : o.addClass(r); else void 0 !== e && "boolean" !== s || ((r = ts(this)) && Y.set(this, "__className__", r), this.setAttribute && this.setAttribute("class", r || !1 === e ? "" : Y.get(this, "__className__") || "")) })) }, hasClass: function (e) { var t, n, r = 0; for (t = " " + e + " "; n = this[r++];)if (1 === n.nodeType && -1 < (" " + to(ts(n)) + " ").indexOf(t)) return !0; return !1 } }); var tu = /\r/g; b.fn.extend({ val: function (e) { var t, n, r, i = this[0]; return arguments.length ? (r = h(e), this.each(function (n) { var i; 1 === this.nodeType && (null == (i = r ? e.call(this, n, b(this).val()) : e) ? i = "" : "number" == typeof i ? i += "" : Array.isArray(i) && (i = b.map(i, function (e) { return null == e ? "" : e + "" })), (t = b.valHooks[this.type] || b.valHooks[this.nodeName.toLowerCase()]) && "set" in t && void 0 !== t.set(this, i, "value") || (this.value = i)) })) : i ? (t = b.valHooks[i.type] || b.valHooks[i.nodeName.toLowerCase()]) && "get" in t && void 0 !== (n = t.get(i, "value")) ? n : "string" == typeof (n = i.value) ? n.replace(tu, "") : null == n ? "" : n : void 0 } }), b.extend({ valHooks: { option: { get: function (e) { var t = b.find.attr(e, "value"); return null != t ? t : to(b.text(e)) } }, select: { get: function (e) { var t, n, r, i = e.options, o = e.selectedIndex, s = "select-one" === e.type, a = s ? null : [], u = s ? o + 1 : i.length; for (r = o < 0 ? u : s ? o : 0; r < u; r++)if (((n = i[r]).selected || r === o) && !n.disabled && (!n.parentNode.disabled || !k(n.parentNode, "optgroup"))) { if (t = b(n).val(), s) return t; a.push(t) } return a }, set: function (e, t) { for (var n, r, i = e.options, o = b.makeArray(t), s = i.length; s--;)((r = i[s]).selected = -1 < b.inArray(b.valHooks.option.get(r), o)) && (n = !0); return n || (e.selectedIndex = -1), o } } } }), b.each(["radio", "checkbox"], function () { b.valHooks[this] = { set: function (e, t) { if (Array.isArray(t)) return e.checked = -1 < b.inArray(b(e).val(), t) } }, d.checkOn || (b.valHooks[this].get = function (e) { return null === e.getAttribute("value") ? "on" : e.value }) }), d.focusin = "onfocusin" in e; var tl = /^(?:focusinfocus|focusoutblur)$/, tc = function (e) { e.stopPropagation() }; b.extend(b.event, { trigger: function (t, n, r, i) { var o, s, a, u, l, f, p, d, m = [r || v], y = c.call(t, "type") ? t.type : t, $ = c.call(t, "namespace") ? t.namespace.split(".") : []; if (s = d = a = r = r || v, 3 !== r.nodeType && 8 !== r.nodeType && !tl.test(y + b.event.triggered) && (-1 < y.indexOf(".") && (y = ($ = y.split(".")).shift(), $.sort()), l = 0 > y.indexOf(":") && "on" + y, (t = t[b.expando] ? t : new b.Event(y, "object" == typeof t && t)).isTrigger = i ? 2 : 3, t.namespace = $.join("."), t.rnamespace = t.namespace ? RegExp("(^|\\.)" + $.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = r), n = null == n ? [t] : b.makeArray(n, [t]), p = b.event.special[y] || {}, i || !p.trigger || !1 !== p.trigger.apply(r, n))) { if (!i && !p.noBubble && !g(r)) { for (u = p.delegateType || y, tl.test(u + y) || (s = s.parentNode); s; s = s.parentNode)m.push(s), a = s; a === (r.ownerDocument || v) && m.push(a.defaultView || a.parentWindow || e) } for (o = 0; (s = m[o++]) && !t.isPropagationStopped();)d = s, t.type = 1 < o ? u : p.bindType || y, (f = (Y.get(s, "events") || Object.create(null))[t.type] && Y.get(s, "handle")) && f.apply(s, n), (f = l && s[l]) && f.apply && V(s) && (t.result = f.apply(s, n), !1 === t.result && t.preventDefault()); return t.type = y, i || t.isDefaultPrevented() || p._default && !1 !== p._default.apply(m.pop(), n) || !V(r) || l && h(r[y]) && !g(r) && ((a = r[l]) && (r[l] = null), b.event.triggered = y, t.isPropagationStopped() && d.addEventListener(y, tc), r[y](), t.isPropagationStopped() && d.removeEventListener(y, tc), b.event.triggered = void 0, a && (r[l] = a)), t.result } }, simulate: function (e, t, n) { var r = b.extend(new b.Event, n, { type: e, isSimulated: !0 }); b.event.trigger(r, null, t) } }), b.fn.extend({ trigger: function (e, t) { return this.each(function () { b.event.trigger(e, t, this) }) }, triggerHandler: function (e, t) { var n = this[0]; if (n) return b.event.trigger(e, t, n, !0) } }), d.focusin || b.each({ focus: "focusin", blur: "focusout" }, function (e, t) { var n = function (e) { b.event.simulate(t, e.target, b.event.fix(e)) }; b.event.special[t] = { setup: function () { var r = this.ownerDocument || this.document || this, i = Y.access(r, t); i || r.addEventListener(e, n, !0), Y.access(r, t, (i || 0) + 1) }, teardown: function () { var r = this.ownerDocument || this.document || this, i = Y.access(r, t) - 1; i ? Y.access(r, t, i) : (r.removeEventListener(e, n, !0), Y.remove(r, t)) } } }); var tf = e.location, tp = { guid: Date.now() }, td = /\?/; b.parseXML = function (t) { var n, r; if (!t || "string" != typeof t) return null; try { n = new e.DOMParser().parseFromString(t, "text/xml") } catch (i) { } return r = n && n.getElementsByTagName("parsererror")[0], n && !r || b.error("Invalid XML: " + (r ? b.map(r.childNodes, function (e) { return e.textContent }).join("\n") : t)), n }; var th = /\[\]$/, tg = /\r?\n/g, tv = /^(?:submit|button|image|reset|file)$/i, tm = /^(?:input|select|textarea|keygen)/i; function ty(e, t, n, r) { var i; if (Array.isArray(t)) b.each(t, function (t, i) { n || th.test(e) ? r(e, i) : ty(e + "[" + ("object" == typeof i && null != i ? t : "") + "]", i, n, r) }); else if (n || "object" !== $(t)) r(e, t); else for (i in t) ty(e + "[" + i + "]", t[i], n, r) } b.param = function (e, t) { var n, r = [], i = function (e, t) { var n = h(t) ? t() : t; r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == n ? "" : n) }; if (null == e) return ""; if (Array.isArray(e) || e.jquery && !b.isPlainObject(e)) b.each(e, function () { i(this.name, this.value) }); else for (n in e) ty(n, e[n], t, i); return r.join("&") }, b.fn.extend({ serialize: function () { return b.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var e = b.prop(this, "elements"); return e ? b.makeArray(e) : this }).filter(function () { var e = this.type; return this.name && !b(this).is(":disabled") && tm.test(this.nodeName) && !tv.test(e) && (this.checked || !ep.test(e)) }).map(function (e, t) { var n = b(this).val(); return null == n ? null : Array.isArray(n) ? b.map(n, function (e) { return { name: t.name, value: e.replace(tg, "\r\n") } }) : { name: t.name, value: n.replace(tg, "\r\n") } }).get() } }); var t$ = /%20/g, tx = /#.*$/, tb = /([?&])_=[^&]*/, t_ = /^(.*?):[ \t]*([^\r\n]*)$/gm, tT = /^(?:GET|HEAD)$/, tw = /^\/\//, tC = {}, tS = {}, tk = "*/".concat("*"), tE = v.createElement("a"); function tN(e) { return function (t, n) { "string" != typeof t && (n = t, t = "*"); var r, i = 0, o = t.toLowerCase().match(H) || []; if (h(n)) for (; r = o[i++];)"+" === r[0] ? (e[r = r.slice(1) || "*"] = e[r] || []).unshift(n) : (e[r] = e[r] || []).push(n) } } function tA(e, t, n, r) { var i = {}, o = e === tS; function s(a) { var u; return i[a] = !0, b.each(e[a] || [], function (e, a) { var l = a(t, n, r); return "string" != typeof l || o || i[l] ? o ? !(u = l) : void 0 : (t.dataTypes.unshift(l), s(l), !1) }), u } return s(t.dataTypes[0]) || !i["*"] && s("*") } function tD(e, t) { var n, r, i = b.ajaxSettings.flatOptions || {}; for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = {}))[n] = t[n]); return r && b.extend(!0, e, r), e } tE.href = tf.href, b.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: tf.href, type: "GET", isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(tf.protocol), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": tk, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, converters: { "* text": String, "text html": !0, "text json": JSON.parse, "text xml": b.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function (e, t) { return t ? tD(tD(e, b.ajaxSettings), t) : tD(b.ajaxSettings, e) }, ajaxPrefilter: tN(tC), ajaxTransport: tN(tS), ajax: function (t, n) { "object" == typeof t && (n = t, t = void 0), n = n || {}; var r, i, o, s, a, u, l, c, f, p, d = b.ajaxSetup({}, n), h = d.context || d, g = d.context && (h.nodeType || h.jquery) ? b(h) : b.event, m = b.Deferred(), y = b.Callbacks("once memory"), $ = d.statusCode || {}, x = {}, _ = {}, T = "canceled", w = { readyState: 0, getResponseHeader: function (e) { var t; if (l) { if (!s) for (s = {}; t = t_.exec(o);)s[t[1].toLowerCase() + " "] = (s[t[1].toLowerCase() + " "] || []).concat(t[2]); t = s[e.toLowerCase() + " "] } return null == t ? null : t.join(", ") }, getAllResponseHeaders: function () { return l ? o : null }, setRequestHeader: function (e, t) { return null == l && (x[e = _[e.toLowerCase()] = _[e.toLowerCase()] || e] = t), this }, overrideMimeType: function (e) { return null == l && (d.mimeType = e), this }, statusCode: function (e) { var t; if (e) { if (l) w.always(e[w.status]); else for (t in e) $[t] = [$[t], e[t]] } return this }, abort: function (e) { var t = e || T; return r && r.abort(t), k(0, t), this } }; if (m.promise(w), d.url = ((t || d.url || tf.href) + "").replace(tw, tf.protocol + "//"), d.type = n.method || n.type || d.method || d.type, d.dataTypes = (d.dataType || "*").toLowerCase().match(H) || [""], null == d.crossDomain) { u = v.createElement("a"); try { u.href = d.url, u.href = u.href, d.crossDomain = tE.protocol + "//" + tE.host != u.protocol + "//" + u.host } catch (C) { d.crossDomain = !0 } } if (d.data && d.processData && "string" != typeof d.data && (d.data = b.param(d.data, d.traditional)), tA(tC, d, n, w), l) return w; for (f in (c = b.event && d.global) && 0 == b.active++ && b.event.trigger("ajaxStart"), d.type = d.type.toUpperCase(), d.hasContent = !tT.test(d.type), i = d.url.replace(tx, ""), d.hasContent ? d.data && d.processData && 0 === (d.contentType || "").indexOf("application/x-www-form-urlencoded") && (d.data = d.data.replace(t$, "+")) : (p = d.url.slice(i.length), d.data && (d.processData || "string" == typeof d.data) && (i += (td.test(i) ? "&" : "?") + d.data, delete d.data), !1 === d.cache && (i = i.replace(tb, "$1"), p = (td.test(i) ? "&" : "?") + "_=" + tp.guid++ + p), d.url = i + p), d.ifModified && (b.lastModified[i] && w.setRequestHeader("If-Modified-Since", b.lastModified[i]), b.etag[i] && w.setRequestHeader("If-None-Match", b.etag[i])), (d.data && d.hasContent && !1 !== d.contentType || n.contentType) && w.setRequestHeader("Content-Type", d.contentType), w.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + ("*" !== d.dataTypes[0] ? ", " + tk + "; q=0.01" : "") : d.accepts["*"]), d.headers) w.setRequestHeader(f, d.headers[f]); if (d.beforeSend && (!1 === d.beforeSend.call(h, w, d) || l)) return w.abort(); if (T = "abort", y.add(d.complete), w.done(d.success), w.fail(d.error), r = tA(tS, d, n, w)) { if (w.readyState = 1, c && g.trigger("ajaxSend", [w, d]), l) return w; d.async && 0 < d.timeout && (a = e.setTimeout(function () { w.abort("timeout") }, d.timeout)); try { l = !1, r.send(x, k) } catch (S) { if (l) throw S; k(-1, S) } } else k(-1, "No Transport"); function k(t, n, s, u) { var f, p, v, x, _, T = n; l || (l = !0, a && e.clearTimeout(a), r = void 0, o = u || "", w.readyState = 0 < t ? 4 : 0, f = 200 <= t && t < 300 || 304 === t, s && (x = function (e, t, n) { for (var r, i, o, s, a = e.contents, u = e.dataTypes; "*" === u[0];)u.shift(), void 0 === r && (r = e.mimeType || t.getResponseHeader("Content-Type")); if (r) { for (i in a) if (a[i] && a[i].test(r)) { u.unshift(i); break } } if (u[0] in n) o = u[0]; else { for (i in n) { if (!u[0] || e.converters[i + " " + u[0]]) { o = i; break } s || (s = i) } o = o || s } if (o) return o !== u[0] && u.unshift(o), n[o] }(d, w, s)), !f && -1 < b.inArray("script", d.dataTypes) && 0 > b.inArray("json", d.dataTypes) && (d.converters["text script"] = function () { }), x = function (e, t, n, r) { var i, o, s, a, u, l = {}, c = e.dataTypes.slice(); if (c[1]) for (s in e.converters) l[s.toLowerCase()] = e.converters[s]; for (o = c.shift(); o;)if (e.responseFields[o] && (n[e.responseFields[o]] = t), !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), u = o, o = c.shift()) { if ("*" === o) o = u; else if ("*" !== u && u !== o) { if (!(s = l[u + " " + o] || l["* " + o])) { for (i in l) if ((a = i.split(" "))[1] === o && (s = l[u + " " + a[0]] || l["* " + a[0]])) { !0 === s ? s = l[i] : !0 !== l[i] && (o = a[0], c.unshift(a[1])); break } } if (!0 !== s) { if (s && e.throws) t = s(t); else try { t = s(t) } catch (f) { return { state: "parsererror", error: s ? f : "No conversion from " + u + " to " + o } } } } } return { state: "success", data: t } }(d, x, w, f), f ? (d.ifModified && ((_ = w.getResponseHeader("Last-Modified")) && (b.lastModified[i] = _), (_ = w.getResponseHeader("etag")) && (b.etag[i] = _)), 204 === t || "HEAD" === d.type ? T = "nocontent" : 304 === t ? T = "notmodified" : (T = x.state, p = x.data, f = !(v = x.error))) : (v = T, !t && T || (T = "error", t < 0 && (t = 0))), w.status = t, w.statusText = (n || T) + "", f ? m.resolveWith(h, [p, T, w]) : m.rejectWith(h, [w, T, v]), w.statusCode($), $ = void 0, c && g.trigger(f ? "ajaxSuccess" : "ajaxError", [w, d, f ? p : v]), y.fireWith(h, [w, T]), c && (g.trigger("ajaxComplete", [w, d]), --b.active || b.event.trigger("ajaxStop"))) } return w }, getJSON: function (e, t, n) { return b.get(e, t, n, "json") }, getScript: function (e, t) { return b.get(e, void 0, t, "script") } }), b.each(["get", "post"], function (e, t) { b[t] = function (e, n, r, i) { return h(n) && (i = i || r, r = n, n = void 0), b.ajax(b.extend({ url: e, type: t, dataType: i, data: n, success: r }, b.isPlainObject(e) && e)) } }), b.ajaxPrefilter(function (e) { var t; for (t in e.headers) "content-type" === t.toLowerCase() && (e.contentType = e.headers[t] || "") }), b._evalUrl = function (e, t, n) { return b.ajax({ url: e, type: "GET", dataType: "script", cache: !0, async: !1, global: !1, converters: { "text script": function () { } }, dataFilter: function (e) { b.globalEval(e, t, n) } }) }, b.fn.extend({ wrapAll: function (e) { var t; return this[0] && (h(e) && (e = e.call(this[0])), t = b(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function () { for (var e = this; e.firstElementChild;)e = e.firstElementChild; return e }).append(this)), this }, wrapInner: function (e) { return h(e) ? this.each(function (t) { b(this).wrapInner(e.call(this, t)) }) : this.each(function () { var t = b(this), n = t.contents(); n.length ? n.wrapAll(e) : t.append(e) }) }, wrap: function (e) { var t = h(e); return this.each(function (n) { b(this).wrapAll(t ? e.call(this, n) : e) }) }, unwrap: function (e) { return this.parent(e).not("body").each(function () { b(this).replaceWith(this.childNodes) }), this } }), b.expr.pseudos.hidden = function (e) { return !b.expr.pseudos.visible(e) }, b.expr.pseudos.visible = function (e) { return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) }, b.ajaxSettings.xhr = function () { try { return new e.XMLHttpRequest } catch (t) { } }; var tj = { 0: 200, 1223: 204 }, tq = b.ajaxSettings.xhr(); d.cors = !!tq && "withCredentials" in tq, d.ajax = tq = !!tq, b.ajaxTransport(function (t) { var n, r; if (d.cors || tq && !t.crossDomain) return { send: function (i, o) { var s, a = t.xhr(); if (a.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields) for (s in t.xhrFields) a[s] = t.xhrFields[s]; for (s in t.mimeType && a.overrideMimeType && a.overrideMimeType(t.mimeType), t.crossDomain || i["X-Requested-With"] || (i["X-Requested-With"] = "XMLHttpRequest"), i) a.setRequestHeader(s, i[s]); n = function (e) { return function () { n && (n = r = a.onload = a.onerror = a.onabort = a.ontimeout = a.onreadystatechange = null, "abort" === e ? a.abort() : "error" === e ? "number" != typeof a.status ? o(0, "error") : o(a.status, a.statusText) : o(tj[a.status] || a.status, a.statusText, "text" !== (a.responseType || "text") || "string" != typeof a.responseText ? { binary: a.response } : { text: a.responseText }, a.getAllResponseHeaders())) } }, a.onload = n(), r = a.onerror = a.ontimeout = n("error"), void 0 !== a.onabort ? a.onabort = r : a.onreadystatechange = function () { 4 === a.readyState && e.setTimeout(function () { n && r() }) }, n = n("abort"); try { a.send(t.hasContent && t.data || null) } catch (u) { if (n) throw u } }, abort: function () { n && n() } } }), b.ajaxPrefilter(function (e) { e.crossDomain && (e.contents.script = !1) }), b.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function (e) { return b.globalEval(e), e } } }), b.ajaxPrefilter("script", function (e) { void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET") }), b.ajaxTransport("script", function (e) { var t, n; if (e.crossDomain || e.scriptAttrs) return { send: function (r, i) { t = b("