1/*! For license information please see chunk-darksite.5fa294a5.js.LICENSE.txt */ 2"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[898],{46794:function(e,t,n){var a=n(96540),l=n(52573),r=n(49569);t.A=function(e){var t,n,i,o,c,s,u,d,m,v,p,f="darksite"===(null==e?void 0:e.calledFrom)?(null==e||null===(t=e.lists)||void 0===t?void 0:t.length)-1:(null==e||null===(n=e.lists)||void 0===n?void 0:n.length)-1===(null==e?void 0:e.total)?(null==e||null===(i=e.lists)||void 0===i?void 0:i.length)-1:null==e||null===(o=e.lists)||void 0===o?void 0:o.length;return a.createElement(a.Fragment,null,f<(null==e?void 0:e.total)&&(null==e||null===(c=e.lists)||void 0===c?void 0:c.length)>0&&a.createElement("div",{className:"load-more-container"},(null==e?void 0:e.isLoadMore)&&a.createElement(l.A,{type:"circular"}),!(null!=e&&e.isLoadMore)&&a.createElement("button",{onClick:function(){return function(){var t;null==e||e.loadMore();var n={customLinkName:"content: ".concat((null==e||null===(t=e.labelData)||void 0===t?void 0:t.loadMore)||"Load More")};(0,r.z0)({isHappeningTile:!1,isExitEvent:!1,name:null==n?void 0:n.customLinkName,linkPosition:"Content",URL:"",happeningNowTileTitle:""})}()}},(null==e||null===(s=e.labelData)||void 0===s?void 0:s.loadMore)||"Load More")),(null==e?void 0:e.lists)&&(null==e?void 0:e.lists.length)>0&&a.createElement("div",{className:"results-shown"},a.createElement("div",{className:"progressbar"},a.createElement("div",{className:"progress",style:{width:"".concat(f/(null!=e&&e.total?null==e?void 0:e.total:1)*100>100?100:f/(null!=e&&e.total?null==e?void 0:e.total:1)*100,"%")}})),a.createElement("div",{className:"results"},null!=e&&null!==(u=e.labelData)&&void 0!==u&&u.paginationTitle?a.createElement("p",{dangerouslySetInnerHTML:{__html:null==e||null===(d=e.labelData)||void 0===d?void 0:d.paginationTitle.replace("[[size]]",f).replace("[[count]]",null==e?void 0:e.total)}}):a.createElement("p",null,(null==e||null===(m=e.labelData)||void 0===m?void 0:m.showingText)||"Showing"," ",a.createElement("span",{className:"text-bold"},f," ",(null==e||null===(v=e.labelData)||void 0===v?void 0:v.ofText)||"of"," ",null==e?void 0:e.total)," ",(null==e||null===(p=e.labelData)||void 0===p?void 0:p.resultsText)||"results"))))}},41568:function(e,t,n){n.r(t);var a=n(96540),l=n(5338),r=n(50981),i=n(46794),o=n(66282),c=n(52573),s=n(63876),u=n(49569);function d(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",l=n.toStringTag||"@@toStringTag";function r(n,a,l,r){var c=a&&a.prototype instanceof o?a:o,s=Object.create(c.prototype);return m(s,"_invoke",function(n,a,l){var r,o,c,s=0,u=l||[],d=!1,m={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return r=t,o=0,c=e,m.n=n,i}};function v(n,a){for(o=n,c=a,t=0;!d&&s&&!l&&t<u.length;t++){var l,r=u[t],v=m.p,p=r[2];n>3?(l=p===a)&&(c=r[(o=r[4])?5:(o=3,3)],r[4]=r[5]=e):r[0]<=v&&((l=n<2&&v<r[1])?(o=0,m.v=a,m.n=r[1]):v<p&&(l=n<3||r[0]>a||a>p)&&(r[4]=n,r[5]=a,m.n=p,o=0))}if(l||n>1)return i;throw d=!0,a}return function(l,u,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===u&&v(u,p),o=u,c=p;(t=o<2?e:c)||!d;){r||(o?o<3?(o>1&&(m.n=-1),v(o,c)):m.n=c:m.v=c);try{if(s=2,r){if(o||(l="next"),t=r[l]){if(!(t=t.call(r,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,o<2&&(o=0)}else 1===o&&(t=r.return)&&t.call(r),o<2&&(c=TypeError("The iterator does not provide a '"+l+"' method"),o=1);r=e}else if((t=(d=m.n<0)?c:n.call(a,m))!==i)break}catch(t){r=e,o=1,c=t}finally{s=1}}return{value:t,done:d}}}(n,l,r),!0),s}var i={};function o(){}function c(){}function s(){}t=Object.getPrototypeOf;var u=[][a]?t(t([][a]())):(m(t={},a,function(){return this}),t),v=s.prototype=o.prototype=Object.create(u);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,m(e,l,"GeneratorFunction")),e.prototype=Object.create(v),e}return c.prototype=s,m(v,"constructor",s),m(s,"constructor",c),c.displayName="GeneratorFunction",m(s,l,"GeneratorFunction"),m(v),m(v,l,"Generator"),m(v,a,function(){return this}),m(v,"toString",function(){return"[object Generator]"}),(d=function(){return{w:r,m:p}})()}function m(e,t,n,a){var l=Object.defineProperty;try{l({},"",{})}catch(e){l=0}m=function(e,t,n,a){function r(t,n){m(e,t,function(e){return this._invoke(t,n,e)})}t?l?l(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},m(e,t,n,a)}function v(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||E(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t,n,a,l,r,i){try{var o=e[r](i),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(a,l)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,l,r,i,o=[],c=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,l=e}
2finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw l}}return o}}(e,t)||E(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var g=function(e){var t,n,l,r,i,o,c,s,u,d,m,v,p,f;return a.createElement("div",{className:"darksite-container-featured-card"},a.createElement("div",{className:"darksite-container-featured-card_timestamp timestamp"},a.createElement("div",{className:"timestamp_date"},(null==e||null===(t=e.details)||void 0===t?void 0:t.publishDate)||""),a.createElement("div",{className:"timestamp_time"},a.createElement("span",{className:"timestamp_icon"}),a.createElement("span",{className:"timestamp_hour"},(null==e||null===(n=e.details)||void 0===n?void 0:n.publishTime)||"")),a.createElement("div",{className:"timestamp_gmt"},"GMT+8")),a.createElement("div",{className:"darksite-container-featured-card_details"},a.createElement("div",{className:"darksite-container-featured-card_details_title",dangerouslySetInnerHTML:{__html:null==e?void 0:e.unescapeHtmlEntities((null==e||null===(l=e.details)||void 0===l?void 0:l.title)||"")}}),a.createElement("div",{className:"darksite-container-featured-card_details_desc",dangerouslySetInnerHTML:{__html:null==e?void 0:e.unescapeHtmlEntities((null==e||null===(r=e.details)||void 0===r?void 0:r.description)||"")}}),(null==e||null===(i=e.details)||void 0===i?void 0:i.image)&&a.createElement("div",{className:"darksite-container-featured-card_details_images"},"true"===(null==e||null===(o=e.details)||void 0===o?void 0:o.enableDynamicMediaSmartCrop)||!0===(null==e||null===(c=e.details)||void 0===c?void 0:c.enableDynamicMediaSmartCrop)?a.createElement("img",{"data-image-formats":"7by5","data-image-path":"".concat(""+((null==e||null===(s=e.details)||void 0===s?void 0:s.image)||(null==e||null===(u=e.details)||void 0===u||null===(u=u.image)||void 0===u?void 0:u[0]))),alt:null==e||null===(d=e.details)||void 0===d?void 0:d.altText,"data-image-smart":!0}):a.createElement("img",{src:"".concat(""+((null==e||null===(m=e.details)||void 0===m?void 0:m.image)||(null==e||null===(v=e.details)||void 0===v||null===(v=v.image)||void 0===v?void 0:v[0]))),alt:null==e||null===(p=e.details)||void 0===p?void 0:p.altText})),a.createElement("div",{className:"darksite-container-featured-card_details_subdesc",dangerouslySetInnerHTML:{__html:null==e?void 0:e.unescapeHtmlEntities((null==e||null===(f=e.details)||void 0===f?void 0:f.subDescription)||"")}})))},y=function(e){var t,n,l,r,i,o,c=f((0,a.useState)(!1),2),s=c[0],d=c[1],m=f((0,a.useState)(!0),2),v=m[0],p=m[1],E=(0,a.useRef)(null),h=(0,a.useRef)(window.innerWidth),g=function(t){var n;p(t);var a={customLinkName:"content: ".concat(null==e||null===(n=e.details)||void 0===n?void 0:n.title," | ").concat(t?"Read Less":"Read More")};(0,u.z0)({isHappeningTile:!1,isExitEvent:!1,name:null==a?void 0:a.customLinkName,linkPosition:"Content",URL:"",happeningNowTileTitle:""})},y=function(){E.current&&(p(!0),d(E.current.scrollHeight>E.current.clientHeight))};return(0,a.useEffect)(function(){y()},[]),(0,a.useEffect)(function(){y();var e=function(){var e=window.innerWidth;h.current!==e&&(y(),h.current=e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]),a.createElement("div",{className:"darksite-container-past-card"},a.createElement("div",{className:"darksite-container-past-card_timestamp timestamp"},a.createElement("div",{className:"timestamp_date"},(null==e||null===(t=e.details)||void 0===t?void 0:t.publishDate)||""),a.createElement("div",{className:"timestamp_time"},a.createElement("span",{className:"timestamp_icon"}),a.createElement("span",{className:"timestamp_hour"},(null==e||null===(n=e.details)||void 0===n?void 0:n.publishTime)||"")),a.createElement("div",{className:"timestamp_gmt"},"GMT+8")),a.createElement("div",{ref:E,className:v?"darksite-container-past-card_details":"darksite-container-past-card_details withOutReadMore"},a.createElement("span",{className:"darksite-container-past-card_details_title",dangerouslySetInnerHTML:{__html:null==e?void 0:e.unescapeHtmlEntities((null==e||null===(l=e.details)||void 0===l?void 0:l.title)||"")}}),a.createElement("br",null),a.createElement("span",{className:"darksite-container-past-card_details_desc",dangerouslySetInnerHTML:{__html:null==e?void 0:e.unescapeHtmlEntities((null==e||null===(r=e.details)||void 0===r?void 0:r.description)||"")}}),s&&a.createElement(a.Fragment,null,v&&a.createElement("a",{className:"readtext read-more-link",onClick:function(){return g(!1)}},"...",a.createElement("span",null,(null==e||null===(i=e.labelData)||void 0===i?void 0:i.readMoreLabel)||"Read More")),!v&&a.createElement("a",{className:"readtext read-less-link",onClick:function(){return g(!0)}},a.createElement("span",null,(null==e||null===(o=e.labelData)||void 0===o?void 0:o.readLessLabel)||"Read Less")))))},b=function(e){var t=e.props,n=f((0,a.useState)([]),2),l=n[0],u=n[1],m=f((0,a.useState)(0),2),E=m[0],h=m[1],b=f((0,a.useState)(""),2),N=b[0],_=b[1],k=f((0,a.useState)(""),2),T=k[0],S=k[1],w=f((0,a.useState)(!1),2),L=w[0],M=w[1],A=f((0,a.useState)(!1),2),x=A[0],H=A[1],D=f((0,a.useState)(!0),2),C=D[0],O=D[1],j=f((0,a.useState)(!1),2),I=j[0],P=j[1],R=f((0,a.useState)(0),2),F=R[0],z=R[1],G=t?JSON.parse(t):{type:"darksite"},U=document.documentElement.lang||"en",W=null==G?void 0:G.crisisCfpath,q=!isNaN(null==G?void 0:G.cardCountPerLoad)&&parseInt(null==G?void 0:G.cardCountPerLoad)+1||6,J=function(e,t,n){return t="loadmore"===e?t||q-1:t||q,n=n||F,""+"/bin/changiairport/corporate/getcrisis.".concat(W,".").concat(n,".").concat(t,".").concat(U,".data")},Y=function(e){return(new DOMParser).parseFromString(e,"text/html").body.textContent||""},$=function(){var e,t=(e=d().m(function e(t,n,a){var i,o,c,s,m,p,f,E,g,y,b,N;return d().w(function(e){for(;;)switch(e.p=e.n){case 0:return i=J(t,n,a),e.p=1,e.n=2,(0,r.Yz)(i);case 2:c=e.v,P(!1),M(!1),null!=c&&null!==(o=c.data)&&void 0!==o&&o.length?(O(!1),E=null==c||null===(s=c.data)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.announcements,_(null==c||null===(m=c.data)||void 0===m||null===(m=m[0])||void 0===m?void 0:m.title),S(null==c||null===(p=c.data)||void 0===p||null===(p=p[0])||void 0===p?void 0:p.description),E&&null!=E&&null!==(f=E.data)&&void 0!==f&&f.length&&("loadmore"===t?(b=v(l),(null==E||null===(g=E.data)||void 0===g?void 0:g.length)>0&&(null==E||null===(y=E.data)||void 0===y||y.map(function(e){b.push(e)})),u(b)):u(null==E?void 0:E.data),h(null==E?void 0:E.total),"Crisis Management | announcements | ".concat("loadMore"===t?"Load More | ":"").concat("totalResults: "+(null==E?void 0:E.total)+" |"," ").concat("resultsShown: "+(null==l?void 0:l.length)))):O(!1),e.n=4;break;case 3:e.p=3,N=e.v,P(!0),O(!1),console.error("error",null==N?void 0:N.message);case 4:return e.a(2)}},e,null,[[1,3]])}),function(){var t=this,n=arguments;return new Promise(function(a,l){var r=e.apply(t,n);function i(e){p(r,a,l,i,o,"next",e)}function o(e){p(r,a,l,i,o,"throw",e)}i(void 0)})});return function(e,n,a){return t.apply(this,arguments)}}();return(0,a.useEffect)(function(){O(!0),$()},[]),(0,a.useEffect)(function(){setTimeout(function(){(0,s.z6)()},1e3)}),a.createElement("div",{className:"darksite-container"},I&&a.createElement(o.A,{heading:(null==G?void 0:G.errHeading)||"Unable to load.",description:(null==G?void 0:G.errDesc)||"An error occurred and we are not able to load the information.",ctaText:(null==G?void 0:G.errCTA)||"Try again",ctaAction:function(){O(!0),P(!1),$(null,q,0)}}),!I&&C&&a.createElement(c.A,null),!I&&!C&&a.createElement(a.Fragment,null,a.createElement("div",{className:"darksite-container-banner"},a.createElement("div",{className:"darksite-container-banner-title"},N),a.createElement("div",{className:"darksite-container-banner-desc",dangerouslySetInnerHTML:{__html:Y(T)}})),l&&(null==l?void 0:l.length)>0&&a.createElement("div",{className:"darksite-container-featured"},a.createElement(g,{details:null==l?void 0:l[0],unescapeHtmlEntities:Y,labelData:G})),l&&(null==l?void 0:l.length)>1&&a.createElement("div",{className:"darksite-container-past"},a.createElement("div",{className:"darksite-container-past-announcements"},a.createElement("div",{className:"darksite-container-past-title"},(null==G?void 0:G.pastAnnouncementLabel)||"Past Announcements"),null==l?void 0:l.map(function(e,t){if(t>0)return a.createElement(y,{key:t,details:e,unescapeHtmlEntities:Y,labelData:G})}),a.createElement("div",{className:"darksite-container-loadmore directory-container"},a.createElement(i.A,{lists:l,total:E-1,isLoadMore:L,loadMore:function(){P(!1),z(x?F+q-1:F+q),H(!0),$("loadmore",q-1,x?F+q-1:F+q)},labelData:G,calledFrom:"darksite"}))))))},N=document.querySelectorAll("[data-component='crisisAnnouncement']");
2N&&v(N).forEach(function(e){(0,l.H)(e).render(a.createElement(b,{props:e.dataset.props}))}),t.default=b},66282:function(e,t,n){var a=n(96540),l=n(49569);t.A=function(e){return a.createElement("div",{className:"error-container text-center"},a.createElement("div",{className:"error-container__img"},a.createElement("span",{className:"errorIcon"})),a.createElement("div",{className:"error-container__heading"},null==e?void 0:e.heading),a.createElement("div",{className:"error-container__desc"},null==e?void 0:e.description),(null==e?void 0:e.ctaText)&&a.createElement("div",{className:"error-container__cta"},a.createElement("button",{onClick:function(){null==e||e.ctaAction();var t={customLinkName:"content: ".concat((null==e?void 0:e.ctaText)||"Try Again")};(0,l.z0)({isHappeningTile:!1,isExitEvent:!1,name:null==t?void 0:t.customLinkName,linkPosition:"Content",URL:"",happeningNowTileTitle:""})}},null==e?void 0:e.ctaText)))}},52573:function(e,t,n){var a=n(96540);t.A=function(e){return a.createElement("div",{style:e.style,className:"circular"===(null==e?void 0:e.type)?"loader-container circular":"loader-container simple"},a.createElement("div",{className:"loader"}))}}}]);
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.