/*!
 * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
 * @version 1.3.3
 *
 * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format.
 * @see http://php.net/manual/en/function.date.php
 *
 * For more JQuery plugins visit http://plugins.krajee.com
 * For more Yii related demos visit http://demos.krajee.com
 */
function tvindoor_get_video_id(e){if("string"!=typeof e)throw new TypeError("get-video-id expects a string");var t;return e=e.replace("-nocookie",""),/youtube|youtu\.be/.test(e)?t={id:tvindoor_get_video_id_youtube(e),service:"youtube"}:/vimeo/.test(e)?t={id:tvindoor_get_video_id_vimeo(e),service:"vimeo"}:/vine/.test(e)?t={id:tvindoor_get_video_id_vine(e),service:"vine"}:/videopress/.test(e)&&(t={id:tvindoor_get_video_id_videopress(e),service:"videopress"}),t}function tvindoor_get_video_id_vimeo(e){var t;if(e.indexOf("#")>-1&&(e=e.split("#")[0]),e.indexOf("?")>-1&&(e=e.split("?")[0]),/https?:\/\/vimeo\.com\/[0-9]+$|https?:\/\/player\.vimeo\.com\/video\/[0-9]+$/gim.test(e)){var a=e.split("/");a&&a.length&&(t=a.pop())}return t}function tvindoor_get_video_id_vine(e){var t,a=/https:\/\/vine\.co\/v\/([a-zA-Z0-9]*)\/?/.exec(e);return a&&a[1]}function tvindoor_get_video_id_youtube(e){var t=/youtube:\/\/|https?:\/\/youtu\.be\//g,a;if(t.test(e))return tvindoor_get_video_id_stripParameters(e.split(t)[1]);var r=/\/v\/|\/vi\//g,i;if(r.test(e))return tvindoor_get_video_id_stripParameters(e.split(r)[1]);var o=/v=|vi=/g,n;if(o.test(e))return e.split(o)[1].split("&")[0];var s=/\/embed\//g,d,l,u;if(s.test(e))return tvindoor_get_video_id_stripParameters(e.split(s)[1]);if(/\/user\//g.test(e))return tvindoor_get_video_id_stripParameters(e.split("/").pop());var f=/\/attribution_link\?.*v%3D([^%&]*)(%26|&|$)/;return f.test(e)?e.match(f)[1]:void 0}function tvindoor_get_video_id_videopress(e){var t;return e.indexOf("embed")>-1?(t=/embed\/(\w{8})/,e.match(t)[1]):(t=/\/v\/(\w{8})/,e.match(t)[1])}function tvindoor_get_video_id_stripParameters(e){return e.indexOf("?")>-1?e.split("?")[0]:e}function tvindoor_display_setup_channel_scheduler(){$start_datetime=jQuery("#tvindoor_channel_editor_scheduled_channel_start"),$end_datetime=jQuery("#tvindoor_channel_editor_scheduled_channel_end"),(jQuery($start_datetime).length||jQuery($end_datetime).length)&&(jQuery.tvindoor_datetimepicker.setLocale(tvindoor_channel_scheduler_defaults.locale),$start_datetime.tvindoor_datetimepicker({format:tvindoor_channel_scheduler_defaults.datetime_format,dayOfWeekStart:tvindoor_channel_scheduler_defaults.start_of_week,step:15,onChangeDateTime:function(e){if(e&&(!$end_datetime.val()||new Date($end_datetime.val())<e)){var t=new Date(e.getTime()+1e3*tvindoor_channel_scheduler_defaults.duration),a=new DateFormatter;$end_datetime.val(a.formatDate(t,tvindoor_channel_scheduler_defaults.datetime_format))}}}),$end_datetime.tvindoor_datetimepicker({format:tvindoor_channel_scheduler_defaults.datetime_format,dayOfWeekStart:tvindoor_channel_scheduler_defaults.start_of_week,step:15}))}function init_slide_background_select(){var e,t;e=jQuery("#tvindoor_slide_content select[name=slide_background]"),t=jQuery("#tvindoor_slide_content select[name=slide_background]").val(),update_slide_background_select(),e.find('option[value="'+t+'"]').attr("selected","selected")}function update_slide_background_meta_boxes(){var e,t;e=jQuery(".tvindoor_slide_backgrounds > *"),slide_background=jQuery("#tvindoor_slide_content select[name=slide_background]").val(),e.hide().filter("#tvindoor_slide_background_"+slide_background).show()}function update_slide_background_select(){var e,t,a;e=jQuery("#tvindoor_slide_content select[name=slide_background]"),t=jQuery("#tvindoor_slide_content select[name=slide_format]").val(),a=tvindoor_slide_formats_backgrounds[t],e.empty(),a&&jQuery.each(a,(function(t,a){e.append(jQuery("<option></option>").attr("value",t).text(a.title))}))}function update_slide_format_meta_boxes(){var e,t;e=jQuery(".tvindoor_slide_formats > *"),t=jQuery("#tvindoor_slide_content select[name=slide_format]").val(),e.hide().filter("#tvindoor_slide_format_"+t).show()}function tvindoor_admin_load_youtube_api(){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}function tvindoor_admin_slide_bg_video_prepare_player_for_playback(){if(window.tvindoor_yt_player){var e=window.tvindoor_yt_player;tvindoor_admin_slide_bg_video_update_player_mute(),e.playVideo()}}function tvindoor_admin_slide_bg_video_update_player_mute(){if(window.tvindoor_yt_player){var e=window.tvindoor_yt_player;jQuery("#slide_bg_video_enable_sound").prop("checked")?e.unMute():e.mute()}}function tvindoor_admin_slide_bg_video_update_youtube_video_preview(){if(jQuery("#slide_bg_video_video_id").val()&&jQuery("#slide_bg_video_video_id").val().length)if(window.tvindoor_yt_player){var e=window.tvindoor_yt_player,t=jQuery("#slide_bg_video_video_id").val(),a=jQuery("#slide_bg_video_video_start").val(),r=jQuery("#slide_bg_video_video_end").val();t&&(tvindoor_admin_slide_bg_video_update_player_mute(),e.loadVideoById({videoId:t,startSeconds:a,endSeconds:r}))}else tvindoor_admin_load_youtube_api()}function tvindoor_admin_slide_bg_video_validate_youtube_video_url(){var e=tvindoor_get_video_id(jQuery("#slide_bg_video_video_url").val());if(e&&e.id&&"youtube"==e.service)jQuery("#slide_bg_video_video_url").val("https://youtu.be/"+e.id),jQuery("#slide_bg_video_video_id").val(e.id),jQuery("#slide_bg_video_video_url_notification").addClass("hidden"),tvindoor_admin_slide_bg_video_update_youtube_video_preview();else{var t;if(window.tvindoor_yt_player)window.tvindoor_yt_player.pauseVideo();jQuery("#slide_bg_video_video_id").val(""),jQuery("#slide_bg_video_video_url_notification").removeClass("hidden")}}function onYouTubeIframeAPIReady(){var e=jQuery("#slide_bg_video_video_id").val(),t=jQuery("#slide_bg_video_video_start").val(),a=jQuery("#slide_bg_video_video_end").val();window.tvindoor_yt_player=new YT.Player("tvindoor-admin-video-preview",{width:"480",height:"270",videoId:e,playerVars:{controls:0,modestbranding:1,rel:0,showinfo:0,start:t,end:a},events:{onReady:tvindoor_admin_slide_bg_video_prepare_player_for_playback}})}function tvindoor_admin_slide_bg_html5_video_update_player_mute(){var e=jQuery("#slide_bg_html5_video_video_preview").get(0);e&&(jQuery("#slide_bg_html5_video_enable_sound").prop("checked")?e.muted=!1:e.muted=!0)}function tvindoor_admin_slide_bg_html5_video_update_url_status(){jQuery("#slide_bg_html5_video_video_url").val().length?jQuery("#slide_bg_html5_video_file_field").removeClass("empty"):jQuery("#slide_bg_html5_video_file_field").addClass("empty")}function tvindoor_admin_slide_bg_html5_video_update_youtube_video_preview(){if(jQuery("#slide_bg_html5_video_video_url").val()&&jQuery("#slide_bg_html5_video_video_url").val().length){var e=jQuery("#slide_bg_html5_video_video_preview").get(0);if(e){var t=jQuery("#slide_bg_html5_video_video_url").val(),a=jQuery("#slide_bg_html5_video_video_start").val(),r=jQuery("#slide_bg_html5_video_video_end").val();tvindoor_admin_slide_bg_html5_video_update_player_mute(),jQuery("#slide_bg_html5_video_video_url_notification").addClass("hidden"),e.src=t,e.currentTime=a,e.addEventListener("error",(function(e){4===this.error.code&&jQuery("#slide_bg_html5_video_video_url_notification").removeClass("hidden")}),!0),e.play(),jQuery("#slide_bg_html5_video_video_url_notification").addClass("hidden"),e.ontimeupdate=function(){(this.duration<r||!r)&&(r=this.duration),this.currentTime>=r&&e.pause()}}}}var DateFormatter,tvindoor_yt_player;!function(){"use strict";var e,t,a,r,i,o;i=864e5,o=3600,e=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},t=function(e,a,r){var i=r||"0",o=e.toString();return o.length<a?t(i+o,a):o},a=function(e){var t,r;for(e=e||{},t=1;t<arguments.length;t++)if(r=arguments[t])for(var i in r)r.hasOwnProperty(i)&&("object"==typeof r[i]?a(e[i],r[i]):e[i]=r[i]);return e},r={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["AM","PM"],ordinal:function(e){var t=e%10,a={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(e%100/10)&&a[t]?a[t]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},(DateFormatter=function(e){var t=this,i=a(r,e);this.dateSettings=i.dateSettings,this.separators=i.separators,this.validParts=i.validParts,this.intParts=i.intParts,this.tzParts=i.tzParts,this.tzClip=i.tzClip}).prototype={constructor:DateFormatter,parseDate:function(t,a){var r=this,i,o,n,s=!1,d=!1,l,u,f=this.dateSettings,c,m,h,_,g,p={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(t){if(t instanceof Date)return t;if("number"==typeof t)return new Date(t);if("U"===a)return(n=parseInt(t))?new Date(1e3*n):t;if("string"!=typeof t)return"";if(!(i=a.match(this.validParts))||0===i.length)throw new Error("Invalid date format definition.");for(o=t.replace(this.separators,"\0").split("\0"),n=0;n<o.length;n++)switch(l=o[n],u=parseInt(l),i[n]){case"y":case"Y":2===(_=l.length)?p.year=parseInt((u<70?"20":"19")+l):4===_&&(p.year=u),s=!0;break;case"m":case"n":case"M":case"F":isNaN(l)?((c=f.monthsShort.indexOf(l))>-1&&(p.month=c+1),(c=f.months.indexOf(l))>-1&&(p.month=c+1)):u>=1&&u<=12&&(p.month=u),s=!0;break;case"d":case"j":u>=1&&u<=31&&(p.day=u),s=!0;break;case"g":case"h":g=o[m=i.indexOf("a")>-1?i.indexOf("a"):i.indexOf("A")>-1?i.indexOf("A"):-1],m>-1?(h=e(g,f.meridiem[0])?0:e(g,f.meridiem[1])?12:-1,u>=1&&u<=12&&h>-1?p.hour=u+h:u>=0&&u<=23&&(p.hour=u)):u>=0&&u<=23&&(p.hour=u),d=!0;break;case"G":case"H":u>=0&&u<=23&&(p.hour=u),d=!0;break;case"i":u>=0&&u<=59&&(p.min=u),d=!0;break;case"s":u>=0&&u<=59&&(p.sec=u),d=!0;break}if(!0===s&&p.year&&p.month&&p.day)p.date=new Date(p.year,p.month-1,p.day,p.hour,p.min,p.sec,0);else{if(!0!==d)return!1;p.date=new Date(0,0,0,p.hour,p.min,p.sec,0)}return p.date}},guessDate:function(e,t){if("string"!=typeof e)return e;var a=this,r=e.replace(this.separators,"\0").split("\0"),i=/^[djmn]/g,o=t.match(this.validParts),n=new Date,s=0,d,l,u,f;if(!i.test(o[0]))return e;for(l=0;l<r.length;l++){switch(s=2,u=r[l],f=parseInt(u.substr(0,2)),l){case 0:"m"===o[0]||"n"===o[0]?n.setMonth(f-1):n.setDate(f);break;case 1:"m"===o[0]||"n"===o[0]?n.setDate(f):n.setMonth(f-1);break;case 2:d=n.getFullYear(),u.length<4?(n.setFullYear(parseInt(d.toString().substr(0,4-u.length)+u)),s=u.length):(n.setFullYear=parseInt(u.substr(0,4)),s=4);break;case 3:n.setHours(f);break;case 4:n.setMinutes(f);break;case 5:n.setSeconds(f);break}u.substr(s).length>0&&r.splice(l+1,0,u.substr(s))}return n},parseFormat:function(e,a){var r=this,o=r.dateSettings,n,s=/\\?(.?)/gi,d=function(e,t){return n[e]?n[e]():t};return n={d:function(){return t(n.j(),2)},D:function(){return o.daysShort[n.w()]},j:function(){return a.getDate()},l:function(){return o.days[n.w()]},N:function(){return n.w()||7},w:function(){return a.getDay()},z:function(){var e=new Date(n.Y(),n.n()-1,n.j()),t=new Date(n.Y(),0,1);return Math.round((e-t)/i)},W:function(){var e=new Date(n.Y(),n.n()-1,n.j()-n.N()+3),a=new Date(e.getFullYear(),0,4);return t(1+Math.round((e-a)/i/7),2)},F:function(){return o.months[a.getMonth()]},m:function(){return t(n.n(),2)},M:function(){return o.monthsShort[a.getMonth()]},n:function(){return a.getMonth()+1},t:function(){return new Date(n.Y(),n.n(),0).getDate()},L:function(){var e=n.Y();return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){var e=n.n(),t=n.W(),a;return n.Y()+(12===e&&t<9?1:1===e&&t>9?-1:0)},Y:function(){return a.getFullYear()},y:function(){return n.Y().toString().slice(-2)},a:function(){return n.A().toLowerCase()},A:function(){var e=n.G()<12?0:1;return o.meridiem[e]},B:function(){var e=3600*a.getUTCHours(),r=60*a.getUTCMinutes(),i=a.getUTCSeconds();return t(Math.floor((e+r+i+3600)/86.4)%1e3,3)},g:function(){return n.G()%12||12},G:function(){return a.getHours()},h:function(){return t(n.g(),2)},H:function(){return t(n.G(),2)},i:function(){return t(a.getMinutes(),2)},s:function(){return t(a.getSeconds(),2)},u:function(){return t(1e3*a.getMilliseconds(),6)},e:function(){var e;return/\((.*)\)/.exec(String(a))[1]||"Coordinated Universal Time"},T:function(){var e;return(String(a).match(r.tzParts)||[""]).pop().replace(r.tzClip,"")||"UTC"},I:function(){var e,t,a,r;return new Date(n.Y(),0)-Date.UTC(n.Y(),0)!=new Date(n.Y(),6)-Date.UTC(n.Y(),6)?1:0},O:function(){var e=a.getTimezoneOffset(),r=Math.abs(e);return(e>0?"-":"+")+t(100*Math.floor(r/60)+r%60,4)},P:function(){var e=n.O();return e.substr(0,3)+":"+e.substr(3,2)},Z:function(){return 60*-a.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(s,d)},r:function(){return"D, d M Y H:i:s O".replace(s,d)},U:function(){return a.getTime()/1e3||0}},d(e,e)},formatDate:function(e,t){var a=this,r,i,o,n,s,d="";if("string"==typeof e&&!1===(e=this.parseDate(e,t)))return!1;if(e instanceof Date){for(o=t.length,r=0;r<o;r++)"S"!==(s=t.charAt(r))&&(n=this.parseFormat(s,e),r!==o-1&&this.intParts.test(s)&&"S"===t.charAt(r+1)&&(i=parseInt(n),n+=this.dateSettings.ordinal(i)),d+=n);return d}return""}}}(),function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e:e(jQuery)}((function(e){"use strict";function t(e,t,a){this.date=e,this.desc=t,this.style=a}var a=!1,r={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeekShort:["ن","ث","ع","خ","ج","س","ح"],dayOfWeek:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Þrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeekShort:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeekShort:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayOfWeek:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه","یک‌شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeekShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeekShort:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"],dayOfWeek:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeekShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayOfWeek:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeekShort:["Paz","Pts","Sal","Çar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],dayOfWeek:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeekShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayOfWeek:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeekShort:["nd","pn","wt","śr","cz","pt","sb"],dayOfWeek:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeekShort:["日","月","火","水","木","金","土"],dayOfWeek:["日曜","月曜","火曜","水曜","木曜","金曜","土曜"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeekShort:["Va","Hé","Ke","Sze","Cs","Pé","Szo"],dayOfWeek:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","Ça","Ç","Ca","C","Ş"],dayOfWeek:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeekShort:["нед","пон","вто","сре","чет","пет","саб"],dayOfWeek:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeekShort:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"],dayOfWeek:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","Št","Pi","So"],dayOfWeek:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],dayOfWeekShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E Hënë","E Martē","E Mërkurë","E Enjte","E Premte","E Shtunë"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","čet","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeekShort:["нед","пон","уто","сре","чет","пет","суб"],dayOfWeek:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayOfWeek:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeekShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayOfWeek:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"]},hy:{months:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],dayOfWeekShort:["Կի","Երկ","Երք","Չոր","Հնգ","Ուրբ","Շբթ"],dayOfWeek:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},kg:{months:["Үчтүн айы","Бирдин айы","Жалган Куран","Чын Куран","Бугу","Кулжа","Теке","Баш Оона","Аяк Оона","Тогуздун айы","Жетинин айы","Бештин айы"],dayOfWeekShort:["Жек","Дүй","Шей","Шар","Бей","Жум","Ише"],dayOfWeek:["Жекшемб","Дүйшөмб","Шейшемб","Шаршемб","Бейшемби","Жума","Ишенб"]},rm:{months:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],dayOfWeekShort:["Du","Gli","Ma","Me","Gie","Ve","So"],dayOfWeek:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"]},ka:{months:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],dayOfWeekShort:["კვ","ორშ","სამშ","ოთხ","ხუთ","პარ","შაბ"],dayOfWeek:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]}},value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,disabledMinTime:!1,disabledMaxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1},i=null,o="en",n="en",s={meridiem:["AM","PM"]},d=function(){var t=r.i18n[n],a={days:t.dayOfWeek,daysShort:t.dayOfWeekShort,months:t.months,monthsShort:e.map(t.months,(function(e){return e.substring(0,3)}))};i=new DateFormatter({dateSettings:e.extend({},s,a)})};e.tvindoor_datetimepicker={setLocale:function(e){var t=r.i18n[e]?e:"en";n!=t&&(n=t,d())},setDateFormatter:function(e){i=e},RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"},d(),window.getComputedStyle||(window.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var a=/(\-([a-z]){1})/g;return"float"===t&&(t="styleFloat"),a.test(t)&&(t=t.replace(a,(function(e,t,a){return a.toUpperCase()}))),e.currentStyle[t]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var a,r;for(a=t||0,r=this.length;a<r;a+=1)if(this[a]===e)return a;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},e.fn.xdsoftScroller=function(t){return this.each((function(){var a=e(this),r=function(e){var t={x:0,y:0},a;return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(a=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],t.x=a.clientX,t.y=a.clientY):"mousedown"!==e.type&&"mouseup"!==e.type&&"mousemove"!==e.type&&"mouseover"!==e.type&&"mouseout"!==e.type&&"mouseenter"!==e.type&&"mouseleave"!==e.type||(t.x=e.clientX,t.y=e.clientY),t},i,o,n,s,d,l=100,u=!1,f=0,c=0,m=0,h=!1,_=0,g=function(){};"hide"!==t?(e(this).hasClass("xdsoft_scroller_box")||(i=a.children().eq(0),o=a[0].clientHeight,n=i[0].offsetHeight,s=e('<div class="xdsoft_scrollbar"></div>'),d=e('<div class="xdsoft_scroller"></div>'),s.append(d),a.addClass("xdsoft_scroller_box").append(s),g=function e(t){var i=r(t).y-f+_;i<0&&(i=0),i+d[0].offsetHeight>m&&(i=m-d[0].offsetHeight),a.trigger("scroll_element.xdsoft_scroller",[l?i/l:0])},d.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",(function(i){o||a.trigger("resize_scroll.xdsoft_scroller",[t]),f=r(i).y,_=parseInt(d.css("margin-top"),10),m=s[0].offsetHeight,"mousedown"===i.type||"touchstart"===i.type?(document&&e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("touchend mouseup.xdsoft_scroller",(function t(){e([document.body,window]).off("touchend mouseup.xdsoft_scroller",t).off("mousemove.xdsoft_scroller",g).removeClass("xdsoft_noselect")})),e(document.body).on("mousemove.xdsoft_scroller",g)):(h=!0,i.stopPropagation(),i.preventDefault())})).on("touchmove",(function(e){h&&(e.preventDefault(),g(e))})).on("touchend touchcancel",(function(){h=!1,_=0})),a.on("scroll_element.xdsoft_scroller",(function(e,t){o||a.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:t<0||isNaN(t)?0:t,d.css("margin-top",l*t),setTimeout((function(){i.css("marginTop",-parseInt((i[0].offsetHeight-o)*t,10))}),10)})).on("resize_scroll.xdsoft_scroller",(function(e,t,r){var u,f;o=a[0].clientHeight,n=i[0].offsetHeight,f=(u=o/n)*s[0].offsetHeight,u>1?d.hide():(d.show(),d.css("height",parseInt(f>10?f:10,10)),l=s[0].offsetHeight-d[0].offsetHeight,
!0!==r&&a.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(i.css("marginTop"),10))/(n-o)]))})),a.on("mousewheel",(function(e){var t=Math.abs(parseInt(i.css("marginTop"),10));return(t-=20*e.deltaY)<0&&(t=0),a.trigger("scroll_element.xdsoft_scroller",[t/(n-o)]),e.stopPropagation(),!1})),a.on("touchstart",(function(e){u=r(e),c=Math.abs(parseInt(i.css("marginTop"),10))})),a.on("touchmove",(function(e){if(u){e.preventDefault();var t=r(e);a.trigger("scroll_element.xdsoft_scroller",[(c-(t.y-u.y))/(n-o)])}})),a.on("touchend touchcancel",(function(){u=!1,c=0}))),a.trigger("resize_scroll.xdsoft_scroller",[t])):a.find(".xdsoft_scrollbar").hide()}))},e.fn.tvindoor_datetimepicker=function(o,s){var d=this,l=48,u=57,f=96,c=105,m=17,h=46,_=13,g=27,p=8,y=37,v=38,b=39,k=40,x=9,D=116,w=65,T=67,S=86,O=90,M=89,j=!1,W=e.isPlainObject(o)||!o?e.extend(!0,{},r,o):e.extend(!0,{},r),C=0,F,P,A=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",(function t(){e.is(":disabled")||e.data("xdsoft_datetimepicker")||(clearTimeout(C),C=setTimeout((function(){e.data("xdsoft_datetimepicker")||F(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",t).trigger("open.xdsoft")}),100))}))};return F=function(r){function s(){var e=!1,t;return W.startDate?e=q.strToDate(W.startDate):(e=W.value||(r&&r.val&&r.val()?r.val():""))?e=q.strToDateTime(e):W.defaultDate&&(e=q.strToDateTime(W.defaultDate),W.defaultTime&&(t=q.strtotime(W.defaultTime),e.setHours(t.getHours()),e.setMinutes(t.getMinutes()))),e&&q.isValidDate(e)?C.data("changed",!0):e="",e||0}function d(t){var a=function(e,t){var a=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(a).test(t)},i=function(e){try{var t;if(document.selection&&document.selection.createRange)return document.selection.createRange().getBookmark().charCodeAt(2)-2;if(e.setSelectionRange)return e.selectionStart}catch(e){return 0}},o=function(e,t){if(!(e="string"==typeof e||e instanceof String?document.getElementById(e):e))return!1;if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};t.mask&&r.off("keydown.xdsoft"),!0===t.mask&&("undefined"!=typeof moment?t.mask=t.format.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59"):t.mask=t.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===e.type(t.mask)&&(a(t.mask,r.val())||(r.val(t.mask.replace(/[0-9]/g,"_")),o(r[0],0)),r.on("keydown.xdsoft",(function(n){var s=this.value,d=n.which,W,C;if(d>=l&&d<=u||d>=f&&d<=c||d===p||d===h){for(W=i(this),C=d!==p&&d!==h?String.fromCharCode(f<=d&&d<=c?d-l:d):"_",d!==p&&d!==h||!W||(W-=1,C="_");/[^0-9_]/.test(t.mask.substr(W,1))&&W<t.mask.length&&W>0;)W+=d===p||d===h?-1:1;if(s=s.substr(0,W)+C+s.substr(W+1),""===e.trim(s))s=t.mask.replace(/[0-9]/g,"_");else if(W===t.mask.length)return n.preventDefault(),!1;for(W+=d===p||d===h?0:1;/[^0-9_]/.test(t.mask.substr(W,1))&&W<t.mask.length&&W>0;)W+=d===p||d===h?-1:1;a(t.mask,s)?(this.value=s,o(this,W)):""===e.trim(s)?this.value=t.mask.replace(/[0-9]/g,"_"):r.trigger("error_input.xdsoft")}else if(-1!==[w,T,S,O,M].indexOf(d)&&j||-1!==[g,v,k,y,b,D,m,x,_].indexOf(d))return!0;return n.preventDefault(),!1})))}var C=e('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),F=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),P=e('<div class="xdsoft_datepicker active"></div>'),A=e('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),Y=e('<div class="xdsoft_calendar"></div>'),Q=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),z=Q.find(".xdsoft_time_box").eq(0),H=e('<div class="xdsoft_time_variant"></div>'),J=e('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),I=e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),N=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),L=!1,E,R,B,V,G,U=0,q,$,X;W.id&&C.attr("id",W.id),W.style&&C.attr("style",W.style),W.weeks&&C.addClass("xdsoft_showweeks"),W.rtl&&C.addClass("xdsoft_rtl"),C.addClass("xdsoft_"+W.theme),C.addClass(W.className),A.find(".xdsoft_month span").after(I),A.find(".xdsoft_year span").after(N),A.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",(function(t){var a=e(this).find(".xdsoft_select").eq(0),r=0,i=0,o=a.is(":visible"),n,s;for(A.find(".xdsoft_select").hide(),q.currentTime&&(r=q.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),a[o?"hide":"show"](),n=a.find("div.xdsoft_option"),s=0;s<n.length&&n.eq(s).data("value")!==r;s+=1)i+=n[0].offsetHeight;return a.xdsoftScroller(i/(a.children()[0].offsetHeight-a[0].clientHeight)),t.stopPropagation(),!1})),A.find(".xdsoft_select").xdsoftScroller().on("touchstart mousedown.xdsoft",(function(e){e.stopPropagation(),e.preventDefault()})).on("touchstart mousedown.xdsoft",".xdsoft_option",(function(){void 0!==q.currentTime&&null!==q.currentTime||(q.currentTime=q.now());var t=q.currentTime.getFullYear();q&&q.currentTime&&q.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),C.trigger("xchange.xdsoft"),W.onChangeMonth&&e.isFunction(W.onChangeMonth)&&W.onChangeMonth.call(C,q.currentTime,C.data("input")),t!==q.currentTime.getFullYear()&&e.isFunction(W.onChangeYear)&&W.onChangeYear.call(C,q.currentTime,C.data("input"))})),C.getValue=function(){return q.getCurrentTime()},C.setOptions=function(a){var o={};W=e.extend(!0,{},W,a),a.allowTimes&&e.isArray(a.allowTimes)&&a.allowTimes.length&&(W.allowTimes=e.extend(!0,[],a.allowTimes)),a.weekends&&e.isArray(a.weekends)&&a.weekends.length&&(W.weekends=e.extend(!0,[],a.weekends)),a.allowDates&&e.isArray(a.allowDates)&&a.allowDates.length&&(W.allowDates=e.extend(!0,[],a.allowDates)),a.allowDateRe&&"[object String]"===Object.prototype.toString.call(a.allowDateRe)&&(W.allowDateRe=new RegExp(a.allowDateRe)),a.highlightedDates&&e.isArray(a.highlightedDates)&&a.highlightedDates.length&&(e.each(a.highlightedDates,(function(a,r){var n=e.map(r.split(","),e.trim),s,d=new t(i.parseDate(n[0],W.formatDate),n[1],n[2]),l=i.formatDate(d.date,W.formatDate);void 0!==o[l]?(s=o[l].desc)&&s.length&&d.desc&&d.desc.length&&(o[l].desc=s+"\n"+d.desc):o[l]=d})),W.highlightedDates=e.extend(!0,[],o)),a.highlightedPeriods&&e.isArray(a.highlightedPeriods)&&a.highlightedPeriods.length&&(o=e.extend(!0,[],W.highlightedDates),e.each(a.highlightedPeriods,(function(a,r){var n,s,d,l,u,f,c;if(e.isArray(r))n=r[0],s=r[1],d=r[2],c=r[3];else{var m=e.map(r.split(","),e.trim);n=i.parseDate(m[0],W.formatDate),s=i.parseDate(m[1],W.formatDate),d=m[2],c=m[3]}for(;n<=s;)l=new t(n,d,c),u=i.formatDate(n,W.formatDate),n.setDate(n.getDate()+1),void 0!==o[u]?(f=o[u].desc)&&f.length&&l.desc&&l.desc.length&&(o[u].desc=f+"\n"+l.desc):o[u]=l})),W.highlightedDates=e.extend(!0,[],o)),a.disabledDates&&e.isArray(a.disabledDates)&&a.disabledDates.length&&(W.disabledDates=e.extend(!0,[],a.disabledDates)),a.disabledWeekDays&&e.isArray(a.disabledWeekDays)&&a.disabledWeekDays.length&&(W.disabledWeekDays=e.extend(!0,[],a.disabledWeekDays)),!W.open&&!W.opened||W.inline||r.trigger("open.xdsoft"),W.inline&&(L=!0,C.addClass("xdsoft_inline"),r.after(C).hide()),W.inverseButton&&(W.next="xdsoft_prev",W.prev="xdsoft_next"),W.datepicker?P.addClass("active"):P.removeClass("active"),W.timepicker?Q.addClass("active"):Q.removeClass("active"),W.value&&(q.setCurrentTime(W.value),r&&r.val&&r.val(q.str)),isNaN(W.dayOfWeekStart)?W.dayOfWeekStart=0:W.dayOfWeekStart=parseInt(W.dayOfWeekStart,10)%7,W.timepickerScrollbar||z.xdsoftScroller("hide"),W.minDate&&/^[\+\-](.*)$/.test(W.minDate)&&(W.minDate=i.formatDate(q.strToDateTime(W.minDate),W.formatDate)),W.maxDate&&/^[\+\-](.*)$/.test(W.maxDate)&&(W.maxDate=i.formatDate(q.strToDateTime(W.maxDate),W.formatDate)),J.toggle(W.showApplyButton),A.find(".xdsoft_today_button").css("visibility",W.todayButton?"visible":"hidden"),A.find("."+W.prev).css("visibility",W.prevButton?"visible":"hidden"),A.find("."+W.next).css("visibility",W.nextButton?"visible":"hidden"),d(W),W.validateOnBlur&&r.off("blur.xdsoft").on("blur.xdsoft",(function(){if(W.allowBlank&&(!e.trim(e(this).val()).length||"string"==typeof W.mask&&e.trim(e(this).val())===W.mask.replace(/[0-9]/g,"_")))e(this).val(null),C.data("xdsoft_datetime").empty();else{var t=i.parseDate(e(this).val(),W.format);if(t)e(this).val(i.formatDate(t,W.format));else{var a=+[e(this).val()[0],e(this).val()[1]].join(""),r=+[e(this).val()[2],e(this).val()[3]].join("");!W.datepicker&&W.timepicker&&a>=0&&a<24&&r>=0&&r<60?e(this).val([a,r].map((function(e){return e>9?e:"0"+e})).join(":")):e(this).val(i.formatDate(q.now(),W.format))}C.data("xdsoft_datetime").setCurrentTime(e(this).val())}C.trigger("changedatetime.xdsoft"),C.trigger("close.xdsoft")})),W.dayOfWeekStartPrev=0===W.dayOfWeekStart?6:W.dayOfWeekStart-1,C.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},C.data("options",W).on("touchstart mousedown.xdsoft",(function(e){return e.stopPropagation(),e.preventDefault(),N.hide(),I.hide(),!1})),z.append(H),z.xdsoftScroller(),C.on("afterOpen.xdsoft",(function(){z.xdsoftScroller()})),C.append(P).append(Q),!0!==W.withoutCopyright&&C.append(F),P.append(A).append(Y).append(J),e(W.parentID).append(C),q=new(E=function(){var t=this;t.now=function(e){var a=new Date,r,i;return!e&&W.defaultDate&&(r=t.strToDateTime(W.defaultDate),a.setFullYear(r.getFullYear()),a.setMonth(r.getMonth()),a.setDate(r.getDate())),W.yearOffset&&a.setFullYear(a.getFullYear()+W.yearOffset),!e&&W.defaultTime&&(i=t.strtotime(W.defaultTime),a.setHours(i.getHours()),a.setMinutes(i.getMinutes())),a},t.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},t.setCurrentTime=function(e,a){"string"==typeof e?t.currentTime=t.strToDateTime(e):t.isValidDate(e)?t.currentTime=e:e||a||!W.allowBlank?t.currentTime=t.now():t.currentTime=null,C.trigger("xchange.xdsoft")},t.empty=function(){t.currentTime=null},t.getCurrentTime=function(e){return t.currentTime},t.nextMonth=function(){void 0!==t.currentTime&&null!==t.currentTime||(t.currentTime=t.now());var a=t.currentTime.getMonth()+1,r;return 12===a&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),a=0),r=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),a+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(a),W.onChangeMonth&&e.isFunction(W.onChangeMonth)&&W.onChangeMonth.call(C,q.currentTime,C.data("input")),r!==t.currentTime.getFullYear()&&e.isFunction(W.onChangeYear)&&W.onChangeYear.call(C,q.currentTime,C.data("input")),C.trigger("xchange.xdsoft"),a},t.prevMonth=function(){void 0!==t.currentTime&&null!==t.currentTime||(t.currentTime=t.now());var a=t.currentTime.getMonth()-1;return-1===a&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),a=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),a+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(a),W.onChangeMonth&&e.isFunction(W.onChangeMonth)&&W.onChangeMonth.call(C,q.currentTime,C.data("input")),C.trigger("xchange.xdsoft"),a},t.getWeekOfYear=function(t){if(W.onGetWeekOfYear&&e.isFunction(W.onGetWeekOfYear)){var a=W.onGetWeekOfYear.call(C,t);if(void 0!==a)return a}var r=new Date(t.getFullYear(),0,1);return 4!=r.getDay()&&r.setMonth(0,1+(4-r.getDay()+7)%7),Math.ceil(((t-r)/864e5+r.getDay()+1)/7)},t.strToDateTime=function(e){var a=[],r,o;return e&&e instanceof Date&&t.isValidDate(e)?e:((a=/^(\+|\-)(.*)$/.exec(e))&&(a[2]=i.parseDate(a[2],W.formatDate)),a&&a[2]?(r=a[2].getTime()-6e4*a[2].getTimezoneOffset(),o=new Date(t.now(!0).getTime()+parseInt(a[1]+"1",10)*r)):o=e?i.parseDate(e,W.format):t.now(),t.isValidDate(o)||(o=t.now()),o)},t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var a=e?i.parseDate(e,W.formatDate):t.now(!0);return t.isValidDate(a)||(a=t.now(!0)),a},t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var a=e?i.parseDate(e,W.formatTime):t.now(!0);return t.isValidDate(a)||(a=t.now(!0)),a},t.str=function(){return i.formatDate(t.currentTime,W.format)},t.currentTime=this.now()}),J.on("touchend click",(function(e){e.preventDefault(),C.data("changed",!0),q.setCurrentTime(s()),r.val(q.str()),C.trigger("close.xdsoft")})),A.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",(function(){C.data("changed",!0),q.setCurrentTime(0,!0),C.trigger("afterOpen.xdsoft")})).on("dblclick.xdsoft",(function(){var e=q.getCurrentTime(),t,a;e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t=q.strToDate(W.minDate),e<(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()))||(a=q.strToDate(W.maxDate),e>(a=new Date(a.getFullYear(),a.getMonth(),a.getDate()))||(r.val(q.str()),r.trigger("change"),C.trigger("close.xdsoft")))})),A.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",(function(){var t=e(this),a=0,r=!1;!function e(i){t.hasClass(W.next)?q.nextMonth():t.hasClass(W.prev)&&q.prevMonth(),W.monthChangeSpinner&&(r||(a=setTimeout(e,i||100)))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",(function t(){clearTimeout(a),r=!0,e([document.body,window]).off("touchend mouseup.xdsoft",t)}))})),Q.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",(function(){var t=e(this),a=0,r=!1,i=110;!function e(o){var n=z[0].clientHeight,s=H[0].offsetHeight,d=Math.abs(parseInt(H.css("marginTop"),10));t.hasClass(W.next)&&s-n-W.timeHeightInTimePicker>=d?H.css("marginTop","-"+(d+W.timeHeightInTimePicker)+"px"):t.hasClass(W.prev)&&d-W.timeHeightInTimePicker>=0&&H.css("marginTop","-"+(d-W.timeHeightInTimePicker)+"px"),z.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H[0].style.marginTop,10)/(s-n))]),i=i>10?10:i-10,r||(a=setTimeout(e,o||i))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",(function t(){clearTimeout(a),r=!0,e([document.body,window]).off("touchend mouseup.xdsoft",t)}))})),R=0,C.on("xchange.xdsoft",(function(t){clearTimeout(R),R=setTimeout((function(){if(void 0===q.currentTime||null===q.currentTime){if(W.allowBlank)return;q.currentTime=q.now()}for(var t="",a=new Date(q.currentTime.getFullYear(),q.currentTime.getMonth(),1,12,0,0),s=0,d,l=q.now(),u=!1,f=!1,c,m,h,_,g,p,y=[],v,b=!0,k="",x="",D,w;a.getDay()!==W.dayOfWeekStart;)a.setDate(a.getDate()-1);for(t+="<table><thead><tr>",W.weeks&&(t+="<th></th>"),d=0;d<7;d+=1)t+="<th>"+W.i18n[n].dayOfWeekShort[(d+W.dayOfWeekStart)%7]+"</th>";for(t+="</tr></thead>",t+="<tbody>",!1!==W.maxDate&&(u=q.strToDate(W.maxDate),u=new Date(u.getFullYear(),u.getMonth(),u.getDate(),23,59,59,999)),!1!==W.minDate&&(f=q.strToDate(W.minDate),f=new Date(f.getFullYear(),f.getMonth(),f.getDate()));s<q.currentTime.countDaysInMonth()||a.getDay()!==W.dayOfWeekStart||q.currentTime.getMonth()===a.getMonth();)y=[],s+=1,m=a.getDay(),h=a.getDate(),_=a.getFullYear(),g=a.getMonth(),p=q.getWeekOfYear(a),w="",y.push("xdsoft_date"),v=W.beforeShowDay&&e.isFunction(W.beforeShowDay.call)?W.beforeShowDay.call(C,a):null,W.allowDateRe&&"[object RegExp]"===Object.prototype.toString.call(W.allowDateRe)?W.allowDateRe.test(i.formatDate(a,W.formatDate))||y.push("xdsoft_disabled"):W.allowDates&&W.allowDates.length>0?-1===W.allowDates.indexOf(i.formatDate(a,W.formatDate))&&y.push("xdsoft_disabled"):!1!==u&&a>u||!1!==f&&a<f||v&&!1===v[0]?y.push("xdsoft_disabled"):-1!==W.disabledDates.indexOf(i.formatDate(a,W.formatDate))?y.push("xdsoft_disabled"):-1!==W.disabledWeekDays.indexOf(m)?y.push("xdsoft_disabled"):r.is("[readonly]")&&y.push("xdsoft_disabled"),v&&""!==v[1]&&y.push(v[1]),q.currentTime.getMonth()!==g&&y.push("xdsoft_other_month"),(W.defaultSelect||C.data("changed"))&&i.formatDate(q.currentTime,W.formatDate)===i.formatDate(a,W.formatDate)&&y.push("xdsoft_current"),i.formatDate(l,W.formatDate)===i.formatDate(a,W.formatDate)&&y.push("xdsoft_today"),0!==a.getDay()&&6!==a.getDay()&&-1===W.weekends.indexOf(i.formatDate(a,W.formatDate))||y.push("xdsoft_weekend"),void 0!==W.highlightedDates[i.formatDate(a,W.formatDate)]&&(c=W.highlightedDates[i.formatDate(a,W.formatDate)],y.push(void 0===c.style?"xdsoft_highlighted_default":c.style),w=void 0===c.desc?"":c.desc),W.beforeShowDay&&e.isFunction(W.beforeShowDay)&&y.push(W.beforeShowDay(a)),b&&(t+="<tr>",b=!1,W.weeks&&(t+="<th>"+p+"</th>")),t+='<td data-date="'+h+'" data-month="'+g+'" data-year="'+_+'" class="xdsoft_date xdsoft_day_of_week'+a.getDay()+" "+y.join(" ")+'" title="'+w+'"><div>'+h+"</div></td>",a.getDay()===W.dayOfWeekStartPrev&&(t+="</tr>",b=!0),a.setDate(h+1);if(t+="</tbody></table>",Y.html(t),A.find(".xdsoft_label span").eq(0).text(W.i18n[n].months[q.currentTime.getMonth()]),A.find(".xdsoft_label span").eq(1).text(q.currentTime.getFullYear()),k="",x="",g="",D=function t(a,o){var n=q.now(),s,d,u=W.allowTimes&&e.isArray(W.allowTimes)&&W.allowTimes.length;n.setHours(a),a=parseInt(n.getHours(),10),n.setMinutes(o),o=parseInt(n.getMinutes(),10),(s=new Date(q.currentTime)).setHours(a),s.setMinutes(o),y=[],!1!==W.minDateTime&&W.minDateTime>s||!1!==W.maxTime&&q.strtotime(W.maxTime).getTime()<n.getTime()||!1!==W.minTime&&q.strtotime(W.minTime).getTime()>n.getTime()?y.push("xdsoft_disabled"):!1!==W.minDateTime&&W.minDateTime>s||!1!==W.disabledMinTime&&n.getTime()>q.strtotime(W.disabledMinTime).getTime()&&!1!==W.disabledMaxTime&&n.getTime()<q.strtotime(W.disabledMaxTime).getTime()?y.push("xdsoft_disabled"):r.is("[readonly]")&&y.push("xdsoft_disabled"),(d=new Date(q.currentTime)).setHours(parseInt(q.currentTime.getHours(),10)),u||d.setMinutes(Math[W.roundTime](q.currentTime.getMinutes()/W.step)*W.step),(W.initTime||W.defaultSelect||C.data("changed"))&&d.getHours()===parseInt(a,10)&&(!u&&W.step>59||d.getMinutes()===parseInt(o,10))&&(W.defaultSelect||C.data("changed")?y.push("xdsoft_current"):W.initTime&&y.push("xdsoft_init_time")),parseInt(l.getHours(),10)===parseInt(a,10)&&parseInt(l.getMinutes(),10)===parseInt(o,10)&&y.push("xdsoft_today"),k+='<div class="xdsoft_time '+y.join(" ")+'" data-hour="'+a+'" data-minute="'+o+'">'+i.formatDate(n,W.formatTime)+"</div>"},W.allowTimes&&e.isArray(W.allowTimes)&&W.allowTimes.length)for(s=0;s<W.allowTimes.length;s+=1)D(x=q.strtotime(W.allowTimes[s]).getHours(),g=q.strtotime(W.allowTimes[s]).getMinutes());else for(s=0,d=0;s<(W.hours12?12:24);s+=1)for(d=0;d<60;d+=W.step)D(x=(s<10?"0":"")+s,g=(d<10?"0":"")+d);for(H.html(k),o="",s=0,s=parseInt(W.yearStart,10)+W.yearOffset;s<=parseInt(W.yearEnd,10)+W.yearOffset;s+=1)o+='<div class="xdsoft_option '+(q.currentTime.getFullYear()===s?"xdsoft_current":"")+'" data-value="'+s+'">'+s+"</div>";for(N.children().eq(0).html(o),s=parseInt(W.monthStart,10),o="";s<=parseInt(W.monthEnd,10);s+=1)o+='<div class="xdsoft_option '+(q.currentTime.getMonth()===s?"xdsoft_current":"")+'" data-value="'+s+'">'+W.i18n[n].months[s]+"</div>";I.children().eq(0).html(o),e(C).trigger("generate.xdsoft")}),10),t.stopPropagation()})).on("afterOpen.xdsoft",(function(){var e,t,a,r;W.timepicker&&(H.find(".xdsoft_current").length?e=".xdsoft_current":H.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=z[0].clientHeight,(a=H[0].offsetHeight)-t<(r=H.find(e).index()*W.timeHeightInTimePicker+1)&&(r=a-t),z.trigger("scroll_element.xdsoft_scroller",[parseInt(r,10)/(a-t)])):z.trigger("scroll_element.xdsoft_scroller",[0]))})),B=0,Y.on("touchend click.xdsoft","td",(function(t){t.stopPropagation(),B+=1;var a=e(this),i=q.currentTime;if(null==i&&(q.currentTime=q.now(),i=q.currentTime),a.hasClass("xdsoft_disabled"))return!1;i.setDate(1),i.setFullYear(a.data("year")),i.setMonth(a.data("month")),i.setDate(a.data("date")),C.trigger("select.xdsoft",[i]),r.val(q.str()),W.onSelectDate&&e.isFunction(W.onSelectDate)&&W.onSelectDate.call(C,q.currentTime,C.data("input"),t),C.data("changed",!0),C.trigger("xchange.xdsoft"),C.trigger("changedatetime.xdsoft"),(B>1||!0===W.closeOnDateSelect||!1===W.closeOnDateSelect&&!W.timepicker)&&!W.inline&&C.trigger("close.xdsoft"),setTimeout((function(){B=0}),200)})),H.on("touchmove","div",(function(){a=!0})).on("touchend click.xdsoft","div",(function(t){if(t.stopPropagation(),a)a=!1;else{var r=e(this),i=q.currentTime;if(null==i&&(q.currentTime=q.now(),i=q.currentTime),r.hasClass("xdsoft_disabled"))return!1;i.setHours(r.data("hour")),i.setMinutes(r.data("minute")),C.trigger("select.xdsoft",[i]),C.data("input").val(q.str()),W.onSelectTime&&e.isFunction(W.onSelectTime)&&W.onSelectTime.call(C,q.currentTime,C.data("input"),t),C.data("changed",!0),C.trigger("xchange.xdsoft"),C.trigger("changedatetime.xdsoft"),!0!==W.inline&&!0===W.closeOnTimeSelect&&C.trigger("close.xdsoft")}})),P.on("mousewheel.xdsoft",(function(e){return!W.scrollMonth||(e.deltaY<0?q.nextMonth():q.prevMonth(),!1)})),r.on("mousewheel.xdsoft",(function(e){return!W.scrollInput||(!W.datepicker&&W.timepicker?((V=H.find(".xdsoft_current").length?H.find(".xdsoft_current").eq(0).index():0)+e.deltaY>=0&&V+e.deltaY<H.children().length&&(V+=e.deltaY),H.children().eq(V).length&&H.children().eq(V).trigger("mousedown"),!1):W.datepicker&&!W.timepicker?(P.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),r.val&&r.val(q.str()),C.trigger("changedatetime.xdsoft"),!1):void 0)})),C.on("changedatetime.xdsoft",(function(t){if(W.onChangeDateTime&&e.isFunction(W.onChangeDateTime)){var a=C.data("input");W.onChangeDateTime.call(C,q.currentTime,a,t),delete W.value,a.trigger("change")}})).on("generate.xdsoft",(function(){W.onGenerate&&e.isFunction(W.onGenerate)&&W.onGenerate.call(C,q.currentTime,C.data("input")),L&&(C.trigger("afterOpen.xdsoft"),L=!1)})).on("click.xdsoft",(function(e){e.stopPropagation()})),V=0,$=function(e,t){do{if(!1===t(e=e.parentNode))break}while("HTML"!==e.nodeName)},G=function(){var t,a,r,i,o,n,s,d,l,u,f,c,m;if(t=(d=C.data("input")).offset(),a=d[0],u="top",r=t.top+a.offsetHeight-1,i=t.left,o="absolute",l=e(window).width(),c=e(window).height(),m=e(window).scrollTop(),document.documentElement.clientWidth-t.left<P.parent().outerWidth(!0)){var h=P.parent().outerWidth(!0)-a.offsetWidth;i-=h}"rtl"===d.parent().css("direction")&&(i-=C.outerWidth()-d.outerWidth()),W.fixed?(r-=m,i-=e(window).scrollLeft(),o="fixed"):(s=!1,$(a,(function(e){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return s=!0,!1})),s?(o="fixed",r+C.outerHeight()>c+m?(u="bottom",r=c+m-t.top):r-=m):r+a.offsetHeight>c+m&&(r=t.top-a.offsetHeight+1),r<0&&(r=0),i+a.offsetWidth>l&&(i=l-a.offsetWidth)),n=C[0],$(n,(function(e){var t;if("relative"===(t=window.getComputedStyle(e).getPropertyValue("position"))&&l>=e.offsetWidth)return i-=(l-e.offsetWidth)/2,!1})),(f={position:o,left:i,top:"",bottom:""})[u]=r,C.css(f)},C.on("open.xdsoft",(function(t){var a=!0;W.onShow&&e.isFunction(W.onShow)&&(a=W.onShow.call(C,q.currentTime,C.data("input"),t)),!1!==a&&(C.show(),G(),e(window).off("resize.xdsoft",G).on("resize.xdsoft",G),W.closeOnWithoutClick&&e([document.body,window]).on("touchstart mousedown.xdsoft",(function t(){C.trigger("close.xdsoft"),e([document.body,window]).off("touchstart mousedown.xdsoft",t)})))})).on("close.xdsoft",(function(t){var a=!0;A.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),W.onClose&&e.isFunction(W.onClose)&&(a=W.onClose.call(C,q.currentTime,C.data("input"),t)),!1===a||W.opened||W.inline||C.hide(),t.stopPropagation()})).on("toggle.xdsoft",(function(){C.is(":visible")?C.trigger("close.xdsoft"):C.trigger("open.xdsoft")})).data("input",r),U=0,C.data("xdsoft_datetime",q),C.setOptions(W),q.setCurrentTime(s()),r.data("xdsoft_datetimepicker",C).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",(function(){r.is(":disabled")||r.data("xdsoft_datetimepicker").is(":visible")&&W.closeOnInputClick||(clearTimeout(U),U=setTimeout((function(){r.is(":disabled")||(L=!0,q.setCurrentTime(s(),!0),W.mask&&d(W),C.trigger("open.xdsoft"))}),100))})).on("keydown.xdsoft",(function(t){var a,r=t.which;return-1!==[_].indexOf(r)&&W.enterLikeTab?(a=e("input:visible,textarea:visible,button:visible,a:visible"),C.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1):-1!==[x].indexOf(r)?(C.trigger("close.xdsoft"),!0):void 0})).on("blur.xdsoft",(function(){C.trigger("close.xdsoft")}))},P=function(t){var a=t.data("xdsoft_datetimepicker");a&&(a.data("xdsoft_datetime",null),a.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft touchstart"),t.unmousewheel&&t.unmousewheel())},e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",(function(e){e.keyCode===m&&(j=!0)})).on("keyup.xdsoftctrl",(function(e){e.keyCode===m&&(j=!1)})),this.each((function(){var t=e(this).data("xdsoft_datetimepicker"),a;if(t){if("string"===e.type(o))switch(o){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"toggle":t.trigger("toggle.xdsoft");break;case"destroy":P(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(i.parseDate(this.value,W.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":(a=t.data("input")).trigger("blur.xdsoft");break;default:t[o]&&e.isFunction(t[o])&&(d=t[o](s))}else t.setOptions(o);return 0}"string"!==e.type(o)&&(!W.lazyInit||W.open||W.inline?F(e(this)):A(e(this)))})),d},e.fn.tvindoor_datetimepicker.defaults=r})),
/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 */
function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}((function(e){function t(t){var i=t||window.event,o=n.call(arguments,1),l=0,f=0,c=0,m=0,h=0,_=0;if((t=e.event.fix(i)).type="mousewheel","detail"in i&&(c=-1*i.detail),"wheelDelta"in i&&(c=i.wheelDelta),"wheelDeltaY"in i&&(c=i.wheelDeltaY),"wheelDeltaX"in i&&(f=-1*i.wheelDeltaX),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(f=-1*c,c=0),l=0===c?f:c,"deltaY"in i&&(l=c=-1*i.deltaY),"deltaX"in i&&(f=i.deltaX,0===c&&(l=-1*f)),0!==c||0!==f){if(1===i.deltaMode){var g=e.data(this,"mousewheel-line-height");l*=g,c*=g,f*=g}else if(2===i.deltaMode){var p=e.data(this,"mousewheel-page-height");l*=p,c*=p,f*=p}if(m=Math.max(Math.abs(c),Math.abs(f)),(!d||m<d)&&(d=m,r(i,m)&&(d/=40)),r(i,m)&&(l/=40,f/=40,c/=40),l=Math[l>=1?"floor":"ceil"](l/d),f=Math[f>=1?"floor":"ceil"](f/d),c=Math[c>=1?"floor":"ceil"](c/d),u.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();h=t.clientX-y.left,_=t.clientY-y.top}return t.deltaX=f,t.deltaY=c,t.deltaFactor=d,t.offsetX=h,t.offsetY=_,t.deltaMode=0,o.unshift(t,l,f,c),s&&clearTimeout(s),s=setTimeout(a,200),(e.event.dispatch||e.event.handle).apply(this,o)}}function a(){d=null}function r(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],n=Array.prototype.slice,s,d;if(e.event.fixHooks)for(var l=i.length;l;)e.event.fixHooks[i[--l]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=o.length;a;)this.addEventListener(o[--a],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var a=o.length;a;)this.removeEventListener(o[--a],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var a=e(t),r=a["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(a.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})),jQuery(document).ready((function(){tvindoor_display_setup_channel_scheduler()})),function(e){"use strict";function t(){var a=e(".tvindoor_slides_editor"),r=e(".tvindoor_slides_editor_slides");e(".tvindoor_slides_editor_add_select").unbind("change").change((function(i){var o=e(i.currentTarget).val();if(o>0){var n={action:"tvindoor_slides_editor_add_slide",channel_id:a.data("channel-id"),slide_id:o,nonce:tvindoor_slides_editor_security.nonce};e.post(ajaxurl,n,(function(a){""!=a&&(r.replaceWith(a),e(".tvindoor_slides_editor_add_select").val(""),t())}))}return!1})),e(".tvindoor_slides_editor_slides_slide_remove").unbind("click").click((function(i){if(confirm(tvindoor_slides_editor_defaults.confirm_remove_message)){var o={action:"tvindoor_slides_editor_remove_slide",channel_id:a.data("channel-id"),slide_key:e(i.currentTarget).parents(".tvindoor_slides_editor_slides_slide").data("slide-key"),nonce:tvindoor_slides_editor_security.nonce};e.post(ajaxurl,o,(function(e){""!=e&&(r.replaceWith(e),t())}))}return!1})),r.sortable({revert:100,update:function(i,o){var n=[];e(this).children().each((function(){n[n.length]=e(this).data("slide-id")}));var s={action:"tvindoor_slides_editor_reorder_slides",channel_id:a.data("channel-id"),slide_ids:n,nonce:tvindoor_slides_editor_security.nonce};e.post(ajaxurl,s,(function(e){""!=e&&(r.replaceWith(e),t())}))}}),r.disableSelection()}e((function(){t()}))}(jQuery),jQuery((function(){jQuery("#tvindoor_slide_content select[name=slide_format], #tvindoor_slide_content select[name=slide_background]").length&&(init_slide_background_select(),update_slide_format_meta_boxes(),update_slide_background_meta_boxes()),jQuery("#tvindoor_slide_content select[name=slide_format]").on("change",(function(){update_slide_background_select(),update_slide_format_meta_boxes(),update_slide_background_meta_boxes()})),jQuery("#tvindoor_slide_content select[name=slide_background]").on("change",(function(){update_slide_background_meta_boxes()}))})),jQuery((function(){var e;wp.media&&(e=wp.media.model.settings.post.id,jQuery(".slide_file_upload_button").on("click",(function(t){var a,r,i="image";jQuery(this).parent(".slide_file_field").hasClass("file_type_video")&&(i="video"),jQuery(this).parent(".slide_file_field").hasClass("file_type_pdf")&&(i="application/pdf"),t.preventDefault(),a=jQuery(this).parent(),r?r.open():((r=wp.media.frames.file_frame=wp.media({title:tvindoor_slide_file_defaults[i].text_select,button:{text:tvindoor_slide_file_defaults[i].text_use},library:{type:i},multiple:!1})).on("select",(function(){var t,i;i=void 0!==(t=r.state().get("selection").first().toJSON()).sizes&&void 0!==t.sizes.full.url?t.sizes.full.url:t.url,a.find(".slide_file_preview").attr("src",i),a.find(".slide_file_value_url").val(t.url),a.find(".slide_file_value_url").trigger("change"),a.find(".slide_file_value").val(t.id),a.find(".slide_file_value").trigger("change"),wp.media.model.settings.post.id=e,a.removeClass("empty")})),r.open())})),jQuery(".slide_file_delete_button").on("click",(function(e){var t,a;e.preventDefault(),(t=jQuery(this).parent()).find(".slide_file_preview").attr("src",""),t.find(".slide_file_value_url").val(""),t.find(".slide_file_value_url").trigger("change"),t.find(".slide_file_value").val(""),t.find(".slide_file_value").trigger("change"),t.addClass("empty")})),jQuery("a.add_media").on("click",(function(){wp.media.model.settings.post.id=e})))})),jQuery((function(){jQuery("#slide_bg_video_video_url").val()&&jQuery("#slide_bg_video_video_url").val().length&&tvindoor_admin_slide_bg_video_validate_youtube_video_url(),jQuery("#slide_bg_video_video_url").on("change",(function(){tvindoor_admin_slide_bg_video_validate_youtube_video_url()})),jQuery("#slide_bg_video_video_start").on("change",(function(){tvindoor_admin_slide_bg_video_update_youtube_video_preview()})),jQuery("#slide_bg_video_video_end").on("change",(function(){tvindoor_admin_slide_bg_video_update_youtube_video_preview()})),jQuery("#slide_bg_video_enable_sound").on("change",(function(){tvindoor_admin_slide_bg_video_update_player_mute()}))})),jQuery((function(){jQuery("#slide_bg_html5_video_video_url").val()&&jQuery("#slide_bg_html5_video_video_url").val().length&&(tvindoor_admin_slide_bg_html5_video_update_url_status(),tvindoor_admin_slide_bg_html5_video_update_youtube_video_preview()),jQuery("#slide_bg_html5_video_video_url").on("change",(function(){tvindoor_admin_slide_bg_html5_video_update_url_status(),tvindoor_admin_slide_bg_html5_video_update_youtube_video_preview()})),jQuery("#slide_bg_html5_video_video_start").on("change",(function(){tvindoor_admin_slide_bg_html5_video_update_youtube_video_preview()})),jQuery("#slide_bg_html5_video_video_end").on("change",(function(){tvindoor_admin_slide_bg_html5_video_update_youtube_video_preview()})),jQuery("#slide_bg_html5_video_enable_sound").on("change",(function(){tvindoor_admin_slide_bg_html5_video_update_player_mute()}))})),function(e){"use strict";function t(){var t=e(".tvindoor-preview-actions .tvindoor-orientation-button"),r=e(".tvindoor-preview");t.on("click",(function(){var e=jQuery(this).attr("data-orientation");for(var i in t.removeClass("active"),tvindoor_preview.orientations)r.removeClass("tvindoor-preview-"+i);r.addClass("tvindoor-preview-"+e),jQuery(this).addClass("active"),a(e)}))}function a(e){var t={action:"tvindoor_preview_save_orientation_choice",orientation:e,object_id:tvindoor_preview.object_id};jQuery.post(tvindoor_preview.ajax_url,t)}e((function(){t()}))}(jQuery);