@hhgtech/hhg-components 1.28.64-beta-2 → 1.28.65
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/build/Plus-1389822c.js +1 -0
- package/build/WhatsApp-b1f3496a.js +1 -0
- package/build/adapters.js +1 -1
- package/build/babyGrowth.js +24 -24
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components/atoms/icons/ACharacter.d.ts +4 -0
- package/build/components/atoms/icons/Activities.d.ts +4 -0
- package/build/components/atoms/icons/ArrowDown.d.ts +4 -0
- package/build/components/atoms/icons/ArrowLeft.d.ts +4 -0
- package/build/components/atoms/icons/ArrowRight.d.ts +4 -0
- package/build/components/atoms/icons/Article.d.ts +4 -0
- package/build/components/atoms/icons/Ask.d.ts +4 -0
- package/build/components/atoms/icons/BabyBoyMB.d.ts +4 -0
- package/build/components/atoms/icons/BabyGirlMB.d.ts +4 -0
- package/build/components/atoms/icons/BarChart.d.ts +4 -0
- package/build/components/atoms/icons/Booking.d.ts +4 -0
- package/build/components/atoms/icons/Bookmark.d.ts +4 -0
- package/build/components/atoms/icons/Boy.d.ts +4 -0
- package/build/components/atoms/icons/Business.d.ts +4 -0
- package/build/components/atoms/icons/Calendar.d.ts +4 -0
- package/build/components/atoms/icons/CalendarMB.d.ts +4 -0
- package/build/components/atoms/icons/CameraCircle.d.ts +4 -0
- package/build/components/atoms/icons/Chat.d.ts +4 -0
- package/build/components/atoms/icons/Check.d.ts +4 -0
- package/build/components/atoms/icons/CheckActiveMB.d.ts +4 -0
- package/build/components/atoms/icons/CircleBorder.d.ts +4 -0
- package/build/components/atoms/icons/Clickable.d.ts +4 -0
- package/build/components/atoms/icons/ClinicPin.d.ts +4 -0
- package/build/components/atoms/icons/Close.d.ts +4 -0
- package/build/components/atoms/icons/Comment.d.ts +4 -0
- package/build/components/atoms/icons/Community.d.ts +4 -0
- package/build/components/atoms/icons/CrossLogo.d.ts +4 -0
- package/build/components/atoms/icons/Current.d.ts +4 -0
- package/build/components/atoms/icons/EditSpecial.d.ts +4 -0
- package/build/components/atoms/icons/Endorse.d.ts +4 -0
- package/build/components/atoms/icons/Envelop.d.ts +4 -0
- package/build/components/atoms/icons/Family.d.ts +4 -0
- package/build/components/atoms/icons/Font.d.ts +4 -0
- package/build/components/atoms/icons/FullScreen.d.ts +4 -0
- package/build/components/atoms/icons/GenderBoy.d.ts +4 -0
- package/build/components/atoms/icons/GenderChooseBoy.d.ts +4 -0
- package/build/components/atoms/icons/GenderChooseGirl.d.ts +4 -0
- package/build/components/atoms/icons/GenderGirl.d.ts +4 -0
- package/build/components/atoms/icons/Girl.d.ts +4 -0
- package/build/components/atoms/icons/GroupPeople.d.ts +4 -0
- package/build/components/atoms/icons/GroupPeopleSolid.d.ts +4 -0
- package/build/components/atoms/icons/Heart.d.ts +4 -0
- package/build/components/atoms/icons/Home.d.ts +4 -0
- package/build/components/atoms/icons/Hospital.d.ts +4 -0
- package/build/components/atoms/icons/Info.d.ts +4 -0
- package/build/components/atoms/icons/Kebab.d.ts +4 -0
- package/build/components/atoms/icons/Like.d.ts +4 -0
- package/build/components/atoms/icons/Link.d.ts +4 -0
- package/build/components/atoms/icons/Minus.d.ts +4 -0
- package/build/components/atoms/icons/Missed.d.ts +4 -0
- package/build/components/atoms/icons/MyCommunity.d.ts +4 -0
- package/build/components/atoms/icons/MyHealth.d.ts +4 -0
- package/build/components/atoms/icons/Oppose.d.ts +4 -0
- package/build/components/atoms/icons/Parents.d.ts +4 -0
- package/build/components/atoms/icons/Plus.d.ts +4 -0
- package/build/components/atoms/icons/PlusSpecial.d.ts +4 -0
- package/build/components/atoms/icons/Post.d.ts +4 -0
- package/build/components/atoms/icons/Recalculate.d.ts +4 -0
- package/build/components/atoms/icons/Reply.d.ts +4 -0
- package/build/components/atoms/icons/Scale.d.ts +4 -0
- package/build/components/atoms/icons/Screener.d.ts +4 -0
- package/build/components/atoms/icons/Search.d.ts +4 -0
- package/build/components/atoms/icons/ShieldCheck.d.ts +4 -0
- package/build/components/atoms/icons/Smile.d.ts +4 -0
- package/build/components/atoms/icons/Sparkle.d.ts +4 -0
- package/build/components/atoms/icons/Star.d.ts +4 -0
- package/build/components/atoms/icons/Stethoscope.d.ts +4 -0
- package/build/components/atoms/icons/StethoscopeActive.d.ts +4 -0
- package/build/components/atoms/icons/ToggleOff.d.ts +4 -0
- package/build/components/atoms/icons/ToggleOn.d.ts +4 -0
- package/build/components/atoms/icons/Trash.d.ts +4 -0
- package/build/components/atoms/icons/Upcoming.d.ts +4 -0
- package/build/components/atoms/icons/User.d.ts +4 -0
- package/build/components/atoms/icons/UserCheck.d.ts +4 -0
- package/build/components/atoms/icons/Vaccinated.d.ts +4 -0
- package/build/components/atoms/icons/Video.d.ts +4 -0
- package/build/components/atoms/icons/VideoCall.d.ts +4 -0
- package/build/components/atoms/icons/Woman.d.ts +4 -0
- package/build/components/atoms/icons/index.d.ts +58 -0
- package/build/components/atoms/input/index.styled.d.ts +0 -1
- package/build/components/atoms/pureInput/index.styled.d.ts +0 -4
- package/build/components.js +1 -1
- package/build/{constants-f9c9ab50.js → constants-2a4ad19a.js} +3 -8
- package/build/{constants-2733ce2f.js → constants-2af7a634.js} +1 -1
- package/build/constants.js +1 -1
- package/build/core-a23c80d2.js +1 -0
- package/build/{dataTransform-4a4d1cd5.js → dataTransform-2ab3c90d.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/Plus-61592057.js +1 -0
- package/build/esm/WhatsApp-5a6ef99f.js +1 -0
- package/build/esm/adapters.js +1 -1
- package/build/esm/babyGrowth.js +24 -24
- package/build/esm/cache.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components/atoms/icons/ACharacter.d.ts +4 -0
- package/build/esm/components/atoms/icons/Activities.d.ts +4 -0
- package/build/esm/components/atoms/icons/ArrowDown.d.ts +4 -0
- package/build/esm/components/atoms/icons/ArrowLeft.d.ts +4 -0
- package/build/esm/components/atoms/icons/ArrowRight.d.ts +4 -0
- package/build/esm/components/atoms/icons/Article.d.ts +4 -0
- package/build/esm/components/atoms/icons/Ask.d.ts +4 -0
- package/build/esm/components/atoms/icons/BabyBoyMB.d.ts +4 -0
- package/build/esm/components/atoms/icons/BabyGirlMB.d.ts +4 -0
- package/build/esm/components/atoms/icons/BarChart.d.ts +4 -0
- package/build/esm/components/atoms/icons/Booking.d.ts +4 -0
- package/build/esm/components/atoms/icons/Bookmark.d.ts +4 -0
- package/build/esm/components/atoms/icons/Boy.d.ts +4 -0
- package/build/esm/components/atoms/icons/Business.d.ts +4 -0
- package/build/esm/components/atoms/icons/Calendar.d.ts +4 -0
- package/build/esm/components/atoms/icons/CalendarMB.d.ts +4 -0
- package/build/esm/components/atoms/icons/CameraCircle.d.ts +4 -0
- package/build/esm/components/atoms/icons/Chat.d.ts +4 -0
- package/build/esm/components/atoms/icons/Check.d.ts +4 -0
- package/build/esm/components/atoms/icons/CheckActiveMB.d.ts +4 -0
- package/build/esm/components/atoms/icons/CircleBorder.d.ts +4 -0
- package/build/esm/components/atoms/icons/Clickable.d.ts +4 -0
- package/build/esm/components/atoms/icons/ClinicPin.d.ts +4 -0
- package/build/esm/components/atoms/icons/Close.d.ts +4 -0
- package/build/esm/components/atoms/icons/Comment.d.ts +4 -0
- package/build/esm/components/atoms/icons/Community.d.ts +4 -0
- package/build/esm/components/atoms/icons/CrossLogo.d.ts +4 -0
- package/build/esm/components/atoms/icons/Current.d.ts +4 -0
- package/build/esm/components/atoms/icons/EditSpecial.d.ts +4 -0
- package/build/esm/components/atoms/icons/Endorse.d.ts +4 -0
- package/build/esm/components/atoms/icons/Envelop.d.ts +4 -0
- package/build/esm/components/atoms/icons/Family.d.ts +4 -0
- package/build/esm/components/atoms/icons/Font.d.ts +4 -0
- package/build/esm/components/atoms/icons/FullScreen.d.ts +4 -0
- package/build/esm/components/atoms/icons/GenderBoy.d.ts +4 -0
- package/build/esm/components/atoms/icons/GenderChooseBoy.d.ts +4 -0
- package/build/esm/components/atoms/icons/GenderChooseGirl.d.ts +4 -0
- package/build/esm/components/atoms/icons/GenderGirl.d.ts +4 -0
- package/build/esm/components/atoms/icons/Girl.d.ts +4 -0
- package/build/esm/components/atoms/icons/GroupPeople.d.ts +4 -0
- package/build/esm/components/atoms/icons/GroupPeopleSolid.d.ts +4 -0
- package/build/esm/components/atoms/icons/Heart.d.ts +4 -0
- package/build/esm/components/atoms/icons/Home.d.ts +4 -0
- package/build/esm/components/atoms/icons/Hospital.d.ts +4 -0
- package/build/esm/components/atoms/icons/Info.d.ts +4 -0
- package/build/esm/components/atoms/icons/Kebab.d.ts +4 -0
- package/build/esm/components/atoms/icons/Like.d.ts +4 -0
- package/build/esm/components/atoms/icons/Link.d.ts +4 -0
- package/build/esm/components/atoms/icons/Minus.d.ts +4 -0
- package/build/esm/components/atoms/icons/Missed.d.ts +4 -0
- package/build/esm/components/atoms/icons/MyCommunity.d.ts +4 -0
- package/build/esm/components/atoms/icons/MyHealth.d.ts +4 -0
- package/build/esm/components/atoms/icons/Oppose.d.ts +4 -0
- package/build/esm/components/atoms/icons/Parents.d.ts +4 -0
- package/build/esm/components/atoms/icons/Plus.d.ts +4 -0
- package/build/esm/components/atoms/icons/PlusSpecial.d.ts +4 -0
- package/build/esm/components/atoms/icons/Post.d.ts +4 -0
- package/build/esm/components/atoms/icons/Recalculate.d.ts +4 -0
- package/build/esm/components/atoms/icons/Reply.d.ts +4 -0
- package/build/esm/components/atoms/icons/Scale.d.ts +4 -0
- package/build/esm/components/atoms/icons/Screener.d.ts +4 -0
- package/build/esm/components/atoms/icons/Search.d.ts +4 -0
- package/build/esm/components/atoms/icons/ShieldCheck.d.ts +4 -0
- package/build/esm/components/atoms/icons/Smile.d.ts +4 -0
- package/build/esm/components/atoms/icons/Sparkle.d.ts +4 -0
- package/build/esm/components/atoms/icons/Star.d.ts +4 -0
- package/build/esm/components/atoms/icons/Stethoscope.d.ts +4 -0
- package/build/esm/components/atoms/icons/StethoscopeActive.d.ts +4 -0
- package/build/esm/components/atoms/icons/ToggleOff.d.ts +4 -0
- package/build/esm/components/atoms/icons/ToggleOn.d.ts +4 -0
- package/build/esm/components/atoms/icons/Trash.d.ts +4 -0
- package/build/esm/components/atoms/icons/Upcoming.d.ts +4 -0
- package/build/esm/components/atoms/icons/User.d.ts +4 -0
- package/build/esm/components/atoms/icons/UserCheck.d.ts +4 -0
- package/build/esm/components/atoms/icons/Vaccinated.d.ts +4 -0
- package/build/esm/components/atoms/icons/Video.d.ts +4 -0
- package/build/esm/components/atoms/icons/VideoCall.d.ts +4 -0
- package/build/esm/components/atoms/icons/Woman.d.ts +4 -0
- package/build/esm/components/atoms/icons/index.d.ts +58 -0
- package/build/esm/components/atoms/input/index.styled.d.ts +0 -1
- package/build/esm/components/atoms/pureInput/index.styled.d.ts +0 -4
- package/build/esm/components.js +1 -1
- package/build/esm/{constants-773a447c.js → constants-36c1648d.js} +1 -1
- package/build/esm/{constants-71e2dd72.js → constants-ed8abdff.js} +3 -8
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-935d97e0.js → core-cdfc811a.js} +1 -1
- package/build/esm/{dataTransform-6dd48dd5.js → dataTransform-10fecdbe.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/getDynamicHealthTool-94a90aa0.js +1 -0
- package/build/esm/{getSocialList-76c66ae6.js → getSocialList-558fc075.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/{index-6eb4485b.js → index-01efa9be.js} +1 -1
- package/build/esm/index-04f183b8.js +1 -0
- package/build/esm/{index-1cb70e7d.js → index-05214244.js} +1 -1
- package/build/esm/index-07905741.js +1 -0
- package/build/esm/{index-be799035.js → index-0d9821e3.js} +1 -1
- package/build/esm/{index-1b739c0f.js → index-16d9b234.js} +1 -1
- package/build/esm/{index-33249c53.js → index-18ff3f75.js} +1 -1
- package/build/esm/index-1f2316ca.js +1 -0
- package/build/esm/index-200ec6b1.js +1 -0
- package/build/esm/index-418f072b.js +1 -0
- package/build/esm/{index-50966ef5.js → index-557e3a42.js} +1 -1
- package/build/esm/{index-9ce23cf9.js → index-5ef00905.js} +133 -133
- package/build/esm/{index-db355cb6.js → index-5f52d2b1.js} +1 -1
- package/build/esm/{index-9b291dbc.js → index-661f66bf.js} +4 -4
- package/build/esm/{index-fa0e79c9.js → index-7e4d8533.js} +1 -1
- package/build/esm/{index-f0a76afe.js → index-89127303.js} +1 -1
- package/build/esm/{index-3069179b.js → index-8c1e2ce6.js} +15 -15
- package/build/esm/index-8f4b4a7f.js +1 -0
- package/build/esm/index-a9cbaabd.js +1 -0
- package/build/esm/{index-1b2bbe20.js → index-c2e4449d.js} +1 -1
- package/build/esm/{index-312b44d3.js → index-c6fcc250.js} +1 -1
- package/build/esm/index-ebd9ace0.js +1 -0
- package/build/esm/index-ed71bf72.js +177 -0
- package/build/esm/{index-ac24da82.js → index-f03e0f09.js} +2 -2
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-1c236ab1.js → index.styled-c2100f19.js} +3 -3
- package/build/esm/{index.styles-a03d950d.js → index.styles-d3334c25.js} +30 -52
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboardingV2.js +9 -9
- package/build/esm/pwg.js +5 -5
- package/build/esm/{routing-b590590d.js → routing-a6c8f9f9.js} +1 -1
- package/build/esm/subot.js +4 -4
- package/build/esm/together.js +1 -1
- package/build/esm/{types-c6e7c169.js → types-202e947a.js} +34 -34
- package/build/esm/types-d7d54442.js +3004 -0
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-ff26e4ab.js → useCategory-3045fde3.js} +1 -1
- package/build/esm/useHealthToolCache-73b62210.js +1 -0
- package/build/esm/usePlacesAutocomplete-ff204ea8.js +1 -0
- package/build/esm/{useTranslations-e0daa580.js → useTranslations-cce18e33.js} +1 -1
- package/build/esm/{utils-e001b7cd.js → utils-508d45bb.js} +1 -1
- package/build/esm/{utils-ce0917df.js → utils-c6a7729e.js} +1 -1
- package/build/esm/utils-e3640c23.js +7 -0
- package/build/esm/vaccination.js +7 -7
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/getDynamicHealthTool-ba27b7ff.js +1 -0
- package/build/{getSocialList-ebc3bedc.js → getSocialList-50dc70b7.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/index-01eb2479.js +177 -0
- package/build/index-0242b079.js +1 -0
- package/build/index-04da6493.js +1 -0
- package/build/{index-ed0c9758.js → index-0553b781.js} +1 -1
- package/build/index-0a9fa2c4.js +2748 -0
- package/build/index-0cecb118.js +1 -0
- package/build/{index-e3b81e2b.js → index-1305e723.js} +1 -1
- package/build/{index-5b6b2c78.js → index-166c60e5.js} +1 -1
- package/build/index-1c7247cc.js +113 -0
- package/build/{index-623df7b0.js → index-25e39319.js} +1 -1
- package/build/{index-53cc6b44.js → index-499c23d5.js} +1 -1
- package/build/{index-9ed593a6.js → index-6bff2cc3.js} +1 -1
- package/build/{index-037c6d12.js → index-76d08581.js} +1 -1
- package/build/{index-c8b6a8ef.js → index-7ad5f191.js} +1 -1
- package/build/{index-d62ab182.js → index-7b33ac50.js} +1 -1
- package/build/{index-fc90134e.js → index-856f5069.js} +1 -1
- package/build/{index-6c68d5dc.js → index-9770314e.js} +1 -1
- package/build/{index-22f4fd6c.js → index-a35a2780.js} +1 -1
- package/build/index-b21da1ea.js +1 -0
- package/build/{index-0150fed8.js → index-d5e1c0b8.js} +1 -1
- package/build/index-d85d7a99.js +1 -0
- package/build/index-e05e160d.js +1 -0
- package/build/{index-c9528c05.js → index-e1263b2f.js} +2 -2
- package/build/index-f4c55cce.js +1 -0
- package/build/index.js +1 -1
- package/build/{index.styled-1958604c.js → index.styled-b45c0dd2.js} +1 -1
- package/build/{index.styles-68371264.js → index.styles-ce777fa6.js} +31 -53
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboardingV2.js +1 -1
- package/build/pwg.js +3 -3
- package/build/{routing-a7dc2189.js → routing-d3de5002.js} +1 -1
- package/build/subot.js +4 -4
- package/build/together.js +1 -1
- package/build/{types-2137cf85.js → types-61b2a9ef.js} +2 -2
- package/build/{types-3fb7aac1.js → types-d8cdfbc7.js} +202 -202
- package/build/types.js +1 -1
- package/build/{useCategory-6f99cbae.js → useCategory-7bd8370b.js} +1 -1
- package/build/{useHealthToolCache-c04067d5.js → useHealthToolCache-79d56870.js} +1 -1
- package/build/{usePlacesAutocomplete-e4483245.js → usePlacesAutocomplete-c4bd074d.js} +1 -1
- package/build/{useTranslations-7b1d2a42.js → useTranslations-e2b22984.js} +1 -1
- package/build/utils-5ea654b8.js +1 -0
- package/build/{utils-6bc70daf.js → utils-7a63c632.js} +1 -1
- package/build/{utils-15905433.js → utils-c3b0bf92.js} +1 -1
- package/build/vaccination.js +5 -5
- package/package.json +2 -4
- package/build/core-ec7c2653.js +0 -1
- package/build/esm/getDynamicHealthTool-3e47af5e.js +0 -1
- package/build/esm/index-11636ff0.js +0 -1
- package/build/esm/index-59846b43.js +0 -1
- package/build/esm/index-67859006.js +0 -1
- package/build/esm/index-7cda7811.js +0 -1
- package/build/esm/index-85405d41.js +0 -1
- package/build/esm/index-85ffc46a.js +0 -1
- package/build/esm/index-9ffeb716.js +0 -1
- package/build/esm/index-b9208fea.js +0 -1
- package/build/esm/index-d95a1b4a.js +0 -1
- package/build/esm/index-f4a8ceb8.js +0 -177
- package/build/esm/types-95984a69.js +0 -3004
- package/build/esm/useHealthToolCache-b020b169.js +0 -1
- package/build/esm/usePlacesAutocomplete-3ea89e45.js +0 -1
- package/build/esm/utils-8d710399.js +0 -8
- package/build/getDynamicHealthTool-cbff2eeb.js +0 -1
- package/build/index-1b5db579.js +0 -1
- package/build/index-62719626.js +0 -1
- package/build/index-80c4f2c2.js +0 -1
- package/build/index-95f73b67.js +0 -177
- package/build/index-a41cabac.js +0 -1
- package/build/index-b30f59f0.js +0 -2748
- package/build/index-b81934e8.js +0 -113
- package/build/index-bd51c213.js +0 -1
- package/build/index-c1e3a341.js +0 -1
- package/build/index-d2628773.js +0 -1
- package/build/index-fc387e15.js +0 -1
- package/build/utils-a9092761.js +0 -8
- /package/build/{BMI_BOYS.percentile.monthly-8adbf482.js → BMI_BOYS.percentile.monthly-5cd79b25.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-3eb941c8.js → BMI_BOYS.percentile.weekly-fc72eb47.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-2aa4e53f.js → BMI_BOYS.percentile.yearly-9f13a908.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-3718ad7a.js → BMI_BOYS.zscore.monthly-f306d58d.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-69bc9749.js → BMI_BOYS.zscore.weekly-9d80c0e2.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-9e05bae6.js → BMI_BOYS.zscore.yearly-9ade76a5.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-03676320.js → BMI_GIRLS.percentile.monthly-0318da9f.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-0f9f09a0.js → BMI_GIRLS.percentile.weekly-1f566aaa.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-2f91ff8c.js → BMI_GIRLS.percentile.yearly-215b3cba.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-0bb66eaa.js → BMI_GIRLS.zscore.monthly-bae848b2.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-f95ca6b0.js → BMI_GIRLS.zscore.weekly-2371a64f.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-9a3cf52f.js → BMI_GIRLS.zscore.yearly-9ecfbccb.js} +0 -0
- /package/build/{ChevronDown-d46a5bcb.js → ChevronDown-9a823643.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-9d7619e4.js → HEAD CIRCUM_BOYS.percentile.monthly-0d2ab2e7.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-8ead168e.js → HEAD CIRCUM_BOYS.percentile.weekly-27bac0cb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-2bf80550.js → HEAD CIRCUM_BOYS.percentile.yearly-b175db79.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-811f5f6d.js → HEAD CIRCUM_BOYS.zscore.monthly-f5c6bdd6.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-154d1691.js → HEAD CIRCUM_BOYS.zscore.weekly-bfdc4392.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-e356d046.js → HEAD CIRCUM_BOYS.zscore.yearly-14f0889d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-9ec6f154.js → HEAD CIRCUM_GIRLS.percentile.monthly-903e7189.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-65d13454.js → HEAD CIRCUM_GIRLS.percentile.weekly-748869a7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-ea1414fb.js → HEAD CIRCUM_GIRLS.percentile.yearly-2a680f48.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-409f1d06.js → HEAD CIRCUM_GIRLS.zscore.monthly-e054510e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-94a49cbc.js → HEAD CIRCUM_GIRLS.zscore.weekly-eb025087.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-03d1d7b2.js → HEAD CIRCUM_GIRLS.zscore.yearly-011649a2.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-41491e22.js → HEIGHT_BOYS.percentile.monthly-7e9898ff.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-5d4f763e.js → HEIGHT_BOYS.percentile.weekly-a7df6826.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-e9be7818.js → HEIGHT_BOYS.percentile.yearly-7f716f35.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-e25ee327.js → HEIGHT_BOYS.zscore.monthly-a180ab2d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-001f97c1.js → HEIGHT_BOYS.zscore.weekly-92934eaa.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-4a679171.js → HEIGHT_BOYS.zscore.yearly-bd2cf58f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-cccdf70f.js → HEIGHT_GIRLS.percentile.monthly-a90a6654.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-600bbb22.js → HEIGHT_GIRLS.percentile.weekly-b89741cd.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-3c159602.js → HEIGHT_GIRLS.percentile.yearly-03631447.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-98b8a7fa.js → HEIGHT_GIRLS.zscore.monthly-aac24454.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-e8a21d4f.js → HEIGHT_GIRLS.zscore.weekly-2869cc02.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-d7be5a01.js → HEIGHT_GIRLS.zscore.yearly-fc370322.js} +0 -0
- /package/build/{Subot-734c2f35.js → Subot-6f44f7d1.js} +0 -0
- /package/build/{Visible-219a2759.js → Visible-e3703df9.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-94d8bc13.js → WEIGHT_BOYS.percentile.monthly-975193d0.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-cb0bde95.js → WEIGHT_BOYS.percentile.weekly-b5c38df2.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-27457426.js → WEIGHT_BOYS.percentile.yearly-240ed2c9.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-ab05904c.js → WEIGHT_BOYS.zscore.monthly-fa43b6c3.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-d74e8f7f.js → WEIGHT_BOYS.zscore.weekly-046b9f1b.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-e638eac2.js → WEIGHT_BOYS.zscore.yearly-ae9412de.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-b6129dff.js → WEIGHT_GIRLS.percentile.monthly-6d56fb24.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-62036203.js → WEIGHT_GIRLS.percentile.weekly-f9e08e94.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-2474c547.js → WEIGHT_GIRLS.percentile.yearly-980c7b20.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-52a09e85.js → WEIGHT_GIRLS.zscore.monthly-f27b0da0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-2b4b7574.js → WEIGHT_GIRLS.zscore.weekly-666d490e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-fff81daf.js → WEIGHT_GIRLS.zscore.yearly-5f28002e.js} +0 -0
- /package/build/{animation-00e9b0d8.js → animation-e73dc040.js} +0 -0
- /package/build/{cookieHelper-4c758514.js → cookieHelper-3b9ceb4e.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-a50410b7.js → BMI_BOYS.percentile.monthly-5245a76e.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-a9595be9.js → BMI_BOYS.percentile.weekly-69f6d409.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-0426e66f.js → BMI_BOYS.percentile.yearly-6b7c67a5.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-15f8703a.js → BMI_BOYS.zscore.monthly-54f7384d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-051f52a7.js → BMI_BOYS.zscore.weekly-208ea2d6.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-5510bacf.js → BMI_BOYS.zscore.yearly-95fb8846.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-52442598.js → BMI_GIRLS.percentile.monthly-ffd9ffc6.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-14ec588c.js → BMI_GIRLS.percentile.weekly-ca8fcfee.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-3f7db829.js → BMI_GIRLS.percentile.yearly-b30eb957.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-7d8df34b.js → BMI_GIRLS.zscore.monthly-4fd0f8f1.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-8f94f576.js → BMI_GIRLS.zscore.weekly-d6b98de6.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-55d9b77e.js → BMI_GIRLS.zscore.yearly-fbb5ee44.js} +0 -0
- /package/build/esm/{ChevronDown-40b10892.js → ChevronDown-8452962e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-fbeaefb9.js → HEAD CIRCUM_BOYS.percentile.monthly-09c89acf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-f9f5ca74.js → HEAD CIRCUM_BOYS.percentile.weekly-a15b9bbb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-c9b312a9.js → HEAD CIRCUM_BOYS.percentile.yearly-c6feccdc.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-13dc3335.js → HEAD CIRCUM_BOYS.zscore.monthly-591fe4e6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-bbb37bc8.js → HEAD CIRCUM_BOYS.zscore.weekly-6e915af3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-106d9d42.js → HEAD CIRCUM_BOYS.zscore.yearly-59e4bfc4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-7ea6555c.js → HEAD CIRCUM_GIRLS.percentile.monthly-303fa4d4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-be61f273.js → HEAD CIRCUM_GIRLS.percentile.weekly-740b13f4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-4413a297.js → HEAD CIRCUM_GIRLS.percentile.yearly-d0589d47.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-d4b0116a.js → HEAD CIRCUM_GIRLS.zscore.monthly-5d8fda84.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-9f3be1f1.js → HEAD CIRCUM_GIRLS.zscore.weekly-a8c3171f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-6b854cb0.js → HEAD CIRCUM_GIRLS.zscore.yearly-95746ad3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-49d8bdfc.js → HEIGHT_BOYS.percentile.monthly-63abb64c.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-69c0786d.js → HEIGHT_BOYS.percentile.weekly-e084fc63.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-7b0d90e4.js → HEIGHT_BOYS.percentile.yearly-fe73951b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-04075fe3.js → HEIGHT_BOYS.zscore.monthly-cd438afc.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-628ef3ab.js → HEIGHT_BOYS.zscore.weekly-654e6872.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-ae2e0a80.js → HEIGHT_BOYS.zscore.yearly-f93b88e1.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-41f4bb91.js → HEIGHT_GIRLS.percentile.monthly-a7fceb4a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-219be2d7.js → HEIGHT_GIRLS.percentile.weekly-0ffd736b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-cc5872ab.js → HEIGHT_GIRLS.percentile.yearly-bc5ba895.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-7988762a.js → HEIGHT_GIRLS.zscore.monthly-a527f6b5.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-a7d4c5b1.js → HEIGHT_GIRLS.zscore.weekly-0432321b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-1249e6a9.js → HEIGHT_GIRLS.zscore.yearly-580f5550.js} +0 -0
- /package/build/esm/{Subot-0e4849b0.js → Subot-ade21804.js} +0 -0
- /package/build/esm/{Visible-b1de2e9d.js → Visible-39f22e26.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-503f63ff.js → WEIGHT_BOYS.percentile.monthly-f146d4b0.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-2fec0fd8.js → WEIGHT_BOYS.percentile.weekly-b90291b2.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-f0de1169.js → WEIGHT_BOYS.percentile.yearly-1c5bc721.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-c51d03c4.js → WEIGHT_BOYS.zscore.monthly-e7f77bb7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-c146b30b.js → WEIGHT_BOYS.zscore.weekly-a964f7fe.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-8479f33d.js → WEIGHT_BOYS.zscore.yearly-0cd3170e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-861e86eb.js → WEIGHT_GIRLS.percentile.monthly-963226db.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-876b1e59.js → WEIGHT_GIRLS.percentile.weekly-137218b5.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-e3a3e2af.js → WEIGHT_GIRLS.percentile.yearly-ec29d8fe.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-40b17ebe.js → WEIGHT_GIRLS.zscore.monthly-14843702.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-3a3230ea.js → WEIGHT_GIRLS.zscore.weekly-43d4a42b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-5b004947.js → WEIGHT_GIRLS.zscore.yearly-878837ef.js} +0 -0
- /package/build/esm/{animation-19ab3c72.js → animation-1d694586.js} +0 -0
- /package/build/esm/{cookieHelper-76c1b6e2.js → cookieHelper-3fe8fdf3.js} +0 -0
- /package/build/esm/{index-9f0fde05.js → index-761ce6cc.js} +0 -0
- /package/build/esm/{index-74c1cc82.js → index-8cf56535.js} +0 -0
- /package/build/esm/{index-42067455.js → index-9a776a7f.js} +0 -0
- /package/build/esm/{isProduction-e92e11fa.js → isProduction-8ae381c3.js} +0 -0
- /package/build/esm/{localizeNumberFormat-a278edeb.js → localizeNumberFormat-5846bb60.js} +0 -0
- /package/build/esm/{normalizeLink-9cf3dc30.js → normalizeLink-cfd22388.js} +0 -0
- /package/build/esm/{number-e6dc4030.js → number-c9fbe4ab.js} +0 -0
- /package/build/esm/{paths-0df3c801.js → paths-dfd6bdd2.js} +0 -0
- /package/build/esm/{theme-c0efd55f.js → theme-2f0d6367.js} +0 -0
- /package/build/esm/{translationsContext-4a21fabd.js → translationsContext-d3dc4282.js} +0 -0
- /package/build/esm/{tslib.es6-6fef0731.js → tslib.es6-4a7efa3e.js} +0 -0
- /package/build/esm/{types-c948c249.js → types-0d3813ec.js} +0 -0
- /package/build/esm/{useIsInit-0cdfffaf.js → useIsInit-8d70a700.js} +0 -0
- /package/build/esm/{useOutsideClick-2f40751d.js → useOutsideClick-7826d461.js} +0 -0
- /package/build/esm/{useScrollbarSize-6f788326.js → useScrollbarSize-7519cdcf.js} +0 -0
- /package/build/esm/{useUniqueId-10c0adc1.js → useUniqueId-463b8d94.js} +0 -0
- /package/build/esm/{utils-00f9dcec.js → utils-597f4846.js} +0 -0
- /package/build/{index-8973236c.js → index-4da2b598.js} +0 -0
- /package/build/{index-95223466.js → index-56b73a7a.js} +0 -0
- /package/build/{index-2f7900de.js → index-c2ff8b54.js} +0 -0
- /package/build/{isProduction-e65a19fd.js → isProduction-822a7286.js} +0 -0
- /package/build/{localizeNumberFormat-195e188c.js → localizeNumberFormat-f54c1770.js} +0 -0
- /package/build/{normalizeLink-292e450c.js → normalizeLink-f9713014.js} +0 -0
- /package/build/{number-814b5c33.js → number-3835f480.js} +0 -0
- /package/build/{paths-c1558ac9.js → paths-0bb9c960.js} +0 -0
- /package/build/{theme-be6da0df.js → theme-b5bd9d5b.js} +0 -0
- /package/build/{translationsContext-58bc3a86.js → translationsContext-4202bcac.js} +0 -0
- /package/build/{tslib.es6-0aa100a0.js → tslib.es6-94d9fc9f.js} +0 -0
- /package/build/{types-9cb98828.js → types-baa14b03.js} +0 -0
- /package/build/{useIsInit-0ba60d04.js → useIsInit-8be51b79.js} +0 -0
- /package/build/{useOutsideClick-04665c58.js → useOutsideClick-b08de0a8.js} +0 -0
- /package/build/{useScrollbarSize-c6f60120.js → useScrollbarSize-f6774988.js} +0 -0
- /package/build/{useUniqueId-f7fd741a.js → useUniqueId-ff7774a5.js} +0 -0
- /package/build/{utils-cc67513f.js → utils-82e9e1c2.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{css as o}from"styled-components";import{t as r}from"./theme-
|
|
1
|
+
import e,{css as o}from"styled-components";import{t as r}from"./theme-2f0d6367.js";import{M as a}from"./utils-597f4846.js";import{_ as t}from"./tslib.es6-4a7efa3e.js";import i,{useState as n,forwardRef as s,createContext as l,useEffect as d,Fragment as p}from"react";import{L as c,b as g,d as x,e as h}from"./constants-ed8abdff.js";import{s as u,e as b,b as m,f,c as v,g as w,a as y,d as $}from"./animation-1d694586.js";import{createStyles as k,rem as z}from"@mantine/core";import C from"react-keyed-flatten-children";const E=e.div`
|
|
2
2
|
background-color: var(--background-color, transparent);
|
|
3
3
|
color: white;
|
|
4
4
|
cursor: pointer;
|
|
@@ -54,7 +54,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
54
54
|
object-fit: cover;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
`,
|
|
57
|
+
`,j=e.div`
|
|
58
58
|
position: relative;
|
|
59
59
|
|
|
60
60
|
> div {
|
|
@@ -72,7 +72,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
${e=>e.hasIcon&&"\n svg {\n width: 40px;\n height: 40px;\n }\n "}
|
|
75
|
-
`,
|
|
75
|
+
`,B=e.h4`
|
|
76
76
|
position: relative;
|
|
77
77
|
line-height: 18px;
|
|
78
78
|
|
|
@@ -117,11 +117,11 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
117
117
|
font-size: 16px;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`,I=e.hr`
|
|
121
121
|
border-width: 1px;
|
|
122
122
|
border-color: ${r.colors.neutral200};
|
|
123
123
|
border-style: ${e=>e.dividerType};
|
|
124
|
-
`,
|
|
124
|
+
`,R=e.div`
|
|
125
125
|
position: relative;
|
|
126
126
|
box-sizing: border-box;
|
|
127
127
|
border: 1px solid ${r.colors.gray200};
|
|
@@ -171,7 +171,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
171
171
|
&:hover {
|
|
172
172
|
box-shadow: 0 0 2px 2px ${r.colors.primary200};
|
|
173
173
|
}
|
|
174
|
-
`,
|
|
174
|
+
`,S=e.div`
|
|
175
175
|
padding: 12px 18px 12px 16px;
|
|
176
176
|
cursor: pointer;
|
|
177
177
|
&[data-dropdown-open] {
|
|
@@ -185,7 +185,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
185
185
|
height: 16px;
|
|
186
186
|
width: 16px;
|
|
187
187
|
}
|
|
188
|
-
`,
|
|
188
|
+
`,L=e.ul`
|
|
189
189
|
position: absolute;
|
|
190
190
|
top: 100%;
|
|
191
191
|
right: 0;
|
|
@@ -204,7 +204,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
204
204
|
border: 1px solid ${r.colors.gray200};
|
|
205
205
|
filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04));
|
|
206
206
|
}
|
|
207
|
-
`,
|
|
207
|
+
`,N=e.li`
|
|
208
208
|
margin: 8px;
|
|
209
209
|
padding: 12px 18px 12px 16px;
|
|
210
210
|
border-radius: ${r.borderRadius};
|
|
@@ -213,7 +213,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
213
213
|
:active {
|
|
214
214
|
background: ${r.colors.gray100};
|
|
215
215
|
}
|
|
216
|
-
`,
|
|
216
|
+
`,A=e.div`
|
|
217
217
|
display: flex;
|
|
218
218
|
align-items: center;
|
|
219
219
|
margin-right: 8px;
|
|
@@ -222,7 +222,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
222
222
|
height: 16px;
|
|
223
223
|
width: 16px;
|
|
224
224
|
}
|
|
225
|
-
`,
|
|
225
|
+
`,M=e.div`
|
|
226
226
|
--columns: var(--grid-template-columns, repeat(var(--columns-count), 1fr));
|
|
227
227
|
--columns-desktop: var(
|
|
228
228
|
--grid-template-columns-desktop,
|
|
@@ -240,7 +240,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
240
240
|
> * {
|
|
241
241
|
justify-self: var(--justify-children);
|
|
242
242
|
}
|
|
243
|
-
`,
|
|
243
|
+
`,D=e.div`
|
|
244
244
|
display: flex;
|
|
245
245
|
align-items: center;
|
|
246
246
|
justify-content: space-between;
|
|
@@ -256,7 +256,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
256
256
|
color: ${r.colors.white};
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
`,
|
|
259
|
+
`,K=e.div`
|
|
260
260
|
display: flex;
|
|
261
261
|
width: 32px;
|
|
262
262
|
height: 32px;
|
|
@@ -283,7 +283,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
`,
|
|
286
|
+
`,O=e.li`
|
|
287
287
|
display: flex;
|
|
288
288
|
width: 32px;
|
|
289
289
|
height: 32px;
|
|
@@ -305,7 +305,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
305
305
|
line-height: 32px;
|
|
306
306
|
text-align: center;
|
|
307
307
|
}
|
|
308
|
-
`,
|
|
308
|
+
`,P=e.div`
|
|
309
309
|
position: relative;
|
|
310
310
|
width: 100%;
|
|
311
311
|
|
|
@@ -394,29 +394,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
|
|
398
|
-
display: inline-block;
|
|
399
|
-
margin-bottom: 4px;
|
|
400
|
-
color: ${r.colors.gray600};
|
|
401
|
-
font-weight: ${r.sizes.fwBold};
|
|
402
|
-
`;const K=e.label`
|
|
403
|
-
color: ${r.colors.red700};
|
|
404
|
-
font-weight: ${r.sizes.fwRegular};
|
|
405
|
-
`,O=e.div`
|
|
406
|
-
position: absolute;
|
|
407
|
-
top: 50%;
|
|
408
|
-
right: 16px;
|
|
409
|
-
display: inline-flex;
|
|
410
|
-
cursor: pointer;
|
|
411
|
-
transform: translateY(-50%);
|
|
412
|
-
`,P=e.div`
|
|
413
|
-
position: absolute;
|
|
414
|
-
top: 50%;
|
|
415
|
-
left: 16px;
|
|
416
|
-
display: inline-flex;
|
|
417
|
-
cursor: default;
|
|
418
|
-
transform: translateY(-50%);
|
|
419
|
-
`,F=i.forwardRef(((e,o)=>{var{name:r,errorMessage:a,autoComplete:s="off",defaultValue:l,actionIcon:d,displayIcon:p,isDeleteAction:g,onActionClick:x,label:h,placeholder:u,className:b,onChange:m,onKeyPress:f,isDisabled:w,CustomInput:v,size:y,style:$,autoFocus:k,type:z="text",isNumerousKeyboard:C=!1,onFocus:E,enterKeyHint:j,nativeOnChange:B}=e,R=t(e,["name","errorMessage","autoComplete","defaultValue","actionIcon","displayIcon","isDeleteAction","onActionClick","label","placeholder","className","onChange","onKeyPress","isDisabled","CustomInput","size","style","autoFocus","type","isNumerousKeyboard","onFocus","enterKeyHint","nativeOnChange"]);const[I,S]=n(l);return i.createElement(D,{"data-size":y,className:b,"data-has-action-icon":!!d||void 0,"data-has-display-icon":!!p||void 0,"data-has-error":a&&a.length>0||void 0,style:$},h&&i.createElement(c,{size:"label2",htmlFor:r,className:"inputLabel"},h),i.createElement("div",{style:{position:"relative"}},v||i.createElement("input",Object.assign({id:r,name:r,placeholder:u,onChange:null!=B?B:e=>{return o=e.target.value,S(o),void m(o);var o},onKeyPress:f,type:z,"aria-label":z,disabled:w,value:I,autoComplete:s,ref:o,autoFocus:k,inputMode:C||"number"===z?"numeric":z,pattern:C?"[0-9]*":".*",onFocus:E,enterKeyHint:j},R)),p&&i.createElement(P,{className:"displayIcon"},p),d&&i.createElement(O,{className:"actionIcon",onClick:()=>{var e;g&&(S(""),null===(e=o.current)||void 0===e||e.focus()),x&&x()}},d)),a&&a.length>0&&i.createElement(K,{className:"errorLabel"},a))}));F.displayName="PureInput";const T=e.div`
|
|
397
|
+
`,F=i.forwardRef(((e,o)=>{var{name:r,errorMessage:a,autoComplete:s="off",defaultValue:l,actionIcon:d,displayIcon:p,isDeleteAction:u,onActionClick:b,label:m,placeholder:f,className:v,onChange:w,onKeyPress:y,isDisabled:$,CustomInput:k,size:z,style:C,autoFocus:E,type:j="text",isNumerousKeyboard:B=!1,onFocus:I,enterKeyHint:R,nativeOnChange:S}=e,L=t(e,["name","errorMessage","autoComplete","defaultValue","actionIcon","displayIcon","isDeleteAction","onActionClick","label","placeholder","className","onChange","onKeyPress","isDisabled","CustomInput","size","style","autoFocus","type","isNumerousKeyboard","onFocus","enterKeyHint","nativeOnChange"]);const[N,A]=n(l);return i.createElement(P,{"data-size":z,className:v,"data-has-action-icon":!!d||void 0,"data-has-display-icon":!!p||void 0,"data-has-error":a&&a.length>0||void 0,style:C},m&&i.createElement(c,{size:"label2",htmlFor:r,className:"inputLabel"},m),i.createElement("div",{style:{position:"relative"}},k||i.createElement("input",Object.assign({id:r,name:r,placeholder:f,onChange:null!=S?S:e=>{return o=e.target.value,A(o),void w(o);var o},onKeyPress:y,type:j,"aria-label":j,disabled:$,value:N,autoComplete:s,ref:o,autoFocus:E,inputMode:B||"number"===j?"numeric":j,pattern:B?"[0-9]*":".*",onFocus:I,enterKeyHint:R},L)),p&&i.createElement(g,{className:"displayIcon"},p),d&&i.createElement(x,{className:"actionIcon",onClick:()=>{var e;u&&(A(""),null===(e=o.current)||void 0===e||e.focus()),b&&b()}},d)),a&&a.length>0&&i.createElement(h,{className:"errorLabel"},a))}));F.displayName="PureInput";const T=e.div`
|
|
420
398
|
--padding-horizontal: 8px;
|
|
421
399
|
--pading-vertical: 2px;
|
|
422
400
|
display: flex;
|
|
@@ -465,9 +443,9 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
465
443
|
content: '';
|
|
466
444
|
transition: 0.3s;
|
|
467
445
|
}
|
|
468
|
-
`,q),
|
|
446
|
+
`,q),G=e.span`
|
|
469
447
|
padding-left: 15px;
|
|
470
|
-
`,
|
|
448
|
+
`,W=e.div`
|
|
471
449
|
height: ${U};
|
|
472
450
|
|
|
473
451
|
input[type='checkbox'] {
|
|
@@ -489,7 +467,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
489
467
|
transform: translateX(-100%);
|
|
490
468
|
}
|
|
491
469
|
}
|
|
492
|
-
`,
|
|
470
|
+
`,X=e.div`
|
|
493
471
|
textarea {
|
|
494
472
|
width: 100%;
|
|
495
473
|
height: var(--textarea-height, 116px);
|
|
@@ -513,7 +491,7 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
513
491
|
cursor: not-allowed;
|
|
514
492
|
}
|
|
515
493
|
}
|
|
516
|
-
`,
|
|
494
|
+
`,Y=i.forwardRef((({height:e,placeholder:o,labelText:r,labelColor:a,id:t,name:n,onChange:s,value:l,className:d,onKeyPress:p,disabled:g=!1},x)=>i.createElement(X,{className:d,style:{"--textarea-height":e||"116px"}},r&&i.createElement(c,{size:"label2",style:{color:a||"#595959"},htmlFor:t},r),i.createElement("textarea",{name:n,ref:x,placeholder:o,id:t,onChange:e=>s&&s(e.target.value),onKeyPress:e=>p&&p(e),value:l,disabled:g})))),_=e.div`
|
|
517
495
|
display: flex;
|
|
518
496
|
cursor: pointer;
|
|
519
497
|
|
|
@@ -683,11 +661,11 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
683
661
|
width: 100%;
|
|
684
662
|
border-radius: 0px 0px 6px 6px;
|
|
685
663
|
${r?o`
|
|
686
|
-
animation: ${
|
|
664
|
+
animation: ${y} ${Q} ease-in-out forwards;
|
|
687
665
|
`:null}
|
|
688
666
|
|
|
689
667
|
&.slideOut {
|
|
690
|
-
animation: ${
|
|
668
|
+
animation: ${$} ${Q} ease-in-out forwards;
|
|
691
669
|
}
|
|
692
670
|
`;case"right":return o`
|
|
693
671
|
right: 0;
|
|
@@ -696,22 +674,22 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
696
674
|
border-radius: 6px 0px 0px 6px;
|
|
697
675
|
|
|
698
676
|
${r?o`
|
|
699
|
-
animation: ${
|
|
677
|
+
animation: ${v} ${Q} ease-in-out forwards;
|
|
700
678
|
`:null}
|
|
701
679
|
|
|
702
680
|
&.slideOut {
|
|
703
|
-
animation: ${
|
|
681
|
+
animation: ${w} ${Q} ease-in-out forwards;
|
|
704
682
|
}
|
|
705
683
|
`;case"bottom":return o`
|
|
706
684
|
bottom: 0;
|
|
707
685
|
width: 100%;
|
|
708
686
|
border-radius: 6px 6px 0px 0px;
|
|
709
687
|
${r?o`
|
|
710
|
-
animation: ${
|
|
688
|
+
animation: ${u} ${Q} ease-in-out forwards;
|
|
711
689
|
`:null}
|
|
712
690
|
|
|
713
691
|
&.slideOut {
|
|
714
|
-
animation: ${
|
|
692
|
+
animation: ${b} ${Q} ease-in-out forwards;
|
|
715
693
|
}
|
|
716
694
|
`;case"left":return o`
|
|
717
695
|
left: 0;
|
|
@@ -720,11 +698,11 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
720
698
|
border-radius: 0px 6px 6px 0px;
|
|
721
699
|
|
|
722
700
|
${r?o`
|
|
723
|
-
animation: ${
|
|
701
|
+
animation: ${m} ${Q} ease-in-out forwards;
|
|
724
702
|
`:null}
|
|
725
703
|
|
|
726
704
|
&.slideOut {
|
|
727
|
-
animation: ${
|
|
705
|
+
animation: ${f} ${Q} ease-in-out forwards;
|
|
728
706
|
}
|
|
729
707
|
`;default:return o`
|
|
730
708
|
left: 0;
|
|
@@ -733,11 +711,11 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
733
711
|
border-radius: 0px 6px 6px 0px;
|
|
734
712
|
|
|
735
713
|
${r?o`
|
|
736
|
-
animation: ${
|
|
714
|
+
animation: ${u} ${Q} ease-in-out forwards;
|
|
737
715
|
`:null}
|
|
738
716
|
|
|
739
717
|
&.slideOut {
|
|
740
|
-
animation: ${
|
|
718
|
+
animation: ${b} ${Q} ease-in-out forwards;
|
|
741
719
|
}
|
|
742
720
|
`}})(e.placement,e.open)}
|
|
743
721
|
`,oe=e.div`
|
|
@@ -836,4 +814,4 @@ import e,{css as o}from"styled-components";import{t as r}from"./theme-c0efd55f.j
|
|
|
836
814
|
height: 40px;
|
|
837
815
|
}
|
|
838
816
|
}
|
|
839
|
-
`;var ie=
|
|
817
|
+
`;var ie=k((e=>({root:{display:"inline-block",flexShrink:0,padding:"2px 0.5rem",marginLeft:"4px",borderRadius:e.radius.xs,fontSize:"12px",fontWeight:400,lineHeight:"18px",'&[data-label-type="admin"]':{background:e.primaryColor[0],color:e.primaryColor[9]},'&[data-label-type="local admin"]':{background:e.primaryColor[8]},'&[data-label-type="ambassador"]':{background:e.colors.green[4]},'&[data-label-type="expert"]':{background:e.colors.yellow[6]},'&[data-label-type="moderator"]':{background:e.colors.red[0],color:e.colors.red[8]},'&[data-label-type="sponsor"]':{background:e.colors.teal[4]},'&[data-label-type="guide"]':{background:e.colors.teal[4]},'&[data-label-type="influencer"]':{background:e.colors.teal[4]}}})));const ne=l({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1}),se=({children:e,onStepChange:o})=>{const[r,a]=n(0),[t,s]=n(0),l=i.Children.count(e);d((()=>{s(l-1)}),[l]),d((()=>{null==o||o(r)}),[r]);return i.createElement(ne.Provider,{value:{currentStep:r,setCurrentStep:a,setMaxStep:s,nextStep:()=>r+1<=t&&a(r+1),prevStep:()=>r-1>=0&&a(r-1)}},C(e).map(((e,o)=>{const a=o===r;return i.createElement(p,{key:o},i.isValidElement(e)?e.props.alwaysRender||a?i.cloneElement(e,{isActive:o===r,stepIndex:o}):null:a?e:null)})))};var le=k((e=>({root:{},wrapper:{gap:z(8)},groupErr:{fontSize:z(14)},itemRoot:{flexGrow:1,width:"50%",'&[data-checked="true"]':{".mantine-Radio-label":{borderColor:e.fn.primaryColor()}}},itemLabelWrapper:{padding:0,width:"100%"},itemLabel:{position:"relative",padding:`${z(6)} ${z(16)}`,border:`1px solid ${e.colors.gray[2]}`,borderRadius:z(4),cursor:"pointer",'&[data-disabled="true"]':{background:e.colors.gray[1],color:`${e.colors.gray[4]} !important`,img:{opacity:.5}},img:{height:z(26)}},itemInner:{display:"none"}})));export{oe as A,ae as B,te as C,F as P,se as S,Y as T,ne as a,E as b,j as c,B as d,R as e,S as f,H as g,L as h,N as i,A as j,M as k,D as l,K as m,O as n,T as o,W as p,V as q,G as r,_ as s,J as t,le as u,I as v,ie as w,re as x,Z as y,ee as z};
|
package/build/esm/lead.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./tslib.es6-6fef0731.js";import a,{createContext as l,useState as n,useEffect as o,useMemo as i,useRef as r,useContext as s}from"react";import d from"lodash/debounce";import{v1 as c}from"uuid";import{B as m}from"./index-33249c53.js";import{C as u}from"./index-6eb4485b.js";import{Portal as p,Box as h,Transition as g,Overlay as v}from"@mantine/core";import{T as b}from"./index-d95a1b4a.js";import"./index.styles-a03d950d.js";import{S as f,d as y,c as k,R as _,P as E,N as w}from"./index-3069179b.js";import"./constants-71e2dd72.js";import"./Subot-0e4849b0.js";import"./utils-e001b7cd.js";import{b as C,a as N}from"./utils-00f9dcec.js";import{D as T}from"./index-1b739c0f.js";import{t as S}from"./theme-c0efd55f.js";import{T as x}from"./translationsContext-4a21fabd.js";import"string-format";import"@mantine/hooks";import"./index-1cb70e7d.js";import"./utils-8d710399.js";import"./index.styled-1c236ab1.js";import"./index-9f0fde05.js";import{M as O}from"./utils-ce0917df.js";import"@mantine/dates";import{u as P,G as B}from"./usePlacesAutocomplete-3ea89e45.js";import{createFormContext as j}from"@mantine/form";import{u as L}from"./useTranslations-e0daa580.js";import{H as $}from"./index-b9208fea.js";import{createPortal as I}from"react-dom";import{g as A,s as D}from"./cookieHelper-76c1b6e2.js";import U from"dayjs";import"./isProduction-e92e11fa.js";import"styled-components";import"./animation-19ab3c72.js";import"react-keyed-flatten-children";import"@hhgtech/icons/other";import"@mantine/carousel";import"classnames";import"./useUniqueId-10c0adc1.js";import"@hhgtech/icons/core";import"date-fns/locale";import"slugify";const H=1,R=2;let M="https://dev.leadgen.hellobacsi.com/";const F=1,W=2;let V="";M.includes("localhost")&&(M="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(V="pink");let q="https://"+location.hostname+location.pathname+location.search;q=q.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const J={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},Y=J[document.documentElement.lang]||J["vi-VN"];const z={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var G={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const K={"en-PH":G,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មានចាំបាច់ដែលត្រូវបំពេញ","validator.email":"សូមវាយអាសយដ្ឋានអ៊ីម៉ែលឲ្យបានត្រឹមត្រូវ","validator.number":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.digits":"វាយបញ្ចូលបានតែលេខប៉ុណ្ណោះ","validator.maxlength":"សូមវាយបញ្ចូលកុំឲ្យលើស {0} តួអក្សរ","validator.minlength":"សូមវាយបញ្ចូលតិចបំផុត {0} តួអក្ស","validator.phone":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":G},Q=e=>{const t=K[e];return t||K["en-PH"]},X=l({}),Z=e=>{const[t,a]=n(16),[l,i]=n(9),[r,s]=n(!1);return o((()=>{if(s(!1),e){const t=new Image;t.addEventListener("load",(()=>{a(t.naturalWidth),i(t.naturalHeight),s(!0)})),t.addEventListener("error",(()=>{a(16),i(9),s(!0)})),t.src=e}else a(16),i(9),s(!0)}),[e]),{loaded:r,width:t,height:l}},ee=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),te=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>{const{width:s,height:d,loaded:c}=Z(o),{width:m,height:u,loaded:p}=Z(n);return c&&p?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o,style:{aspectRatio:`${s}/${d}`}}),a.createElement("img",{className:"le-only-desktop",src:n,style:{aspectRatio:`${m}/${u}`}})),a.createElement(ee,{onClose:i,containerClassName:"close-button-top-right"})))):null},ae=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>{const{width:p,height:h,loaded:g}=Z(c),{width:v,height:b,loaded:f}=Z(d);return g&&f?a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5,aspectRatio:`${v}/${b}`},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(ee,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100,aspectRatio:`${p}/${h}`},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(ee,{onClose:m,containerClassName:"close-button-top-right"}))))):null};const le=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},ne={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${le.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},oe={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${le.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},ie=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),oe.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},re=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),ne.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},se=({phone:e,type:t})=>ne.call({url:"phone"===t?"api/sms/otp":"api/sms/whatsapp_otp",method:"post",data:{phone_number:"phone"===t?e.replace("+",""):e}}),de=({phone:e,otp:t,type:a})=>ne.call({url:"phone"===a?"api/sms/verify":"api/sms/whatsapp_verify",method:"post",data:{otp_code:t,phone_number:"phone"===a?e.replace("+",""):e}}),ce={email:{},phone:{}},me=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ce[n][o]){if(ce[n][o].value)return i;if(!ce[n][o].value&&ce[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield re({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield ie({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ce[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),[ue,pe,he]=j(),ge=["places"],ve=({name:e,placeholder:t,locale:l})=>{var s;const d=pe(),[c,m]=n(""),[u,p]=n(""),{predictions:h}=P(c,"","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=n(null),[b,y]=n(!1),k=r(Math.random().toString(36).substring(7)),_=i((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return o((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:B,libraries:ge,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(f,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:_,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+k.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},be=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${V}`},e),fe=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${V}`},e),ye=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=pe();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:u,align:p,listQuestion:h,isSendMailChimp:g=!1,newtab:v,url:b}=d;switch(s){case"TitleBlock":return a.createElement(fe,{key:r,align:p},u);case"SubtitleBlock":return a.createElement(be,{key:r,align:p},u);case"TextBlock":return a.createElement(k,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:u},i.getInputProps(u)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:u},i.getInputProps(u)));case"EmailBlock":return a.createElement(k,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:u},i.getInputProps(u)));case"PhoneOtpBlock":case"WhatsappOtpBlock":case"PhoneBlock":{const e=t+"-"+u+"-"+r;return a.createElement(k.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(u)),a.createElement(E,{name:u,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(u,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(ve,{key:r,name:u,placeholder:c,locale:l});case"DateBlock":return a.createElement(a.Fragment,null,a.createElement(T,Object.assign({withAsterisk:!0,key:r,type:"default",name:u,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(u))),a.createElement("input",{type:"hidden",name:u,"data-control":"date"}));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:v?"blank":"parrent",href:b,style:{textDecoration:"none"}},a.createElement(m,{type:"button",size:"md",className:`lead-modal__btn ${V}`,onClick:()=>{null==n||n(),null==o||o()}},u)));case"CheckboxBlock":return a.createElement(a.Fragment,null,g&&a.createElement("div",{style:{display:"none"},"data-name":u+"-mailchimp"}),a.createElement(y.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md",sx:{display:"flex",flexDirection:"column",gap:8}},i.getInputProps(u)),h.map(((e,t)=>a.createElement(y,{name:u,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,g&&a.createElement(k,{type:"hidden",name:u+"-mailchimp",value:g}),a.createElement(_.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(u)),h.map(((e,t)=>a.createElement(_,{name:u,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":u,"data-control":"dropdown"}),a.createElement(f,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:u,data:h.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(u))));case"TncBlock":const s=i.getInputProps("TNC-"+e.id);return a.createElement(a.Fragment,null,a.createElement(y,Object.assign({name:"TNC-"+e.id,key:e.id,label:a.createElement("p",{className:"lead-modal__tnc-link",dangerouslySetInnerHTML:{__html:d.valueHTML}}),className:"tnc-block","data-control":"checkbox"},s,{error:s.error?a.createElement(a.Fragment,null):void 0})))}return null})))},ke=({otpData:e,onSuccess:l,autoSendWhenOpen:i})=>{const{t:s}=L(),d=e.phone,c=e.type,[u,p]=n(""),[h,g]=n(!1),[v,f]=n(i?0:60),y=r(null),[_,E]=n(),[w,C]=n(""),N=r(),[T,x]=n(!1);o((()=>{t(void 0,void 0,void 0,(function*(){var e;if(!N.current){const e=yield import("react-phone-number-input");N.current=e.formatPhoneNumberIntl}C((null===(e=N.current)||void 0===e?void 0:e.call(N,d))||d)}))}),[d]);const O=()=>t(void 0,void 0,void 0,(function*(){var e;if(!d)return;const t=yield se({phone:d,type:c}),a=null===(e=null==t?void 0:t._messages)||void 0===e?void 0:e[0];"Send sms successfully"===a||"Send WhatsApp successfully"===a?(f(60),setTimeout((()=>{y.current&&(y.current.focus(),y.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===a?l():E(a||"Something went wrong!")}));return o((()=>{setTimeout((()=>{v>0&&f((e=>e-1))}),1e3)}),[v]),o((()=>{i&&!v&&O()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:e=>{e.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!d||!u)return;x(!0);const e=yield de({phone:d,otp:u,type:c}),t=null==e?void 0:e._messages[0];"Verify successfully"===t||"Verify WhatsApp OTP sucess"===t||"This phone number was verified"===t?l():E(t||"something Wrong"),x(!1)}))},className:"lead-phone-otp-form"},a.createElement($,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(b,{size:"p1",color:S.colors.gray600},s("lead.otp.desc",{phone:w})),a.createElement(k,{ref:y,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:u,maxLength:6,onChange:e=>{g(!0),p(e),E(h&&!e?"OTP is required":void 0)},error:h?_:void 0}),a.createElement(m,{size:"md",color:"primary",className:`lead-modal__btn ${V}`,disabled:!u,isLoading:T},s("lead.otp.verify")),a.createElement(m,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${V}`,onClick:()=>{O()},disabled:!!v},s("lead.otp.resend",{timer:v?` (${v}s)`:""}))))},_e=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>{const{width:d,height:c,loaded:m}=Z(s);return m?a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover",aspectRatio:`${d}/${c}`},loading:"lazy"}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${V}`},r))))):null},Ee=({content:e,inlinePosition:t})=>{const a=i((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?I(e,a):null},we=({content:e})=>{const t=i((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>I(e,C(t,"sidebar-lead-modal-wrapper")))))},Ce=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:p,imageOverlayDesktop:h,imageBackground:g,currentLayout:v,title:b,onSubmit:f,showThankyou:y,campaignId:k,campaign_subot_id:_,locale:E})=>{var w,C,N;const T=JSON.parse(t.listBlockAdded),S=JSON.parse(t.actionBlocks),x=JSON.parse(t.textBlocks),O=S.submitBlock.data.url,P=S.submitBlock.data.text,B=S.submitBlock.data.text2,j=S.submitBlock.data.value,$=location.pathname,I=v.includes("Inline")||"Sidebar"===v,A="Slider"===v,[D,U]=n(!0),[H,R]=n(null),[M,F]=n(!1),W=r(),q=()=>{H?R(null):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(v))return console.log("😎 Not show fullscreen, slider on mobile "),null;o((()=>{(v.includes("LightBox")||"Fullscreen"==v)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ce.email={},ce.phone={}}),[]);const J=r(!1),z=r(!1),{form:G,validateObj:K}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:n=[]})=>{const{t:o}=L(),s=i((()=>{const i=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","WhatsappOtpBlock","LocationBlock","TncBlock"],r=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?o("validator.required"):null==t?void 0:t(a)};return e.filter((e=>i.includes(e.name))).reduce(((e,i)=>"NumberBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Number(e)))return o("validator.number")}))}):"EmailBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return o("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),me(l,n,{email:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===i.name||"PhoneOtpBlock"===i.name||"WhatsappOtpBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),Y.countryCode))return o("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),me(l,n,{phone:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Date.parse(e)))return o("validator.date")}))}):"TncBlock"===i.name?Object.assign(Object.assign({},e),{["TNC-"+i.id]:r("TNC-"+i.id)}):Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=he({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=r(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:J,validatingEmailRef:z,campaignId:k,campaign_subot_id:_}),{width:Q,height:X,loaded:te}=Z(g),{width:ae,height:le,loaded:ne}=Z(d),{width:oe,height:ie,loaded:re}=Z(c),de=ne&&re&&("Fullscreen"!=v||te),pe=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${p?`\n .le-newbuilder-overlay {\n background: url(${p}) ;\n }`:""}\n ${h?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${h}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":$,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${I?"le-buider-inline":""} ${A?"le-buider-slider":""}`},"Fullscreen"==v?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:g||"",style:{aspectRatio:`${Q}/${X}`}}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${v}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${v}`},y?a.createElement(_e,{title:y.title,titleAlign:y.titleAlign,subtitle:y.subtitle,subtitleAlign:y.subtitleAlign,link:y.link,linkNewTab:y.linkNewTab,linkText:y.linkText,image:y.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},H?a.createElement("img",{src:u.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%",minHeight:"150px",backgroundColor:"#f2f2f2"},loading:"lazy"}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(v)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,style:{aspectRatio:`${ae}/${le}`},alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{objectFit:"cover",aspectRatio:`${oe}/${ie}`},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:"",style:{aspectRatio:`${ae}/${le}`}}):null))),H&&a.createElement(ke,{otpData:H,autoSendWhenOpen:!1,onSuccess:()=>{R(null),null==f||f(W.current,G.values)}}),a.createElement("div",{"data-hidden":!!H,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ue,{form:G},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),G.setTouched(Object.keys(K).reduce(((e,t)=>(e[t]=!0,e)),{})),z.current||J.current||setTimeout((()=>{G.onSubmit((e=>{var t,a,l,n,o,i;if(Object.keys(G.errors).length)return;let r=null;if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;(null===(l=e[n])||void 0===l?void 0:l.startsWith("+"))&&(r={phone:e[n],type:"phone"})}if(T.findIndex((e=>"WhatsappOtpBlock"===e.name))>-1){const t=null===(o=null===(n=T.find((e=>"WhatsappOtpBlock"===e.name)))||void 0===n?void 0:n.data)||void 0===o?void 0:o.value;(null===(i=e[t])||void 0===i?void 0:i.startsWith("+"))&&(r={phone:e[t],type:"whatsapp"})}if(r)return F(!0),void se(r).then((t=>{var a;"This phone number was verified"!==(null===(a=null==t?void 0:t._messages)||void 0===a?void 0:a[0])?R(r):null==f||f(W.current,e)})).finally((()=>{F(!1)}));null==f||f(W.current,e)}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(w=x.titleBlock.data)||void 0===w?void 0:w.align)} ${V}`},b),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(C=x.titleBlock.data)||void 0===C?void 0:C.align)} ${V}`},x.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ye,{listBlockAdded:T,popupId:e,locale:E,onClose:q,onOtherSubmit:s})),(null===(N=null==S?void 0:S.submitBlock)||void 0===N?void 0:N.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${V}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${V}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>U(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:O||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(m,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${V}`,disabled:!D,isLoading:M},j))))))),!v.includes("Inline")&&a.createElement(ee,{onClose:q,containerClassName:"close-button-top-right"}))));return de?v.includes("LightBox")||"Fullscreen"==v||"Slider"==v?pe:"Sidebar"==v?a.createElement(we,{content:pe}):v.includes("Inline")?a.createElement(Ee,{content:pe,inlinePosition:t.popupInlinePosition}):null:null},Ne=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname,{width:m,height:u,loaded:p}=Z(i),{width:h,height:g,loaded:v}=Z(r);return p&&v?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r,style:{aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(ee,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%",aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(ee,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%",aspectRatio:`${m}/${u}`}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(ee,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o}))))):null},Te=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>{const{width:r,height:s,loaded:d}=Z(n);return d?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n,style:{aspectRatio:`${r}/${s}`}})),a.createElement(ee,{onClose:o,containerClassName:"close-button-top-right"})))):null},Se=[],xe=[],Oe=[],Pe=[],Be=[],je=[];const Le=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},$e=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Ie=e=>!function(e){var t;const a=Number(null===(t=e.rules.find((e=>"exclude_sponsored"==e.rule)))||void 0===t?void 0:t.value);return!(!Boolean(document.querySelector(".hhg-disclaimer-text"))||!a||(Pe.push(e),0))}(e)&&(!!function(e){var t,a;try{const l=null===(t=e.rules.find((e=>"exclude_sponsored_list"==e.rule)))||void 0===t?void 0:t.value,n=l instanceof Array?l:JSON.parse(l),o=Number(null===(a=document.querySelector("[data-sponsored-id]"))||void 0===a?void 0:a.getAttribute("data-sponsored-id"));return!o||o<=0||0===n.length||(!!n.find((e=>e.id==o))||(Be.push({id:e.id,rules:e.rules}),!1))}catch(e){return!0}}(e)&&(1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=$e(a),o=$e(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1;return!(Le(z[i]).getTime()>o.getTime()&&(Oe.push(e),1))}(e):0===e.formatted_status&&(Se.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=$e(l),i=$e(n);if(!o||!i)return!1;const r=Le(z[a]).getTime();return r<=i.getTime()&&r>=o.getTime()&&(xe.push(e),!0)})(e)))),Ae=e=>{var t;try{const a=(e,t,a)=>{const l=t.split(":"),n=a.split(":"),o=new Date;o.setHours(Number(l[0]),Number(l[1]),0,0);const i=new Date;return i.setHours(Number(n[0]),Number(n[1]),0,0),e>=o&&e<=i},l=null===(t=e.rules.find((e=>"appearance_time"==e.rule)))||void 0===t?void 0:t.value,n=l.startTime,o=l.endTime||"23:59";return!n||(!!a(new Date,n,o)||(je.push(e),!1))}catch(e){return!0}};let De=null;function Ue({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:A("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r;if(He("List campagin: ",e),q="https://"+location.hostname+location.pathname+location.search,1==e._status){const s=((null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Ie))||[]).filter(Ae);A("hhg-id")||(D("hhg-id",c(),{domain:"."+a,path:"/"}),He("😍 Set HHG ID cookie"));let d=[];d=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?s.filter((e=>e.device_types.some((e=>e.id==F)))):s.filter((e=>e.device_types.some((e=>e.id==W)))),He("👓 campaignsDevice",d),He("--listCampaignScheduled",Se),He("--listCampaignScheduledToActivated",xe),He("--listCampaignActiveButExpired",Oe),He("--listCampaignExcludeSonsored",Pe),He("--listCampaignDifferentSponsor",Be),He("--listCampaignNotDisplayInRangeOfTime",je);let m=d.map(((e,t)=>e.targets.filter((e=>e.type==H)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{var t;const a=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===(null===(t=a.href)||void 0===t?void 0:t.toLowerCase()));if("start_with"==e.option){if(o.includes(String(e.target).toLowerCase())){const t=e.sub_target.filter((e=>"excluding"==e.option)).map((e=>{var t;return null===(t=e.value)||void 0===t?void 0:t.toLowerCase()}));return!t.includes(o.split("?")[0])}return!1}}));const u=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let p=[],h=[];u&&u.length&&(p=d.map(((e,t)=>e.targets.filter((e=>e.type==R)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),h=p.filter((e=>u.includes(e.target))));const g=[...m,...h],v=document.cookie.split("; ").map((e=>e.split("=")[0])),b=v.filter((e=>e.includes("lead_submited")));He("--listCampaignCodeSubmited",b);const f=v.filter((e=>e.includes("lead_closed")));He("--listCampaignCodeClosed",f);const y=[...b,...f],k=(e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t})(g.filter((e=>!y.some((t=>t.includes(d[e.campaignIndex].code))))));if(He("--listCampaignValid : ",k),k&&k.length){const e=d[k[0].campaignIndex];He("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);He("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);He("scrollRule",n);let o="TIME";if(Number.isInteger(a)&&(o="TIME",He("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),De&&clearTimeout(De),De=setTimeout((()=>{null==l||l(e,o)}),1e3*a)),Number.isInteger(n)){o="SCROLL",He("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,i=t.offsetHeight;He("👓 Element check scroll: ",t);const r=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let s=0;t>=a&&(s=Math.round((t-a)/(i-innerHeight)*100)),He("---Scroll",s,n),s>=n&&(window.removeEventListener("scroll",r),null==l||l(e,o))};window.addEventListener("scroll",r,{passive:!0})}}else He("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{He("Lead error: ",e)}))}const He=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const Re=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var m,u;const{apiUrl:p,siteDomain:h}=s(X);o((()=>{const e=A("_ga")||null;fetch(`${p}api/campaign/${f}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:A("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:g,image:v,image_desktop:b,code:f,image_background:y,image_overlay_mobile:k,image_overlay_desktop:_}=e||{},{currentLayout:E}=g,w=g.imageBlocks?JSON.parse(g.imageBlocks):{},C=JSON.parse(g.actionBlocks),N=JSON.parse(g.textBlocks);let T=(null===(u=null===(m=null==N?void 0:N.titleBlock)||void 0===m?void 0:m.data)||void 0===u?void 0:u.value)||"";const S={1:{},2:{},3:{}},x=r("lead-modal-"+c()),O=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t=11,a=e.search("{{category_");return+e.charAt(t+a)}return null}(T);if(O){He("⚡️ Has categoryLevel",O);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${O}`)),a=e.find((e=>e.name===`content_category_en_${O}`));if(!t||!a)return He("⚡️ No META TAG for categoryLevel, not show popup",O),null;S[O]={value:t.content,value_en:a.content},T=T.replace(`{{category_${O}}}`,t.content),He("⚡️ Set categoryData ",O)}else He("⚡️ No categoryLevel",O);const P=()=>{var t,a,l,o;if(He("👌 Other submit click"),document.body.classList.remove("noscroll"),E.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(He("⛔ Popup never show again!"),D(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,path:"/"})),1==r&&(He(`⌛ Popup will show again after ${i} days!`),D(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,days:i,path:"/"}));const s=A("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:A("hhg-id"),ga_client_id:s};O&&(d.category=S[O].value_en),fetch(`${p}api/campaign/${f}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&He(e)})).catch((e=>{He("Error:",e)})),null==n||n()};return"CenterTab"===E?a.createElement(te,{popupId:x.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,imageMobile:v,imageDestkop:b,onClose:n,onOtherSubmit:P}):"Tab"===E?a.createElement(Te,{popupId:x.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,image:v,onClose:n,onOtherSubmit:P}):"Floating"===E?a.createElement(ae,{popupId:x.current,title:T,titleAlign:N.titleBlock.data.align,subtitle:N.subtitleBlock.data.value,subtitleAlign:N.subtitleBlock.data.align,url:C.linkButtonBlock.data.url,urlText:C.linkButtonBlock.data.value,newTab:C.linkButtonBlock.data.newtab,imageMobile:v,imageDesktop:b,onClose:n,onOtherSubmit:P}):E.includes("LightBox")||E.includes("Inline")||"Fullscreen"==E||"Sidebar"==E||"Slider"==E?a.createElement(Ce,{popupId:x.current,extraFields:g,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,imageBackground:y,currentLayout:E,title:T,onSubmit:(e,t)=>l(e,t,O,S),key:E,imageOverlayDesktop:_,imageOverlayMobile:k,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):E.includes("Skin")?a.createElement(Ne,{popupId:x.current,link:C.linkButtonBlock.data.url,linkNewTab:!!C.linkButtonBlock.data.newtab,linkText:C.linkButtonBlock.data.value,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,currentLayout:E}):null},Me=({apiUrl:e,siteDomain:l,siteId:s,locale:c,apiSubotUrl:m,DEBUG_URL:u,forceCampaign:b})=>{var f;const y=r(),k=r(Date.now()),{apiUrl:_}=i((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[E,w]=n(b),[C,T]=n(""),[S,O]=n(null);o((()=>{b&&(w(b),T("SHOW"))}),[null==b?void 0:b.code]),o((()=>{le.apiLeadUrl=_,le.apiSubotUrl=m}),[_,m]);const P=(e,t)=>{w(e),T(t)},B=()=>{var e,t;if(!E)return;He(`👋👋👋 CLOSE POPUP ${E.code} 👋👋👋`);const a=Number(null===(e=E.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=E.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&D(`lead_closed_${E.code}`,`target_${null==E?void 0:E.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${_}api/campaign/${E.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:A("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),w(null),O(null)};o((()=>{if(!(null==b?void 0:b.code)){if(window.next){const e=d((e=>{He("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;B(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?He("🔥 This URL page has show popup!"):(He("--Process checkShowPopup"),Ue({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:P,DEBUG_URL:u})),y.current&&window.removeEventListener("scroll",y.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Ue({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:P,DEBUG_URL:u})}}),[]);const j=(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,u,p,h,g;if(!a)return;He("submitHandler",n,o);const v=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),b=A("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const f={url:location.href.toLowerCase(),title_article:document.title,meta:v.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"][data-control]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==Y?void 0:Y.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?U(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n}})),cookie_id:A("hhg-id"),ga_client_id:b};n&&o[n].value_en&&(f.category=o[n].value_en);const y=Number((null===(i=null===(t=E.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),k=Number((null===(s=null===(r=E.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==k&&(He("⛔ Popup never show again!"),D(`lead_submited_${E.code}`,`target_${null==E?void 0:E.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==k&&(He(`⌛ Popup will show again after ${y} days!`),D(`lead_submited_${E.code}`,`target_${null==E?void 0:E.extra_fields.targetType}`,{domain:"."+l,days:y,path:"/"})),fetch(`${_}api/campaign/${E.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}),"notshow"==(null==E?void 0:E.extra_fields.popupShowThankYou))return B(),void document.body.classList.remove("noscroll");let w=!0;const C=E.thank_you_image||`${_}admin/img/thanksyou.png`;let N,T,S=(null==E?void 0:E.extra_fields.popupThankyouTitle)||"Thank you.",x=(null==E?void 0:E.extra_fields.popupThankyouDesc)||"We appreciate your time!",P="",j="",L="";if("2.1"==(null==E?void 0:E.extra_fields.popupVersion)){const e=E.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));S=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",P=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",x=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",j=(null===(u=null==l?void 0:l.data)||void 0===u?void 0:u.align)||"",N=(null===(p=null==n?void 0:n.data)||void 0===p?void 0:p.value)||"",T=(null===(h=null==n?void 0:n.data)||void 0===h?void 0:h.newtab)||!1,L=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.url)||"";const o=E.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(w=!1)}O(w?{title:S,titleAlign:P,subtitle:x,subtitleAlign:j,link:L,linkNewTab:T,linkText:N,image:C}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},v.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))}));return o((()=>{E&&(k.current=Date.now())}),[E]),a.createElement(X.Provider,{value:{apiUrl:_,siteDomain:l,siteId:s,locale:c}},a.createElement(x.Provider,{value:{locale:c,values:Q(c)}},a.createElement(p,{target:N()},a.createElement(h,{sx:{position:"fixed",zIndex:9999999999}},a.createElement(g,{mounted:Boolean("2.1"===(null===(f=null==E?void 0:E.extra_fields)||void 0===f?void 0:f.popupVersion)),transition:"fade",duration:600,timingFunction:"ease"},(e=>{var t;return a.createElement(h,{style:e},"2.1"===(null===(t=null==E?void 0:E.extra_fields)||void 0===t?void 0:t.popupVersion)&&a.createElement(a.Fragment,null,!!E.extra_fields.currentLayout&&!E.extra_fields.currentLayout.includes("Inline")&&!E.extra_fields.currentLayout.includes("Sidebar")&&a.createElement(v,{color:"#000",opacity:.5,center:!0,zIndex:400,pos:"fixed",onClick:()=>B()}),a.createElement(Re,{campaign:E,action:C,onSubmit:j,onClose:B,showThankyou:S,locale:c})))}))))))};export{Me as LeadGen};
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-4a7efa3e.js";import a,{createContext as l,useState as n,useEffect as o,useMemo as i,useRef as r,useContext as s}from"react";import d from"lodash/debounce";import{v1 as c}from"uuid";import{B as m}from"./index-18ff3f75.js";import{C as u}from"./index-01efa9be.js";import{Portal as p,Box as h,Transition as g,Overlay as v}from"@mantine/core";import{T as b}from"./Plus-61592057.js";import"./index.styles-d3334c25.js";import{S as f,e as y,d as k,R as _,P as E,N as w}from"./index-8c1e2ce6.js";import"./constants-ed8abdff.js";import"./Subot-ade21804.js";import"./utils-508d45bb.js";import{b as C,a as N}from"./utils-597f4846.js";import{D as T}from"./index-16d9b234.js";import{t as S}from"./theme-2f0d6367.js";import{T as x}from"./translationsContext-d3dc4282.js";import"string-format";import"@mantine/hooks";import"./index-05214244.js";import"./WhatsApp-5a6ef99f.js";import"./index.styled-c2100f19.js";import"./index-761ce6cc.js";import"./utils-e3640c23.js";import{M as O}from"./utils-c6a7729e.js";import"@mantine/dates";import{u as P,G as B}from"./usePlacesAutocomplete-ff204ea8.js";import{createFormContext as j}from"@mantine/form";import{u as L}from"./useTranslations-cce18e33.js";import{H as $}from"./index-a9cbaabd.js";import{createPortal as A}from"react-dom";import{g as I,s as D}from"./cookieHelper-3fe8fdf3.js";import U from"dayjs";import"./isProduction-8ae381c3.js";import"styled-components";import"./animation-1d694586.js";import"react-keyed-flatten-children";import"@mantine/carousel";import"classnames";import"./useUniqueId-463b8d94.js";import"date-fns/locale";import"slugify";const H=1,R=2;let M="https://dev.leadgen.hellobacsi.com/";const W=1,F=2;let V="";M.includes("localhost")&&(M="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(V="pink");let q="https://"+location.hostname+location.pathname+location.search;q=q.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const J={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},Y=J[document.documentElement.lang]||J["vi-VN"];const z={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var G={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const K={"en-PH":G,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មានចាំបាច់ដែលត្រូវបំពេញ","validator.email":"សូមវាយអាសយដ្ឋានអ៊ីម៉ែលឲ្យបានត្រឹមត្រូវ","validator.number":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.digits":"វាយបញ្ចូលបានតែលេខប៉ុណ្ណោះ","validator.maxlength":"សូមវាយបញ្ចូលកុំឲ្យលើស {0} តួអក្សរ","validator.minlength":"សូមវាយបញ្ចូលតិចបំផុត {0} តួអក្ស","validator.phone":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":G},Q=e=>{const t=K[e];return t||K["en-PH"]},X=l({}),Z=e=>{const[t,a]=n(16),[l,i]=n(9),[r,s]=n(!1);return o((()=>{if(s(!1),e){const t=new Image;t.addEventListener("load",(()=>{a(t.naturalWidth),i(t.naturalHeight),s(!0)})),t.addEventListener("error",(()=>{a(16),i(9),s(!0)})),t.src=e}else a(16),i(9),s(!0)}),[e]),{loaded:r,width:t,height:l}},ee=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),te=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>{const{width:s,height:d,loaded:c}=Z(o),{width:m,height:u,loaded:p}=Z(n);return c&&p?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o,style:{aspectRatio:`${s}/${d}`}}),a.createElement("img",{className:"le-only-desktop",src:n,style:{aspectRatio:`${m}/${u}`}})),a.createElement(ee,{onClose:i,containerClassName:"close-button-top-right"})))):null},ae=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>{const{width:p,height:h,loaded:g}=Z(c),{width:v,height:b,loaded:f}=Z(d);return g&&f?a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5,aspectRatio:`${v}/${b}`},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(ee,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100,aspectRatio:`${p}/${h}`},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(ee,{onClose:m,containerClassName:"close-button-top-right"}))))):null};const le=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},ne={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${le.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},oe={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${le.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},ie=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),oe.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},re=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),ne.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},se=({phone:e,type:t})=>ne.call({url:"phone"===t?"api/sms/otp":"api/sms/whatsapp_otp",method:"post",data:{phone_number:"phone"===t?e.replace("+",""):e}}),de=({phone:e,otp:t,type:a})=>ne.call({url:"phone"===a?"api/sms/verify":"api/sms/whatsapp_verify",method:"post",data:{otp_code:t,phone_number:"phone"===a?e.replace("+",""):e}}),ce={email:{},phone:{}},me=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ce[n][o]){if(ce[n][o].value)return i;if(!ce[n][o].value&&ce[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield re({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield ie({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ce[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),[ue,pe,he]=j(),ge=["places"],ve=({name:e,placeholder:t,locale:l})=>{var s;const d=pe(),[c,m]=n(""),[u,p]=n(""),{predictions:h}=P(c,"","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=n(null),[b,y]=n(!1),k=r(Math.random().toString(36).substring(7)),_=i((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return o((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:B,libraries:ge,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(f,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:_,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+k.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},be=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${V}`},e),fe=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${V}`},e),ye=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=pe();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:u,align:p,listQuestion:h,isSendMailChimp:g=!1,newtab:v,url:b}=d;switch(s){case"TitleBlock":return a.createElement(fe,{key:r,align:p},u);case"SubtitleBlock":return a.createElement(be,{key:r,align:p},u);case"TextBlock":return a.createElement(k,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:u},i.getInputProps(u)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:u},i.getInputProps(u)));case"EmailBlock":return a.createElement(k,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:u},i.getInputProps(u)));case"PhoneOtpBlock":case"WhatsappOtpBlock":case"PhoneBlock":{const e=t+"-"+u+"-"+r;return a.createElement(k.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(u)),a.createElement(E,{name:u,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(u,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(ve,{key:r,name:u,placeholder:c,locale:l});case"DateBlock":return a.createElement(a.Fragment,null,a.createElement(T,Object.assign({withAsterisk:!0,key:r,type:"default",name:u,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(u))),a.createElement("input",{type:"hidden",name:u,"data-control":"date"}));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:v?"blank":"parrent",href:b,style:{textDecoration:"none"}},a.createElement(m,{type:"button",size:"md",className:`lead-modal__btn ${V}`,onClick:()=>{null==n||n(),null==o||o()}},u)));case"CheckboxBlock":return a.createElement(a.Fragment,null,g&&a.createElement("div",{style:{display:"none"},"data-name":u+"-mailchimp"}),a.createElement(y.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md",sx:{display:"flex",flexDirection:"column",gap:8}},i.getInputProps(u)),h.map(((e,t)=>a.createElement(y,{name:u,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,g&&a.createElement(k,{type:"hidden",name:u+"-mailchimp",value:g}),a.createElement(_.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(u)),h.map(((e,t)=>a.createElement(_,{name:u,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":u,"data-control":"dropdown"}),a.createElement(f,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:u,data:h.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(u))));case"TncBlock":const s=i.getInputProps("TNC-"+e.id);return a.createElement(a.Fragment,null,a.createElement(y,Object.assign({name:"TNC-"+e.id,key:e.id,label:a.createElement("p",{className:"lead-modal__tnc-link",dangerouslySetInnerHTML:{__html:d.valueHTML}}),className:"tnc-block","data-control":"checkbox"},s,{error:s.error?a.createElement(a.Fragment,null):void 0})))}return null})))},ke=({otpData:e,onSuccess:l,autoSendWhenOpen:i})=>{const{t:s}=L(),d=e.phone,c=e.type,[u,p]=n(""),[h,g]=n(!1),[v,f]=n(i?0:60),y=r(null),[_,E]=n(),[w,C]=n(""),N=r(),[T,x]=n(!1);o((()=>{t(void 0,void 0,void 0,(function*(){var e;if(!N.current){const e=yield import("react-phone-number-input");N.current=e.formatPhoneNumberIntl}C((null===(e=N.current)||void 0===e?void 0:e.call(N,d))||d)}))}),[d]);const O=()=>t(void 0,void 0,void 0,(function*(){var e;if(!d)return;const t=yield se({phone:d,type:c}),a=null===(e=null==t?void 0:t._messages)||void 0===e?void 0:e[0];"Send sms successfully"===a||"Send WhatsApp successfully"===a?(f(60),setTimeout((()=>{y.current&&(y.current.focus(),y.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===a?l():E(a||"Something went wrong!")}));return o((()=>{setTimeout((()=>{v>0&&f((e=>e-1))}),1e3)}),[v]),o((()=>{i&&!v&&O()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:e=>{e.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!d||!u)return;x(!0);const e=yield de({phone:d,otp:u,type:c}),t=null==e?void 0:e._messages[0];"Verify successfully"===t||"Verify WhatsApp OTP sucess"===t||"This phone number was verified"===t?l():E(t||"something Wrong"),x(!1)}))},className:"lead-phone-otp-form"},a.createElement($,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(b,{size:"p1",color:S.colors.gray600},s("lead.otp.desc",{phone:w})),a.createElement(k,{ref:y,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:u,maxLength:6,onChange:e=>{g(!0),p(e),E(h&&!e?"OTP is required":void 0)},error:h?_:void 0}),a.createElement(m,{size:"md",color:"primary",className:`lead-modal__btn ${V}`,disabled:!u,isLoading:T},s("lead.otp.verify")),a.createElement(m,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${V}`,onClick:()=>{O()},disabled:!!v},s("lead.otp.resend",{timer:v?` (${v}s)`:""}))))},_e=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>{const{width:d,height:c,loaded:m}=Z(s);return m?a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover",aspectRatio:`${d}/${c}`},loading:"lazy"}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${V}`},r))))):null},Ee=({content:e,inlinePosition:t})=>{const a=i((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?A(e,a):null},we=({content:e})=>{const t=i((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>A(e,C(t,"sidebar-lead-modal-wrapper")))))},Ce=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:p,imageOverlayDesktop:h,imageBackground:g,currentLayout:v,title:b,onSubmit:f,showThankyou:y,campaignId:k,campaign_subot_id:_,locale:E})=>{var w,C,N;const T=JSON.parse(t.listBlockAdded),S=JSON.parse(t.actionBlocks),x=JSON.parse(t.textBlocks),O=S.submitBlock.data.url,P=S.submitBlock.data.text,B=S.submitBlock.data.text2,j=S.submitBlock.data.value,$=location.pathname,A=v.includes("Inline")||"Sidebar"===v,I="Slider"===v,[D,U]=n(!0),[H,R]=n(null),[M,W]=n(!1),F=r(),q=()=>{H?R(null):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(v))return console.log("😎 Not show fullscreen, slider on mobile "),null;o((()=>{(v.includes("LightBox")||"Fullscreen"==v)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ce.email={},ce.phone={}}),[]);const J=r(!1),z=r(!1),{form:G,validateObj:K}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:n=[]})=>{const{t:o}=L(),s=i((()=>{const i=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","WhatsappOtpBlock","LocationBlock","TncBlock"],r=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?o("validator.required"):null==t?void 0:t(a)};return e.filter((e=>i.includes(e.name))).reduce(((e,i)=>"NumberBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Number(e)))return o("validator.number")}))}):"EmailBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return o("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),me(l,n,{email:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===i.name||"PhoneOtpBlock"===i.name||"WhatsappOtpBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),Y.countryCode))return o("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),me(l,n,{phone:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Date.parse(e)))return o("validator.date")}))}):"TncBlock"===i.name?Object.assign(Object.assign({},e),{["TNC-"+i.id]:r("TNC-"+i.id)}):Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=he({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=r(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:J,validatingEmailRef:z,campaignId:k,campaign_subot_id:_}),{width:Q,height:X,loaded:te}=Z(g),{width:ae,height:le,loaded:ne}=Z(d),{width:oe,height:ie,loaded:re}=Z(c),de=ne&&re&&("Fullscreen"!=v||te),pe=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${p?`\n .le-newbuilder-overlay {\n background: url(${p}) ;\n }`:""}\n ${h?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${h}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":$,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${I?"le-buider-slider":""}`},"Fullscreen"==v?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:g||"",style:{aspectRatio:`${Q}/${X}`}}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${v}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${v}`},y?a.createElement(_e,{title:y.title,titleAlign:y.titleAlign,subtitle:y.subtitle,subtitleAlign:y.subtitleAlign,link:y.link,linkNewTab:y.linkNewTab,linkText:y.linkText,image:y.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},H?a.createElement("img",{src:u.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%",minHeight:"150px",backgroundColor:"#f2f2f2"},loading:"lazy"}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(v)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,style:{aspectRatio:`${ae}/${le}`},alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{objectFit:"cover",aspectRatio:`${oe}/${ie}`},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:"",style:{aspectRatio:`${ae}/${le}`}}):null))),H&&a.createElement(ke,{otpData:H,autoSendWhenOpen:!1,onSuccess:()=>{R(null),null==f||f(F.current,G.values)}}),a.createElement("div",{"data-hidden":!!H,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ue,{form:G},a.createElement("form",{ref:F,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),G.setTouched(Object.keys(K).reduce(((e,t)=>(e[t]=!0,e)),{})),z.current||J.current||setTimeout((()=>{G.onSubmit((e=>{var t,a,l,n,o,i;if(Object.keys(G.errors).length)return;let r=null;if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;(null===(l=e[n])||void 0===l?void 0:l.startsWith("+"))&&(r={phone:e[n],type:"phone"})}if(T.findIndex((e=>"WhatsappOtpBlock"===e.name))>-1){const t=null===(o=null===(n=T.find((e=>"WhatsappOtpBlock"===e.name)))||void 0===n?void 0:n.data)||void 0===o?void 0:o.value;(null===(i=e[t])||void 0===i?void 0:i.startsWith("+"))&&(r={phone:e[t],type:"whatsapp"})}if(r)return W(!0),void se(r).then((t=>{var a;"This phone number was verified"!==(null===(a=null==t?void 0:t._messages)||void 0===a?void 0:a[0])?R(r):null==f||f(F.current,e)})).finally((()=>{W(!1)}));null==f||f(F.current,e)}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(w=x.titleBlock.data)||void 0===w?void 0:w.align)} ${V}`},b),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(C=x.titleBlock.data)||void 0===C?void 0:C.align)} ${V}`},x.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ye,{listBlockAdded:T,popupId:e,locale:E,onClose:q,onOtherSubmit:s})),(null===(N=null==S?void 0:S.submitBlock)||void 0===N?void 0:N.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${V}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${V}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>U(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:O||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(m,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${V}`,disabled:!D,isLoading:M},j))))))),!v.includes("Inline")&&a.createElement(ee,{onClose:q,containerClassName:"close-button-top-right"}))));return de?v.includes("LightBox")||"Fullscreen"==v||"Slider"==v?pe:"Sidebar"==v?a.createElement(we,{content:pe}):v.includes("Inline")?a.createElement(Ee,{content:pe,inlinePosition:t.popupInlinePosition}):null:null},Ne=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname,{width:m,height:u,loaded:p}=Z(i),{width:h,height:g,loaded:v}=Z(r);return p&&v?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r,style:{aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(ee,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%",aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(ee,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%",aspectRatio:`${m}/${u}`}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(ee,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o}))))):null},Te=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>{const{width:r,height:s,loaded:d}=Z(n);return d?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n,style:{aspectRatio:`${r}/${s}`}})),a.createElement(ee,{onClose:o,containerClassName:"close-button-top-right"})))):null},Se=[],xe=[],Oe=[],Pe=[],Be=[],je=[];const Le=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},$e=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Ae=e=>!function(e){var t;const a=Number(null===(t=e.rules.find((e=>"exclude_sponsored"==e.rule)))||void 0===t?void 0:t.value);return!(!Boolean(document.querySelector(".hhg-disclaimer-text"))||!a||(Pe.push(e),0))}(e)&&(!!function(e){var t,a;try{const l=null===(t=e.rules.find((e=>"exclude_sponsored_list"==e.rule)))||void 0===t?void 0:t.value,n=l instanceof Array?l:JSON.parse(l),o=Number(null===(a=document.querySelector("[data-sponsored-id]"))||void 0===a?void 0:a.getAttribute("data-sponsored-id"));return!o||o<=0||0===n.length||(!!n.find((e=>e.id==o))||(Be.push({id:e.id,rules:e.rules}),!1))}catch(e){return!0}}(e)&&(1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=$e(a),o=$e(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1;return!(Le(z[i]).getTime()>o.getTime()&&(Oe.push(e),1))}(e):0===e.formatted_status&&(Se.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=$e(l),i=$e(n);if(!o||!i)return!1;const r=Le(z[a]).getTime();return r<=i.getTime()&&r>=o.getTime()&&(xe.push(e),!0)})(e)))),Ie=e=>{var t;try{const a=(e,t,a)=>{const l=t.split(":"),n=a.split(":"),o=new Date;o.setHours(Number(l[0]),Number(l[1]),0,0);const i=new Date;return i.setHours(Number(n[0]),Number(n[1]),0,0),e>=o&&e<=i},l=null===(t=e.rules.find((e=>"appearance_time"==e.rule)))||void 0===t?void 0:t.value,n=l.startTime,o=l.endTime||"23:59";return!n||(!!a(new Date,n,o)||(je.push(e),!1))}catch(e){return!0}};let De=null;function Ue({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:I("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r;if(He("List campagin: ",e),q="https://"+location.hostname+location.pathname+location.search,1==e._status){const s=((null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Ae))||[]).filter(Ie);I("hhg-id")||(D("hhg-id",c(),{domain:"."+a,path:"/"}),He("😍 Set HHG ID cookie"));let d=[];d=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?s.filter((e=>e.device_types.some((e=>e.id==W)))):s.filter((e=>e.device_types.some((e=>e.id==F)))),He("👓 campaignsDevice",d),He("--listCampaignScheduled",Se),He("--listCampaignScheduledToActivated",xe),He("--listCampaignActiveButExpired",Oe),He("--listCampaignExcludeSonsored",Pe),He("--listCampaignDifferentSponsor",Be),He("--listCampaignNotDisplayInRangeOfTime",je);let m=d.map(((e,t)=>e.targets.filter((e=>e.type==H)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{var t;const a=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===(null===(t=a.href)||void 0===t?void 0:t.toLowerCase()));if("start_with"==e.option){if(o.includes(String(e.target).toLowerCase())){const t=e.sub_target.filter((e=>"excluding"==e.option)).map((e=>{var t;return null===(t=e.value)||void 0===t?void 0:t.toLowerCase()}));return!t.includes(o.split("?")[0])}return!1}}));const u=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let p=[],h=[];u&&u.length&&(p=d.map(((e,t)=>e.targets.filter((e=>e.type==R)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),h=p.filter((e=>u.includes(e.target))));const g=[...m,...h],v=document.cookie.split("; ").map((e=>e.split("=")[0])),b=v.filter((e=>e.includes("lead_submited")));He("--listCampaignCodeSubmited",b);const f=v.filter((e=>e.includes("lead_closed")));He("--listCampaignCodeClosed",f);const y=[...b,...f],k=(e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t})(g.filter((e=>!y.some((t=>t.includes(d[e.campaignIndex].code))))));if(He("--listCampaignValid : ",k),k&&k.length){const e=d[k[0].campaignIndex];He("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);He("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);He("scrollRule",n);let o="TIME";if(Number.isInteger(a)&&(o="TIME",He("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),De&&clearTimeout(De),De=setTimeout((()=>{null==l||l(e,o)}),1e3*a)),Number.isInteger(n)){o="SCROLL",He("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,i=t.offsetHeight;He("👓 Element check scroll: ",t);const r=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let s=0;t>=a&&(s=Math.round((t-a)/(i-innerHeight)*100)),He("---Scroll",s,n),s>=n&&(window.removeEventListener("scroll",r),null==l||l(e,o))};window.addEventListener("scroll",r,{passive:!0})}}else He("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{He("Lead error: ",e)}))}const He=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const Re=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var m,u;const{apiUrl:p,siteDomain:h}=s(X);o((()=>{const e=I("_ga")||null;fetch(`${p}api/campaign/${f}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:I("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:g,image:v,image_desktop:b,code:f,image_background:y,image_overlay_mobile:k,image_overlay_desktop:_}=e||{},{currentLayout:E}=g,w=g.imageBlocks?JSON.parse(g.imageBlocks):{},C=JSON.parse(g.actionBlocks),N=JSON.parse(g.textBlocks);let T=(null===(u=null===(m=null==N?void 0:N.titleBlock)||void 0===m?void 0:m.data)||void 0===u?void 0:u.value)||"";const S={1:{},2:{},3:{}},x=r("lead-modal-"+c()),O=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t=11,a=e.search("{{category_");return+e.charAt(t+a)}return null}(T);if(O){He("⚡️ Has categoryLevel",O);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${O}`)),a=e.find((e=>e.name===`content_category_en_${O}`));if(!t||!a)return He("⚡️ No META TAG for categoryLevel, not show popup",O),null;S[O]={value:t.content,value_en:a.content},T=T.replace(`{{category_${O}}}`,t.content),He("⚡️ Set categoryData ",O)}else He("⚡️ No categoryLevel",O);const P=()=>{var t,a,l,o;if(He("👌 Other submit click"),document.body.classList.remove("noscroll"),E.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(He("⛔ Popup never show again!"),D(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,path:"/"})),1==r&&(He(`⌛ Popup will show again after ${i} days!`),D(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,days:i,path:"/"}));const s=I("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:I("hhg-id"),ga_client_id:s};O&&(d.category=S[O].value_en),fetch(`${p}api/campaign/${f}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&He(e)})).catch((e=>{He("Error:",e)})),null==n||n()};return"CenterTab"===E?a.createElement(te,{popupId:x.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,imageMobile:v,imageDestkop:b,onClose:n,onOtherSubmit:P}):"Tab"===E?a.createElement(Te,{popupId:x.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,image:v,onClose:n,onOtherSubmit:P}):"Floating"===E?a.createElement(ae,{popupId:x.current,title:T,titleAlign:N.titleBlock.data.align,subtitle:N.subtitleBlock.data.value,subtitleAlign:N.subtitleBlock.data.align,url:C.linkButtonBlock.data.url,urlText:C.linkButtonBlock.data.value,newTab:C.linkButtonBlock.data.newtab,imageMobile:v,imageDesktop:b,onClose:n,onOtherSubmit:P}):E.includes("LightBox")||E.includes("Inline")||"Fullscreen"==E||"Sidebar"==E||"Slider"==E?a.createElement(Ce,{popupId:x.current,extraFields:g,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,imageBackground:y,currentLayout:E,title:T,onSubmit:(e,t)=>l(e,t,O,S),key:E,imageOverlayDesktop:_,imageOverlayMobile:k,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):E.includes("Skin")?a.createElement(Ne,{popupId:x.current,link:C.linkButtonBlock.data.url,linkNewTab:!!C.linkButtonBlock.data.newtab,linkText:C.linkButtonBlock.data.value,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,currentLayout:E}):null},Me=({apiUrl:e,siteDomain:l,siteId:s,locale:c,apiSubotUrl:m,DEBUG_URL:u,forceCampaign:b})=>{var f;const y=r(),k=r(Date.now()),{apiUrl:_}=i((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[E,w]=n(b),[C,T]=n(""),[S,O]=n(null);o((()=>{b&&(w(b),T("SHOW"))}),[null==b?void 0:b.code]),o((()=>{le.apiLeadUrl=_,le.apiSubotUrl=m}),[_,m]);const P=(e,t)=>{w(e),T(t)},B=()=>{var e,t;if(!E)return;He(`👋👋👋 CLOSE POPUP ${E.code} 👋👋👋`);const a=Number(null===(e=E.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=E.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&D(`lead_closed_${E.code}`,`target_${null==E?void 0:E.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${_}api/campaign/${E.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:I("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),w(null),O(null)};o((()=>{if(!(null==b?void 0:b.code)){if(window.next){const e=d((e=>{He("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;B(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?He("🔥 This URL page has show popup!"):(He("--Process checkShowPopup"),Ue({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:P,DEBUG_URL:u})),y.current&&window.removeEventListener("scroll",y.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Ue({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:P,DEBUG_URL:u})}}),[]);const j=(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,u,p,h,g;if(!a)return;He("submitHandler",n,o);const v=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),b=I("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const f={url:location.href.toLowerCase(),title_article:document.title,meta:v.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"][data-control]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==Y?void 0:Y.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?U(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n}})),cookie_id:I("hhg-id"),ga_client_id:b};n&&o[n].value_en&&(f.category=o[n].value_en);const y=Number((null===(i=null===(t=E.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),k=Number((null===(s=null===(r=E.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==k&&(He("⛔ Popup never show again!"),D(`lead_submited_${E.code}`,`target_${null==E?void 0:E.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==k&&(He(`⌛ Popup will show again after ${y} days!`),D(`lead_submited_${E.code}`,`target_${null==E?void 0:E.extra_fields.targetType}`,{domain:"."+l,days:y,path:"/"})),fetch(`${_}api/campaign/${E.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}),"notshow"==(null==E?void 0:E.extra_fields.popupShowThankYou))return B(),void document.body.classList.remove("noscroll");let w=!0;const C=E.thank_you_image||`${_}admin/img/thanksyou.png`;let N,T,S=(null==E?void 0:E.extra_fields.popupThankyouTitle)||"Thank you.",x=(null==E?void 0:E.extra_fields.popupThankyouDesc)||"We appreciate your time!",P="",j="",L="";if("2.1"==(null==E?void 0:E.extra_fields.popupVersion)){const e=E.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));S=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",P=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",x=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",j=(null===(u=null==l?void 0:l.data)||void 0===u?void 0:u.align)||"",N=(null===(p=null==n?void 0:n.data)||void 0===p?void 0:p.value)||"",T=(null===(h=null==n?void 0:n.data)||void 0===h?void 0:h.newtab)||!1,L=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.url)||"";const o=E.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(w=!1)}O(w?{title:S,titleAlign:P,subtitle:x,subtitleAlign:j,link:L,linkNewTab:T,linkText:N,image:C}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},v.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))}));return o((()=>{E&&(k.current=Date.now())}),[E]),a.createElement(X.Provider,{value:{apiUrl:_,siteDomain:l,siteId:s,locale:c}},a.createElement(x.Provider,{value:{locale:c,values:Q(c)}},a.createElement(p,{target:N()},a.createElement(h,{sx:{position:"fixed",zIndex:9999999999}},a.createElement(g,{mounted:Boolean("2.1"===(null===(f=null==E?void 0:E.extra_fields)||void 0===f?void 0:f.popupVersion)),transition:"fade",duration:600,timingFunction:"ease"},(e=>{var t;return a.createElement(h,{style:e},"2.1"===(null===(t=null==E?void 0:E.extra_fields)||void 0===t?void 0:t.popupVersion)&&a.createElement(a.Fragment,null,!!E.extra_fields.currentLayout&&!E.extra_fields.currentLayout.includes("Inline")&&!E.extra_fields.currentLayout.includes("Sidebar")&&a.createElement(v,{color:"#000",opacity:.5,center:!0,zIndex:400,pos:"fixed",onClick:()=>B()}),a.createElement(Re,{campaign:E,action:C,onSubmit:j,onClose:B,showThankyou:S,locale:c})))}))))))};export{Me as LeadGen};
|
package/build/esm/mantine.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{k as a,l as i,m as u}from"./index-8c1e2ce6.js";export{o as Accordion,A as Anchor,c as AspectRatio,b as Avatar,n as Breadcrumbs,B as Button,p as Carousel,g as CentralCarousel,e as Checkbox,f as ChipButton,d as Input,M as MAPPED_LOCALE,O as OTP,P as Phone,s as Popover,R as Radio,S as Select,T as Tabs,q as emotionCache,r as getHeadingStyles,m as getMantineThemeOverride,t as themeColors,l as useMantineLocale}from"./index-8c1e2ce6.js";export{D as DatePicker}from"./index-16d9b234.js";import{T as h}from"./Plus-61592057.js";export{O as OTHER_THEME_CONFIG,T as Text}from"./Plus-61592057.js";export{I as Indicator}from"./index-200ec6b1.js";import x,{useMemo as j}from"react";export{M as Modal}from"./index-07905741.js";import{_ as v}from"./tslib.es6-4a7efa3e.js";import{Badge as E,Spoiler as y,LoadingOverlay as C,MantineProvider as H,clsx as w,Title as N,Text as k,Button as L}from"@mantine/core";import{t as z}from"./theme-2f0d6367.js";import{u as _}from"./useTranslations-cce18e33.js";export{S as Slider}from"./index-8f4b4a7f.js";export{S as Switch}from"./index-8cf56535.js";import"@mantine/hooks";import"./index-01efa9be.js";import"./index-05214244.js";import"date-fns/locale";import"./Subot-ade21804.js";import"./isProduction-8ae381c3.js";import"dayjs";import"./utils-597f4846.js";import"styled-components";import"@mantine/carousel";import"classnames";import"./useUniqueId-463b8d94.js";import"@mantine/dates";import"./translationsContext-d3dc4282.js";import"string-format";const F=e=>x.createElement(a,Object.assign({minRows:2,maxRows:4},e)),G=e=>{var{color:t=z.colors.primaryBase,styles:s}=e,a=v(e,["color","styles"]);return x.createElement(E,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},s)},a))},J=e=>{var{children:t,line:s,lineHeight:a,trackingAttributes:o,maxHeight:r,customExpandFn:i}=e,n=v(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:l}=_(),c=j((()=>r||(s&&a?s*a:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const m=j((()=>o?{"data-event-category":o.dataEventCategory,"data-event-action":o.dataEventAction,"data-event-label":o.dataEventLabel}:{}),[o]);return x.createElement(y,Object.assign({showLabel:x.createElement(h,Object.assign({size:"p3",color:z.colors.primaryBase},m,{onClick:i}),l("articlePage.readMore")),hideLabel:x.createElement(h,Object.assign({size:"p3",color:z.colors.primaryBase},m),l("articlePage.showLess"))},n,{maxHeight:c}),t)};const U=e=>(function(e=!1){x.useEffect((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}(e.visible),x.createElement(C,Object.assign({loaderProps:{color:z.colors.primaryBase}},e))),V=e=>{var{children:t,locale:s,template:a="hb"}=e,o=v(e,["children","locale","template"]);return i(s),x.createElement(H,Object.assign({theme:u(s,a)},o),t)};var Y="MON6sfi",Z="pS-tJD7",K="s3tJ9-5",Q="fNsZr1b",W="uuxV74v",X="YohjTDU";function $(e){const{icon:t,title:s,description:a,button:o,buttonProps:r,style:i,className:n}=e,l=r||{},{size:c="lg",variant:m="outline"}=l,d=v(l,["size","variant"]),p=t;return x.createElement("div",{className:w("result",Y,n),style:i},p&&x.createElement("div",{className:w("resultIconContainer",Z)},x.createElement(p,{className:w("resultIcon",K)})),x.createElement(N,{order:3,size:"h3",className:w("resultTitle",Q)},s),x.createElement(k,{className:w("resultDescription",W)},a),o&&x.createElement(L,Object.assign({},d,{size:c,variant:m,className:w("resultButton",X,d.className)}),o))}export{G as Badge,U as LoadingOverlay,V as MantineProvider,$ as Result,J as Spoiler,F as TextArea};
|