/*! For license information please see main.a53ccbaa4ca384c91837.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Airflow=t():(e.Airflow=e.Airflow||{},e.Airflow.main=t())}(self,(()=>(()=>{"use strict";var e={1068:(e,t,o)=>{o.d(t,{$O:()=>m,M1:()=>s,n0:()=>l,oY:()=>c,z6:()=>i});const n="YYYY-MM-DD, HH:mm:ss",a="YYYY-MM-DD, HH:mm:ss z",r="z (Z)",i="YYYY-MM-DDThh:mm:ssTZD",m="timezone";function s(e){return e instanceof moment?e.isUTC()?"UTC":e.format(r):"UTC"===e?e:moment().tz(e).format(r)}function l(e,t){const o=moment(e),a=$.extend({title:!0},t).title,r=document.createElement("time");return r.setAttribute("datetime",o.format()),a&&r.setAttribute("title",o.isUTC()?"":`UTC: ${o.clone().utc().format()}`),r.innerText=o.format(n),r}function c(e){moment.tz.setDefault(e),$('time[data-datetime-convert!="false"]').each(((e,t)=>{const o=$(t),r=moment(o.attr("datetime"));r._isValid&&o.text(r.format(o.data("with-tz")?a:n)),void 0!==o.attr("title")&&o.attr("title",r.isUTC()?"":`UTC: ${r.clone().utc().format()}`)})),$(".datetime input").each(((e,t)=>{t.value=moment(t.value).format()}))}}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{convertSecsToHumanReadable:()=>m,escapeHtml:()=>i});var e=o(1068);function t(){const t=moment();$("#clock").attr("datetime",t.format(e.z6)).html(`${t.format("HH:mm")} <strong>${(0,e.M1)(t)}</strong>`)}function a(o){localStorage.setItem("selected-timezone",o);const n=new CustomEvent(e.$O,{detail:o});document.dispatchEvent(n),(0,e.oY)(o),t(),$("body").trigger({type:"airflow.timezone-change",timezone:o})}window.isoDateToTimeEl=e.n0,window.moment=Airflow.moment;const r=document.createElement("span");function i(e){return r.textContent=e,r.innerHTML}function m(e){const t=e,o=t-Math.floor(t);e=Math.floor(e);const n=Math.floor(e/3600);e-=3600*n;const a=Math.floor(e/60);let r="";return n>0&&(r+=`${n}Hours `),a>0&&(r+=`${a}Min `),(e-=60*a)+o>0&&(Math.floor(t)===t?r+=`${e}Sec`:r+=`${(e+=o).toFixed(3)}Sec`),r}window.escapeHtml=i,window.convertSecsToHumanReadable=m,window.postAsForm=function(e,t){const o=$("<form></form>");o.attr("method","POST"),o.attr("action",e),$.each(t||{},((e,t)=>{const n=$("<input></input>");n.attr("type","hidden"),n.attr("name",e),n.attr("value",t),o.append(n)}));const n=$("<input></input>");n.attr("type","hidden"),n.attr("name","csrf_token"),n.attr("value",csrfToken),o.append(n),$(document.body).append(o),o.submit()},$(document).ready((()=>{!function(){const t=moment.tz.guess(),o=localStorage.getItem("selected-timezone"),n=localStorage.getItem("chosen-timezone");function r(o){localStorage.setItem("chosen-timezone",o),o!==t||o!==Airflow.serverTimezone?($("#timezone-manual a").data("timezone",o).text((0,e.M1)(o)),$("#timezone-manual").show()):$("#timezone-manual").hide()}n&&r(n),a(o||Airflow.defaultUITimezone),"UTC"!==Airflow.serverTimezone&&($("#timezone-server a").html(`${(0,e.M1)(Airflow.serverTimezone)} <span class="label label-primary">Server</span>`),$("#timezone-server").show()),Airflow.serverTimezone!==t?$("#timezone-local a").attr("data-timezone",t).html(`${(0,e.M1)(t)} <span class="label label-info">Local</span>`):$("#timezone-local").hide(),$("a[data-timezone]").click((e=>{a($(e.currentTarget).data("timezone"))})),$("#timezone-other").typeahead({source:$(moment.tz.names().map((e=>({category:e.split("/",1)[0],name:e.replace("_"," "),tzName:e})))),showHintOnFocus:"all",showCategoryHeader:!0,items:"all",afterSelect(e){this.$element.val(""),r(e.tzName),a(e.tzName),setTimeout((()=>{document.activeElement.blur(),this.shown=!1,this.focused=!1}),1)}})}(),$("#clock").attr("data-original-title",hostName).attr("data-placement","bottom").parent().show(),t(),setInterval(t,1e3),$.ajaxSetup({beforeSend(e,t){/^(GET|HEAD|OPTIONS|TRACE)$/i.test(t.type)||this.crossDomain||e.setRequestHeader("X-CSRFToken",csrfToken)}}),$.fn.datetimepicker.defaults.format="YYYY-MM-DD HH:mm:ssZ",$.fn.datetimepicker.defaults.sideBySide=!0,$(".datetimepicker").datetimepicker(),$("#filter_form a.filter").click((()=>{$(".datetimepicker").datetimepicker()})),$(".js-tooltip").tooltip()}))})(),n})()));