Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (2024)

Galaxy Z Flip5

  • SPECIFICATIONS
  • REVIEWS
  • SUPPORT

BUY NOW

  • Highlights
  • Compare
  • Accessories
  • My Flip5
  • SPECIFICATIONS
  • REVIEWS
  • SUPPORT

n/a n/a Buy now n/a

Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (1)
  • DESIGN
  • CAMERA
  • FLEX WINDOW
  • BATTERY
  • FLEX MODE

What if your phone was an extension of you?

A perfect fit — both in life and your pocket. A brilliant Flex Window you can customise. A camera that captures selfies from edgy angles. Plus, a battery that keeps up.

Galaxy Z Flip5 | Join the flip side

  • FLEX WINDOW

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (2) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (3)
  • DESIGN

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (4) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (5)
  • CAMERA Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (6)

  • BATTERY Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (7)

  • FLEX MODE Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (8)

Galaxy Z Flip5

"A much larger cover screen makes all the difference"

The Verge

Galaxy Z Flip5

"Hands-down the best option in its class"

The Verge

Galaxy Z Flip5

"Samsung's fun-sized Galaxy Z Flip5 is the hottest smartphone of 2023"

GQ

    3.4” Flex Window.1 Hello, Flex Hinge

    GO TO DESIGN

    Stunning selfie camera

    Captured by Galaxy Z Flip5#withGalaxy

    GO TO CAMERA

    Flex Window. Created by you

    GO TO FLEX WINDOW

    Up to 57hrs of music, up to 20hrs of video2

    GO TO BATTERY

    Introducing Flex Mode Panel

    GO TO FLEX MODE

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (9) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (10)

    An extreme close up of Galaxy Z Flip5, starting from the Flex Hinge and side buttons, then zooming out to the rear panel. The device opens slightly as it turns to the Flex Window, stopping in a tent shape.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (11)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (12) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (13)

    Three Galaxy Z Flip5 devices each feature different colourfully customised Flex Window interfaces.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (14)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (15) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (16)

    Video plays on Galaxy Z Flip5 in Flex Mode. The Flex Mode Panel is expanded from a launch button and used to navigate the video with a playback timeline and advanced control buttons, like volume and skip.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (17) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (18)

    An extreme closeup of a folded Galaxy Z Flip5 seen from the Flex Window and bottom frame. Zooming out, the device opens to stand like a tent.

    Flex Window. The largest Cover Screen on a Galaxy Z Flip yet

    Galaxy Z Flip5 debuts a 3.4-inch Flex Window built for self expression.1 Compact and eye-catching from every angle, this foldable is as versatile as it is portable.

    Choose from four colours inspired by nature

    Find your vibe with colours inspired by the natural world: Mint, Graphite, Cream, Lavender.

    *Image simulated for illustrative purposes.

    Mint Graphite Cream Lavender

    Two Galaxy Z Flip5 devices in Mint. One is folded like a tent and seen from the rear panel. The second is folded and partially obscured by the first device. Next, a close up of the Rear Camera. Next, a close up of the Flex Hinge.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (20)

    Two Galaxy Z Flip5 devices in Graphite. One is folded like a tent and seen from the rear panel. The second is folded and partially obscured by the first device. Next, a close up of the Rear Camera. Next, a close up of the Flex Hinge.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (21)

    Two Galaxy Z Flip5 devices in Cream. One is folded like a tent and seen from the rear panel. The second is folded and partially obscured by the first device. Next, a close up of the Rear Camera. Next, a close up of the Flex Hinge.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (22)

    Two Galaxy Z Flip5 devices in Lavender. One is folded like a tent and seen from the rear panel. The second is folded and partially obscured by the first device. Next, a close up of the Rear Camera. Next, a close up of the Flex Hinge.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (23)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (24)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (25)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (26)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (27)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (28)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (29)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (30)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (31)

    Online exclusive colours that evoke urban nature

    Add an extra pop of personality to your device with exclusive urban colours you can only find on Samsung.com: Grey, Blue, Green and Yellow.5

    *Image simulated for illustrative purposes.

    Online Exclusive

    Grey Blue Green Yellow

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (32)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (33)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (34)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (35)

    Better together

    Flipsuit Case6,7,8,9

    Learn more

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (36)

    Better together

    Clear Gadget Case

    Learn more

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (37)

    Camera. The best selfie experience on a Galaxy smartphone yet

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (38)

    Captured by Galaxy Z Flip5#withGalaxy

    Capture stunning selfies with FlexCam and make any angle your best yet. No matter which camera you choose, Galaxy Z Flip5 makes it easy. Now all you have left to do is master the art of the pose.

    FlexCam selfies. Even when closed

    Launch the camera app with the Flex Window shortcut to capture the moment. Snap photos, tweak the settings and retake, all without ever opening your phone.

    *This photo has been retouched for colour correction.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (39)

    Captured by Galaxy Z Flip5#withGalaxy

    Hands-free selfies. Courtesy of FlexCam

    Unfold to Flex Mode and bring your buddies in frame for a wider group selfie.10 Use the Camera Controller on your Galaxy Watch6 and stun the world with zoomed-in selfies.11 It's the ultimate flex.

    *Image simulated for illustrative purposes. Actual UI may be different.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (40)

    Captured by Galaxy Z Flip5#withGalaxy

    Capture the night with Nightography12

    Galaxy Z Flip5's Wide camera brings even more of the scene into frame. Unfolding is optional — just swipe the Camera icon on the Flex Window and start recording with FlexCam. And keep the camera rolling, because with 4K Nightography video, losing sunlight doesn't mean losing out on quality.13

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (41) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (42)

    A woman records a selfie video at night with two friends behind her. The wide angle fits them all into frame. Details are crisp, colours are warm and the details of the background are clear.

    Captured by Galaxy Z Flip5#withGalaxy

    Front Camera selfies. Lookin' sharp

    Unfolding to the Front Camera gives your selfie skills a major upgrade. Forget the days of hazy front-facing shots. Super Clear Lens keeps photos crisp and even reduces flare from bright lights behind you.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (43)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (44) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (45)

    Three Galaxy Z Flip5 devices each feature different colourfully customised Flex Window interfaces.

    Meet the 3.4” Flex Window

    • Reply to messages with a QWERTY keyboard, make calls, check the weather forecast and even pull out your wallet — all from a big, bright Flex Window.14 Now featuring more clock faces and crisscross gestures you know from across the Galaxy ecosystem.

      Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (46) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (47)

      Cross gestures are used to navigate various apps and widgets on the Flex Window. On the home screen, swiping to the right pulls up Notifications. Pulling down reveals the Quick Panel. Returning to the home screen, a swipe to the left toggles through widgets, like Samsung Health Steps and a Calendar with interactive menu features. Finally, swiping up from the home screen opens Samsung Wallet.

    • And no matter how many widgets you use, you'll never get lost in the shuffle with Multi Widget View.

      Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (48) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (49)

      Pinching in diagonally from the home screen opens Multi Widget View, which is a tiled representation of installed widgets. Pinching out returns to the home screen. A swipe left opens the Calendar app. Pinching in diagonally from the app returns to Multi Widget View, which can be scrolled through and used to navigate to another app, like Galaxy Wearable. Finally, a swipe up returns to the home screen.

    Customise the Flex Window just the way you like it

    Take total control of the Flex Window. Customise your device with loads of widgets, video wallpapers, clock faces, styles and more to make your Galaxy Z Flip5 uniquely you.

    *Image simulated for illustrative purposes. Actual UI may be different.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (50)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (51)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (52)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (53)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (54)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (55)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (56)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (57)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (58)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (59)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (60)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (61)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (62)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (63)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (64)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (65)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (66)

    Take total control of the Flex Window. Customise your device with loads of widgets, video wallpapers, clock faces, styles and more to make your Galaxy Z Flip5 uniquely you.

    *Image simulated for illustrative purposes. Actual UI may be different.

    *The information displayed on Finance Watchlist widget is for illustrative purposes only.

    All-day battery life15 Listen up to 57 hrs2 Watch up to 20 hrs2

    Backed up by a powerful processor, this 3700mAh (typical) battery is even more efficient, stretching out the charge so you can keep binging movies or gaming late into the night.16 Need extra juice? Enable low power mode to keep the fun flowing.

    The most powerful processor on Galaxy foldables yet

    The new Snapdragon® 8 Gen 2 Mobile Platform for Galaxy takes you to a whole new level of power.17 Experience smoother graphics, faster AI and improved battery performance.

    *AP performance improvements shown compared to Galaxy Z Flip4. Actual performance will depend on user environment, conditions and pre-installed software and applications.

    Snapdragon® 8 Gen 2 Mobile Platform for Galaxy

    25 %↑

    GPU

    20 %↑

    NPU

    17 %↑

    CPU

    *AP performance improvements shown compared to Galaxy Z Flip4. Actual performance will depend on user environment, conditions and pre-installed software and applications.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (67)

    An all-new flex,
    Flex Mode Panel3

    Level up how you use Flex Mode with more controls at your fingertips.10 Hide or expand the panel with the touch of a button. You can even whip out a touchpad and cursor. And an enhanced playback control panel makes navigating through music and media easier and more precise than ever.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (68)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (69) Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (70)

    Video plays on Galaxy Z Flip5 in Flex Mode. The Flex Mode Panel is expanded from a launch button and used to navigate the video with a playback timeline and advanced control buttons, like volume and skip.

    Durable to keep you flipping

    Galaxy Z Flip5 stays tough. And with the added support of Samsung Care+, take it with you without worrying about whatever slip-ups may happen along the way.

    • This foldable wears a tough suit of armor frame – Armor Aluminum.19

      Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (71)

    • Introducing a new, durable, dual rail design for our foldable hinges.

      Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (72)

    • With Galaxy Z Flip5, a little bit of moisture won’t dampen your day.20

      Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (73)

    Samsung Care+ is available for extra protection

    Learn more

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (74)

    Watch6. Start your fitness journey

    Link Galaxy Z Flip5 up with a Galaxy Watch6 series device to learn more about your workout performance.21 Watch yourself improve every day with gym selfies to prove it — no mirrors required when you use Camera Controller.22

    *Image simulated for illustrative purposes. Actual UI may be different.

    Better together

    Galaxy Watch6 Series

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (75)

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (76)

    Designed with the planet in mind

    The Galaxy Z Flip5 and Fold5 feature a wider variety of recycled materials than their previous generations, including pre-consumer recycled glass and aluminum and post-consumer recycled plastics, sourced from discarded fishing nets, water barrels and PET bottles.23,24

    *Image simulated for illustrative purposes. Actual UI may be different.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (77)

    Switch, upgrade and trade. It's all easy

    Smart Switch

    Meet the safe and secure way to move what you loved on your old device to your new Galaxy Z Flip5.25

    *Image simulated for illustrative purposes. Actual UI may be different.

    Learn more

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (78)

    Trade in and save

    Trade in your old phone to get an instant discount on your new Galaxy Z Flip5.

    Learn more

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (79)

    Your Privacy. Secured

    Your privacy is on lock with Samsung Knox. Share what you want. Secure everything else.

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (80)

    Storage

    Store it all with 256GB and 512GB options.26

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (81)

    Get started with 6 months of Microsoft 365 Basic. You'll get 100 GB of cloud storage, plus ad-free, secure email and access to Microsoft support.27

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (82)

    Elevate your day with stylish accessories

    LEARN MORE

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (83)

    SEE IN 360°

    Take it for a spin

    *Online exclusive colours only available on Samsung.com.

    Frequently Asked Questions

    • The key differences between the Galaxy Z Flip5 and the Galaxy Z Flip4 are the improvements made to the front screen, customisable features and camera.

      The Galaxy Z Flip5 has a 3.4-inch Flex Window that supports more widgets, more customisation and the best selfie experience on a Samsung Galaxy smartphone yet.1,12,18 The Flex Mode experience has improved through an all-new Flex Mode Panel.3,10 It also features a new Flex Hinge with a dual rail design.

      Learn more about the key differences between the Galaxy Z Flip5 and Z Flip4 here.

    • Folded, the new Galaxy Z Flip5 is more compact compared to the Galaxy Z Flip4. The new flip phone is 85.1mm long and 15.1mm thick compared to the older model which measures 17.1mm at the hinge and 15.9mm at the outer edge. Folded, the Galaxy Z Flip5 is 71.9mm wide, 165.1mm long and 6.9mm thick.

      Read more on how to choose the right phone size for you here.

    • The Galaxy Z Flip5 is powered by an intelligent 3700mAh (typical) battery that lets you listen to music for up to 57 hours or watch up to 20 hours of video playback.2,16

    • Galaxy Z Flip5 is water resistant and comes with an IPX8 rating.20

    • The new and improved foldable screen hinge is more durable than ever on the Galaxy Z Flip5, thanks to the new Flex Hinge which features a durable, dual rail design. Learn more about how foldable screens work in this helpful article.

    • The Galaxy Z Flip5 is the first in the flip phone series with a proximity sensor and support HBM (high brightness mode). Plus, the main screen is 6.7 inch, with an adaptive 120 Hz Dynamic AMOLED 2X Display for crystal clear picture. The folding screen measures at 3.4 inches and reaches a peak brightness of 1600 nits.1,14

    • The Galaxy Z Flip5 have improved since their predecessor with a wider angle, 10MP front camera. On the other side, it features a 12MP Ultra Wide Camera and 12MP Wide Camera. Improved hardware — like the Super Clear Lens — and software — like adaptive VDIS — work together to deliver crisp and colourful photos, selfies and videos.

      Learn more about how to choose the right camera features for you here.18

    • The Galaxy Z Flip5 comes in a variety of colours including Mint, Graphite, Cream and Lavender. Grey, Blue, Green and Yellow are exclusive colours found only on Samsung.com.

    • You can easily customise the Galaxy Z Flip5 screen thanks to Flex Window and One UI. Make your flip phone your own with fun widgets, clock faces, and more!

    GO TO GALAXY Z FOLD5

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (84)

    Check out smart ways to pay for your Galaxy Z Flip5

    n/a n/a Buy now n/a

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (85)

    OPEN IN AR

    Life opens up with Galaxy

    EXPLORE MORE

    Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (89)

    Unfold a whole new way to do business

    GO TO SAMSUNG BUSINESS

    *All specifications and descriptions provided herein may be different from the actual specifications and descriptions for the product. Samsung reserves the right to make changes to this document and the product described herein, at anytime, without obligation on Samsung to provide notification of such change. All functionality, features, specifications, GUI and other product information provided in this document including, but not limited to, the benefits, design, pricing, components, performance, availability, and capabilities of the product are subject to change without notice or obligation. The contents within the screen are simulated images and are for demonstration purposes only.

    1. Measured diagonally, Galaxy Z Flip5's Cover Screen size is 3.4 inches in the full rectangular form; actual viewable area is approximately 95% of the full rectangular area due to the rounded corners and lower cutout.
    2. Based on internal testing. Actual video and audio playback times vary by network connection, settings, file format, screen brightness, battery condition and other factors.
    3. Flex Mode Panel must be enabled in device settings in order to be used with installed apps in the apps tray, including third party apps. List of supported apps can be found in the Flex mode panel settings under your device's settings menu.
    4. This device contains magnets. Keep it away from credit cards, implanted medical devices, and other devices that may be affected by magnets. In the case of medical devices, keep your device more than 15cm apart. Stop using your device if you suspect any interference with your medical device and consult your physician or your medical device manufacturer.
    5. Online exclusive colours need special production. Please allow up to 4 weeks for delivery.
    6. Actual UX/UI may differ.
    7. Flipsuit Case actual colors, collaboration card options and corresponding content displayed on screen may differ. One piece of content is displayed per card.
    8. Brand collaboration accessories include one brand collaboration card in box.
    9. Flipsuit Case collaboration card content should be downloaded separately before use. Network connection required for download.
    10. Flex Mode supported at angles between 75°and 115°. Some apps may not be supported in Flex Mode.
    11. Camera Controller zoom feature is available on Samsung Galaxy Watch4 series and later released Galaxy Watch models that are paired with a Galaxy S series, Galaxy Note series and Galaxy Z series smartphone running One UI 5.1 or above with Camera Controller support. Galaxy Watch6 sold separately
    12. Snapdragon® 8 Gen 2 Mobile Platform for Galaxy features a dedicated image signal processor (ISP) block for low-light video enhancement.
    13. Galaxy Z Flip5 supports 4K video recording. To view in 4K resolution, videos must be played on a device with 4K video resolution.
    14. Certain applications may not support Flex Window widgets. Galaxy Z Flip5’s Cover Screen is the first in the Galaxy Z Flip series with a proximity sensor and first Galaxy Z Flip Cover Screen to support HBM. Galaxy Z Flip5’s Cover Screen HBM has a peak brightness of 1600 nits for a brighter and clearer display
    15. Actual battery life varies by network environment, features and apps used, frequency of calls and messages, the number of times charged, and many other factors. Estimated against the average usage profile compiled by UX Connect Research. Independently assessed by UX Connect research between 2023.06.19-2023.06.29 in US with pre-release versions of SM-F946 and SM-F731 under default setting using LTE and 5G Sub6 networks.
    16. Typical value tested under third-party laboratory condition. Typical value is the estimated average value considering the deviation in battery capacity among the battery samples tested under IEC 61960 standard. Rated capacity is 4270mAh for Galaxy Z Fold5, and 3591mAh for Galaxy Z Flip5. Actual battery life may vary depending on network environment, usage patterns and other factors.
    17. Snapdragon is a product of Qualcomm Technologies, Inc. and/or its subsidiaries. Snapdragon is a trademark or registered trademark of Qualcomm Incorporated.
    18. Compared to previous models.
    19. Frame does not include volume and side keys or SIM tray.
    20. Based on lab test conditions for submersion in up to 1.5 meters of freshwater for up to 30 minutes. Not advised for beach or pool use. Water resistance of device is not permanent and may diminish over time because of normal wear and tear. IPX8 rating is not dust-resistant.
    21. Galaxy Watch6 series devices sold separately. Galaxy Watch6 must be paired with a Samsung Galaxy Phone with Android 10.0, minimum 1.5GB RAM and Samsung Health app version 6.24 or later. Bioelectrical impedance analysis (BIA) is intended for general wellness and fitness purposes only. Not intended for use in detection, diagnosis or treatment. The measurements are for your personal reference only. Please consult a medical professional for advice.
    22. Availability may vary by model and paired smartphone that supports Camera Controller. The update will initially be available on Bluetooth versions and will roll out to LTE versions later.
    23. Galaxy Z Flip5: 15 device components that feature a minimum of 10% post-consumer recycled material plastic or pre-consumer recycled aluminum, or Corning® Gorilla® Glass Victus® 2 with an average of 22% pre-consumer recycled content. These components include Volume Key Bracket, Speaker Module (Upper & Lower), Rear Top, Display Connector Cap, FPCB RF Cable Bracket, Rear Mid, Case Front (Main), Case Front (Sub), Volume Key, Finger Key Bracket, Receiver Deco, Connector to Connector Holder, SIM Tray, Sub Window, Back Glass. (Galaxy Z Flip4: 6 device components). Galaxy Z Fold5: 15 device components that feature a minimum of 10% post-consumer recycled material plastic or pre-consumer recycled aluminum, or Corning® Gorilla® Glass Victus® 2 with an average of 22% pre-consumer recycled glass. These components include Volume Key FPCB Bracket, Top Speaker Module (Upper & Lower), Bottom Speaker Module (Upper & Lower), Cover Display Connector, Case Front (Main), Case Front (Sub), Antenna (Sub), Antenna (Main), Volume Key, Finger Key Bracket, SIM Tray, Connector to Connector Holder, Camera Deco (Top & Bottom), Sub Window, Back Glass. (Galaxy Z Fold4: 6 device components). The above measurements are based on weight.
    24. Types of recycled materials include post-consumer recycled PA sourced from discarded fishing nets, post-consumer recycled PBT sourced from discarded PET bottles, post-consumer recycled PC sourced from water barrels and pre-consumer recycled aluminum sourced from discarded scrap material generated as a by-product during manufacturing. The scrap metal is re-melted, filtered for impurities and then recycled to make parts within Samsung’s manufacturing process. There is also pre-consumer recycled content sourced from discarded glass waste generated as a byproduct of glass manufacturing. This glass waste is crushed into cullet and then used as a component in the Corning® Gorilla® Glass Victus® 2 manufacturing process.
    25. Wired transfers require at least Android™ 4.3. If you do not have the required USB cable/connector for a wired transfer to Galaxy, you can also use wireless transfer options. iOS 5 or older Android OS must use wireless transfer options. Open Smart Switch Mobile in “Settings” on your new Galaxy phone or download Smart Switch Mobile app from Galaxy Store. Data and content available for transfer may vary by OS. The data of the Galaxy device is backed up and restored to the storage device. Use PC backup through Smart Switch PC or SD card backup function of Smart Switch Mobile.
    26. Actual storage availability may vary depending on pre-installed software.
    27. Six month trial of Microsoft 365 Basic available for consumers with OneDrive-Gallery Sync capable Samsung phones (phones on the Verizon network in the U.S. not eligible). After the 6 month trial, your subscription will automatically renew into a monthly paid subscription at the current price, subject to Google Play’s terms and conditions. Cancel any time to stop future charges. Offer not available to existing Microsoft 365 or OneDrive premium subscribers (including trials), customers who previously redeemed an Office, OneDrive or other Microsoft storage bonus or free trial offer, customers with a locked OneDrive account, or former Microsoft 365 or OneDrive/Microsoft Storage premium subscribers who cancelled in the last 90 days. One offer per customer and per device. Offer cannot be transferred or combined with other Microsoft offers, and is available between March 15, 2023 and December 31, 2023. Offer must be redeemed during this period on the Google Play Store and participants must sync their gallery with OneDrive to commence the 6 month trial. Offer requires a Samsung and Microsoft account. Refer to https://www.microsoft.com/onedrive-samsung-offer for details.
    28. Measured diagonally, Galaxy Z Flip5's Main Screen size is 6.7” in the full rectangle and 6.6” accounting for the rounded corners; actual viewable area is less due to the rounded corners and camera hole.

    ')); } } }; var isZoom = function () { var winInnerWidth = window.innerWidth, winOuterWidth = window.outerWidth, zoomLevel = 100 / ((winInnerWidth / winOuterWidth) * 100); if (zoomLevel > 1.75) { document.documentElement.classList.add('browser-zoomed-175'); } else { document.documentElement.classList.remove('browser-zoomed-175'); } }; return { setLownetworkClass: setLownetworkClass, setResolution: setResolution, onClickSup: onClickSup, centeredFocus: centeredFocus, setArBanner: setArBanner, isZoom: isZoom, } })(); (function () { var resize = window.flagship.common.resize, common = window.flagship.highlights.common, utils = window.flagship.common.utils, agent = navigator.userAgent.toLowerCase(), maxOs = agent.indexOf('mac os') > -1, touchDevice = ('ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch)), els = {}; var init = function () { els.videoWrap = document.querySelectorAll('.common-video'); els.isGlobal = document.documentElement.classList.contains('global'); if (!!els.videoWrap[0]) { setElements(); } for (var i = 0; i < els.videoWrap.length; i++) { if (els.videoWrap[i].childNodes.length > 0) { els.videoWrap[i].control = els.videoWrap[i].querySelector('.common-video__control'); els.videoWrap[i].blind = els.videoWrap[i].querySelector('.blind'); els.videoWrap[i].blind.innerHTML = els.videoWrap[i].control.getAttribute('data-play-text').toLowerCase(); } } }; var setElements = function () { els.viewerPopup = document.querySelector('.highlights-viewer'); els.scrollVideosWrap = document.querySelectorAll('.js-scroll-video'); els.scrollVideos = document.querySelectorAll('.js-scroll-video video'); for (var i = 0; i < els.scrollVideosWrap.length; i++) { els.scrollVideos[i].videoWrap = els.scrollVideosWrap[i]; } }; var bindEvents = function () { window.addEventListener('load', anchorPosition); window.addEventListener('hashchange', anchorPosition); }; var setResize = function () { resize.init([{ resolution: 1920, resolutionName: 'desktop', eventFunction: '' }, { resolution: 1023, resolutionName: 'tablet', eventFunction: '' }, { resolution: 767, resolutionName: 'mobile', eventFunction: '' }, { resolution: 320, resolutionName: 'mobileS', eventFunction: '' }], 200); resize.add(common.setResolution); }; var setScrollControl = function () { window.scrollController = ANIUTIL.scrollController(); scrollController.init({ speed: 120, duration: 0.5 }); }; var setImageLoader = function () { window.imageLoader = ANIUTIL.mediaLoader({ lazyClass: '.js-img-src', responsiveClass: '.js-res-img', preset: els.isGlobal ? '' : '?imbypass=true', loadOption: [{ resolution: 1920, attribute: 'data-src-pc' }, { resolution: 1023, attribute: 'data-src-tb' }, { resolution: 767, attribute: 'data-src-mo' }, { resolution: 360, attribute: 'data-src-mo-s' }], visiblePoint: 2 }); window.bgLoader = ANIUTIL.mediaLoader({ type: 'bgImage', lazyClass: '.js-bg-img', loadOption: [{ resolution: 1920, attribute: '', bgOpts: '' }], visiblePoint: 1 }); }; var setVideoLoader = function () { window.videoLoader = ANIUTIL.mediaLoader({ type: 'video', lazyClass: '.js-video-src', responsiveClass: '.js-res-video', preset: els.isGlobal ? '' : '?imbypass=true', loadOption: [{ resolution: 1920, attribute: 'data-video-src-pc' }, { resolution: 1023, attribute: 'data-video-src-tb' }, { resolution: 767, attribute: 'data-video-src-mo' }, { resolution: 360, attribute: 'data-video-src-mo-s' }], visiblePoint: 1, endCallback: function (video) { if (video.videoWrap && !video.videoWrap.classList.contains('is-loaded')) { video.videoWrap.classList.add('is-loaded'); } } }); }; var setDisclaimer = function () { els.supClicker = document.querySelectorAll('a.click_sup'); for (var i = 0; i < els.supClicker.length; i++) { els.supClicker[i].addEventListener('click', common.onClickSup); } }; var setCenteredfocus = function () { els.contents = document.querySelector('#contents'); els.allClickables = els.contents.querySelectorAll('a, button, input, select'); for (var i = 0; i < els.allClickables.length; i++) { els.allClickables[i].addEventListener('focusin', common.centeredFocus); } }; var anchorPosition = function () { if (window.location.hash != '') { if (window.location.hash == '#colors-see-in-360') { if (els.viewerPopup) els.viewerPopup.show(); } else if (window.location.hash == '#online-exclusive-color-see-in-360') { if (els.viewerPopup) els.viewerPopup.show(); } else if (!!document.querySelector(window.location.hash)) { var hash = location.hash.split('#')[1], hashSection = document.querySelector('#contents #' + hash), hashTimeout = null; clearTimeout(hashTimeout); hashTimeout = setTimeout(function () { var sectionTop = hashSection.getBoundingClientRect().top, navHeight = utils.getNavHeight(), hashScroll = window.pageYOffset + sectionTop - navHeight; window.scrollTo(0, hashScroll); }, 300); } } }; var setVideoTheme = function () { var videoList = document.querySelectorAll('.common-video'); for (var i = 0; i < videoList.length; i++) { var colorType = videoList[i].getAttribute('data-theme-type'); if (colorType === 'white') { videoList[i].classList.add('common-video__white'); } else if (colorType === 'black') { videoList[i].classList.add('common-video__black'); } } }; var onLoadHandler = function () { common.setLownetworkClass(); common.setArBanner(); init(); bindEvents(); setResize(); if (!maxOs && !touchDevice) { setScrollControl(); } setImageLoader(); setVideoLoader(); setDisclaimer(); setCenteredfocus(); setVideoTheme(); common.isZoom(); resize.add(common.isZoom); }; onLoadHandler(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.cameraVideo = (function () { var els = {}, objs = {}, utils = window.flagship.common.utils; var init = function () { els.section = document.querySelector('.highlights-video'); if (!!els.section) { setElements(); objList.setVideo(); objList.setScene(); bindEvents(); } }; var setElements = function () { els.scrollVideoWrap = els.section.querySelector('.common-video'); els.scrollVideo = els.section.querySelector('.common-video__figure>video'); els.scrollController = els.section.querySelector('.common-video__control'); els.scrollControllerBlindText = els.scrollController.querySelector('.blind'); }; var bindEvents = function () { window.addEventListener('scroll', handlerList.scroll); els.scrollController.addEventListener('click', handlerList.videoCta); handlerList.scroll(); }; var objList = { setVideo: function () { objs.cameraVideo = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: 8, wrap: els.scrollVideoWrap, video: els.scrollVideo, resetCallback: function () { if (els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.remove('is-completed'); } }, playCallback: function () { els.scrollControllerBlindText.innerText = 'pause'; setTagging.pause(); }, pauseCallback: function () { els.scrollControllerBlindText.innerText = 'play'; setTagging.play(); }, endCallback: function () { if (!els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.add('is-completed'); } } }); }, setScene: function () { objs.scene = SCROLLER({ trackElement: els.scrollVideo, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; var handlerList = { scroll: function () { objs.scene.trackAnimation(function () { objs.cameraVideo.scrollActive(this.progress); }); }, videoCta: function () { if (els.scrollVideo.paused) { els.scrollVideo.play(); } else { els.scrollVideo.pause(); } } }; var setTagging = { play: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('pause', 'play')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('pause', 'play')); } }, pause: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('play', 'pause')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.colors = (function () { var els = {}, status = {}; var init = function () { els.section = document.querySelector('.highlights-colors'); if (!!els.section) { setElements(); bindEvents(); } }; var setElements = function () { els.colors = els.section.querySelectorAll('.highlights-colors__tab-button'); els.colorName = els.section.querySelectorAll('.highlights-colors__tab-name'); els.panel = els.section.querySelectorAll('.highlights-colors__tab-panel--side .highlights-colors__image-wrap'); els.popupBtn = els.section.querySelector('.common-cta-encased'); //swiper els.swiper = null; els.swiperContainer = els.section.querySelector('.swiper-container'); status.isClick = false; }; var bindEvents = function () { window.addEventListener('DOMContentLoaded', onLoadHandler, { once: true }); window.addEventListener('scroll', onLoadHandler); for (var i = 0; i < els.colors.length; i++) { els.colors[i].index = i; els.colors[i].addEventListener('click', onClickColorItem); } }; var onLoadHandler = function () { setSwiper(); }; var onClickColorItem = function () { var target = this; status.isClick = true; handlerList.colorchip(target); handlerList.colorName(target); handlerList.panel(target); handlerList.slideTo(target); }; var handlerList = { colorchip: function (target) { var oldColor = els.section.querySelector('.highlights-colors__tab .is-active'); if (!target.classList.contains('is-active')) { oldColor.classList.remove('is-active'); oldColor.setAttribute('aria-selected', false); target.classList.add('is-active'); target.setAttribute('aria-selected', true); } }, colorName: function (target) { var oldColorName = els.section.querySelector('.highlights-colors__tab-names .is-active'), index = target.index; if (!els.colorName[index].classList.contains('is-active')) { oldColorName.classList.remove('is-active'); oldColorName.setAttribute('aria-hidden', true); els.colorName[index].classList.add('is-active'); els.colorName[index].setAttribute('aria-hidden', false); } }, panel: function (target) { var oldPanel = els.section.querySelector('.highlights-colors__tab-panel-group .is-active'), index = target.index; if (!els.panel[index].classList.contains('is-active')) { oldPanel.classList.remove('is-active'); els.panel[index].classList.add('is-active'); els.popupBtn.setAttribute('data-model-color', els.panel[index].getAttribute('id')); } }, slideTo: function (target) { var index = target.index; els.swiper.slideTo((index + 1), 500, false); status.isClick = false; }, setPopupBtnColor: function (target) { els.popupBtn.setAttribute('data-model-color', target.getAttribute('id')); } } var swiperEvents = { init: function () { var notification = this.el.querySelector('.swiper-notification'); if (!!notification) this.el.removeChild(notification); var activeIndex = this.activeIndex, activeSlide = this.slides[activeIndex]; activeSlideImg = this.slides[this.activeIndex].querySelectorAll('img'), prevSlideImg = this.slides[this.activeIndex - 1].querySelectorAll('img'), nextIndex = (this.activeIndex < this.slides.length - 1) ? (this.activeIndex + 1) : 0, nextSlide = this.slides[nextIndex], nextSlideImg = nextSlide.querySelectorAll('img'); if (activeSlideImg[0] && !activeSlideImg[0].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia(activeSlideImg); } if (prevSlideImg[0] && !prevSlideImg[0].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia(prevSlideImg); } if (nextSlideImg[0] && !nextSlideImg[0].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia(nextSlideImg); } accessibility.slide(); handlerList.setPopupBtnColor(activeSlide); }, slideChange: function () { var activeIndex = els.swiper.realIndex, activeSlide = this.slides[activeIndex + 1], activeSlideImg = els.swiper.slides[els.swiper.activeIndex].querySelectorAll('img'), nextIndex = (this.activeIndex < this.slides.length - 1) ? (this.activeIndex + 1) : 0, nextSlideImg = this.slides[nextIndex].querySelectorAll('img'); if (!status.isClick) { handlerList.colorchip(els.colors[activeIndex]); handlerList.colorName(els.colors[activeIndex]); handlerList.panel(els.colors[activeIndex]); handlerList.setPopupBtnColor(this.slides[els.swiper.activeIndex]); } if (!activeSlideImg[0].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia(activeSlideImg); } if (!nextSlideImg[0].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia(nextSlideImg); } accessibility.slide(); handlerList.setPopupBtnColor(activeSlide); }, slideChangeTransitionEnd: function () { status.isClick = false; } }; var setSwiper = function () { var windowOffsetTop = window.pageYOffset, windowOffsetBottom = windowOffsetTop + window.innerHeight, targetOffsetTop = windowOffsetTop + els.section.getBoundingClientRect().top; if (els.swiper == null && windowOffsetBottom >= targetOffsetTop) { els.swiper = new Swiper(els.swiperContainer, { init: false, slidesPerView: 'auto', loop: true, loopedSlides: 1 }); els.swiper.on('init', swiperEvents.init); els.swiper.on('slideChange', swiperEvents.slideChange); els.swiper.on('slideChangeTransitionEnd', swiperEvents.slideChangeTransitionEnd); els.swiper.init(); } }; var accessibility = { slide: function () { for (var i = 0; i < els.swiper.slides.length; i++) { if (i != els.swiper.activeIndex) { els.swiper.slides[i].setAttribute('aria-hidden', true); } else { els.swiper.slides[i].setAttribute('aria-hidden', false); } } } } return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.customization = (function () { var els = {}, status = {}, utils = window.flagship.common.utils, agent = navigator.userAgent.toLowerCase(), maxOs = agent.indexOf('mac os') > -1, touchDevice = ('ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch)), resize = window.flagship.common.resize; var init = function () { els.section = document.querySelector('.highlights-customization'); if (!!els.section) { setElements(); bindEvents(); } }; var setElements = function () { els.uiTabBtns = els.section.querySelectorAll('.highlights-customization__ui-tab-btn'); els.uiContent = els.section.querySelector('.highlights-customization__ui-content-wrap'); els.clockUi = els.section.querySelector('.highlights-customization__ui-content--clock'); els.widgetUi = els.section.querySelector('.highlights-customization__ui-content--widget'); els.widgetUiList = Array.prototype.slice.call(els.widgetUi.querySelectorAll('.highlights-customization__ui-item')); els.clockUiList = Array.prototype.slice.call(els.clockUi.querySelectorAll('.highlights-customization__ui-item')); els.clockDisplay = els.section.querySelector('.highlights-customization__display--clock'); els.widgetDisplay = els.section.querySelector('.highlights-customization__display--widget'); els.clockDisplayItem = els.clockDisplay.querySelectorAll('.highlights-customization__display-item'); els.widgetDisplayItem = els.widgetDisplay.querySelectorAll('.highlights-customization__display-item'); }; var bindEvents = function () { window.addEventListener('DOMContentLoaded', handlerList.load, { once: true }); els.uiTabBtns[0].addEventListener('click', handlerList.clockTab); els.uiTabBtns[1].addEventListener('click', handlerList.widgetTab); if (!maxOs && !touchDevice) { els.uiContent.addEventListener('mouseenter', function () { scrollController.destroy(true); }, { capture: true }); els.uiContent.addEventListener('mouseleave', function () { scrollController.init({ speed: 120, duration: 0.5 }); }, { capture: true }); } resize.add(handlerList.checkMobile); }; var setSwiper = function() { els.scrollbar = els.isUiWrap.querySelector('.highlights-customization__scrollbar'); if (els.swiper == null) { els.swiper = new Swiper(els.isUiWrap, { init: false, slidesPerView: 'auto', observer: true, observeParents: true, observeSlideChildren: true, scrollbar: { el: els.scrollbar, draggable: true, hide: false, } }); els.swiper.on('init', function() { var notification = this.el.querySelector('.swiper-notification'); this.el.removeChild(notification); }); els.swiper.init(); } }; var destroySwiper = function() { if (els.swiper != null) { els.swiper.scrollbar.dragEl.style = ''; els.swiper.scrollbar.destroy(true); els.swiper.destroy(true); els.swiper = null; } }; var handlerList = { load: function () { status.currentTab = 'clock'; status.prevTab = els.uiTabBtns[0]; for (var i = 0; i < els.clockDisplayItem.length; i++) { utils.onAccessibility(els.clockDisplayItem[i]); } for (var i = 0; i < els.widgetDisplayItem.length; i++) { utils.onAccessibility(els.widgetDisplayItem[i]); } tabEvents.initTab(); }, checkMobile: function() { if (resize.checkResolution().indexOf('mobile') > -1) { setSwiper(); } else { destroySwiper(); } }, widgetTab: function () { if (this.classList.contains('is-active')) return; tabEvents.removeActive(); status.currentTab = 'widget'; tabEvents.changeTab(this); imageLoader.setResponsiveMedia(els.widgetUi.querySelectorAll('img')); status.prevTab = this; }, clockTab: function () { if (this.classList.contains('is-active')) return; tabEvents.removeActive(); status.currentTab = 'clock'; tabEvents.changeTab(this); status.prevTab = this; }, clickUi: function () { var self = this, currentIndex = els.isUi.indexOf(self); if (self.classList.contains('is-active')) return; clearTimeout(status.clickTimeout); status.clickTimeout = setTimeout(function () { tabEvents.removeActive(); accessibility.setTitle(self.querySelector('button')); self.classList.add('is-active'); els.isDisplay[currentIndex].classList.add('is-active'); utils.offAccessibility(els.isDisplay[currentIndex]); status.prevIndex = currentIndex; }, 200); }, }; var tabEvents = { initTab: function () { status.prevIndex = 0; status.prevDisplayWrap = els.isDisplayWrap; status.prevUiWrap = els.isUiWrap; destroySwiper(); tabEvents.getElement(); tabEvents.initTabTitle(); tabEvents.firstAddActive(); tabEvents.bindClickUi(); accessibility.uiItem(); handlerList.checkMobile(); }, changeTab: function (currentTab) { if (resize.checkResolution().indexOf('mobile') > -1) els.uiContent.scrollLeft = -1; tabEvents.initTab(currentTab); status.prevTab.classList.remove('is-active'); status.prevDisplayWrap.classList.remove('is-active'); status.prevUiWrap.classList.remove('is-visible'); status.prevUiWrap.classList.remove('is-active'); currentTab.classList.add('is-active'); els.isUiWrap.classList.add('is-visible'); setTimeout(function () { els.isUiWrap.classList.add('is-active'); }, 100); setTimeout(function() { if (resize.checkResolution().indexOf('mobile') > -1) els.uiContent.scrollLeft = 0; }, 200); els.isDisplayWrap.classList.add('is-active'); }, getElement: function () { els.isUiWrap = status.currentTab == 'clock' ? els.clockUi : els.widgetUi; els.isUi = status.currentTab == 'clock' ? els.clockUiList : els.widgetUiList; els.isDisplayWrap = status.currentTab == 'clock' ? els.clockDisplay : els.widgetDisplay; els.isDisplay = status.currentTab == 'clock' ? els.clockDisplayItem : els.widgetDisplayItem; }, removeActive: function () { els.isUi[status.prevIndex].classList.remove('is-active'); els.isUi[status.prevIndex].querySelector('button').removeAttribute('title'); els.isDisplay[status.prevIndex].classList.remove('is-active'); utils.onAccessibility(els.isDisplay[status.prevIndex]); }, firstAddActive: function () { els.isUi[0].classList.add('is-active'); accessibility.setTitle(els.isUi[0].querySelector('button')); els.isDisplay[0].classList.add('is-active'); utils.offAccessibility(els.isDisplay[0]); }, bindClickUi: function () { for (var i = 0; i < els.isUi.length; i++) { els.isUi[i].addEventListener('click', handlerList.clickUi); } }, initTabTitle: function () { if (status.currentTab === 'clock') { els.uiTabBtns[1].removeAttribute('title'); accessibility.setTitle(els.uiTabBtns[0]); } else { els.uiTabBtns[0].removeAttribute('title'); accessibility.setTitle(els.uiTabBtns[1]); } } }; var accessibility = { uiItem: function () { if (status.currentTab === 'clock') { utils.onAccessibility(els.widgetUi); utils.offAccessibility(els.clockUi); } else { utils.onAccessibility(els.clockUi); utils.offAccessibility(els.widgetUi); } }, setTitle: function (button) { if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) { button.setAttribute('title', LOCAL_VARI.selected); } else { button.setAttribute('title', 'Selected'); } }, }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.design = (function () { var els = {}, objs = {}, utils = window.flagship.common.utils, resize = window.flagship.common.resize; currDevice = resize.checkResolution(); var init = function () { els.section = document.querySelector('.highlights-design'); if (!!els.section) { setElements(); objList.setVideo(); objList.setScene(); bindEvents(); } }; var setElements = function () { els.scrollVideoWrap = els.section.querySelector('.common-video'); els.scrollVideo = els.section.querySelector('.common-video__figure>video'); els.scrollController = els.section.querySelector('.common-video__control'); els.scrollControllerBlindText = els.scrollController.querySelector('.blind'); }; var bindEvents = function () { window.addEventListener('scroll', handlerList.scroll); els.scrollController.addEventListener('click', handlerList.videoCta); handlerList.scroll(); resize.add(onResizeHandler); }; var onResizeHandler = function (currRes) { currDevice = currRes; }; var objList = { setVideo: function () { objs.designVideo = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: (currDevice.indexOf('mobile') > -1) ? 21 : 24, reversePoint: (currDevice.indexOf('mobile') > -1) ? 82 : 80, wrap: els.scrollVideoWrap, video: els.scrollVideo, resetCallback: function () { if (els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.remove('is-completed'); } }, playCallback: function () { els.scrollControllerBlindText.innerText = 'pause'; setTagging.pause(); }, pauseCallback: function () { els.scrollControllerBlindText.innerText = 'play'; setTagging.play(); }, endCallback: function () { if (!els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.add('is-completed'); } } }); }, setScene: function () { objs.scene = SCROLLER({ trackElement: els.scrollVideo, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; var handlerList = { scroll: function () { objs.scene.trackAnimation(function () { objs.designVideo.scrollActive(this.progress); }); }, videoCta: function () { if (els.scrollVideo.paused) { els.scrollVideo.play(); } else { els.scrollVideo.pause(); } } }; var setTagging = { play: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('pause', 'play')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('pause', 'play')); } }, pause: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('play', 'pause')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.durability = (function () { var els = {}, utils = window.flagship.common.utils; var init = function () { els.section = document.querySelector('.highlights-durability'); if (!!els.section) { setElements(); setProperty(); bindEvents(); } }; var setElements = function () { els.durabilityItemWrap = els.section.querySelector('.highlights-durability__list'); els.durabilityItem = els.section.querySelectorAll('.highlights-durability__item'); }; var setProperty = function () { for (var i = 0; i < els.durabilityItem.length; i++) { els.durabilityItem[i].btn = els.durabilityItem[i].querySelector('.highlights-durability__item-button'); els.durabilityItem[i].desc = els.durabilityItem[i].querySelector('.highlights-durability__item-description'); els.durabilityItem[i].img = els.durabilityItem[i].querySelector('.highlights-durability__item-image'); if (!els.durabilityItem[i].classList.contains('is-open')) utils.onAccessibility(els.durabilityItem[i].img); } }; var bindEvents = function () { window.addEventListener('DOMContentLoaded', onLoadHandler, { once: true }); for (var i = 0; i < els.durabilityItem.length; i++) { els.durabilityItem[i].btn.addEventListener('click', onClickItemBtn); } }; var onLoadHandler = function () { els.durabilityItem[0].desc.style.display = 'block'; }; var onClickItemBtn = function () { var currentItem = this.parentElement.parentElement, oldItem = els.durabilityItemWrap.querySelector('.is-open'), dataOmni = this.getAttribute('data-omni'), gaLa = this.getAttribute('ga-la'); if ((currentItem != oldItem) && !currentItem.classList.contains('is-open')) { oldItem.setAttribute('aria-expanded', false); utils.onAccessibility(oldItem.img); this.setAttribute('aria-expanded', true); utils.offAccessibility(currentItem.img); $(oldItem.desc).slideUp(300); $(currentItem.desc).slideDown(300); setTimeout(function() { oldItem.classList.remove('is-open'); currentItem.classList.add('is-open'); }, 100); this.setAttribute('data-omni', dataOmni.replace('open', 'close')); this.setAttribute('ga-la', gaLa.replace('open', 'close')); } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.excellence = (function () { var els = {}, objs = {}, resize = window.flagship.common.resize, utils = window.flagship.common.utils, currDevice = null, prevDevice = null; var init = function () { els.section = document.querySelector('.highlights-excellence'); if (!!els.section) { setElements(); setProperty(); bindEvents(); } }; var setElements = function () { els.contentWrap = document.querySelector('#wrap'); els.sceneTrack = els.section.querySelector('.highlights-excellence__fixed-track'); els.sceneFixed = els.section.querySelector('.highlights-excellence__fixed-item'); els.item = els.section.querySelectorAll('.highlights-excellence__item'); els.accBanner = document.querySelector('.highlights-accessories'); // swiper els.swiper = null; els.swiperEl = els.section.querySelector('.highlights-excellence__carousel'); els.swiperSlides = els.swiperEl.querySelectorAll('.highlights-excellence__item'); els.swiperNavArrowNext = els.swiperEl.querySelector('.swiper-button-next'); els.swiperNavArrowPrev = els.swiperEl.querySelector('.swiper-button-prev'); els.arrowTimeout = null; els.orientationTimeout = null; }; var setProperty = function () { for (var i = 0; i < els.item.length; i++) { var clickable = els.item[i].querySelectorAll('a, button'); if (clickable.length > 0) { for (var j = 0; j < clickable.length; j++) { clickable[j].item = els.item[i]; clickable[j].addEventListener('keydown', onFocusClickable); } } } }; var objList = { setScene: function() { if (objs.scene == null) { objs.scene = SCROLLER({ trackElement: els.sceneTrack, fixedElement: els.sceneFixed, useFixed: utils.detector.isIEorEdge < 0 ? false : true, useSticky: utils.detector.isIEorEdge < 0 ? true : false, trackHeight: 1.5, correction: -1, useStrictMode: false }); } } }; var bindEvents = function () { window.addEventListener('DOMContentLoaded', onLoadHandler, { once: true }); window.addEventListener('scroll', scrollerHandlerList.onScroller); window.addEventListener('orientationchange', function () { clearTimeout(els.orientationTimeout); els.orientationTimeout = setTimeout(function () { checkBrokenFixed(); setCard(); }, 1000); }); els.swiperNavArrowNext.addEventListener('click', swiperEvents.onClickArrow); els.swiperNavArrowNext.addEventListener('keydown', swiperEvents.onClickArrow); els.swiperNavArrowPrev.addEventListener('click', swiperEvents.onClickArrow); els.swiperNavArrowPrev.addEventListener('keydown', swiperEvents.onClickArrow); resize.add(onResizeHandler); }; var onLoadHandler = function () { currDevice = resize.checkResolution(); prevDevice = currDevice; setTimeout(function() { checkBrokenFixed(); setCard(); }, 100); }; var onResizeHandler = function(currRes) { currDevice = currRes; if (currDevice != prevDevice) { onResponsiveHandler(); prevDevice = currDevice; } else if (!utils.detector.isTouchDevice) { checkBrokenFixed(); } setCard(); }; var onResponsiveHandler = function() { if (currDevice.indexOf('mobile') > -1) { els.accBanner.style.marginTop = ''; } checkBrokenFixed(); }; var setCard = function() { var slideMargin = parseInt(window.getComputedStyle(els.swiperSlides[0]).marginLeft), slideWidth = els.swiperSlides[0].clientWidth + (slideMargin * 2), slideWrapWidth = slideWidth * (els.swiperSlides.length), innerWidth = els.section.querySelector('.common-inner').clientWidth, contentWrapWidth = els.contentWrap.clientWidth, currSize = (contentWrapWidth - innerWidth) / 2, SlideTotalSize = slideWrapWidth + currSize; if (document.documentElement.classList.contains('is-broken-fixed')) { scrollerHandlerList.destroyScroller(); if (els.swiper != null) swiperEvents.destroy(); } else { if (currDevice.indexOf('mobile') == -1) { if (els.swiper != null) swiperEvents.destroy(); if (els.item.length > 3 || contentWrapWidth < SlideTotalSize) { objList.setScene(); scrollerHandlerList.onScroller(); } else { scrollerHandlerList.destroyScroller(); } } else { scrollerHandlerList.destroyScroller(); setSwiper(); } } }; // scroller var scrollerHandlerList = { onScroller: function () { if (objs.scene != null) { if (!document.documentElement.classList.contains('is-broken-fixed')) { var outerHeight = els.sceneFixed.clientHeight, innerHeight = els.sceneFixed.querySelector('.common-inner').clientHeight, accMarginTop = (outerHeight - innerHeight) / 2 - utils.getNavHeight(), accValue = (accMarginTop < 0) ? 0 : accMarginTop; els.accBanner.style.marginTop = -accValue + 'px'; } objs.scene.trackAnimation(function () { if (this.progress > -10 && this.progress < 100) { var slideMargin = parseInt(window.getComputedStyle(els.swiperSlides[0]).marginLeft), slideWidth = els.swiperSlides[0].clientWidth + (slideMargin * 2), slideWrapWidth = slideWidth * (els.swiperSlides.length), innerWidth = els.section.querySelector('.common-inner').clientWidth, contentWrapWidth = els.contentWrap.clientWidth, moveSize = slideWrapWidth - contentWrapWidth, currSize = (contentWrapWidth - innerWidth), slideValue = moveSize + currSize; transValue = ANIUTIL.calRange({ targetValue: slideValue, progress: this.progress, startPoint: 0, endPoint: 20 }); var tweener = new TweenMax(els.swiperEl, 0.2, { x: transValue * (utils.isRTL() ? 1 : -1) + 'px', ease: 'none' }); tweener.updateTo({ x: transValue * (utils.isRTL() ? 1 : -1) + 'px' }, true); } }); } }, destroyScroller: function () { if (objs.scene != null) { objs.scene.destroy(true, true); objs.scene = null; els.swiperEl.style = ''; els.sceneTrack.style = ''; } } }; // swiper var setSwiper = function () { if (els.swiper == null) { els.swiper = new Swiper(els.swiperEl, { init: false, centeredSlides: true, slidesPerView: 'auto', navigation: { nextEl: els.swiperNavArrowNext, prevEl: els.swiperNavArrowPrev, } }); els.swiper.init(); els.swiper.on('init', swiperEvents.init); els.swiper.on('slideChange', swiperEvents.slideChange); } }; var swiperEvents = { init: function () { var notification = this.el.querySelector('.swiper-notification'); if (!!notification) this.el.removeChild(notification); setAccessibility.slide(); setAccessibility.arrow(); }, slideChange: function () { setAccessibility.slide(); setAccessibility.arrow(); }, destroy: function () { if (els.swiper != null) { els.swiper.destroy(true); els.swiper = null; } }, onClickArrow: function (e) { if ((e.type == 'keydown' && e.keyCode == 13) || (e.type == 'click' && document.documentElement.classList.contains('isTouchDevice'))) { e.preventDefault(); clearTimeout(els.arrowTimeout); els.arrowTimeout = setTimeout(function () { if (els.swiper.isBeginning && !els.swiper.isEnd) { els.swiperNavArrowNext.focus(); } else if (!els.swiper.isBeginning && els.swiper.isEnd) { els.swiperNavArrowPrev.focus(); } }, 300); } } }; var setAccessibility = { slide: function () { for (var i = 0; i < els.swiper.slides.length; i++) { if (i != els.swiper.snapIndex) { utils.onAccessibility(els.swiper.slides[i]); } else { utils.offAccessibility(els.swiper.slides[i]); } } }, arrow: function () { if (els.swiper.isBeginning && !els.swiper.isEnd) { utils.offAccessibility(els.swiperNavArrowNext); utils.onAccessibility(els.swiperNavArrowPrev); } else if (!els.swiper.isBeginning && els.swiper.isEnd) { utils.offAccessibility(els.swiperNavArrowPrev); utils.onAccessibility(els.swiperNavArrowNext); } else { utils.offAccessibility(els.swiperNavArrowNext); utils.offAccessibility(els.swiperNavArrowPrev); } } }; var checkBrokenFixed = function () { if (currDevice.indexOf('mobile') == -1) { var widHeight = window.innerHeight - utils.getNavHeight(), headLineHeight = els.sceneFixed.querySelector('.common-sub-headline').clientHeight, carouselMarginTop = parseInt(window.getComputedStyle(els.swiperEl).marginTop), itemHeightArr = [], maxHeight = null, cardHeight = null; for (var i = 0; i < els.swiperSlides.length; i++) { itemHeightArr.push(els.swiperSlides[i].clientHeight); } maxHeight = itemHeightArr.reduce(function(prev, itemArr) { return Math.max(prev, itemArr); }); cardHeight = maxHeight; totalHeight = headLineHeight + carouselMarginTop + cardHeight; if (widHeight <= totalHeight) { document.documentElement.classList.add('is-broken-fixed'); } else { document.documentElement.classList.remove('is-broken-fixed'); } } else { document.documentElement.classList.remove('is-broken-fixed'); } }; var onFocusClickable = function(e) { var targetItem = this.item, targetIndex = [].indexOf.call(els.swiperSlides, targetItem); if (objs.scene != null) { var startScroll = els.sceneTrack.getBoundingClientRect().top + window.pageYOffset, maxScroll = startScroll + (parseInt(window.getComputedStyle(els.sceneTrack).height) / 2); els.sceneFixed.scrollLeft = 0; if (e.type == 'keydown' && targetIndex >= 3) { window.scrollTo(0, maxScroll); } else { window.scrollTo(0, startScroll); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.exclusive = (function () { var els = {}; var init = function () { els.section = document.querySelector('.highlights-exclusive'); if (!!els.section) { setElements(); bindEvents(); } }; var setElements = function () { els.colors = els.section.querySelectorAll('.highlights-exclusive__tab-button'); els.panel = els.section.querySelectorAll('.highlights-exclusive__tab-panel'); els.colorName = els.section.querySelectorAll('.highlights-exclusive__tab-name'); els.popupBtn = els.section.querySelector('.common-cta-encased'); }; var bindEvents = function () { for (var i = 0; i < els.colors.length; i++) { els.colors[i].index = i; els.colors[i].addEventListener('click', onClickColorItem); if (els.colors[i].classList.contains('is-active')) { els.popupBtn.setAttribute('data-model-color', els.panel[els.colors[i].index].getAttribute('id')); } } }; var onClickColorItem = function () { var oldColor = els.section.querySelector('.highlights-exclusive__tab .is-active'), oldPanel = els.section.querySelector('.highlights-exclusive__tab-panel-group .is-active'), oldColorName = els.section.querySelector('.highlights-exclusive__tab-names .is-active'), index = this.index; // colorchip if (!this.classList.contains('is-active')) { oldColor.classList.remove('is-active'); oldColor.setAttribute('aria-selected', false); this.classList.add('is-active'); this.setAttribute('aria-selected', true); } // panel if (!els.panel[index].classList.contains('is-active')) { oldPanel.classList.remove('is-active'); oldPanel.setAttribute('aria-hidden', true); els.panel[index].classList.add('is-active'); els.panel[index].setAttribute('aria-hidden', false); els.popupBtn.setAttribute('data-model-color', els.panel[index].getAttribute('id')); } if (!els.colorName[index].classList.contains('is-active')) { oldColorName.classList.remove('is-active'); oldColorName.setAttribute('aria-hidden', true); els.colorName[index].classList.add('is-active'); els.colorName[index].setAttribute('aria-hidden', false); } }; return { init: init } })(); })();; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.faq = (function () { var els = {}, utils = window.flagship.common.utils; var init = function () { els.section = document.querySelector('.highlights-faq'); if (!!els.section) { setElements(); bindEvents(); } }; var setElements = function () { els.faqItems = els.section.querySelectorAll('.highlights-faq__item'); }; var bindEvents = function () { for (var i = 0; i < els.faqItems.length; i++) { els.faqItems[i].arrowBtn = els.faqItems[i].querySelector('.highlights-faq__item button'); els.faqItems[i].arrowBtn.index = i; els.faqItems[i].answer = els.faqItems[i].querySelector('.highlights-faq__answer'); els.faqItems[i].cta = els.faqItems[i].querySelector('.highlights-faq__cta'); els.faqItems[i].arrowBtn.addEventListener('click', onClickFaqBtn); if (els.faqItems[i].cta) { els.faqItems[i].cta.addEventListener('click', onClickFaqCta); } } }; var onClickFaqBtn = function () { var index = this.index, parentWrap = els.faqItems[index], dataOmni = this.getAttribute('data-omni'), gaLa = this.getAttribute('ga-la'), self = this; if (!parentWrap.classList.contains('is-open')) { parentWrap.classList.add('is-open'); $(parentWrap.answer).stop().slideDown(300); this.setAttribute('aria-expanded', true); setTimeout(function () { self.setAttribute('data-omni', dataOmni.replace('open', 'close')); self.setAttribute('ga-la', gaLa.replace('open', 'close')); }, 50); } else { parentWrap.classList.remove('is-open'); $(parentWrap.answer).stop().slideUp(250); this.setAttribute('aria-expanded', false); setTimeout(function () { self.setAttribute('data-omni', dataOmni.replace('close', 'open')); self.setAttribute('ga-la', gaLa.replace('close', 'open')); }, 50); } }; var onClickFaqCta = function (e) { if (this.getAttribute('href').indexOf('#') == 0) { e.preventDefault(); var faqId = this.getAttribute('href').split('#')[1], section = document.querySelector('#' + faqId), sectionTop = section.getBoundingClientRect().top, navHeight = utils.getNavHeight(), faqScroll = window.pageYOffset + sectionTop - navHeight, sectionTimeout = null; clearTimeout(sectionTimeout); sectionTimeout = setTimeout(function () { if (!!section.querySelectorAll('button, a')[0]) { section.querySelectorAll('button, a')[0].focus(); } else { section.querySelector('.common-eyebrow').setAttribute('tabindex', 0); section.querySelector('.common-eyebrow').focus(); section.querySelector('.common-eyebrow').addEventListener('focusout', function () { section.querySelector('.common-eyebrow').removeAttribute('tabindex'); }); } }, 20); window.scrollTo(0, faqScroll); }; }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.flexpanel = (function () { var els = {}, objs = {}, utils = window.flagship.common.utils, resize = window.flagship.common.resize; currDevice = resize.checkResolution(); var init = function () { els.section = document.querySelector('.highlights-flex-mode'); if (!!els.section) { setElements(); objList.setVideo(); objList.setScene(); bindEvents(); } }; var setElements = function () { els.scrollVideoWrap = els.section.querySelector('.js-scroll-video'); els.scrollVideo = els.section.querySelector('.js-scroll-video .common-video__figure>video'); els.scrollController = els.section.querySelector('.js-scroll-video .common-video__control'); els.scrollControllerBlindText = els.scrollController.querySelector('.blind'); }; var bindEvents = function () { window.addEventListener('scroll', handlerList.scroll); els.scrollController.addEventListener('click', handlerList.videoCta); handlerList.scroll(); resize.add(onResizeHandler); }; var onResizeHandler = function (currRes) { currDevice = currRes; }; var objList = { setVideo: function () { objs.flexpanelVideo = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: 10, reversePoint: (currDevice.indexOf('mobile') > -1) ? 76 : 87, wrap: els.scrollVideoWrap, video: els.scrollVideo, resetCallback: function () { if (els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.remove('is-completed'); } }, playCallback: function () { els.scrollControllerBlindText.innerText = 'pause'; setTagging.pause(); }, pauseCallback: function () { els.scrollControllerBlindText.innerText = 'play'; setTagging.play(); }, endCallback: function () { if (!els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.add('is-completed'); } } }); }, setScene: function () { objs.scene = SCROLLER({ trackElement: els.scrollVideo, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; var handlerList = { scroll: function () { objs.scene.trackAnimation(function () { objs.flexpanelVideo.scrollActive(this.progress); }); }, videoCta: function () { if (els.scrollVideo.paused) { els.scrollVideo.play(); } else { els.scrollVideo.pause(); } } }; var setTagging = { play: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('pause', 'play')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('pause', 'play')); } }, pause: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('play', 'pause')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.flexwindowBig = (function () { var els = {}, objs = {}, utils = window.flagship.common.utils, resize = window.flagship.common.resize; currDevice = resize.checkResolution(); var init = function () { els.section = document.querySelector('.highlights-flexwindow__scroll-video'); if (!!els.section) { setElements(); objList.setVideo(); objList.setScene(); bindEvents(); } }; var setElements = function () { els.scrollVideoWrap = els.section.querySelector('.js-scroll-video'); els.scrollVideo = els.section.querySelector('.js-scroll-video .common-video__figure>video'); els.scrollController = els.section.querySelector('.js-scroll-video .common-video__control'); els.scrollControllerBlindText = els.scrollController.querySelector('.blind'); }; var bindEvents = function () { window.addEventListener('scroll', handlerList.scroll); els.scrollController.addEventListener('click', handlerList.videoCta); handlerList.scroll(); resize.add(onResizeHandler); }; var onResizeHandler = function (currRes) { currDevice = currRes; }; var objList = { setVideo: function () { objs.flexwindowBigVideo = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: 26, reversePoint: (currDevice.indexOf('mobile') > -1) ? 54 : 77, wrap: els.scrollVideoWrap, video: els.scrollVideo, resetCallback: function () { if (els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.remove('is-completed'); } }, playCallback: function () { els.scrollControllerBlindText.innerText = 'pause'; setTagging.pause(); }, pauseCallback: function () { els.scrollControllerBlindText.innerText = 'play'; setTagging.play(); }, endCallback: function () { if (!els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.add('is-completed'); } } }); }, setScene: function () { objs.scene = SCROLLER({ trackElement: els.scrollVideo, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; var handlerList = { scroll: function () { objs.scene.trackAnimation(function () { objs.flexwindowBigVideo.scrollActive(this.progress); }); }, videoCta: function () { if (els.scrollVideo.paused) { els.scrollVideo.play(); } else { els.scrollVideo.pause(); } } }; var setTagging = { play: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('pause', 'play')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('pause', 'play')); } }, pause: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('play', 'pause')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.flexwindowGesture = (function () { var els = {}, objs = {}, utils = window.flagship.common.utils; var init = function () { els.section = document.querySelector('.highlights-flexwindow__item--gesture'); if (!!els.section) { setElements(); objList.setVideo(); objList.setScene(); bindEvents(); } }; var setElements = function () { els.scrollVideoWrap = els.section.querySelector('.js-scroll-video'); els.scrollVideo = els.section.querySelector('.js-scroll-video .common-video__figure>video'); els.scrollController = els.section.querySelector('.js-scroll-video .common-video__control'); els.scrollControllerBlindText = els.scrollController.querySelector('.blind'); }; var bindEvents = function () { window.addEventListener('scroll', handlerList.scroll); els.scrollController.addEventListener('click', handlerList.videoCta); handlerList.scroll(); }; var objList = { setVideo: function () { objs.flexwindowGestureVideo = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: 10, reversePoint: 84, wrap: els.scrollVideoWrap, video: els.scrollVideo, resetCallback: function () { if (els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.remove('is-completed'); } }, playCallback: function () { els.scrollControllerBlindText.innerText = 'pause'; setTagging.pause(); }, pauseCallback: function () { els.scrollControllerBlindText.innerText = 'play'; setTagging.play(); }, endCallback: function () { if (!els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.add('is-completed'); } } }); }, setScene: function () { objs.scene = SCROLLER({ trackElement: els.scrollVideo, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; var handlerList = { scroll: function () { objs.scene.trackAnimation(function () { objs.flexwindowGestureVideo.scrollActive(this.progress); }); }, videoCta: function () { if (els.scrollVideo.paused) { els.scrollVideo.play(); } else { els.scrollVideo.pause(); } } }; var setTagging = { play: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('pause', 'play')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('pause', 'play')); } }, pause: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('play', 'pause')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.flexwindowMap = (function () { var els = {}, objs = {}, utils = window.flagship.common.utils; var init = function () { els.section = document.querySelector('.highlights-flexwindow__item--map'); if (!!els.section) { setElements(); objList.setVideo(); objList.setScene(); bindEvents(); } }; var setElements = function () { els.scrollVideoWrap = els.section.querySelector('.js-scroll-video'); els.scrollVideo = els.section.querySelector('.js-scroll-video .common-video__figure>video'); els.scrollController = els.section.querySelector('.js-scroll-video .common-video__control'); els.scrollControllerBlindText = els.scrollController.querySelector('.blind'); }; var bindEvents = function () { window.addEventListener('scroll', handlerList.scroll); els.scrollController.addEventListener('click', handlerList.videoCta); handlerList.scroll(); }; var objList = { setVideo: function () { objs.flexwindowMapVideo = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: 10, reversePoint: 84, wrap: els.scrollVideoWrap, video: els.scrollVideo, resetCallback: function () { if (els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.remove('is-completed'); } }, playCallback: function () { els.scrollControllerBlindText.innerText = 'pause'; setTagging.pause(); }, pauseCallback: function () { els.scrollControllerBlindText.innerText = 'play'; setTagging.play(); }, endCallback: function () { if (!els.scrollVideoWrap.classList.contains('is-completed')) { els.scrollVideoWrap.classList.add('is-completed'); } } }); }, setScene: function () { objs.scene = SCROLLER({ trackElement: els.scrollVideo, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; var handlerList = { scroll: function () { objs.scene.trackAnimation(function () { objs.flexwindowMapVideo.scrollActive(this.progress); }); }, videoCta: function () { if (els.scrollVideo.paused) { els.scrollVideo.play(); } else { els.scrollVideo.pause(); } } }; var setTagging = { play: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('pause', 'play')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('pause', 'play')); } }, pause: function () { if (els.scrollController.hasAttribute('data-omni')) { var dataOmni = els.scrollController.getAttribute('data-omni').toLowerCase(); els.scrollController.setAttribute('data-omni', dataOmni.replace('play', 'pause')); } if (els.scrollController.hasAttribute('ga-la')) { var gaLa = els.scrollController.getAttribute('ga-la').toLowerCase(); els.scrollController.setAttribute('ga-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.overview = (function () { var els = {}, objs = {}, status = {}, utils = window.flagship.common.utils, common = window.flagship.highlights.common, resize = window.flagship.common.resize; var init = function () { els.section = document.querySelector('.highlights-overview'); if (!!els.section) { setElements(); objList.video(); objList.scene(); bindEvents(); } }; var setElements = function () { els.videoWrap = els.section.querySelectorAll('.common-video'); els.videoControlBtn = Array.prototype.slice.call(els.section.querySelectorAll('.common-video__control')); els.overviewPopup = document.querySelector('.highlights-overview-popup'); els.popupContents = els.overviewPopup.querySelector('.highlights-overview-popup__contents'); els.closeCta = els.overviewPopup.querySelector('.highlights-overview-popup__close'); els.contents = document.querySelector('#contents'); els.wrap = document.querySelector('#wrap'); els.swiperContainer = els.overviewPopup.querySelector('.highlights-overview-popup__media'); els.pagination = els.overviewPopup.querySelector('.highlights-overview-popup__pagination'); els.nextArrow = els.overviewPopup.querySelector('.swiper-button-next'); els.prevArrow = els.overviewPopup.querySelector('.swiper-button-prev'); els.swiperControlBtn = els.overviewPopup.querySelector('.highlights-overview-popup__contents-control'); els.moVideoControlWrap = els.overviewPopup.querySelector('.highlights-overview-popup__video-controls'); els.textWrap = document.querySelector('.highlights-overview-popup__textbox'); els.textList = els.textWrap.querySelectorAll('.highlights-overview-popup__textbox-item'); els.downCta = els.section.querySelector('.highlights-overview__down-cta'); els.goToCta = els.textWrap.querySelectorAll('.highlights-overview-popup__textbox-cta'); els.supClicker = document.querySelectorAll('.js-popup-sup a.click_sup'); els.customizationList = document.querySelectorAll('.highlights-customization__ui-content'); }; var bindEvents = function () { window.addEventListener('DOMContentLoaded', handlerList.onLoad, { once: true }); window.addEventListener('scroll', handlerList.scroll); els.videoControlBtn[0].addEventListener('click', handlerList.videoControl); els.videoControlBtn[1].addEventListener('click', handlerList.videoControl); els.swiperControlBtn.addEventListener('click', swiperEvents.slideControl); els.downCta.addEventListener('click', handlerList.goToFeature); for (var i = 0; i < els.supClicker.length; i++) { els.supClicker[i].addEventListener('click', handlerList.goDisclaimer); } for (var i = 0; i < els.goToCta.length; i++) { els.goToCta[i].addEventListener('click', handlerList.goToFeature); els.goToCta[i].addEventListener('mouseenter', function () { if (!!status.paused) return; status.paused = false; swiperEvents.slideControl(); }); els.goToCta[i].addEventListener('mouseleave', function () { if (!status.paused) return; status.paused = true; swiperEvents.slideControl(); }); } resize.add(handlerList.onResize); }; var objList = { swiper: function () { if (els.swiper == null) { els.swiper = new Swiper(els.swiperContainer, { init: false, initialSlide: status.currentIndex - 1, loop: true, navigation: { nextEl: els.nextArrow, prevEl: els.prevArrow, }, pagination: { el: els.pagination, clickable: true, type: 'bullets', renderBullet: function () { return ''; } }, }); } }, popup: function () { utils.layerPopup({ layerPopup: els.overviewPopup, openerEvent: { proxy: true, element: els.section.querySelector('.highlights-overview__list-wrap'), class: 'highlights-overview__item-cta', }, closeCta: els.closeCta, moveTarget: document.documentElement, contents: els.contents, show: { start: function (eventElements) { els.overviewPopup.classList.add('is-open'); status.currentIndex = parseInt(eventElements.openerCta.getAttribute('data-slide-index')); objList.swiper(); els.swiper.on('init', swiperEvents.swiperInit); els.swiper.on('slideChange', swiperEvents.slideChange); els.swiper.on('transitionEnd', swiperEvents.slideTransitionEnd); setTimeout(function () { els.swiper.init(); }, 200); els.overviewPopup.addEventListener('click', handlerList.clickOutside); els.popupOpener = eventElements.openerCta; }, end: function(eventElements) { handlerList.popupMedia(); swiperEvents.slidePlay(); handlerList.scrollbarCheck(); eventElements.closeCta.focus(); } }, hide: { start: function(eventElements) { eventElements.closeCta.blur(); videoEvents.reset(status.oldVideo); els.overviewPopup.classList.remove('is-active'); els.swiperContainer.classList.remove('is-active'); setTimeout(function() { els.overviewPopup.classList.remove('is-open'); }, 600); }, end: function(eventElements) { swiperEvents.destroySwiper(); eventElements.openerCta.focus(); // customization accessibility set if (!els.customizationList[0].classList.contains('is-active')) { utils.onAccessibility(els.customizationList[0]); } else { utils.onAccessibility(els.customizationList[1]); } } } }); }, video: function () { objs.overviewVideo01 = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: 15, reversePoint: 78, wrap: els.videoWrap[0], video: els.videoWrap[0].querySelector('.common-video__figure > video'), playCallback: function () { accessibility.playState(els.videoControlBtn[0], 'video'); }, pauseCallback: function () { accessibility.pauseState(els.videoControlBtn[0], 'video'); }, endCallback: function () { if (!els.videoWrap[0].classList.contains('is-completed')) els.videoWrap[0].classList.add('is-completed'); } }); objs.overviewVideo02 = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: 17, wrap: els.videoWrap[1], video: els.videoWrap[1].querySelector('.common-video__figure > video'), playCallback: function () { accessibility.playState(els.videoControlBtn[1], 'video'); }, pauseCallback: function () { accessibility.pauseState(els.videoControlBtn[1], 'video'); }, endCallback: function () { if (!els.videoWrap[1].classList.contains('is-completed')) els.videoWrap[1].classList.add('is-completed'); } }); }, scene: function () { objs.scene01 = SCROLLER({ trackElement: els.videoWrap[0], useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); objs.scene02 = SCROLLER({ trackElement: els.videoWrap[1], useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); }, popupVideo: function (popupVideoWrap) { for (var i = 0; i < popupVideoWrap.length; i++) { ANIUTIL.videoHandler({ wrap: [popupVideoWrap[i], els.moVideoControlWrap], video: popupVideoWrap[i].querySelector('video'), playCallback: function () { var activeControl = handlerList.getActiveControl(); accessibility.playState(activeControl, 'video'); }, pauseCallback: function () { if (!!els.swiper) { var activeSlide = els.swiper.slides[els.swiper.activeIndex], isActive = activeSlide.getAttribute('data-is-video') && !!activeSlide.querySelector('video').paused; if (!!isActive) { var activeControl = handlerList.getActiveControl(); accessibility.pauseState(activeControl, 'video'); } } }, endCallback: function () { } }); } }, }; var handlerList = { onLoad: function() { status.currentDevice = resize.checkResolution(); handlerList.scroll(); objList.popup(); handlerList.checkMobile(); }, onResize: function(currRes) { status.currentDevice = currRes; handlerList.checkMobile(); handlerList.scrollbarCheck(); // video control if (!!els.swiper) { var activeSlide = els.swiper.slides[els.swiper.activeIndex], moControlWrap = els.popupContents.querySelector('.highlights-overview-popup__video-controls'); if (!!activeSlide.getAttribute('data-is-video')) { if (!!status.isMobile) { bgLoader.setResponsiveMedia(els.popupContents.querySelectorAll('.highlights-overview-popup__video-controls')); handlerList.moveVideoControl(activeSlide); } else { if (!!moControlWrap.querySelector('.common-video__control')) { activeSlide.querySelector('.common-video__control-wrap').appendChild(moControlWrap.querySelector('.common-video__control')); for (var i = 0; i < els.popupContents.querySelectorAll('.common-video__control').length; i++) { els.popupContents.querySelectorAll('.common-video__control')[i].removeAttribute('style'); } } } } } }, scrollbarCheck: function() { var isScroll = els.overviewPopup.offsetWidth > els.overviewPopup.scrollWidth; if (!!isScroll) { els.overviewPopup.classList.add('is-scrollbar-active'); } else { els.overviewPopup.classList.remove('is-scrollbar-active'); } }, checkMobile: function() { if (status.currentDevice === 'mobile' || status.currentDevice === 'mobileS') { status.isMobile = true; } else { status.isMobile = false; } }, getActiveControl: function () { if (!!status.isMobile) { return els.moVideoControlWrap.querySelector('.common-video__control'); } else { return els.swiper.slides[els.swiper.activeIndex].querySelector('.common-video__control') } }, clickOutside: function (e) { if (e.target.classList.contains('highlights-overview-popup')) { handlerList.destroyPopup(); els.popupOpener.focus(); els.popupOpener.addEventListener('focusin', common.centeredFocus); } }, scroll: function () { if (!!els.popupOpener) { els.popupOpener.addEventListener('focusin', function(e) { setTimeout(function() { common.centeredFocus.call(e.target); }, 800); els.popupOpener = null; }); } objs.scene01.trackAnimation(function () { objs.overviewVideo01.scrollActive(this.progress); }); objs.scene02.trackAnimation(function () { objs.overviewVideo02.scrollActive(this.progress); }); }, popupMedia: function () { if (!!status.popupMedia) { clearTimeout(status.popupMedia); } status.popupMedia = setTimeout(function () { els.overviewPopup.classList.add('is-active'); els.swiperContainer.classList.add('is-active'); handlerList.popupText(); }, 300); }, popupText: function () { if (!!els.oldText) { els.oldText.classList.remove('is-visible'); els.oldText.classList.remove('is-active'); } if (!!status.popupTextVisible) { clearTimeout(status.popupTextVisible); } if (!!status.popTextActive) { clearTimeout(status.popTextActive); } var textIndex = parseInt(els.swiper.slides[els.swiper.activeIndex].getAttribute('data-swiper-slide-index')); status.popupTextVisible = setTimeout(function () { els.textList[textIndex].classList.add('is-visible'); }, 50); status.popTextActive = setTimeout(function () { els.textList[textIndex].classList.add('is-active'); els.oldText = els.textList[textIndex]; }, 100); }, lazy: function () { if (els.swiper.activeIndex === 0) { status.nextIndex = els.swiper.slides.length - 1; status.prevIndex = els.swiper.slides.length - 3; } else { status.prevIndex = els.swiper.activeIndex - 1; status.nextIndex = els.swiper.activeIndex + 1; } for (var i = 0; i < els.swiper.slides.length; i++) { if (status.prevIndex === i || status.nextIndex === i || els.swiper.activeIndex === i) { var videoList = els.swiper.slides[i].querySelectorAll('video'), imageList = els.swiper.slides[i].querySelectorAll('img'), bgList = els.swiper.slides[i].querySelectorAll('.js-bg-img'), textIdx = parseInt(els.swiper.slides[i].getAttribute('data-swiper-slide-index')), textBg = els.textList[textIdx].querySelectorAll('.js-bg-img'), moControl = els.popupContents.querySelectorAll('.highlights-overview-popup__video-controls'); imageLoader.setResponsiveMedia(imageList); bgLoader.setResponsiveMedia(bgList); bgLoader.setResponsiveMedia(textBg); if (!!els.swiper.slides[i].getAttribute('data-is-video')) { videoLoader.setResponsiveMedia(videoList, function (targetElement) { if (!targetElement.videoHandler.wrap[0].classList.contains('is-loaded') || !targetElement.videoHandler.wrap[1].classList.contains('is-loaded')) { targetElement.videoHandler.wrap[0].classList.add('is-loaded'); targetElement.videoHandler.wrap[1].classList.add('is-loaded'); } }); if (!!status.isMobile) bgLoader.setResponsiveMedia(moControl); } } } }, videoControl: function () { var currentIndex = els.videoControlBtn.indexOf(this); if (currentIndex == 0) { if (objs.overviewVideo01.video.paused) objs.overviewVideo01.video.play(); else objs.overviewVideo01.video.pause(); } else { if (objs.overviewVideo02.video.paused) objs.overviewVideo02.video.play(); else objs.overviewVideo02.video.pause(); } }, popupVideoControl: function () { var activeVideo = els.swiper.slides[els.swiper.activeIndex].querySelector('video'); if (!activeVideo.paused) { activeVideo.pause(); } else { activeVideo.play(); if (!!utils.isLowNetwork() && !status.paused && activeVideo.currentTime === 0) { var isBullet = els.bullets[els.swiper.realIndex]; isBullet.classList.remove('is-active'); isBullet.classList.remove('is-duration-5s'); isBullet.classList.remove('is-paused-active'); setTimeout(function () { swiperEvents.setAutoplayDelay(els.swiper.slides[els.swiper.activeIndex]); isBullet.classList.add('is-active'); }, 50); } } }, setSlideStatus: function (activeSlide) { var activeTheme = activeSlide.getAttribute('data-card-theme'), isVideo = activeSlide.getAttribute('data-is-video'); // theme if (activeTheme === 'white') { els.popupContents.classList.remove('is-theme-black'); els.popupContents.classList.add('is-theme-white'); } else { els.popupContents.classList.remove('is-theme-white'); els.popupContents.classList.add('is-theme-black'); } // video check if (!!isVideo) { els.popupContents.classList.add('is-content-video'); } else { els.popupContents.classList.remove('is-content-video'); } }, goToFeature: function (e) { e.preventDefault(); var self = this, section = null; if (!!self.classList.contains('highlights-overview__down-cta')) { section = document.querySelector('#' + self.getAttribute('data-feature-name')); } else { section = document.querySelector(self.getAttribute('href')); handlerList.destroyPopup(); swiperEvents.destroySwiper(); } setTimeout(function () { var sectionTop = section.getBoundingClientRect().top; status.movePosition = (sectionTop + window.pageYOffset) - utils.getNavHeight(); var eyebrow = section.querySelector('.common-text'), clickable = section.querySelectorAll('a, button'); if (!!eyebrow) { var focusOutEvent = function () { eyebrow.removeAttribute('tabindex'); eyebrow.removeEventListener('focusout', focusOutEvent); } eyebrow.addEventListener('focusout', focusOutEvent); eyebrow.setAttribute('tabindex', 0); eyebrow.focus(); } else { clickable[0].focus(); } window.scrollTo(0, status.movePosition); }, 50); }, goDisclaimer: function () { var destIndex = parseFloat(this.innerText), disclaimer = document.querySelectorAll('#desc-section li')[destIndex - 1], disclaimerText = disclaimer.innerText, activeBlock = '' + disclaimerText + ''; handlerList.destroyPopup(); setTimeout(function () { disclaimer.innerHTML = activeBlock; disclaimer.querySelector('a').focus(); }, 300); var eventList = { focusIn: function () { common.centeredFocus.call(disclaimer.querySelector('a')); disclaimer.removeEventListener('focusin', eventList.focusIn); }, focusOut: function () { disclaimer.innerHTML = disclaimerText; disclaimer.removeAttribute('tabindex'); disclaimer.removeEventListener('focusout', eventList.focusOut); }, }; disclaimer.addEventListener('focusin', eventList.focusIn); disclaimer.addEventListener('focusout', eventList.focusOut); }, moveVideoControl: function (activeSlide) { if (!activeSlide.querySelector('.common-video')) return; var activeControl = activeSlide.querySelector('.common-video__control'); if (!!status.isMobile) { activeControl.style.display = 'block'; els.moVideoControlWrap.appendChild(activeControl); utils.offAccessibility(activeControl); status.prevControl = els.moVideoControlWrap.querySelector('.common-video__control'); status.moPrevIdx = els.swiper.activeIndex; } }, destroyPopup: function() { utils.visibleScroll(); utils.onAccessibility(els.overviewPopup); if (utils.detector.isIosDevice) els.popupOpener.style.display = ''; utils.offAccessibility(els.wrap); document.documentElement.style.overflow = ''; videoEvents.reset(status.oldVideo); els.overviewPopup.classList.remove('is-active'); els.swiperContainer.classList.remove('is-active'); setTimeout(function() { els.overviewPopup.classList.remove('is-open'); swiperEvents.destroySwiper(); }, 600); // customization accessibility set if (!els.customizationList[0].classList.contains('is-active')) { utils.onAccessibility(els.customizationList[0]); } else { utils.onAccessibility(els.customizationList[1]); } }, }; var swiperEvents = { swiperInit: function () { var notification = this.el.querySelector('.swiper-notification'), activeSlide = els.swiper.slides[els.swiper.activeIndex], popupVideoWrap = this.el.querySelectorAll('.common-video'); handlerList.moveVideoControl(activeSlide); // bullet animation, autoplay status.paused = false; els.bullets = this.pagination.bullets; els.progress = this.pagination.el.querySelectorAll('.swiper-pagination-bullet-progress-bar'); for (var i = 0; i < els.progress.length; i++) { els.progress[i].addEventListener('transitionend', function () { if (els.swiper !== null) { var isBullet = els.bullets[els.swiper.realIndex], isProgress = isBullet.querySelector('.swiper-pagination-bullet-progress-bar'), computedStyle = window.getComputedStyle(isProgress), propertyCalue = computedStyle.getPropertyValue('transform'), styleValue = propertyCalue.replace('matrix', '').replace(/[()]/g, '').split(',')[0]; if (styleValue == 1) { els.swiper.slideNext(); } } }); } setTimeout(function () { els.bullets[els.swiper.realIndex].classList.add('is-active'); }, 50); if (!!notification) this.el.removeChild(notification); handlerList.lazy(); objList.popupVideo(popupVideoWrap); videoEvents.play(activeSlide); swiperEvents.setAutoplayDelay(activeSlide); handlerList.setSlideStatus(activeSlide); accessibility.slide(); accessibility.pagination.label(); accessibility.pagination.tagging(); }, slideChange: function () { var activeSlide = els.swiper.slides[els.swiper.activeIndex], prevIdx = els.swiper.previousIndex == 0 ? els.bullets.length - 1 : els.swiper.previousIndex > els.bullets.length ? 0 : els.swiper.previousIndex - 1; els.swiperContainer.style.pointerEvents = 'none'; utils.onAccessibility(els.nextArrow); utils.onAccessibility(els.prevArrow); // mobile video control init if (!!status.prevControl && !!status.isMobile) { utils.onAccessibility(status.prevControl); status.prevControl.style.display = 'none'; els.swiper.slides[status.moPrevIdx].querySelector('.common-video__control-wrap').appendChild(status.prevControl); status.prevControl = null; } handlerList.moveVideoControl(activeSlide); // bullet animation, autoplay els.bullets[prevIdx].classList.remove('is-active'); els.bullets[prevIdx].classList.remove('is-duration-5s'); els.bullets[prevIdx].classList.remove('is-paused-active'); if (!status.paused) { els.bullets[els.swiper.realIndex].classList.remove('is-paused-active'); swiperEvents.slidePlay(); setTimeout(function () { els.bullets[prevIdx].querySelector('.swiper-pagination-bullet-progress-bar').removeAttribute('style'); }, 100); } else { els.bullets[prevIdx].querySelector('.swiper-pagination-bullet-progress-bar').removeAttribute('style'); els.bullets[els.swiper.realIndex].classList.add('is-paused-active'); } handlerList.popupText(); handlerList.lazy(); if (!!status.isMobile) { setTimeout(function() { if (!!!activeSlide.getAttribute('aria-hidden')) videoEvents.play(activeSlide); }, 50); } else { videoEvents.play(activeSlide); } swiperEvents.setAutoplayDelay(activeSlide); els.bullets[els.swiper.realIndex].classList.add('is-active'); handlerList.setSlideStatus(activeSlide); accessibility.slide(); accessibility.pagination.label(); }, slideTransitionEnd: function() { var activeSlide = els.swiper.slides[els.swiper.activeIndex]; if (!!status.oldVideo && !status.oldVideo.video.paused && activeSlide.querySelector('video') !== status.oldVideo.video) { videoEvents.reset(status.oldVideo); } // duplicate video reset var isFirst = els.swiper.activeIndex === 6 && els.swiper.previousIndex === 5, isSecond = els.swiper.activeIndex === 2 && els.swiper.previousIndex === 1, isLast = els.swiper.activeIndex === 0 && els.swiper.previousIndex === 1, isLastReverse = els.swiper.activeIndex === 4 && els.swiper.previousIndex === 5, duplicateVideo = null, duplicateVideo2 = null; if (!!isFirst) { duplicateVideo = els.swiper.slides[0].querySelector('video').videoHandler; duplicateVideo2 = els.swiper.slides[5].querySelector('video').videoHandler; } if (!!isSecond) { duplicateVideo = els.swiper.slides[6].querySelector('video').videoHandler; els.swiper.slides[1].style.opacity = 0; } else { els.swiper.slides[1].style.opacity = 1; } if (!!isLast) { duplicateVideo = els.swiper.slides[1].querySelector('video').videoHandler; duplicateVideo2 = els.swiper.slides[6].querySelector('video').videoHandler; } if (!!isLastReverse) { duplicateVideo = els.swiper.slides[0].querySelector('video').videoHandler; } videoEvents.reset(duplicateVideo); videoEvents.reset(duplicateVideo2); // arrow, swipe if (!!els.swiperContainer.hasAttribute('style')) els.swiperContainer.removeAttribute('style'); utils.offAccessibility(els.nextArrow); utils.offAccessibility(els.prevArrow); }, slideControl: function () { if (!els.swiper) return; var isBullet = els.bullets[els.swiper.realIndex], isProgress = isBullet.querySelector('.swiper-pagination-bullet-progress-bar'), computedStyle = window.getComputedStyle(isProgress), propertyCalue = computedStyle.getPropertyValue('transform'), styleValue = propertyCalue.replace('matrix', '').replace(/[()]/g, '').split(',')[0], duration = isBullet.classList.contains('is-duration-5s') ? 5500 : 3000, activeSlide = els.swiper.slides[els.swiper.activeIndex]; if (!status.paused || !!!status.paused) { status.paused = true; swiperEvents.slidePause(); isBullet.classList.remove('is-active'); isBullet.classList.remove('is-duration-5s'); isProgress.style.transform = 'scaleX(' + styleValue + ')'; isProgress.style.transitionDuration = (duration / 1000) - ((duration * styleValue) / 1000) + 's'; } else { status.paused = false; if (isBullet.classList.contains('is-paused-active')) { isProgress.removeAttribute('style'); } swiperEvents.slidePlay(); setTimeout(function () { isBullet.classList.add('is-active'); swiperEvents.setAutoplayDelay(activeSlide); }, 100); isBullet.classList.remove('is-paused-active'); isBullet.classList.remove('is-active'); isBullet.classList.remove('is-duration-5s'); } }, slidePlay: function () { els.popupContents.classList.remove('is-slide-pause'); els.popupContents.classList.add('is-slide-play'); accessibility.playState(els.swiperControlBtn, 'slide'); }, slidePause: function () { els.popupContents.classList.remove('is-slide-play'); els.popupContents.classList.add('is-slide-pause'); accessibility.pauseState(els.swiperControlBtn, 'slide'); }, setAutoplayDelay: function (activeSlide) { if (!!activeSlide.getAttribute('data-is-video')) { els.bullets[els.swiper.realIndex].classList.add('is-duration-5s'); } }, destroySwiper: function () { if (els.swiper != null) { if (!!status.isMobile && !!status.prevControl) { utils.onAccessibility(status.prevControl); status.prevControl.style.display = 'none'; els.swiper.slides[status.moPrevIdx].querySelector('.common-video__control-wrap').appendChild(status.prevControl); status.prevControl = null; } els.swiper.navigation.destroy(true); els.bullets = null; els.progress = null; els.swiper.destroy(true); els.swiper = null; els.oldText.classList.remove('is-visible'); els.oldText.classList.remove('is-active'); status.popupMedia = null; status.popupTextVisible = null; status.popTextActive = null; swiperEvents.slidePause(); } }, }; var videoEvents = { loadCheck: function(activeVideo, activeSlide) { if (!utils.isLowNetwork()) { if (activeVideo.readyState === 4 && activeVideo.paused) { activeVideo.play(); } else { activeVideo.addEventListener('loadeddata', function() { if (!!activeSlide) activeVideo.play(); }); } } }, reset: function(videoHandler) { if (!!videoHandler) { var control01 = videoHandler.wrap[0].querySelector('.common-video__control'), control02 = videoHandler.wrap[1].querySelector('.common-video__control'); videoHandler.eventList.reset.call(videoHandler); accessibility.pauseState(control01, 'video'); accessibility.pauseState(control02, 'video'); } }, play: function(activeSlide) { if (!!activeSlide.getAttribute('data-is-video')) { var activeVideo = activeSlide.querySelector('.common-video__video'), activeControl = handlerList.getActiveControl(); videoEvents.loadCheck(activeVideo, activeSlide); status.oldVideo = activeVideo.videoHandler; status.oldVideo.idx = els.swiper.activeIndex; activeControl.addEventListener('click', handlerList.popupVideoControl); } }, }; var accessibility = { slide: function () { for (var i = 0; i < els.swiper.slides.length; i++) { if (i != els.swiper.activeIndex) { utils.onAccessibility(els.swiper.slides[i]); } else { utils.offAccessibility(els.swiper.slides[i]); } } }, pauseState: function (control, type) { if (!!control) { var dataOmni = control.getAttribute('data-omni'), gaLa = control.getAttribute('ga-la'), blind = control.querySelector('.blind'), blindText = control.getAttribute('data-play-text').toLowerCase(); control.setAttribute('data-omni', dataOmni.replace('pause', 'play')); control.setAttribute('ga-la', gaLa.replace('pause', 'play')); if (type === 'slide') blind.innerHTML = 'automatic slide ' + blindText; else blind.innerHTML = blindText; } }, playState: function (control, type) { if (!!control) { var dataOmni = control.getAttribute('data-omni'), gaLa = control.getAttribute('ga-la'), blind = control.querySelector('.blind'), blindText = control.getAttribute('data-pause-text').toLowerCase(); control.setAttribute('data-omni', dataOmni.replace('play', 'pause')); control.setAttribute('ga-la', gaLa.replace('play', 'pause')); if (type === 'slide') blind.innerHTML = 'automatic slide ' + blindText; else blind.innerHTML = blindText; } }, pagination: { label: function () { for (var i = 0; i < els.bullets.length; i++) { els.bullets[i].removeAttribute('role'); var slideName = els.swiper.slides[i + 1].getAttribute('data-slide-name'); if (i === els.swiper.realIndex) { if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) { els.bullets[i].setAttribute('aria-label', slideName + ' ' + LOCAL_VARI.selected); } else { els.bullets[i].setAttribute('aria-label', slideName + ' selected'); } } else { els.bullets[i].setAttribute('aria-label', slideName); } } }, tagging: function() { for (var i = 0; i < els.bullets.length; i++) { var tagging = { 'data-omni-type': 'microsite_pcontentinter', 'data-omni': 'galaxy-z-flip5:highlights:overview-popup:indicator:sldr-dots:', 'ga-ca': 'indication', 'ga-ac': 'carousel', 'ga-la': 'galaxy-z-flip5:highlights:overview-popup:indicator:sldr-dots:', }; Object.keys(tagging).forEach(function(key) { if (key == 'data-omni' || key == 'ga-la') { els.bullets[i].setAttribute(key, tagging[key] + (i + 1)); } else { els.bullets[i].setAttribute(key, tagging[key]); } }); } }, }, }; return { init: init } })();})();;(function() { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.quote = (function() { var els = {}, utils = window.flagship.common.utils, resize = window.flagship.common.resize, prevDevice = null, currDevice = resize.checkResolution(); var init = function() { els.section = document.querySelector('.highlights-media-quote'); if (!!els.section) { setElements(); bindEvents(); } }; var setElements = function() { els.swiper = null; els.itemArray = []; els.quoteWrap = els.section.querySelector('.highlights-media-quote__inner'); els.quoteContainer = els.section.querySelector('.highlights-media-quote__list-wrap'); els.quoteList = els.section.querySelector('.highlights-media-quote__list'); els.quoteListItems = els.quoteList.querySelectorAll('.highlights-media-quote__item'); els.arrowWrap = els.section.querySelector('.highlights-media-quote__arrow'); els.prevArrow = els.section.querySelector('.swiper-button-prev'); els.nextArrow = els.section.querySelector('.swiper-button-next'); els.quotePagination = els.section.querySelector('.highlights-media-quote__pagination'); for (var i = 0; i < els.quoteListItems.length; i++) { els.itemArray.push(els.quoteListItems[i]); els.quoteList.removeChild(els.quoteListItems[i]); } els.slidesPerView = els.quoteListItems.length; }; var bindEvents = function() { window.addEventListener('DOMContentLoaded', onLodeHandler, { once: true }); resize.add(onResizeHandler); els.nextArrow.addEventListener('click', swiperEvents.onClickArrow); els.nextArrow.addEventListener('keydown', swiperEvents.onClickArrow); els.prevArrow.addEventListener('click', swiperEvents.onClickArrow); els.prevArrow.addEventListener('keydown', swiperEvents.onClickArrow); }; var onLodeHandler = function() { if (currDevice.indexOf('mobile') > -1) els.slidesPerView = 2; else els.slidesPerView = els.quoteListItems.length; swiperEvents.destroy(); setSwiper(); }; var onResizeHandler = function(currRes) { currDevice = currRes; if (els.quoteListItems.length > 2) { if (currDevice.indexOf('mobile') > -1) els.slidesPerView = 2; else els.slidesPerView = els.quoteListItems.length; } if (currDevice != prevDevice) { onResponsiveChange(); prevDevice = currDevice; } }; var onResponsiveChange = function() { swiperEvents.destroy(); setSwiper(); }; var setSwiper = function() { els.quoteWrap.classList.remove('js-swiper-initialized'); if (els.swiper === null && els.itemArray.length > els.slidesPerView) { setSwiperSlides(); els.quoteWrap.classList.add('js-swiper-initialized'); els.swiper = new Swiper(els.quoteContainer, { init: false, slidesPerView: 1, navigation: { nextEl: els.nextArrow, prevEl: els.prevArrow, }, pagination: { el: els.quotePagination, type: 'bullets', renderBullet: function() { return '

  • '; } } }); els.swiper.on('init', swiperEvents.init); els.swiper.on('slideChange', swiperEvents.slideChange); els.swiper.init(); } else { setListItems(); } }; var swiperEvents = { init: function() { var self = this, notification = self.el.querySelector('.swiper-notification'); if (!!notification) self.el.removeChild(notification); setAccessibility.slide(); setAccessibility.arrow(); setPaginationTagging.call(self); setPaginationLabel.call(self); for (var i = 0; i < self.pagination.bullets.length; i++) { (function(idx) { self.pagination.bullets[i].addEventListener('click', function() { self.slideTo(idx); }); })(i); } }, slideChange: function() { setAccessibility.slide(); setAccessibility.arrow(); setPaginationLabel.call(this); }, onClickArrow: function(e) { if ((e.type == 'keydown' && e.keyCode == 13) || (e.type == 'click' && document.documentElement.classList.contains('isTouchDevice'))) { e.preventDefault(); clearTimeout(els.arrowTimeout); els.arrowTimeout = setTimeout(function() { if (els.swiper.isBeginning && !els.swiper.isEnd) { els.nextArrow.focus(); } else if (!els.swiper.isBeginning && els.swiper.isEnd) { els.prevArrow.focus(); } }, 300); } }, destroy: function() { if (els.swiper != null) { els.swiper.pagination.destroy(true); els.swiper.navigation.destroy(true); els.swiper.destroy(true); els.swiper = null; } }, }; var setSwiperSlides = function() { els.quoteList.innerHTML = ''; els.quoteList.removeAttribute('role'); var count = 0, totalSlideArr = [], partialSlideArr = [], totalHtml = []; for (var i = 0; i < els.itemArray.length; i++) { count++; partialSlideArr.push(els.itemArray[i]); if (count >= els.slidesPerView) { totalSlideArr.push(partialSlideArr); partialSlideArr = []; count = 0; } else if (i == els.itemArray.length - 1) { totalSlideArr.push(partialSlideArr); } } for (var i = 0; i < totalSlideArr.length; i++) { totalHtml.push('

    '); for (var j = 0; j < totalSlideArr[i].length; j++) { totalSlideArr[i][j].setAttribute('role', 'listitem'); totalHtml.push(totalSlideArr[i][j].outerHTML); totalSlideArr[i][j].removeAttribute('role'); } totalHtml.push('

    '); } els.quoteList.innerHTML = totalHtml.join(''); }; var setListItems = function() { els.quoteList.innerHTML = ''; var totalHtml = []; els.quoteList.setAttribute('role', 'list'); for (var i = 0; i < els.itemArray.length; i++) { els.itemArray[i].setAttribute('role', 'listitem'); totalHtml.push(els.itemArray[i].outerHTML); els.itemArray[i].removeAttribute('role'); } els.quoteList.innerHTML = totalHtml.join(''); }; var setPaginationTagging = function() { var bullets = Array.prototype.slice.call(this.pagination.bullets), paginationTagging = { 'data-omni-type': 'microsite_contentinter', 'data-omni': 'galaxy-z-flip5:highlights:media-quote:index:', 'ga-ca': 'indication', 'ga-ac': 'carousel', 'ga-la': 'galaxy-z-flip5:highlights:media-quote:index:', }; bullets.forEach(function(ele, idx) { Object.keys(paginationTagging).forEach(function(key) { if (key == 'data-omni' || key == 'ga-la') { ele.setAttribute(key, paginationTagging[key] + (idx + 1)); } else { ele.setAttribute(key, paginationTagging[key]); } }); }); }; var setPaginationLabel = function() { var self = this, slides = Array.prototype.slice.call(this.slides), bullets = Array.prototype.slice.call(this.pagination.bullets); bullets.forEach(function(bullet, bulletIndex) { var authorArr = [], authorEles = slides[bulletIndex].querySelectorAll('.highlights-media-quote__media'); authorEles = Array.prototype.slice.call(authorEles); authorEles.forEach(function(author) { authorArr.push(author.innerText); }); if (self.realIndex == bulletIndex) { bullet.setAttribute('aria-label', authorArr.join(', ') + ' Selected'); if (authorArr.length > 1) bullet.setAttribute('aria-label', authorArr.join('1, ') + '2 Selected'); } else { bullet.setAttribute('aria-label', authorArr.join(', ')); if (authorArr.length > 1) bullet.setAttribute('aria-label', authorArr.join('1, ') + '2'); } }); }; var setAccessibility = { slide: function() { for (var i = 0; i < els.swiper.slides.length; i++) { if (i != els.swiper.snapIndex) { utils.onAccessibility(els.swiper.slides[i]); } else { utils.offAccessibility(els.swiper.slides[i]); } } }, arrow: function() { if (els.swiper.isBeginning && !els.swiper.isEnd) { utils.offAccessibility(els.nextArrow); utils.onAccessibility(els.prevArrow); } else if (!els.swiper.isBeginning && els.swiper.isEnd) { utils.offAccessibility(els.prevArrow); utils.onAccessibility(els.nextArrow); } else { utils.offAccessibility(els.nextArrow); utils.offAccessibility(els.prevArrow); } } }; return { init: init, } })();})();;(function() { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.viewer = (function() { var els = {}, status = {}, resize = window.flagship.common.resize, utils = window.flagship.common.utils, currDevice = resize.checkResolution(); var init = function() { els.viewerBtns = document.querySelectorAll('.viewer-btn'); if (els.viewerBtns.length > 0) { setElements(); setStatus(); setPopup(); bindEvents(); } }; var setElements = function() { els.wrapEl = document.querySelector('#wrap'); els.contents = document.querySelector('#contents'); // popup els.popup = document.querySelector('.highlights-viewer'); els.popupContents = els.popup.querySelector('.common-popup__contents'); els.popupInner = els.popup.querySelector('.common-popup__inner'); els.popupWrap = els.popup.querySelector('.common-popup__wrap'); els.closeCta = els.popup.querySelector('.common-popup__close-cta'); els.viewerWrap = els.popup.querySelector('.highlights-viewer__wrap'); els.viewerContainer = els.popup.querySelector('.highlights-viewer__container'); els.viewerIframe = els.popup.querySelector('.highlights-viewer__container-viewer'); // popup-scroll els.popupScroll = els.popup.querySelector('.highlights-viewer__scroll'); els.popupScrollUpBtn = els.popup.querySelector('.highlights-viewer__scroll-btn--up'); els.popupScrollDownBtn = els.popup.querySelector('.highlights-viewer__scroll-btn--down'); // infoPopup els.infoBtn = els.popup.querySelector('.highlights-viewer__title-cta'); els.infoCloseBtn = els.popup.querySelector('.highlights-viewer__header-close-cta'); els.infoDimmed = els.popup.querySelector('.highlights-viewer__dimmed'); // timeout els.resizeTimeout = null; els.resizeInnerTimeout = null; // viewer els.viewerOpener = null; els.viewerModel = ''; els.viewerColor = ''; els.customizationList = document.querySelectorAll('.highlights-customization__ui-content'); }; var setStatus = function () { status.viewerBaseUrl = '//www.samsung.com/global/galaxy/3d-360/viewer/?'; status.defaultParams = '&gesture_guide=0'; status.defaultParams += '&bgcolor=transparent'; status.defaultParams += '&skin=colorlayer'; status.defaultParams += '&theme=roundlayer'; status.defaultParams += '&intro=1'; status.defaultParams += '&ruler=1'; status.defaultParams += '&breakpoint_criteria=outer'; status.defaultParams += '&breakpoint_desktop_width=1024'; status.defaultParams += '&intro_pose=2'; status.defaultParams += '&intro_pose_once=1'; status.defaultParams += '&intro_pose_hold=1'; status.moPoseReady = false; status.isExclusive = false; status.isHash = false; }; var bindEvents = function () { window.addEventListener('DOMContentLoaded', onLoadHandler, { once: true }); window.addEventListener('message', onReceiveV3DMessage, false); //els.popupContents.addEventListener('scroll', onScrollPopupContents); els.viewerIframe.addEventListener('DOMContentLoaded', viewerEvents.onLoadLayerPopupIframe); els.popupScroll.addEventListener('click', layerPopupScrollHandler.onClickLayerScroll); resize.add(onResizeHandler); }; var onLoadHandler = function () { setViewerWrap.innerWrapHeight(); setViewerWrap.layerScroll(); }; var onResizeHandler = function (currRes) { currDevice = currRes; if (utils.detector.isTouchDevice && !utils.detector.isIosDevice) setViewerWrap.innerWrapHeight(); setViewerWrap.layerScroll(); }; var setViewerWrap = { innerWrapHeight: function() { clearTimeout(els.resizeInnerTimeout); els.resizeInnerTimeout = setTimeout(function() { if (els.popupInner) { els.popupInner.style.height = parseInt(window.innerHeight * 0.9) + 'px'; } }, 0); }, layerScroll: function() { clearTimeout(els.resizeTimeout); els.resizeTimeout = setTimeout(function() { layerPopupScrollHandler.setLayerScroll(); }, 300); }, }; var setPopup = function () { for (var i = 0; i < els.viewerBtns.length; i++) { utils.layerPopup({ layerPopup: els.popup, openerEvent: { element: els.viewerBtns[i], }, closeCta: els.closeCta, moveTarget: document.documentElement, contents: els.contents, show: { start: function (target) { els.popup.classList.add('is-init'); viewerEvents.show(target.openerCta); }, end: function () { if (utils.detector.isIosDevice) els.popup.style.display = 'block'; els.popup.classList.add('is-open'); if (els.popup.classList.contains('is-info-open')) { setTimeout(function () { els.infoCloseBtn.focus(); }, 500); } } }, hide: { start: function(target) { if (utils.detector.isIosDevice) target.openerCta.style.display = ''; target.openerCta.focus(); els.popup.classList.remove('is-open'); }, end: function () { setTimeout(function () { els.popup.classList.remove('is-init'); }, 300); viewerEvents.hide(); // customization accessibility set if (!els.customizationList[0].classList.contains('is-active')) { utils.onAccessibility(els.customizationList[0]); } else { utils.onAccessibility(els.customizationList[1]); } } } }); } }; var viewerEvents = { show: function (viewerOpener) { if (viewerOpener.classList.contains('viewer-btn')) { status.isHash = false; els.viewerOpener = viewerOpener; } else { status.isHash = true; if (window.location.hash == '#colors-see-in-360') { els.viewerOpener = els.viewerBtns[0]; } else { els.viewerOpener = els.viewerBtns[1]; } } status.isExclusive = (els.viewerOpener.getAttribute('data-hash') == 'online-exclusive-color-see-in-360') ? true : false; els.viewerModel = els.viewerOpener.getAttribute('data-model-name'); els.viewerColor = els.viewerOpener.getAttribute('data-model-color'); els.viewerIframe.setAttribute('src', getViewerUrl()); if (currDevice.indexOf('mobile') > -1 || currDevice == 'tablet') { viewerEvents.infoPopupShow(); } els.infoBtn.addEventListener('click', function () { viewerEvents.infoPopupShow(); setTimeout(function () { els.infoCloseBtn.focus(); }, 400); }); els.popupWrap.addEventListener('click', viewerEvents.onclickViewerDimmed); }, hide: function () { els.viewerModel = ''; els.viewerIframe.setAttribute('src', 'about:blank'); if (status.isHash) { setTimeout(function () { els.viewerOpener.focus(); }, 300); } }, infoPopupShow: function () { if (!els.popup.classList.contains('is-info-open')) { els.popup.classList.add('is-info-open'); els.infoCloseBtn.addEventListener('click', viewerEvents.infoPopupHide); els.infoDimmed.addEventListener('click', viewerEvents.infoPopupHide); setTimeout(function () { els.closeCta.setAttribute('tabindex', -1); els.closeCta.setAttribute('aria-hidden', true); els.infoBtn.setAttribute('tabindex', -1); els.infoBtn.setAttribute('aria-hidden', true); els.viewerContainer.setAttribute('tabindex', -1); els.viewerContainer.setAttribute('aria-hidden', true); }, 100); } }, infoPopupHide: function () { if (els.popup.classList.contains('is-info-open')) { els.popup.classList.remove('is-info-open'); setTimeout(function () { els.infoBtn.focus(); }, 300); setTimeout(function () { els.closeCta.removeAttribute('tabindex'); els.closeCta.removeAttribute('aria-hidden'); els.infoBtn.removeAttribute('tabindex'); els.infoBtn.removeAttribute('aria-hidden'); els.viewerContainer.removeAttribute('tabindex'); els.viewerContainer.removeAttribute('aria-hidden'); }, 100); } }, onclickViewerDimmed: function (e) { if (e.currentTarget == e.target) { if (utils.detector.isIosDevice) els.viewerOpener.style.display = ''; els.popup.classList.remove('is-open'); document.documentElement.classList.remove('is-layer-open'); document.documentElement.style.overflow = ''; utils.visibleScroll(); utils.onAccessibility(els.popup); utils.offAccessibility(document.querySelector('#wrap')); setTimeout(function() { els.viewerOpener.focus(); }, 300); els.viewerModel = ''; els.viewerIframe.setAttribute('src', 'about:blank'); setTimeout(function() { els.popup.classList.remove('is-init'); }, 300); // customization accessibility set if (!els.customizationList[0].classList.contains('is-active')) { utils.onAccessibility(els.customizationList[0]); } else { utils.onAccessibility(els.customizationList[1]); } } }, onLoadLayerPopupIframe: function () { if (document.documentElement.classList.contains('color_yb') || (utils.getCookie('highContrastMode') != null && utils.getCookie('highContrastMode') == 1)) { els.viewerIframe.contentWindow.postMessage('V3D.highContrast.on', '*'); setTimeout(function () { els.viewerIframe.contentWindow.postMessage('V3D.highContrast.on', '*'); }, 300); } } }; var layerPopupScrollHandler = { setLayerScroll: function () { if (!els.popupContents) return; if (els.popupContents.scrollHeight > els.popupContents.clientHeight) { utils.offAccessibility(els.popupScroll); els.popupScroll && els.popupScroll.classList.add('is-scroll-btn'); } else { utils.onAccessibility(els.popupScroll); els.popupScroll && els.popupScroll.classList.remove('is-scroll-btn'); } }, onScrollPopupContents: function () { onUpdateLayerScroll(false); }, onClickLayerScroll: function (e) { e && e.preventDefault(); if (e.target.matches('.highlights-viewer__scroll-btn')) { var scrollDown = e.target.classList.contains('highlights-viewer__scroll-btn--down'), $popupContents = $(els.popupContents); if (scrollDown) { $popupContents.stop().animate({ scrollTop: $popupContents.scrollTop() + 100 }, { duration: 300, complete: function () { layerPopupScrollHandler.onUpdateLayerScroll(true); } }); } else { $popupContents.stop().animate({ scrollTop: $popupContents.scrollTop() - 100 }, { duration: 300, complete: function () { layerPopupScrollHandler.onUpdateLayerScroll(true); } }); } } }, onUpdateLayerScroll: function (isClicked) { var offsetTop = els.popupContents.scrollTop, layerBottom = els.popupContents.scrollHeight - els.popupContents.clientHeight; els.popupScrollUpBtn.removeAttribute('tabindex'); els.popupScrollUpBtn.removeAttribute('aria-hidden'); els.popupScrollUpBtn.removeAttribute('disabled'); els.popupScrollDownBtn.removeAttribute('tabindex'); els.popupScrollDownBtn.removeAttribute('aria-hidden'); els.popupScrollDownBtn.removeAttribute('disabled'); if (offsetTop == 0) { isClicked && els.popupScrollDownBtn && els.popupScrollDownBtn.focus(); els.popupScrollUpBtn.setAttribute('tabindex', '-1'); els.popupScrollUpBtn.setAttribute('aria-hidden', 'true'); els.popupScrollUpBtn.setAttribute('disabled', 'disabled'); } else if (offsetTop >= layerBottom - 1) { isClicked && els.popupScrollUpBtn && els.popupScrollUpBtn.focus(); els.popupScrollDownBtn.setAttribute('tabindex', '-1'); els.popupScrollDownBtn.setAttribute('aria-hidden', 'true'); els.popupScrollDownBtn.setAttribute('disabled', 'disabled'); } } }; var onReceiveV3DMessage = function (e) { if (e.data == 'V3D.state.popOpen') { if (currDevice.indexOf('mobile') > -1 || currDevice == 'tablet') { if (els.closeCta) { if (!els.popupWrap.classList.contains('is-popup-opened')) els.popupWrap.classList.add('is-popup-opened'); els.closeCta.setAttribute('tabindex', '-1'); els.closeCta.setAttribute('aria-hidden', 'true'); els.closeCta.setAttribute('disabled', 'disabled'); } if (els.infoBtn) { els.infoBtn.setAttribute('tabindex', '-1'); els.infoBtn.setAttribute('aria-hidden', 'true'); } } } else if (e.data == 'V3D.state.popClose') { if (currDevice.indexOf('mobile') > -1 || currDevice == 'tablet') { if (els.closeCta) { if (els.popupWrap.classList.contains('is-popup-opened')) els.popupWrap.classList.remove('is-popup-opened'); els.closeCta.removeAttribute('tabindex'); els.closeCta.removeAttribute('aria-hidden'); els.closeCta.removeAttribute('disabled'); } if (els.infoBtn) { els.infoBtn.removeAttribute('tabindex'); els.infoBtn.removeAttribute('aria-hidden'); } } } else if (e.data == 'V3D.state.introPose.ready') { if (currDevice.indexOf('desktop') > -1) { els.viewerIframe && els.viewerIframe.contentWindow.postMessage('V3D.introPose.run', '*'); } status.moPoseReady = true; setTimeout(function () { status.moPoseReady = false; }, 2000); } else if (e.data == 'V3D.state.localData.ready') { els.viewerIframe && els.viewerIframe.contentWindow.postMessage(JSON.stringify(V3DLOCALDATA), '*'); } }; var getViewerUrl = function () { var viewerUrl = status.viewerBaseUrl; // model_name viewerUrl += 'model_name=' + els.viewerModel; // only exclusive color status.isExclusive && (viewerUrl += '&exclusive_mode=1'); if (document.documentElement.classList.contains('color_yb') || (utils.getCookie('highContrastMode') != null && utils.getCookie('highContrastMode') == 1)) { viewerUrl += '&highcontrast=1'; } else { viewerUrl += '&highcontrast=0'; } // RTL utils.isRTL() && (viewerUrl += '&rtl=1'); viewerUrl += status.defaultParams; viewerUrl += '#color=' + (els.viewerColor ? els.viewerColor : 'null'); return viewerUrl; }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.ytPopup = (function () { var els = {}, utils = window.flagship.common.utils; var init = function () { els.layerPopup = document.querySelector('.youtube-layer-popup'); if (!!els.layerPopup) { setElements(); setPopup(); els.layerPopup.addEventListener('click', eventList.clickDimmed); } }; var setElements = function () { els.contents = document.querySelector('#contents'); els.openCtas = document.querySelectorAll('.js-youtube-popup'); els.closeCta = document.querySelector('.youtube-layer-popup__close-cta'); els.ytIframe = els.layerPopup.querySelector('.youtube-layer-popup__iframe > iframe'); els.ytDesc = els.layerPopup.querySelector('.youtube-player__desc'); } var setPopup = function () { for (var i = 0; i < els.openCtas.length; i++) { utils.layerPopup({ layerPopup: els.layerPopup, openerEvent: { element: els.openCtas[i], }, closeCta: els.closeCta, moveTarget: document.documentElement, contents: els.contents, show: { start: function () { els.layerPopup.removeAttribute('tabindex'); els.layerPopup.removeAttribute('aria-hidden'); els.layerPopup.classList.add('is-yt-open'); }, end: function(target) { eventList.setYoutube(target); target.openerCta.blur(); } }, hide: { start: function(target) { if (utils.detector.isIosDevice) target.openerCta.style.display = ''; els.layerPopup.setAttribute('tabindex', -1); els.layerPopup.setAttribute('aria-hidden', true); els.layerPopup.classList.remove('is-yt-open'); }, end: function(target) { eventList.clearYoutube(); target.openerCta.focus(); // customization accessibility set var uiList = document.querySelectorAll('.highlights-customization__ui-content'); if (!uiList[0].classList.contains('is-active')) { utils.onAccessibility(uiList[0]); } else { utils.onAccessibility(uiList[1]); } } } }); } }; var eventList = { setYoutube: function (target) { var opener = target.openerCta, ytSrc = 'htt' + 'ps://www.youtube.com/embed/' + opener.getAttribute('data-youtube-id') + '?wmode=opaque&rel=0&enablejsapi=1&version=3&autoplay=1', ytTitle = opener.getAttribute('data-youtube-title'), ytBlind = opener.querySelector('.blind').innerHTML; els.ytIframe.setAttribute('src', ytSrc); els.ytIframe.setAttribute('title', ytTitle); els.ytDesc.innerHTML = ytBlind; els.OpenerTarget = opener; }, clearYoutube: function() { els.ytIframe.removeAttribute('src'); els.ytDesc.innerHTML = ''; }, clickDimmed: function(e) { if (e.target.classList.contains('youtube-layer-popup__inner') || e.target.classList.contains('youtube-layer-popup__close-area')) { if (utils.detector.isIosDevice) els.OpenerTarget.style.display = ''; els.layerPopup.classList.remove('is-yt-open'); document.documentElement.classList.remove('is-layer-open'); document.documentElement.style.overflow = ''; utils.visibleScroll(); utils.onAccessibility(els.layerPopup); utils.offAccessibility(document.querySelector('#wrap')); setTimeout(function() { els.OpenerTarget.focus(); }, 300); eventList.clearYoutube(); } } }; return { init: init, } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.sidebar = (function () { var els = {}, objs = {}, utils = window.flagship.common.utils; var init = function () { els.contents = document.querySelector('#contents'); if (!!els.contents) { setElements(); setScene(); bindEvents(); } }; var setElements = function () { els.kv = els.contents.querySelector('.highlights-kv'); els.sidebar = els.contents.querySelector('.highlights-sidebar'); els.sidebarBtn = els.sidebar.querySelector('.highlights-sidebar__cta'); els.sidebarBtnBlindText = els.sidebar.querySelector('.highlights-sidebar__cta .blind'); els.sidebarList = els.sidebar.querySelector('.highlights-sidebar__list'); els.sidebarListItem = els.sidebarList.querySelectorAll('.highlights-sidebar__item'); els.durability = els.contents.querySelector('.highlights-durability'); els.footer = document.querySelector('.common-bottom-disclaimer'); // settimeout els.scrollTimeout = null; }; var bindEvents = function () { window.addEventListener('scroll', scrollHandler); els.sidebarBtn.addEventListener('click', sidebarEvents.sidebarOnClick); for (var i = 0; i < els.sidebarListItem.length; i++) { els.sidebarListItem[i].addEventListener('click', sidebarEvents.itemOnClick); } }; var setScene = function () { objs.scene = SCROLLER({ trackElement: els.contents, useFixed: false, useStrictMode: false }); }; var scrollHandler = function () { objs.scene.trackAnimation(function () { var kvBottom = this.winScrollTop + els.kv.getBoundingClientRect().bottom - utils.getNavHeight(), footerTop = this.winScrollTop + els.footer.getBoundingClientRect().top + (window.innerHeight / 2), self = this; var _highlighting = function () { for (var i = 0; i < els.sidebarListItem.length; i++) { var targetId = els.sidebarListItem[i].querySelector('a').getAttribute('href').split('#')[1], target = els.contents.querySelector('#' + targetId), targetOffetTop = self.winScrollTop + target.getBoundingClientRect().top, targetOffetBottom = self.winScrollTop + target.getBoundingClientRect().bottom - (window.innerHeight / 2), durabilityTop = self.winScrollTop + els.durability.getBoundingClientRect().top + (window.innerHeight / 2), oldActiveItem = els.sidebarList.querySelector('.is-active'); if (self.winScrollBottom >= targetOffetTop && self.winScrollTop <= targetOffetBottom) { if (!els.sidebarListItem[i].classList.contains('is-active')) { if (oldActiveItem) oldActiveItem.classList.remove('is-active'); els.sidebarListItem[i].classList.add('is-active'); } } if (self.winScrollBottom >= durabilityTop) { if (els.sidebarListItem[i].classList.contains('is-active')) { els.sidebarListItem[i].classList.remove('is-active'); } } } } if (self.wheelDirection == 'up') { if (self.winScrollTop >= kvBottom) { els.sidebar.classList.add('is-active'); els.sidebarBtn.removeAttribute('tabindex'); els.sidebarBtn.removeAttribute('aria-hidden'); } else { hideSidebar(); } } else { hideSidebar(); } _highlighting(); }); }; var hideSidebar = function () { if (els.sidebar.classList.contains('is-active')) { els.sidebar.classList.remove('is-active'); els.sidebarBtn.setAttribute('tabindex', -1); els.sidebarBtn.setAttribute('aria-hidden', true); sidebarEvents.sidebarClose(); } }; var sidebarEvents = { sidebarOnClick: function () { if (!els.sidebar.classList.contains('is-open')) { sidebarEvents.sidebarOpen(); } else { sidebarEvents.sidebarClose(); } }, sidebarOpen: function () { els.sidebar.classList.add('is-open'); accessibility.off(); setTimeout(function () { window.addEventListener('click', sidebarEvents.outsideOnClick); }, 50); }, sidebarClose: function () { els.sidebar.classList.remove('is-open'); accessibility.on(); window.removeEventListener('click', sidebarEvents.outsideOnClick); }, outsideOnClick: function (e) { var sidebar = e.target.matches('.highlights-sidebar__button>button'); if (!sidebar) { sidebarEvents.sidebarClose(); } }, itemOnClick: function (e) { e.preventDefault(); var oldItem = els.sidebarList.querySelector('.is-active'), self = this; var _moveSection = function () { var navHeight = utils.getNavHeight(), sectionId = self.querySelector('a').getAttribute('href').split('#')[1], section = document.querySelector('#' + sectionId), sectionTop = section.getBoundingClientRect().top, sectionScroll = window.pageYOffset + sectionTop - navHeight, sectionTimeout = null; clearTimeout(sectionTimeout); sectionTimeout = setTimeout(function () { var eyeBrow = section.querySelector('.common-text'); clickAble = section.querySelectorAll('a, button')[0]; if (!!eyeBrow) { var focusOutEvent = function () { eyeBrow.removeAttribute('tabindex'); eyeBrow.removeEventListener('focusout', focusOutEvent); }; eyeBrow.addEventListener('focusout', focusOutEvent); eyeBrow.setAttribute('tabindex', 0); eyeBrow.focus(); } else { clickAble.focus(); } window.scrollTo(0, sectionScroll); }, 30); setTimeout(function () { hideSidebar(); }, 60); }; if (!this.classList.contains('is-active')) { if (oldItem && oldItem.classList.contains('is-active')) { oldItem.classList.remove('is-active'); } this.classList.add('is-active'); } _moveSection(); } }; var accessibility = { on: function () { els.sidebarList.setAttribute('aria-hidden', true); els.sidebarList.setAttribute('tabindex', -1); var openText = els.sidebarBtn.getAttribute('data-open-text'); els.sidebarBtnBlindText.innerText = openText; setTagging.close(); for (var i = 0; i < els.sidebarListItem.length; i++) { els.sidebarListItem[i].querySelector('a').setAttribute('tabindex', '-1'); } }, off: function () { els.sidebarList.setAttribute('aria-hidden', false); els.sidebarList.removeAttribute('tabindex'); var closeText = els.sidebarBtn.getAttribute('data-close-text'); els.sidebarBtnBlindText.innerText = closeText; setTagging.open(); for (var i = 0; i < els.sidebarListItem.length; i++) { els.sidebarListItem[i].querySelector('a').removeAttribute('tabindex'); } } }; var setTagging = { open: function () { var dataOmni = els.sidebarBtn.getAttribute('data-omni'), gaLa = els.sidebarBtn.getAttribute('ga-la'); setTimeout(function () { els.sidebarBtn.setAttribute('data-omni', dataOmni.replace('open', 'close')); els.sidebarBtn.setAttribute('ga-la', gaLa.replace('open', 'close')); }, 50); }, close: function () { var dataOmni = els.sidebarBtn.getAttribute('data-omni'), gaLa = els.sidebarBtn.getAttribute('ga-la'); setTimeout(function () { els.sidebarBtn.setAttribute('data-omni', dataOmni.replace('close', 'open')); els.sidebarBtn.setAttribute('ga-la', gaLa.replace('close', 'open')); }, 50); } }; return { init: init } })(); })(); (function () { window.flagship.common.resize.bindEvent();var initComponents = function() { flagship.highlights.colors.init(); flagship.highlights.customization.init(); flagship.highlights.cameraVideo.init(); flagship.highlights.design.init(); flagship.highlights.durability.init(); flagship.highlights.excellence.init(); flagship.highlights.exclusive.init(); flagship.highlights.faq.init(); flagship.highlights.flexpanel.init(); flagship.highlights.flexwindowBig.init(); flagship.highlights.flexwindowGesture.init(); flagship.highlights.flexwindowMap.init(); flagship.highlights.overview.init(); flagship.highlights.quote.init(); flagship.highlights.viewer.init(); flagship.highlights.ytPopup.init(); flagship.highlights.sidebar.init();}; initComponents(); })(); });

  • Galaxy Z Flip5 | Camera, Specs & Screen | Samsung UK (2024)

    References

    Top Articles
    Latest Posts
    Article information

    Author: Dan Stracke

    Last Updated:

    Views: 5830

    Rating: 4.2 / 5 (63 voted)

    Reviews: 86% of readers found this page helpful

    Author information

    Name: Dan Stracke

    Birthday: 1992-08-25

    Address: 2253 Brown Springs, East Alla, OH 38634-0309

    Phone: +398735162064

    Job: Investor Government Associate

    Hobby: Shopping, LARPing, Scrapbooking, Surfing, Slacklining, Dance, Glassblowing

    Introduction: My name is Dan Stracke, I am a homely, gleaming, glamorous, inquisitive, homely, gorgeous, light person who loves writing and wants to share my knowledge and understanding with you.