@cleartrip/ct-design-header 1.2.0-SNAPSHOT-header-v0.7.0 → 1.2.0-SNAPSHOT-header-v0.9.0.0
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.
- package/dist/BusinessDropdown/index.d.ts.map +1 -1
- package/dist/Header.d.ts.map +1 -1
- package/dist/HeaderAnimatedMask /hooks.d.ts.map +1 -1
- package/dist/LobsHeader/index.d.ts.map +1 -1
- package/dist/RewardsSection/LoyaltyChips.d.ts.map +1 -1
- package/dist/RewardsSection/index.d.ts.map +1 -1
- package/dist/UserAccount/UserAccountDropdown.d.ts.map +1 -1
- package/dist/UserAccount/accountOptions.d.ts +0 -1
- package/dist/UserAccount/accountOptions.d.ts.map +1 -1
- package/dist/UserAccount/index.d.ts.map +1 -1
- package/dist/constants.d.ts +31 -34
- package/dist/constants.d.ts.map +1 -1
- package/dist/ct-design-header.browser.cjs.js +1 -1
- package/dist/ct-design-header.browser.cjs.js.map +1 -1
- package/dist/ct-design-header.browser.esm.js +1 -1
- package/dist/ct-design-header.browser.esm.js.map +1 -1
- package/dist/ct-design-header.cjs.js +196 -450
- package/dist/ct-design-header.cjs.js.map +1 -1
- package/dist/ct-design-header.esm.js +197 -451
- package/dist/ct-design-header.esm.js.map +1 -1
- package/dist/ct-design-header.umd.js +200 -453
- package/dist/ct-design-header.umd.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/type.d.ts +1 -17
- package/dist/type.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/utils.d.ts +0 -8
- package/dist/utils.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/BusinessDropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/BusinessDropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,eAAe,CAAC;AAEvB,UAAU,wBAAwB;IAChC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA8D/D,CAAC;AAcF,eAAe,uBAAuB,CAAC"}
|
package/dist/Header.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAKtC,OAAO,cAAc,CAAC;AAGtB,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMlC,CAAC;AAyMF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/HeaderAnimatedMask /hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/HeaderAnimatedMask /hooks.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,SAAU,OAAO,gBAAgB,MAAM,YAmBpE,CAAC;AAMF,eAAO,MAAM,kBAAkB,gDAsB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/LobsHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/LobsHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EA0CvB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoyaltyChips.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"LoyaltyChips.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAI5C,UAAU,gBAAgB;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,qFAMd,gBAAgB,4CAsElB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAyEnD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAgE3B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserAccountDropdown.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"UserAccountDropdown.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAclD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,OAAO,eAAe,CAAC;AAEvB,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuI1D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IAccountOptionsPopupConfig } from '../type';
|
|
2
2
|
export declare const ACCOUNT_OPTIONS_POPUP_CONFIG: IAccountOptionsPopupConfig[];
|
|
3
3
|
export declare const SIGN_OUT_TEXT = "Logout";
|
|
4
|
-
export declare const MY_ACCOUNT_TEXT = "My Account";
|
|
5
4
|
export declare const LOGGEDIN_USER_TEXT = "You are logged in with";
|
|
6
5
|
export declare const HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID = "header-acc-btn";
|
|
7
6
|
export declare const ACCOUNT_OPTIONS_CONTAINER_ID = "account-options";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountOptions.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/accountOptions.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,4BAA4B,EAAE,0BAA0B,EAyCpE,CAAC;AAEF,eAAO,MAAM,aAAa,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"accountOptions.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/accountOptions.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,4BAA4B,EAAE,0BAA0B,EAyCpE,CAAC;AAEF,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,eAAO,MAAM,mCAAmC,mBAAmB,CAAC;AACpE,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAC9D,eAAO,MAAM,+BAA+B,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAWnD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAqExB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ButtonColor } from '@cleartrip/ct-design-button';
|
|
3
2
|
export declare const FLIGHTS_URL = "/flights";
|
|
4
3
|
export declare const HOTELS_URL = "/hotels";
|
|
5
4
|
export declare const BUS_URL = "/bus";
|
|
@@ -8,16 +7,30 @@ export declare const MY_TRIPS_URL = "/account/trips";
|
|
|
8
7
|
export declare const CLEARTRIP_FOR_WORK_URL = "https://business.cleartrip.com/";
|
|
9
8
|
export declare const SUPPORT_URL = "/support";
|
|
10
9
|
export declare const PROFILE_DETAILS_URL = "/accounts/profile";
|
|
11
|
-
export
|
|
12
|
-
lefticon:
|
|
10
|
+
export declare const NAVBAR_OPTIONS: ({
|
|
11
|
+
lefticon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
13
12
|
text: string;
|
|
14
|
-
ravenActionName: string;
|
|
15
13
|
isHoverable: boolean;
|
|
16
|
-
isClickable
|
|
17
|
-
link
|
|
18
|
-
rightIcon?:
|
|
19
|
-
}
|
|
20
|
-
|
|
14
|
+
isClickable: boolean;
|
|
15
|
+
link: string;
|
|
16
|
+
rightIcon?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
lefticon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
19
|
+
text: string;
|
|
20
|
+
rightIcon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
21
|
+
isHoverable: boolean;
|
|
22
|
+
isClickable?: undefined;
|
|
23
|
+
link?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
lefticon: ({ color }: {
|
|
26
|
+
color?: string | undefined;
|
|
27
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
text: string;
|
|
29
|
+
isHoverable: boolean;
|
|
30
|
+
isClickable: boolean;
|
|
31
|
+
link: string;
|
|
32
|
+
rightIcon?: undefined;
|
|
33
|
+
})[];
|
|
21
34
|
export declare const LOBS: {
|
|
22
35
|
FLIGHTS: string;
|
|
23
36
|
HOTELS: string;
|
|
@@ -30,40 +43,24 @@ export declare const LOB_DATA: {
|
|
|
30
43
|
image: string;
|
|
31
44
|
link: string;
|
|
32
45
|
}[];
|
|
33
|
-
export
|
|
46
|
+
export declare const bdConfig: ({
|
|
47
|
+
title: string;
|
|
48
|
+
subtitle: string;
|
|
49
|
+
details: string;
|
|
50
|
+
link?: undefined;
|
|
51
|
+
} | {
|
|
34
52
|
title: string;
|
|
35
53
|
subtitle: string;
|
|
36
54
|
details: string;
|
|
37
55
|
link: string;
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
export declare const bdConfig: BDConfigProps[];
|
|
56
|
+
})[];
|
|
41
57
|
export declare const BUSINESS_DROPDOWN_HEADING = "Other business services";
|
|
42
58
|
export declare enum RAVEN_PAGE_NAMES {
|
|
43
59
|
UNIFIED_HOME = "unified_homepage",
|
|
44
|
-
HOTELS_HOME = "
|
|
45
|
-
FLIGHTS_HOME = "
|
|
60
|
+
HOTELS_HOME = "hotels_homepage",
|
|
61
|
+
FLIGHTS_HOME = "flights_homepage"
|
|
46
62
|
}
|
|
47
63
|
export declare enum RAVEN_PLATFORMS {
|
|
48
64
|
DESKTOP = "desktop"
|
|
49
65
|
}
|
|
50
|
-
export declare const LOG_IN_TEXT = "Log in";
|
|
51
|
-
export declare const THEME_CONFIG: {
|
|
52
|
-
NOVAC: {
|
|
53
|
-
headerBackground: string;
|
|
54
|
-
hoverColor: string;
|
|
55
|
-
logoFill: string;
|
|
56
|
-
fkcompanyColor: string;
|
|
57
|
-
typographyColor: string;
|
|
58
|
-
loginButtonColorVariant: ButtonColor;
|
|
59
|
-
};
|
|
60
|
-
DEFAULT: {
|
|
61
|
-
headerBackground: string;
|
|
62
|
-
hoverColor: string;
|
|
63
|
-
logoFill: string;
|
|
64
|
-
fkcompanyColor: string;
|
|
65
|
-
typographyColor: string;
|
|
66
|
-
loginButtonColorVariant: ButtonColor;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
66
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/constants.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/constants.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,OAAO,SAAS,CAAC;AAC9B,eAAO,MAAM,UAAU,mCAAmC,CAAC;AAC3D,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAC7C,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AACxE,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAEvD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;IA4B1B,CAAC;AAEF,eAAO,MAAM,IAAI;;;;;;CAMhB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;GA+BpB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;IAuBpB,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AAEnE,oBAAY,gBAAgB;IAC1B,YAAY,qBAAqB;IACjC,WAAW,oBAAoB;IAC/B,YAAY,qBAAqB;CAClC;AAED,oBAAY,eAAe;IACzB,OAAO,YAAY;CACpB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e,n,i=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),o=require("@cleartrip/ct-design-container"),a=require("@cleartrip/ct-design-typography"),s=require("@cleartrip/ct-design-button"),c=require("@cleartrip/ct-design-divider"),l=require("@cleartrip/ct-design-icons"),d=require("@cleartrip/ct-design-shimmer"),u=[{lefticon:l.Offers,text:"Offers",ravenActionName:"offers",isHoverable:!1,isClickable:!0,link:"all-offers/?categories=flights"},{lefticon:l.BusinessBag,text:"Business",ravenActionName:"business",rightIcon:l.ChevronDown,isHoverable:!0},{lefticon:l.MyTrips,text:"My Trips",ravenActionName:"mytrips",isHoverable:!1,isClickable:!0,link:"/account/trips"},{lefticon:l.SupportIcon,text:"Support",ravenActionName:"support",isHoverable:!1,isClickable:!0,link:"/support"}],p=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true",link:"/bus"},{title:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true",link:"/holidays"}],g=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners",link:"https://agency.cleartrip.com"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly",link:"https://ooo.cleartrip.com/",ravenActionName:"ooo"},{title:"MICE",subtitle:"For corporate events",details:"An end-to-end management solution for all your corporate events",link:"https://business.cleartrip.com/"},{title:"API",subtitle:"For developers",details:"Unlock seamless integration and scale with our powerful, reliable APIs",link:"https://business.cleartrip.com/api-customers/more-details"}];exports.RAVEN_PAGE_NAMES=void 0,(e=exports.RAVEN_PAGE_NAMES||(exports.RAVEN_PAGE_NAMES={})).UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotel_home",e.FLIGHTS_HOME="flights_home",function(e){e.DESKTOP="desktop"}(n||(n={}));var h={NOVAC:{headerBackground:"transparent",hoverColor:"#FDBA12",logoFill:"#FFF",fkcompanyColor:"#FFF",typographyColor:"#FFF",loginButtonColorVariant:s.ButtonColor.NEUTRAL},DEFAULT:{headerBackground:"#FFFFFF",hoverColor:"#FF4F17",logoFill:"#FF4F17",fkcompanyColor:"#1A1A1A",typographyColor:"#1A1A1A",loginButtonColorVariant:s.ButtonColor.PRIMARY}},x=t.createContext(void 0),f=function(){var e=t.useContext(x);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},m=function(e){var n=e.value,t=e.children;return r.jsx(x.Provider,i.__assign({value:n},{children:t}))},v=function(){var e=f().selectedLOB;return r.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",background:"#F7FAFF",top:"64px",zIndex:2,css:{gap:24}},{children:p.map((function(n,t){var s=n.title,c=n.link,l=n.image,d=e===s;return r.jsx("a",i.__assign({href:d?void 0:c,style:{textDecoration:"none",pointerEvents:d?"none":"auto"}},{children:r.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",width:"116px",height:"48px",justifyContent:"center",cursor:"pointer",css:{gap:8,background:d?"#FFFFFF":"transparent",borderRadius:"40px",padding:"8px 16px 8px 8px",transition:"background 0.2s ease"}},{children:[r.jsx("img",{src:l,alt:s,width:32,height:32}),r.jsx(a.Typography,i.__assign({variant:d?a.TypographyVariant.HM3:a.TypographyVariant.B1,isClickable:!0},{children:s}))]}),t)}))}))}))};function y(e){var n=e.children,a=e.onMaskClick,s=e.show,c=e.marginTop,l=e.handleDropdownMouseEnter,d=e.handleDropdownMouseLeave;t.useEffect((function(){return s&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[s]);var u=function(e,n){var i=t.useState(e),r=i[0],o=i[1],a=t.useRef();return t.useEffect((function(){return e?o(e):a.current=setTimeout((function(){o(!1)}),n),function(){(null==a?void 0:a.current)&&clearTimeout(a.current)}}),[e]),r}(s,300),p=function(e,n){var i=t.useState(!1),r=i[0],o=i[1],a=t.useRef();return t.useEffect((function(){return e&&!r?setTimeout((function(){o(!0)}),0):!e&&r&&(a.current=setTimeout((function(){return o(!1)}),n)),function(){a&&a.current&&clearTimeout(a.current)}}),[n,e]),r}(s,100),g=p;return r.jsxs(r.Fragment,{children:[u&&r.jsx(o.Container,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:g?.4:0,width:"100%",height:"100vh",left:0,top:c||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),u&&r.jsx(o.Container,i.__assign({onMouseEnter:l,onMouseLeave:d},{children:n}))]})}var _,C,b,k=function(e){var n=void 0===e?{}:e,i=n.closeDelay,r=void 0===i?0:i,o=n.openDelay,a=void 0===o?500:o,s=Math.max(r,150),c=t.useState(!1),l=c[0],d=c[1],u=t.useState(null),p=u[0],g=u[1],h=t.useRef(null),x=t.useRef(null),f=t.useRef(!1),m=t.useCallback((function(e){h.current&&clearTimeout(h.current),x.current&&clearTimeout(x.current),f.current=!1,x.current=setTimeout((function(){d(!0),f.current||g(e)}),a)}),[a]),v=t.useCallback((function(){f.current=!0,h.current=setTimeout((function(){d(!1),g(null)}),s)}),[s]),y=t.useCallback((function(){h.current&&clearTimeout(h.current)}),[]),_=t.useCallback((function(){f.current=!0,(null==h?void 0:h.current)&&clearTimeout(h.current),h.current=setTimeout((function(){d(!1),g(null)}),s)}),[]);return t.useEffect((function(){var e=function(e){e.clientY<=0&&(d(!1),g(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:l,hoveredElemIndex:p,handleOnMouseEnter:m,handleOnMouseLeave:v,handleDropdownMouseEnter:y,handleDropdownMouseLeave:_}},w=function(e){var n=t.useRef(null);return t.useEffect((function(){e?function(){if(n.current){var e=n.current.scrollHeight;n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",requestAnimationFrame((function(){n.current&&(n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e,"px"),n.current.style.opacity="1")}))}}():function(){if(n.current){var e=n.current.scrollHeight;n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",setTimeout((function(){n.current&&(n.current.style.maxHeight="0px")}),300)}}()}),[e]),{containerRef:n}},j=function(e){var n=Object.keys(e),i=[];return n.forEach((function(n){i.includes(n)?e[n]=Number(e[n]):e[n]=""+e[n]})),e},F=function(e){return"undefined"!=typeof window&&window?new URLSearchParams(window.location.search).get(e):""},E=function(e){switch(e){case"FkVip":return"fk_vip";case"FkPremium":return"fk_plus_premium";case"InsiderIcon":return"myntra_insidericon";case"InsiderElite":return"myntra_insiderelite";default:return""}},L=function(e,r,t,o,a,s){var c;if("function"==typeof a){var l={page_name:s,platform:n.DESKTOP,login_status:e?"yes":"no",domain:null===(c=null===window||void 0===window?void 0:window.location)||void 0===c?void 0:c.host},d=j(t),u=j(o),p=i.__assign(i.__assign(i.__assign({},l),d),u);try{1===a.length?a({eventName:r,eventData:p}):a(r,p)}catch(e){return void console.error(e)}}else console.error("ravenPushCallback is not provided or is not a function")},T=function(e){var n=e.isOpen,s=f(),c=s.isUserLoggedIn,l=s.ravenPushCallback,d=s.ravenPageName,u=s.ravenEventName,p=s.loyaltyType,h=s.ravenPayload,x=void 0===h?{}:h,m=t.useState(0),v=m[0],y=m[1],_=w(n).containerRef;t.useEffect((function(){var e=function(){if(_.current){var e=(window.innerWidth-(_.current.offsetWidth||0))/2;e!==v&&y(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[_,v]);var C=t.useCallback((function(e,n,i){var r,t=null!==(r=F("utm_source"))&&void 0!==r?r:"organic",o={action_name:i?"".concat(i,"_business_click"):n?"".concat(n.toLowerCase(),"_business_click"):"",action_type:"click",u_utm_source:t,loyalty_type:E(p)};e&&(L(c,u,o,x,l,d),window.location.href=e)}),[c,u,x,l,d,p]);return r.jsxs(o.Container,i.__assign({ref:_,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(v,"px"),borderRadius:24,boxShadow:"0px 8px 24px 0px rgba(26, 26, 26, 0.10)",width:"fit-content",zIndex:1002,css:{overflow:"hidden",opacity:0}},{children:[r.jsx(o.Container,i.__assign({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:r.jsx(a.Typography,i.__assign({variant:"HM2"},{children:"Other business services"}))})),r.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:g.map((function(e){var n=e.title,t=e.subtitle,s=e.details,c=e.link,l=e.ravenActionName;return r.jsxs(o.Container,i.__assign({cursor:"pointer",display:"flex",flexDirection:"column",width:"200px",rowGap:"11px",className:"bd-hover-container",onClick:function(){return C(c,n,l)}},{children:[r.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"column",rowGap:"4px"},{children:[r.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[r.jsx(a.Typography,i.__assign({variant:"HM2",className:"color-orange-on-hover"},{children:n})),r.jsx(I,{})]})),r.jsx(a.Typography,i.__assign({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:t}))]})),r.jsx(a.Typography,i.__assign({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:s}))]}),n)}))}))]}))},I=function(){return r.jsx(o.Container,i.__assign({className:"bd-arrow-container"},{children:i.__spreadArray([],Array(3),!0).map((function(e,n){return r.jsx(o.Container,i.__assign({className:"bd-arrow-wrapper"},{children:r.jsx(l.ArrowRight,{})}),n)}))}))},A=[{text:"My Profile",icon:r.jsx(l.MyAccount,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:r.jsx(l.MyTrips,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:r.jsx(l.SavedCard,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:r.jsx(l.Travellers,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:r.jsx(l.HiFive,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:r.jsx(l.Wallet,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:r.jsx(l.SettingsCog,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:r.jsx(l.PrivacyRights,{}),redirectionLink:"accounts/personal-data-dashboard"}],M="Logout",N="My Account",D="You are logged in with",S="header-acc-btn",P="account-options",B=function(e){var n=e.icon,a=e.borderGradient,s=e.backgroundGradient,c=e.handleChipClick,d=e.chevronFillColor,u=f(),p=u.loyaltyType,g=u.isUserLoggedIn,h=u.ravenPushCallback,x=u.ravenPageName,m=u.ravenPayload,v=void 0===m?{}:m,y=u.ravenEventName,_=t.useState(!1),C=_[0],b=_[1],k=t.useCallback((function(){var e;if(c)c();else{var n={action_name:"loyalty_account_click",action_type:"click",u_utm_source:null!==(e=F("utm_source"))&&void 0!==e?e:"organic",loyaltyType:E(p)};L(g,y,n,v,h,x),window.location.href="/all-offers/loyalty-october"}}),[c,p,g,y,v,h,x]);return r.jsxs(o.Container,i.__assign({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:C?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)},onClick:k},{children:[r.jsx(o.Container,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:s,zIndex:-2}}),r.jsx(o.Container,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:a,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),r.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",position:"relative"},{children:n})),r.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:C?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:C?.5:0}},{children:r.jsx(l.HeaderChevronRight,{color:d})}))]}))};exports.LOBS_VALUES=void 0,(_=exports.LOBS_VALUES||(exports.LOBS_VALUES={})).FLIGHTS="Flights",_.HOTELS="Hotels",_.BUSES="Buses",_.TRAINS="Trains",_.PACKAGES="Packages",exports.LoyaltyType=void 0,(C=exports.LoyaltyType||(exports.LoyaltyType={})).FkVip="FkVip",C.FkPremium="FkPremium",C.InsiderIcon="InsiderIcon",C.InsiderElite="InsiderElite",C.CtLoyalty="CtLoyalty";var R=((b={})[exports.LoyaltyType.FkVip]={icon:r.jsx(l.FkVip,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},b[exports.LoyaltyType.FkPremium]={icon:r.jsx(l.FkPremium,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},b[exports.LoyaltyType.InsiderIcon]={icon:r.jsx(l.InsiderIcon,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},b[exports.LoyaltyType.InsiderElite]={icon:r.jsx(l.InsiderElite,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},b[exports.LoyaltyType.CtLoyalty]={icon:r.jsx(l.CtLoyalty,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(110.82deg, #FFF9EC 0%, #FEE3A8 100%)",chevronFillColor:"#1A1A1A"},b),H=function(e){var n=e.icon,s=e.handleChipClick,c=e.value,d=e.type,u=f(),p=u.loyaltyType,g=u.isUserLoggedIn,h=u.ravenPushCallback,x=u.ravenPageName,m=u.ravenEventName,v=u.ravenPayload,y=void 0===v?{}:v,_=t.useState(!1),C=_[0],b=_[1],k=t.useCallback((function(){var e;if(s)s();else{var n=null!==(e=F("utm_source"))&&void 0!==e?e:"organic",i={action_name:"".concat(d,"_account_click"),action_type:"click",u_utm_source:n,loyaltyType:E(p)};L(g,m,i,y,h,x);var r={supercoin:"/all-offers/supercoins/",wallet:"/accounts/wallet"};r[d]&&(window.location.href=r[d])}}),[s,d,p,g,m,y,h,x]);return r.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",css:{height:32,paddingLeft:8,paddingRight:C?4:8,transition:"padding-right 0.2s ease-in-out",background:C?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)},onClick:k},{children:[r.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[n,r.jsx(a.Typography,i.__assign({variant:"B3",isClickable:!0},{children:c}))]})),r.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:C?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:C?1:0}},{children:r.jsx(l.HeaderChevronRight,{})}))]}))},G=function(){var e,n=f(),t=n.loyaltyType,a=n.fkSupercoinBurnBalance,s=void 0===a?0:a,c=n.walletBalance,u=void 0===c?0:c,p=n.loyaltyLoading,g=n.superCoinsLoading,h=n.walletLoading,x=n.walletChipClick,m=n.supercoinsChipClick,v=n.loyaltyChipClick,y=n.hideWalletChip,_=n.hideSupercoinsChip,C=n.hideLoyaltyChip;return p||t&&R[t]&&!C||(g||!_)||(h||!y)?r.jsxs(o.Container,i.__assign({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[p?r.jsx(d.Shimmer,{width:"50px",height:"32px",borderRadius:"8px"}):t&&R[t]&&!C&&r.jsx(B,{icon:R[t].icon,borderGradient:R[t].borderGradient,backgroundGradient:R[t].backgroundGradient,chevronFillColor:(null===(e=R[t])||void 0===e?void 0:e.chevronFillColor)||"#FFF",handleChipClick:v}),g?r.jsx(d.Shimmer,{width:"50px",height:"32px",borderRadius:"8px"}):!_&&r.jsx(H,{icon:r.jsx(l.Supercoin,{width:20,height:20}),value:s,handleChipClick:m,type:"supercoin"}),h?r.jsx(d.Shimmer,{width:"50px",height:"32px",borderRadius:"8px"}):!y&&r.jsx(H,{icon:r.jsx(l.Wallet,{width:20,height:20}),value:u,handleChipClick:x,type:"wallet"})]})):null},O=function(e){var n=e.isOpen,s=f(),u=s.handleLogoutClick,p=s.userName,g=s.userMobileNumber,h=s.countryCode,x=s.userDetailsLoading,m=s.loyaltyType,v=s.isUserLoggedIn,y=s.ravenEventName,_=s.ravenPageName,C=s.ravenPayload,b=void 0===C?{}:C,k=s.ravenPushCallback,j=w(n).containerRef,T=t.useMemo((function(){return{userGreeting:p?"Hello ".concat(p,"!"):"",phoneNumber:h&&g?"".concat(h," ").concat(g):""}}),[p,g,h]),I=T.userGreeting,N=T.phoneNumber,B=function(e){var n;return{action_name:e.toLowerCase().replace(/[\s-]/g,"")+"_account_click",action_type:"click",u_utm_source:null!==(n=F("utm_source"))&&void 0!==n?n:"organic",loyalty_type:E(m)}},R=t.useCallback((function(e,n){L(v,y,B(e),b,k,_),window.location.href=n}),[v,y,b,k,_]);t.useCallback((function(){L(v,y,B(M),b,k,_),u()}),[v,y,b,k,_,u]);var H=t.useCallback((function(){var e=document.getElementById(S),n=document.getElementById(P);if(e&&n){var i=e.getBoundingClientRect().right;n.style.left="".concat(i-328,"px")}}),[]);t.useEffect((function(){H()}),[H]);var O;return r.jsxs(o.Container,i.__assign({id:P,ref:j,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[r.jsx(o.Container,i.__assign({padding:"16px",height:"76px"},{children:(O=function(e,n,t,o){return r.jsx(a.Typography,i.__assign({variant:t,color:o},{children:e?r.jsx(d.Shimmer,{height:"HM3"===t?"18px":"12px",width:"HM3"===t?"140px":"200px"}):n}))},r.jsx(o.Container,i.__assign({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:I?r.jsxs(r.Fragment,{children:[O(x,I,"HM3","primary"),O(x,"".concat(D," ").concat(N),"P3","subheading")]}):r.jsxs(r.Fragment,{children:[O(x,D,"P3","subheading"),O(x,N,"HM3","primary")]})})))})),r.jsx(G,{}),r.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",css:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[A.map((function(e){var n=e.text,t=e.icon,s=e.redirectionLink;return r.jsx(o.Container,i.__assign({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:function(){return R(n,s)}},{children:r.jsxs(o.Container,i.__assign({display:"flex",cursor:"pointer",css:{columnGap:"8px"}},{children:[t,r.jsx(a.Typography,i.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:n}))]}))}),"account-option-".concat(n))})),r.jsx(c.Divider,{css:{borderBottom:"1px dashed #E6E6E6"}}),r.jsxs(o.Container,i.__assign({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:u},{children:[r.jsx(l.Signout,{height:24,width:24}),r.jsx(a.Typography,i.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:M}))]}))]}))]}))},V=function(){var e=f(),n=e.isNovacThemeEnabled,s=e.ravenEventName,c=e.ravenPayload,d=void 0===c?{}:c,u=e.ravenPushCallback,p=e.isUserLoggedIn,g=e.loyaltyType,x=e.ravenPageName,m=k({openDelay:0}),v=m.isDropdownVisible,_=m.handleOnMouseEnter,C=m.handleOnMouseLeave,b=m.handleDropdownMouseEnter,w=m.handleDropdownMouseLeave,j=t.useState(!1),T=j[0],I=j[1];t.useEffect((function(){var e=function(){I(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var A=n&&!T?h.NOVAC:h.DEFAULT,M=A.hoverColor,D=A.typographyColor,P=t.useCallback((function(){var e,n=null!==(e=F("utm_source"))&&void 0!==e?e:"organic",i={action_name:"".concat(N.toLowerCase().replace(/[\s-]/g,""),"_header_hover"),action_type:"hover",u_utm_source:n,loyalty_type:E(g)};L(p,s,i,d,u,x)}),[p,s,d,u,x,g]);return r.jsxs(o.Container,{children:[r.jsxs(o.Container,i.__assign({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",css:{columnGap:8,height:64},onMouseEnter:function(){_(0),P()},onMouseLeave:C,id:S},{children:[r.jsx(l.MyAccount,{color:v?M:D}),r.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[r.jsx(a.Typography,i.__assign({variant:"B2",css:{cursor:"pointer"},colorCode:v?M:D},{children:N})),r.jsx(l.ChevronDown,{width:20,height:20,fill:v?M:D})]}))]})),r.jsx(y,i.__assign({show:v,marginTop:"64px",handleDropdownMouseEnter:b,handleDropdownMouseLeave:w,onMaskClick:w},{children:r.jsx(O,{isOpen:v})}))]})},U=function(){var e,n=f(),d=n.onLoginButtonClick,p=n.showAllLobs,g=void 0!==p&&p,x=n.isUserLoggedIn,m=n.loyaltyType,_=n.isNovacThemeEnabled,C=void 0!==_&&_,b=n.ravenPayload,w=void 0===b?{}:b,j=n.ravenPushCallback,I=n.ravenPageName,A=n.ravenEventName,M=t.useState(!1),N=M[0],D=M[1];t.useEffect((function(){var e=function(){D(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var S=C&&!N?h.NOVAC:h.DEFAULT,P=S.headerBackground,B=S.logoFill,R=S.hoverColor,H=S.fkcompanyColor,G=S.typographyColor,O=k({openDelay:0}),U=O.isDropdownVisible,W=O.hoveredElemIndex,q=O.handleOnMouseEnter,z=O.handleOnMouseLeave,Y=O.handleDropdownMouseEnter,K=O.handleDropdownMouseLeave,J=null!==(e=F("utm_source"))&&void 0!==e?e:"organic",Q=t.useCallback((function(e,n){return{action_name:e,action_type:n,u_utm_source:J,loyalty_type:E(m)}}),[J,m]),X=t.useCallback((function(e){if(e.isClickable&&e.link){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_click"),i=Q(n,"click");L(x,A,i,w,j,I),window.location.href=e.link}}),[Q,x,A,w,j,I]),Z=t.useCallback((function(){var e=Q("home_header_click","click");L(x,A,e,w,j,I),window.location.href="/"}),[Q,x,A,w,j,I]),$=t.useCallback((function(e){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_hover"),i=Q(n,"hover");L(x,A,i,w,j,I)}),[Q,x,A,w,j,I]);return r.jsxs(r.Fragment,{children:[r.jsx(o.Container,i.__assign({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:P,css:{gap:"24px",flexShrink:0,borderBottom:"transparent"===P?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:r.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,css:{gap:"24px",maxWidth:1440}},{children:[r.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:Z},{children:[r.jsx(l.CTLogo,{fillColor:B}),r.jsx(c.Divider,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),r.jsx(l.Fkcompany,{color:H})]})),r.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[r.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:u.map((function(e,n){var t=e.text,s=e.lefticon,c=e.rightIcon,l=e.isHoverable,d=W===n;return r.jsxs(o.Container,{children:[r.jsxs(o.Container,i.__assign({onMouseEnter:function(){q(n),e.isHoverable&&$(e)},onMouseLeave:z,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){return X(e)}},{children:[r.jsx(s,{color:d?R:G}),r.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[r.jsx(a.Typography,i.__assign({variant:"B2",colorCode:d?R:G,isClickable:!0},{children:t})),c&&r.jsx(c,{width:20,height:20,fill:d?R:G})]}))]}),"nav-option-".concat(n)),r.jsx(y,i.__assign({show:W===n&&l&&U,marginTop:"64px",handleDropdownMouseEnter:Y,handleDropdownMouseLeave:K,onMaskClick:K},{children:r.jsx(T,{isOpen:W===n&&l&&U})}))]})}))})),x&&r.jsx(c.Divider,{css:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),r.jsx(o.Container,{children:x?r.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:r.jsx(V,{})})):r.jsx(s.Button,i.__assign({className:"".concat("transparent"===P?"novac-login-button":"login-button"),onClick:d,css:{width:153,height:40,border:"transparent"===P?"1px solid #FFFFFF !important":"1px solid #1A1A1A !important"},loading:!1},{children:r.jsx(a.Typography,i.__assign({componentNode:"span",variant:"L2",color:"transparent"===P?"neutral":"primary"},{children:"Log in"}))}))})]}))]}))})),g&&r.jsx(v,{})]})};exports.Header=function(e){return r.jsx(m,i.__assign({value:e},{children:r.jsx(U,{})}))};
|
|
1
|
+
"use strict";var e,n,i=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),o=require("@cleartrip/ct-design-container"),a=require("@cleartrip/ct-design-typography"),s=require("@cleartrip/ct-design-button"),l=require("@cleartrip/ct-design-divider"),c=require("@cleartrip/ct-design-icons"),d=[{lefticon:c.Offers,text:"Offers",isHoverable:!1,isClickable:!0,link:"all-offers/?categories=flights"},{lefticon:c.BusinessBag,text:"Business",rightIcon:c.ChevronDown,isHoverable:!0},{lefticon:c.MyTrips,text:"My Trips",isHoverable:!1,isClickable:!0,link:"/account/trips"},{lefticon:c.SupportIcon,text:"Support",isHoverable:!1,isClickable:!0,link:"/support"}],u=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/flight_uhp.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/hotel_uhp.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/bus_uhp.png?cache=true",link:"/bus"},{title:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/train_uhp.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/holiday_uhp.png?cache=true",link:"/holidays"}],p=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly"},{title:"MICE",subtitle:"For corporate events",details:"An end-to-end management solution for all your corporate events",link:"https://business.cleartrip.com/"},{title:"API",subtitle:"For developers",details:"Unlock seamless integration and scale with our powerful, reliable APIs",link:"https://business.cleartrip.com/api-customers/more-details"}];!function(e){e.UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotels_homepage",e.FLIGHTS_HOME="flights_homepage"}(e||(e={})),function(e){e.DESKTOP="desktop"}(n||(n={}));var h=r.createContext(void 0),g=function(){var e=r.useContext(h);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},x=function(e){var n=e.value,r=e.children;return t.jsx(h.Provider,i.__assign({value:n},{children:r}))},f=function(){var e=g().selectedLOB;return t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",height:"64",background:"#F3F5FA",top:"64px",zIndex:2,css:{gap:40}},{children:u.map((function(n,r){return t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",cursor:"pointer",css:{gap:8,background:e===n.title?"#FFFFFF":"transparent",borderRadius:e===n.title?"40px":"0",padding:e===n.title?"8px 16px 8px 8px":"0"},onClick:function(){window.location.href=n.link}},{children:[t.jsx("img",{src:n.image,alt:n.title,width:32,height:32}),t.jsx(a.Typography,i.__assign({variant:"P1",style:{fontWeight:e===n.title?600:500},isClickable:!0},{children:n.title}))]}),r)}))}))};function m(e){var n=e.children,a=e.onMaskClick,s=e.show,l=e.marginTop,c=e.handleDropdownMouseEnter,d=e.handleDropdownMouseLeave;r.useEffect((function(){return s&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[s]);var u=function(e,n){var i=r.useState(e),t=i[0],o=i[1],a=r.useRef();return r.useEffect((function(){return e?o(e):a.current=setTimeout((function(){o(!1)}),n),function(){(null==a?void 0:a.current)&&clearTimeout(a.current)}}),[e]),t}(s,300),p=function(e,n){var i=r.useState(!1),t=i[0],o=i[1],a=r.useRef();return r.useEffect((function(){return e&&!t?setTimeout((function(){o(!0)}),0):!e&&t&&(a.current=setTimeout((function(){return o(!1)}),n)),function(){a&&a.current&&clearTimeout(a.current)}}),[n,e]),t}(s,100),h=p;return t.jsxs(t.Fragment,{children:[u&&t.jsx(o.Container,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:h?.4:0,width:"100%",height:"100vh",left:0,top:l||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),u&&t.jsx(o.Container,i.__assign({onMouseEnter:c,onMouseLeave:d},{children:n}))]})}var y,v,C,_=function(e){var n=void 0===e?{}:e,i=n.closeDelay,t=void 0===i?0:i,o=n.openDelay,a=void 0===o?500:o,s=Math.max(t,150),l=r.useState(!1),c=l[0],d=l[1],u=r.useState(null),p=u[0],h=u[1],g=r.useRef(null),x=r.useRef(null),f=r.useRef(!1),m=r.useCallback((function(e){g.current&&clearTimeout(g.current),x.current&&clearTimeout(x.current),f.current=!1,x.current=setTimeout((function(){d(!0),f.current||h(e)}),a)}),[a]),y=r.useCallback((function(){f.current=!0,g.current=setTimeout((function(){d(!1),h(null)}),s)}),[s]),v=r.useCallback((function(){g.current&&clearTimeout(g.current)}),[]),C=r.useCallback((function(){f.current=!0,(null==g?void 0:g.current)&&clearTimeout(g.current),g.current=setTimeout((function(){d(!1),h(null)}),s)}),[]);return r.useEffect((function(){var e=function(e){e.clientY<=0&&(d(!1),h(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:c,hoveredElemIndex:p,handleOnMouseEnter:m,handleOnMouseLeave:y,handleDropdownMouseEnter:v,handleDropdownMouseLeave:C}},w=function(e){var n=r.useRef(null);return r.useEffect((function(){e?function(){if(n.current){var e=n.current.scrollHeight;n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",requestAnimationFrame((function(){n.current&&(n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e,"px"),n.current.style.opacity="1")}))}}():function(){if(n.current){var e=n.current.scrollHeight;n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",setTimeout((function(){n.current&&(n.current.style.maxHeight="0px")}),300)}}()}),[e]),{containerRef:n}},b=function(e){var n=e.isOpen,s=r.useState(0),l=s[0],c=s[1],d=w(n).containerRef;return r.useEffect((function(){var e=function(){if(d.current){var e=(window.innerWidth-(d.current.offsetWidth||0))/2;e!==l&&c(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[d,l]),t.jsxs(o.Container,i.__assign({ref:d,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(l,"px"),borderRadius:24,boxShadow:"0px 8px 24px 0px rgba(26, 26, 26, 0.10)",width:"fit-content",zIndex:1002,css:{overflow:"hidden",opacity:0}},{children:[t.jsx(o.Container,i.__assign({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:t.jsx(a.Typography,i.__assign({variant:"HM2",css:{lineHeight:"24px"}},{children:"Other business services"}))})),t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:p.map((function(e){var n=e.title,r=e.subtitle,s=e.details;return t.jsxs(o.Container,i.__assign({cursor:"pointer",width:"200px",className:"bd-hover-container"},{children:[t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[t.jsx(a.Typography,i.__assign({variant:"HM2",className:"color-orange-on-hover"},{children:n})),t.jsx(F,{})]})),t.jsx(a.Typography,i.__assign({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:r})),t.jsx(a.Typography,i.__assign({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:s}))]}),n)}))}))]}))},F=function(){return t.jsx(o.Container,i.__assign({className:"bd-arrow-container"},{children:i.__spreadArray([],Array(3),!0).map((function(e,n){return t.jsx(o.Container,i.__assign({className:"bd-arrow-wrapper"},{children:t.jsx(c.ArrowRight,{})}),n)}))}))},j=[{text:"My Profile",icon:t.jsx(c.MyAccount,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:t.jsx(c.MyTrips,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:t.jsx(c.SavedCard,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:t.jsx(c.Travellers,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:t.jsx(c.HiFive,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:t.jsx(c.Wallet,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:t.jsx(c.SettingsCog,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:t.jsx(c.PrivacyRights,{}),redirectionLink:"accounts/personal-data-dashboard"}],k="You are logged in with",L="header-acc-btn",E="account-options",I=function(e){var n=e.icon,a=e.borderGradient,s=e.backgroundGradient,l=e.handleChipClick,d=e.chevronFillColor,u=r.useState(!1),p=u[0],h=u[1];return t.jsxs(o.Container,i.__assign({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:p?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onClick:function(){window.location.href="/",l&&l()}},{children:[t.jsx(o.Container,{style:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:s,zIndex:-2}}),t.jsx(o.Container,{style:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:a,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",position:"relative"},{children:n})),t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:p?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:p?.5:0}},{children:t.jsx(c.HeaderChevronRight,{color:d})}))]}))};exports.LOBS_VALUES=void 0,(y=exports.LOBS_VALUES||(exports.LOBS_VALUES={})).FLIGHTS="Flights",y.HOTELS="Hotels",y.BUSES="Buses",y.TRAINS="Trains",y.PACKAGES="Packages",exports.LoyaltyType=void 0,(v=exports.LoyaltyType||(exports.LoyaltyType={})).FkVip="FkVip",v.FkPremium="FkPremium",v.InsiderIcon="InsiderIcon",v.InsiderElite="InsiderElite",v.CtLoyalty="CtLoyalty";var T=((C={})[exports.LoyaltyType.FkVip]={icon:t.jsx(c.FkVip,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.FkPremium]={icon:t.jsx(c.FkPremium,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.InsiderIcon]={icon:t.jsx(c.InsiderIcon,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.InsiderElite]={icon:t.jsx(c.InsiderElite,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.CtLoyalty]={icon:t.jsx(c.CtLoyalty,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(110.82deg, #FFF9EC 0%, #FEE3A8 100%)",chevronFillColor:"#1A1A1A"},C),M=function(e){var n=e.icon,s=e.handleChipClick,l=e.value,d=e.type,u=r.useState(!1),p=u[0],h=u[1];return t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",style:{height:32,paddingLeft:8,paddingRight:p?4:8,transition:"padding-right 0.2s ease-in-out",background:p?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onClick:function(){"supercoins"===d?window.location.href="/supercoins":"wallet"===d&&(window.location.href="/wallet"),s&&s()}},{children:[t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[n,t.jsx(a.Typography,i.__assign({variant:"B3",isClickable:!0},{children:l}))]})),t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:p?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:p?1:0}},{children:t.jsx(c.HeaderChevronRight,{})}))]}))},A=function(){var e,n=g(),r=n.loyaltyType,a=n.fkSupercoinBurnBalance,s=void 0===a?0:a,l=n.walletBalance,d=void 0===l?0:l,u=n.loyaltyLoading,p=n.superCoinsLoading,h=n.walletLoading,x=n.walletChipClick,f=n.supercoinsChipClick,m=n.loyaltyChipClick,y=n.hideWalletChip,v=n.hideSupercoinsChip,C=n.hideLoyaltyChip;return t.jsxs(o.Container,i.__assign({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[u?t.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):r&&T[r]&&!C&&t.jsx(I,{icon:T[r].icon,borderGradient:T[r].borderGradient,backgroundGradient:T[r].backgroundGradient,chevronFillColor:(null===(e=T[r])||void 0===e?void 0:e.chevronFillColor)||"#FFF",handleChipClick:m}),p?t.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!v&&t.jsx(M,{icon:t.jsx(c.Supercoin,{width:20,height:20}),value:s,handleChipClick:f,type:"supercoins"}),h?t.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!y&&t.jsx(M,{icon:t.jsx(c.Wallet,{width:20,height:20}),value:d,handleChipClick:x,type:"wallet"})]}))},D=function(e){var n=e.isOpen,s=g(),d=s.handleLogoutClick,u=s.userName,p=s.userMobileNumber,h=s.countryCode,x=s.userDetailsLoading,f=w(n).containerRef,m=r.useMemo((function(){return{userGreeting:u&&"Hello ".concat(u,"!"),phoneNumber:h&&p?"".concat(h," ").concat(p):""}}),[u,p,h]),y=m.userGreeting,v=m.phoneNumber;r.useEffect((function(){var e,n=document.getElementById(L),i=document.getElementById(E);e=null==n?void 0:n.getBoundingClientRect().right,i&&e&&(i.style.left="".concat(e-328,"px"))}),[]);var C;return t.jsxs(o.Container,i.__assign({id:E,ref:f,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[t.jsx(o.Container,i.__assign({padding:"16px",height:"72px"},{children:(C=function(e,n,r,s){return t.jsx(a.Typography,i.__assign({variant:r,color:s},{children:e?t.jsx(o.Container,{height:"HM3"===r?"18px":"12px",width:"HM3"===r?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):n}))},t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:y?t.jsxs(t.Fragment,{children:[C(x,y,"HM3","primary"),C(x,"".concat(k," ").concat(v),"P3","subheading")]}):t.jsxs(t.Fragment,{children:[C(x,k,"P3","subheading"),C(x,v,"HM3","primary")]})})))})),t.jsx(A,{}),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",style:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[j.map((function(e){var n,r=e.text,s=e.icon,l=e.redirectionLink;return t.jsx(o.Container,i.__assign({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:(n=l,function(){window.location.href=n})},{children:t.jsxs(o.Container,i.__assign({display:"flex",cursor:"pointer",style:{columnGap:"8px"}},{children:[s,t.jsx(a.Typography,i.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:r}))]}))}),"account-option-".concat(r))})),t.jsx(l.Divider,{style:{borderBottom:"1px dashed #E6E6E6"}}),t.jsxs(o.Container,i.__assign({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:d},{children:[t.jsx(c.Signout,{height:24,width:24}),t.jsx(a.Typography,i.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:"Logout"}))]}))]}))]}))},S=function(){var e=g().isNovacThemeEnabled,n=_({openDelay:0}),s=n.isDropdownVisible,l=n.handleOnMouseEnter,d=n.handleOnMouseLeave,u=n.handleDropdownMouseEnter,p=n.handleDropdownMouseLeave,h=r.useState(!1),x=h[0],f=h[1];r.useEffect((function(){var e=function(){f(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var y=e&&!x,v=y?"#FFB8A5":"#FF4F17";return t.jsxs(o.Container,{children:[t.jsxs(o.Container,i.__assign({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",style:{columnGap:8,height:64},onMouseEnter:function(){return l(0)},onMouseLeave:d,id:L},{children:[t.jsx(c.MyAccount,{color:s?v:y?"#FFF":"#1A1A1A"}),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[t.jsx(a.Typography,i.__assign({variant:"B2",css:{cursor:"pointer"},colorCode:s?v:y?"#FFF":"#1A1A1A"},{children:"My Account"})),t.jsx(c.ChevronDown,{width:20,height:20,fill:s?v:y?"#FFF":"#1A1A1A"})]}))]})),t.jsx(m,i.__assign({show:s,marginTop:"64px",handleDropdownMouseEnter:u,handleDropdownMouseLeave:p,onMaskClick:p},{children:t.jsx(D,{isOpen:s})}))]})},H=function(){var e=g(),n=e.onLoginButtonClick,u=e.showAllLobs,p=void 0!==u&&u,h=e.isUserLoggedIn;e.loyaltyType;var x=e.isNovacThemeEnabled,y=void 0!==x&&x;e.ravenPayload,e.ravenPushCallback,e.ravenPageName,e.ravenEventName;var v=r.useState(!1),C=v[0],w=v[1];r.useEffect((function(){var e=function(){w(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var F=y&&!C,j=F?"transparent":"#F7FAFF",k=F?"#FFB8A5":"#FF4F17",L=_({openDelay:0}),E=L.isDropdownVisible,I=L.hoveredElemIndex,T=L.handleOnMouseEnter,M=L.handleOnMouseLeave,A=L.handleDropdownMouseEnter,D=L.handleDropdownMouseLeave;return t.jsxs(t.Fragment,{children:[t.jsx(o.Container,i.__assign({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:j,css:{gap:"24px",flexShrink:0,borderBottom:F?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,style:{gap:"24px",maxWidth:1440}},{children:[t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",paddingLeft:"16px",onClick:function(){window.location.href="/"}},{children:[t.jsx(c.CTLogo,{fillColor:F?"#FFF":"#FF4F17"}),t.jsx(l.Divider,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),t.jsx(c.Fkcompany,{color:F?"#FFF":"#1A1A1A"})]})),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:d.map((function(e,n){var r=I===n;return t.jsxs(o.Container,{children:[t.jsxs(o.Container,i.__assign({onMouseEnter:function(){return T(n)},onMouseLeave:M,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){e.link&&e.isClickable&&(window.location.href=e.link)}},{children:[t.jsx(e.lefticon,{color:r?k:F?"#FFF":"#1A1A1A"}),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[t.jsx(a.Typography,i.__assign({variant:"B2",colorCode:r?k:F?"#FFF":"#1A1A1A",isClickable:!0},{children:e.text})),e.rightIcon&&t.jsx(e.rightIcon,{width:20,height:20,fill:r?k:F?"#FFF":"#1A1A1A"})]}))]}),"nav-option-".concat(n)),t.jsx(m,i.__assign({show:I===n&&e.isHoverable&&E,marginTop:"64px",handleDropdownMouseEnter:A,handleDropdownMouseLeave:D,onMaskClick:D},{children:t.jsx(b,{isOpen:I===n&&e.isHoverable&&E})}))]})}))})),h&&t.jsx(l.Divider,{style:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),t.jsx(o.Container,{children:h?t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:t.jsx(S,{})})):t.jsx(s.Button,i.__assign({className:"fw-400 fs-14 ".concat(F?"novac-login-button":"login-button"),onClick:n,style:{width:153,height:40,border:F?"1px solid #FFF":"1px solid #1A1A1A"},loading:!1},{children:t.jsx(a.Typography,i.__assign({componentNode:"span",variant:"L2",color:F?"neutral":"primary"},{children:"Login"}))}))})]}))]}))})),p&&t.jsx(f,{})]})};exports.Header=function(e){return t.jsx(x,i.__assign({value:e},{children:t.jsx(H,{})}))};
|
|
2
2
|
//# sourceMappingURL=ct-design-header.browser.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-design-header.browser.cjs.js","sources":["../packages/components/Header/src/constants.ts","../packages/components/Header/src/context/HeaderProvider.tsx","../packages/components/Header/src/LobsHeader/index.tsx","../packages/components/Header/src/HeaderAnimatedMask /index.tsx","../packages/components/Header/src/HeaderAnimatedMask /hooks.ts","../packages/components/Header/src/hooks/useHoverDropdown.tsx","../packages/components/Header/src/LobsHeader/type.ts","../packages/components/Header/src/type.ts","../packages/components/Header/src/hooks/useDropdownAnimation.tsx","../packages/components/Header/src/utils.ts","../packages/components/Header/src/BusinessDropdown/index.tsx","../packages/components/Header/src/UserAccount/accountOptions.tsx","../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx","../packages/components/Header/src/RewardsSection/loyaltyTypes.tsx","../packages/components/Header/src/RewardsSection/index.tsx","../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx","../packages/components/Header/src/UserAccount/index.tsx","../packages/components/Header/src/Header.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["RAVEN_PAGE_NAMES","RAVEN_PLATFORMS","NAVBAR_OPTIONS","lefticon","Offers","text","ravenActionName","isHoverable","isClickable","link","BusinessBag","rightIcon","ChevronDown","MyTrips","SupportIcon","LOB_DATA","title","image","bdConfig","subtitle","details","THEME_CONFIG","NOVAC","headerBackground","hoverColor","logoFill","fkcompanyColor","typographyColor","loginButtonColorVariant","ButtonColor","NEUTRAL","DEFAULT","PRIMARY","HeaderContext","createContext","undefined","useHeaderContext","context","useContext","Error","HeaderProvider","_a","value","children","_jsx","Provider","__assign","LobsHeader","selectedLOB","jsx","Container","display","alignItems","justifyContent","padding","background","top","zIndex","css","gap","map","item","index","isSelected","href","style","textDecoration","pointerEvents","_jsxs","width","height","cursor","borderRadius","transition","src","alt","Typography","variant","TypographyVariant","HM3","B1","HeaderAnimatedMask","onMaskClick","show","marginTop","handleDropdownMouseEnter","handleDropdownMouseLeave","useEffect","document","body","overflow","showFlagProxy","unmountDelay","useState","showComponent","setShowComponent","timerRef","useRef","current","setTimeout","clearTimeout","useDelayedUnmount","triggerTransition","isMounted","hasTransitionedIn","setHasTransitionedIn","timeoutIdRef","useMountTransition","triggerOpenTransition","_Fragment","id","position","backgroundColor","opacity","left","onClick","onMouseEnter","onMouseLeave","LOBS_VALUES","LoyaltyType","useHoverDropdown","_b","_c","closeDelay","closeDelayArg","_d","openDelay","Math","max","_e","isDropdownVisible","setIsDropdownVisible","_f","hoveredElemIndex","setHoveredElemIndex","timeoutRef","openTimeoutRef","cancelElementHover","handleOnMouseEnter","useCallback","handleOnMouseLeave","handleMouseLeaveWindow","event","clientY","window","addEventListener","removeEventListener","useDropdownAnimation","isOpen","containerRef","fullHeight_1","scrollHeight","maxHeight","concat","requestAnimationFrame","openDropdown","fullHeight","closeDropdown","stringifyPayload","payload","keys","Object","numericValues","forEach","key","includes","Number","getQueryParam","queryParam","URLSearchParams","location","search","get","ravenLoyaltyTypes","loyaltyType","ravenSDKTrigger","isUserLoggedIn","eventName","ravenPayload","customRavenPayload","ravenPushCallback","pageName","commonPayload","page_name","platform","DESKTOP","login_status","domain","host","newRavenPayload","parsedCustomRavenPayload","finalPayload","length","eventData","err","console","error","BusinessDropdownContent","ravenPageName","ravenEventName","leftPosition","setLeftPosition","updatePosition","newLeft","innerWidth","offsetWidth","handleBusinessDropdownClick","utmSource","defaultPayload","action_name","toLowerCase","action_type","u_utm_source","loyalty_type","jsxs","ref","boxShadow","flexDirection","columnGap","rowGap","className","AnimatedArrow","color","__spreadArray","Array","_","ArrowRight","ACCOUNT_OPTIONS_POPUP_CONFIG","icon","MyAccount","redirectionLink","SavedCard","Travellers","HiFive","Wallet","SettingsCog","PrivacyRights","SIGN_OUT_TEXT","MY_ACCOUNT_TEXT","LOGGEDIN_USER_TEXT","HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID","ACCOUNT_OPTIONS_CONTAINER_ID","LoyaltyChip","borderGradient","backgroundGradient","handleChipClick","chevronFillColor","isHovered","setIsHovered","handleClick","paddingLeft","paddingRight","content","inset","WebkitMask","WebkitMaskComposite","maskComposite","maxWidth","HeaderChevronRight","LOYALTY_DATA","FkVip","FkPremium","InsiderIcon","InsiderElite","CtLoyalty","ExpandableItem","type","handleDefaultClick","redirectUrls","supercoin","wallet","RewardsSection","selectedLoyaltyType","superCoinBalance","walletBalance","loyaltyLoading","superCoinsLoading","walletLoading","walletChipClick","supercoinsChipClick","loyaltyChipClick","hideWalletChip","hideSupercoinsChip","hideLoyaltyChip","alignSelf","Shimmer","Supercoin","AccountDropdownContent","handleLogoutClick","userName","userMobileNumber","countryCode","userDetailsLoading","useMemo","userGreeting","phoneNumber","generateRavenPayload","actionName","replace","handleAccountOptionsClick","redirectLink","positionAccountOptionsDiv","headerAccBtn","getElementById","accountOptionsElem","headerBtnRight","getBoundingClientRect","right","renderContent","loading","borderBottomLeftRadius","borderBottomRightRadius","Divider","borderBottom","Signout","UserAccount","isNovacThemeEnabled","scrolled","setScrolled","handleScroll","scrollY","theme","triggerRavenEventOnHover","colorCode","fill","HeaderContent","onLoginButtonClick","showAllLobs","_g","createPayload","actionType","handleNavbarOptionsClick","option","handleHomeClick","flexShrink","flex","CTLogo","fillColor","marginLeft","marginRight","transform","Fkcompany","LeftIcon","RightIcon","margin","Button","border","componentNode","props"],"mappings":"iBAuIYA,EAMAC,qUAvHCC,EAAiC,CAC5C,CACEC,SAAUC,EAAMA,OAChBC,KAAM,SACNC,gBAAiB,SACjBC,aAAa,EACbC,aAAa,EACbC,KAvBsB,kCAyBxB,CACEN,SAAUO,EAAWA,YACrBL,KAAM,WACNC,gBAAiB,WACjBK,UAAWC,EAAWA,YACtBL,aAAa,GAEf,CACEJ,SAAUU,EAAOA,QACjBR,KAAM,WACNC,gBAAiB,UACjBC,aAAa,EACbC,aAAa,EACbC,KArCwB,kBAuC1B,CACEN,SAAUW,EAAWA,YACrBT,KAAM,UACNC,gBAAiB,UACjBC,aAAa,EACbC,aAAa,EACbC,KA3CuB,aAuDdM,EAAW,CACtB,CACEC,MATO,UAUPC,MACE,8HACFR,KAAM,YAER,CACEO,MAdM,SAeNC,MACE,6HACFR,KAAM,WAER,CACEO,MAjBK,QAkBLC,MACE,4HACFR,KAAM,QAER,CACEO,MAzBK,SA0BLC,MACE,6HACFR,KAAM,yBAER,CACEO,MA9BQ,WA+BRC,MACE,+HACFR,KAAM,cAYGS,EAA4B,CACvC,CACEF,MAAO,WACPG,SAAU,oBACVC,QAAS,iFACTX,KAAM,gCAER,CACEO,MAAO,cACPG,SAAU,oCACVC,QAAS,4CACTX,KAAM,6BACNH,gBAAiB,OAEnB,CACEU,MAAO,OACPG,SAAU,uBACVC,QAAS,kEACTX,KAAM,mCAER,CACEO,MAAO,MACPG,SAAU,iBACVC,QAAS,yEACTX,KAAM,8DAMET,QAIXA,sBAAA,GAJWA,EAAAA,2BAAAA,QAAAA,iBAIX,CAAA,IAHC,aAAA,mBACAA,EAAA,YAAA,aACAA,EAAA,aAAA,eAGF,SAAYC,GACVA,EAAA,QAAA,SACD,CAFD,CAAYA,IAAAA,EAEX,CAAA,IAEM,IAGMoB,EAAe,CAC1BC,MAAO,CACLC,iBAAkB,c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4B,gBAArBvM,EAAqC,UAAY,qBjB3FjD,4BiBqGpBgT,GAAe3R,MAACG,EAAU,CAAA,KAGjC,iBAxOuC,SAAC6S,GACtC,OACEhT,EAAAK,IAACT,EAAcM,WAAA,CAACJ,MAAOkT,GAAK,CAAAjT,SAC1BC,EAAAA,IAACyR,EAAgB,MAGvB"}
|
|
1
|
+
{"version":3,"file":"ct-design-header.browser.cjs.js","sources":["../packages/components/Header/src/constants.ts","../packages/components/Header/src/context/HeaderProvider.tsx","../packages/components/Header/src/LobsHeader/index.tsx","../packages/components/Header/src/HeaderAnimatedMask /index.tsx","../packages/components/Header/src/HeaderAnimatedMask /hooks.ts","../packages/components/Header/src/hooks/useHoverDropdown.tsx","../packages/components/Header/src/LobsHeader/type.ts","../packages/components/Header/src/type.ts","../packages/components/Header/src/hooks/useDropdownAnimation.tsx","../packages/components/Header/src/BusinessDropdown/index.tsx","../packages/components/Header/src/UserAccount/accountOptions.tsx","../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx","../packages/components/Header/src/RewardsSection/loyaltyTypes.tsx","../packages/components/Header/src/RewardsSection/index.tsx","../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx","../packages/components/Header/src/UserAccount/index.tsx","../packages/components/Header/src/Header.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["RAVEN_PAGE_NAMES","RAVEN_PLATFORMS","NAVBAR_OPTIONS","lefticon","Offers","text","isHoverable","isClickable","link","BusinessBag","rightIcon","ChevronDown","MyTrips","SupportIcon","LOB_DATA","title","image","bdConfig","subtitle","details","HeaderContext","createContext","undefined","useHeaderContext","context","useContext","Error","HeaderProvider","_a","value","children","_jsx","Provider","__assign","LobsHeader","selectedLOB","jsx","Container","display","alignItems","justifyContent","padding","height","background","top","zIndex","css","gap","map","item","index","_jsxs","jsxs","cursor","borderRadius","onClick","window","location","href","src","alt","width","Typography","variant","style","fontWeight","HeaderAnimatedMask","onMaskClick","show","marginTop","handleDropdownMouseEnter","handleDropdownMouseLeave","useEffect","document","body","overflow","showFlagProxy","unmountDelay","useState","showComponent","setShowComponent","timerRef","useRef","current","setTimeout","clearTimeout","useDelayedUnmount","triggerTransition","isMounted","hasTransitionedIn","setHasTransitionedIn","timeoutIdRef","useMountTransition","triggerOpenTransition","_Fragment","id","position","backgroundColor","opacity","left","transition","onMouseEnter","onMouseLeave","LOBS_VALUES","LoyaltyType","useHoverDropdown","_b","_c","closeDelay","closeDelayArg","_d","openDelay","Math","max","_e","isDropdownVisible","setIsDropdownVisible","_f","hoveredElemIndex","setHoveredElemIndex","timeoutRef","openTimeoutRef","cancelElementHover","handleOnMouseEnter","useCallback","handleOnMouseLeave","handleMouseLeaveWindow","event","clientY","addEventListener","removeEventListener","useDropdownAnimation","isOpen","containerRef","fullHeight_1","scrollHeight","maxHeight","concat","requestAnimationFrame","openDropdown","fullHeight","closeDropdown","BusinessDropdownContent","leftPosition","setLeftPosition","updatePosition","newLeft","innerWidth","offsetWidth","ref","boxShadow","lineHeight","flexDirection","columnGap","className","AnimatedArrow","color","__spreadArray","Array","_","ArrowRight","ACCOUNT_OPTIONS_POPUP_CONFIG","icon","MyAccount","redirectionLink","SavedCard","Travellers","HiFive","Wallet","SettingsCog","PrivacyRights","LOGGEDIN_USER_TEXT","HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID","ACCOUNT_OPTIONS_CONTAINER_ID","LoyaltyChip","borderGradient","backgroundGradient","handleChipClick","chevronFillColor","isHovered","setIsHovered","paddingLeft","paddingRight","content","inset","WebkitMask","WebkitMaskComposite","maskComposite","maxWidth","HeaderChevronRight","LOYALTY_DATA","FkVip","FkPremium","InsiderIcon","InsiderElite","CtLoyalty","ExpandableItem","type","RewardsSection","selectedLoyaltyType","loyaltyType","superCoinBalance","walletBalance","loyaltyLoading","superCoinsLoading","walletLoading","walletChipClick","supercoinsChipClick","loyaltyChipClick","hideWalletChip","hideSupercoinsChip","hideLoyaltyChip","alignSelf","Supercoin","AccountDropdownContent","handleLogoutClick","userName","userMobileNumber","countryCode","userDetailsLoading","useMemo","userGreeting","phoneNumber","headerBtnRight","headerAccBtn","getElementById","accountOptionsElem","getBoundingClientRect","right","renderContent","loading","rowGap","borderBottomLeftRadius","borderBottomRightRadius","redirectLink","Divider","borderBottom","Signout","UserAccount","isNovacThemeEnabled","scrolled","setScrolled","handleScroll","scrollY","effectiveNovacThemeEnabled","hoverColor","colorCode","fill","HeaderContent","onLoginButtonClick","showAllLobs","isUserLoggedIn","ravenPayload","headerBackground","flexShrink","flex","CTLogo","fillColor","marginLeft","marginRight","transform","Fkcompany","option","margin","Button","border","componentNode","props"],"mappings":"iBA6GYA,EAMAC,2RAxGCC,EAAiB,CAC5B,CACEC,SAAUC,EAAMA,OAChBC,KAAM,SACNC,aAAa,EACbC,aAAa,EACbC,KAZsB,kCAcxB,CACEL,SAAUM,EAAWA,YACrBJ,KAAM,WACNK,UAAWC,EAAWA,YACtBL,aAAa,GAEf,CACEH,SAAUS,EAAOA,QACjBP,KAAM,WACNC,aAAa,EACbC,aAAa,EACbC,KAxBwB,kBA0B1B,CACEL,SAAUU,EAAWA,YACrBR,KAAM,UACNC,aAAa,EACbC,aAAa,EACbC,KA7BuB,aAyCdM,EAAW,CACtB,CACEC,MATO,UAUPC,MACE,0HACFR,KAAM,YAER,CACEO,MAdM,SAeNC,MACE,yHACFR,KAAM,WAER,CACEO,MAjBK,QAkBLC,MACE,uHACFR,KAAM,QAER,CACEO,MAzBK,SA0BLC,MACE,yHACFR,KAAM,yBAER,CACEO,MA9BQ,WA+BRC,MACE,2HACFR,KAAM,cAIGS,EAAW,CACtB,CACEF,MAAO,WACPG,SAAU,oBACVC,QAAS,kFAEX,CACEJ,MAAO,cACPG,SAAU,oCACVC,QAAS,6CAEX,CACEJ,MAAO,OACPG,SAAU,uBACVC,QAAS,kEACTX,KAAM,mCAER,CACEO,MAAO,MACPG,SAAU,iBACVC,QAAS,yEACTX,KAAM,+DAMV,SAAYR,GACVA,EAAA,a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MAACM,EAAAA,UAASJ,EAAAA,SAAA,CAACK,QAAQ,OAAOkH,cAAc,MAAMjH,WAAW,UACvD,CAAAT,SAAAC,EAAAA,IAAC+M,EAAW,OAGd/M,EAAAA,IAACyO,EAAMA,OAAAvO,WAAA,CACLyH,UAAW,gBAAgBjB,OAAA2G,EAA6B,qBAAuB,gBAC/E7L,QAASkM,EACTzL,MAAO,CACLH,MAAO,IACPnB,OAAQ,GACR+N,OAAQrB,EAA6B,iBAAmB,qBAE1Dd,SAAS,aAETvM,EAAAA,IAAC+B,EAAUA,uBACT4M,cAAc,OACd3M,QAAQ,KACR6F,MAAOwF,EAA6B,UAAY,WAGrC,CAAAtN,SAAA,2BAOxB4N,GAAe3N,EAAAK,IAACF,EAAa,CAAA,KAGpC,iBA7MuC,SAACyO,GACtC,OACE5O,EAAAK,IAACT,EAAcM,WAAA,CAACJ,MAAO8O,GAAK,CAAA7O,SAC1BC,EAAAA,IAACyN,EAAgB,MAGvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as n}from"tslib";import{jsx as r,jsxs as t,Fragment as i}from"react/jsx-runtime";import{createContext as o,useContext as a,useState as c,useRef as l,useEffect as s,useCallback as d,useMemo as u}from"react";import{Container as p}from"@cleartrip/ct-design-container";import{Typography as h,TypographyVariant as f}from"@cleartrip/ct-design-typography";import{ButtonColor as g,Button as m}from"@cleartrip/ct-design-button";import{Divider as v}from"@cleartrip/ct-design-divider";import{Offers as x,BusinessBag as y,ChevronDown as w,MyTrips as b,SupportIcon as k,ArrowRight as C,MyAccount as F,SavedCard as _,Travellers as L,HiFive as E,Wallet as I,SettingsCog as M,PrivacyRights as T,HeaderChevronRight as A,FkVip as D,FkPremium as N,InsiderIcon as P,InsiderElite as B,CtLoyalty as H,Supercoin as G,Signout as O,CTLogo as R,Fkcompany as S}from"@cleartrip/ct-design-icons";import{Shimmer as U}from"@cleartrip/ct-design-shimmer";var j,V,z=[{lefticon:x,text:"Offers",ravenActionName:"offers",isHoverable:!1,isClickable:!0,link:"all-offers/?categories=flights"},{lefticon:y,text:"Business",ravenActionName:"business",rightIcon:w,isHoverable:!0},{lefticon:b,text:"My Trips",ravenActionName:"mytrips",isHoverable:!1,isClickable:!0,link:"/account/trips"},{lefticon:k,text:"Support",ravenActionName:"support",isHoverable:!1,isClickable:!0,link:"/support"}],W=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true",link:"/bus"},{title:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true",link:"/holidays"}],Y=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners",link:"https://agency.cleartrip.com"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly",link:"https://ooo.cleartrip.com/",ravenActionName:"ooo"},{title:"MICE",subtitle:"For corporate events",details:"An end-to-end management solution for all your corporate events",link:"https://business.cleartrip.com/"},{title:"API",subtitle:"For developers",details:"Unlock seamless integration and scale with our powerful, reliable APIs",link:"https://business.cleartrip.com/api-customers/more-details"}];!function(e){e.UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotel_home",e.FLIGHTS_HOME="flights_home"}(j||(j={})),function(e){e.DESKTOP="desktop"}(V||(V={}));var K={NOVAC:{headerBackground:"transparent",hoverColor:"#FDBA12",logoFill:"#FFF",fkcompanyColor:"#FFF",typographyColor:"#FFF",loginButtonColorVariant:g.NEUTRAL},DEFAULT:{headerBackground:"#FFFFFF",hoverColor:"#FF4F17",logoFill:"#FF4F17",fkcompanyColor:"#1A1A1A",typographyColor:"#1A1A1A",loginButtonColorVariant:g.PRIMARY}},q=o(void 0),J=function(){var e=a(q);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},Q=function(n){var t=n.value,i=n.children;return r(q.Provider,e({value:t},{children:i}))},X=function(){var n=J().selectedLOB;return r(p,e({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",background:"#F7FAFF",top:"64px",zIndex:2,css:{gap:24}},{children:W.map((function(i,o){var a=i.title,c=i.link,l=i.image,s=n===a;return r("a",e({href:s?void 0:c,style:{textDecoration:"none",pointerEvents:s?"none":"auto"}},{children:t(p,e({display:"flex",alignItems:"center",width:"116px",height:"48px",justifyContent:"center",cursor:"pointer",css:{gap:8,background:s?"#FFFFFF":"transparent",borderRadius:"40px",padding:"8px 16px 8px 8px",transition:"background 0.2s ease"}},{children:[r("img",{src:l,alt:a,width:32,height:32}),r(h,e({variant:s?f.HM3:f.B1,isClickable:!0},{children:a}))]}),o)}))}))}))};function Z(n){var o=n.children,a=n.onMaskClick,d=n.show,u=n.marginTop,h=n.handleDropdownMouseEnter,f=n.handleDropdownMouseLeave;s((function(){return d&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[d]);var g=function(e,n){var r=c(e),t=r[0],i=r[1],o=l();return s((function(){return e?i(e):o.current=setTimeout((function(){i(!1)}),n),function(){(null==o?void 0:o.current)&&clearTimeout(o.current)}}),[e]),t}(d,300),m=function(e,n){var r=c(!1),t=r[0],i=r[1],o=l();return s((function(){return e&&!t?setTimeout((function(){i(!0)}),0):!e&&t&&(o.current=setTimeout((function(){return i(!1)}),n)),function(){o&&o.current&&clearTimeout(o.current)}}),[n,e]),t}(d,100);return t(i,{children:[g&&r(p,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:m?.4:0,width:"100%",height:"100vh",left:0,top:u||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),g&&r(p,e({onMouseEnter:h,onMouseLeave:f},{children:o}))]})}var $,ee,ne,re=function(e){var n=void 0===e?{}:e,r=n.closeDelay,t=void 0===r?0:r,i=n.openDelay,o=void 0===i?500:i,a=Math.max(t,150),u=c(!1),p=u[0],h=u[1],f=c(null),g=f[0],m=f[1],v=l(null),x=l(null),y=l(!1),w=d((function(e){v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current),y.current=!1,x.current=setTimeout((function(){h(!0),y.current||m(e)}),o)}),[o]),b=d((function(){y.current=!0,v.current=setTimeout((function(){h(!1),m(null)}),a)}),[a]),k=d((function(){v.current&&clearTimeout(v.current)}),[]),C=d((function(){y.current=!0,(null==v?void 0:v.current)&&clearTimeout(v.current),v.current=setTimeout((function(){h(!1),m(null)}),a)}),[]);return s((function(){var e=function(e){e.clientY<=0&&(h(!1),m(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:p,hoveredElemIndex:g,handleOnMouseEnter:w,handleOnMouseLeave:b,handleDropdownMouseEnter:k,handleDropdownMouseLeave:C}},te=function(e){var n=l(null);return s((function(){e?function(){if(n.current){var e=n.current.scrollHeight;n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",requestAnimationFrame((function(){n.current&&(n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e,"px"),n.current.style.opacity="1")}))}}():function(){if(n.current){var e=n.current.scrollHeight;n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",setTimeout((function(){n.current&&(n.current.style.maxHeight="0px")}),300)}}()}),[e]),{containerRef:n}},ie=function(e){var n=Object.keys(e),r=[];return n.forEach((function(n){r.includes(n)?e[n]=Number(e[n]):e[n]=""+e[n]})),e},oe=function(e){return"undefined"!=typeof window&&window?new URLSearchParams(window.location.search).get(e):""},ae=function(e){switch(e){case"FkVip":return"fk_vip";case"FkPremium":return"fk_plus_premium";case"InsiderIcon":return"myntra_insidericon";case"InsiderElite":return"myntra_insiderelite";default:return""}},ce=function(n,r,t,i,o,a){var c;if("function"==typeof o){var l={page_name:a,platform:V.DESKTOP,login_status:n?"yes":"no",domain:null===(c=null===window||void 0===window?void 0:window.location)||void 0===c?void 0:c.host},s=ie(t),d=ie(i),u=e(e(e({},l),s),d);try{1===o.length?o({eventName:r,eventData:u}):o(r,u)}catch(e){return void console.error(e)}}else console.error("ravenPushCallback is not provided or is not a function")},le=function(n){var i=n.isOpen,o=J(),a=o.isUserLoggedIn,l=o.ravenPushCallback,u=o.ravenPageName,f=o.ravenEventName,g=o.loyaltyType,m=o.ravenPayload,v=void 0===m?{}:m,x=c(0),y=x[0],w=x[1],b=te(i).containerRef;s((function(){var e=function(){if(b.current){var e=(window.innerWidth-(b.current.offsetWidth||0))/2;e!==y&&w(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[b,y]);var k=d((function(e,n,r){var t,i=null!==(t=oe("utm_source"))&&void 0!==t?t:"organic",o={action_name:r?"".concat(r,"_business_click"):n?"".concat(n.toLowerCase(),"_business_click"):"",action_type:"click",u_utm_source:i,loyalty_type:ae(g)};e&&(ce(a,f,o,v,l,u),window.location.href=e)}),[a,f,v,l,u,g]);return t(p,e({ref:b,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(y,"px"),borderRadius:24,boxShadow:"0px 8px 24px 0px rgba(26, 26, 26, 0.10)",width:"fit-content",zIndex:1002,css:{overflow:"hidden",opacity:0}},{children:[r(p,e({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:r(h,e({variant:"HM2"},{children:"Other business services"}))})),r(p,e({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:Y.map((function(n){var i=n.title,o=n.subtitle,a=n.details,c=n.link,l=n.ravenActionName;return t(p,e({cursor:"pointer",display:"flex",flexDirection:"column",width:"200px",rowGap:"11px",className:"bd-hover-container",onClick:function(){return k(c,i,l)}},{children:[t(p,e({display:"flex",flexDirection:"column",rowGap:"4px"},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[r(h,e({variant:"HM2",className:"color-orange-on-hover"},{children:i})),r(se,{})]})),r(h,e({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:o}))]})),r(h,e({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:a}))]}),i)}))}))]}))},se=function(){return r(p,e({className:"bd-arrow-container"},{children:n([],Array(3),!0).map((function(n,t){return r(p,e({className:"bd-arrow-wrapper"},{children:r(C,{})}),t)}))}))},de=[{text:"My Profile",icon:r(F,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:r(b,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:r(_,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:r(L,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:r(E,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:r(I,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:r(M,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:r(T,{}),redirectionLink:"accounts/personal-data-dashboard"}],ue="Logout",pe="My Account",he="You are logged in with",fe="header-acc-btn",ge="account-options",me=function(n){var i=n.icon,o=n.borderGradient,a=n.backgroundGradient,l=n.handleChipClick,s=n.chevronFillColor,u=J(),h=u.loyaltyType,f=u.isUserLoggedIn,g=u.ravenPushCallback,m=u.ravenPageName,v=u.ravenPayload,x=void 0===v?{}:v,y=u.ravenEventName,w=c(!1),b=w[0],k=w[1],C=d((function(){var e;if(l)l();else{var n={action_name:"loyalty_account_click",action_type:"click",u_utm_source:null!==(e=oe("utm_source"))&&void 0!==e?e:"organic",loyaltyType:ae(h)};ce(f,y,n,x,g,m),window.location.href="/all-offers/loyalty-october"}}),[l,h,f,y,x,g,m]);return t(p,e({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:b?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)},onClick:C},{children:[r(p,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:a,zIndex:-2}}),r(p,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:o,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),r(p,e({display:"flex",alignItems:"center",position:"relative"},{children:i})),r(p,e({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:b?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:b?.5:0}},{children:r(A,{color:s})}))]}))};!function(e){e.FLIGHTS="Flights",e.HOTELS="Hotels",e.BUSES="Buses",e.TRAINS="Trains",e.PACKAGES="Packages"}($||($={})),function(e){e.FkVip="FkVip",e.FkPremium="FkPremium",e.InsiderIcon="InsiderIcon",e.InsiderElite="InsiderElite",e.CtLoyalty="CtLoyalty"}(ee||(ee={}));var ve=((ne={})[ee.FkVip]={icon:r(D,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},ne[ee.FkPremium]={icon:r(N,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},ne[ee.InsiderIcon]={icon:r(P,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},ne[ee.InsiderElite]={icon:r(B,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},ne[ee.CtLoyalty]={icon:r(H,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(110.82deg, #FFF9EC 0%, #FEE3A8 100%)",chevronFillColor:"#1A1A1A"},ne),xe=function(n){var i=n.icon,o=n.handleChipClick,a=n.value,l=n.type,s=J(),u=s.loyaltyType,f=s.isUserLoggedIn,g=s.ravenPushCallback,m=s.ravenPageName,v=s.ravenEventName,x=s.ravenPayload,y=void 0===x?{}:x,w=c(!1),b=w[0],k=w[1],C=d((function(){var e;if(o)o();else{var n=null!==(e=oe("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(l,"_account_click"),action_type:"click",u_utm_source:n,loyaltyType:ae(u)};ce(f,v,r,y,g,m);var t={supercoin:"/all-offers/supercoins/",wallet:"/accounts/wallet"};t[l]&&(window.location.href=t[l])}}),[o,l,u,f,v,y,g,m]);return t(p,e({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",css:{height:32,paddingLeft:8,paddingRight:b?4:8,transition:"padding-right 0.2s ease-in-out",background:b?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)},onClick:C},{children:[t(p,e({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[i,r(h,e({variant:"B3",isClickable:!0},{children:a}))]})),r(p,e({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:b?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:b?1:0}},{children:r(A,{})}))]}))},ye=function(){var n,i=J(),o=i.loyaltyType,a=i.fkSupercoinBurnBalance,c=void 0===a?0:a,l=i.walletBalance,s=void 0===l?0:l,d=i.loyaltyLoading,u=i.superCoinsLoading,h=i.walletLoading,f=i.walletChipClick,g=i.supercoinsChipClick,m=i.loyaltyChipClick,v=i.hideWalletChip,x=i.hideSupercoinsChip,y=i.hideLoyaltyChip;return d||o&&ve[o]&&!y||(u||!x)||(h||!v)?t(p,e({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[d?r(U,{width:"50px",height:"32px",borderRadius:"8px"}):o&&ve[o]&&!y&&r(me,{icon:ve[o].icon,borderGradient:ve[o].borderGradient,backgroundGradient:ve[o].backgroundGradient,chevronFillColor:(null===(n=ve[o])||void 0===n?void 0:n.chevronFillColor)||"#FFF",handleChipClick:m}),u?r(U,{width:"50px",height:"32px",borderRadius:"8px"}):!x&&r(xe,{icon:r(G,{width:20,height:20}),value:c,handleChipClick:g,type:"supercoin"}),h?r(U,{width:"50px",height:"32px",borderRadius:"8px"}):!v&&r(xe,{icon:r(I,{width:20,height:20}),value:s,handleChipClick:f,type:"wallet"})]})):null},we=function(n){var o=n.isOpen,a=J(),c=a.handleLogoutClick,l=a.userName,f=a.userMobileNumber,g=a.countryCode,m=a.userDetailsLoading,x=a.loyaltyType,y=a.isUserLoggedIn,w=a.ravenEventName,b=a.ravenPageName,k=a.ravenPayload,C=void 0===k?{}:k,F=a.ravenPushCallback,_=te(o).containerRef,L=u((function(){return{userGreeting:l?"Hello ".concat(l,"!"):"",phoneNumber:g&&f?"".concat(g," ").concat(f):""}}),[l,f,g]),E=L.userGreeting,I=L.phoneNumber,M=function(e){var n;return{action_name:e.toLowerCase().replace(/[\s-]/g,"")+"_account_click",action_type:"click",u_utm_source:null!==(n=oe("utm_source"))&&void 0!==n?n:"organic",loyalty_type:ae(x)}},T=d((function(e,n){ce(y,w,M(e),C,F,b),window.location.href=n}),[y,w,C,F,b]);d((function(){ce(y,w,M(ue),C,F,b),c()}),[y,w,C,F,b,c]);var A=d((function(){var e=document.getElementById(fe),n=document.getElementById(ge);if(e&&n){var r=e.getBoundingClientRect().right;n.style.left="".concat(r-328,"px")}}),[]);s((function(){A()}),[A]);var D;return t(p,e({id:ge,ref:_,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[r(p,e({padding:"16px",height:"76px"},{children:(D=function(n,t,i,o){return r(h,e({variant:i,color:o},{children:n?r(U,{height:"HM3"===i?"18px":"12px",width:"HM3"===i?"140px":"200px"}):t}))},r(p,e({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:t(i,E?{children:[D(m,E,"HM3","primary"),D(m,"".concat(he," ").concat(I),"P3","subheading")]}:{children:[D(m,he,"P3","subheading"),D(m,I,"HM3","primary")]})})))})),r(ye,{}),t(p,e({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",css:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[de.map((function(n){var i=n.text,o=n.icon,a=n.redirectionLink;return r(p,e({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:function(){return T(i,a)}},{children:t(p,e({display:"flex",cursor:"pointer",css:{columnGap:"8px"}},{children:[o,r(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:i}))]}))}),"account-option-".concat(i))})),r(v,{css:{borderBottom:"1px dashed #E6E6E6"}}),t(p,e({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:c},{children:[r(O,{height:24,width:24}),r(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:ue}))]}))]}))]}))},be=function(){var n=J(),i=n.isNovacThemeEnabled,o=n.ravenEventName,a=n.ravenPayload,l=void 0===a?{}:a,u=n.ravenPushCallback,f=n.isUserLoggedIn,g=n.loyaltyType,m=n.ravenPageName,v=re({openDelay:0}),x=v.isDropdownVisible,y=v.handleOnMouseEnter,b=v.handleOnMouseLeave,k=v.handleDropdownMouseEnter,C=v.handleDropdownMouseLeave,_=c(!1),L=_[0],E=_[1];s((function(){var e=function(){E(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var I=i&&!L?K.NOVAC:K.DEFAULT,M=I.hoverColor,T=I.typographyColor,A=d((function(){var e,n=null!==(e=oe("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(pe.toLowerCase().replace(/[\s-]/g,""),"_header_hover"),action_type:"hover",u_utm_source:n,loyalty_type:ae(g)};ce(f,o,r,l,u,m)}),[f,o,l,u,m,g]);return t(p,{children:[t(p,e({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",css:{columnGap:8,height:64},onMouseEnter:function(){y(0),A()},onMouseLeave:b,id:fe},{children:[r(F,{color:x?M:T}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[r(h,e({variant:"B2",css:{cursor:"pointer"},colorCode:x?M:T},{children:pe})),r(w,{width:20,height:20,fill:x?M:T})]}))]})),r(Z,e({show:x,marginTop:"64px",handleDropdownMouseEnter:k,handleDropdownMouseLeave:C,onMaskClick:C},{children:r(we,{isOpen:x})}))]})},ke=function(n){return r(Q,e({value:n},{children:r(Ce,{})}))},Ce=function(){var n,o=J(),a=o.onLoginButtonClick,l=o.showAllLobs,u=void 0!==l&&l,f=o.isUserLoggedIn,g=o.loyaltyType,x=o.isNovacThemeEnabled,y=void 0!==x&&x,w=o.ravenPayload,b=void 0===w?{}:w,k=o.ravenPushCallback,C=o.ravenPageName,F=o.ravenEventName,_=c(!1),L=_[0],E=_[1];s((function(){var e=function(){E(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var I=y&&!L?K.NOVAC:K.DEFAULT,M=I.headerBackground,T=I.logoFill,A=I.hoverColor,D=I.fkcompanyColor,N=I.typographyColor,P=re({openDelay:0}),B=P.isDropdownVisible,H=P.hoveredElemIndex,G=P.handleOnMouseEnter,O=P.handleOnMouseLeave,U=P.handleDropdownMouseEnter,j=P.handleDropdownMouseLeave,V=null!==(n=oe("utm_source"))&&void 0!==n?n:"organic",W=d((function(e,n){return{action_name:e,action_type:n,u_utm_source:V,loyalty_type:ae(g)}}),[V,g]),Y=d((function(e){if(e.isClickable&&e.link){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_click"),r=W(n,"click");ce(f,F,r,b,k,C),window.location.href=e.link}}),[W,f,F,b,k,C]),q=d((function(){var e=W("home_header_click","click");ce(f,F,e,b,k,C),window.location.href="/"}),[W,f,F,b,k,C]),Q=d((function(e){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_hover"),r=W(n,"hover");ce(f,F,r,b,k,C)}),[W,f,F,b,k,C]);return t(i,{children:[r(p,e({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:M,css:{gap:"24px",flexShrink:0,borderBottom:"transparent"===M?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:t(p,e({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,css:{gap:"24px",maxWidth:1440}},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:q},{children:[r(R,{fillColor:T}),r(v,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),r(S,{color:D})]})),t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[r(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:z.map((function(n,i){var o=n.text,a=n.lefticon,c=n.rightIcon,l=n.isHoverable,s=H===i;return t(p,{children:[t(p,e({onMouseEnter:function(){G(i),n.isHoverable&&Q(n)},onMouseLeave:O,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){return Y(n)}},{children:[r(a,{color:s?A:N}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[r(h,e({variant:"B2",colorCode:s?A:N,isClickable:!0},{children:o})),c&&r(c,{width:20,height:20,fill:s?A:N})]}))]}),"nav-option-".concat(i)),r(Z,e({show:H===i&&l&&B,marginTop:"64px",handleDropdownMouseEnter:U,handleDropdownMouseLeave:j,onMaskClick:j},{children:r(le,{isOpen:H===i&&l&&B})}))]})}))})),f&&r(v,{css:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),r(p,{children:f?r(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:r(be,{})})):r(m,e({className:"".concat("transparent"===M?"novac-login-button":"login-button"),onClick:a,css:{width:153,height:40,border:"transparent"===M?"1px solid #FFFFFF !important":"1px solid #1A1A1A !important"},loading:!1},{children:r(h,e({componentNode:"span",variant:"L2",color:"transparent"===M?"neutral":"primary"},{children:"Log in"}))}))})]}))]}))})),u&&r(X,{})]})};export{ke as Header,$ as LOBS_VALUES,ee as LoyaltyType,j as RAVEN_PAGE_NAMES};
|
|
1
|
+
import{__assign as e,__spreadArray as n}from"tslib";import{jsx as i,jsxs as t,Fragment as r}from"react/jsx-runtime";import{createContext as o,useContext as a,useState as l,useRef as c,useEffect as d,useCallback as s,useMemo as u}from"react";import{Container as p}from"@cleartrip/ct-design-container";import{Typography as h}from"@cleartrip/ct-design-typography";import{Button as f}from"@cleartrip/ct-design-button";import{Divider as g}from"@cleartrip/ct-design-divider";import{Offers as m,BusinessBag as x,ChevronDown as v,MyTrips as w,SupportIcon as b,ArrowRight as y,MyAccount as F,SavedCard as k,Travellers as C,HiFive as E,Wallet as L,SettingsCog as I,PrivacyRights as M,HeaderChevronRight as A,FkVip as D,FkPremium as T,InsiderIcon as H,InsiderElite as _,CtLoyalty as G,Supercoin as B,Signout as R,CTLogo as O,Fkcompany as P}from"@cleartrip/ct-design-icons";var S,N,j=[{lefticon:m,text:"Offers",isHoverable:!1,isClickable:!0,link:"all-offers/?categories=flights"},{lefticon:x,text:"Business",rightIcon:v,isHoverable:!0},{lefticon:w,text:"My Trips",isHoverable:!1,isClickable:!0,link:"/account/trips"},{lefticon:b,text:"Support",isHoverable:!1,isClickable:!0,link:"/support"}],W=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/flight_uhp.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/hotel_uhp.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/bus_uhp.png?cache=true",link:"/bus"},{title:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/train_uhp.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/holiday_uhp.png?cache=true",link:"/holidays"}],z=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly"},{title:"MICE",subtitle:"For corporate events",details:"An end-to-end management solution for all your corporate events",link:"https://business.cleartrip.com/"},{title:"API",subtitle:"For developers",details:"Unlock seamless integration and scale with our powerful, reliable APIs",link:"https://business.cleartrip.com/api-customers/more-details"}];!function(e){e.UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotels_homepage",e.FLIGHTS_HOME="flights_homepage"}(S||(S={})),function(e){e.DESKTOP="desktop"}(N||(N={}));var V=o(void 0),U=function(){var e=a(V);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},Y=function(n){var t=n.value,r=n.children;return i(V.Provider,e({value:t},{children:r}))},K=function(){var n=U().selectedLOB;return i(p,e({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",height:"64",background:"#F3F5FA",top:"64px",zIndex:2,css:{gap:40}},{children:W.map((function(r,o){return t(p,e({display:"flex",alignItems:"center",cursor:"pointer",css:{gap:8,background:n===r.title?"#FFFFFF":"transparent",borderRadius:n===r.title?"40px":"0",padding:n===r.title?"8px 16px 8px 8px":"0"},onClick:function(){window.location.href=r.link}},{children:[i("img",{src:r.image,alt:r.title,width:32,height:32}),i(h,e({variant:"P1",style:{fontWeight:n===r.title?600:500},isClickable:!0},{children:r.title}))]}),o)}))}))};function q(n){var o=n.children,a=n.onMaskClick,s=n.show,u=n.marginTop,h=n.handleDropdownMouseEnter,f=n.handleDropdownMouseLeave;d((function(){return s&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[s]);var g=function(e,n){var i=l(e),t=i[0],r=i[1],o=c();return d((function(){return e?r(e):o.current=setTimeout((function(){r(!1)}),n),function(){(null==o?void 0:o.current)&&clearTimeout(o.current)}}),[e]),t}(s,300),m=function(e,n){var i=l(!1),t=i[0],r=i[1],o=c();return d((function(){return e&&!t?setTimeout((function(){r(!0)}),0):!e&&t&&(o.current=setTimeout((function(){return r(!1)}),n)),function(){o&&o.current&&clearTimeout(o.current)}}),[n,e]),t}(s,100);return t(r,{children:[g&&i(p,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:m?.4:0,width:"100%",height:"100vh",left:0,top:u||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),g&&i(p,e({onMouseEnter:h,onMouseLeave:f},{children:o}))]})}var J,Q,X,Z=function(e){var n=void 0===e?{}:e,i=n.closeDelay,t=void 0===i?0:i,r=n.openDelay,o=void 0===r?500:r,a=Math.max(t,150),u=l(!1),p=u[0],h=u[1],f=l(null),g=f[0],m=f[1],x=c(null),v=c(null),w=c(!1),b=s((function(e){x.current&&clearTimeout(x.current),v.current&&clearTimeout(v.current),w.current=!1,v.current=setTimeout((function(){h(!0),w.current||m(e)}),o)}),[o]),y=s((function(){w.current=!0,x.current=setTimeout((function(){h(!1),m(null)}),a)}),[a]),F=s((function(){x.current&&clearTimeout(x.current)}),[]),k=s((function(){w.current=!0,(null==x?void 0:x.current)&&clearTimeout(x.current),x.current=setTimeout((function(){h(!1),m(null)}),a)}),[]);return d((function(){var e=function(e){e.clientY<=0&&(h(!1),m(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:p,hoveredElemIndex:g,handleOnMouseEnter:b,handleOnMouseLeave:y,handleDropdownMouseEnter:F,handleDropdownMouseLeave:k}},$=function(e){var n=c(null);return d((function(){e?function(){if(n.current){var e=n.current.scrollHeight;n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",requestAnimationFrame((function(){n.current&&(n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e,"px"),n.current.style.opacity="1")}))}}():function(){if(n.current){var e=n.current.scrollHeight;n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",setTimeout((function(){n.current&&(n.current.style.maxHeight="0px")}),300)}}()}),[e]),{containerRef:n}},ee=function(n){var r=n.isOpen,o=l(0),a=o[0],c=o[1],s=$(r).containerRef;return d((function(){var e=function(){if(s.current){var e=(window.innerWidth-(s.current.offsetWidth||0))/2;e!==a&&c(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[s,a]),t(p,e({ref:s,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(a,"px"),borderRadius:24,boxShadow:"0px 8px 24px 0px rgba(26, 26, 26, 0.10)",width:"fit-content",zIndex:1002,css:{overflow:"hidden",opacity:0}},{children:[i(p,e({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:i(h,e({variant:"HM2",css:{lineHeight:"24px"}},{children:"Other business services"}))})),i(p,e({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:z.map((function(n){var r=n.title,o=n.subtitle,a=n.details;return t(p,e({cursor:"pointer",width:"200px",className:"bd-hover-container"},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[i(h,e({variant:"HM2",className:"color-orange-on-hover"},{children:r})),i(ne,{})]})),i(h,e({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:o})),i(h,e({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:a}))]}),r)}))}))]}))},ne=function(){return i(p,e({className:"bd-arrow-container"},{children:n([],Array(3),!0).map((function(n,t){return i(p,e({className:"bd-arrow-wrapper"},{children:i(y,{})}),t)}))}))},ie=[{text:"My Profile",icon:i(F,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:i(w,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:i(k,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:i(C,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:i(E,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:i(L,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:i(I,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:i(M,{}),redirectionLink:"accounts/personal-data-dashboard"}],te="You are logged in with",re="header-acc-btn",oe="account-options",ae=function(n){var r=n.icon,o=n.borderGradient,a=n.backgroundGradient,c=n.handleChipClick,d=n.chevronFillColor,s=l(!1),u=s[0],h=s[1];return t(p,e({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:u?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onClick:function(){window.location.href="/",c&&c()}},{children:[i(p,{style:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:a,zIndex:-2}}),i(p,{style:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:o,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),i(p,e({display:"flex",alignItems:"center",position:"relative"},{children:r})),i(p,e({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:u?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:u?.5:0}},{children:i(A,{color:d})}))]}))};!function(e){e.FLIGHTS="Flights",e.HOTELS="Hotels",e.BUSES="Buses",e.TRAINS="Trains",e.PACKAGES="Packages"}(J||(J={})),function(e){e.FkVip="FkVip",e.FkPremium="FkPremium",e.InsiderIcon="InsiderIcon",e.InsiderElite="InsiderElite",e.CtLoyalty="CtLoyalty"}(Q||(Q={}));var le=((X={})[Q.FkVip]={icon:i(D,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},X[Q.FkPremium]={icon:i(T,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},X[Q.InsiderIcon]={icon:i(H,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},X[Q.InsiderElite]={icon:i(_,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},X[Q.CtLoyalty]={icon:i(G,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(110.82deg, #FFF9EC 0%, #FEE3A8 100%)",chevronFillColor:"#1A1A1A"},X),ce=function(n){var r=n.icon,o=n.handleChipClick,a=n.value,c=n.type,d=l(!1),s=d[0],u=d[1];return t(p,e({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",style:{height:32,paddingLeft:8,paddingRight:s?4:8,transition:"padding-right 0.2s ease-in-out",background:s?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},onClick:function(){"supercoins"===c?window.location.href="/supercoins":"wallet"===c&&(window.location.href="/wallet"),o&&o()}},{children:[t(p,e({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[r,i(h,e({variant:"B3",isClickable:!0},{children:a}))]})),i(p,e({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:s?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:s?1:0}},{children:i(A,{})}))]}))},de=function(){var n,r=U(),o=r.loyaltyType,a=r.fkSupercoinBurnBalance,l=void 0===a?0:a,c=r.walletBalance,d=void 0===c?0:c,s=r.loyaltyLoading,u=r.superCoinsLoading,h=r.walletLoading,f=r.walletChipClick,g=r.supercoinsChipClick,m=r.loyaltyChipClick,x=r.hideWalletChip,v=r.hideSupercoinsChip,w=r.hideLoyaltyChip;return t(p,e({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[s?i(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):o&&le[o]&&!w&&i(ae,{icon:le[o].icon,borderGradient:le[o].borderGradient,backgroundGradient:le[o].backgroundGradient,chevronFillColor:(null===(n=le[o])||void 0===n?void 0:n.chevronFillColor)||"#FFF",handleChipClick:m}),u?i(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!v&&i(ce,{icon:i(B,{width:20,height:20}),value:l,handleChipClick:g,type:"supercoins"}),h?i(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!x&&i(ce,{icon:i(L,{width:20,height:20}),value:d,handleChipClick:f,type:"wallet"})]}))},se=function(n){var o=n.isOpen,a=U(),l=a.handleLogoutClick,c=a.userName,s=a.userMobileNumber,f=a.countryCode,m=a.userDetailsLoading,x=$(o).containerRef,v=u((function(){return{userGreeting:c&&"Hello ".concat(c,"!"),phoneNumber:f&&s?"".concat(f," ").concat(s):""}}),[c,s,f]),w=v.userGreeting,b=v.phoneNumber;d((function(){var e,n=document.getElementById(re),i=document.getElementById(oe);e=null==n?void 0:n.getBoundingClientRect().right,i&&e&&(i.style.left="".concat(e-328,"px"))}),[]);var y;return t(p,e({id:oe,ref:x,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[i(p,e({padding:"16px",height:"72px"},{children:(y=function(n,t,r,o){return i(h,e({variant:r,color:o},{children:n?i(p,{height:"HM3"===r?"18px":"12px",width:"HM3"===r?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):t}))},i(p,e({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:t(r,w?{children:[y(m,w,"HM3","primary"),y(m,"".concat(te," ").concat(b),"P3","subheading")]}:{children:[y(m,te,"P3","subheading"),y(m,b,"HM3","primary")]})})))})),i(de,{}),t(p,e({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",style:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[ie.map((function(n){var r,o=n.text,a=n.icon,l=n.redirectionLink;return i(p,e({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:(r=l,function(){window.location.href=r})},{children:t(p,e({display:"flex",cursor:"pointer",style:{columnGap:"8px"}},{children:[a,i(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:o}))]}))}),"account-option-".concat(o))})),i(g,{style:{borderBottom:"1px dashed #E6E6E6"}}),t(p,e({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:l},{children:[i(R,{height:24,width:24}),i(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:"Logout"}))]}))]}))]}))},ue=function(){var n=U().isNovacThemeEnabled,r=Z({openDelay:0}),o=r.isDropdownVisible,a=r.handleOnMouseEnter,c=r.handleOnMouseLeave,s=r.handleDropdownMouseEnter,u=r.handleDropdownMouseLeave,f=l(!1),g=f[0],m=f[1];d((function(){var e=function(){m(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var x=n&&!g,w=x?"#FFB8A5":"#FF4F17";return t(p,{children:[t(p,e({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",style:{columnGap:8,height:64},onMouseEnter:function(){return a(0)},onMouseLeave:c,id:re},{children:[i(F,{color:o?w:x?"#FFF":"#1A1A1A"}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[i(h,e({variant:"B2",css:{cursor:"pointer"},colorCode:o?w:x?"#FFF":"#1A1A1A"},{children:"My Account"})),i(v,{width:20,height:20,fill:o?w:x?"#FFF":"#1A1A1A"})]}))]})),i(q,e({show:o,marginTop:"64px",handleDropdownMouseEnter:s,handleDropdownMouseLeave:u,onMaskClick:u},{children:i(se,{isOpen:o})}))]})},pe=function(n){return i(Y,e({value:n},{children:i(he,{})}))},he=function(){var n=U(),o=n.onLoginButtonClick,a=n.showAllLobs,c=void 0!==a&&a,s=n.isUserLoggedIn;n.loyaltyType;var u=n.isNovacThemeEnabled,m=void 0!==u&&u;n.ravenPayload,n.ravenPushCallback,n.ravenPageName,n.ravenEventName;var x=l(!1),v=x[0],w=x[1];d((function(){var e=function(){w(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var b=m&&!v,y=b?"transparent":"#F7FAFF",F=b?"#FFB8A5":"#FF4F17",k=Z({openDelay:0}),C=k.isDropdownVisible,E=k.hoveredElemIndex,L=k.handleOnMouseEnter,I=k.handleOnMouseLeave,M=k.handleDropdownMouseEnter,A=k.handleDropdownMouseLeave;return t(r,{children:[i(p,e({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:y,css:{gap:"24px",flexShrink:0,borderBottom:b?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:t(p,e({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,style:{gap:"24px",maxWidth:1440}},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",paddingLeft:"16px",onClick:function(){window.location.href="/"}},{children:[i(O,{fillColor:b?"#FFF":"#FF4F17"}),i(g,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),i(P,{color:b?"#FFF":"#1A1A1A"})]})),t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[i(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:j.map((function(n,r){var o=E===r;return t(p,{children:[t(p,e({onMouseEnter:function(){return L(r)},onMouseLeave:I,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){n.link&&n.isClickable&&(window.location.href=n.link)}},{children:[i(n.lefticon,{color:o?F:b?"#FFF":"#1A1A1A"}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[i(h,e({variant:"B2",colorCode:o?F:b?"#FFF":"#1A1A1A",isClickable:!0},{children:n.text})),n.rightIcon&&i(n.rightIcon,{width:20,height:20,fill:o?F:b?"#FFF":"#1A1A1A"})]}))]}),"nav-option-".concat(r)),i(q,e({show:E===r&&n.isHoverable&&C,marginTop:"64px",handleDropdownMouseEnter:M,handleDropdownMouseLeave:A,onMaskClick:A},{children:i(ee,{isOpen:E===r&&n.isHoverable&&C})}))]})}))})),s&&i(g,{style:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),i(p,{children:s?i(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:i(ue,{})})):i(f,e({className:"fw-400 fs-14 ".concat(b?"novac-login-button":"login-button"),onClick:o,style:{width:153,height:40,border:b?"1px solid #FFF":"1px solid #1A1A1A"},loading:!1},{children:i(h,e({componentNode:"span",variant:"L2",color:b?"neutral":"primary"},{children:"Login"}))}))})]}))]}))})),c&&i(K,{})]})};export{pe as Header,J as LOBS_VALUES,Q as LoyaltyType};
|
|
2
2
|
//# sourceMappingURL=ct-design-header.browser.esm.js.map
|