@webjet/react 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={9045:(e,t,n)=>{var r=n(7880),o=n(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(8213)),a=r(n(353)),l=r(n(3838)),d=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(6689)),u=(r(n(580)),r(n(5355))),c=n(270),s=n(7023),p=n(9941),f=["sections"];function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}var m=!1,h=null,b=d.default.forwardRef((function(e,t){return d.default.createElement(d.default.Fragment,null,d.default.createElement(c.Mobile,null,d.default.createElement(u.default,{active:e.hightlighted,elementType:"span",options:{block:"nearest",behavior:"smooth",scrollMode:"if-needed",boundary:function(t){return t!==e.menuRef.current}}},d.default.createElement(s.StyledAnchorLink,(0,i.default)({ref:t},e)))),d.default.createElement(c.TabletDesktop,null,d.default.createElement(s.StyledAnchorLink,(0,i.default)({ref:t},e))))}));t.default=function(e){var t,n,r,o,u=e.sections,c=(0,l.default)(e,f),g=(0,d.useState)(-1),y=(0,a.default)(g,2),v=y[0],w=y[1],x=Array(u.length).fill().map((function(){return(0,d.useRef)()})),k=(0,d.useRef)();return(0,d.useEffect)((function(){var e;w(0),function(e,t){var n=new window.IntersectionObserver((function(n){n.forEach((function(n){if(n.isIntersecting&&!m){var r=e.findIndex((function(e){return e.id===n.target.id}));t(r)}}))}),{rootMargin:"-44px 0px -".concat(window.innerHeight-50,"px 0px"),threshold:0});e.forEach((function(e){var t=document.getElementById(e.id);t&&n.observe(t)}))}(u,w),e=k.current,new window.IntersectionObserver((function(e){var t=(0,a.default)(e,1)[0];t.target.classList.toggle("is-sticky",t.isIntersecting)}),{rootMargin:"0px 0px -99.5% 0px",threshold:0}).observe(e)}),[]),d.default.createElement(s.StyledWrapper,(0,i.default)({ref:k,"data-testid":"anchor-links"},c),d.default.createElement(s.StyledInner,{"data-testid":"anchor-links-inner"},u.map((function(e,t){return d.default.createElement(b,{key:t,ref:x[t],menuRef:k,hightlighted:t===v,onClick:function(){return function(e){clearTimeout(h),m=!0;var t=u[e].scrollTop;if(Number.isInteger(t)){var n={top:t,left:window.scrollX};(0,p.scrollTo)(window,n)}else{var r=document.getElementById(u[e].id),o={top:(0,p.getBoundingClientInfo)(r).top+window.scrollY-k.current.clientHeight,left:window.scrollX};(0,p.scrollTo)(window,o)}h=setTimeout((function(){m=!1}),1e3),w(e)}(t)}},e.title)})),d.default.createElement(s.StyledHighlighter,{width:null===(t=x[v])||void 0===t||null===(n=t.current)||void 0===n?void 0:n.clientWidth,position:null===(r=x[v])||void 0===r||null===(o=r.current)||void 0===o?void 0:o.offsetLeft,"data-testid":"anchor-link"})))}},7023:(e,t,n)=>{var r=n(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledWrapper=t.StyledInner=t.StyledHighlighter=t.StyledAnchorLink=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=i?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(o,l,d):o[l]=e[l]}return o.default=e,n&&n.set(e,o),o}(n(7518)),i=n(9193);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}var l=o.default.div.withConfig({displayName:"AnchorLinkstyle__StyledWrapper",componentId:"sc-8fsik4-0"})(["position:sticky;background:",';height:44px;top:-44px;left:0;&:after{content:"";position:fixed;height:44px;background:white;width:100vw;left:0;top:-44px;z-index:-1;border-bottom:1px solid #ccc;}&.is-sticky{top:0;transition:top ease 500ms;&:after{top:0;transition:top ease 500ms;}}'],i.themeV2.color[11]);t.StyledWrapper=l;var d=o.default.div.withConfig({displayName:"AnchorLinkstyle__StyledInner",componentId:"sc-8fsik4-1"})(["position:relative;overflow:auto;white-space:nowrap;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]);t.StyledInner=d;var u=o.default.span.withConfig({displayName:"AnchorLinkstyle__StyledAnchorLink",componentId:"sc-8fsik4-2"})(["padding:12px 16px;font-size:14px;line-height:20px;box-sizing:border-box;display:inline-block;height:44px;cursor:pointer;",""],(function(e){return e.hightlighted&&(0,o.css)(["color:",";font-weight:500;"],i.themeV2.color[10])}));t.StyledAnchorLink=u;var c=o.default.span.withConfig({displayName:"AnchorLinkstyle__StyledHighlighter",componentId:"sc-8fsik4-3"})(["display:inline-block;position:absolute;bottom:0;height:4px;background:",";left:",";width:",";transition:width 500ms ease,left 500ms ease;"],i.themeV2.color[0],(function(e){return e.position+"px"}),(function(e){return e.width+"px"}));t.StyledHighlighter=c},7400:(e,t,n)=>{var r=n(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TabletDesktop=t.Tablet=t.SmallDesktop=t.MobileTablet=t.Mobile=t.LargeDesktop=t.Desktop=t.CustomQuery=void 0;var o=r(n(6689)),i=r(n(4225)),a=function(e){var t=e.query,n=e.wrappedComponent;return o.default.createElement(i.default,{query:t},(function(e){return e&&n}))};t.Mobile=function(e){var t=e.children;return o.default.createElement(a,{query:"(max-width: 767px)",wrappedComponent:t})},t.MobileTablet=function(e){var t=e.children;return o.default.createElement(a,{query:"(max-width: 991px)",wrappedComponent:t})},t.Tablet=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 768px) and (max-width: 991px)",wrappedComponent:t})},t.TabletDesktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 768px)",wrappedComponent:t})},t.Desktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 992px)",wrappedComponent:t})},t.SmallDesktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 768px) and (max-width: 1199px)",wrappedComponent:t})},t.LargeDesktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 1200px)",wrappedComponent:t})},t.CustomQuery=function(e){var t=e.query,n=e.children;return o.default.createElement(a,{query:t,wrappedComponent:n})};var l=a;t.default=l},270:(e,t,n)=>{var r=n(9293);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CustomQuery",{enumerable:!0,get:function(){return o.CustomQuery}}),Object.defineProperty(t,"Desktop",{enumerable:!0,get:function(){return o.Desktop}}),Object.defineProperty(t,"LargeDesktop",{enumerable:!0,get:function(){return o.LargeDesktop}}),Object.defineProperty(t,"Mobile",{enumerable:!0,get:function(){return o.Mobile}}),Object.defineProperty(t,"MobileTablet",{enumerable:!0,get:function(){return o.MobileTablet}}),Object.defineProperty(t,"SmallDesktop",{enumerable:!0,get:function(){return o.SmallDesktop}}),Object.defineProperty(t,"Tablet",{enumerable:!0,get:function(){return o.Tablet}}),Object.defineProperty(t,"TabletDesktop",{enumerable:!0,get:function(){return o.TabletDesktop}}),t.default=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=a?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(o,l,d):o[l]=e[l]}return o.default=e,n&&n.set(e,o),o}(n(7400));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}var a=o.default;t.default=a},3206:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},5799:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"}}},9193:(e,t,n)=>{var r=n(7880);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var o=r(n(2594)),i=r(n(6932)),a=r(n(2098)),l=r(n(3206)),d=r(n(5799))},2098:(e,t,n)=>{var r=n(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(7518),i=r(n(2594)),a={globalStyles:(0,o.css)(["font-family:",";font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontFamily.primary,i.default.fontSize,i.default.fontColor)};t.default=a},6932:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],r={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:n[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:n[5],hoverColor:n[6],hoverDarkColor:n[7],textHighlight:n[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:n[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:n[5],inputIcon:n[9],inputIconBackground:n[2],inputIconHoverBackground:n[5],inputCrossBtn:"#a8a8a8",btnStandard:n[2],btnStandardHover:n[5],btnAction:n[17],btnActionHover:"#259400",btnActive:n[13],btnActiveHover:n[19],btnSelection:n[16],btnSelectionHover:n[20],successBackground:n[22],successText:n[21],errorBackground:n[26],errorText:n[27],sliderPrimary:n[13],color:n,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:n[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=r},2594:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],r={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:n[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:n[5],hoverColor:n[6],hoverDarkColor:n[7],textHighlight:n[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:n[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:n[5],inputIcon:n[9],inputIconBackground:n[2],inputIconHoverBackground:n[5],inputCrossBtn:"#a8a8a8",btnStandard:n[2],btnStandardHover:n[5],btnAction:n[17],btnActionHover:"#259400",btnActive:n[13],btnActiveHover:n[19],btnSelection:n[16],btnSelectionHover:n[20],successBackground:n[22],successText:n[21],errorBackground:n[26],errorText:n[27],sliderPrimary:n[13],color:n,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:n[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=r},9941:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getBoundingClientInfo=t.formatNumber=t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0;var r=n(3322),o={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};t.BREAKPOINTS=o;var i=function(e){return window.matchMedia(e).matches};t.isMatchMedia=i,t.isMobile=function(){return i("(max-width: ".concat(o.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(o.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(o.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,n=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!n&&/(iPhone\sOS)\s([\d_]+)/.test(t)||n,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.isUserLoggedIn=function(){var e,t=null===(e=(0,r.getCookieStorage)("customer-soft-id"))||void 0===e?void 0:e.split(".");if(t&&t.length>1){var n=window.atob(t[1]).toString("ascii");if(JSON.parse(n).firstName)return!0}return!1};var a=function(e){if(e){var t=window.innerHeight-e.offsetHeight,n=window.scrollY,r=window.innerHeight,o=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){r=window.innerHeight,o=e.offsetHeight})),document.addEventListener("scroll",(function(){o=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||o<=r?e.style.top="0px":window.scrollY<n?i<0?e.style.top=i+n-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+n-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),n=window.scrollY}),{capture:!0,passive:!0})}};t.setTwoDirectionStickyPanel=a,t.setTwoDirectionStickyPanelById=function(e){a(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,n=e.scrollTop,r=e.clientHeight,o=t-n;return o>=r-1&&o<=r+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,n=e.clientHeight;return!(t>=n-1&&t<=n+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){e.scrollTo({behavior:"smooth",top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}}},3322:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=void 0;var n=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}};t.getSessionStorage=function(e){if(e&&n())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&n())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&n())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&n())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},t.setCookieStorage=function(e,t,n){var r=window.location.hostname,o="localhost"===r?r:r.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(o,"; Path=/; Max-Age=").concat(n||86400)}},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},7880:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},353:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},9293:e=>{e.exports=require("@babel/runtime/helpers/typeof")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},4225:e=>{e.exports=require("react-media")},5355:e=>{e.exports=require("react-scroll-into-view-if-needed")},7518:e=>{e.exports=require("styled-components")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}var r={};(()=>{var e=r,t=n(7880);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(n(9045)).default;e.default=o})(),module.exports=r})();
|
|
1
|
+
(()=>{"use strict";var e={9045:(e,t,n)=>{var r=n(7880),o=n(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(8213)),a=r(n(353)),l=r(n(3838)),d=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(6689)),u=(r(n(580)),r(n(5355))),c=n(270),s=n(7023),p=n(9941),f=["sections"];function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}var m=!1,h=null,b=d.default.forwardRef((function(e,t){return d.default.createElement(d.default.Fragment,null,d.default.createElement(c.Mobile,null,d.default.createElement(u.default,{active:e.hightlighted,elementType:"span",options:{block:"nearest",behavior:"smooth",scrollMode:"if-needed",boundary:function(t){return t!==e.menuRef.current}}},d.default.createElement(s.StyledAnchorLink,(0,i.default)({ref:t},e)))),d.default.createElement(c.TabletDesktop,null,d.default.createElement(s.StyledAnchorLink,(0,i.default)({ref:t},e))))}));t.default=function(e){var t,n,r,o,u=e.sections,c=(0,l.default)(e,f),g=(0,d.useState)(-1),y=(0,a.default)(g,2),v=y[0],w=y[1],x=Array(u.length).fill().map((function(){return(0,d.useRef)()})),k=(0,d.useRef)();return(0,d.useEffect)((function(){var e;w(0),function(e,t){var n=new window.IntersectionObserver((function(n){n.forEach((function(n){if(n.isIntersecting&&!m){var r=e.findIndex((function(e){return e.id===n.target.id}));t(r)}}))}),{rootMargin:"-44px 0px -".concat(window.innerHeight-50,"px 0px"),threshold:0});e.forEach((function(e){var t=document.getElementById(e.id);t&&n.observe(t)}))}(u,w),e=k.current,new window.IntersectionObserver((function(e){var t=(0,a.default)(e,1)[0];t.target.classList.toggle("is-sticky",t.isIntersecting)}),{rootMargin:"0px 0px -99.5% 0px",threshold:0}).observe(e)}),[]),d.default.createElement(s.StyledWrapper,(0,i.default)({ref:k,"data-testid":"anchor-links"},c),d.default.createElement(s.StyledInner,{"data-testid":"anchor-links-inner"},u.map((function(e,t){var n=document.getElementById(e.id);return(null==n?void 0:n.offsetHeight)>0&&d.default.createElement(b,{key:t,ref:x[t],menuRef:k,hightlighted:t===v,onClick:function(){return function(e){clearTimeout(h),m=!0;var t=u[e].scrollTop;if(Number.isInteger(t)){var n={top:t,left:window.scrollX};(0,p.scrollTo)(window,n)}else{var r=document.getElementById(u[e].id),o={top:(0,p.getBoundingClientInfo)(r).top+window.scrollY-k.current.clientHeight,left:window.scrollX};(0,p.scrollTo)(window,o)}h=setTimeout((function(){m=!1}),1e3),w(e)}(t)}},e.title)})),d.default.createElement(s.StyledHighlighter,{width:null===(t=x[v])||void 0===t||null===(n=t.current)||void 0===n?void 0:n.clientWidth,position:null===(r=x[v])||void 0===r||null===(o=r.current)||void 0===o?void 0:o.offsetLeft,"data-testid":"anchor-link"})))}},7023:(e,t,n)=>{var r=n(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledWrapper=t.StyledInner=t.StyledHighlighter=t.StyledAnchorLink=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=i?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(o,l,d):o[l]=e[l]}return o.default=e,n&&n.set(e,o),o}(n(7518)),i=n(9193);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}var l=o.default.div.withConfig({displayName:"AnchorLinkstyle__StyledWrapper",componentId:"sc-8fsik4-0"})(["position:sticky;background:",';height:44px;top:-44px;left:0;&:after{content:"";position:fixed;height:44px;background:white;width:100vw;left:0;top:-44px;z-index:-1;border-bottom:1px solid #ccc;}&.is-sticky{top:0;transition:top ease 500ms;&:after{top:0;transition:top ease 500ms;}}'],i.themeV2.color[11]);t.StyledWrapper=l;var d=o.default.div.withConfig({displayName:"AnchorLinkstyle__StyledInner",componentId:"sc-8fsik4-1"})(["position:relative;overflow:auto;white-space:nowrap;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]);t.StyledInner=d;var u=o.default.span.withConfig({displayName:"AnchorLinkstyle__StyledAnchorLink",componentId:"sc-8fsik4-2"})(["padding:12px 16px;font-size:14px;line-height:20px;box-sizing:border-box;display:inline-block;height:44px;cursor:pointer;",""],(function(e){return e.hightlighted&&(0,o.css)(["color:",";font-weight:500;"],i.themeV2.color[10])}));t.StyledAnchorLink=u;var c=o.default.span.withConfig({displayName:"AnchorLinkstyle__StyledHighlighter",componentId:"sc-8fsik4-3"})(["display:inline-block;position:absolute;bottom:0;height:4px;background:",";left:",";width:",";transition:width 500ms ease,left 500ms ease;"],i.themeV2.color[0],(function(e){return e.position+"px"}),(function(e){return e.width+"px"}));t.StyledHighlighter=c},7400:(e,t,n)=>{var r=n(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TabletDesktop=t.Tablet=t.SmallDesktop=t.MobileTablet=t.Mobile=t.LargeDesktop=t.Desktop=t.CustomQuery=void 0;var o=r(n(6689)),i=r(n(4225)),a=function(e){var t=e.query,n=e.wrappedComponent;return o.default.createElement(i.default,{query:t},(function(e){return e&&n}))};t.Mobile=function(e){var t=e.children;return o.default.createElement(a,{query:"(max-width: 767px)",wrappedComponent:t})},t.MobileTablet=function(e){var t=e.children;return o.default.createElement(a,{query:"(max-width: 991px)",wrappedComponent:t})},t.Tablet=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 768px) and (max-width: 991px)",wrappedComponent:t})},t.TabletDesktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 768px)",wrappedComponent:t})},t.Desktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 992px)",wrappedComponent:t})},t.SmallDesktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 768px) and (max-width: 1199px)",wrappedComponent:t})},t.LargeDesktop=function(e){var t=e.children;return o.default.createElement(a,{query:"(min-width: 1200px)",wrappedComponent:t})},t.CustomQuery=function(e){var t=e.query,n=e.children;return o.default.createElement(a,{query:t,wrappedComponent:n})};var l=a;t.default=l},270:(e,t,n)=>{var r=n(9293);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CustomQuery",{enumerable:!0,get:function(){return o.CustomQuery}}),Object.defineProperty(t,"Desktop",{enumerable:!0,get:function(){return o.Desktop}}),Object.defineProperty(t,"LargeDesktop",{enumerable:!0,get:function(){return o.LargeDesktop}}),Object.defineProperty(t,"Mobile",{enumerable:!0,get:function(){return o.Mobile}}),Object.defineProperty(t,"MobileTablet",{enumerable:!0,get:function(){return o.MobileTablet}}),Object.defineProperty(t,"SmallDesktop",{enumerable:!0,get:function(){return o.SmallDesktop}}),Object.defineProperty(t,"Tablet",{enumerable:!0,get:function(){return o.Tablet}}),Object.defineProperty(t,"TabletDesktop",{enumerable:!0,get:function(){return o.TabletDesktop}}),t.default=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=a?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(o,l,d):o[l]=e[l]}return o.default=e,n&&n.set(e,o),o}(n(7400));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}var a=o.default;t.default=a},3206:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},5799:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"}}},9193:(e,t,n)=>{var r=n(7880);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var o=r(n(2594)),i=r(n(6932)),a=r(n(2098)),l=r(n(3206)),d=r(n(5799))},2098:(e,t,n)=>{var r=n(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(7518),i=r(n(2594)),a={globalStyles:(0,o.css)(["font-family:",";font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontFamily.primary,i.default.fontSize,i.default.fontColor)};t.default=a},6932:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],r={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:n[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:n[5],hoverColor:n[6],hoverDarkColor:n[7],textHighlight:n[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:n[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:n[5],inputIcon:n[9],inputIconBackground:n[2],inputIconHoverBackground:n[5],inputCrossBtn:"#a8a8a8",btnStandard:n[2],btnStandardHover:n[5],btnAction:n[17],btnActionHover:"#259400",btnActive:n[13],btnActiveHover:n[19],btnSelection:n[16],btnSelectionHover:n[20],successBackground:n[22],successText:n[21],errorBackground:n[26],errorText:n[27],sliderPrimary:n[13],color:n,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:n[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=r},2594:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],r={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:n[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:n[5],hoverColor:n[6],hoverDarkColor:n[7],textHighlight:n[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:n[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:n[5],inputIcon:n[9],inputIconBackground:n[2],inputIconHoverBackground:n[5],inputCrossBtn:"#a8a8a8",btnStandard:n[2],btnStandardHover:n[5],btnAction:n[17],btnActionHover:"#259400",btnActive:n[13],btnActiveHover:n[19],btnSelection:n[16],btnSelectionHover:n[20],successBackground:n[22],successText:n[21],errorBackground:n[26],errorText:n[27],sliderPrimary:n[13],color:n,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:n[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=r},9941:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getBoundingClientInfo=t.formatNumber=t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0;var r=n(3322),o={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};t.BREAKPOINTS=o;var i=function(e){return window.matchMedia(e).matches};t.isMatchMedia=i,t.isMobile=function(){return i("(max-width: ".concat(o.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(o.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(o.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,n=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!n&&/(iPhone\sOS)\s([\d_]+)/.test(t)||n,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.isUserLoggedIn=function(){var e,t=null===(e=(0,r.getCookieStorage)("customer-soft-id"))||void 0===e?void 0:e.split(".");if(t&&t.length>1){var n=window.atob(t[1]).toString("ascii");if(JSON.parse(n).firstName)return!0}return!1};var a=function(e){if(e){var t=window.innerHeight-e.offsetHeight,n=window.scrollY,r=window.innerHeight,o=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){r=window.innerHeight,o=e.offsetHeight})),document.addEventListener("scroll",(function(){o=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||o<=r?e.style.top="0px":window.scrollY<n?i<0?e.style.top=i+n-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+n-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),n=window.scrollY}),{capture:!0,passive:!0})}};t.setTwoDirectionStickyPanel=a,t.setTwoDirectionStickyPanelById=function(e){a(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,n=e.scrollTop,r=e.clientHeight,o=t-n;return o>=r-1&&o<=r+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,n=e.clientHeight;return!(t>=n-1&&t<=n+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){e.scrollTo({behavior:"smooth",top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}}},3322:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=void 0;var n=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}};t.getSessionStorage=function(e){if(e&&n())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&n())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&n())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&n())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},t.setCookieStorage=function(e,t,n){var r=window.location.hostname,o="localhost"===r?r:r.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(o,"; Path=/; Max-Age=").concat(n||86400)}},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},7880:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},353:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},9293:e=>{e.exports=require("@babel/runtime/helpers/typeof")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},4225:e=>{e.exports=require("react-media")},5355:e=>{e.exports=require("react-scroll-into-view-if-needed")},7518:e=>{e.exports=require("styled-components")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}var r={};(()=>{var e=r,t=n(7880);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(n(9045)).default;e.default=o})(),module.exports=r})();
|