Samsung Galaxy S24 Ultra | Samsung US (2024)

Samsung Galaxy S24 Ultra | Samsung US (1)

Get up to $750 instant trade-in creditθ

Buy now Reserve now Pre-order now Where to buy

Samsung Galaxy S24 Ultra | Samsung US (2)

Epic, just like that

Unleash new ways to create, connect and more. The new era of mobile AI is here.

Samsung Galaxy S24 Ultra | Samsung US (3)

S Pen is used to trace a plant seen in a social media image post. A Google search bar appears. The plant is identified and connected to a Google search result page about the plant.

Samsung Galaxy S24 Ultra | Samsung US (4)

A phone call is translated in real time. The dialogue is shown on screen as a text conversation in two languages.

Samsung Galaxy S24 Ultra | Samsung US (5)

A lengthy block of text is highlighted in a Note. With a few taps, a simplified outline of the content is produced. The document is saved.

Samsung Galaxy S24 Ultra | Samsung US (6)

A photo is edited in the Gallery app. An edit button is tapped and the subject is selected. They are resized and moved to another location in the picture. Then, missing areas and background are filled in.

Samsung Galaxy S24 Ultra | Samsung US (7)

A photo is edited in the Gallery app. An edit button is tapped and the subject is selected. They are resized and moved to another location in the picture. Then, missing areas and background are filled in.

Circle to Search,

Satisfy your curiosity on the spot.

Live Translate,

Real easy, real-time translations.

Note Assist,

Note smarter, not harder.

Generative Edit,

Take a great pic. Then make it better.

Chat Assist

Find the right words fast.

  • Circle to Search

  • Live Translate

  • Note Assist

  • Generative Edit

  • Chat Assist

Sleek. Strong. Stunning.

Now in titanium — the next step in tough. Experience S24 Ultra through a 6.8" flat display with embedded S Pen.

Samsung Galaxy S24 Ultra | Samsung US (8)

An extreme close-up of the side of Galaxy S24 Ultra. Next, light passes over the front of the device. Next, a close-up of the rear panel with S Pen in front.

Armor up with titanium

Armor up with titanium

Check out the upgrade — a new, sturdy shield of titanium built right into the frame.

Better scratch resistance with Corning® Gorilla® Armor

Samsung Galaxy S24 Ultra | Samsung US (9)

Corning® Gorilla® Armor helps protect your screen from scratches to keep your device looking beautiful, no matter what your day throws your way.

Worry-free water and dust resistance

Samsung Galaxy S24 Ultra | Samsung US (10)

Don't let water dampen your spirits. Galaxy S24 Ultra is IP68 water and dust resistant — so you're ready for every adventure, puddles and all.

*Galaxy S24, S24+ and S24 Ultra are rated as IP68. 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 and dust resistance of device is not permanent and may diminish over time because of normal wear and tear.

Samsung Galaxy S24 Ultra | Samsung US (11)

Online exclusive colors, naturally inspired

Titanium Blue Titanium Green Titanium Orange Titanium Gray Titanium Black Titanium Violet Titanium Yellow

Three Galaxy S24 Ultra devices in Titanium Blue. Two are shown together, one seen from the front and one from the rear with the S Pen beside it. Another phone is seen from the side to show the frame's edges.

Samsung Galaxy S24 Ultra | Samsung US (12)

Online Exclusive

Samsung Galaxy S24 Ultra | Samsung US (13)

Available only on samsung.com

Three Galaxy S24 Ultra devices in Titanium Green. Two are shown together, one seen from the front and one from the rear with the S Pen beside it. Another phone is seen from the side to show the frame's edges.

Samsung Galaxy S24 Ultra | Samsung US (14)

Online Exclusive

Samsung Galaxy S24 Ultra | Samsung US (15)

Available only on samsung.com

Three Galaxy S24 Ultra devices in Titanium Orange. Two are shown together, one seen from the front and one from the rear with the S Pen beside it. Another phone is seen from the side to show the frame's edges.

Samsung Galaxy S24 Ultra | Samsung US (16)

Online Exclusive

Samsung Galaxy S24 Ultra | Samsung US (17)

Available only on samsung.com

Three Galaxy S24 Ultra devices in Titanium Gray. Two are shown together, one seen from the front and one from the rear with the S Pen beside it. Another phone is seen from the side to show the frame's edges.

Samsung Galaxy S24 Ultra | Samsung US (18)

Samsung Galaxy S24 Ultra | Samsung US (19)

Three Galaxy S24 Ultra devices in Titanium Black. Two are shown together, one seen from the front and one from the rear with the S Pen beside it. Another phone is seen from the side to show the frame's edges.

Samsung Galaxy S24 Ultra | Samsung US (20)

Samsung Galaxy S24 Ultra | Samsung US (21)

Three Galaxy S24 Ultra devices in Titanium Violet. Two are shown together, one seen from the front and one from the rear with the S Pen beside it. Another phone is seen from the side to show the frame's edges.

Samsung Galaxy S24 Ultra | Samsung US (22)

Samsung Galaxy S24 Ultra | Samsung US (23)

Three Galaxy S24 Ultra devices in Titanium Yellow. Two are shown together, one seen from the front and one from the rear with the S Pen beside it. Another phone is seen from the side to show the frame's edges.

Samsung Galaxy S24 Ultra | Samsung US (24)

Samsung Galaxy S24 Ultra | Samsung US (25)

Epic, just
like that

Four stars swirl across the screen.

Circle it, find it

Samsung Galaxy S24 Ultra | Samsung US (26)

S Pen is used to trace a plant seen in a social media image post. A Google search bar appears. The plant is identified and connected to a Google search result page about the plant.

A new way to search is here with Circle to Search with Google., While scrolling or watching videos, use S Pen or your finger to circle items and get Google Search results.

Stumble upon a photo of a plant so beautiful that you just have to know what it is? Circle it and ta-da, you'll get Google Search results. Now you can quickly get an answer without leaving your feed.

Samsung Galaxy S24 Ultra | Samsung US (27)

LIVE TRANSLATE

Never be lost in translation

Break down language barriers over the phone or texting with Live Translate.,

Samsung Galaxy S24 Ultra | Samsung US (28)

A phone call is translated in real time. The dialogue is shown on screen as a text conversation in two languages.

CHAT ASSIST

Find the right words fast

Get real-time tone suggestions to make your writing sound more professional or conversational.,

Samsung Galaxy S24 Ultra | Samsung US (29)

NOTE ASSIST

Summarize in the blink of AI

Note Assist makes a long story short. Simply start writing and AI formats your notes into a clear, easy-to-review summary.,

Samsung Galaxy S24 Ultra | Samsung US (30)

A lengthy block of text is highlighted in a Note. With a few taps, a simplified outline of the content is produced. The document is saved.

Epic for business, just like that

Epic for business, just like that

Elevate your work with the most epic Galaxy yet, featuring the game-changing power of Galaxy AI. From researching on the spot to capturing every detail of your projects day or night, unleash new ways to stay productive, collaborate and more.

Buy now for Business

Learn more

Samsung Galaxy S24 Ultra | Samsung US (31)

Stunning photos, enhanced with AI

rear camera

200MP

Wide-angle & 2x Optical Quality Zoom

12MP

Ultra Wide

50MP

5x Optical Zoom & 10x Optical Quality Zoom

10MP

3x Optical Zoom

front camera

12MP

Selfie Camera

Samsung Galaxy S24 Ultra | Samsung US (32)

Capture details that rival reality with 200MP.

Capture details that rival reality with 200MP.

Meet the industry standard for camera quality, with the most megapixels available on a smartphone. ProVisual engine improves color tone and brings out detail in every photo.

Samsung Galaxy S24 Ultra | Samsung US (33)

Samsung Galaxy S24 Ultra | Samsung US (34)

Captured #withGalaxy Galaxy S24 Ultra

Zoom into the dark with Nightography

Zoom into the dark with Nightography

With 1.6x larger pixels and a wider Tele OIS, Space Zoom makes even distant, low-light subjects clearly stunning in both photos and videos.,

Samsung Galaxy S24 Ultra | Samsung US (35)

Samsung Galaxy S24 Ultra | Samsung US (36)

Captured #withGalaxy Galaxy S24 Ultra

    Low-light portraits,
    high on clarity

    A new 5x sensor and bigger pixels mean more detail and sharpness from sunup to sundown. Plus, a brand-new 5x portrait mode further enhances image quality for portraits that truly stand out.

    Samsung Galaxy S24 Ultra | Samsung US (37)

    Captured #withGalaxy Galaxy S24 Ultra

    Capture your night up close

    Shoot vivid video in incredible detail with 5x Night Zoom. With our dedicated ISP Block for enhanced clarity and reduced noise, grainy video just went extinct.

    Samsung Galaxy S24 Ultra | Samsung US (38)

    Nightography video of break-dancers in a low-lit studio starts at one zoom distance and then zooms in closer. At both distances, the subjects are clear and colorful with minimal noise.

    Captured #withGalaxy Galaxy S24 Ultra

    Our most impressive zoom yet

    Get 2x, 3x, 5x and even 10x close-ups with optical or optical-quality zoom., The new Tele OIS is wider than before, for stabilized shots with less blur.

    Captured #withGalaxy Galaxy S24 Ultra

    5x optical zoom, 50MP

    The high-resolution camera sensor and telephoto camera pair up to give you incredibly crisp photos, even at 5x Zoom. The result? 50MP of closer, crisper, clearer details.

    Samsung Galaxy S24 Ultra | Samsung US (45)

    Samsung Galaxy S24 Ultra | Samsung US (46)

    Captured #withGalaxy Galaxy S24 Ultra

    1x, 5x

    5x Zoom meets 8K Video

    For the first time on a Galaxy smartphone, film astonishing 8k video with optical 5x zoom.

    Samsung Galaxy S24 Ultra | Samsung US (47)

    In the view finder of the Camera app, a waterfall is being recorded in 8K resolution at 5x zoom. The video is steady and rich in detail.

    Captured #withGalaxy Galaxy S24 Ultra

    SUPER HDR

    AI from preview to post

    SUPER HDR

    AI from preview
    to post

    With our latest Super HDR upgrade and an AI assist,, instantly see what your super-vivid pics and videos will look like before you take them. It even works when you're shooting within social media apps.

    Samsung Galaxy S24 Ultra | Samsung US (48)

    A woman's photo is taken at sunset. With Super HDR, color and saturation is enhanced so the subject is bright and the clouds in the sky are pronounced. The Super HDR image shown in the view finder matches the high-definition result saved in the Gallery.

    Captured #withGalaxy Galaxy S24 Ultra

    GENERATIVE EDIT

    Resize it, Retouch it. Just like that

    GENERATIVE EDIT

    Resize it, Retouch it. Just like that

    AI editing capabilities help you get the exact photo you want, relocating objects and intelligently filling in empty spaces.

    Samsung Galaxy S24 Ultra | Samsung US (49)

    A photo is edited in the Gallery app. An edit button is tapped and the subject is selected. They are resized and moved to another location in the picture. Then, missing areas are filled in.

    Speed and power, a game-changing combo

    Arena Breakout logo. Ray tracing on. Ray tracing off. A before and after comparison on the display of Galaxy S24 Ultra depicts ray tracing effects in a gameplay snapshot from Arena Breakout. Ray tracing makes reflections on surfaces more pronounced.

    Samsung Galaxy S24 Ultra | Samsung US (50)

    Samsung Galaxy S24 Ultra | Samsung US (51)

    Victory can be yours with the new Snapdragon® 8 Gen 3 for Galaxy. Graphics render in real time with ray tracing for hyper-realistic shadows and reflections.

    We've nearly doubled the size of the Vapor Chamber to improve heat dissipation for a smooth graphics experience.,

    All-day battery to play on and on

    Watch videos up to

    30 hrs

    Listen to music up to

    95 hrs

    Our brightest adaptive mobile display

    Corning® Gorilla® Armor reduces reflections and improves visual clarity, even in direct sunlight. Improved Vision Booster enhances contrast and color for a clearly exceptional experience.

    Video with clear visibility is portrayed in a before and after style comparison a Galaxy S24 Ultra display. The device is being held outside in the daylight and a video is playing on the screen.

    Samsung Galaxy S24 Ultra | Samsung US (52)

    Samsung Galaxy S24 Ultra | Samsung US (53)

    Built-in S Pen writes a whole new chapter

    Built-in S Pen writes a whole new chapter

    The legacy of Galaxy Note is alive and well. Write, tap and navigate with precision on the new, fully-flat display.

    Samsung Galaxy S24 Ultra | Samsung US (54)

    Switching to Galaxy is easy

    Switch effortlessly from iOS

    Keep your photos, contacts, calendar and apps with Smart Switch — even if you switch from iOS.,,

    Go to Smart Switch

    Samsung Galaxy S24 Ultra | Samsung US (55)

    Trailblaze the AI frontier

    Switch to Samsung and open up new possibilities with the groundbreaking power of Galaxy AI.

    Samsung Galaxy S24 Ultra | Samsung US (56)

    Forget barriers between devices

    Switch to Galaxy to open up seamless ways to work, play and live across your devices.

    Go to Galaxy Connected Experience

    Samsung Galaxy S24 Ultra | Samsung US (57)

    Secured by Samsung Knox

    Rest easy with our unparalleled mobile protection, fortified by the impenetrable Knox Vault, as well as Knox Matrix, Samsung's vision for multi-device security.

    Samsung Galaxy S24 Ultra | Samsung US (58)

    Changes start from small steps

    We're moving toward a sustainable future, step by step. We believe in building a sustainable journey through small changes that could make a big difference.

    Samsung Galaxy S24 Ultra | Samsung US (59)

    Up to 1TB storage

    Save it all with 256GB, 512GB and 1TB options.

    Samsung Galaxy S24 Ultra | Samsung US (60)

    Trade in and save

    Trade in your old phone to save on your new Galaxy S24 Ultra.

    Samsung Galaxy S24 Ultra | Samsung US (61)

    Accessorize your Galaxy

    Shop all

    Samsung Galaxy S24 Ultra | Samsung US (62)

    Frequently Asked Questions

    Try Galaxy on your phone

    Experience One UI on your device and learn more about Galaxy AI.

    Samsung Galaxy S24 Ultra | Samsung US (63)

    Galaxy S24 Ultra

    Buy now Reserve now Pre-order now Where to buy

    Samsung Galaxy S24 Ultra | Samsung US (64)

    Galaxy S24 Ultra for business

    Buy now

    Samsung Galaxy S24 Ultra | Samsung US (65)

    Galaxy S24 | S24+

    Learn more

    Samsung Galaxy S24 Ultra | Samsung US (66)

    See in 360°

    Take it for a spin

    *Online exclusive colors only available on Samsung.com.

    *Images simulated for illustrative purposes. Sequences shortened and simulated. Actual UI may be different. 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.

    • Galaxy AI features by Samsung will be provided for free until the end of 2025 on supported Samsung Galaxy devices.
    • Requires internet connection; results may vary by uniqueness, clarity and framing of circled image and related factors. Samsung does not make any promises, assurances or guarantees as to the accuracy, completeness or reliability of the output provided by AI features.
    • Samsung account log-in required. Calls must be made using the native Samsung phone app.Samsung does not make any promises, assurances or guarantees as to the accuracy, completeness or reliability of the output provided by AI features.
    • For text in Samsung Notes only (200-4000 characters); requires Samsung account log-in and internet connection. Samsung does not make any promises, assurances or guarantees as to the accuracy, completeness or reliability of the output provided by AI features.
    • Requires Samsung account log-in and internet connection. Samsung does not make any promises, assurances or guarantees as to the accuracy, completeness or reliability of the output provided by AI features.
    • Measured diagonally, Galaxy S24 Ultra's screen size is 6.8 inches in the full rectangle and 6.8 inches accounting for the rounded corners; actual viewable area is less due to the rounded corners and camera hole.
    • Titanium is only applied on the device frame. Frame does not include volume and side keys.
    • Compared to Galaxy S23 Ultra.
    • Color availability may vary depending on country or carrier.
    • Optical quality zoom is enabled by the Adaptive Pixel sensor.
    • AI Zoom is applied to distances between digital zoom lengths. Accuracy of results is not guaranteed.
    • Results may vary depending on light condition and/or shooting conditions including multiple subjects, being out of focus or moving subjects.
    • 3x and 5x distances are optical zoom. 2x and 10x distances are optical quality zoom.
    • 2x zoom must be enabled in the Camera Assistant app settings. Camera Assistant can be downloaded from the Galaxy Store.
    • 8K video will need to be watched on a device that supports viewing 8k video.
    • 100X Space Zoom includes 10x optical quality zoom and 100x digital zoom with Super Resolution technology. Zoom distances past 10x zoom may express some image deterioration.
    • Certain applications may not support Super HDR.
    • Arena Breakout © Proxima Beta Pte. Limited. All Rights Reserved. All other trademarks, logos, and copyrights are property of their respective owners. Available for purchase in Samsung Galaxy Store and other app stores in select countries.
    • Snapdragon branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries.
    • Vapor Chamber installed on Galaxy S24 Ultra is 92% larger than that of Galaxy S23 Ultra.
    • AP performance improvements shown compared to Galaxy S23 Ultra. Actual performance will depend on user environment, conditions and pre-installed software and applications.
    • 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.11.25-2023.12.15 in US and UK with pre-release versions of SM-S921, SM-S926 and SM-S928 under default setting using LTE and 5G Sub6 networks. NOT tested under 5G mmWave network.
    • Based on Samsung internal lab test conditions with pre-release version of given model connected to earphone via Bluetooth under default settings over LTE. Estimated against battery capacity and measured current over battery power consumption during video playback (video file resolution 720p, saved on device) and audio playback (mp3 file, 192kbps, saved on device with LCD display turned off), respectively. Actual video and audio playback times vary by network connection, settings, file format, screen brightness, battery.
    • Wired transfers from Android™ devices require the receiving device to have Android™ 4.3 or later and the sending device to have Android 4.3™ or later. Transfers can be completed without a cable through a wireless connection. For wireless connections, the receiving device must have Android™ 4.0 or later and the sending device must have Android™ 4.0 or later. Open Smart Switch Mobile in “Settings” on the receiving Galaxy device or download the Smart Switch Mobile app from the Galaxy Store. Data and content available for transfer may vary by transmission method.
    • Wired transfers from iOS require the receiving device to have Android™ 4.3 or later and the sending device to have iOS 5 or later. Transfers can be completed without a cable through a wireless connection or iCloud. For wireless connections, the receiving device must have Android™ 4.0 or later and the sending device must have iOS 12 or later. iCloud transfers require the receiving device to have Android™ 4.0 or later and the sending device to have iOS 5 or later. Open Smart Switch Mobile in “Settings” on the receiving Galaxy device or download the Smart Switch Mobile app from the Galaxy Store. For wireless transfers, download Smart Switch for iOS from the App Store on your iPhone or iPad. Data and content available for transfer may vary by transmission method.
    • It is recommended to use a wired connection when transferring diverse sets of data at once.
    • Quick Share between Galaxy devices available with the following OS: smartphones and tablets with Android OS version 10.0 (Q) and One UI 2.1 or above, PCs running Windows 10 or later. Requires Samsung account and Wi-Fi and Bluetooth connection. Quick Share to iOS and Android devices available by sending shared link: individual files shared cannot exceed 3GB (for a total of 5GB per day) and link will expire after two days; requires a Samsung account and internet connection.
    • Galaxy Tab S9 sold separately.
    • All accessories sold separately.
    • 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 3880mAh for Galaxy S24, 4755mAh for Galaxy S24+ and 4855mAh for Galaxy S24 Ultra. Actual battery life may vary depending on network environment, usage patterns and other factors.

    θFor a limited time only, on Samsung.com/Shop Samsung App, or purchase a new qualifying Galaxy device (“Qualifying Purchase”), send in your qualifying trade-in device to Samsung through the Samsung Trade-In Program, and if Samsung determines your trade-in device meets all eligibility requirements, you will receive a trade-in credit specific to your qualifying trade-in device to apply toward your Qualifying Purchase. Device models that currently qualify for trade-in and trade-in credit amounts associated with those models are available on Samsung.com and the Shop Samsung App; eligible models and amounts may change at Samsung’s sole discretion. To be eligible for trade-in, your qualifying device must meet all Trade-In Program eligibility requirements, which include, but are not limited to, that the device powers on, holds a charge, and does not power off unexpectedly; has a functioning display; has no breaks or cracks in the screen (unless a cracked screen offer applies); has no breaks or cracks in the case; has no liquid damage (whether visible or not); has no other defects that go beyond normal wear and tear; is not on a black list; has a verified FCC ID; has been reset to factory settings; has all personal information removed; has all software locks disabled; and is owned by you (leased devices are not eligible). Anticipated trade-in value will be applied as a credit at time of purchase, but, if you do not send in your trade-in device within 15 days of receipt of your Qualifying Purchase, you will be charged back for the trade-in credit applied to your purchase, or if you send in your trade-in device within 15 days of receipt of your Qualifying Purchase but Samsung determines your device does not meet all eligibility requirements, you will be charged back for the trade-in credit applied to your purchase minus $25. Participation in this program does not excuse you from contracts with your carrier or retailer (or any related payments or fees) for the device that was traded in. Limit 1 trade-in per Qualifying Purchase. Samsung reserves the right to modify or discontinue this offer at any time. The Trade-In Program cannot be combined with any other Samsung, carrier or retailer promotions, discounts, or offers unless specifically provided for in the terms and conditions of such offers. Additional terms, including terms that govern the resolution of disputes, apply. Click here to learn more.

    ')); // } // } }; const isZoom = function () { const winInnerWidth = window.innerWidth, winOuterWidth = window.outerWidth; let 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 { addLoadStatusClass: addLoadStatusClass, setResolution: setResolution, onClickSup: onClickSup, centeredFocus: centeredFocus, setArBanner:setArBanner, isZoom: isZoom, } })(); (function () { const 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)); let els = {}; const init = function () { els.videoWrap = document.querySelectorAll('.common-video'); els.isGlobal = document.documentElement.classList.contains('global'); if (!!els.videoWrap[0]) { setElements(); } }; const setElements = function () { // popup els.viewerPopup = document.querySelector('.highlights-viewer'); els.lowLightPopup = document.querySelector('.highlights-low-light-popup'); els.zoomVideoPopup = document.querySelector('.highlights-quad-telephoto-popup'); els.generativeEditPopup = document.querySelector('.highlights-suggestion-ai-popup'); // video els.videosWrap = document.querySelectorAll('.common-video'); els.videos = document.querySelectorAll('.common-video video'); for (var i = 0; i < els.videosWrap.length; i++) { els.videos[i].videoWrap = els.videosWrap[i]; } }; const bindEvents = function () { window.addEventListener('load', anchorPosition); window.addEventListener('hashchange', anchorPosition); }; const anchorPosition = function () { if (window.location.hash != '') { switch (window.location.hash) { case '#see-in-360': if (els.viewerPopup) els.viewerPopup.show(); break; case '#low-light-zoom': if (els.lowLightPopup) els.lowLightPopup.show(); break; case '#5x-zoom': if (els.zoomVideoPopup) els.zoomVideoPopup.show(); break; case '#generative-edit': if (els.generativeEditPopup) els.generativeEditPopup.show(); break; default: let hash = location.hash.split('#')[1], hashSection = document.querySelector('#contents #' + hash), hashTimeout = null; clearTimeout(hashTimeout); hashTimeout = setTimeout(function () { let sectionTop = hashSection.getBoundingClientRect().top, navHeight = utils.getNavHeight(), hashScroll = window.pageYOffset + sectionTop - navHeight; window.scrollTo(0, hashScroll); }, 300); break; } } }; 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); }; const setScrollControl = function () { window.scrollController = ANIUTIL.scrollController(); scrollController.init({ speed: 120, duration: 0.5 }); }; const 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 }); }; const 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'); } } }); }; const setCenteredfocus = function () { els.contents = document.querySelector('#contents'); els.allClickables = els.contents.querySelectorAll('a, button, input, select'); for (let i = 0; i < els.allClickables.length; i++) { els.allClickables[i].addEventListener('focusin', common.centeredFocus); } }; const setDisclaimerNumber = function () { const supTag = document.querySelectorAll('.click_sup'), btmDicl = document.querySelectorAll('li.common-bottom-disclaimer__list-item'); let btmDiclArr = []; for (let i = 0; i < btmDicl.length; i++) { let dataSup = btmDicl[i].getAttribute('data-sup'); btmDiclArr.push(dataSup); } for (let j = 0; j < supTag.length; j++) { let dataSupTag = supTag[j].getAttribute('data-sup-tag'); let supChildCount = supTag[j].parentElement.childElementCount; if (btmDiclArr.indexOf(dataSupTag) > -1) { supTag[j].innerText = btmDiclArr.indexOf(dataSupTag) + 1; } else { if (supChildCount == 1) { supTag[j].parentElement.remove(); } else { let supParent = supTag[j].parentElement.childNodes; let supArr = []; for (let supIndex = 0; supIndex < supParent.length; supIndex++) { supArr.push(supParent[supIndex]); } let index = supArr.indexOf(supTag[j]); if (index != 0 && index % 2 == 0) { supParent[index].remove(); supParent[index - 1].remove(); } else { if (index != supArr.length) supParent[index + 1].remove(); supParent[index].remove(); } } } } }; const setDisclaimer = function () { els.supClicker = document.querySelectorAll('a.click_sup'); for (let i = 0; i < els.supClicker.length; i++) { els.supClicker[i].addEventListener('click', common.onClickSup); } }; const setVideoTheme = function () { for (let i = 0; i < els.videoWrap.length; i++) { let colorType = els.videoWrap[i].getAttribute('data-theme-type'); if (colorType === 'white') { els.videoWrap[i].classList.add('common-video__white'); } else if (colorType === 'black') { els.videoWrap[i].classList.add('common-video__black'); } } }; const setVideoBlind = function () { for (let i = 0; i < els.videoWrap.length; i++) { 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 = (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) ? LOCAL_VARI.play : 'play'; } }; const onLoadHandler = function () { common.addLoadStatusClass(); common.setArBanner(); init(); bindEvents(); setResize(); if (!maxOs && !touchDevice) { setScrollControl(); } setImageLoader(); setVideoLoader(); setCenteredfocus(); setDisclaimerNumber(); setDisclaimer(); setVideoTheme(); setVideoBlind(); common.isZoom(); resize.add(common.isZoom); }; onLoadHandler(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.accordion = (function () { const resize = window.flagship.common.resize; let els = {}; let objs = { accordion: [] }; let prevDevice = null; let currDevice = resize.checkResolution(); const init = function () { els.accordionList = document.querySelectorAll('.common-accordion__list'); if (!!els.accordionList && els.accordionList.length > 0) { bindEvents(); } }; const bindEvents = function () { resize.add(onResizeHandler); setAccordion(); }; const onResizeHandler = function (currRes) { currDevice = currRes; if (currDevice != prevDevice) { onResponsiveHandler(); prevDevice = currDevice; } }; const onResponsiveHandler = function () { for (let i = 0; i < els.accordionList.length; i++) { let isOpenedItem = els.accordionList[i].querySelector('.is-open'); if (!!isOpenedItem) { let isOpenedItemContent = isOpenedItem.querySelector('.js-accordion-content'); let clientHeight = isOpenedItemContent.children[0].clientHeight; isOpenedItemContent.style.height = `${clientHeight}px`; } } }; const setAccordion = function () { for (let i = 0; i < els.accordionList.length; i++) { objs.accordion[i] = new window.flagship.common.accordion({ wrap: els.accordionList[i], openType: 'single', open: { start: function (target) { handlerList.setImages(target); handlerList.setVideo(target); }, end: function (target) { let targetVideo = target.querySelector('.common-accordion__content video'); if (targetVideo && targetVideo.paused) targetVideo.play(); } }, close: { start: function (target) { let targetVideo = target.querySelector('.common-accordion__content video'); if (targetVideo && !targetVideo.paused) { targetVideo.pause(); targetVideo.currentTime = 0; } }, end: function () {} } }); objs.accordion[i].init(); } }; const handlerList = { setImages: function (target) { let targetImages = target.querySelectorAll('.common-accordion__content img'); if (targetImages && targetImages.length > 0) { for (let i = 0; i < targetImages.length; i++) { if (!targetImages[i].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia([targetImages[i]]); } } } }, setVideo: function (target) { let targetVideos = target.querySelectorAll('.common-accordion__content video'); if (targetVideos && targetVideos.length > 0) { for (let i = 0; i < targetVideos.length; i++) { if (!targetVideos[i].classList.contains('is-video-load-complete')) { videoLoader.setResponsiveMedia([targetVideos[i]]); } } } } } return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.clickToVideo = (function () { let els = {}, objs = { clickToVideo: [], }; const init = function () { els.clickToVideosWrap = document.querySelectorAll('.js-scroll-video-disable .common-video'); if (els.clickToVideosWrap.length > 0) { setElements(); setVideo(); } }; const setElements = function () { for (let i = 0; i < els.clickToVideosWrap.length; i++) { els.clickToVideosWrap[i].video = els.clickToVideosWrap[i].querySelector('.common-video__figure>video'); els.clickToVideosWrap[i].controller = els.clickToVideosWrap[i].querySelector('.common-video__control'); els.clickToVideosWrap[i].controller.video = els.clickToVideosWrap[i].video; els.clickToVideosWrap[i].controller.addEventListener('click', clickVideoCta); } }; const setVideo = function () { for (let i = 0; i < els.clickToVideosWrap.length; i++) { objs.clickToVideo[i] = ANIUTIL.videoHandler({ wrap: els.clickToVideosWrap[i], video: els.clickToVideosWrap[i].video, controller: els.clickToVideosWrap[i].controller, resetCallback: function () { if (this.wrap.classList.contains('is-completed')) { this.wrap.classList.remove('is-completed'); } }, playCallback: function () { setTagging.pause(this.controller); }, pauseCallback: function () { setTagging.play(this.controller); }, endCallback: function () { if (!this.wrap.classList.contains('is-completed')) { this.wrap.classList.add('is-completed'); } } }); } }; const clickVideoCta = function (e) { if (e.target == e.currentTarget) { if (e.currentTarget.video.paused) { e.currentTarget.video.play(); } else { e.currentTarget.video.pause(); } } }; const setTagging = { play: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('pause', 'play')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('pause', 'play')); } }, pause: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('play', 'pause')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.scrollVideo = (function () { const utils = window.flagship.common.utils, resize = window.flagship.common.resize; let els = {}, objs = { scrollVideo: [], scene: [] }, currDevice = resize.checkResolution(); const init = function () { els.scrollVideoWraps = document.querySelectorAll('.common-video.js-scroll-video'); els.pageScrollVideoWraps = []; if (!!els.scrollVideoWraps) { for (let i = 0; i < els.scrollVideoWraps.length; i++) { if (!els.scrollVideoWraps[i].parentElement.classList.contains('common-popup__video') && !els.scrollVideoWraps[i].parentElement.classList.contains('js-scroll-video-disable')) { els.pageScrollVideoWraps.push(els.scrollVideoWraps[i]); } } } if (els.pageScrollVideoWraps.length > 0) { setElements(); objList.setVideo(); objList.setScene(); bindEvents(); } }; const setElements = function () { for (let i = 0; i < els.pageScrollVideoWraps.length; i++) { els.pageScrollVideoWraps[i].video = els.pageScrollVideoWraps[i].querySelector('.common-video__figure>video'); els.pageScrollVideoWraps[i].controller = els.pageScrollVideoWraps[i].querySelector('.common-video__control'); els.pageScrollVideoWraps[i].controller.video = els.pageScrollVideoWraps[i].video; els.pageScrollVideoWraps[i].startPoint = !!els.pageScrollVideoWraps[i].getAttribute('data-start-point') ? parseInt(els.pageScrollVideoWraps[i].getAttribute('data-start-point')) : undefined; els.pageScrollVideoWraps[i].reversePoint = !!els.pageScrollVideoWraps[i].getAttribute('data-reverse-point') ? parseInt(els.pageScrollVideoWraps[i].getAttribute('data-reverse-point')) : undefined; els.pageScrollVideoWraps[i].moStartPoint = !!els.pageScrollVideoWraps[i].getAttribute('data-mo-start-point') ? parseInt(els.pageScrollVideoWraps[i].getAttribute('data-mo-start-point')) : undefined; els.pageScrollVideoWraps[i].moReversePoint = !!els.pageScrollVideoWraps[i].getAttribute('data-mo-reverse-point') ? parseInt(els.pageScrollVideoWraps[i].getAttribute('data-mo-reverse-point')) : undefined; els.pageScrollVideoWraps[i].controller.addEventListener('click', handlerList.videoCta); } }; const bindEvents = function () { window.addEventListener('scroll', handlerList.scroll); handlerList.scroll(); resize.add(onResizeHandler); }; const onResizeHandler = function (currRes) { currDevice = currRes; }; const objList = { setVideo: function () { for (let i = 0; i < els.pageScrollVideoWraps.length; i++) { objs.scrollVideo[i] = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: (currDevice.indexOf('mobile') > -1) ? els.pageScrollVideoWraps[i].moStartPoint : els.pageScrollVideoWraps[i].startPoint, reversePoint: (currDevice.indexOf('mobile') > -1) ? els.pageScrollVideoWraps[i].moReversePoint : els.pageScrollVideoWraps[i].reversePoint, wrap: els.pageScrollVideoWraps[i], video: els.pageScrollVideoWraps[i].video, controller: els.pageScrollVideoWraps[i].controller, resetCallback: function () { if (this.wrap.classList.contains('is-completed')) { this.wrap.classList.remove('is-completed'); } }, playCallback: function () { setTagging.pause(this.controller); }, pauseCallback: function () { setTagging.play(this.controller); }, endCallback: function () { if (!this.wrap.classList.contains('is-completed')) { this.wrap.classList.add('is-completed'); } } }); } }, setScene: function () { for (let i = 0; i < els.pageScrollVideoWraps.length; i++) { objs.scene[i] = SCROLLER({ trackElement: els.pageScrollVideoWraps[i].video, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } } }; const handlerList = { scroll: function () { for (let i = 0; i < els.pageScrollVideoWraps.length; i++) { objs.scene[i].trackAnimation(function () { objs.scrollVideo[i].scrollActive(this.progress); }); } }, videoCta: function (e) { if (e.target == e.currentTarget) { if (e.currentTarget.video.paused) { e.currentTarget.video.play(); } else { e.currentTarget.video.pause(); } } } }; const setTagging = { play: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('pause', 'play')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('pause', 'play')); } }, pause: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('play', 'pause')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('play', 'pause')); } } }; return { init: init } })(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.camera = (function () { let els = {}; let objs = {}; const init = function () { els.section = document.querySelector('.highlights-camera'); if (!!els.section) { bindEvents(); } }; const bindEvents = function () { setScene(); window.addEventListener('scroll', scrollHandler); }; const setScene = function(){ TweenMax.set(els.section, {y: 150}); objs.scene = SCROLLER({ trackElement: els.section, useFixed: false }); }; const scrollHandler = function(){ objs.scene.trackAnimation(function(){ let activeValue = ANIUTIL.calRange({ targetValue: 1, progress: this.progress, startPoint: 0, endPoint: 40 }); let moveValue = ANIUTIL.calRange({ targetValue: 150, progress: this.progress, startPoint: 0, endPoint: 40 }); TweenMax.to(els.section, 0, {y: 150 - moveValue}); els.section.style.opacity = activeValue; }); } return { init: init } })(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.cameraAi = (function () { let els = {}; let objs = {}; const init = function () { els.section = document.querySelector('.highlights-ai'); if (!!els.section) { setElements(); bindEvents(); } }; const setElements = function () { els.gradient = els.section.querySelector('.highlights-ai__gradient'); els.text = els.section.querySelector('.common-headline span'); els.intelligence = els.section.querySelector('.highlights-ai__intelligence video'); }; const bindEvents = function () { setScene(); window.addEventListener('scroll', scrollHandler); scrollHandler(); }; const setScene = function () { TweenMax.set(els.section, {y: 100}); objs.scene = SCROLLER({ trackElement: els.section, useFixed: false }); }; const scrollHandler = function () { objs.scene.trackAnimation(function () { let activeValue = ANIUTIL.calRange({ targetValue: 70, progress: this.progress, startPoint: 10, endPoint: 30 }); TweenMax.to(els.section, 0, {y: 100 - activeValue}); let _active = function () { if (els.intelligence.readyState < 4) { els.intelligence.addEventListener('canplay', function () { if (!els.section.classList.contains('is-active') && els.intelligence.paused) { els.intelligence.currentTime = 0; els.intelligence.play(); } }); } else { if (!els.section.classList.contains('is-active') && els.intelligence.paused) { els.intelligence.currentTime = 0; els.intelligence.play(); } } if (!els.section.classList.contains('is-active')) { setTimeout(() => { els.section.classList.add('is-active'); }, 700); } }; if (this.wheelDirection == 'down' && this.progress > 40 && this.progress < 70) { _active(); } else if (this.wheelDirection == 'up' && this.progress > 50 && this.progress < 70) { _active(); } if(this.progress == 0 || this.progress == 100) { els.section.classList.remove('is-active'); els.intelligence.pause(); els.intelligence.currentTime = 0; } }); } return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.color = (function () { const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; let els = {}, status = {}, objs = {}; let activeClass = 'is-active'; let oldIndex = null; let currDevice = resize.checkResolution(); let prevDevice = null; const init = function () { els.section = document.querySelector('.highlights-color'); if (!!els.section) { setElements(); setStatus(); bindEvents(); } }; const setElements = function () { // topSwiper els.topSwiperWrap = els.section.querySelector('.highlights-color__carousel'); if (!!els.topSwiperWrap) { els.topSwiperContainer = els.section.querySelector('.highlights-color__carousel-container'); els.topSwiperNextArrow = els.topSwiperContainer.querySelector('.highlights-color__arrow--next'); els.topSwiperPrevArrow = els.topSwiperContainer.querySelector('.highlights-color__arrow--prev'); els.topSwiperPagination = els.section.querySelector('.highlights-color__pagination'); } // colorchipSwiper els.colorchipWrap = els.section.querySelector('.highlights-color__tab-colors'); els.colorchipSwiperContainer = els.colorchipWrap.querySelector('.swiper-container'); els.colorchipSwiperArrowWrap = els.colorchipWrap.querySelector('.highlights-color__tab-navigation'); els.colorchipSwiperNextArrow = els.colorchipWrap.querySelector('.highlights-color__navigation-arrow--next'); els.colorchipSwiperPrevArrow = els.colorchipWrap.querySelector('.highlights-color__navigation-arrow--prev'); // colorchipItem els.colorchipItemWrap = els.section.querySelector('.highlights-color__tab'); els.colorchipItems = els.colorchipItemWrap.querySelectorAll('.highlights-color__tab-item'); els.colorchipBtns = els.colorchipItemWrap.querySelectorAll('.highlights-color__tab-button'); for (let i = 0; i < els.colorchipBtns.length; i++) { els.colorchipBtns[i].setAttribute('data-js-index', i); } // colorName els.colorNameWrap = els.section.querySelector('.highlights-color__tab-names'); els.colorNames = els.colorNameWrap.querySelectorAll('.highlights-color__tab-name'); // colorPanel els.panelWrap = els.section.querySelector('.highlights-color__tab-panel-group'); els.panels = els.panelWrap.querySelectorAll('.highlights-color__tab-panel'); // 360 Popup Btn els.popupBtn = els.section.querySelector('.common-cta-area button'); }; const setStatus = function () { status.isClick = false; // index status.targetIndex = null; status.oldColorIndex = null; }; const bindEvents = function () { resize.add(handlerList.onResize); setColorchipEvent(); if (!els.topSwiperWrap) return; setTimeout(function () { window.addEventListener('scroll', handlerList.scroll); }, 1000); objList.setScene(); setSwiper.top(); els.topSwiperNextArrow.addEventListener('click', handlerList.onClickArrow); els.topSwiperNextArrow.addEventListener('keydown', handlerList.onClickArrow); els.topSwiperPrevArrow.addEventListener('click', handlerList.onClickArrow); els.topSwiperPrevArrow.addEventListener('keydown', handlerList.onClickArrow); }; const setColorchipEvent = function () { let colorchipSwiperLength = currDevice.indexOf('mobile') > -1 ? 3 : 5; if (els.colorchipBtns.length >= colorchipSwiperLength) { status.isLoop = true; oldIndex = els.colorchipBtns.length; if (els.colorchipSwiperArrowWrap.style.display == 'none') { els.colorchipSwiperArrowWrap.style.display = ''; } if (els.colorchipWrap.classList.contains('js-colorchip-static')) { els.colorchipWrap.classList.remove('js-colorchip-static'); } setSwiper.colorchip(); } else { status.isLoop = false; if (els.colorchipSwiperArrowWrap.style.display != 'none') { els.colorchipSwiperArrowWrap.style.display = 'none'; } if (!els.colorchipWrap.classList.contains('js-colorchip-static')) { els.colorchipWrap.classList.add('js-colorchip-static'); } if (objs.colorchipSwiper != null) { let realIndex = objs.colorchipSwiper.realIndex; if (!els.colorchipBtns[realIndex].classList.contains(activeClass)) { els.colorchipBtns[realIndex].classList.add(activeClass); els.colorchipBtns[realIndex].setAttribute('aria-selected', true); } swiperEvents.colorchip.destroy(); } let currentColorchip = els.colorchipItemWrap.querySelector(`.${activeClass}`); status.oldColorIndex = currentColorchip.getAttribute('data-js-index'); for (let i = 0; i < els.colorchipBtns.length; i++) { els.colorchipBtns[i].addEventListener('click', handlerList.onClickColorchip); els.colorchipItems[i].removeAttribute('tabindex'); els.colorchipItems[i].removeAttribute('aria-hidden'); } } }; const objList = { topSwiper: function () { if (objs.topSwiper == null) { objs.topSwiper = new Swiper(els.topSwiperContainer, { init: false, speed: 800, navigation: { nextEl: els.topSwiperNextArrow, prevEl: els.topSwiperPrevArrow, }, pagination: { el: els.topSwiperPagination, type: 'bullets', clickable: true, renderBullet: function () { return '

  • '; } }, slidesPerView: 'auto', centeredSlides: true, }); } }, colorchipSwiper: function () { if (objs.colorchipSwiper == null) { objs.colorchipSwiper = new Swiper(els.colorchipSwiperContainer, { init: false, navigation: { nextEl: els.colorchipSwiperNextArrow, prevEl: els.colorchipSwiperPrevArrow, }, slidesPerView: 'auto', centeredSlides: true, loop: true, speed: 300, touchRatio: 0, }); } }, setScene: function () { objs.topScene = SCROLLER({ trackElement: els.topSwiperContainer, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; const setSwiper = { top: function () { objList.topSwiper(); objs.topSwiper.on('init', swiperEvents.top.init); objs.topSwiper.on('slideChange', swiperEvents.top.slideChange); objs.topSwiper.init(); }, colorchip: function () { objList.colorchipSwiper(); objs.colorchipSwiper.on('init', swiperEvents.colorchip.init); objs.colorchipSwiper.on('slideChange', swiperEvents.colorchip.slideChange); objs.colorchipSwiper.on('transitionEnd', swiperEvents.colorchip.transitionEnd); objs.colorchipSwiper.init(); els.loopColorchipBtns = els.section.querySelectorAll('.highlights-color__tab-button'); for (let i = 0; i < els.loopColorchipBtns.length; i++) { els.loopColorchipBtns[i].index = i; els.loopColorchipBtns[i].addEventListener('click', handlerList.onClickColorchip); } if (status.targetIndex != 0) status.targetIndex = 0; eventList.colorchip(); eventList.colorName(); eventList.panel(); } }; const swiperEvents = { top: { init: function () { let notification = this.el.querySelector('.swiper-notification'); let bullets = this.pagination.bullets; this.slides[this.activeIndex].style.transitionDuration = '0s'; setTimeout(() => { this.slides[this.activeIndex].style.transitionDuration = ''; }, 100); if (!!notification) this.el.removeChild(notification); accessibility.slide.top(objs.topSwiper); accessibility.pagination.tagging(bullets); accessibility.pagination.label(bullets); els.topSwiperPrevArrow.removeAttribute('aria-label'); els.topSwiperNextArrow.removeAttribute('aria-label'); setTimeout(function () { handlerList.scroll(); }, 900); status.isTest = false; for (let i = 0; i < bullets.length; i++) { bullets[i].removeAttribute('role'); bullets[i].addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); objs.topSwiper.slideTo(i); }); } }, slideChange: function () { accessibility.slide.top(objs.topSwiper); accessibility.pagination.label(objs.topSwiper.pagination.bullets); } }, colorchip: { init: function () { let notification = this.el.querySelector('.swiper-notification'); if (!!notification) this.el.removeChild(notification); accessibility.slide.colorchip(objs.colorchipSwiper); els.colorchipSwiperPrevArrow.removeAttribute('aria-label'); els.colorchipSwiperNextArrow.removeAttribute('aria-label'); let cloneSlide = this.el.querySelectorAll('.swiper-slide-duplicate'); for (let i = 0; i < cloneSlide.length; i++) { let activeClone = cloneSlide[i].querySelector('.highlights-color__tab-button.is-active'); if (!!activeClone) activeClone.classList.remove('is-active'); } }, slideChange: function () { let activeIndex = this.activeIndex; let oldColor = els.loopColorchipBtns[oldIndex]; status.oldColorIndex = oldColor.getAttribute('data-js-index'); status.targetIndex = els.loopColorchipBtns[activeIndex].getAttribute('data-js-index'); eventList.colorchip(); eventList.colorName(); eventList.panel(); accessibility.slide.colorchip(objs.colorchipSwiper); eventList.setPopupBtnColor(els.panels[status.targetIndex]); oldIndex = activeIndex; }, transitionEnd: function () { if (status.isClick) status.isClick = false; }, destroy: function () { objs.colorchipSwiper.destroy(true); objs.colorchipSwiper = null; }, }, }; const handlerList = { scroll: function () { objs.topScene.trackAnimation(function () { if (this.wheelDirection == 'down' && this.progress > 45 && this.progress < 70) { if (objs.topSwiper != null) { objs.topSwiper.slideNext(); objs.topScene.destroy(); window.removeEventListener('scroll', handlerList.scroll); } } else if (this.wheelDirection == 'up' && this.progress < 50) { if (objs.topSwiper != null) { objs.topSwiper.slideNext(); objs.topScene.destroy(); window.removeEventListener('scroll', handlerList.scroll); } } }); }, onResize: function (currRes) { currDevice = currRes; if (currDevice !== prevDevice) { setColorchipEvent(); if (objs.colorchipSwiper != null) { accessibility.slide.colorchip(objs.colorchipSwiper); } prevDevice = currDevice; } }, onClickArrow: function (e) { status.isArrowClick = true; status.arrowStyleTimeout = null; if ((e.type == 'keydown' && e.keyCode == 13) || e.type == 'click') { e.preventDefault(); if (objs.topSwiper.isBeginning && !objs.topSwiper.isEnd) { els.topSwiperPrevArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.topSwiperNextArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.topSwiperPrevArrow.style.display = ''; }, 400); } else if (!objs.topSwiper.isBeginning && objs.topSwiper.isEnd) { els.topSwiperNextArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.topSwiperPrevArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.topSwiperNextArrow.style.display = ''; }, 400); } } }, onClickColorchip: function () { status.isClick = true; let targetColor = this; if (status.isLoop) { if (targetColor.classList.contains('is-active')) return; eventList.slideTo(targetColor); } else { status.targetIndex = targetColor.getAttribute('data-js-index'); eventList.colorchip(); eventList.colorName(); eventList.panel(); status.oldColorIndex = status.targetIndex; } } }; const eventList = { colorchip: function () { let oldColor = els.colorchipItemWrap.querySelectorAll(`.${activeClass}`); let activeIndex = status.isLoop ? objs.colorchipSwiper.activeIndex : status.targetIndex; let targetColorchipBtns = status.isLoop ? els.loopColorchipBtns[activeIndex] : els.colorchipBtns[activeIndex]; if (!targetColorchipBtns.classList.contains(activeClass)) { for (let i = 0; i < oldColor.length; i++) { oldColor[i].classList.remove(activeClass); oldColor[i].setAttribute('aria-selected', false); } targetColorchipBtns.classList.add(activeClass); targetColorchipBtns.setAttribute('aria-selected', true); } }, colorName: function () { for (let i = 0; i < els.colorNames.length; i++) { if (els.colorNames[i].classList.contains(activeClass)) { els.colorNames[i].classList.remove(activeClass); } } if (!els.colorNames[status.targetIndex].classList.contains(activeClass)) { els.colorNames[status.targetIndex].classList.add(activeClass); } }, panel: function () { let targetPanelImgs = els.panels[status.targetIndex].querySelectorAll('img'); for (let i = 0; i < els.panels.length; i++) { if (els.panels[i].classList.contains(activeClass)) { els.panels[i].classList.remove(activeClass); els.panels[i].setAttribute('aria-hidden', true); } } if (!els.panels[status.targetIndex].classList.contains(activeClass)) { els.panels[status.targetIndex].classList.add(activeClass); els.panels[status.targetIndex].setAttribute('aria-hidden', false); els.popupBtn.setAttribute('data-model-color', els.panels[status.targetIndex].getAttribute('id')); } if (!targetPanelImgs[0].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia([targetPanelImgs[0]]); } if (!targetPanelImgs[1].classList.contains('is-img-load-complete')) { imageLoader.setResponsiveMedia([targetPanelImgs[1]]); } }, slideTo: function (targetColor) { let self = objs.colorchipSwiper; let activeIndex = targetColor.index; objs.slideChangeTime = null; if (status.isClick) { let moveSize = oldIndex - activeIndex; if (moveSize > 0) { if (moveSize == 1) { objs.colorchipSwiper.slidePrev(); } else if (moveSize == 3) { objs.colorchipSwiper.slidePrev(0); objs.colorchipSwiper.slidePrev(0); self.slidePrev(); } else { objs.colorchipSwiper.slidePrev(0); self.slidePrev(); } } else { if (moveSize == -1) { objs.colorchipSwiper.slideNext(); } else if (moveSize == -3) { objs.colorchipSwiper.slideNext(0); objs.colorchipSwiper.slideNext(0); self.slideNext(); } else { objs.colorchipSwiper.slideNext(0); self.slideNext(); } } self.slides[self.activeIndex].querySelector('button').focus(); clearTimeout(objs.slideChangeTime); objs.slideChangeTime = setTimeout(function () { self.slides[self.activeIndex].querySelector('button').focus(); }, 200); status.isClick = false; } }, setPopupBtnColor: function (target) { els.popupBtn.setAttribute('data-model-color', target.getAttribute('id')); } }; const accessibility = { slide: { top: function (swiperObjs) { for (let i = 0; i < swiperObjs.slides.length; i++) { if (i != swiperObjs.activeIndex) { utils.onAccessibility(swiperObjs.slides[i]); } else { utils.offAccessibility(swiperObjs.slides[i]); } } }, colorchip: function (swiperObjs) { let isNotActivedColorchips = null; for (let i = 0; i < swiperObjs.slides.length; i++) { if (currDevice.indexOf('mobile') > -1) { isNotActivedColorchips = (i != swiperObjs.activeIndex) && (i > swiperObjs.activeIndex + 2) || (i < swiperObjs.activeIndex - 2) } else { isNotActivedColorchips = (i != swiperObjs.activeIndex) && (i > swiperObjs.activeIndex + 3) || (i < swiperObjs.activeIndex - 3) } if (isNotActivedColorchips) { utils.onAccessibility(swiperObjs.slides[i]); } else { utils.offAccessibility(swiperObjs.slides[i]); } } } }, pagination: { tagging: function (pagination) { const tagging = { 'an-tr-type': 'microsite_gallery', 'an-tr': 'galaxy-s24-ultra:highlights:design^colors:index:', 'an-ca': 'gallery', 'an-ac': 'feature gallery', 'an-la': 'galaxy-s24-ultra:highlights:design^colors:index:' }; if (!!pagination) { for (let i = 0; i < pagination.length; i++) { Object.keys(tagging).forEach(key => { if (key == 'an-tr' || key == 'an-la') { pagination[i].setAttribute(key, tagging[key] + (i + 1)); } else { pagination[i].setAttribute(key, tagging[key]); } }); } } }, label: function (bullets) { for (let i = 0; i < bullets.length; i++) { let isExclusive = objs.topSwiper.slides[i].getAttribute('data-colortype') == 'true' ? true : false; let slideName; if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) { slideName = !!isExclusive ? LOCAL_VARI.exclusive : LOCAL_VARI.default; if (i === objs.topSwiper.realIndex) { bullets[i].setAttribute('aria-label', `${LOCAL_VARI.slide}${i+1}: ${slideName} ${LOCAL_VARI.selected.toLowerCase()}`); } else { bullets[i].setAttribute('aria-label', `${LOCAL_VARI.slide}${i+1}: ${slideName}`); } } else { slideName = !!isExclusive ? 'online exclusive color' : 'default color'; if (i === objs.topSwiper.realIndex) { bullets[i].setAttribute('aria-label', `Slide${i+1}: ${slideName} selected`); } else { bullets[i].setAttribute('aria-label', `Slide${i+1}: ${slideName}`); } } } }, } }; return { init: init, } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.display = (function () { const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; let els = {}; let objs = {}; let status = {}; let currDevice = resize.checkResolution(); let prevDevice = null; const init = function () { els.section = document.querySelector('.highlights-display'); if (!!els.section) { setElements(); setStatus(); bindEvents(); } }; const setElements = function () { els.resizeTimeout = null; els.displayBarWrap = els.section.querySelector('.highlights-display__bar'); els.displayBar = els.displayBarWrap.querySelector('.bar'); els.displayImage = els.section.querySelector('.highlights-display__image'); els.displayCoverImage = els.section.querySelector('.highlights-display__cover'); els.isGrab = false; els.isAction = false; els.displayCoverLeftWrap = els.section.querySelector('.highlights-display__tap-left'); els.displayCoverLeftBtn = els.section.querySelector('.highlights-display__tap-left button'); els.displayCoverRightBtn = els.section.querySelector('.highlights-display__tap-right button'); els.controller = els.section.querySelector('.highlights-display__bar-controller'); els.imgWrap = els.section.querySelector('.highlights-display__image-inner'); els.tabWrap = els.section.querySelector('.highlights-display__tap-wrap'); maxPercent = currDevice.indexOf('mobile') > -1 ? 0.675 : 0.75; minPercent = currDevice.indexOf('mobile') > -1 ? 0.325 : 0.25; }; const setStatus = function () { status.isTabMove = false; }; const bindEvents = function () { window.addEventListener('DOMContentLoaded', onLoadHandler, {once: true}); window.addEventListener('scroll', onScrollHandler); els.section.addEventListener('keydown', grabEventHandler.onMoveEvent); els.section.addEventListener('click', grabEventHandler.onMoveEvent); els.section.addEventListener('mousedown', grabEventHandler.onStart); els.section.addEventListener('mousemove', grabEventHandler.onMove); els.section.addEventListener('mouseup', grabEventHandler.onEnd); els.section.addEventListener('mouseleave', grabEventHandler.onEnd); els.section.addEventListener('touchstart', grabEventHandler.onStart); els.section.addEventListener('touchmove', grabEventHandler.onMove); els.section.addEventListener('touchend', grabEventHandler.onEnd); els.section.addEventListener('touchcancel', grabEventHandler.onEnd); resize.add(onResizeHandler); }; const setAnimations = function () { let minValue = currDevice.indexOf('mobile') > -1 ? 32.5 : 25; let maxValue = currDevice.indexOf('mobile') > -1 ? 67.5 : 75; TweenMax.set(els.displayBar, {left: `${minValue}%`, ease: Power2.easeOut}); TweenMax.set(els.displayCoverImage, {width: `${minValue}%`, ease: Power2.easeOut}); objs.barAnim = new TimelineLite(); objs.barAnim .to(els.displayBar, 1, { left: `${maxValue}%`, ease: Power2.easeOut }) .to(els.displayBar, 1, { left: 50 + '%', ease: Power2.easeOut }); objs.imgAnim = new TimelineLite(); objs.imgAnim .to(els.displayCoverImage, 1, { width: `${maxValue}%`, ease: Power2.easeOut }) .to(els.displayCoverImage, 1, { width: 50 + '%', ease: Power2.easeOut }); TweenMax.set(els.displayCoverLeftWrap, {width: `${minValue}%`, ease: Power2.easeOut}); objs.imgAnim = new TimelineLite(); objs.imgAnim .to(els.displayCoverLeftWrap, 1, { width: `${maxValue}%`, ease: Power2.easeOut }) .to(els.displayCoverLeftWrap, 1, { width: 50 + '%', ease: Power2.easeOut }); }; const onLoadHandler = function () { onScrollHandler(); }; const onResizeHandler = function (currRes) { currDevice = currRes; clearTimeout(els.resizeTimeout); els.resizeTimeout = setTimeout(function () { onScrollHandler(); }, 150); if (currDevice != prevDevice) { onResponsiveHandler(); prevDevice = currDevice; } }; const onResponsiveHandler = function () { maxPercent = currDevice.indexOf('mobile') > -1 ? 0.675 : 0.75; minPercent = currDevice.indexOf('mobile') > -1 ? 0.325 : 0.25; TweenMax.set(els.displayBar, {left: 50 + '%'}); TweenMax.set(els.displayCoverImage, {width: 50 + '%'}); TweenMax.set(els.displayCoverLeftWrap, {width: 50 + '%'}); }; const onScrollHandler = function () { let winOffsetTop = window.pageYOffset + utils.getNavHeight(); let winOffsetBottom = window.pageYOffset + window.innerHeight; let targetRect = els.displayImage.getBoundingClientRect(); let targetOffsetTop = window.pageYOffset + targetRect.top; let targetOffsetBottom = window.pageYOffset + targetRect.bottom; if ((winOffsetBottom - (window.innerHeight * 0.25) > targetOffsetTop && winOffsetTop + (window.innerHeight * 0.25) < targetOffsetBottom) && !els.isAction) { setAnimations(); els.isAction = true; } }; const grabEventHandler = { onStart: function (e) { e.target.matches('.highlights-display__bar-controller') && (els.isGrab = true); }, onEnd: function () { els.isGrab = false; }, onMove: function (e) { if (els.isGrab) { e && e.preventDefault(); let wrapRect = els.displayBarWrap.getBoundingClientRect(); let wrapMaxWidth = wrapRect.width * maxPercent; let wrapMinWidth = wrapRect.width * minPercent; let xPosition = !e.touches ? e.pageX : e.touches[0].pageX; let barPosition = xPosition - wrapRect.left; if (barPosition > wrapMaxWidth) barPosition = wrapMaxWidth; else if (barPosition < wrapMinWidth) barPosition = wrapMinWidth; let barPercent = ((barPosition / wrapRect.width) * 100); els.displayBar.style.left = barPercent + '%'; els.displayCoverImage.style.width = barPercent + '%'; grabEventHandler.setArrowSize(barPercent); } }, onMoveEvent: function (e) { let wrapRect = els.displayBarWrap.getBoundingClientRect(); let wrapMaxWidth = wrapRect.width * maxPercent; let wrapMinWidth = wrapRect.width * minPercent; let barRect = els.displayBar.getBoundingClientRect(); let barPosition = barRect.left - wrapRect.left; let moveValue = Math.ceil(wrapMaxWidth / ((currDevice.indexOf('desktop') > -1) ? 8 : 5.5)); let isMove = e.target.classList.contains('highlights-display__tap-button') || e.target.classList.contains('highlights-display__bar-controller'); if (isMove) { status.isTabMove = true; if (e.type == 'click' && e.target.classList.contains('highlights-display__tap-button')) { let leftBtn = 'highlights-display__tap-left'; let rightBtn = 'highlights-display__tap-right'; if (e.target.parentElement.classList.contains(leftBtn)) { barPosition -= moveValue; } else if (e.target.parentElement.classList.contains(rightBtn)) { barPosition += moveValue; } } if (e.target.classList.contains('highlights-display__bar-controller') && (e.keyCode == 39 || e.keyCode == 37)) { e && e.preventDefault(); if (e.keyCode == 39) barPosition += moveValue; else if (e.keyCode == 37) barPosition -= moveValue; } if (barPosition < wrapMinWidth) barPosition = wrapMinWidth; else if (barPosition > wrapMaxWidth) barPosition = wrapMaxWidth; let barPercent = ((barPosition / wrapRect.width) * 100); TweenMax.to(els.displayBar, 0.3, { left: barPercent + '%', ease: Power2.easeOut }); TweenMax.to(els.displayCoverImage, 0.3, { width: barPercent + '%', ease: Power2.easeOut }); grabEventHandler.setArrowSize(barPercent); } }, setArrowSize: function (barPercent) { let imgWidth = els.imgWrap.getBoundingClientRect().width; let tabWidth = els.tabWrap.getBoundingClientRect().width; let imgValue = imgWidth * (barPercent * (1 / 100)); let tabValue = (imgWidth - tabWidth) / 2; let moveTabBtnValue = Math.floor(imgValue - tabValue); if (status.isTabMove) { TweenMax.to(els.displayCoverLeftWrap, 0.3, { width: moveTabBtnValue + 'px', ease: Power2.easeOut }); status.isTabMove = false; } else { els.displayCoverLeftWrap.style.width = moveTabBtnValue + 'px'; } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.experiences = (function () { const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; let els = {}, objs = {}, status = {}, prevDevice = null, currDevice = resize.checkResolution(); const init = function () { els.section = document.querySelector('.highlights-galaxy-offers'); els.offersItems = els.section.querySelectorAll('.highlights-galaxy-offers__card-item'); if((els.offersItems.length > 1) && !!els.section) { setElements(); bindEvents(); } }; const setElements = function () { els.swiperContainer = els.section.querySelector('.highlights-galaxy-offers__card-container'); els.nextArrow = els.section.querySelector('.highlights-galaxy-offers__arrow--next'); els.prevArrow = els.section.querySelector('.highlights-galaxy-offers__arrow--prev'); }; const bindEvents = function () { window.addEventListener('DOMContentLoaded', handlerList.onLoad, {once:true}); resize.add(handlerList.onResize); if (document.documentElement.classList.contains('global')) return; els.nextArrow.addEventListener('click', swiperEvents.onClickArrow); els.nextArrow.addEventListener('keydown', swiperEvents.onClickArrow); els.prevArrow.addEventListener('click', swiperEvents.onClickArrow); els.prevArrow.addEventListener('keydown', swiperEvents.onClickArrow); }; const objList = { swiper: function () { if (objs.swiper == null) { objs.swiper = new Swiper(els.swiperContainer, { init: false, navigation: { nextEl: els.nextArrow, prevEl: els.prevArrow, }, loop: false, slidesPerView: 'auto', centeredSlides: false, }); } } }; const handlerList = { onLoad: function () { if (currDevice.indexOf('mobile') > -1) { setSwiper(); } }, onResize: function (currRes) { currDevice = currRes; if (currDevice != prevDevice) { handlerList.onResponsive(); prevDevice = currDevice; } }, onResponsive: function () { if (currDevice.indexOf('mobile') > -1) { setSwiper(); } else { swiperEvents.destroy(); } } }; const setSwiper = function () { objList.swiper(); objs.swiper.on('init', swiperEvents.init); objs.swiper.on('slideChange', swiperEvents.slideChange); objs.swiper.init(); }; const swiperEvents = { init: function () { let notification = this.el.querySelector('.swiper-notification'); if (!!notification) this.el.removeChild(notification); accessibility.slide(); }, slideChange: function () { accessibility.slide(); }, destroy: function () { if (objs.swiper != null) { objs.swiper.navigation.destroy(true); objs.swiper.destroy(true); objs.swiper = null; } }, onClickArrow: function (e) { status.arrowTimeout = null; status.arrowStyleTimeout = null; if ((e.type == 'keydown' && e.keyCode == 13) || e.type == 'click') { e.preventDefault(); if (objs.swiper.isBeginning && !objs.swiper.isEnd) { els.nextArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.prevArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.nextArrow.style.display = ''; }, 400); } else if (!objs.swiper.isBeginning && objs.swiper.isEnd) { els.prevArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.nextArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.prevArrow.style.display = ''; }, 400); } } } }; const accessibility = { slide: function () { for (let i = 0; i < objs.swiper.slides.length; i++) { if (i != objs.swiper.activeIndex) { utils.onAccessibility(objs.swiper.slides[i]); } else { utils.offAccessibility(objs.swiper.slides[i]); } } } }; return { init: init, } })(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.faq = (function () { const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; let els = {}; let objs = {}; let prevDevice = null; let currDevice = resize.checkResolution(); const init = function () { els.section = document.querySelector('.highlights-faq'); if (!!els.section) { setElements(); bindEvents(); } }; const setElements = function () { els.faqList = els.section.querySelector('.highlights-faq__list'); }; const bindEvents = function () { resize.add(onResizeHandler); setAccordion(); }; const onResizeHandler = function (currRes) { currDevice = currRes; if (currDevice != prevDevice) { onResponsiveHandler(); prevDevice = currDevice; } }; const onResponsiveHandler = function () { let isOpenedItems = els.faqList.querySelectorAll('.highlights-faq__item.is-open'); if (isOpenedItems.length > 0) { for (let i = 0; i < isOpenedItems.length; i++) { let isOpenedItemContent = isOpenedItems[i].querySelector('.highlights-faq__answer'); let clientHeight = isOpenedItemContent.children[0].clientHeight; isOpenedItemContent.style.height = `${clientHeight}px`; } } }; const setAccordion = function () { objs.accordion = new window.flagship.common.accordion({ wrap: els.faqList, classList: { item: 'highlights-faq__item', button: 'highlights-faq__question-arrow', contents: 'highlights-faq__answer', activeClass: 'is-open' }, open: { start: function (target) { let targetInnerCta = target.querySelector('.highlights-faq__cta'); if (targetInnerCta) targetInnerCta.addEventListener('click', onClickFaqCta); } } }); objs.accordion.init(); }; const onClickFaqCta = function (e) { if (this.getAttribute('href').indexOf('#') == 0) { e.preventDefault(); let sectionId = this.getAttribute('href'); let section = document.querySelector(sectionId); let sectionTop = section.getBoundingClientRect().top; let movePosition = (sectionTop + window.pageYOffset) - utils.getNavHeight(); let clickable = section.querySelectorAll('a, button'); let title = (sectionId == '#galaxy-ai') ? section.querySelector('.common-headline') : section.querySelector('h2'); if(title.classList.contains('common-display-mo')) { if(resize.checkResolution().indexOf('mobile') > -1) { title = section.querySelector('h2.common-display-mo'); } else { title = section.querySelector('h2.common-display-pc'); } } if (!!title) { let _focusOut = function () { title.removeAttribute('tabindex'); title.removeEventListener('focusout', _focusOut); }; title.addEventListener('focusout', _focusOut); title.setAttribute('tabindex', 0); title.focus(); } else { clickable[0].focus(); } window.scrollTo(0, movePosition); } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.gaming = (function () { const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; let els = {}; let objs = {}; let currDevice = resize.checkResolution(); let prevDevice = null; let maxPercent = 0.975; let minPercent = 0.018; const init = function () { els.section = document.querySelector('.highlights-gaming'); isRemaster = els.section.querySelector('.js-remaster'); if (!!els.section && !!isRemaster) { setElements(); bindEvents(); } }; const setElements = function () { els.resizeTimeout = null; els.gamingBarWrap = els.section.querySelector('.highlights-gaming__bar'); els.gamingBar = els.gamingBarWrap.querySelector('.bar'); els.gamingImage = els.section.querySelector('.highlights-gaming__image'); els.gamingCoverImage = els.section.querySelector('.highlights-gaming__cover'); els.isGrab = false; els.isAction = false; els.gamingCoverLeftWrap = els.section.querySelector('.highlights-gaming__tap-left'); els.gamingCoverLeftBtn = els.section.querySelector('.highlights-gaming__tap-left button'); els.gamingCoverRightBtn = els.section.querySelector('.highlights-gaming__tap-right button'); els.controller = els.section.querySelector('button.highlights-gaming__bar-controller'); }; const bindEvents = function () { window.addEventListener('DOMContentLoaded', onLoadHandler, {once:true}); window.addEventListener('scroll', onScrollHandler); els.section.addEventListener('keydown', grabEventHandler.onMoveEvent); els.section.addEventListener('click', grabEventHandler.onMoveEvent); els.section.addEventListener('mousedown', grabEventHandler.onStart); els.section.addEventListener('mousemove', grabEventHandler.onMove); els.section.addEventListener('mouseup', grabEventHandler.onEnd); els.section.addEventListener('mouseleave', grabEventHandler.onEnd); els.section.addEventListener('touchstart', grabEventHandler.onStart); els.section.addEventListener('touchmove', grabEventHandler.onMove); els.section.addEventListener('touchend', grabEventHandler.onEnd); els.section.addEventListener('touchcancel', grabEventHandler.onEnd); resize.add(onResizeHandler); }; const setAnimations = function () { let minValue = 1.8; let maxValue = 97.5; TweenMax.set(els.gamingBar, {left: `${minValue}%`, ease: Power2.easeOut}); TweenMax.set(els.gamingCoverImage, {width: `${minValue}%`, ease: Power2.easeOut}); objs.barAnim = new TimelineLite(); objs.barAnim .to(els.gamingBar, 1, { left: `${maxValue}%`, ease: Power2.easeOut }) .to(els.gamingBar, 1, { left: 50 + '%', ease: Power2.easeOut }); objs.imgAnim = new TimelineLite(); objs.imgAnim .to(els.gamingCoverImage, 1, { width: `${maxValue}%`, ease: Power2.easeOut }) .to(els.gamingCoverImage, 1, { width: 50 + '%', ease: Power2.easeOut }); TweenMax.set(els.gamingCoverLeftWrap, {width: `${minValue}%`, ease: Power2.easeOut}); objs.imgAnim = new TimelineLite(); objs.imgAnim .to(els.gamingCoverLeftWrap, 1, { width: `${maxValue}%`, ease: Power2.easeOut }) .to(els.gamingCoverLeftWrap, 1, { width: 50 + '%', ease: Power2.easeOut }); }; const onLoadHandler = function () { onScrollHandler(); }; const onResizeHandler = function (currRes) { currDevice = currRes; clearTimeout(els.resizeTimeout); els.resizeTimeout = setTimeout(function () { onScrollHandler(); }, 150); if (currDevice != prevDevice) { prevDevice = currDevice; } }; const onScrollHandler = function () { let winOffsetTop = window.pageYOffset + utils.getNavHeight(); let winOffsetBottom = window.pageYOffset + window.innerHeight; let targetRect = els.gamingImage.getBoundingClientRect(); let targetOffsetTop = window.pageYOffset + targetRect.top; let targetOffsetBottom = window.pageYOffset + targetRect.bottom; if ((winOffsetBottom - (window.innerHeight * 0.25) > targetOffsetTop && winOffsetTop + (window.innerHeight * 0.25) < targetOffsetBottom) && !els.isAction) { setAnimations(); els.isAction = true; } }; const grabEventHandler = { onStart: function (e) { e.target.matches('.highlights-gaming__bar-controller') && (els.isGrab = true); }, onEnd: function () { els.isGrab = false; }, onMove: function (e) { if (els.isGrab) { e && e.preventDefault(); let wrapRect = els.gamingBarWrap.getBoundingClientRect(); let wrapMaxWidth = wrapRect.width * maxPercent; let wrapMinWidth = wrapRect.width * minPercent; let xPosition = !e.touches ? e.pageX : e.touches[0].pageX; let barPosition = xPosition - wrapRect.left; if (barPosition > wrapMaxWidth) barPosition = wrapMaxWidth; else if (barPosition < wrapMinWidth) barPosition = wrapMinWidth; let barPercent = ((barPosition / wrapRect.width) * 100); els.gamingBar.style.left = barPercent + '%'; els.gamingCoverImage.style.width = barPercent + '%'; els.gamingCoverLeftWrap.style.width = barPercent + '%'; } }, onMoveEvent: function (e) { let wrapRect = els.gamingBarWrap.getBoundingClientRect(); let wrapMaxWidth = wrapRect.width * maxPercent; let wrapMinWidth = wrapRect.width * minPercent; let barRect = els.gamingBar.getBoundingClientRect(); let barPosition = barRect.left - wrapRect.left; let moveValue = Math.ceil(wrapMaxWidth / ((currDevice.indexOf('desktop') > -1) ? 8 : 4)); let isMove = e.target.classList.contains('highlights-gaming__tap-button') || e.target.classList.contains('highlights-gaming__bar-controller'); if (isMove) { if (e.type == 'click' && e.target.classList.contains('highlights-gaming__tap-button')) { let leftBtn = 'highlights-gaming__tap-left'; let rightBtn = 'highlights-gaming__tap-right'; if (e.target.parentElement.classList.contains(leftBtn)) { barPosition -= moveValue; } else if (e.target.parentElement.classList.contains(rightBtn)) { barPosition += moveValue; } } if (e.target.classList.contains('highlights-gaming__bar-controller') && (e.keyCode == 39 || e.keyCode == 37)) { e && e.preventDefault(); if (e.keyCode == 39) barPosition += moveValue; else if (e.keyCode == 37) barPosition -= moveValue; } if (barPosition < wrapMinWidth) barPosition = wrapMinWidth; else if (barPosition > wrapMaxWidth) barPosition = wrapMaxWidth; let barPercent = ((barPosition / wrapRect.width) * 100); TweenMax.to(els.gamingBar, 0.3, { left: barPercent + '%', ease: Power2.easeOut }); TweenMax.to(els.gamingCoverImage, 0.3, { width: barPercent + '%', ease: Power2.easeOut }); TweenMax.to(els.gamingCoverLeftWrap, 0.3, { width: barPercent + '%', ease: Power2.easeOut }); } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.lowLightPopup = (function () { const utils = window.flagship.common.utils; const common = window.flagship.highlights.common; let els = {}; let objs = {}; let status = {}; const setPopupLazyLoader = { image: function () { objs.imageLoader = ANIUTIL.mediaLoader({ lazyClass: '.js-low-light-popup-img-src', responsiveClass: '.js-low-light-popup-res-img', preset: status.isGlobal ? '' : '?imbypass=true', innerScroll: { use: true, wrap: els.layerPopup, }, 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.popupBgLoader = ANIUTIL.mediaLoader({ type: 'bgImage', lazyClass: '.js-low-light-popup-bg-img', innerScroll: { use: true, wrap: els.layerPopup, }, loadOption: [{ resolution: 1920, attribute: '', bgOpts: '' }], visiblePoint: 1 }); }, video: function () { objs.videoLoader = ANIUTIL.mediaLoader({ type: 'video', lazyClass: '.js-low-light-popup-video-src', responsiveClass: '.js-low-light-popup-res-video', preset: status.isGlobal ? '' : '?imbypass=true', innerScroll: { use: true, wrap: els.layerPopup, }, 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'); } } }); } }; const init = function () { els.section = document.querySelector('.highlights-low-light'); els.layerPopup = document.querySelector('.highlights-low-light-popup'); if (!!els.layerPopup) { setElements(); setStatus(); objList.setPopup(); bindEvents(); } }; const setElements = function () { status.isGlobal = document.documentElement.classList.contains('global'); els.contents = document.querySelector('#contents'); els.openCta = els.section.querySelector('.js-layer-popup'); els.innerWrap = els.layerPopup.querySelector('.common-popup__inner-wrapper'); els.closeCtas = els.layerPopup.querySelectorAll('.common-popup__close-cta'); els.dimmed = els.layerPopup.querySelector('.common-popup__dimmed'); els.supClicker = els.layerPopup.querySelectorAll('a.click_sup'); els.videoWrap = els.layerPopup.querySelector('.common-video'); els.videoWrap.video = els.videoWrap.querySelector('.common-video__video'); els.videoWrap.controller = els.videoWrap.querySelector('.common-video__control'); els.videoWrap.controller.video = els.videoWrap.video; els.hashPopupOpener = null; }; const setStatus = function () { status.isHash = false; }; const bindEvents = function () { els.videoWrap.controller.addEventListener('click', handlerList.videoCta); for (let i = 0; i < els.supClicker.length; i++) { els.supClicker[i].addEventListener('click', handlerList.onClickSup); } }; const objList = { setPopup: function () { utils.layerPopup({ layerPopup: els.layerPopup, layerPopupClass: '.highlights-low-light-popup', openerEvent: { element: els.openCta, }, closeCtas: [els.closeCtas[0], els.closeCtas[1]], dimmed: els.dimmed, moveTarget: document.documentElement, contents: els.contents, show: { start: function (target) { els.innerWrap.scrollTop = 0; els.layerPopup.classList.add('is-init'); target.openerCta.blur(); setPopupLazyLoader.image(); setPopupLazyLoader.video(); objList.setVideo(); if (`#${els.openCta.getAttribute('data-hash')}` == window.location.hash) { status.isHash = true; els.hashPopupOpener = els.openCta; } }, end: function () { if (utils.detector.isIosDevice) els.layerPopup.style.display = 'block'; els.layerPopup.classList.add('is-open'); } }, hide: { start: function (target) { target.openerCta.focus(); els.layerPopup.classList.remove('is-open'); }, end: function () { setTimeout(function () { els.layerPopup.classList.remove('is-init'); }, 300); els.videoWrap.video.pause(); els.videoWrap.video.currentTime = 0; if (status.isHash && els.hashPopupOpener) { els.hashPopupOpener.focus(); setTimeout(function () { els.hashPopupOpener.focus(); status.isHash = false; els.hashPopupOpener = null; }, 300); } } } }); }, setVideo: function () { objs.video = ANIUTIL.videoHandler({ wrap: els.videoWrap, video: els.videoWrap.video, controller: els.videoWrap.controller, resetCallback: function () { if (this.wrap.classList.contains('is-completed')) { this.wrap.classList.remove('is-completed'); } }, playCallback: function () { setTagging.pause(this.controller); }, pauseCallback: function () { setTagging.play(this.controller); }, endCallback: function () { if (!this.wrap.classList.contains('is-completed')) { this.wrap.classList.add('is-completed'); } } }); } }; const handlerList = { videoCta: function (e) { if (e.target == e.currentTarget) { if (e.currentTarget.video.paused) { e.currentTarget.video.play(); } else { e.currentTarget.video.pause(); } } }, onClickSup: function (e) { e.preventDefault(); e.stopPropagation(); els.layerPopup.hide(); let targetIndex = parseFloat(e.target.innerText), disclaimer = document.querySelectorAll('#desc-section li')[targetIndex - 1], disclaimerText = disclaimer.innerText, activeBlock = '' + disclaimerText + ''; setTimeout(() => { disclaimer.innerHTML = activeBlock; disclaimer.querySelector('a').focus(); }, 500); const 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); } }; const setTagging = { play: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('pause', 'play')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('pause', 'play')); } }, pause: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('play', 'pause')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('play', 'pause')); } } }; return { init: init, } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.lowLight = (function () { let els = {}; let objs = {}; let status = {}; const utils = window.flagship.common.utils; const init = function () { els.section = document.querySelector('.highlights-low-light'); if (!!els.section) { setElements(); bindEvents(); } }; const setElements = function () { els.swiperContainer = els.section.querySelector('.highlights-low-light__carousel'); els.prevArrow = els.section.querySelector('.swiper-button-prev'); els.nextArrow = els.section.querySelector('.swiper-button-next'); els.pagination = els.section.querySelector('.highlights-low-light__carousel-pagination'); }; const bindEvents = function () { setSwiper(); els.nextArrow.addEventListener('click', swiperEvents.onClickArrow); els.nextArrow.addEventListener('keydown', swiperEvents.onClickArrow); els.prevArrow.addEventListener('click', swiperEvents.onClickArrow); els.prevArrow.addEventListener('keydown', swiperEvents.onClickArrow); }; const setSwiper = function () { if (objs.swiper == null) { objs.swiper = new Swiper(els.swiperContainer, { init: false, slidesPerView: 'auto', speed: 800, navigation: { prevEl: els.prevArrow, nextEl: els.nextArrow, }, pagination: { el: els.pagination, type: 'bullets', clickable: true, renderBullet: function () { return '

  • '; } } }); }; objs.swiper.on('init', swiperEvents.init); objs.swiper.on('slideChange', swiperEvents.slideChange); objs.swiper.init(); }; const swiperEvents = { init: function () { let notification = this.el.querySelector('.swiper-notification'); els.bullets = this.pagination.bullets; if (!!notification) this.el.removeChild(notification); accessibility.slide(); accessibility.pagination.tagging(); accessibility.pagination.label(); els.nextArrow.removeAttribute('aria-label'); els.prevArrow.removeAttribute('aria-label'); for (let i = 0; i < els.bullets.length; i++) { els.bullets[i].removeAttribute('role'); els.bullets[i].addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); objs.swiper.slideTo(i); }); } }, slideChange: function () { accessibility.slide(); accessibility.pagination.label(); }, onClickArrow: function (e) { status.arrowTimeout = null; status.arrowStyleTimeout = null; if ((e.type == 'keydown' && e.keyCode == 13) || e.type == 'click') { e.preventDefault(); if (objs.swiper.isBeginning && !objs.swiper.isEnd) { els.prevArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.nextArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.prevArrow.style.display = ''; }, 400); } else if (!objs.swiper.isBeginning && objs.swiper.isEnd) { els.nextArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.prevArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.nextArrow.style.display = ''; }, 400); } } } }; const accessibility = { slide: function () { for (let i = 0; i < objs.swiper.slides.length; i++) { if (i != objs.swiper.activeIndex) { utils.onAccessibility(objs.swiper.slides[i]); } else { utils.offAccessibility(objs.swiper.slides[i]); } } }, pagination: { tagging: function () { const tagging = { 'an-tr-type': 'microsite_gallery', 'an-tr': 'galaxy-s24-ultra:highlights:camera^zoom:index:', 'an-ca': 'gallery', 'an-ac': 'feature gallery', 'an-la': 'galaxy-s24-ultra:highlights:camera^zoom:index:', }; for (let i = 0; i < els.bullets.length; i++) { Object.keys(tagging).forEach(key => { if (key == 'an-tr' || key == 'an-la') { els.bullets[i].setAttribute(key, tagging[key] + (i + 1)); } else { els.bullets[i].setAttribute(key, tagging[key]); } }); } }, label: function () { for (let i = 0; i < els.bullets.length; i++) { if (i === objs.swiper.realIndex) { if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) { els.bullets[i].setAttribute('aria-label', `${LOCAL_VARI.slide}${i+1} ${LOCAL_VARI.selected.toLowerCase()}`); } else { els.bullets[i].setAttribute('aria-label', `Slide${i+1} selected`); } } else { if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) { els.bullets[i].setAttribute('aria-label', `${LOCAL_VARI.slide}${i+1}`); } else { els.bullets[i].setAttribute('aria-label', `Slide${i+1}`); } } } }, } }; return { init: init, } })(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.overview = (() => { const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; let els = {}; let objs = {}; let eventFnc = {}; let statusClass = { progress: { active: 'js-progress-active', pause: 'js-progress-pause' }, video: { load: 'is-loaded', complete: 'is-video-load-complete' }, navigation: 'is-active', info: { visible: 'is-visible', active: 'is-active' }, }; let status = {}; const init = () => { els.section = document.querySelector('.highlights-overview'); if (!!els.section) { setElements(); setProperty(); objList.setScene(); bindEvents(); } }; const setElements = () => { els.overviewContents = els.section.querySelector('.highlights-overview__contents') els.swiperContainer = els.section.querySelector('.js-overview-carousel'); els.slides = els.section.querySelectorAll('.highlights-overview__carousel-slide'); els.videoWrap = els.section.querySelectorAll('.common-video'); els.videos = els.section.querySelectorAll('.common-video__video'); els.videoControlCta = els.section.querySelectorAll('.common-video__control'); els.nextArrow = els.section.querySelector('.swiper-button-next'); els.prevArrow = els.section.querySelector('.swiper-button-prev'); els.progressWrap = els.section.querySelectorAll('.js-progress-wrap'); els.progressBar = els.section.querySelectorAll('.js-progress-bar'); els.navigationWrap = els.section.querySelector('.highlights-overview__navigation'); els.navigationInner = els.navigationWrap.querySelector('.highlights-overview__navigation-inner'); els.navigationBtn = els.navigationWrap.querySelectorAll('.highlights-overview__navigation-button-wrap'); els.infoItem = els.section.querySelectorAll('.highlights-overview__info-item'); els.featureCtas = els.section.querySelectorAll('a.common-cta-encased'); }; const setProperty = () => { status.navSlideWrapWidth = els.navigationInner.clientWidth; for (let i = 0; i < els.videos.length; i++) { els.videos[i].controlCta = els.videoControlCta[i]; els.videos[i].wrap = els.videoWrap[i]; els.videoControlCta[i].video = els.videos[i]; } for (let j = 0; j < els.navigationBtn.length; j++) { els.navigationBtn[j].index = j; els.navigationBtn[j].img = els.navigationBtn[j].querySelector('.highlights-overview__navigation-button-image img'); els.navigationBtn[j].img.parentWrap = els.navigationBtn[j]; els.navigationBtn[j].text = els.navigationBtn[j].querySelector('.highlights-overview__navigation-button-text'); els.navigationBtn[j].text.parentWrap = els.navigationBtn[j]; els.navigationBtn[j].addEventListener('keydown', eventList.onClickNavigation); } }; const objList = { setSwiper: () => { if (objs.swiper == null) { objs.swiper = new Swiper(els.swiperContainer, { navigation: { nextEl: els.nextArrow, prevEl: els.prevArrow, }, init: false, speed: 500, }); objs.swiper.currentIndex = 0; objs.swiper.on('init', function () { let notification = this.el.querySelector('.swiper-notification'); this.el.removeChild(notification); els.nextArrow.removeAttribute('aria-label'); els.prevArrow.removeAttribute('aria-label'); videoLoader.setResponsiveMedia([els.videos[0]]); els.videoWrap[0].classList.add('is-loaded'); videoLoader.setResponsiveMedia([els.videos[1]]); els.videoWrap[1].classList.add('is-loaded'); objList.setVideo(); eventList.setVideoController(); eventList.scroll(); eventList.animationEnd(); accessibility.slide(); accessibility.setTitle(); }); objs.swiper.on('slideChange', swiperEvent.slideChange); objs.swiper.init(); } }, setVideo: () => { for (let i = 0; i < els.slides.length; i++) { let isSlide = els.slides[i]; let isVideoWrap = isSlide.querySelector('.common-video'); let isVideo = isSlide.querySelector('.common-video__video'); if (isSlide.querySelector('video')) { objs[`video_${i}`] = ANIUTIL.videoHandler({ playType: 'scrollPlay', wrap: isVideoWrap, video: isVideo, controller: isVideo.controlCta, startPoint: resize.checkResolution().indexOf('mobile') > -1 ? 25 : 35, reversePoint: resize.checkResolution().indexOf('mobile') > -1 ? 75 : 80, playCallback: function () { if (!!!els.progressBar[i].style['animation-duration']) els.progressBar[i].style['animation-duration'] = `${isVideo.duration}s`; els.progressWrap[i].classList.remove(statusClass.progress.pause); if (isVideo.currentTime == 0) els.progressWrap[i].classList.remove(statusClass.progress.active); setTimeout(() => { els.progressWrap[i].classList.add(statusClass.progress.active); }, 20); accessibility.setTagging.pause(isVideo.controlCta); }, pauseCallback: function () { setTimeout(() => { els.progressWrap[i].classList.add(statusClass.progress.pause); }, 100); accessibility.setTagging.play(isVideo.controlCta); }, endCallback: function () { if (!isVideoWrap.classList.contains('is-completed')) isVideoWrap.classList.add('is-completed'); }, resetCallback: function () { setTimeout(() => { els.progressWrap[i].classList.remove(statusClass.progress.pause); els.progressWrap[i].classList.remove(statusClass.progress.active); }, 100); } }); } else { status.imageSlideIndex = i; els.progressBar[i].style['animation-duration'] = '3s'; } } }, setScene: () => { objs.scene = SCROLLER({ trackElement: els.overviewContents, useFixed: false }); }, setNavSwiper: () => { if (objs.navSwiper == null) { objs.navSwiper = new Swiper(els.navigationWrap, { init: false, slidesPerView: 'auto', }); objs.navSwiper.on('init', function () { let notification = this.el.querySelector('.swiper-notification'); this.el.removeChild(notification); }); objs.navSwiper.init(); } } }; const bindEvents = () => { objList.setSwiper(); window.addEventListener('scroll', eventList.scroll); els.navigationWrap.addEventListener('click', eventList.onClickNavigation); els.nextArrow.addEventListener('click', swiperEvent.onClickArrow); els.nextArrow.addEventListener('keydown', swiperEvent.onClickArrow); els.prevArrow.addEventListener('click', swiperEvent.onClickArrow); els.prevArrow.addEventListener('keydown', swiperEvent.onClickArrow); if (objs.swiper.slides.length > 4 || status.navSlideWrapWidth < 286) objList.setNavSwiper(); for (let i = 0; i < els.featureCtas.length; i++) { els.featureCtas[i].addEventListener('click', eventList.clickFeatureCta); } resize.add(eventList.onResize); }; const swiperEvent = { slideChange: () => { let activeIndex = objs.swiper.activeIndex; let currentIndex = objs.swiper.currentIndex; let slideLength = objs.swiper.slides.length; let loadIndex = activeIndex == slideLength - 1 ? 0 : activeIndex; let loadVideoLength = els.section.querySelectorAll(`.${statusClass.video.load}`).length; let allSlideloadComplete = els.videos.length == loadVideoLength; let nextIndex = (objs.swiper.activeIndex < objs.swiper.slides.length - 1) ? (objs.swiper.activeIndex + 1) : 0; if (!allSlideloadComplete && els.videos.length > loadIndex) { if (!els.videos[activeIndex].classList.contains(statusClass.video.complete)) { videoLoader.setResponsiveMedia([els.videos[activeIndex]]); els.videoWrap[activeIndex].classList.add(statusClass.video.load); } if (!els.videos[nextIndex].classList.contains(statusClass.video.complete)) { videoLoader.setResponsiveMedia([els.videos[nextIndex]]); els.videoWrap[nextIndex].classList.add(statusClass.video.load); } } if (currentIndex != activeIndex) { if ((currentIndex != status.imageSlideIndex)) { objs[`video_${currentIndex}`].video.pause(); objs[`video_${currentIndex}`].video.currentTime = 0; } objs[`video_${currentIndex}`].video.removeEventListener('canplay', objs[`video_${currentIndex}`].video.play); if(!!utils.isLowNetwork()) { els.progressWrap[currentIndex].classList.remove(statusClass.progress.active); els.progressWrap[activeIndex].classList.remove(statusClass.progress.pause); } else { if (activeIndex != status.imageSlideIndex) { els.progressWrap[currentIndex].classList.remove(statusClass.progress.active); if(!!utils.isLowNetwork()) return; if (objs[`video_${activeIndex}`] != undefined && objs[`video_${activeIndex}`].video.readyState >= 4) { objs[`video_${activeIndex}`].video.play(); } else { objs[`video_${activeIndex}`].video.addEventListener('canplay', function () { this.play(); }); } } else { els.progressWrap[currentIndex].classList.remove(statusClass.progress.active); els.progressWrap[activeIndex].classList.remove(statusClass.progress.pause); els.progressWrap[activeIndex].classList.add(statusClass.progress.active); } } if (!els.navigationBtn[activeIndex].classList.contains(statusClass.navigation)) { els.navigationBtn[currentIndex].classList.remove(statusClass.navigation); els.navigationBtn[activeIndex].classList.add(statusClass.navigation); accessibility.setTitle(); } if (!els.infoItem[activeIndex].classList.contains(statusClass.info.visible)) { els.infoItem[currentIndex].classList.remove(statusClass.info.visible); els.infoItem[activeIndex].classList.add(statusClass.info.visible); } if (!els.infoItem[activeIndex].classList.contains(statusClass.info.active)) { els.infoItem[currentIndex].classList.remove(statusClass.info.active); els.infoItem[activeIndex].classList.add(statusClass.info.active); } } if (objs.navSwiper != null) swiperEvent.setNavSwiperXvalue(activeIndex); accessibility.slide(); objs.swiper.currentIndex = activeIndex; }, onClickArrow: (e) => { status.arrowTimeout = null; status.arrowStyleTimeout = null; status.accessibilityTimeout = null; if ((e.type == 'keydown' && e.keyCode == 13) || e.type == 'click') { e.preventDefault(); if (objs.swiper.isBeginning && !objs.swiper.isEnd) { els.prevArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.nextArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.prevArrow.style.display = ''; }, 400); } else if (!objs.swiper.isBeginning && objs.swiper.isEnd) { els.nextArrow.style.setProperty('display', 'block', 'important'); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { els.prevArrow.focus(); }, 300); clearTimeout(status.arrowStyleTimeout); status.arrowStyleTimeout = setTimeout(function () { els.nextArrow.style.display = ''; }, 400); } else if(!objs.swiper.isBeginning && !objs.swiper.isEnd) { let target = e.target.classList.contains('swiper-button-next') ? els.nextArrow : els.prevArrow; let noTarget = target.classList.contains('swiper-button-next') ? els.prevArrow : els.nextArrow; objs.swiper.slides[objs.swiper.activeIndex].setAttribute('tabindex', -1); objs.swiper.slides[objs.swiper.activeIndex].setAttribute('aria-hidden', true); noTarget.setAttribute('tabindex', -1); noTarget.setAttribute('aria-hidden', true); clearTimeout(status.arrowTimeout); status.arrowTimeout = setTimeout(function () { target.focus(); }, 300); clearTimeout(status.accessibilityTimeout); status.accessibilityTimeout = setTimeout(function () { objs.swiper.slides[objs.swiper.activeIndex].removeAttribute('tabindex'); objs.swiper.slides[objs.swiper.activeIndex].removeAttribute('aria-hidden'); noTarget.removeAttribute('tabindex'); noTarget.removeAttribute('aria-hidden'); }, 400); } eventList.animationEndDestroy(); } }, setNavSwiperXvalue: (activeIndex) => { let xValue; if (activeIndex === 0 || activeIndex === 1) xValue = 0; if(activeIndex > 1) { if (status.navSlideWrapWidth < 286) { if (objs.navSwiper.slides.length > 4) { xValue = -100; } else if (objs.navSwiper.slides.length == 4) { xValue = -30; } } else { if (objs.navSwiper.slides.length > 4) { xValue = -62; } } } if(xValue != 0) { els.navigationWrap.classList.add('is-scroll-end'); } else { els.navigationWrap.classList.remove('is-scroll-end'); } els.navigationInner.style.transform = `translate3d(${xValue}px, 0px, 0px)`; }, destroy: () => { if(objs.navSwiper != null) { objs.navSwiper.destroy(true); objs.navSwiper = null; } } } const eventList = { setVideoController: () => { for (let i = 0; i < els.videoControlCta.length; i++) { els.videoControlCta[i].addEventListener('click', function () { let isVideo = this.video; if (isVideo.paused) { isVideo.play(); } else { isVideo.pause(); } }); } }, scroll: () => { objs.scene.trackAnimation(function () { objs[`video_${objs.swiper.activeIndex}`].scrollActive(this.progress); }); }, animationEnd: () => { eventFnc.animationEnd = {}; if(!!utils.isLowNetwork()) return; for (let i = 0; i < els.progressBar.length; i++) { eventFnc.animationEnd[i] = function () { if (objs.swiper.activeIndex == (objs.swiper.slides.length - 1)) { els.progressBar[i].removeEventListener('animationend', eventFnc.animationEnd[i]); } else { setTimeout(() => { objs.swiper.slideNext(500); els.progressBar[i].removeEventListener('animationend', eventFnc.animationEnd[i]); }, 800); } }; els.progressBar[i].addEventListener('animationend', eventFnc.animationEnd[i]); } }, animationEndDestroy: () => { for (let i = 0; i < els.progressBar.length; i++) { els.progressBar[i].removeEventListener('animationend', eventFnc.animationEnd[i]); } }, onClickNavigation: (e) => { if (e.target.classList.contains('swiper-wrapper') || (e.type == 'keydown' && e.keyCode != 13)) return; let oldTarget = els.navigationWrap.querySelector(`.${statusClass.navigation}`); let targetMatches = e.target.matches('.highlights-overview__navigation-button-image img') || e.target.matches('.highlights-overview__navigation-button-text'); if (targetMatches) { currentTarget = e.target.parentWrap; } else if (e.target.classList.contains('highlights-overview__navigation-button')) { currentTarget = e.target.parentElement; } if (!currentTarget.classList.contains(statusClass.navigation)) { oldTarget.classList.remove(statusClass.navigation); currentTarget.classList.add(statusClass.navigation); objs.swiper.slideTo(currentTarget.index, 500, false) } eventList.animationEndDestroy(); accessibility.setTitle(); }, clickFeatureCta: (e) => { e.preventDefault(); let target = e.target.matches('.common-cta-encased__text') ? e.target.parentElement : e.target; let sectionId = target.getAttribute('href'); let section = document.querySelector(sectionId); let sectionTop = section.getBoundingClientRect().top; let movePosition = (sectionTop + window.pageYOffset) - utils.getNavHeight(); let clickable = section.querySelectorAll('a, button'); let title = section.querySelector('h2.common-sub-headline'); if(title.classList.contains('common-display-mo')) { if(resize.checkResolution().indexOf('mobile') > -1) { title = section.querySelector('h2.common-sub-headline.common-display-mo'); } else { title = section.querySelector('h2.common-sub-headline.common-display-pc'); } } if (!!title) { let _focusOut = function () { title.removeAttribute('tabindex'); title.removeEventListener('focusout', _focusOut); }; title.addEventListener('focusout', _focusOut); title.setAttribute('tabindex', 0); title.focus(); } else { clickable[0].focus(); } window.scrollTo(0, movePosition); }, onResize: function () { status.navSlideWrapWidth = els.navigationInner.clientWidth; if(status.navSlideWrapWidth < 286 || (objs.swiper.slides.length > 4)) { objList.setNavSwiper(); } else { swiperEvent.destroy(); } } }; const accessibility = { slide: () => { for (let i = 0; i < objs.swiper.slides.length; i++) { if (i != objs.swiper.activeIndex) { utils.onAccessibility(objs.swiper.slides[i]); } else { utils.offAccessibility(objs.swiper.slides[i]); } } }, setTitle: () => { for (let i = 0; i < els.navigationBtn.length; i++) { let button = els.navigationBtn[i].querySelector('button'); button.removeAttribute('title'); if (i == objs.swiper.activeIndex) { if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) { button.setAttribute('title', LOCAL_VARI.selected); } else { button.setAttribute('title', 'Selected'); } } } }, setTagging: { play: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('pause', 'play')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('pause', 'play')); } }, pause: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('play', 'pause')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('play', 'pause')); } } } }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.quadTelPopup = (function () { const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; const common = window.flagship.highlights.common; let els = {}; let objs = {}; let status = {}; let currDevice = resize.checkResolution(); let prevDevice = null; const setPopupLazyLoader = { image: function () { objs.imageLoader = ANIUTIL.mediaLoader({ lazyClass: '.js-quad-telephoto-popup-img-src', responsiveClass: '.js-quad-telephoto-popup-res-img', preset: status.isGlobal ? '' : '?imbypass=true', innerScroll: { use: true, wrap: els.layerPopup, }, 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.popupBgLoader = ANIUTIL.mediaLoader({ type: 'bgImage', lazyClass: '.js-quad-telephoto-popup-bg-img', innerScroll: { use: true, wrap: els.layerPopup, }, loadOption: [{ resolution: 1920, attribute: '', bgOpts: '' }], visiblePoint: 1 }); }, video: function () { objs.videoLoader = ANIUTIL.mediaLoader({ type: 'video', lazyClass: '.js-quad-telephoto-popup-video-src', responsiveClass: '.js-quad-telephoto-popup-res-video', preset: status.isGlobal ? '' : '?imbypass=true', innerScroll: { use: true, wrap: els.layerPopup, }, 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'); } } }); } }; const init = function () { els.section = document.querySelector('.highlights-quad-telephoto'); els.layerPopup = document.querySelector('.highlights-quad-telephoto-popup'); if (!!els.layerPopup) { setElements(); setStatus(); objList.setPopup(); bindEvents(); } }; const setElements = function () { status.isGlobal = document.documentElement.classList.contains('global'); els.innerWrap = els.layerPopup.querySelector('.common-popup__inner-wrapper'); els.contents = document.querySelector('#contents'); els.openCta = els.section.querySelector('.js-layer-popup'); els.closeCtas = els.layerPopup.querySelectorAll('.common-popup__close-cta'); els.dimmed = els.layerPopup.querySelector('.common-popup__dimmed'); els.supClicker = els.layerPopup.querySelectorAll('a.click_sup'); els.scrollVideoWrap = els.layerPopup.querySelector('.common-video.js-scroll-video'); els.scrollVideoWrap.video = els.scrollVideoWrap.querySelector('.common-video__video'); els.scrollVideoWrap.controller = els.scrollVideoWrap.querySelector('.common-video__control'); els.scrollVideoWrap.controller.video = els.scrollVideoWrap.video; els.hashPopupOpener = null; }; const setStatus = function () { status.isHash = false; }; const bindEvents = function () { resize.add(handlerList.onResize); els.innerWrap.addEventListener('scroll', handlerList.scroll); els.scrollVideoWrap.controller.addEventListener('click', handlerList.videoCta); for (let i = 0; i < els.supClicker.length; i++) { els.supClicker[i].addEventListener('click', handlerList.onClickSup); } }; const objList = { setPopup: function () { utils.layerPopup({ layerPopup: els.layerPopup, layerPopupClass: '.highlights-quad-telephoto-popup', openerEvent: { element: els.openCta, }, closeCtas: [els.closeCtas[0], els.closeCtas[1]], dimmed: els.dimmed, moveTarget: document.documentElement, contents: els.contents, show: { start: function (target) { els.innerWrap.scrollTop = 0; els.layerPopup.classList.add('is-init'); target.openerCta.blur(); setPopupLazyLoader.image(); setPopupLazyLoader.video(); objList.setVideo(); objList.setScene(); if (`#${els.openCta.getAttribute('data-hash')}` == window.location.hash) { status.isHash = true; els.hashPopupOpener = els.openCta; } setTimeout(function () { handlerList.scroll(); }, 300); }, end: function () { if (utils.detector.isIosDevice) els.layerPopup.style.display = 'block'; els.layerPopup.classList.add('is-open'); } }, hide: { start: function (target) { target.openerCta.focus(); els.layerPopup.classList.remove('is-open'); }, end: function () { setTimeout(function () { els.layerPopup.classList.remove('is-init'); }, 300); els.scrollVideoWrap.video.pause(); els.scrollVideoWrap.video.currentTime = 0; if (status.isHash && els.hashPopupOpener) { els.hashPopupOpener.focus(); setTimeout(function () { els.hashPopupOpener.focus(); status.isHash = false; els.hashPopupOpener = null; }, 300); } } } }); }, setVideo: function () { objs.scrollVideo = ANIUTIL.videoHandler({ playType: 'scrollPlay', startPoint: (currDevice.indexOf('mobile') > -1) ? 15 : 30, reversePoint: (currDevice.indexOf('mobile') > -1) ? 40 : 55, wrap: els.scrollVideoWrap, video: els.scrollVideoWrap.video, controller: els.scrollVideoWrap.controller, resetCallback: function () { if (this.wrap.classList.contains('is-completed')) { this.wrap.classList.remove('is-completed'); } }, playCallback: function () { setTagging.pause(this.controller); }, pauseCallback: function () { setTagging.play(this.controller); }, endCallback: function () { if (!this.wrap.classList.contains('is-completed')) { this.wrap.classList.add('is-completed'); } } }); }, setScene: function () { objs.scene = SCROLLER({ trackElement: els.scrollVideoWrap.video, innerScroll: { use: true, wrap: els.layerPopup }, useFixed: false, resize: utils.detector.isTouchDevice ? false : true }); } }; const handlerList = { scroll: function () { objs.scene.trackAnimation(function () { objs.scrollVideo.scrollActive(this.progress); }); }, onResize: function (currRes) { currDevice = currRes; if(currDevice != prevDevice) { els.scrollVideoWrap.video.pause(); els.scrollVideoWrap.video.currentTime = 0; setTimeout(() => { objList.setVideo(); }, 300); prevDevice = currDevice; } }, videoCta: function (e) { if (e.target == e.currentTarget) { if (e.currentTarget.video.paused) { e.currentTarget.video.play(); } else { e.currentTarget.video.pause(); } } }, onClickSup: function (e) { e.preventDefault(); e.stopPropagation(); els.layerPopup.hide(); let targetIndex = parseFloat(e.target.innerText), disclaimer = document.querySelectorAll('#desc-section li')[targetIndex - 1], disclaimerText = disclaimer.innerText, activeBlock = '' + disclaimerText + ''; setTimeout(() => { disclaimer.innerHTML = activeBlock; disclaimer.querySelector('a').focus(); }, 500); const 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); } }; const setTagging = { play: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('pause', 'play')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('pause', 'play')); } }, pause: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('play', 'pause')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('play', 'pause')); } } }; return { init: init, } })(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.quadTelephoto = (function () { let els = {}; let objs = {}; const utils = window.flagship.common.utils; const resize = window.flagship.common.resize; let activeClass = 'is-active'; const init = function () { els.section = document.querySelector('.highlights-quad-telephoto'); if (!!els.section) { setElements(); bindEvents(); } }; const setElements = function () { els.swiperContainer = els.section.querySelector('.highlights-quad-telephoto__zoom-image-wrap'); els.zoomCtaList = els.section.querySelector('.highlights-quad-telephoto__zoom-button-list'); els.zoomCta = els.section.querySelectorAll('.highlights-quad-telephoto__zoom-button'); els.tooltip = els.section.querySelector('.highlights-quad-telephoto__zoom-tooltip'); }; const objList = { setScene: function () { objs.scene = SCROLLER({ trackElement: els.section, useFixed: false }); }, setSwiper: function () { if (objs.swiper == null) { objs.swiper = new Swiper(els.swiperContainer, { init: false, }); objs.swiper.on('init', swiperEvents.init); objs.swiper.on('slideChange', swiperEvents.slideChange); objs.swiper.init(); } } }; const bindEvents = function () { objList.setSwiper(); els.zoomCtaList.addEventListener('click', handlerList.onClickZoomCta); els.section.addEventListener('keydown', handlerList.onClickZoomCta); objList.setScene(); window.addEventListener('scroll', handlerList.scroll); handlerList.scroll(); }; const handlerList = { scroll: function () { objs.scene.trackAnimation(function () { let startProgress = resize.checkResolution() == 'desktop' ? 50 : 35; if (this.progress > startProgress && this.progress < 70) { let speed = 1000; objs.swiper.slideTo(1, 800); setTimeout(() => { objs.swiper.slideTo(2, 800); }, speed); setTimeout(() => { objs.swiper.slideTo(3, 800); }, speed * 2); setTimeout(() => { objs.swiper.slideTo(4, 800); }, speed * 3); setTimeout(() => { objs.swiper.slideTo(5, 800); }, speed * 4); setTimeout(() => { objs.swiper.slideTo(1, false); }, 5500); setTimeout(() => { TweenMax.to(els.tooltip, 0.4, {opacity: 1}); }, 6000); window.removeEventListener('scroll', handlerList.scroll); } }); }, onClickZoomCta: function (e) { if(e.type == 'keydown' && e.keyCode != 13) return; let isZoomCta = e.target.classList.contains('highlights-quad-telephoto__zoom-button-text') ? e.target.parentElement : e.target; let isIndex = isZoomCta.getAttribute('data-index'); if (!els.tooltip.classList.contains('is-hide')) { TweenMax.to(els.tooltip, 0.4, {opacity: 0, ease: 'linear', onComplete: function () { els.tooltip.style.display = 'none'; els.tooltip.setAttribute('aria-hidden', 'true'); }}); els.tooltip.classList.add('is-hide'); } if (!isZoomCta.parentElement.classList.contains(activeClass)) { isZoomCta.parentElement.classList.add(activeClass); objs.swiper.slideTo(isIndex, 800); accessibility.setTitle(isZoomCta); accessibility.slide(); } } }; const swiperEvents = { init: function () { let notification = this.el.querySelector('.swiper-notification'); this.el.removeChild(notification); accessibility.setTitle(els.zoomCta[objs.swiper.activeIndex]); accessibility.slide(); }, slideChange: function () { for (let i = 0; i < els.zoomCta.length; i++) { els.zoomCta[i].removeAttribute('title'); els.zoomCta[i].parentElement.classList.remove(activeClass); } els.zoomCta[objs.swiper.activeIndex].parentElement.classList.add(activeClass); accessibility.setTitle(els.zoomCta[objs.swiper.activeIndex]); accessibility.slide(); } }; const accessibility = { slide: function () { for (let i = 0; i < objs.swiper.slides.length; i++) { if (i != objs.swiper.activeIndex) { utils.onAccessibility(objs.swiper.slides[i]); } else { utils.offAccessibility(objs.swiper.slides[i]); } } }, setTitle: function (cta) { if (typeof LOCAL_VARI != 'undefined' && !!LOCAL_VARI) { cta.setAttribute('title', LOCAL_VARI.selected); } else { cta.setAttribute('title', 'selected'); } }, }; return { init: init } })(); })(); (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.suggestionAiPopup = (function () { const utils = window.flagship.common.utils; const common = window.flagship.highlights.common; let els = {}; let objs = {}; let status = {}; const setPopupLazyLoader = { image: function () { objs.imageLoader = ANIUTIL.mediaLoader({ lazyClass: '.js-suggestion-ai-popup-img-src', responsiveClass: '.js-suggestion-ai-popup-res-img', preset: status.isGlobal ? '' : '?imbypass=true', innerScroll: { use: true, wrap: els.layerPopup, }, 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.popupBgLoader = ANIUTIL.mediaLoader({ type: 'bgImage', lazyClass: '.js-suggestion-ai-popup-bg-img', innerScroll: { use: true, wrap: els.layerPopup, }, loadOption: [{ resolution: 1920, attribute: '', bgOpts: '' }], visiblePoint: 1 }); }, video: function () { objs.videoLoader = ANIUTIL.mediaLoader({ type: 'video', lazyClass: '.js-suggestion-ai-popup-video-src', responsiveClass: '.js-suggestion-ai-popup-res-video', preset: status.isGlobal ? '' : '?imbypass=true', innerScroll: { use: true, wrap: els.layerPopup, }, 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'); } } }); } }; const init = function () { els.section = document.querySelector('.highlights-suggestion-ai'); els.layerPopup = document.querySelector('.highlights-suggestion-ai-popup'); if (!!els.layerPopup) { setElements(); setStatus(); objList.setPopup(); bindEvents(); } }; const setElements = function () { status.isGlobal = document.documentElement.classList.contains('global'); els.contents = document.querySelector('#contents'); els.openCta = els.section.querySelector('.js-layer-popup'); els.innerWrap = els.layerPopup.querySelector('.common-popup__inner-wrapper'); els.closeCtas = els.layerPopup.querySelectorAll('.common-popup__close-cta'); els.dimmed = els.layerPopup.querySelector('.common-popup__dimmed'); els.supClicker = els.layerPopup.querySelectorAll('a.click_sup'); els.videoWrap = els.layerPopup.querySelector('.common-video'); els.videoWrap.video = els.videoWrap.querySelector('.common-video__video'); els.videoWrap.controller = els.videoWrap.querySelector('.common-video__control'); els.videoWrap.controller.video = els.videoWrap.video; els.hashPopupOpener = null; }; const setStatus = function () { status.isHash = false; }; const bindEvents = function () { els.videoWrap.controller.addEventListener('click', handlerList.videoCta); for (let i = 0; i < els.supClicker.length; i++) { els.supClicker[i].addEventListener('click', handlerList.onClickSup); } }; const objList = { setPopup: function () { utils.layerPopup({ layerPopup: els.layerPopup, layerPopupClass: '.highlights-suggestion-ai-popup', openerEvent: { element: els.openCta, }, closeCtas: [els.closeCtas[0], els.closeCtas[1]], dimmed: els.dimmed, moveTarget: document.documentElement, contents: els.contents, show: { start: function (target) { els.innerWrap.scrollTop = 0; els.layerPopup.classList.add('is-init'); target.openerCta.blur(); setPopupLazyLoader.image(); setPopupLazyLoader.video(); objList.setVideo(); if (`#${els.openCta.getAttribute('data-hash')}` == window.location.hash) { status.isHash = true; els.hashPopupOpener = els.openCta; } }, end: function () { if (utils.detector.isIosDevice) els.layerPopup.style.display = 'block'; els.layerPopup.classList.add('is-open'); } }, hide: { start: function (target) { target.openerCta.focus(); els.layerPopup.classList.remove('is-open'); }, end: function () { setTimeout(function () { els.layerPopup.classList.remove('is-init'); }, 300); els.videoWrap.video.pause(); els.videoWrap.video.currentTime = 0; if (status.isHash && els.hashPopupOpener) { els.hashPopupOpener.focus(); setTimeout(function () { els.hashPopupOpener.focus(); status.isHash = false; els.hashPopupOpener = null; }, 300); } } } }); }, setVideo: function () { objs.video = ANIUTIL.videoHandler({ wrap: els.videoWrap, video: els.videoWrap.video, controller: els.videoWrap.controller, resetCallback: function () { if (this.wrap.classList.contains('is-completed')) { this.wrap.classList.remove('is-completed'); } }, playCallback: function () { setTagging.pause(this.controller); }, pauseCallback: function () { setTagging.play(this.controller); }, endCallback: function () { if (!this.wrap.classList.contains('is-completed')) { this.wrap.classList.add('is-completed'); } } }); } }; const handlerList = { videoCta: function (e) { if (e.target == e.currentTarget) { if (e.currentTarget.video.paused) { e.currentTarget.video.play(); } else { e.currentTarget.video.pause(); } } }, onClickSup: function (e) { e.preventDefault(); e.stopPropagation(); els.layerPopup.hide(); let targetIndex = parseFloat(e.target.innerText), disclaimer = document.querySelectorAll('#desc-section li')[targetIndex - 1], disclaimerText = disclaimer.innerText, activeBlock = '' + disclaimerText + ''; setTimeout(() => { disclaimer.innerHTML = activeBlock; disclaimer.querySelector('a').focus(); }, 500); const 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); } }; const setTagging = { play: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('pause', 'play')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('pause', 'play')); } }, pause: function (targetController) { if (targetController.hasAttribute('an-tr')) { let dataOmni = targetController.getAttribute('an-tr').toLowerCase(); targetController.setAttribute('an-tr', dataOmni.replace('play', 'pause')); } if (targetController.hasAttribute('an-la')) { let gaLa = targetController.getAttribute('an-la').toLowerCase(); targetController.setAttribute('an-la', gaLa.replace('play', 'pause')); } } }; return { init: init, } })(); })(); ; (function () { window.flagship = window.flagship || {}; window.flagship.highlights = window.flagship.highlights || {}; window.flagship.highlights.viewer = (function () { const utils = window.flagship.common.utils; const resize =window.flagship.common.resize; let els = {}, status = {}, currDevice = resize.checkResolution(); const init = function () { els.viewerBtn = document.querySelector('.viewer-btn'); if(!!els.viewerBtn) { setElements(); setStatus(); setPopup(); bindEvents(); } }; const setElements = function(){ els.wrapEl = document.querySelector('#wrap'); els.contents = document.querySelector('#contents'); // popup els.popup = document.querySelector('.highlights-viewer'); els.popupContents = els.popup.querySelector('.highlights-viewer__contents'); els.popupInner = els.popup.querySelector('.highlights-viewer__inner'); els.popupWrap = els.popup.querySelector('.highlights-viewer__wrap'); els.closeCta = els.popup.querySelector('.highlights-viewer__close-cta'); els.viewerWrap = els.popup.querySelector('.highlights-viewer__contents-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 = ''; }; const 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.isHash = false; }; const 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); }; const onLoadHandler = function () { setViewerWrap.innerWrapHeight(); setViewerWrap.layerScroll(); }; const onResizeHandler = function (currRes) { currDevice = currRes; if (utils.detector.isTouchDevice && !utils.detector.isIosDevice) setViewerWrap.innerWrapHeight(); setViewerWrap.layerScroll(); }; const 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); } }; const setPopup = function(){ utils.layerPopup({ layerPopup: els.popup, layerPopupClass: '.highlights-viewer', openerEvent: { element: els.viewerBtn, }, closeCtas: [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 () { els.popup.classList.remove('is-open'); }, end: function () { setTimeout(function () { els.popup.classList.remove('is-init'); }, 300); viewerEvents.hide(); } } }); }; const viewerEvents = { show: function (viewerOpener) { if (viewerOpener.classList.contains('viewer-btn')) { status.isHash = false; els.viewerOpener = viewerOpener; } else { status.isHash = true; els.viewerOpener = els.viewerBtn; } 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 = 'block'; 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); } }, 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); } } }; const 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')) { let 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) { const 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'); } } }; const 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), '*'); } }; const getViewerUrl = function () { let viewerUrl = status.viewerBaseUrl; // model_name viewerUrl += 'model_name=' + els.viewerModel; 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 () { let els = {}; const utils = window.flagship.common.utils; const init = function () { els.layerPopup = document.querySelector('.common-youtube-popup'); if(!!els.layerPopup) { setElements(); setPopup(); } }; const setElements = function () { els.contents = document.querySelector('#contents'); els.openCtas = document.querySelectorAll('.js-youtube-popup'); els.closeCta = document.querySelector('.common-youtube-popup__close-cta'); els.ytIframe = els.layerPopup.querySelector('.common-youtube-popup__iframe > iframe'); els.ytDesc = els.layerPopup.querySelector('.youtube-player__desc'); els.dimmed = els.layerPopup.querySelector('.common-youtube-popup__close-area'); }; const setPopup = function () { for (let i = 0; i < els.openCtas.length; i++) { utils.layerPopup({ layerPopup: els.layerPopup, layerPopupClass: '.common-youtube-popup', openerEvent: { element: els.openCtas[i], }, closeCtas: [els.closeCta], dimmed: els.dimmed, moveTarget: document.documentElement, contents: els.contents, show: { start: function () { els.layerPopup.classList.add('is-yt-open'); }, end: function (target) { eventList.setYoutube(target); } }, hide: { start: function () { els.layerPopup.classList.remove('is-yt-open'); }, end: function (target) { eventList.clearYoutube(); } } }); } }; const eventList = { setYoutube: function (target) { let 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 = ''; } }; return { init: init, } })(); })(); (function () { window.flagship.common.resize.bindEvent(); var initComponents = function () { flagship.highlights.accordion.init(); flagship.highlights.scrollVideo.init(); flagship.highlights.clickToVideo.init(); flagship.highlights.overview.init(); flagship.highlights.color.init(); flagship.highlights.viewer.init(); flagship.highlights.cameraAi.init(); flagship.highlights.camera.init(); flagship.highlights.lowLight.init(); flagship.highlights.lowLightPopup.init(); flagship.highlights.quadTelephoto.init(); flagship.highlights.quadTelPopup.init(); flagship.highlights.suggestionAiPopup.init(); flagship.highlights.gaming.init(); flagship.highlights.display.init(); flagship.highlights.experiences.init(); flagship.highlights.faq.init(); flagship.highlights.ytPopup.init(); }; initComponents(); })(); });

  • Samsung Galaxy S24 Ultra | Samsung US (2024)

    References

    Top Articles
    Latest Posts
    Article information

    Author: Fr. Dewey Fisher

    Last Updated:

    Views: 6032

    Rating: 4.1 / 5 (42 voted)

    Reviews: 89% of readers found this page helpful

    Author information

    Name: Fr. Dewey Fisher

    Birthday: 1993-03-26

    Address: 917 Hyun Views, Rogahnmouth, KY 91013-8827

    Phone: +5938540192553

    Job: Administration Developer

    Hobby: Embroidery, Horseback riding, Juggling, Urban exploration, Skiing, Cycling, Handball

    Introduction: My name is Fr. Dewey Fisher, I am a powerful, open, faithful, combative, spotless, faithful, fair person who loves writing and wants to share my knowledge and understanding with you.