1import{r as y,j as l}from"./router-BxJBNPZY.js";import{l as A}from"./logo-blue-gblmL1vp.js";import{a as B,H as z,t as g,d as N}from"./index-yB9wGQ3-.js";import{p as i}from"./ui-components-D40vxPHb.js";import{u as H}from"./i18n-CJbN88Jb.js";import"./react-vendor-Bs7gn1Hv.js";import"./misc-BQm7okxz.js";import"./blueprint-3UefsEKO.js";import"./http-DJiEINOH.js";import"./analytics-DMMAd3xI.js";import"./mobx-ByJKkJLh.js";import"./forms-Ceeu3PtZ.js";import"./utils-CdPaNs9I.js";const L="/assets/maintenance-Dh_NFoIr.webp";function w(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function $(e,o){for(var r=0;r<o.length;r++){var n=o[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,o,r){return o&&$(e.prototype,o),e}function j(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),o&&P(e,o)}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},D(e)}function P(e,o){return P=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},P(e,o)}function U(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function W(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e,o){return o&&(typeof o=="object"||typeof o=="function")?o:W(e)}function I(e){var o=U();return function(){var n=D(e),t;if(o){var s=D(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return F(this,t)}}function G(e){return V(e)||q(e)||J(e)||K()}function V(e){if(Array.isArray(e))return _(e)}function q(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function J(e,o){if(e){if(typeof e=="string")return _(e,o);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,o)}}function _(e,o){(o==null||o>e.length)&&(o=e.length);for(var r=0,n=new Array(o);r<o;r++)n[r]=e[r];return n}function K(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(e){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=String(e);if(o===0)return r;var n=r.match(/(.*?)([0-9]+)(.*)/),t=n?n[1]:"",s=n?n[3]:"",a=n?n[2]:r,c=a.length>=o?a:(G(Array(o)).map(function(){return"0"}).join("")+a).slice(o*-1);return"".concat(t).concat(c).concat(s)}var C={daysInHours:!1,zeroPadTime:2};function Q(e){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=o.now,n=r===void 0?Date.now:r,t=o.precision,s=t===void 0?0:t,a=o.controlled,c=o.offsetTime,u=c===void 0?0:c,m=o.overtime,p;typeof e=="string"?p=new Date(e).getTime():e instanceof Date?p=e.getTime():p=e,a||(p+=u);var f=a?p:p-n(),d=Math.min(20,Math.max(0,s)),T=Math.round(parseFloat(((m?f:Math.max(0,f))/1e3).toFixed(d))*1e3),h=Math.abs(T)/1e3;return{total:T,days:Math.floor(h/(3600*24)),hours:Math.floor(h/3600%24),minutes:Math.floor(h/60%60),seconds:Math.floor(h%60),milliseconds:Number((h%1*1e3).toFixed()),completed:T<=0}}function X(e,o){var r=e.days,n=e.hours,t=e.minutes,s=e.seconds,a=Object.assign(Object.assign({},C),o),c=a.daysInHours,u=a.zeroPadTime,m=a.zeroPadDays,p=m===void 0?u:m,f=Math.min(2,u),d=c?S(n+r*24,u):S(n,f);return{days:c?"":S(r,p),hours:d,minutes:S(t,f),seconds:S(s,f)}}var M=function(e){j(r,e);var o=I(r);function r(){var n;return w(this,r),n=o.apply(this,arguments),n.state={count:n.props.count||3},n.startCountdown=function(){n.interval=window.setInterval(function(){var t=n.state.count-1;t===0?(n.stopCountdown(),n.props.onComplete&&n.props.onComplete()):n.setState(function(s){return{count:s.count-1}})},1e3)},n.stopCountdown=function(){clearInterval(n.interval)},n.addTime=function(t){n.stopCountdown(),n.setState(function(s){return{count:s.count+t}},n.startCountdown)},n}
2return O(r,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?y.cloneElement(this.props.children,{count:this.state.count}):null}}]),r}(y.Component);M.propTypes={count:i.number,children:i.element,onComplete:i.func};var b=function(e){j(r,e);var o=I(r);function r(n){var t;if(w(this,r),t=o.call(this,n),t.mounted=!1,t.initialTimestamp=t.calcOffsetStartTimestamp(),t.offsetStartTimestamp=t.props.autoStart?0:t.initialTimestamp,t.offsetTime=0,t.legacyMode=!1,t.legacyCountdownRef=null,t.tick=function(){var a=t.calcTimeDelta(),c=a.completed&&!t.props.overtime?void 0:t.props.onTick;t.setTimeDeltaState(a,void 0,c)},t.setLegacyCountdownRef=function(a){t.legacyCountdownRef=a},t.start=function(){if(!t.isStarted()){var a=t.offsetStartTimestamp;t.offsetStartTimestamp=0,t.offsetTime+=a?t.calcOffsetStartTimestamp()-a:0;var c=t.calcTimeDelta();t.setTimeDeltaState(c,"STARTED",t.props.onStart),!t.props.controlled&&(!c.completed||t.props.overtime)&&(t.clearTimer(),t.interval=window.setInterval(t.tick,t.props.intervalDelay))}},t.pause=function(){t.isPaused()||(t.clearTimer(),t.offsetStartTimestamp=t.calcOffsetStartTimestamp(),t.setTimeDeltaState(t.state.timeDelta,"PAUSED",t.props.onPause))},t.stop=function(){t.isStopped()||(t.clearTimer(),t.offsetStartTimestamp=t.calcOffsetStartTimestamp(),t.offsetTime=t.offsetStartTimestamp-t.initialTimestamp,t.setTimeDeltaState(t.calcTimeDelta(),"STOPPED",t.props.onStop))},t.isStarted=function(){return t.isStatus("STARTED")},t.isPaused=function(){return t.isStatus("PAUSED")},t.isStopped=function(){return t.isStatus("STOPPED")},t.isCompleted=function(){return t.isStatus("COMPLETED")},n.date){var s=t.calcTimeDelta();t.state={timeDelta:s,status:s.completed?"COMPLETED":"STOPPED"}}else t.legacyMode=!0;return t}
2return O(r,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(t){this.legacyMode||this.props.date!==t.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var t=this.props,s=t.date,a=t.now,c=t.precision,u=t.controlled,m=t.overtime;return Q(s,{now:a,precision:c,controlled:u,offsetTime:this.offsetTime,overtime:m})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(t){this.legacyCountdownRef.addTime(t)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(t){return this.state.status===t}},{key:"setTimeDeltaState",value:function(t,s,a){var c=this;if(this.mounted){var u=t.completed&&!this.state.timeDelta.completed,m=t.completed&&s==="STARTED";u&&!this.props.overtime&&this.clearTimer();var p=function(){a&&a(c.state.timeDelta),c.props.onComplete&&(u||m)&&c.props.onComplete(t,m)};return this.setState(function(f){var d=s||f.status;return t.completed&&!c.props.overtime?d="COMPLETED":!s&&d==="COMPLETED"&&(d="STOPPED"),{timeDelta:t,status:d}},p)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var t=this.props,s=t.daysInHours,a=t.zeroPadTime,c=t.zeroPadDays,u=this.state.timeDelta;return Object.assign(Object.assign({},u),{api:this.getApi(),props:this.props,formatted:X(u,{daysInHours:s,zeroPadTime:a,zeroPadDays:c})})}},{key:"render",value:function(){if(this.legacyMode){var t=this.props,s=t.count,a=t.children,c=t.onComplete;return y.createElement(M,{ref:this.setLegacyCountdownRef,count:s,onComplete:c},a)}var u=this.props,m=u.className,p=u.overtime,f=u.children,d=u.renderer,T=this.getRenderProps();if(d)return d(T);if(f&&this.state.timeDelta.completed&&!p)return y.cloneElement(f,{countdown:T});var h=T.formatted,x=h.days,E=h.hours,k=h.minutes,R=h.seconds;return y.createElement("span",{className:m},T.total<0?"-":"",x,x?":":"",E,":",k,":",R)}}]),r}(y.Component);b.defaultProps=Object.assign(Object.assign({},C),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});b.propTypes={date:i.oneOfType([i.instanceOf(Date),i.string,i.number]),daysInHours:i.bool,zeroPadTime:i.number,zeroPadDays:i.number,controlled:i.bool,intervalDelay:i.number,precision:i.number,autoStart:i.bool,overtime:i.bool,className:i.string,children:i.element,renderer:i.func,now:i.func,onMount:i.func,onStart:i.func,onPause:i.func,onStop:i.func,onTick:i.func,onComplete:i.func};const Y="_maintenance_11slj_3",Z="_maintenanceContain_11slj_17",tt="_ppInfoBoxTitlePrefix_11slj_30",et="_ppInfoBoxTitleWrapper_11slj_36",nt="_ppInfoBoxTitle_11slj_30",ot="_ppInfoBoxDescription_11slj_44",v={maintenance:Y,maintenanceContain:Z,ppInfoBoxTitlePrefix:tt,ppInfoBoxTitleWrapper:et,ppInfoBoxTitle:nt,ppInfoBoxDescription:ot},vt=y.memo(()=>{const{t:e}=H(),{isLoading:o,error:r,data:n}=B({enabled:!0,refetchInterval:9e5,refetchIntervalInBackground:!0,refetchOnWindowFocus:!0});return console.log("Maintenance isLoading, error, data:",o,r,n),l.jsxs(l.Fragment,{children:[l.jsxs(z,{children:[l.jsx("title",{children:e(g.maintenancePage.pageTitle)}),l.jsx("meta",{name:"description",content:e(g.maintenancePage.pageDescription)})]}),l.jsx("div",{className:v.maintenance,children:l.jsxs("div",{className:v.maintenanceContain,children:[l.jsx("img",{className:v.smallLogo,src:A,alt:"logo"}),l.jsx("img",{src:L,alt:"maintenance"}),l.jsx(b,{date:N(n).add(1,"second").toDate(),children:l.jsx("span",{className:v.ppInfoBoxTitlePrefix,children:e(g.maintenancePage.header)})}),l.jsx("div",{className:v.ppInfoBoxTitleWrapper,children:l.jsx("h3",{className:v.ppInfoBoxTitle,children:e(g.maintenancePage.subheader)})}),l.jsx("div",{className:v.ppInfoBoxDescription,children:l.jsx("p",{dangerouslySetInnerHTML:{__html:e(g.maintenancePage.message)}})})]})})]})});export{vt as MaintenancePage};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.