-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkonopas.min.js
More file actions
20 lines (20 loc) · 54.4 KB
/
konopas.min.js
File metadata and controls
20 lines (20 loc) · 54.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* KonOpas -- http://konopas.org/ & https://github.com/eemeli/konopas
* Copyright (c) 2013-2018 by Eemeli Aro <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* The software is provided "as is" and the author disclaims all warranties
* with regard to this software including all implied warranties of
* merchantability and fitness. In no event shall the author be liable for
* any special, direct, indirect, or consequential damages or any damages
* whatsoever resulting from loss of use, data or profits, whether in an
* action of contract, negligence or other tortious action, arising out of
* or in connection with the use or performance of this software.
* @license
*/
"use strict";function KonOpas(e){if(this.id="",this.lc="en",this.tag_categories=!1,this.default_duration=60,this.time_show_am_pm=!1,this.abbrev_00_minutes=!0,this.always_show_participants=!1,this.max_items_per_page=200,this.non_ascii_people=!1,this.people_per_screen=100,this.use_server=!1,this.log_messages=!0,this.cache_refresh_interval_mins=60,this.views=["star","prog","part","info"],"object"==typeof e)for(var t in e)this[t]=e[t];this.log_messages||(_log=function(){}),i18n[this.lc]?(i18n.txt=function(e,t){return e in i18n[this.lc]?i18n[this.lc][e](t):e}.bind(this),i18n.translate_html(i18n[this.lc],"data-txt")):alert('Locale "'+this.lc+'" not found.'),this.id||alert(i18n.txt("no_ko_id")),Array.prototype.indexOf&&Array.prototype.filter&&Array.prototype.map&&Date.now&&"localStorage"in window||alert(i18n.txt("old_browser")),this.store=new KonOpas.Store(this.id),this.stars=new KonOpas.Stars(this.id),this.server=this.use_server&&KonOpas.Server&&new KonOpas.Server(this.id,this.stars),this.item=new KonOpas.Item,this.info=new KonOpas.Info,window.onhashchange=this.set_view.bind(this);for(var n=document.getElementsByClassName("popup-link"),t=0;t<n.length;++t)n[t].addEventListener("click",KonOpas.popup_open);_el("refresh")&&window.addEventListener("load",this.refresh_cache.bind(this),!1)}function _log(e,t){if(window.console)switch(t){case"error":console.error(e);break;case"warn":console.warn(e);break;default:console.log(e)}}function _el(e){return e&&document.getElementById(e)}function _new_elem(e,t,n,r){var i=document.createElement(e);return t&&(i.className=t),n&&(i.textContent=n),r&&(i.style.display="none"),i}!function(e){e.i18n={lc:{en:function(e){return 1===e?"one":"other"}},c:function(e,t){if(!e)throw new Error("MessageFormat: Data required for '"+t+"'.")},n:function(e,t,n){if(isNaN(e[t]))throw new Error("MessageFormat: '"+t+"' isn't a number.");return e[t]-(n||0)},v:function(e,t){return i18n.c(e,t),e[t]},p:function(e,t,n,r,i){return i18n.c(e,t),e[t]in i?i[e[t]]:(t=i18n.lc[r](e[t]-n),t in i?i[t]:i.other)},s:function(e,t,n){return i18n.c(e,t),e[t]in n?n[e[t]]:n.other}},i18n.en={Program:function(e){return"Programme"},weekday_n:function(e){return i18n.p(e,"N",0,"en",{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday",other:"???"})},weekday_short_n:function(e){return i18n.p(e,"N",0,"en",{0:"Sun",1:"Mon",2:"Tue",3:"Wed",4:"Thu",5:"Fri",6:"Sat",other:"???"})},month_n:function(e){return i18n.p(e,"N",0,"en",{0:"January",1:"February",2:"March",3:"April",4:"May",5:"June",6:"July",7:"August",8:"September",9:"October",10:"November",11:"December",other:"???"})},time_diff:function(e){return i18n.v(e,"T")+" "+i18n.p(e,"T_UNIT",0,"en",{0:"seconds",1:"minutes",2:"hours",3:"days",4:"weeks",5:"months",6:"years",other:"???"})+" "+i18n.s(e,"T_PAST",{true:"ago",other:"from now"})},search_example:function(e){return"For example, you could try <b>"+i18n.v(e,"X")+"</b>"},no_ko_id:function(e){return"No ID set! Please assign konopas_set.id a unique identifier."},old_browser:function(e){return"Unfortunately, your browser doesn't support some of the Javascript features required by KonOpas. To use, please try a different browser."},item_not_found:function(e){return"Programme id <b>"+i18n.v(e,"ID")+"</b> not found!"},item_tags:function(e){return i18n.s(e,"T",{tags:"Tags",track:"Track",type:"Type",other:i18n.v(e,"T")})},star_export_this:function(e){return'Your current selection is encoded in <a href="'+i18n.v(e,"THIS")+'" target="_blank">this page\'s URL</a>, which you may open elsewhere to share your selection.'},star_export_share:function(e){return'For easier sharing, you can also generate a <a href="'+i18n.v(e,"SHORT")+'">shorter link</a> or a <a href="'+i18n.v(e,"QR")+'">QR code</a>.'},star_import_this:function(e){return'Your previously selected items are shown with a highlighted interior, while those imported via <a href="'+i18n.v(e,"THIS")+'">this link</a> have a highlighted border.'},star_import_diff:function(e){return"Your previous selection "+i18n.p(e,"PREV",0,"en",{0:"was empty",one:"had one item",other:"had "+i18n.n(e,"PREV")+" items"})+", and the imported selection has "+i18n.p(e,"NEW",0,"en",{0:"no new items",one:"one new item",other:i18n.n(e,"NEW")+" new items"})+" "+i18n.p(e,"SAME",0,"en",{0:"",one:"and one which was already selected",other:"and "+i18n.n(e,"SAME")+" which were already selected"})+"."},star_import_bad:function(e){return i18n.p(e,"BAD",0,"en",{0:"",one:"One of the imported items had an invalid ID.",other:i18n.n(e,"BAD")+" of the imported items had invalid IDs."})},star_set:function(e){return"Set my selection to the imported selection"},add_n:function(e){return"add "+i18n.v(e,"N")},discard_n:function(e){return"discard "+i18n.v(e,"N")},star_add:function(e){return"Add the "+i18n.p(e,"N",0,"en",{one:"new item",other:i18n.n(e,"N")+" new items"})+" to my selection"},star_export_link:function(e){return'<a href="'+i18n.v(e,"URL")+'">Export selection</a> ('+i18n.p(e,"N",0,"en",{one:"one item",other:i18n.n(e,"N")+" items"})+")"},star_hint:function(e){return'To "star" a programme item, click on the square next to it. Your selections will be remembered, and shown in this view. You currently don\'t have any programme items selected, so this list is empty.'},star_no_memory:function(e){return i18n.s(e,"WHY",{FFcookies:"It looks like you're using a Firefox browser with cookies disabled, so ",IOSprivate:"It looks like you're using an iOS or Safari browser in private mode, so ",other:"For some reason,"})+' your <a href="http://en.wikipedia.org/wiki/Web_storage">localStorage</a> is not enabled, and therefore your selection will not be remembered between sessions. '+i18n.s(e,"SERVER",{true:'Please <span class="js-link" onclick="var e=_el(\'login-popup-link\');if(e)e.click();">login</span> to enable persistent storage.',other:""})},filter_sum_id:function(e){return"Listing "+i18n.p(e,"N",0,"en",{one:"one item: "+i18n.v(e,"TITLE"),other:i18n.n(e,"N")+" items with id "+i18n.v(e,"ID")})},filter_sum:function(e){return"Listing "+i18n.p(e,"N",0,"en",{one:"one",other:i18n.v(e,"ALL")+" "+i18n.n(e,"N")})+" "+i18n.s(e,"LIVE",{undefined:"",other:"current and future"})+" "+i18n.v(e,"TAG")+" "+i18n.p(e,"N",0,"en",{one:"item",other:"items"})+" "+i18n.s(e,"DAY",{undefined:"",other:"on "+i18n.v(e,"DAY")+" "+i18n.s(e,"TIME",{undefined:"",other:"after "+i18n.v(e,"TIME")})})+" "+i18n.s(e,"AREA",{undefined:"",other:"in "+i18n.v(e,"AREA")})+" "+i18n.s(e,"Q",{undefined:"",other:"matching the query "+i18n.v(e,"Q")})},day_link:function(e){return"Show "+i18n.v(e,"N")+" matching items from "+i18n.p(e,"D",0,"en",{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday",other:"???"})},hidden_link:function(e){return"Show "+i18n.v(e,"N")+" more matching items with an end time before "+i18n.v(e,"T")+" on "+i18n.p(e,"D",0,"en",{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday",other:"???"})},server_cmd_fail:function(e){return'The command "'+i18n.v(e,"CMD")+'" failed.'},post_author:function(e){return i18n.v(e,"N")+" posted…"},ical_login:function(e){return'To make your selection available in external calendars, please <span class="js-link" onclick="var e=_el(\'login-popup-link\');if(e)e.click();">login</span>.'},ical_link:function(e){return"Your selection is available as an iCal (.ics) calendar at:"},ical_hint:function(e){return"Note that changes you make in this guide may not show up immediately in your external calendar software."},ical_make:function(e){return'To view your selection in your calendar app, you may also <br class="wide-only">'+i18n.v(e,"A_TAG")+"make it available</a> in iCal (.ics) calendar format"},login_why:function(e){return"Once you've verified your e-mail address, you'll be able to sync your data between different clients (including external calendars). After signing in, no information will be transmitted to these external services."}}}(this),KonOpas.prototype.set_program=function(e,t){this.program=new KonOpas.Prog(e,t)},KonOpas.prototype.set_people=function(e){this.people=new KonOpas.Part(e,this)},KonOpas.prototype.set_view=function(){var e=window.location.hash.substr(1,4),t=_el("tabs");if(this.program&&this.program.list.length)switch(t.style.display="block",this.people&&this.people.list.length?t.classList.remove("no-people"):(t.classList.add("no-people"),"part"==e&&(e="")),e){case"part":this.people.show();break;case"star":this.stars.show();break;case"info":this.info.show();break;default:this.program.show(),e="prog"}else e="info",t.style.display="none",this.info.show(),this.server&&this.server.error("Programme loading failed!");for(var n=0;n<this.views.length;++n)document.body.classList[e==this.views[n]?"add":"remove"](this.views[n]);_el("load_disable")&&(_el("load_disable").style.display="none")},KonOpas.prototype.refresh_cache=function(){var e=6e4*this.cache_refresh_interval_mins,t=window.applicationCache;!e||e<0||(t.addEventListener("updateready",function(){t.status==t.UPDATEREADY&&(_el("refresh").classList.add("enabled"),_el("refresh").onclick=function(){window.location.reload()})},!1),t.status!=t.UNCACHED&&window.setInterval(function(){t.update()},e))},KonOpas.Info=function(){this.lu=_el("last-updated"),this.lu_time=0;var e=this,t=document.body.parentNode.getAttribute("manifest");if(this.lu&&t&&("http:"==location.protocol||"https:"==location.protocol)){var n=new XMLHttpRequest;n.onload=function(){e.lu_time=new Date(this.getResponseHeader("Last-Modified")),e.show_updated()},n.open("GET",t,!0),n.send()}for(var r=_el("info_view").getElementsByClassName("collapse"),i=0;i<r.length;++i)r[i].onclick=KonOpas.toggle_collapse},KonOpas.Info.prototype.show_updated=function(){if(this.lu&&this.lu_time){var e=this.lu.getElementsByTagName("span")[0];e.textContent=KonOpas.pretty_time_diff(this.lu_time),e.title=this.lu_time.toLocaleString(),e.onclick=function(e){var t=(e||window.event).target,n=t.title;t.title=t.textContent,t.textContent=n},this.lu.style.display="inline"}},KonOpas.Info.prototype.show=function(){_el("prog_ls").innerHTML="",this.show_updated()},KonOpas.Item=function(){_el("prog_ls").onclick=KonOpas.Item.list_click,_el("scroll_link")&&(_el("scroll_link").onclick=function(){return _el("top").scrollIntoView(),!1},window.navigator&&navigator.userAgent.match(/Android [12]/)?(_el("time").style.display="none",_el("scroll").style.display="none"):(this.scroll={i:0,top:0,day:"",day_txt:"",t_el:_el("time"),s_el:_el("scroll"),times:document.getElementsByClassName("new_time")},window.onscroll=this.scroll_time.bind(this)))},KonOpas.Item.show_extra=function(e,t){if(!_el("e"+t)){var n="",r=konopas.program.list.filter(function(e){return e.id==t});r.length<1?n=i18n.txt("item_not_found",{ID:t}):(n=function(e){if(!e.tags||!e.tags.length)return"";var t={};e.tags.forEach(function(e){var n="tags",r=KonOpas.Prog.hash({tag:e}),i=e.split(":");i.length>1&&(n=i.shift(),e=i.join(":"));var o='<a href="'+r+'">'+e+"</a>";t[n]?t[n].push(o):t[n]=[o]});var n=[];for(var r in t)n.push(i18n.txt("item_tags",{T:r})+": "+t[r].join(", "));return'<div class="discreet">'+n.join("<br>")+"</div>\n"}(r[0])+function(e){return e.people&&e.people.length?'<div class="item-people">'+e.people.map(konopas.people&&konopas.people.list.length?function(e){return'<a href="#part/'+KonOpas.hash_encode(e.id)+'">'+e.name+"</a>"}:function(e){return e.name}).join(", ")+"</div>\n":""}(r[0]),r[0].desc&&(n+="<p>"+r[0].desc),n+='<a href="#prog/id:'+r[0].id+'" class="permalink" title="'+i18n.txt("Permalink")+'"></a>');var i=_new_elem("div","extra");i.id="e"+t,i.innerHTML=n,e.appendChild(i)}},KonOpas.Item.new=function(e){function t(e){var t="";return e.loc&&e.loc.length&&(t=e.loc[0],e.loc.length>1&&(t+=" ("+e.loc.slice(1).join(", ")+")")),e.mins&&e.mins!=konopas.default_duration&&(t&&(t+=", "),t+=KonOpas.pretty_time(e.time,konopas)+" - "+KonOpas.pretty_time(KonOpas.time_sum(e.time,e.mins),konopas)),t}var n=_new_elem("div","item_frame"),r=n.appendChild(_new_elem("div","item_star")),i=n.appendChild(_new_elem("div","item")),o=i.appendChild(_new_elem("div","title")),a=i.appendChild(_new_elem("div","loc"));return KonOpas.Item.new=function(e){return r.id="s"+e.id,i.id="p"+e.id,o.textContent=e.title,a.textContent=t(e),n.cloneNode(!0)},KonOpas.Item.new(e)},KonOpas.Item.show_list=function(e,t){function n(n){var r=o[n],a=i18n.txt("day_link",{N:i[r],D:KonOpas.parse_date(r).getDay()}),s=_new_elem("a","day-link js-link",a);return s.id=n+"_day_link",s.onclick=function(){"next"==n&&window.scrollTo(0,0),t.day=r,KonOpas.Item.show_list(e,t)},s}var r=Date.now(),i={},o={},a=document.createDocumentFragment(),s="",u="",l=function(e){if(t.day&&e.date&&(i[e.date]=(i[e.date]||0)+1),t.show_all||!t.day||!e.date||e.date==t.day){if(this.hide_ended&&e.t1&&e.t1<t.now)return void++t.n_hidden;e.date!=s&&(s=e.date,u="",a.appendChild(_new_elem("div","new_day",KonOpas.pretty_date(e.t0||e.date,konopas))).id="dt_"+e.date),e.time!=u&&(u=e.time,a.appendChild(document.createElement("hr")),a.appendChild(_new_elem("div","new_time",KonOpas.pretty_time(e.t0||e.time,konopas))).setAttribute("data-day",e.date)),a.appendChild(KonOpas.Item.new(e)),++t.n_listed}};if(t||(t={}),t.show_all=e.length<=konopas.max_items_per_page,t.n_hidden=0,t.n_listed=0,t.now=new Date(r+6e5-r%6e5),!t.day||!konopas.program.days[t.day]){var p=KonOpas.data_date(t.now);if(konopas.program.days[p])t.day=p;else{t.day="";for(t.day in konopas.program.days)break}}if(e.length>(t.id?1:0)&&(a.appendChild(_new_elem("div","item_expander","» ")).appendChild(_new_elem("a","js-link",i18n.txt("Expand all"))).id="item_expander_link"),e.forEach(l,{hide_ended:t.hide_ended}),!t.n_listed&&t.n_hidden&&(i={},t.n_hidden=0,t.n_listed=0,s="",u="",e.forEach(l,{hide_ended:!1})),t.day&&!t.show_all)for(var d in i)d in konopas.program.days&&(d<t.day?o.prev=d:d>t.day&&!o.next&&(o.next=d));o.prev&&!t.n_hidden&&a.insertBefore(n("prev"),a.firstChild),o.next&&a.appendChild(n("next")),t.n_hidden&&a.insertBefore(function(){var n=i18n.txt("hidden_link",{N:t.n_hidden,T:KonOpas.pretty_time(t.now,konopas),D:t.now.getDay()}),r=_new_elem("a","day-link js-link",n);return r.id="hidden_day_link",r.onclick=function(){t.hide_ended=!1,t.day=KonOpas.data_date(t.now),KonOpas.Item.show_list(e,t)},r}(),a.firstChild);for(var c=_el("prog_ls");c.firstChild;)c.removeChild(c.firstChild);c.appendChild(a);var h=_el("item_expander_link");h&&(h.onclick=function(){var e=c.getElementsByClassName("item"),t=i18n.txt("Expand all");if(h.textContent==t){for(var n=0,r=e.length;n<r;++n)e[n].parentNode.classList.add("expanded"),KonOpas.Item.show_extra(e[n],e[n].id.substr(1));h.textContent=i18n.txt("Collapse all")}else{for(var n=0,r=e.length;n<r;++n)e[n].parentNode.classList.remove("expanded");h.textContent=t}});for(var f=c.getElementsByClassName("item_star"),g=0,_=f.length;g<_;++g)f[g].onclick=function(){return konopas.stars.toggle(this,this.id.substr(1)),!1};if(konopas.stars.list().forEach(function(e){var t=_el("s"+e);t&&t.classList.add("has_star")}),t.id){var m=document.getElementById("p"+t.id);m&&(m.parentNode.classList.add("expanded"),KonOpas.Item.show_extra(m,t.id),e.length>1&&m.scrollIntoView())}if(t.prog_view){var E=_el("day-sidebar"),v=_el("day-narrow"),y=function(n){var r=(n||window.event).target,i=r.getAttribute("data-day");if(i)if(t.day=i,t.show_all){var o=_el("dt_"+i);o?(o.scrollIntoView(),KonOpas.Prog.focus_day(i)):i<KonOpas.data_date(t.now)&&(t.hide_ended=!1,KonOpas.Item.show_list(e,t))}else t.hide_ended=!0,KonOpas.Item.show_list(e,t)},w=function(e,n){var r=document.createElement("ul");r.className="day-list",r.onclick=y;for(var o in konopas.program.days){var a=document.createElement("li");a.textContent=konopas.program.days[o][n]+" ("+(i[o]||0)+")",a.setAttribute("data-day",o),o==t.day&&(a.className="selected"),r.appendChild(a)}e.innerHTML="",e.appendChild(r)};E&&w(E,"long"),v&&w(v,"short"),konopas.program.show_filter_sum(e,t)}konopas.item.scroll.i=0,window.onscroll&&window.onscroll()},KonOpas.Item.list_click=function(e){for(var t=(e||window.event).target,n=!1;t&&!/\bitem(_|$)/.test(t.className);){if("prog_ls"==t.id)return;if("a"==t.tagName.toLowerCase()&&t.href&&(n=!0),!(t=t.parentNode))return}t&&t.id&&"p"==t.id[0]&&!n&&t.parentNode.classList.toggle("expanded")&&KonOpas.Item.show_extra(t,t.id.substr(1))},KonOpas.Item.prototype.scroll_time=function(){var e=this.scroll,t=e.times.length,n=window.pageYOffset+20;if(e.t_el&&t){if(n<e.times[0].offsetTop){e.i=0,e.top=e.times[0].offsetTop,e.t_el.style.display="none";var r=e.times[0].getAttribute("data-day");r!=e.day&&(KonOpas.Prog.focus_day(r),e.day=r)}else{var i=e.top?e.i:1;if(i>=t&&(i=t-1),n>e.times[i].offsetTop){for(;i<t&&n>e.times[i].offsetTop;)++i;--i}else for(;i>=0&&n<e.times[i].offsetTop;)--i;if(i<0&&(i=0),0==i||i!=e.i){e.i=i,e.top=e.times[i].offsetTop;var r=e.times[i].getAttribute("data-day"),o=i+1<t&&e.times[i+1].getAttribute("data-day")||r;e.t_el.textContent=konopas.program.days[r].short+"\n"+e.times[i].textContent,e.t_el.style.display="block",o!=e.day&&(KonOpas.Prog.focus_day(o),e.day=o)}}e.s_el&&(e.s_el.style.display=e.t_el.style.display)}},KonOpas.Part=function(e,t){this.list=e||[],this.list.forEach(function(e){e.sortname=((e.name[1]||"")+" "+e.name[0]).toLowerCase().replace(/^[\s\/()]+/,""),t.non_ascii_people||(e.sortname=e.sortname.make_ascii())}),this.list.sort(t.non_ascii_people?function(e,n){return e.sortname.localeCompare(n.sortname,t.lc)}:function(e,t){return e.sortname<t.sortname?-1:e.sortname>t.sortname}),this.set_ranges(t.people_per_screen||0)},KonOpas.Part.prototype.set_ranges=function(e){var t=this,n=function(e,n){var r=_new_elem("ul","name-list");n.forEach(function(e){var t=e.charAt(0);" "==t&&(t="A");var n=_new_elem("li","",t);e.length>1&&(n.textContent+=" - "+e.charAt(1)),n.setAttribute("data-range",e),r.appendChild(n)}),e.appendChild(r),e.onclick=function(e){var t=(e||window.event).target.getAttribute("data-range");t&&(konopas.store.set("part",{name_range:t,participant:""}),window.location.hash="#part",this.update_view(t,""))}.bind(t)},r=function(e){return e.replace(/^[\s\/(]+/,"").charAt(0).toUpperCase()},i=[],o=[];this.list.forEach(function(e){e.name&&e.name.length&&(i.push(r(e.name[0])),e.name.length>=2&&o.push(r(e.name[1])||r(e.name[0])))}),this.ranges=function(e,t){for(var n=[],r=" ",i=t?Math.round(e.length/t):0,o=1;o<=i;++o){var a=Math.round(o*e.length/i),s=0,u=0;for(a<0&&(a=0),a>=e.length&&(a=e.length-1);function(e,t){return t<e.length-1&&e[t+1]==e[t]}(e,a+s);)++s;if(s)for(;function(e,t){return t>0&&e[t-1]==e[t]}(e,a-u);)++u;s<=u?a+=s:a>u&&(a-=u+1),n.length&&n[n.length-1]==e[a]||n.push(e[a])}return n.forEach(function(e,t){e>r&&(n[t]=r+e),e>=r&&(r=String.fromCharCode(e.charCodeAt(0)+1))}),n}(o.length?o:i,e),n(_el("part-sidebar"),this.ranges),n(_el("part-narrow"),this.ranges);var a=i.length&&o.length?"":i.length&&!o.length?"fn-only":!i.length&&o.length?"ln-only":"error";a&&_el("part_names").classList.add(a)},KonOpas.Part.name_in_range=function(e,t){switch(t.length){case 1:return e==t[0];case 2:return konopas.non_ascii_people?e.localeCompare(t[0],konopas.lc)>=0&&e.localeCompare(t[1],konopas.lc)<=0:e>=t[0]&&e<=t[1];default:return t.indexOf(e)>=0}},KonOpas.Part.prototype.show_one=function(e){var t=this.list[e],n=KonOpas.clean_name(t,!1),r="",i="",o=KonOpas.clean_links(t);if(o){r+='<dl class="linklist">';for(var a in o)if("img"!=a){var s=o[a].tgt,u=o[a].txt||s;r+="<dt>"+a+':<dd><a href="'+s+'">'+u+"</a>"}r+="</dl>",o.img&&navigator.onLine&&(i='<a class="part_img" href="'+o.img.tgt+'"><img src="'+o.img.tgt+'" alt="'+i18n.txt("Photo")+": "+n+'"></a>')}_el("part_names").innerHTML="",_el("part_info").innerHTML='<h2 id="part_title">'+n+"</h2>"+(t.bio||i?"<p>"+i+t.bio:"")+r,KonOpas.Item.show_list(konopas.program.list.filter(function(e){return t.prog.indexOf(e.id)>=0})),_el("top").scrollIntoView()},KonOpas.Part.prototype.show_list=function(e){var t=e?this.list.filter(function(t){var n=t.sortname[0].toUpperCase();return KonOpas.Part.name_in_range(n,e)}):this.list;_el("part_names").innerHTML=t.map(function(e){return'<li><a href="#part/'+KonOpas.hash_encode(e.id)+'">'+KonOpas.clean_name(e,!0)+"</a></li>"}).join(""),_el("part_info").innerHTML="",_el("prog_ls").innerHTML=""},KonOpas.Part.prototype.update_view=function(e,t){var n=t.substr(1),r=document.querySelectorAll(".name-list > li");e||(e=this.ranges&&this.ranges[0]||"");for(var i=0;i<r.length;++i){var o=r[i].getAttribute("data-range")==e?"add":"remove";r[i].classList[o]("selected")}n&&this.list.some(function(e,t){if(e.id==n)return this.show_one(t),!0},this)||(t="",this.show_list(e)),konopas.store.set("part",{name_range:e,participant:t})},KonOpas.Part.prototype.show=function(e){if(!this.list.length)return void(window.location.hash="");var t=konopas.store.get("part")||{},n=t.name_range||"",r=!document.body.classList.contains("part")&&t.participant||"",e=window.location.hash.substr(6);if(e){var i=KonOpas.hash_decode(e),o=this.list.filter(function(e){return e.id==i});if(!o.length)return void(window.location.hash="#part");r="p"+o[0].id;var a=o[0].sortname[0].toUpperCase();a&&this.ranges&&this.ranges.some(function(e){if(KonOpas.Part.name_in_range(a,e))return n=e,!0})||(n="")}else if(r)return void(window.location.hash="#part/"+r.substr(1));this.update_view(n,r)},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),function(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"!==e.name}return!0}()&&(Date.prototype._orig_toLocaleDateString=Date.prototype.toLocaleDateString,Date.prototype.toLocaleDateString=function(e,t){if(!arguments.length||"undefined"==typeof i18n)return this._orig_toLocaleDateString();var n=function(t,n){return t in i18n[e]?i18n[e][t](n):t},r=n("weekday_n",{N:this.getDay()}),i=this.getDate(),o=n("month_n",{N:this.getMonth()}),a=r+", "+i+" "+o;return t&&t.year&&(a+=" "+this.getFullYear()),a}),String.prototype.make_ascii=String.prototype.normalize?function(){return this.normalize("NFKD").replace(/[^\x00-\x7F]/g,"")}:function(){var e=this.toString();if(/^[\x00-\x7F]*$/.test(e))return e;var t={A:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g,AA:/[\uA732]/g,AE:/[\u00C6\u01FC\u01E2]/g,AO:/[\uA734]/g,AU:/[\uA736]/g,AV:/[\uA738\uA73A]/g,AY:/[\uA73C]/g,B:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g,C:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g,D:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g,DZ:/[\u01F1\u01C4]/g,Dz:/[\u01F2\u01C5]/g,E:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g,F:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g,G:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g,H:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g,I:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g,J:/[\u004A\u24BF\uFF2A\u0134\u0248]/g,K:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g,L:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g,LJ:/[\u01C7]/g,Lj:/[\u01C8]/g,M:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g,N:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g,NJ:/[\u01CA]/g,Nj:/[\u01CB]/g,O:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g,OI:/[\u01A2]/g,OO:/[\uA74E]/g,OU:/[\u0222]/g,P:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g,Q:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g,R:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g,S:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g,T:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g,TZ:/[\uA728]/g,U:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g,V:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g,VY:/[\uA760]/g,W:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g,X:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g,Y:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g,Z:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g,a:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g,aa:/[\uA733]/g,ae:/[\u00E6\u01FD\u01E3]/g,ao:/[\uA735]/g,au:/[\uA737]/g,av:/[\uA739\uA73B]/g,ay:/[\uA73D]/g,b:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g,c:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g,d:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g,dz:/[\u01F3\u01C6]/g,e:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g,f:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g,g:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g,h:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g,hv:/[\u0195]/g,i:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g,j:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g,k:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g,l:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g,lj:/[\u01C9]/g,m:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g,n:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g,nj:/[\u01CC]/g,o:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g,oi:/[\u01A3]/g,ou:/[\u0223]/g,oo:/[\uA74F]/g,p:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g,q:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g,r:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g,s:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g,t:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g,tz:/[\uA729]/g,u:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g,v:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g,vy:/[\uA761]/g,w:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g,x:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g,y:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g,z:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g};for(var n in t)e=e.replace(t[n],n);return e.replace(/[^\x00-\x7F]/g,"")},"undefined"==typeof document||"classList"in document.createElement("a")||function(e){var t=(e.HTMLElement||e.Element).prototype,n=Object,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},o=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},a=function(e,t){if(""===t)throw new o("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new o("INVALID_CHARACTER_ERR","String contains an invalid character");return i.call(e,t)},s=function(e){for(var t=r.call(e.className),n=t?t.split(/\s+/):[],i=0,o=n.length;i<o;i++)this.push(n[i]);this._updateClassName=function(){e.className=this.toString()}},u=s.prototype=[],l=function(){return new s(this)};if(o.prototype=Error.prototype,u.item=function(e){return this[e]||null},u.contains=function(e){return e+="",-1!==a(this,e)},u.add=function(e){e+="",-1===a(this,e)&&(this.push(e),this._updateClassName())},u.remove=function(e){e+="";var t=a(this,e);-1!==t&&(this.splice(t,1),this._updateClassName())},u.toggle=function(e){e+="",-1===a(this,e)?this.add(e):this.remove(e)},u.toString=function(){return this.join(" ")},n.defineProperty){var p={get:l,enumerable:!0,configurable:!0};try{n.defineProperty(t,"classList",p)}catch(e){-2146823252===e.number&&(p.enumerable=!1,n.defineProperty(t,"classList",p))}}else n.prototype.__defineGetter__&&t.__defineGetter__("classList",l)}(self),KonOpas.Prog=function(e,t){function n(e,t){if(!e.date!=!t.date)return e.date?-1:1;if(e.date<t.date)return-1;if(e.date>t.date)return 1;if(!e.time!=!t.time)return e.time?1:-1;if(e.time<t.time)return-1;if(e.time>t.time)return 1;if(e.loc&&t.loc){if(e.loc.length<t.loc.length)return-1;if(e.loc.length>t.loc.length)return 1;for(var n=e.loc.length-1;n>=0;--n){if(e.loc[n]<t.loc[n])return-1;if(e.loc[n]>t.loc[n])return 1}}return 0}this.list=(e||[]).sort(n),this.list.forEach(function(e){if(e&&e.date){var t=e.date.split(/\D+/),n=e.time&&e.time.split(/\D+/)||[0,0],r=e.time&&Number(e.mins||KonOpas.default_duration)||!e.time&&1439||0;e.t0=new Date(t[0],t[1]-1,t[2],n[0],n[1]),isNaN(e.t0)?delete e.t0:e.t1=new Date(e.t0.valueOf()+6e4*r)}});var r=_el("prog_filters");r.onclick=KonOpas.Prog.filter_change;for(var i=r.getElementsByClassName("popup-link"),o=0;o<i.length;++o)i[o].setAttribute("data-title",i[o].textContent),i[o].nextElementSibling.onclick=KonOpas.Prog.filter_change;var a=_el("search");a&&(a.onsubmit=_el("q").oninput=KonOpas.Prog.filter_change,a.onreset=function(){KonOpas.Prog.set_filters({})}),this.init_filters(t);var s=_el("tab_prog"),u=s&&s.getElementsByTagName("a");u&&u.length&&(u[0].onclick=function(e){window.pageYOffset&&document.body.classList.contains("prog")&&(window.scrollTo(0,0),(e||window.event).preventDefault())})},KonOpas.Prog.hash=function(e,t){var n=["#prog"];return e&&["id","area","tag","query"].forEach(function(r){var i=e[r+"_str"]||e[r];if(!(t&&t[r]||!i||i=="all_"+r+"s")){if("tag"==r&&konopas.tag_categories){var o=i.match(new RegExp("^("+konopas.tag_categories.join("|")+"):(.*)"));o&&(r=o[1],i=o[2])}n.push(r+":"+KonOpas.hash_encode(i))}}),n.length>1?n.join("/"):"#"},KonOpas.Prog.get_filters=function(e){var t={area:"",tag:"",query:"",id:""},n=window.location.toString().split("#")[1]||"",r=!1,i=konopas.tag_categories&&konopas.tag_categories.length&&new RegExp("^"+konopas.tag_categories.join("|")+"$");if("prog/"==n.substr(0,5)&&n.substr(5).split("/").forEach(function(e){var n=e.split(":")
;2==n.length&&n[0]&&n[1]&&(i&&i.test(n[0])&&(n[1]=e,n[0]="tag"),t[n[0]]=KonOpas.hash_decode(n[1]),r=!0)}),!e&&!r&&!document.body.classList.contains("prog")){var o=konopas.store.get("prog");if(o)for(var a in o)t.hasOwnProperty(a)&&(t[a]=o[a])}return t},KonOpas.Prog.set_filters=function(e,t){if(t&&(!history||!history.replaceState))return!1;e.id&&(e={id:e.id}),konopas.store.set("prog",e);var n=KonOpas.Prog.hash(e);if((window.location.toString().split("#")[1]||"")!=n.substr(1)){if(t){var r=window.location.toString().split("#")[0]+n;history.replaceState({},document.title,r),window.onhashchange()}else window.location.hash=n;return!0}return!1},KonOpas.Prog.filter_change=function(e){e=e||window.event;var t,n,r=!1;switch(e.type){case"click":if("li"!=e.target.tagName.toLowerCase())return;var i=e.target.getElementsByClassName("popup");if(i&&i.length)return;switch(t=e.target.parentNode.id.replace(/\d+$/,""),n=e.target.id,t){case"area":n=n.replace(/^a([^a-zA-Z])/,"$1");break;case"tag":n=n.replace(/^t([^a-zA-Z])/,"$1")}break;case"submit":e.preventDefault();case"input":t="query",n=_el("q").value,r=n.length>1;break;default:return}var o=KonOpas.Prog.get_filters();o[t]=n,o.id&&"id"!=t&&(o.id=""),KonOpas.Prog.set_filters(o,r)},KonOpas.Prog.focus_day=function(e){for(var t in{"day-sidebar":1,"day-narrow":1}){var n=_el(t),r=n&&n.getElementsByTagName("li");if(r)for(var i=0;i<r.length;++i){var o=r[i].getAttribute("data-day");r[i].classList[o==e?"add":"remove"]("selected")}}},KonOpas.Prog.prototype.init_filters=function(e){function t(e){return i18n.txt(e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "))}function n(e){var t=document.createElement("ul");return t.id=e,t}function r(e,n,r){var i=document.createElement("li");i.id=/^[^a-zA-Z]/.test(n)?e.id[0]+n:n,r||(r=u[n]||t(n)),/^\s*$/.test(r)||(i.textContent=/^[\\^$]/.test(r)?r.substr(1):r,l[n]&&i.setAttribute("data-regexp",l[n]),e.appendChild(i))}function i(e,t){var n=function(e){return(u[e]||e.replace(/^[^:]+:/,"")).toLowerCase().replace(/^the /,"")},r=function(e){return e.match(/\d+|\D+/g).map(function(e){return Number(e)||e})},i=n(e),o=n(t);if("$"==i[0]!=("$"==o[0]))return i<o?1:-1;if(/\d/.test(i)&&/\d/.test(o)){for(var a=r(i),s=r(o),l=0;l<a.length&&l<s.length;++l){if(a[l]<s[l])return-1;if(a[l]>s[l])return 1}if(a.length!=s.length)return a.length<s.length?-1:1}else{if(i<o)return-1;if(i>o)return 1}return 0}function o(e,n,i,o,a){var s=u[i]||t(i),l=document.createElement("li"),p=_new_elem("div","popup-link",s+"…"),d=_new_elem("ul","popup");p.setAttribute("data-title",p.textContent),p.addEventListener("click",KonOpas.popup_open),d.id=n,d.setAttribute("data-title",s),d.addEventListener("click",KonOpas.Prog.filter_change);for(var c=0;c<a.length;++c){var h=u[a[c]]||a[c].replace(o,"");r(d,a[c],h)}l.appendChild(p),l.appendChild(d),e.appendChild(l)}function a(t,a){var p=0,d=e[t],c=n(t);u=d.labels||{},l=d.regexp||{};for(var h in l)a[h]=1;if(r(c,"all_"+t+"s"),d.promote)for(p=0;p<d.promote.length;++p)r(c,d.promote[p]),delete a[d.promote[p]];if(d.exclude){var f=new RegExp(d.exclude.join("|"));for(var g in a)f.test(g)&&delete a[g]}if(d.min_count)for(var g in a)a[g]<d.min_count&&delete a[g];var _=Object.keys(a).sort(i);if(d.categories)for(p=0;p<d.categories.length;++p){for(var m=d.categories[p]+":",E=[],v=[],y=0;y<_.length;++y)_[y].substr(0,m.length)==m?E.push(_[y]):v.push(_[y]);switch(E.length){case 0:break;case 1:r(c,m+E[0]);break;default:o(c,t+p,d.categories[p],m,E)}_=v}if(_.length<4)for(p=0;p<_.length;++p)r(c,_[p]);else o(c,t+p,t,"",_);s.appendChild(c)}var s=_el("prog_lists"),u={},l={};if(e&&s){for(;s.firstChild;)s.removeChild(s.firstChild);for(var p={},d={},c={},h=e.area&&e.area.loc_level||0,f=0,g=this.list.length;f<g;++f){var _=this.list[f];if(_.date&&(p[_.date]=1),e.area&&"object"==typeof _.loc&&_.loc&&_.loc[h]&&(d[_.loc[h]]=(d[_.loc[h]]||0)+1),e.tag&&"object"==typeof _.tags&&_.tags)for(var m=0;m<_.tags.length;++m){var E=e.tag.set_category&&e.tag.set_category[_.tags[m]];E&&(_.tags[m]=E+":"+_.tags[m]),c[_.tags[m]]=(c[_.tags[m]]||0)+1}}if(e.day&&e.day.exclude){var v=new RegExp(e.day.exclude.join("|"));for(var y in p)v.test(y)&&delete p[y]}this.days={};for(var y in p){var w=KonOpas.parse_date(y),A={N:w?w.getDay():-1};this.days[y]={short:i18n.txt("weekday_short_n",A),long:i18n.txt("weekday_n",A)}}e.area&&a("area",d),e.tag&&a("tag",c)}},KonOpas.Prog.prototype.show_filter_sum=function(e,t){var n=_el("filter_sum");if(n){var r=_el("q_clear"),i=function(e,n){var r={id:1};return n&&(r[n]=1),'<a href="'+KonOpas.Prog.hash(t,r)+'">'+e+"</a>"};if(t.id_only)n.innerHTML=i18n.txt("filter_sum_id",{N:e.length,TITLE:i(e[0].title),ID:i(t.id)}),r&&(r.disabled=!1);else{var o={N:t.n_listed,ALL:!t.show_all||t.tag_str||t.area_str||t.query_str?"":i(i18n.txt("all"),{}),TAG:t.tag_str?i(t.tag_str,"tag"):""};t.day&&!t.show_all?(o.DAY=i18n.txt("weekday_n",{N:KonOpas.parse_date(t.day).getDay()}),t.n_hidden&&(o.TIME=KonOpas.pretty_time(t.now,konopas))):t.n_hidden&&(o.LIVE=!0),t.area_str&&(o.AREA=i(t.area_str,"area")),t.query_str&&(o.Q=i(t.query_str,"query")),n.innerHTML=i18n.txt("filter_sum",o),r&&(r.disabled=!t.area_str&&!t.tag_str&&!t.query_str)}}},KonOpas.Prog.prototype.show=function(){function e(e){if(this.area)if(this.area instanceof RegExp){if(!this.area.test(e.loc.join(";")))return!1}else if(!e.loc||e.loc.indexOf(this.area)<0)return!1;if(this.tag)if(this.tag instanceof RegExp){if(!this.tag.test(e.title))return!1}else if(!e.tags||e.tags.indexOf(this.tag)<0)return!1;if(this.query){if(!(this.query.test(e.title)||this.query.test(e.desc)||e.loc&&this.query.test(e.loc.join("\t"))||e.tags&&this.query.test(e.tags.join("\t"))||e.people&&e.people.some(function(e){return this.query.test(e.name)},this)))return!1}return!0}var t=KonOpas.Prog.get_filters();if(!KonOpas.Prog.set_filters(t)){!function(e){var t=_el("prog_filters").getElementsByClassName("selected");if(t)for(var n=t.length-1;n>=0;--n){var r=t[n].classList;r.contains("popup-link")&&(t[n].textContent=t[n].getAttribute("data-title")||i18n.txt("More")+"…"),r.remove("selected")}for(var i in e)if("query"==i){var o=_el("q");o&&(o.value=e.query,e.query&&o.classList.add("selected"))}else{var a=e[i];a?a.match(/^[^a-zA-Z]/)&&(a=i[0]+a):a="all_"+i+"s";var s=_el(a);if(s&&(s.classList.add("selected"),s.parentNode.id.match(/\d+$/))){var u=s.parentNode.parentNode.firstChild;u.classList.add("selected"),u.textContent=s.textContent}}}(t);for(var n in t)n&&t[n]&&t[n]!="all_"+n+"s"||delete t[n];!function(t,n){if(t.area_str=t.area||"",t.area&&_el(t.area)){var r=_el(t.area).getAttribute("data-regexp");r&&(t.area=new RegExp(r))}if(t.tag_str=t.tag||"",t.tag&&_el(t.tag)){var r=_el(t.tag).getAttribute("data-regexp");r&&(t.tag=new RegExp(r))}if(t.query_str=t.query||"",t.query&&(t.query=KonOpas.glob_to_re(t.query)),t.id_only=!!t.id,t.id_only)for(var i in t)if("id"!=i&&"id_only"!=i&&t[i]){t.id_only=!1;break}var o=n.list.filter(t.id_only?function(e){return e.id==t.id}:e,t);t.id&&o.every(function(e){return e.id!=t.id})&&(t.id="",KonOpas.Prog.set_filters(t))||(t.hide_ended=!0,t.prog_view=!0,KonOpas.Item.show_list(o,t))}(t,this)}},KonOpas.Server=function(e,t,n){this.id=e,this.stars=t,n=n||{},this.host=n.host||"https://konopas-server.appspot.com",this.el_id=n.el_id||"server_connect",this.err_el_id=n.err_el_id||"server_error";try{this.store=localStorage}catch(e){this.store=new KonOpas.VarStore}this.connected=!1,this.token=this.store.getItem("konopas.token")||!1,this.ical=this.store.getItem("konopas."+this.id+".ical_link")||!1,this.prog_data={},this.prog_server_mtime=0,this.el=document.getElementById(this.el_id),this.err_el=!1,this.disconnect(),this.stars&&(this.stars.server=this),this.el&&this.id?this.exec("info"):_log("server init failed","warn");var r=/#server_error=(.+)/.exec(window.location.hash);r&&this.error(decodeURIComponent(r[1].replace(/\+/g," ")),window.location.href)},KonOpas.Server.prototype.disconnect=function(){this.connected=!1,this.el&&(this.el.innerHTML='<div id="server_info">'+i18n.txt("Not connected")+"</div>"),document.body.classList.remove("logged-in")},KonOpas.Server.prototype.logout=function(e){_log("server logout"),this.exec("/logout"),(e||window.event).preventDefault()},KonOpas.Server.prototype.error=function(e,t){if(_log("server error "+e+", url: "+t,"error"),""==e){var n=t.replace(this.host,"").replace("/"+this.id+"/","");e=i18n.txt("server_cmd_fail",{CMD:"<code>"+n+"</code>"})}if(!this.err_el){var r=document.createElement("div");r.id=this.err_el_id,r.title=i18n.txt("Click to close"),r.onclick=function(e){this.err_el.style.display="none"}.bind(this),document.body.appendChild(r),this.err_el=r}return this.err_el.innerHTML="<div>"+i18n.txt("Server error")+": <b>"+e+"</b></div>",this.err_el.style.display="block",!0},KonOpas.Server.prototype.onmessage=function(e){if(e=e||window.event,e.origin!=this.host)return _log("Got an unexpected message from "+e.origin,"error"),void _log(e);var t=this;JSON.parse(e.data,function(e,n){switch(e){case"ok":t.cb_ok(n);break;case"fail":t.error("",n)}})},KonOpas.Server.prototype.prog_mtime=function(){var e=this.prog_server_mtime;for(var t in this.prog_data)this.prog_data[t][1]>e&&(e=this.prog_data[t][1]);return e},KonOpas.Server.prototype.add_prog=function(e,t){e instanceof Array&&(e=e.join(",")),_log('server add_prog "'+e+'" '+(t?"1":"0"));var n=this.prog_mtime();this.exec("prog"+(t?"?add=":"?rm=")+e+(n?"&t="+n:""))},KonOpas.Server.prototype.set_prog=function(e){_log('server set_prog "'+e);var t=this.prog_mtime();this.exec("prog?set="+e.join(",")+(t?"&t="+t:""))},KonOpas.Server.prototype.show_ical_link=function(e){var t="";if(this.connected?this.ical&&(t="string"==typeof this.ical?i18n.txt("ical_link")+'<br><a href="'+this.ical+'">'+this.ical+'</a><br><span class="hint">'+i18n.txt("ical_hint")+"</span>":i18n.txt("ical_make",{A_TAG:'<a id="ical_link" class="js-link">'})):t=i18n.txt("ical_login"),e)e.innerHTML+='<p id="ical_text">'+t;else{var n=document.getElementById("ical_text");n&&(n.innerHTML=t)}var r=document.getElementById("ical_link");r&&(r.onclick=function(){this.exec("ical_link")}.bind(this))},KonOpas.Server.prototype.url=function(e){return this.token&&(e+=(-1!=e.indexOf("?")?"&":"?")+"k="+encodeURIComponent(this.token)),this.host+("/"==e[0]?"":"/"+this.id+"/")+e},KonOpas.Server.prototype.exec=function(e){var t=document.createElement("script"),n=!1,r=this.url(e);t.src=r,t.async=!0,t.onerror=function(e){this.error("",(e||window.event).target.src)}.bind(this),t.onload=t.onreadystatechange=function(){n||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(n=!0,t.onload=t.onreadystatechange=null,t&&t.parentNode&&t.parentNode.removeChild(t))},document.getElementsByTagName("head")[0].appendChild(t)},KonOpas.Server.prototype.cb_ok=function(e){var t=/^(?:https?:\/\/[^\/]+)?\/?([^?\/]*)(?:\/([^?]*))(?:\?(.*))?/.exec(e),n=t[2]||"",r=t[3]||"";switch(n){case"logout":this.disconnect(),this.token=!1,this.store.setItem("konopas.token",""),this.prog_data={},this.prog_server_mtime=0,this.stars&&(this.stars.data={},this.stars.write(),konopas.set_view()),this.exec("info"),_log("server ok (logout): "+JSON.stringify(e));break;case"prog":var i=/&server_mtime=(\d+)/.exec(r);i&&(this.prog_server_mtime=parseInt(i[1],10)),_log("server ok (prog): "+JSON.stringify(e));break;default:_log("server ok (???): "+JSON.stringify(e),"warn")}},KonOpas.Server.prototype.cb_fail=function(e){this.error(e.msg,e.url)},KonOpas.Server.prototype.cb_info=function(e){_log("server info: "+JSON.stringify(e)),this.connected=[e.name,e.email],this.el.innerHTML='<div id="server_info"><a id="server_logout" href="'+this.url(e.logout)+'">'+i18n.txt("Logout")+'</a> <span id="server_user" title="'+(e.name!=e.email?e.email:"")+'">'+e.name.replace(/@.*/,"")+"</span></div>",e.ical&&(this.ical=this.ical||!0,this.show_ical_link(!1)),document.getElementById("server_logout").onclick=this.logout.bind(this),document.body.classList.add("logged-in"),"object"==typeof jsErrLog&&(jsErrLog.info=e.name.replace(/[ @].*/,""))},KonOpas.Server.prototype.cb_token=function(e){_log("server token: "+e),this.token=e,this.store.setItem("konopas.token",e)},KonOpas.Server.prototype.cb_login=function(e){_log("server login: "+JSON.stringify(e));var t=[];for(var n in e)t.push('<a href="'+this.url(n)+'">'+e[n]+"</a>");this.el.innerHTML='<div id="login-links">\n» <span class="popup-link" id="login-popup-link">'+i18n.txt("Login to sync your data")+'</span>\n<div class="popup" id="login-popup">'+i18n.txt("login_why")+"\n<ul>\n<li>"+t.join("\n<li>")+"\n</ul></div></div>",_el("login-popup-link").onclick=KonOpas.popup_open},KonOpas.Server.prototype.cb_my_prog=function(e){if(_log("server my_prog: "+JSON.stringify(e)),this.prog_data=e.prog,e.t0)for(var t in this.prog_data)this.prog_data[t][1]+=e.t0;this.stars?this.stars.sync(this.prog_data):_log("Server.stars required for prog sync","warn")},KonOpas.Server.prototype.cb_my_votes=function(e){},KonOpas.Server.prototype.cb_pub_data=function(e){},KonOpas.Server.prototype.cb_show_comments=function(e,t){},KonOpas.Server.prototype.cb_ical_link=function(e){this.ical=e,this.store.setItem("konopas."+this.id+".ical_link",e),this.show_ical_link(!1)},KonOpas.Stars=function(e,t){t=t||{},this.name="konopas."+e+".stars";try{this.store=localStorage||sessionStorage||new KonOpas.VarStore}catch(e){this.store=new KonOpas.VarStore}this.tag=t.tag||"has_star",this.server=!1,this.data=this.read()},KonOpas.Stars.prototype.read=function(){return JSON.parse(this.store&&this.store.getItem(this.name)||"{}")},KonOpas.Stars.prototype.write=function(){try{this.store&&this.store.setItem(this.name,JSON.stringify(this.data))}catch(e){if(e.code!=DOMException.QUOTA_EXCEEDED_ERR||0!=this.store.length)throw e}},KonOpas.Stars.prototype.list=function(){var e=[];if(this.data)for(var t in this.data)2==this.data[t].length&&this.data[t][0]&&e.push(t);return e},KonOpas.Stars.prototype.add=function(e,t){t=t||Math.floor(Date.now()/1e3),e.forEach(function(e){this.data[e]=[1,t]},this),this.write(),this.server&&this.server.set_prog(this.list())},KonOpas.Stars.prototype.set=function(e){var t=Math.floor(Date.now()/1e3);if(this.data)for(var n in this.data)this.data[n]=[0,t];this.add(e,t)},KonOpas.Stars.prototype.toggle=function(e,t){var n=!e.classList.contains(this.tag),r=Math.floor(Date.now()/1e3);this.data[t]=[n?1:0,r],this.write(),this.server&&this.server.add_prog(t,n),n?e.classList.add(this.tag):e.classList.remove(this.tag)},KonOpas.Stars.prototype.sync=function(e){var t=[],n=!1;for(var r in e)2==e[r].length?r in this.data&&!(e[r][1]>this.data[r][1])||(t.push(r),r in this.data&&e[r][0]==this.data[r][0]||(n=!0),this.data[r]=e[r]):_log("Stars.sync: invalid input "+r+": "+JSON.stringify(e[r]),"warn");if(t.length&&(_log("Stars.sync: local changes: "+t+(n?" -> redraw":"")),this.write(),n&&konopas.set_view()),this.server){var i=[],o=[];for(var r in this.data)r in e&&!(e[r][1]<this.data[r][1])||(this.data[r][0]?i.push(r):o.push(r));i.length&&(_log("Stars.sync: server add: "+i),this.server.add_prog(i,!0)),o.length&&(_log("Stars.sync: server rm: "+o),this.server.add_prog(o,!1)),t.length||i.length||o.length||_log("Stars.sync: no changes")}},KonOpas.Stars.prototype.show=function(){var e=_el("star_data"),t=window.location.hash.substr(6),n=t&&"set:"==t.substr(0,4)?t.substr(4).split(","):[],r=konopas.program.list.filter(function(e){return n.indexOf(e.id)>=0}).map(function(e){return e.id}),i=r.length,o="",a=this.list(),s=a.length;if(!konopas.store.limit||this.server&&this.server.connected||(o="<p>"+i18n.txt("star_no_memory",{WHY:konopas.store.limit,SERVER:!!this.server})),!s&&!i)return _el("prog_ls").innerHTML="",void(e.innerHTML=o+"<p>"+i18n.txt("star_hint"));document.body.classList.remove("show_set"),r.sort(),a.sort();var u="#star/set:"+a.join(",");if(i)if(KonOpas.arrays_equal(r,a))o+="<p>"+i18n.txt("star_export_this",{THIS:u})+"<p>"+i18n.txt("star_export_share",{SHORT:KonOpas.link_to_short_url(location.href),QR:KonOpas.link_to_qr_code(location.href)});else{document.body.classList.add("show_set");var l=KonOpas.array_overlap(r,a),p=i-l,d=n.length-i;if(o+="<p>"+i18n.txt("star_import_this",{THIS:location.href})+"<p>"+i18n.txt("star_import_diff",{PREV:s,NEW:p,SAME:l}),d&&(o+=" "+i18n.txt("star_import_bad",{BAD:d})),s&&l==s||(o+='<p>» <a href="#star" id="star_set_set">'+i18n.txt("star_set")+"</a>"),s){if(l!=s){var c=[];p&&c.push(i18n.txt("add_n",{N:p})),c.push(i18n.txt("discard_n",{N:s-l})),o+=" ("+c.join(", ")+")"}p&&(o+='<p>» <a href="#star" id="star_set_add">'+i18n.txt("star_add",{N:p})+"</a>")}}else o+='<p id="star_links">» '+i18n.txt("star_export_link",{URL:u,N:s});e.innerHTML=o;var h=_el("star_set_set");h&&(h.onclick=function(){return konopas.stars.set(r),!0});var f=_el("star_set_add");f&&(f.onclick=function(){return konopas.stars.add(r),!0}),this.server&&this.server.show_ical_link(e);var g=konopas.program.list.filter(function(e){return a.indexOf(e.id)>=0||r.indexOf(e.id)>=0});if(KonOpas.Item.show_list(g,{hide_ended:!0}),i)for(var _=0;_<i;++_){var m=_el("s"+r[_]);m&&m.classList.add("in_set")}},"undefined"==typeof i18n&&(i18n={}),i18n.txt=function(e){return e},i18n.translate_html=function(e,t){for(var n,r=document.querySelectorAll("["+t+"]"),i=0;n=r[i];++i){var o=n.getAttribute(t)||n.textContent.trim();if(o in e){var a=n.getAttribute(t+"-var"),s=n.getAttribute(t+"-attr"),u=e[o](a&&JSON.parse("{"+a.replace(/[^,:]+/g,'"$&"')+"}"));s?n.setAttribute(s,u):n.innerHTML=u}}},KonOpas.link_to_short_url=function(e){return"http://is.gd/create.php?url="+encodeURIComponent(e.replace(/^http:\/\//,""))},KonOpas.link_to_qr_code=function(e){return"http://chart.apis.google.com/chart?cht=qr&chs=350x350&chl="+encodeURIComponent(e.replace(/^http:\/\//,""))},KonOpas.hash_encode=function(e){return encodeURIComponent(e).replace(/%20/g,"+")},KonOpas.hash_decode=function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))},KonOpas.glob_to_re=function(e){var t=new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\/-]","g");e=e.replace(t,"\\$&").replace(/\\\*/g,".*").replace(/\\\?/g,".");var n=e.match(/"[^"]*"|'[^']*'|\S+/g).map(function(e){return"\\b"+e.replace(/^(['"])(.*)\1$/,"$2\\b")});return new RegExp(n.join("|"),"i")},KonOpas.Store=function(e){try{sessionStorage.setItem("konopas.test_var","1"),sessionStorage.removeItem("konopas.test_var","1"),this.get=function(t){var n=sessionStorage.getItem("konopas."+e+"."+t);return n?JSON.parse(n):n},this.set=function(t,n){sessionStorage.setItem("konopas."+e+"."+t,JSON.stringify(n))},this.limit=""}catch(e){var t={};this.get=function(e){return t[e]},this.set=function(e,n){t[e]=n},this.limit="SecurityError"==e.name?"FFcookies":e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===sessionStorage.length?"IOSprivate":"?"}},KonOpas.VarStore=function(){var e={};this.getItem=function(t){return e[t]},this.setItem=function(t,n){e[t]=n}},KonOpas.clean_name=function(e,t){var n="",r="";switch(e.name.length){case 1:r=e.name[0];break;case 2:e.name[1]?(n=e.name[0],r=e.name[1]):r=e.name[0];break;case 3:n=e.name[2]+" "+e.name[0],r=e.name[1];break;case 4:n=e.name[2]+" "+e.name[0],r=e.name[1]+(e.name[3]?", "+e.name[3]:"")}return t?'<span class="fn">'+n.trim()+'</span> <span class="ln">'+r.trim()+"</span>":(n+" "+r).trim()},KonOpas.clean_links=function(e){var t=!1,n={};if(e&&"links"in e){if(e.links.img||e.links.photo){var r=(e.links.img||e.links.photo).trim();/^www/.test(r)&&(r="http://"+r),/:\/\//.test(r)&&(n.img={tgt:r},t=!0)}if(e.links.url){var i=e.links.url.trim();/:\/\//.test(i)||(i="http://"+i),n.URL={tgt:i,txt:i.replace(/^https?:\/\//,"")},t=!0}if(e.links.fb){var o=e.links.fb.trim().replace(/^(https?:\/\/)?(www\.)?facebook.com(\/#!)?\//,"");n.Facebook={txt:o},/[^a-zA-Z0-9.]/.test(o)&&!/^pages\//.test(o)&&(o="search.php?q="+encodeURI(o).replace(/%20/g,"+")),n.Facebook.tgt="https://www.facebook.com/"+o,t=!0}if(e.links.twitter){var a=e.links.twitter.trim().replace(/[@@﹫]/g,"").replace(/^(https?:\/\/)?(www\.)?twitter.com(\/#!)?\//,"");n.Twitter={txt:"@"+a},/[^a-zA-Z0-9_]/.test(a)&&(a="search/users?q="+encodeURI(a).replace(/%20/g,"+")),n.Twitter.tgt="https://www.twitter.com/"+a,t=!0}}return!!t&&n},KonOpas.arrays_equal=function(e,t){if(!e||!t)return!1;if(e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!=t[n])return!1;return!0},KonOpas.array_overlap=function(e,t){if(!e||!t)return 0;if(e.length>t.length)return KonOpas.array_overlap(t,e);var n,r,i=0;for(n=0;n<e.length;++n)for(r=0;r<t.length;++r)if(e[n]==t[r]){++i;break}return i},KonOpas.popup_open=function(e){if(e=e||window.event,1==e.which){var t=e.target,n=t.nextElementSibling;if(!n||!n.classList.contains("popup")){if(!t.href||!/\.(gif|jpe?g|png)$/i.test(t.href))return;n=_new_elem("img","popup"),n.src=t.href,t.parentNode.insertBefore(n,t.nextSibling)}var r=_new_elem("div","popup-wrap");r.onclick=function(){n.parentNode.removeChild(n),r.parentNode.removeChild(r),t.parentNode.insertBefore(n,t.nextSibling)};var i=n.getAttribute("data-title")||"";i&&r.appendChild(_new_elem("div","popup-title",i)),n.parentNode.removeChild(n),r.appendChild(n),document.body.appendChild(r),t.href&&e.preventDefault()}},KonOpas.toggle_collapse=function(e){e=e||window.event;var t=e.target,n=t&&t.nextElementSibling;n&&("none"==window.getComputedStyle(n).getPropertyValue("display")?(t.classList.remove("collapse"),t.classList.add("collapse-open")):(t.classList.add("collapse"),t.classList.remove("collapse-open")))},KonOpas.pretty_time=function(e,t){function n(e){return(e<10?"0":"")+e}function r(e,r){if(t.time_show_am_pm){var i=e%12;0==i&&(i=12);return i+(0==r&&t.abbrev_00_minutes?"":":"+n(r))+(e<12?"am":"pm")}return n(e)+":"+n(r)}if(t=t||{},e instanceof Date)return r(e.getHours(),e.getMinutes());if("string"==typeof e||e instanceof String){if(t.time_show_am_pm){var i=e.split(":");return r(parseInt(i[0],10),parseInt(i[1],10))}return e}return""},KonOpas.pretty_time_diff=function(e){var t=(Date.now()-e)/1e3,n=Math.abs(t),r=[1,60,60,24,7,4.333,12,1e9];if(n<20)return i18n.txt("just now");for(var i=0,o=r.length;i<o;++i)if((n/=r[i])<2)return i18n.txt("time_diff",{T:~~(n*=r[i]),T_UNIT:i-1,T_PAST:t>0})},KonOpas.parse_date=function(e){if(!e)return!1;var t=e.match(/(\d+)/g);if(!t||t.length<3)return!1;var n=parseInt(t[0],10),r=parseInt(t[1],10),i=parseInt(t[2],10);return!!(n&&r&&i)&&new Date(n,r-1,i,12)},KonOpas.data_date=function(e){function t(e){return(e<10?"0":"")+e}var n=e instanceof Date?e:KonOpas.parse_date(e);return n.getFullYear()+"-"+t(n.getMonth()+1)+"-"+t(n.getDate())},KonOpas.pretty_date=function(e,t){t=t||{};var n={weekday:"long",month:"long",day:"numeric"},r=e instanceof Date?e:KonOpas.parse_date(e);if(!r)return e;Math.abs(r-Date.now())>5184e6&&(n.year="numeric");var i=r.toLocaleDateString(t.lc,n);return i.charAt(0).toUpperCase()+i.slice(1)},KonOpas.time_sum=function(e,t){var n=60*e.substr(0,2)+1*e.substr(3,2)+1*t,r=n/60>>0,i=n-60*r;return r%24+":"+(i<10?"0":"")+i};
//# sourceMappingURL=konopas.min.js.map