/*! uhr - v9.0.0-dev.0 - 2019-05-03
* http://bärneruhr.ch/
* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */
!function(u){"use strict";var i,e,n,l={id:0,languages:[],themes:[],registerLanguage:function(i,e){l.languages.some(function(t){return i===t.code&&(console.error("Error: Language code '"+i+"' cannot be registered for language '"+e.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(e.code=i,l.languages.push(e))}};u("link[rel=stylesheet]").each(function(t,i){var e=u(i),n=e.attr("data-class");if(void 0!==n){var s=e.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function y(t,i){var e=t,n=i||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return''+e+""}}function o(t){var i={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},e={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},h={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},r={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},c={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},d={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},u={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},g={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},m={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[i,e],1:[i,s],2:[i,h],3:[i,r],4:[i,d],5:[i,l],6:[i,f],7:[i,p],8:[i,g],9:[i,m],10:[n,e],11:[n,s],12:[n,h],13:[n,r],14:[n,d],15:[n,l],16:[n,f],17:[n,p],18:[n,g],19:[n,m],20:[o,e],21:[o,s],22:[o,h],23:[o,r],24:[o,d],25:[o,l],26:[o,f],27:[o,p],28:[o,g],29:[o,m],30:[a,e],31:[a,s],32:[a,h],33:[a,r],34:[a,d],35:[a,l],36:[a,f],37:[a,p],38:[a,g],39:[a,m],40:[c,e],41:[c,s],42:[c,h],43:[c,r],44:[c,d],45:[c,l],46:[c,f],47:[c,p],48:[c,g],49:[c,m],50:[u,e],51:[u,s],52:[u,h],53:[u,r],54:[u,d],55:[u,l],56:[u,f],57:[u,p],58:[u,g],59:[u,m]};function b(e,n,t){null!=t&&Object.keys(t).forEach(function(i){t[i].forEach(function(t){e[i-1][t-1].addStyle(n)})})}function w(i,e,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){b(i,e,t)}):b(i,e,t))}function k(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var i=t.split(","),e=o[t];i.forEach(function(t){w(n,s+t,e)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var i=[],e=0;e")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),i.bind(this)("uhr-mode",t)}function p(t){var i=this.element;i.css("width",t);var e=i.width();i.width(e),i.height(e),i.css("font-size",e/40+"px")}var a,r;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append(''),t.append(''),t.append(''),t.append(''),t.append(''),t.append(''),p.bind(this)(this.options.width),this.options.controls){var i=u(''),e=u('');i.append(e);var n=u('');n.append(''),n.append(''),e.append(n);var s=u('');if(s.append(''),s.append(''),e.append(s),1');l.languages.forEach(function(t){o.append('")}),e.append(o)}if(1');l.themes.forEach(function(t){h.append('")}),e.append(h)}var a=u('');a.on("click",function(){u("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),e.append(a),t.after(i),i.hide();var r=u('');r.on("click",function(){(function(){u("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(r)}},r=function(){var t=u("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var i=u.cookie("uhr-status"+this.id);void 0!==i&&!this.options.force||(i=this.options.status),t.prop("checked","on"===i),"on"===i?this.start():this.stop();var e=u("#uhr-modeswitch-checkbox"+this.id);e.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=u.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),e.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=u("#uhr-languagechooser"+this.id);s.on("change",function(){var t=u("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=u.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var h,a=l.languages.some(function(t){return o===t.code});a||(h=0