// source --> https://puregeniusmedia.com/wp-content/plugins/mx-time-zone-clocks/assets/build/index.js?ver=5.1.1 
(function(i){i.fn.canvasClock=function(H){var C=i.extend({showSecondHand:!0,showMinuteHand:!0,showHourHand:!0,bgImgUrl:"clock-face1.png",time_zone:"Europe/London",city_name:"",date_format:24,digital_clock:!1,lang:"en",lang_for_date:"ua",show_days:!1,arrow_type:"classical",super_simple:!1,arrows_color:"unset"},H),s=function(a){return Math.PI/180*a},y=function(a,e,t,n){t=t||4,a.shadowColor="#555",a.shadowBlur=5,a.shadowOffsetX=n,a.shadowOffsetY=n,a.beginPath(),a.moveTo(0,0),a.lineTo(t*-1,-10),a.lineTo(0,e*-1),a.lineTo(t,-10),a.lineTo(0,0),a.fill()},_=function(a,e,o,n){var o=o||2;a.shadowColor="#555",a.shadowBlur=3,a.shadowOffsetX=n,a.shadowOffsetY=n,a.beginPath(),a.moveTo(0,0),a.lineTo(o*-1,-10),a.lineTo(0,e*-1),a.lineTo(o,-10),a.lineTo(0,0),a.fill()},b=function(a,e,t,n,o){var r=e.getHours()+e.getMinutes()/60,d=parseInt(e.getMinutes()*100/60)/100;t!==void 0&&(r=e.toLocaleString([],{timeZone:t,hour:"2-digit"}),d=parseInt(e.toLocaleString([],{timeZone:t,minute:"2-digit"})*100/60)/100);var m=(parseInt(r)+d)*360/12%360;a.save(),a.fillStyle="black",o!=="unset"&&(a.fillStyle=o),a.rotate(s(m)),n==="modern"?_(a,32,2.2,2):y(a,28,4,2),a.restore()},T=function(a,e,t,n,o){var r=e.getMinutes()+e.getSeconds()/60;t!==void 0&&(r=e.toLocaleString([],{timeZone:t,minute:"2-digit"})),a.save(),a.fillStyle="black",o!=="unset"&&(a.fillStyle=o),a.rotate(s(r*6)),n==="modern"?(_(a,42,2,2),circle_size=3):y(a,42,3,3),a.restore()},I=function(a,e,t,n,o){a.save();var r="red";o!=="unset"&&(r=o),n==="modern"&&(r="#000",o!=="unset"&&(r=o)),a.fillStyle=r;var d=e.getSeconds();if(t!==void 0){var m={timeZone:t,second:"2-digit"};d=e.toLocaleString([],m)}a.rotate(s(d*6));var l=5;n==="modern"?(_(a,47,1,2),l=5):y(a,42,2,3),a.moveTo(0,0),a.arc(0,0,l,0,2*Math.PI),a.fill(),a.restore()},B=function(a,e,t){e.drawImage(t,a.width/2*-1,a.height/2*-1,a.width,a.height)},x=function(a,e){a.font="20pt Helvetica";var t=a.measureText(e);a.strokeText(e,0-t.width/2,-20)},M=function(a,e,t,n){i(a).find(".mx-current-time").remove();var o=i('<div class="mx-current-time" />'),r=new Date,d={timeZone:e,hour:"2-digit",minute:"2-digit",second:"2-digit"};return n===!1&&(d={timeZone:e,hour:"2-digit",minute:"2-digit"}),o.text(r.toLocaleString("uk",d)),parseInt(t)===12&&(d={hour12:!0,timeZone:e,hour:"2-digit",minute:"2-digit",second:"2-digit"},n===!1&&(d={hour12:!0,timeZone:e,hour:"2-digit",minute:"2-digit"}),o.text(r.toLocaleString("en-US",d))),o},h=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},j=function(a,e,t){i(a).find(".mx-time-zone").remove();var n=i('<div class="mx-time-zone" />'),o=/.*\/(.*)/gi,r=o.exec(e),d=String(r[1]).replace("_"," ");return t!==""&&(d=t),n.text(d),n},R=function(a,e,t,n,o){var r=new Date;i(a).find(".mx-elem-days").remove();var d=i('<div class="mx-elem-days" />'),m=r.toLocaleString(n,{timeZone:e,weekday:"long"}),l=r.toLocaleString(n,{timeZone:e,month:"long"}),g=r.toLocaleString(n,{timeZone:e,day:"numeric"}),u=r.toLocaleString(n,{timeZone:e,year:"numeric"});m=h(m),l=h(l),d.text(m+", "+l+" "+g+", "+u),i(a).append(d)},A=function(a,e,t,n,o,r,d,m){var l=new Date;a.empty();var g=i('<div class="mx-elem-time_zone" />'),u=i('<div class="mx-elem-time" />'),p=i('<div class="mx-elem-days" />'),f=l.toLocaleString(r,{timeZone:e,weekday:"long"}),v=l.toLocaleString(r,{timeZone:e,month:"long"}),S=l.toLocaleString(r,{timeZone:e,day:"numeric"}),k=l.toLocaleString(r,{timeZone:e,year:"numeric"}),c={};parseInt(t)===24?(c={timeZone:e,hour:"2-digit",minute:"2-digit",second:"2-digit"},m===!1&&(c={timeZone:e,hour:"2-digit",minute:"2-digit"}),u.text(l.toLocaleString("uk",c))):(c={hour12:!0,timeZone:e,hour:"2-digit",minute:"2-digit",second:"2-digit"},m===!1&&(c={hour12:!0,timeZone:e,hour:"2-digit",minute:"2-digit"}),u.text(l.toLocaleString("en",c))),f=h(f),v=h(v),d===!0&&p.text(f+", "+v+" "+S+", "+k);var Z=/.*\/(.*)/gi,L=Z.exec(e),w=String(L[1]).replace("_"," ");n!==""&&(w=n),g.html(w),a.append(g),a.append(u),a.append(p)},P=function(a,e,t,n,o,r,d,m){var l=new Date;a.empty();var g=i('<span class="mx-simple-elem-time_zone" />'),u=i('<span class="mx-simple-elem-time" />'),p=i('<span class="mx-simple-elem-days" />'),f=l.toLocaleString(r,{timeZone:e,weekday:"long"}),v=l.toLocaleString(r,{timeZone:e,month:"long"}),S=l.toLocaleString(r,{timeZone:e,day:"numeric"}),k=l.toLocaleString(r,{timeZone:e,year:"numeric"}),c={};parseInt(t)===24?(c={timeZone:e,hour:"2-digit",minute:"2-digit",second:"2-digit"},m===!1&&(c={timeZone:e,hour:"2-digit",minute:"2-digit"}),u.text(l.toLocaleString("uk",c))):(c={hour12:!0,timeZone:e,hour:"2-digit",minute:"2-digit",second:"2-digit"},m===!1&&(c={hour12:!0,timeZone:e,hour:"2-digit",minute:"2-digit"}),u.text(l.toLocaleString("en",c))),f=h(f),v=h(v),d===!0&&p.text(f+", "+v+" "+S+", "+k);var Z=/.*\/(.*)/gi,L=Z.exec(e),w=String(L[1]).replace("_"," ");n!==""&&(w=n),g.text(w),a.append(g),a.append(u),a.append(p)};return this.each(function(){var a=i(this),e=i.extend(i.extend({},C),i(this).data());if(e.digital_clock?e.digital_clock=!0:e.digital_clock=!1,e.super_simple===!0)window.setInterval(function(){P(a,e.time_zone,e.date_format,e.city_name,e.lang,e.lang_for_date,e.show_days,e.showSecondHand)},1e3);else if(e.digital_clock!==!0){var t=new Image;t.src=e.bgImgUrl,e.canvas=i("<canvas />")[0],t.onload=function(){e.canvas.setAttribute("width",t.width),e.canvas.setAttribute("height",t.height),e.context=e.canvas.getContext("2d"),e.context.translate(e.canvas.width/2,e.canvas.height/2),window.setInterval(function(){var n=new Date;e.context.clearRect(-e.canvas.width/2,-e.canvas.height/2,e.canvas.width,e.canvas.height),B(e.canvas,e.context,t),e.brandName&&x(e.context,e.brandName),e.showHourHand&&b(e.context,n,e.time_zone,e.arrow_type,e.arrows_color),e.showMinuteHand&&T(e.context,n,e.time_zone,e.arrow_type,e.arrows_color),e.showSecondHand&&I(e.context,n,e.time_zone,e.arrow_type,e.arrows_color),a.append(M(a,e.time_zone,e.date_format,e.showSecondHand)),a.append(j(a,e.time_zone,e.city_name)),e.show_days===!0&&a.append(R(a,e.time_zone,e.city_name,e.lang_for_date,e.date_format))},1e3)},i(a).append(e.canvas),i(a).data().canvasClock=e}else window.setInterval(function(){A(a,e.time_zone,e.date_format,e.city_name,e.lang,e.lang_for_date,e.show_days,e.showSecondHand)},1e3)})}})(jQuery);window.mxmtzcRunClocks=window.mxmtzcRunClocks||{container:".mx-clock-live-el",initClock:function(i){if(i.length===0)return;i.find(".mx-timezone-clock-loader").length>0&&i.find(".mx-timezone-clock-loader").remove(),i.find("canvas").length>0&&i.find("canvas").remove();const s=i.data();i.canvasClock({time_zone:s.time_zone??"Europe/London",city_name:s.city_name??"London",date_format:s.date_format??24,digital_clock:!!s.digital_clock,lang:s.lang??"en",lang_for_date:s.lang_for_date??"en",show_days:!!s.show_days,showSecondHand:!!s.showsecondhand,arrow_type:s.arrow_type??"classical",super_simple:!!s.super_simple,arrows_color:s.arrow_type??"unset"})},prepareContainers:function(){const i=this;jQuery(this.container).each(function(){i.initClock(jQuery(this))})},init:function(){this.prepareContainers()},initClockById:function(i){this.initClock(jQuery(i))}};
// source --> https://puregeniusmedia.com/wp-content/plugins/mx-time-zone-clocks/includes/frontend/assets/js/script.js?ver=5.1.1 
(function ($) {
    $(function () {

		if(typeof mxmtzcRunClocks == 'object') {

			mxmtzcRunClocks.init();
		}

	});
})(jQuery);