UNPKG

vpn.email

Version:
8 lines (7 loc) 174 kB
/*! * Metro UI CSS v3.0.15 (http://metroui.org.ua) * Copyright 2012-2016 Sergey Pimenov * Licensed under MIT (http://metroui.org.ua/license.html) */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(jQuery){"use strict";function keyHandler(a){if("string"==typeof a.data&&(a.data={keys:a.data}),a.data&&a.data.keys&&"string"==typeof a.data.keys){var b=a.handler,c=a.data.keys.toLowerCase().split(" ");a.handler=function(a){if(this===a.target||!($.hotkeys.options.filterInputAcceptingElements&&$.hotkeys.textInputTypes.test(a.target.nodeName)||$.hotkeys.options.filterContentEditable&&$(a.target).attr("contenteditable")||$.hotkeys.options.filterTextInputs&&$.inArray(a.target.type,$.hotkeys.textAcceptingInputTypes)>-1)){var d="keypress"!==a.type&&$.hotkeys.specialKeys[a.which],e=String.fromCharCode(a.which).toLowerCase(),f="",g={};$.each(["alt","ctrl","shift"],function(b,c){a[c+"Key"]&&d!==c&&(f+=c+"+")}),a.metaKey&&!a.ctrlKey&&"meta"!==d&&(f+="meta+"),a.metaKey&&"meta"!==d&&f.indexOf("alt+ctrl+shift+")>-1&&(f=f.replace("alt+ctrl+shift+","hyper+")),d?g[f+d]=!0:(g[f+e]=!0,g[f+$.hotkeys.shiftNums[e]]=!0,"shift+"===f&&(g[$.hotkeys.shiftNums[e]]=!0));for(var h=0,i=c.length;i>h;h++)if(g[c[h]])return b.apply(this,arguments)}}}}function handler(a){var b,c=a||window.event,d=[].slice.call(arguments,1),e=0,f=0,g=0,h=0,i=0;return a=$.event.fix(c),a.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta),c.detail&&(e=-1*c.detail),c.deltaY&&(g=-1*c.deltaY,e=g),c.deltaX&&(f=c.deltaX,e=-1*f),void 0!==c.wheelDeltaY&&(g=c.wheelDeltaY),void 0!==c.wheelDeltaX&&(f=-1*c.wheelDeltaX),h=Math.abs(e),(!lowestDelta||lowestDelta>h)&&(lowestDelta=h),i=Math.max(Math.abs(g),Math.abs(f)),(!lowestDeltaXY||lowestDeltaXY>i)&&(lowestDeltaXY=i),b=e>0?"floor":"ceil",e=Math[b](e/lowestDelta),f=Math[b](f/lowestDeltaXY),g=Math[b](g/lowestDeltaXY),d.unshift(a,e,f,g),($.event.dispatch||$.event.handle).apply(this,d)}function preCode(a){var b=Array.prototype.slice.call(document.querySelectorAll(a),0);b.forEach(function(a){var b=a.textContent.replace(/^[\r\n]+/,"").replace(/\s+$/g,"");if(/^\S/gm.test(b))return void(a.textContent=b);for(var c,d,e,f=/^[\t ]+/gm,g=1e3;c=f.exec(b);)e=c[0].length,g>e&&(g=e,d=c[0]);1e3!=g&&(a.textContent=b.replace(new RegExp("^"+d,"gm"),""))})}function touch2Mouse(a){var b,c=a.changedTouches[0];switch(a.type){case"touchstart":b="mousedown";break;case"touchend":b="mouseup";break;case"touchmove":b="mousemove";break;default:return}"mousedown"==b&&(eventTimer=(new Date).getTime(),startX=c.clientX,startY=c.clientY,mouseDown=!0),"mouseup"==b&&((new Date).getTime()-eventTimer<=500?b="click":(new Date).getTime()-eventTimer>1e3&&(b="longclick"),eventTimer=0,mouseDown=!1),"mousemove"==b&&mouseDown&&(deltaX=c.clientX-startX,deltaY=c.clientY-startY,moveDirection=deltaX>deltaY?"horizontal":"vertical");var d=document.createEvent("MouseEvent");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),c.target.dispatchEvent(d),a.preventDefault()}var $=jQuery;if(window.METRO_VERSION="3.0.15","undefined"==typeof jQuery)throw new Error("Metro's JavaScript requires jQuery");void 0===window.METRO_AUTO_REINIT&&(window.METRO_AUTO_REINIT=!0),void 0===window.METRO_LANGUAGE&&(window.METRO_LANGUAGE="en"),void 0===window.METRO_LOCALE&&(window.METRO_LOCALE="EN_en"),void 0===window.METRO_CURRENT_LOCALE&&(window.METRO_CURRENT_LOCALE="en"),void 0===window.METRO_SHOW_TYPE&&(window.METRO_SHOW_TYPE="slide"),void 0===window.METRO_DEBUG&&(window.METRO_DEBUG=!0),void 0===window.METRO_CALENDAR_WEEK_START&&(window.METRO_CALENDAR_WEEK_START=0),window.canObserveMutation="MutationObserver"in window,Number.prototype.format=function(a,b,c,d){var e="\\d(?=(\\d{"+(b||3)+"})+"+(a>0?"\\D":"$")+")",f=this.toFixed(Math.max(0,~~a));return(d?f.replace(".",d):f).replace(new RegExp(e,"g"),"$&"+(c||","))},String.prototype.isUrl=function(){var a=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return a.test(this)},String.prototype.isColor=function(){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(this)},window.secondsToFormattedString=function(a){var b,c,d;return b=parseInt(a/3600)%24,c=parseInt(a/60)%60,d=a%60,(b?b+":":"")+(10>c?"0"+c:c)+":"+(10>d?"0"+d:d)},Array.prototype.shuffle=function(){for(var a,b,c=this.length;0!==c;)b=Math.floor(Math.random()*c),c-=1,a=this[c],this[c]=this[b],this[b]=a;return this},Array.prototype.clone=function(){return this.slice(0)},Array.prototype.unique=function(){for(var a=this.concat(),b=0;b<a.length;++b)for(var c=b+1;c<a.length;++c)a[b]===a[c]&&a.splice(c--,1);return a},window.uniqueId=function(){var a=(new Date).getTime(),b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var c=(a+16*Math.random())%16|0;return a=Math.floor(a/16),("x"==b?c:3&c|8).toString(16)});return b},window.isTouchDevice=function(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0},window.METRO_LOCALES={en:{months:["January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Su","Mo","Tu","We","Th","Fr","Sa"],buttons:["Today","Clear","Cancel","Help","Prior","Next","Finish"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre","Jan","Fév","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Di","Lu","Ma","Me","Je","Ve","Sa"],buttons:["Aujourd'hui","Effacer","Annuler","Aide","Précedent","Suivant","Fin"]},nl:{months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December","Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zo","Ma","Di","Wo","Do","Vr","Za"],buttons:["Vandaag","Verwijderen","Annuleren","Hulp","Vorige","Volgende","Einde"]},ua:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень","Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],days:["Неділя","Понеділок","Вівторок","Середа","Четвер","П’ятниця","Субота","Нд","Пн","Вт","Ср","Чт","Пт","Сб"],buttons:["Сьогодні","Очистити","Скасувати","Допомога","Назад","Вперед","Готово"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь","Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Вс","Пн","Вт","Ср","Чт","Пт","Сб"],buttons:["Сегодня","Очистить","Отменить","Помощь","Назад","Вперед","Готово"]},zhCN:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月","一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","日","一","二","三","四","五","六"],buttons:["今日","清除","Cancel","Help","Prior","Next","Finish"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre","Gen"," Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Dom","Lun","Mar","Mer","Gio","Ven","Sab"],buttons:["Oggi","Cancella","Cancel","Help","Prior","Next","Finish"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember","Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","So","Mo","Di","Mi","Do","Fr","Sa"],buttons:["Heute","Zurücksetzen","Abbrechen","Hilfe","Früher","Später","Fertig"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre","Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sept","Oct","Nov","Dic"],days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Do","Lu","Mar","Mié","Jue","Vi","Sáb"],buttons:["Hoy","Limpiar","Cancel","Help","Prior","Next","Finish"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro","Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],days:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sabado","Dom","Seg","Ter","Qua","Qui","Sex","Sab"],buttons:["Hoje","Limpar","Cancelar","Ajuda","Anterior","Seguinte","Terminar"]},pl:{months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień","Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Nd","Pon","Wt","Śr","Czw","Pt","Sob"],buttons:["Dzisiaj","Wyczyść","Anuluj","Pomoc","Poprzedni","Następny","Koniec"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec","Led","Ún","Bř","Dub","Kvě","Če","Čer","Srp","Zá","Ří","Li","Pro"],days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Ne","Po","Út","St","Čt","Pá","So"],buttons:["Dnes","Vyčistit","Zrušit","Pomoc","Předešlý","Další","Dokončit"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม","ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์","อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],buttons:["วันนี้","ล้าง","ยกเลิก","ช่วยเหลือ","กลับ","ต่อไป","เสร็จ"]}};var dateFormat=function(){var a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,d=function(a,b){for(a=String(a),b=b||2;a.length<b;)a="0"+a;return a};return function(e,f,g){var h=dateFormat;1!==arguments.length||"[object String]"!==Object.prototype.toString.call(e)||/\d/.test(e)||(f=e,e=void 0),e=e?new Date(e):new Date,f=String(h.masks[f]||f||h.masks["default"]),"UTC:"===f.slice(0,4)&&(f=f.slice(4),g=!0);var i=window.METRO_CURRENT_LOCALE||"en",j=g?"getUTC":"get",k=e[j+"Date"](),l=e[j+"Day"](),m=e[j+"Month"](),n=e[j+"FullYear"](),o=e[j+"Hours"](),p=e[j+"Minutes"](),q=e[j+"Seconds"](),r=e[j+"Milliseconds"](),s=g?0:e.getTimezoneOffset(),t={d:k,dd:d(k),ddd:window.METRO_LOCALES[i].days[l],dddd:window.METRO_LOCALES[i].days[l+7],m:m+1,mm:d(m+1),mmm:window.METRO_LOCALES[i].months[m],mmmm:window.METRO_LOCALES[i].months[m+12],yy:String(n).slice(2),yyyy:n,h:o%12||12,hh:d(o%12||12),H:o,HH:d(o),M:p,MM:d(p),s:q,ss:d(q),l:d(r,3),L:d(r>99?Math.round(r/10):r),t:12>o?"a":"p",tt:12>o?"am":"pm",T:12>o?"A":"P",TT:12>o?"AM":"PM",Z:g?"UTC":(String(e).match(b)||[""]).pop().replace(c,""),o:(s>0?"-":"+")+d(100*Math.floor(Math.abs(s)/60)+Math.abs(s)%60,4),S:["th","st","nd","rd"][k%10>3?0:(k%100-k%10!==10)*k%10]};return f.replace(a,function(a){return a in t?t[a]:a.slice(1,a.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},Date.prototype.format=function(a,b){return dateFormat(this,a,b)};var widget_uuid=0,widget_slice=Array.prototype.slice;$.cleanData=function(a){return function(b){var c,d,e;for(e=0;null!=(d=b[e]);e++)try{c=$._data(d,"events"),c&&c.remove&&$(d).triggerHandler("remove")}catch(f){}a(b)}}($.cleanData),$.widget=function(a,b,c){var d,e,f,g,h={},i=a.split(".")[0];return a=a.split(".")[1],d=i+"-"+a,c||(c=b,b=$.Widget),$.expr[":"][d.toLowerCase()]=function(a){return!!$.data(a,d)},$[i]=$[i]||{},e=$[i][a],f=$[i][a]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new f(a,b)},$.extend(f,e,{version:c.version,_proto:$.extend({},c),_childConstructors:[]}),g=new b,g.options=$.widget.extend({},g.options),$.each(c,function(a,c){return $.isFunction(c)?void(h[a]=function(){var d=function(){return b.prototype[a].apply(this,arguments)},e=function(c){return b.prototype[a].apply(this,c)};return function(){var a,b=this._super,f=this._superApply;return this._super=d,this._superApply=e,a=c.apply(this,arguments),this._super=b,this._superApply=f,a}}()):void(h[a]=c)}),f.prototype=$.widget.extend(g,{widgetEventPrefix:e?g.widgetEventPrefix||a:a},h,{constructor:f,namespace:i,widgetName:a,widgetFullName:d}),e?($.each(e._childConstructors,function(a,b){var c=b.prototype;$.widget(c.namespace+"."+c.widgetName,f,b._proto)}),delete e._childConstructors):b._childConstructors.push(f),$.widget.bridge(a,f),f},$.widget.extend=function(a){for(var b,c,d=widget_slice.call(arguments,1),e=0,f=d.length;f>e;e++)for(b in d[e])c=d[e][b],d[e].hasOwnProperty(b)&&void 0!==c&&(a[b]=$.isPlainObject(c)?$.isPlainObject(a[b])?$.widget.extend({},a[b],c):$.widget.extend({},c):c);return a},$.widget.bridge=function(a,b){var c=b.prototype.widgetFullName||a;$.fn[a]=function(d){var e="string"==typeof d,f=widget_slice.call(arguments,1),g=this;return e?this.each(function(){var b,e=$.data(this,c);return"instance"===d?(g=e,!1):e?$.isFunction(e[d])&&"_"!==d.charAt(0)?(b=e[d].apply(e,f),b!==e&&void 0!==b?(g=b&&b.jquery?g.pushStack(b.get()):b,!1):void 0):$.error("no such method '"+d+"' for "+a+" widget instance"):$.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+d+"'")}):(f.length&&(d=$.widget.extend.apply(null,[d].concat(f))),this.each(function(){var a=$.data(this,c);a?(a.option(d||{}),a._init&&a._init()):$.data(this,c,new b(d,this))})),g}},$.Widget=function(){},$.Widget._childConstructors=[],$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(a,b){b=$(b||this.defaultElement||this)[0],this.element=$(b),this.uuid=widget_uuid++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=$(),this.hoverable=$(),this.focusable=$(),b!==this&&($.data(b,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===b&&this.destroy()}}),this.document=$(b.style?b.ownerDocument:b.document||b),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this.options=$.widget.extend({},this.options,this._getCreateOptions(),a),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:$.noop,widget:function(){return this.element},option:function(a,b){var c,d,e,f=a;if(0===arguments.length)return $.widget.extend({},this.options);if("string"==typeof a)if(f={},c=a.split("."),a=c.shift(),c.length){for(d=f[a]=$.widget.extend({},this.options[a]),e=0;e<c.length-1;e++)d[c[e]]=d[c[e]]||{},d=d[c[e]];if(a=c.pop(),1===arguments.length)return void 0===d[a]?null:d[a];d[a]=b}else{if(1===arguments.length)return void 0===this.options[a]?null:this.options[a];f[a]=b}return this._setOptions(f),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(a,b,c){var d,e=this;"boolean"!=typeof a&&(c=b,b=a,a=!1),c?(b=d=$(b),this.bindings=this.bindings.add(b)):(c=b,b=this.element,d=this.widget()),$.each(c,function(c,f){function g(){return a||e.options.disabled!==!0&&!$(this).hasClass("ui-state-disabled")?("string"==typeof f?e[f]:f).apply(e,arguments):void 0}"string"!=typeof f&&(g.guid=f.guid=f.guid||g.guid||$.guid++);var h=c.match(/^([\w:-]*)\s*(.*)$/),i=h[1]+e.eventNamespace,j=h[2];j?d.delegate(j,i,g):b.bind(i,g)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,a.unbind(b).undelegate(b),this.bindings=$(this.bindings.not(a).get()),this.focusable=$(this.focusable.not(a).get()),this.hoverable=$(this.hoverable.not(a).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a),this._on(a,{mouseenter:function(a){$(a.currentTarget).addClass("ui-state-hover")},mouseleave:function(a){$(a.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a),this._on(a,{focusin:function(a){$(a.currentTarget).addClass("ui-state-focus")},focusout:function(a){$(a.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(a,b,c){var d,e,f=this.options[a];if(c=c||{},b=$.Event(b),b.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase(),b.target=this.element[0],e=b.originalEvent)for(d in e)d in b||(b[d]=e[d]);return this.element.trigger(b,c),!($.isFunction(f)&&f.apply(this.element[0],[b].concat(c))===!1||b.isDefaultPrevented())}},$.each({show:"fadeIn",hide:"fadeOut"},function(a,b){$.Widget.prototype["_"+a]=function(c,d,e){"string"==typeof d&&(d={effect:d});var f,g=d?d===!0||"number"==typeof d?b:d.effect||b:a;d=d||{},"number"==typeof d&&(d={duration:d}),f=!$.isEmptyObject(d),d.complete=e,d.delay&&c.delay(d.delay),f&&$.effects&&$.effects.effect[g]?c[a](d):g!==a&&c[g]?c[g](d.duration,d.easing,e):c.queue(function(b){$(this)[a](),e&&e.call(c[0]),b()})}});var widget=$.widget;$.fn.reverse=Array.prototype.reverse,$.Metro={initWidgets:function(a){$.each(a,function(){var a=$(this),b=a.data("role").split(/\s*,\s*/);b.map(function(b){try{void 0!==$.fn[b]&&a.data(b+"-initiated")!==!0&&($.fn[b].call(a),a.data(b+"-initiated",!0))}catch(c){window.METRO_DEBUG&&console.log(c.message,c.stack)}})})},initHotkeys:function(a){$.each(a,function(){var a=$(this),b=a.data("hotkey").toLowerCase();a.data("hotKeyBonded")!==!0&&($.Metro.hotkeys.push(b),$(document).on("keyup",null,b,function(){return void 0!==a?("A"===a[0].tagName&&void 0!==a.attr("href")&&""!==a.attr("href").trim()&&"#"!==a.attr("href").trim()?document.location.href=a.attr("href"):a.click(),!1):void 0}),a.data("hotKeyBonded",!0))})},init:function(){var a=$("[data-role]"),b=$("[data-hotkey]");$.Metro.initHotkeys(b),$.Metro.initWidgets(a);var c,d,e;d={childList:!0,subtree:!0},e=function(a){a.map(function(a){if(a.addedNodes)for(var b,c,d,e,f=0,g=a.addedNodes.length;g>f;f++)b=$(a.addedNodes[f]),d=b.find("[data-role]"),e=b.find("[data-hotkey]"),$.Metro.initHotkeys(e),c=void 0!==b.data("role")?$.merge(d,b):d,c.length&&$.Metro.initWidgets(c)})},c=new MutationObserver(e),c.observe(document,d)}},$.easing.jswing=$.easing.swing,$.extend($.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return $.easing[$.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;return 0==b?c:1==(b/=e)?c+d:(g||(g=.3*e),h<Math.abs(d)?(h=d,f=g/4):f=g/(2*Math.PI)*Math.asin(d/h),-(h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g))+c)},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;return 0==b?c:1==(b/=e)?c+d:(g||(g=.3*e),h<Math.abs(d)?(h=d,f=g/4):f=g/(2*Math.PI)*Math.asin(d/h),h*Math.pow(2,-10*b)*Math.sin(2*(b*e-f)*Math.PI/g)+d+c)},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;return 0==b?c:2==(b/=e/2)?c+d:(g||(g=.3*e*1.5),h<Math.abs(d)?(h=d,f=g/4):f=g/(2*Math.PI)*Math.asin(d/h),1>b?-.5*h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)*.5+d+c)},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-$.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*$.easing.easeInBounce(a,2*b,0,d,e)+c:.5*$.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}}),$.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},$.each(["keydown","keyup","keypress"],function(){$.event.special[this]={add:keyHandler}});var toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],lowestDelta,lowestDeltaXY;if($.event.fixHooks)for(var i=toFix.length;i;)$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;$.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=toBind.length;a;)this.addEventListener(toBind[--a],handler,!1);else this.onmousewheel=handler},teardown:function(){if(this.removeEventListener)for(var a=toBind.length;a;)this.removeEventListener(toBind[--a],handler,!1);else this.onmousewheel=null}},$.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}}),document.addEventListener("DOMContentLoaded",function(){preCode("pre code, textarea")},!1);var hasTouch="ontouchend"in window,eventTimer,moveDirection="undefined",startX,startY,deltaX,deltaY,mouseDown=!1,addTouchEvents=function(a){hasTouch&&(a.addEventListener("touchstart",touch2Mouse,!0),a.addEventListener("touchmove",touch2Mouse,!0),a.addEventListener("touchend",touch2Mouse,!0))};$.widget("metro.accordion",{version:"3.0.0",options:{closeAny:!1,speed:"fast",onFrameOpen:function(){return!0},onFrameOpened:function(){},onFrameClose:function(){return!0},onFrameClosed:function(){}},init:function(){var a=this,b=this.element;b.on("click",".heading",function(b){var c=$(this).parent();return c.hasClass("disabled")?!1:(c.hasClass("active")?a._closeFrame(c):a._openFrame(c),b.preventDefault(),void b.stopPropagation())})},_closeAllFrames:function(){var a=this,b=this.element.children(".frame.active");$.each(b,function(){a._closeFrame($(this))})},_openFrame:function(frame){var o=this.options,content=frame.children(".content"),result;if("function"==typeof o.onFrameOpen){if(!o.onFrameOpen(frame))return!1}else if("function"==typeof window[o.onFrameOpen]){if(!window[o.onFrameOpen](frame))return!1}else if(result=eval("(function(){"+o.onFrameOpen+"})"),!result.call(frame))return!1;o.closeAny&&this._closeAllFrames(),content.slideDown(o.speed),frame.addClass("active"),"function"==typeof o.onFrameOpened?o.onFrameOpened(frame):"function"==typeof window[o.onFrameOpened]?window[o.onFrameOpened](frame):(result=eval("(function(){"+o.onFrameOpened+"})"),result.call(frame))},_closeFrame:function(frame){var o=this.options,content=frame.children(".content"),result;if("function"==typeof o.onFrameClose){if(!o.onFrameClose(frame))return!1}else if("function"==typeof window[o.onFrameClose]){if(!window[o.onFrameClose](frame))return!1}else if(result=eval("(function(){"+o.onFrameClose+"})"),!result.call(frame))return!1;content.slideUp(o.speed,function(){frame.removeClass("active")}),"function"==typeof o.onFrameClosed?o.onFrameClosed(frame):"function"==typeof window[o.onFrameClosed]?window[o.onFrameClosed](frame):(result=eval("(function(){"+o.onFrameClosed+"})"),result.call(frame))},_create:function(){var a=this,b=this.options,c=this.element;$.each(this.element.data(),function(a,c){if(a in b)try{b[a]=$.parseJSON(c)}catch(d){b[a]=c}}),a.init(),c.data("accordion",this)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}}),$.widget("metro.appbar",{version:"3.0.0",options:{flexstyle:"app-bar-menu",flexclean:!1,flextolerance:3},_create:function(){var a=this.element,b=this.options;$.each(a.data(),function(a,c){if(a in b)try{b[a]=$.parseJSON(c)}catch(d){b[a]=c}}),this._initBar(),a.data("appbar",this)},_calculateFreeSpace:function(){var a,b,c=this,d=(this.element,this.options,0),e=0;d=$(c.menusParent).width(),a=$(c.menusParent).children(":visible").not(".app-bar-pullmenu");for(var f,g=[],h=[],i=[],j=0,k=a.length;k>j;j++)switch(f=$(a[j]).css("float")){case"left":g.push(a[j]);break;case"right":h.push(a[j]);break;default:i.push(a[j])}h.reverse(),a=new Array,a=g.concat(i,h),a=$(a),e+=parseInt($(a).first().css("margin-left"));for(var j=0,k=a.length-1;k>=j;j++)e+=$(a[j]).outerWidth(),j!==k&&(e+=Math.max(parseInt($(a[j]).css("margin-right")),parseInt($(a[j+1]).css("margin-left"))));return e+=parseInt($(a[k]).css("margin-right")),b=d-e,c.freeSpace=b,c.childrenWidth=e,c.menusParentWidth=d,b},_originIndexMove:function(a,b){var c=$(a).children().filter(function(){return parseInt($(this).attr("data-flexorderorigin"))<parseInt($(b).attr("data-flexorderorigin"))});c.length>0?$(c).last().after(b):(c=$(a).children().filter(function(){return parseInt($(this).attr("data-flexorderorigin"))>parseInt($(b).attr("data-flexorderorigin"))}),c.length>0?$(c).first().before(b):$(a).append(b))},_moveMenuEntry:function(a){{var b=this;this.element,this.options}if(a=a||"toPullMenu","toPullMenu"===a){var c=$(b.allMenuEntries).not(".app-bar-pullmenu-entry").last();if(0===c.length)return!1;var d=$(c).parent(),e=$(b.flexVisibles).index($(c).parent()),f=$(b.pullMenu).find(".app-bar-pullmenubar").eq(e);return b._originIndexMove(f,c),$(c).addClass("app-bar-pullmenu-entry"),$(f).removeClass("hidden").show(),0===$(d).children().length&&$(d).addClass("hidden"),$(b.pullButton).show(),c}if("fromPullMenu"===a){var g=$(b.allMenuEntries).filter(".app-bar-pullmenu-entry").first(),f=$(g).parent(),e=$(f).index(),d=$(b.flexVisibles).eq(e);return $(d).removeClass("hidden"),$(g).removeClass("app-bar-pullmenu-entry"),b._originIndexMove(d,g),0===$(f).children().length&&$(f).addClass("hidden").hide(),0===$(b.pullMenu).children(".app-bar-pullmenubar").not(".hidden").length&&($(b.pullMenu).hide().addClass("hidden"),$(b.pullButton).hide()),0===g.length?!1:g}},_checkMenuEntries:function(){for(var a=this,b=(this.element,this.options),c=!1,d=0,e=a.allMenuEntries.length;e>d;d++){a._calculateFreeSpace();var f=a.freeSpace;if(!(f<b.flextolerance||b.flexclean)){if(a._moveMenuEntry("fromPullMenu")){c=!0;continue}break}if(!a._moveMenuEntry("toPullMenu"))break;if(c)break}},resize:function(){{var a=this;this.element,this.options}a.initiatedAsFlex&&this._checkMenuEntries()},_initBar:function(){var a=this,b=this.element,c=this.options;a.lastFlexAction=void 0,a.pullButton=$(b).find(".app-bar-pullbutton");var d=$(b).find(".app-bar-menu");a.initiatedAsFlex=!1,c.flexclean=$(b).is("[data-flexclean='true']")||c.flexclean,c.flexstyle=$(b).attr("data-flexstyle")||c.flexstyle;var e,f;a.flexVisibles=$(),a.allMenuEntries=$(),a.menusParent=$(),a.pullMenu=$(),d.length>0&&$(b).is(":not('.no-flexible')")&&(a.flexVisibles=$(d).not(".no-flexible"),a.flexVisibles.length>0&&(a.initiatedAsFlex=!0,a.flexVisibles.sort(function(a,b){var c=parseInt($(a).data("flexorder"))||$(a).index()+1,d=parseInt($(b).data("flexorder"))||$(b).index()+1;return c-d}),$(a.flexVisibles).each(function(){e=this,f=$(e).children(),$(f).each(function(){$(this).attr("data-flexorderorigin",$(this).index()),$(this).is("[data-flexorder]")||$(this).attr("data-flexorder",$(this).index()+1)}),f.sort(function(a,b){var c=parseInt($(a).data("flexorder")),d=parseInt($(b).data("flexorder"));return c-d}),$(e).is("[data-flexdirection='reverse']")&&f.reverse(),$.merge(a.allMenuEntries,$(f).not(".no-flexible"))}),a.menusParent=$(b).find(".app-bar-menu").first().parent(),a.pullButton.length>0||(a.pullButton=$('<div class="app-bar-pullbutton automatic"></div>'),$(a.menusParent).append(a.pullButton)),a.pullMenu=$('<nav class="app-bar-pullmenu hidden" />'),a.flexVisibles.each(function(){$(a.pullMenu).append($('<ul class="app-bar-pullmenubar hidden '+c.flexstyle+'" />'))}),$(a.menusParent).append($('<div class="clearfix" style="width: 0;">')),$(a.pullMenu).addClass("flexstyle-"+c.flexstyle),$(a.menusParent).append(a.pullMenu),a._checkMenuEntries(),$(a.pullButton).on("click",function(){a=$(this).closest("[data-role=appbar]").data("appbar"),$(a.pullMenu).is(":hidden")?($(a.pullMenu).show(),$(a.pullMenu).find(".app-bar-pullmenubar").hide().not(".hidden").slideDown("fast")):$(a.pullMenu).find(".app-bar-pullmenubar").not(".hidden").show().slideUp("fast",function(){$(a.pullMenu).hide()})}),$(window).resize(function(){$("[data-role=appbar]:not(.no-flexible)").each(function(){$(this).data("appbar").resize()})}),$(window).load(function(){$("[data-role=appbar]:not(.no-flexible)").each(function(){$(this).data("appbar").resize(); })}),$("[data-role=appbar]:not(.no-flexible) [src]").on("load",function(){var a=$(this).closest("[data-role=appbar]").data("appbar");a.resize()})))},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}}),$.widget("metro.audio",{version:"3.0.14",options:{src:!1,volume:.5,muted:!1,loop:!1,preload:!1,autoplay:!1,playList:!1,mode:"full",loopButton:"<span class='mif-loop'></span>",stopButton:"<span class='mif-stop'></span>",playButton:"<span class='mif-play'></span>",pauseButton:"<span class='mif-pause'></span>",muteButton:"<span class='mif-volume-mute2'></span>",shuffleButton:"<span class='mif-shuffle'></span>",nextButton:"<span class='mif-forward'></span>",prevButton:"<span class='mif-backward'></span>",randomButton:"<span class='mif-dice'></span>",playListButton:"<span class='mif-list2'></span>",volumeLowButton:"<span class='mif-volume-low'></span>",volumeMediumButton:"<span class='mif-volume-medium'></span>",volumeHighButton:"<span class='mif-volume-high'></span>"},_create:function(){{var a=this.element;this.options}this._setOptionsFromDOM(),this._createPlayer(),this._addControls(),this._addEvents(),this._addPlayList(),this._setControlsVisibility(),a.data("audio",this)},_setControlsVisibility:function(){{var a=this.element;this.options}0==a.find(".play-list").length&&(a.find(".controls .plist").hide(),a.find(".controls .next").hide(),a.find(".controls .prev").hide(),a.find(".controls .random").hide())},_addPlayList:function(){{var a,b,c,d,e,f,g=this,h=this.element,i=this.options;h.find("audio")}if(i.playList&&void 0!=window[i.playList]&&"function"==typeof window[i.playList]&&(a=window[i.playList](),b=a.items,c=$("<div>").addClass("play-list-wrapper").insertBefore(h.find("audio")),void 0!=a.title&&(e=$("<h1>").addClass("album-title").html(a.title).appendTo(c)),void 0!=a.poster&&(d=$("<div>").addClass("poster").html($("<img>").attr("src",a.poster)).appendTo(c)),void 0!=a.desc&&$("<div>").addClass("album-desc").html(a.desc).appendTo(d),f=$("<ul>").addClass("play-list").appendTo(c),void 0!=b&&$.each(a.items,function(){var a,b=this;a=$("<li>").appendTo(f),a.data("src",b.file),void 0!=b.type&&a.data("type",b.type),a.html(void 0!=b.title?b.title:b.file.replace(/^.*[\\\/]/,""))})),f=h.find("ul"),0==f.length)return this;f.addClass("play-list");var j=f.find("li");return 0==j.length?this:($.each(j,function(){{var a=$(this);$("<div>").addClass("progress-bar small no-margin-top").data("role","progress").appendTo(a).hide()}a.on("click",function(){j.removeClass("current"),j.find(".progress-bar").hide();var b=a.data("src"),c=a.data("type");a.addClass("current"),a.find(".progress-bar").show(),h.data("current",a),g.play(b,c)})}),$(j[0]).click(),this._stop(),void h.data("current",$(j[0])))},_createPlayer:function(){var a=this.element,b=this.options,c=a.find("audio");a.addClass("audio-player"),a.addClass(b.mode),0==c.length&&(c=$("<audio>").appendTo(a)),$.each(["autoplay","controls","muted","loop","preload"],function(){c.removeAttr(this)}),b.src&&c.attr(src,b.src),b.loop&&c.attr("loop","loop"),b.preload&&c.attr("preload","auto"),b.autoplay&&c.attr("autoplay","autoplay"),c[0].volume=b.volume,c[0].muted=b.muted,a.data("muted",!1),a.data("duration",0),a.data("played",!1),a.data("volume",c[0].volume),a.data("current",!1)},_addControls:function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o=this,p=this.element,q=this.options,r=p.find("audio"),s=r[0];a=$("<div>").addClass("controls").appendTo(p),q.playListButton!==!1&&(n=$("<button/>").addClass("square-button control-element plist").html(q.playListButton).appendTo(a),n.on("click",function(){var a=p.find(".play-list-wrapper");return 0==a.length?o:void a.toggleClass("not-visible")})),q.loopButton!==!1&&(c=$("<button/>").addClass("square-button control-element loop").html(q.loopButton).appendTo(a),c.on("click",function(){c.toggleClass("active"),c.hasClass("active")?r.attr("loop","loop"):r.removeAttr("loop")})),q.playButton!==!1&&(b=$("<button/>").addClass("square-button control-element play").html(q.playButton).appendTo(a),b.on("click",function(){o._play()})),q.prevButton!==!1&&(l=$("<button/>").addClass("square-button control-element prev").html(q.prevButton).appendTo(a),l.on("click",function(){o._playPrev()})),q.nextButton!==!1&&(k=$("<button/>").addClass("square-button control-element next").html(q.nextButton).appendTo(a),k.on("click",function(){o._playNext()})),q.randomButton!==!1&&(m=$("<button/>").addClass("square-button control-element random").html(q.randomButton).appendTo(a),m.on("click",function(){o._playRandom()})),q.stopButton!==!1&&(d=$("<button/>").addClass("square-button control-element stop").html(q.stopButton).appendTo(a),d.attr("disabled",!0),d.on("click",function(){o._stop()})),i=$("<div/>").addClass("control-element stream-wrapper").appendTo(a),g=$("<div/>").addClass("slider stream-slider").appendTo(i),g.slider({showHint:!0,animate:!1,markerColor:"bg-red",completeColor:"bg-cyan",onStartChange:function(){s.pause()},onChanged:function(a){s.seekable.length>0&&(s.currentTime=(p.data("duration")*a/100).toFixed(0)),p.data("played")&&s.currentTime>=0&&s.play()}}),g.data("slider").value(0),h=$("<div/>").addClass("control-element info-box").appendTo(a),h.html("00:00 / 00:00");var t=$("<div/>").addClass("place-right").appendTo(a);e=$("<button/>").addClass("square-button control-element volume").html(q.volumeLowButton).appendTo(t),e.on("click",function(){var a=p.find(".volume-slider").data("slider");p.data("muted",!p.data("muted")),p.data("muted")?(p.data("volume",s.volume),e.html(q.muteButton),a.value(0)):(s.volume=p.data("volume"),a.value(100*p.data("volume")),o._setupVolumeButton()),s.muted=p.data("muted")}),this._setupVolumeButton(),j=$("<div/>").addClass("control-element volume-wrapper").appendTo(t),f=$("<div/>").addClass("slider volume-slider").appendTo(j),f.slider({showHint:!0,animate:!1,markerColor:"bg-red",completeColor:"bg-green",onChange:function(a){s.volume=a/100,o._setupVolumeButton()}}),f.data("slider").value(100*s.volume)},_setupVolumeButton:function(){var a=this.element,b=this.options,c=a.find("audio"),d=c[0],e=a.find(".controls"),f=e.find(".volume"),g=d.volume;f.html(g>0&&.3>g?b.volumeLowButton:g>=.3&&.6>g?b.volumeMediumButton:g>=.6&&1>=g?b.volumeHighButton:b.muteButton)},_addEvents:function(){var a=this,b=this.element,c=(this.options,b.find("audio")),d=c[0],e=(b.find(".controls"),b.find(".info-box"));c.on("loadedmetadata",function(){b.data("duration",d.duration.toFixed(0)),e.html("00:00 / "+secondsToFormattedString(b.data("duration")))}),c.on("canplay",function(){var b=d.buffered.length?Math.round(Math.floor(d.buffered.end(0))/Math.floor(d.duration)*100):0;a._setBufferSize(b)}),c.on("progress",function(){var b=d.buffered.length?Math.round(Math.floor(d.buffered.end(0))/Math.floor(d.duration)*100):0;a._setBufferSize(b)}),c.on("timeupdate",function(){if(a._setInfoData(),a._setStreamSliderPosition(),b.data("current")){var c=b.data("current").find(".progress-bar").data("progress"),e=Math.round(100*d.currentTime/b.data("duration"));c.value(e)}}),c.on("waiting",function(){}),c.on("loadeddata",function(){}),c.on("ended",function(){a._stop(),b.find(".play-list li").length>0&&a._playNext()})},_setInfoData:function(){var a=this.element,b=(a[0],this.options,a.find("audio")),c=b[0],d=a.find(".controls .info-box"),e=Math.round(c.currentTime);d.html(secondsToFormattedString(e)+" / "+secondsToFormattedString(a.data("duration")))},_setStreamSliderPosition:function(){var a=this.element,b=(a[0],this.options,a.find("audio")),c=b[0],d=a.find(".stream-slider").data("slider"),e=Math.round(100*c.currentTime/a.data("duration"));d.value(e)},_setBufferSize:function(a){var b=this.element,c=(b[0],this.options,b.find("audio")),d=(c[0],b.find(".stream-slider").data("slider"));d.buffer(Math.round(a))},_play:function(){var a=this.element,b=(a[0],this.options),c=a.find("audio"),d=c[0],e=a.find(".controls .play"),f=a.find(".controls .stop");d.paused?(e.html(b.pauseButton),d.play(),f.removeAttr("disabled"),a.data("played",!0),a.trigger("play")):(e.html(b.playButton),d.pause(),a.data("played",!1),a.trigger("pause"))},_playRandom:function(){var a=this.element,b=(a[0],this.options,a.find("audio")),c=(b[0],a.find(".play-list")),d=a.find(".play-list li");if(0==d.length)return this;var e=Math.floor(Math.random()*d.length)+1,f=c.find("li:nth-child("+e+")");f.click()},_playNext:function(){var a=this.element,b=(a[0],this.options,a.find("audio")),c=(b[0],a.find(".play-list")),d=a.find(".play-list li");if(0==d.length)return this;var e=c.find(".current").next();0==e.length&&(e=c.find("li:nth-child(1)")),e.click()},_playPrev:function(){var a=this.element,b=(a[0],this.options,a.find("audio")),c=(b[0],a.find(".play-list")),d=a.find(".play-list li");if(0==d.length)return this;var e=c.find(".current").prev();0==e.length&&(e=c.find("li:last-child")),e.click()},_stop:function(){var a=this.element,b=(a[0],this.options),c=a.find("audio"),d=c[0],e=a.find(".controls .stop"),f=a.find(".controls .play");d.pause(),d.currentTime=0,f.html(b.playButton),e.attr("disabled","disabled"),a.data("played",!1),a.find(".stream-slider").data("slider").value(0),a.trigger("stop")},play:function(a,b){var c,d=this.element,e=(d[0],this.options,d.find("audio")),f=e[0];this._stop(),e.find("source").remove(),e.removeAttr("src"),c=$("<source>").attr("src",a),void 0!=b&&c.attr("type",b),f.load(),c.appendTo(e),this._play()},pause:function(){var a=this.element,b=(a[0],this.options),c=a.find("audio"),d=c[0],e=a.find(".play");e.html(b.playButton),d.pause(),a.data("played",!1),a.trigger("pause")},resume:function(){var a=this.element,b=(a[0],this.options),c=a.find("audio"),d=c[0],e=a.find(".play"),f=a.find(".stop");e.html(b.pauseButton),d.play(),f.removeAttr("disabled"),a.data("played",!0),a.trigger("play")},stop:function(){this._stop()},_setOptionsFromDOM:function(){var a=this.element,b=this.options;$.each(a.data(),function(a,c){if(a in b)try{b[a]=$.parseJSON(c)}catch(d){b[a]=c}})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}}),$.widget("metro.group",{version:"3.0.0",options:{groupType:"one-state",buttonStyle:!1,onChange:function(){return!0},onChanged:function(){}},_create:function(){var that=this,element=this.element,o=this.options,result;$.each(element.data(),function(a,b){if(a in o)try{o[a]=$.parseJSON(b)}catch(c){o[a]=b}}),element.hasClass("group-of-buttons")||element.addClass("group-of-buttons");for(var buttons=element.find(".button, .toolbar-button"),i=0;i<buttons.length;i++)$(buttons[i]).data("index",i);o.buttonStyle!==!1&&buttons.addClass(o.buttonStyle),element.on("click",".button, .toolbar-button",function(){var button=$(this),index=button.data("index");if("function"==typeof o.onChange){if(!o.onChange(index,button))return!1}else if("function"==typeof window[o.onChange]){if(!window[o.onChange](index,button))return!1}else if(result=eval("(function(){"+o.onChange+"})"),!result.call(index,button))return!1;"one-state"===o.groupType?(buttons.removeClass("active"),$(this).addClass("active")):$(this).toggleClass("active"),"function"==typeof o.onChanged?o.onChanged(index,button):"function"==typeof window[o.onChanged]?window[o.onChanged](index,button):(result=eval("(function(){"+o.onChanged+"})"),result.call(index,button))}),element.data("group",this)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}}),$.widget("metro.calendar",{version:"3.0.0",options:{format:"yyyy-mm-dd",multiSelect:!1,startMode:"day",weekStart:window.METRO_CALENDAR_WEEK_START,otherDays:!0,date:new Date,minDate:!1,maxDate:!1,preset:!1,exclude:!1,stored:!1,buttons:!0,buttonToday:!0,buttonClear:!0,syncCalenderToDateField:!0,locale:window.METRO_CURRENT_LOCALE,actions:!0,condensedGrid:!1,scheme:"default",getDates:function(){},dayClick:function(){}},_year:0,_month:0,_day:0,_today:new Date,_event:"",_mode:"day",_distance:0,_events:[],_create:function(){var a=this,b=this.element,c=this.options;$.each(b.data(),function(a,b){if(a in c)try{c[a]=$.parseJSON(b)}catch(d){c[a]=b}}),"string"==typeof c.date&&(c.date=new Date(c.date)),c.minDate!==!1&&"string"==typeof c.minDate&&(c.minDate=new Date(c.minDate+"T00:00:00Z")-864e5),c.maxDate!==!1&&"string"==typeof c.maxDate&&(c.maxDate=new Date(c.maxDate+"T00:00:00Z")),this.locales=window.METRO_LOCALES,this._year=c.date.getFullYear(),this._distance=c.date.getFullYear()-4,this._month=c.date.getMonth(),this._day=c.date.getDate(),this._mode=c.startMode,b.data("_storage",[]),b.data("_exclude",[]),b.data("_stored",[]),b.hasClass("calendar")||b.addClass("calendar");var d,e;c.preset&&(d=/\s*,\s*/,e=c.preset.split(d),$.each(e,function(){void 0!==new Date(this)&&a.setDate(this)})),c.exclude&&(d=/\s*,\s*/,e=c.exclude.split(d),$.each(e,function(){void 0!==new Date(this)&&a.setDateExclude(this)})),c.stored&&(d=/\s*,\s*/,e=c.stored.split(d),$.each(e,function(){void 0!==new Date(this)&&a.setDateStored(this)})),"default"!==c.scheme&&b.addClass(c.scheme),this._renderCalendar(),b.data("calendar",this)},_renderButtons:function(a){var b,c,d=this.options;if(this.options.buttons){var e=d.buttonToday?"<button class='button calendar-btn-today small-button success'>"+this.locales[d.locale].buttons[0]+"</button>":"",f=d.buttonClear?"<button class='button calendar-btn-clear small-button warning'>"+this.locales[d.locale].buttons[1]+"</button>":"";b=$("<div/>").addClass("calendar-row calendar-actions"),c=$("<div/>").addClass("align-center").html(e+f),c.appendTo(b),b.appendTo(a)}},_renderMonth:function(){var a=this.options,b=this._year,c=this._month,d=(this._day,this._event,28);1===c&&(b%100!==0&&b%4===0||b%400===0)&&(d=29);var e,f,g,h,i,j=["31",""+d,"31","30","31","30","31","31","30","31","30","31"],k=j[c],l=this._dateFromNumbers(b,c+1,1).getDay();this.element.html(""),e=$("<div/>").addClass("calendar-grid"),a.condensedGrid&&e.addClass("condensed no-border"),f=$("<div/>").addClass("calendar-row no-margin"),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(f),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-previous-month' href='#'>&#12296;</a>").appendTo(f),$("<div/>").addClass("calendar-cell sel-month align-center").html("<a class='btn-select-month' href='#'>"+this.locales[a.locale].months[c]+" "+b+"</a>").appendTo(f),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-next-month' href='#'>&#12297;</a>").appendTo(f),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-next-year' href='#'>+</a>").appendTo(f),f.addClass("calendar-header").appendTo(e);var m;for(f=$("<div/>").addClass("calendar-row week-days"),h=0;7>h;h++)a.weekStart?(m=h+1,7===m&&(m=0),g=$("<div/>").addClass("calendar-cell align-center day-of-week").appendTo(f),i=$("<div/>").html(this.locales[a.locale].days[m+7]).appendTo(g)):(g=$("<div/>").addClass("calendar-cell align-center day-of-week").appendTo(f),i=$("<div/>").html(this.locales[a.locale].days[h+7]).appendTo(g));f.addClass("calendar-subheader").appendTo(e);var n=this._month-1;0>n&&(n=11);var o=j[n],p=(a.weekStart?l+6:l)%7,q="";for(f=$("<div/>").addClass("calendar-row"),h=0;p>h;h++)a.otherDays&&(q=o-(p-h-1)),g=$("<div/>").addClass("calendar-cell empty").appendTo(f),i=$("<div/>").addClass("other-day").html(q).appendTo(g),a.otherDays||i.css("visibility","hidden");var r,s,t,u=(a.weekStart?l+6:l)%7;for(h=1;k>=h;h++)u%=7,0===u&&(f.appendTo(e),f=$("<div/>").addClass("calendar-row")),g=$("<div/>").addClass("calendar-cell align-center day"),i=$("<div/>").appendTo(g),a.minDate!==!1&&this._dateFromNumbers(b,c+1,h)<a.minDate||a.maxDate!==!1&&this._dateFromNumbers(b,c+1,h)>a.maxDate?(g.removeClass("day"),i.addClass("other-day"),t=h):t="<a href='#'>"+h+"</a>",i.html(t),b===this._today.getFullYear()&&c===this._today.getMonth()&&this._today.getDate()===h&&g.addClass("today"),r=this._dateNumberStringyFy(this._year,this._month+1,h),this.element.data("_storage").indexOf(r)>=0&&(s=g.find("a"),s.parent().parent().addClass("selected")),this.element.data("_exclude").indexOf(r)>=0&&(s=g.find("a"),s.parent().parent().addClass("exclude")),this.element.data("_stored").indexOf(r)>=0&&(s=g.find("a"),s.parent().parent().addClass("stored")),g.appendTo(f),u++;var v="";for(h=u+1;7>=h;h++)a.otherDays&&(v=h-u),g=$("<div/>").addClass("calendar-cell empty").appendTo(f),i=$("<div/>").addClass("other-day").html(v).appendTo(g),a.otherDays||i.css("visibility","hidden");f.appendTo(e),this._renderButtons(e),e.appendTo(this.element)},_renderMonths:function(){var a,b,c,d,e;for(this.element.html(""),a=$("<div/>").addClass("calendar-grid"),this.options.condensedGrid&&a.addClass("condensed no-border"),b=$("<div/>").addClass("calendar-row"),$("<div/>").addClass("calendar-cell sel-minus align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(b),$("<div/>").addClass("calendar-cell sel-year align-center").html("<a class='btn-select-year' href='#'>"+this._year+"</a>").appendTo(b),$("<div/>").addClass("calendar-cell sel-plus align-center").html("<a class='btn-next-year' href='#'>+</a>").appendTo(b),b.addClass("calendar-header").appendTo(a),b=$("<div/>").addClass("calendar-row"),e=0,d=0;12>d;d++)c=$("<div/>").addClass("calendar-cell month-cell align-center month").html("<a href='#' data-month='"+d+"'>"+this.locales[this.options.locale].months[d+12]+"</a>"),this._month===d&&(new Date).getFullYear()===this._year&&c.addClass("today"),c.appendTo(b),(e+1)%4===0&&(b.appendTo(a),b=$("<div/>").addClass("calendar-row")),e+=1;this._renderButtons(a),a.appendTo(this.element)},_renderYears:function(){var a,b,c,d,e;for(this.element.html(""),a=$("<div/>").addClass("calendar-grid"),this.options.condensedGrid&&a.addClass("condensed no-border"),b=$("<div/>").addClass("calendar-row cells4"),$("<div/>").addClass("calendar-cell sel-minus align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo