1"use strict";(self.webpackChunktwilio_foundation_frontend=self.webpackChunktwilio_foundation_frontend||[]).push([[988],{9787:function(t,e,o){o.d(e,{B:function(){return u},HN:function(){return i},gz:function(){return a},kv:function(){return h},pC:function(){return d},qe:function(){return y},rx:function(){return l},sA:function(){return s},zP:function(){return c}});var r=o(67629),n=o(77e3);const i=(t,e)=>{const o=t.querySelectorAll(n.X.TIMELINE_BUTTON),r=t.querySelector(n.X.TIMELINE_BG),i=t.querySelector(n.X.SLIDER_CONTAINER);o.forEach((t,o)=>{const n=o===e;if(t.setAttribute("data-active",n.toString()),t.setAttribute("aria-current",n?"true":"false"),n&&r&&i){const e=i.getBoundingClientRect(),o=t.getBoundingClientRect(),n=o.left+o.width/2-e.left;r.style.setProperty("--timeline-bg-center",`${n}px`)}})},s=(t,e,o)=>{const i="true"===t.dataset.introEnabled;t.querySelectorAll(n.X.TIMELINE_BUTTON).forEach((t,n)=>{o?t.addEventListener("click",()=>((t,e,o,n)=>{if(!o)return;const i=n?2+e:e,s=1/i,a=n?(n?2/i:0)+s*(t+.5):s*(t+.5),c=o.start,l=c+(o.end-c)*a;r.os.to(window,{scrollTo:{y:l},duration:0,ease:"power2.inOut"})})(n,e.slides.length,o,i)):t.addEventListener("click",()=>e.slideTo(n))})},a=t=>{const e=t.querySelector(".platform-story__skip-holder"),o=Array.from(t.querySelectorAll(".swiper-slide")),r=o[o.length-1],n=e?.parentElement??null;if(!e||!r||!n)return()=>{};const i=parseFloat(getComputedStyle(document.documentElement).fontSize),s=parseFloat(getComputedStyle(t).getPropertyValue("--nav-bar-mobile"))*i;let a=!1;const c=()=>{a=!1;const t=n.getBoundingClientRect(),o=r.getBoundingClientRect();t.bottom<=0||o.top>s?"true"===e.dataset.released&&(e.style.top="",e.dataset.released="false"):(e.style.top=o.top-t.top+"px",e.dataset.released="true")},l=()=>{a||(requestAnimationFrame(c),a=!0)};return window.addEventListener("scroll",l,{passive:!0}),c(),()=>{window.removeEventListener("scroll",l),e.style.top="",delete e.dataset.released}},c=(t,e)=>{const o=t.querySelectorAll("[data-skip-experience]");0!==o.length&&o.forEach(o=>{o.addEventListener("click",()=>{const o=Boolean(e?.()),n=t.parentElement;let i=(o&&n?.classList.contains("pin-spacer")?n:t).getBoundingClientRect().bottom+window.scrollY;const s=document.querySelector(".global-header");s&&(i-=s.offsetHeight),r.os.to(window,{scrollTo:{y:i},duration:.6,ease:"power2.inOut"})})})},l=(t,e)=>{const o=t.querySelectorAll(n.X.SWIPER_SLIDE)[e];if(!o)return null;const r=o.querySelector(n.X.STORY_ITEM_CONTENT),i=o.querySelector(n.X.STORY_ITEM_VISUAL);if(!r||!i)return null;const s=o.querySelector(n.X.PLATFORM_STORY_ITEM);return{content:r,visual:i,isOneColumn:s?.classList.contains("platform-story-item--oneColumn")??!1}},u=(t,e)=>t>e;function p(t){return"function"==typeof t.play}function d(t){t.querySelectorAll("lottie-player").forEach(t=>{t.removeAttribute("autoplay")})}function y(t){t.querySelectorAll("lottie-player").forEach(t=>{p(t)&&t.play()})}function h(t){t.querySelectorAll("lottie-player").forEach(t=>{p(t)&&t.pause()})}},50988:function(t,e,o){o.r(e),o.d(e,{registerPlatformStoryCepV2Component:function(){return _}});var r,n=o(67629),i=o(35354),s=o(86734),a=o(9787);function c(t){return"slide"===t.getAttribute("data-section")}function l(t){return t.querySelector(r.SECTION_CONTENT_SELECTOR)??t}function u(t){return"function"==typeof t.play}function p(t,e,o){o||t.forEach((t,o)=>{const n=t.querySelector(r.LOTTIE_PLAYER_SELECTOR);n&&u(n)&&(o===e?n.play():n.pause())})}function d(t){return 2*t+3*(t-1)}function y(t){const e=d(t);return Array.from({length:t},(t,o)=>(5*o+1)/e)}!function(t){t.COMPONENT_SELECTOR='[data-component="platform-story-cep-v2-component"]',t.VIEWPORT_SELECTOR=".platform-story-cep-v2-component__viewport",t.SECTION_SELECTOR=".platform-story-cep-v2-component__section",t.INDUSTRY_GROUP_SELECTOR=".platform-story-cep-v2-component__industry-group",t.PILL_SELECTOR=".platform-story-cep-v2-component__industry-pill",t.PROGRESS_SELECTOR=".platform-story-cep-v2-component__progress",t.PROGRESS_FILL_SELECTOR=".platform-story-cep-v2-component__progress-fill",t.SECTION_BACKGROUND_SELECTOR=".platform-story-cep-v2-component__section-background",t.SECTION_CONTENT_SELECTOR=".platform-story-cep-v2-component__section-content",t.LOTTIE_PLAYER_SELECTOR="lottie-player",t.SLIDE_TITLE_SELECTOR=".platform-story-cep-v2-component__slide-title",t.OUTRO_PILL_SELECTOR="[data-outro-industry-index]"}(r||(r={})),n.Ay.registerPlugin(s.A,i.A);const h="is-active",E="button-secondary",m="button-primary",T="power1.inOut",f="(min-width: 62em)";class S{component;viewport;introSection;progressBar=null;pills=[];industryGroups=[];matchMediaInstance=null;scrollTriggerInstance=null;activeIndustryIndex=-1;activeSectionCount=0;reducedMotion=!1;outroTransitionTween=null;constructor(t){this.component=t;const e=t.querySelector(r.VIEWPORT_SELECTOR),o=t.querySelector('[data-section="intro"]'),n=Array.from(t.querySelectorAll(r.INDUSTRY_GROUP_SELECTOR));e&&o&&0!==n.length&&(this.viewport=e,this.introSection=o,this.progressBar=t.querySelector(r.PROGRESS_SELECTOR),this.pills=Array.from(t.querySelectorAll(r.PILL_SELECTOR)).filter(t=>!t.hasAttribute("data-outro-industry-index")),this.industryGroups=n,this.init())}init(){this.component.querySelectorAll(r.LOTTIE_PLAYER_SELECTOR).forEac
1h(t=>{t.removeAttribute("autoplay"),u(t)&&t.stop()}),this.component.querySelectorAll(r.SLIDE_TITLE_SELECTOR).forEach(t=>{const e=(t.textContent??"").split(/\s+/);if(e.length<2)return;const o=document.createTextNode(`${e[0]} `),r=document.createElement("span");r.className="platform-story-cep-v2-component__slide-title-accent",r.textContent=e[1]??"";const n=e.length>2?document.createTextNode(` ${e.slice(2).join(" ")}`):null;t.textContent="",t.appendChild(o),t.appendChild(r),n&&t.appendChild(n)}),this.component.querySelectorAll(".lottie-player").forEach(t=>{t.classList.add("lottie-player--disable-hover")}),this.progressBar&&n.Ay.set(this.progressBar,{opacity:0}),(0,a.zP)(this.viewport,()=>this.scrollTriggerInstance??void 0),n.Ay.matchMedia().add("(max-width: 61.999em)",()=>{const t=this.setupMobileSkipRelease();return()=>t()});const t=window.matchMedia("(prefers-reduced-motion: reduce)");this.reducedMotion=t.matches,t.addEventListener("change",t=>{this.reducedMotion=t.matches}),this.pills.forEach((t,e)=>{t.addEventListener("click",()=>{this.killOutroTransition(),this.selectPill(e),this.activateIndustry(e),this.scrollToFirstSlide()})});const e=this.pills[0];e&&(e.classList.remove(E),e.classList.add(m),e.setAttribute("aria-pressed","true")),requestAnimationFrame(()=>this.activateIndustry(0)),this.component.addEventListener("click",t=>{const e=t.target.closest(r.OUTRO_PILL_SELECTOR);if(!e)return;const o=Number(e.dataset.outroIndustryIndex);Number.isNaN(o)||o<0||o>=this.industryGroups.length||this.transitionToIndustry(o)})}getActiveSections(t){const e=this.industryGroups[t];if(!e)return[];const o=Array.from(e.querySelectorAll(r.SECTION_SELECTOR));return[this.introSection,...o]}teardown(){if(this.matchMediaInstance&&(this.matchMediaInstance.revert(),this.matchMediaInstance=null),this.scrollTriggerInstance=null,this.activeIndustryIndex>=0){const t=this.industryGroups[this.activeIndustryIndex];t&&(t.querySelectorAll(r.LOTTIE_PLAYER_SELECTOR).forEach(t=>{u(t)&&t.stop(),t.removeAttribute("src")}),t.setAttribute("aria-hidden","true"))}const t=this.component.querySelector(r.PROGRESS_FILL_SELECTOR);t&&(t.style.height="0")}activateIndustry(t){if(t===this.activeIndustryIndex)return;this.teardown(),this.activeIndustryIndex=t;const e=this.industryGroups[t];if(!e)return;e.setAttribute("aria-hidden","false"),e.querySelectorAll(r.LOTTIE_PLAYER_SELECTOR).forEach(t=>{if(!u(t))return;const e=t.getAttribute("data-src")||t.getAttribute("src");e&&t.load(e)});const o=this.getActiveSections(t),i=o.length;i<=1||(this.matchMediaInstance=n.Ay.matchMedia(),this.activeSectionCount=i,this.matchMediaInstance.add(f,()=>{let t=0;o.forEach((t,e)=>{t.classList.toggle(h,0===e),t.setAttribute("aria-hidden",String(0!==e))});const e=e=>{const{activeIndex:n,transitionPair:s}=function(t,e){if(e<=1||t<=0)return{activeIndex:0,transitionPair:-1};if(t>=1)return{activeIndex:e-1,transitionPair:-1};const o=t*d(e);for(let t=0;t<e-1;t++){const e=2*(t+1)+3*t;if(o<e)return{activeIndex:t,transitionPair:-1};if(o<e+3)return{activeIndex:t,transitionPair:t}}return{activeIndex:e-1,transitionPair:-1}}(e.progress,i);let a=!1;o.forEach((t,e)=>{const o=s>=0?e===s||e===s+1:e===n;t.classList.toggle(h,o),t.setAttribute("aria-hidden",String(!o)),o&&"intro"!==t.getAttribute("data-section")&&(a=!0)});const l=a?"true":"false";this.component.dataset.skipVisible!==l&&(this.component.dataset.skipVisible=l),n!==t&&(t=n,function(t,e,o){const n=e.filter(c).length;if(0===n)return;const i=o-1,s=i<0?0:i>=n?1:(i+1)/n,a=t.querySelector(r.PROGRESS_FILL_SELECTOR);a&&(a.style.height=100*s+"%")}(this.component,o,n),p(o,n,this.reducedMotion))};let a;if(this.reducedMotion)this.progressBar&&n.Ay.set(this.progressBar,{opacity:1,y:"0%"}),a=s.A.create({trigger:this.component,pin:this.viewport,start:"center center",end:`+=${1e3*i}vh`,onUpdate:e,onEnter:()=>p(o,0,this.reducedMotion),onLeaveBack:()=>p(o,-1,this.reducedMotion)});else{const t=function(t,e){const o=n.Ay.timeline(),i=1.5;t.forEach((t,e)=>{const o=0===e,i=c(t),s=t.querySelector(r.SECTION_BACKGROUND_SELECTOR),a=l(t);i?(n.Ay.set(t,{opacity:1}),n.Ay.set(a,{opacity:0,y:o?"0%":"100%"}),s&&n.Ay.set(s,{opacity:o?1:0})):(n.Ay.set(t,{opacity:o?1:0}),n.Ay.set(a,{y:"0%"}),s&&n.Ay.set(s,{opacity:o?1:0}))}),e&&n.Ay.set(e,{opacity:0,y:"30%"});let s=0;for(let n=0;n<t.length-1;n++){const a=t[n],u=t[n+1],p=a.querySelector(r.SECTION_BACKGROUND_SELECTOR),d=u.querySelector(r.SECTION_BACKGROUND_SELECTOR),y=c(a)&&c(u),h=l(a),E=l(u),m=3;s+=2;const T=s+i;if(y){const t=.4*m,e=s+t,r=m-t;o.to(h,{opacity:0,y:"-60%",duration:t,ease:"power2.in"}
1,s),o.fromTo(E,{opacity:0,y:"60%"},{opacity:1,y:"0%",duration:r,ease:"power2.out"},e),d&&o.to(d,{opacity:1,duration:m,ease:"power1.inOut"},s),p&&o.to(p,{opacity:0,duration:m,ease:"power1.inOut"},s)}else{const t=c(a),e=c(u);t?(o.to(h,{opacity:0,y:"-100%",duration:i,ease:"power2.in"},s),o.set(a,{opacity:0},s+i)):(o.to(h,{opacity:0,y:"-30%",duration:i,ease:"power2.in"},s),o.to(a,{opacity:0,duration:i,ease:"power1.in"},s)),p&&o.to(p,{opacity:0,duration:m,ease:"power1.inOut"},s),d&&o.to(d,{opacity:1,duration:m,ease:"power1.inOut"},s),e?o.fromTo(E,{opacity:0,y:"100%"},{opacity:1,y:"0%",duration:i,ease:"power2.out"},T):(o.to(u,{opacity:1,duration:i,ease:"power2.out"},T),o.fromTo(E,{opacity:0,y:"30%"},{opacity:1,y:"0%",duration:i,ease:"power2.out"},T))}if(e){const t=!c(a)&&c(u),r=c(a)&&!c(u);t&&o.fromTo(e,{opacity:0,y:"30%"},{opacity:1,y:"0%",duration:i,ease:"power2.out"},T),r&&o.to(e,{opacity:0,y:"-30%",duration:i,ease:"power2.in"},s)}s+=3}return o.to({},{duration:2},s),o}(o,this.progressBar),u=y(i);a=s.A.create({trigger:this.component,pin:this.viewport,start:"center center",end:`+=${1e3*i}vh`,animation:t,scrub:.5,snap:{snapTo:u,delay:.25,duration:{min:.8,max:1.5},ease:"power2.inOut"},onUpdate:e,onEnter:()=>p(o,0,this.reducedMotion),onLeaveBack:()=>p(o,-1,this.reducedMotion)}),s.A.refresh()}return this.scrollTriggerInstance=a,()=>{a.kill(),this.scrollTriggerInstance=null,o.forEach((t,e)=>{0===e?t.classList.add(h):t.classList.remove(h),t.removeAttribute("aria-hidden")})}}))}scrollToFirstSlide(){window.matchMedia(f).matches?this.scrollToFirstSlideDesktop():this.scrollToFirstSlideMobile()}scrollToFirstSlideDesktop(){this.component.offsetHeight,s.A.refresh();const t=this.scrollTriggerInstance;if(!t)return;const e=y(this.activeSectionCount),o=e[1]??0,r=t.start+o*(t.end-t.start);t.vars.snap=void 0,t.update(),n.Ay.to(window,{scrollTo:{y:r,autoKill:!1},duration:1.8,ease:T,onComplete:()=>{t.vars.snap={snapTo:e,delay:.25,duration:{min:.8,max:1.5},ease:"power2.inOut"},t.update()}})}scrollToFirstSlideMobile(){const t=this.industryGroups[this.activeIndustryIndex];if(!t)return;const e=t.querySelector(r.SECTION_SELECTOR);e&&n.Ay.to(window,{scrollTo:{y:e,autoKill:!1},duration:1.8,ease:T})}selectPill(t){this.pills.forEach(t=>{t.classList.remove(m),t.classList.add(E),t.setAttribute("aria-pressed","false")});const e=this.pills[t];e&&(e.classList.remove(E),e.classList.add(m),e.setAttribute("aria-pressed","true"))}killOutroTransition(){this.outroTransitionTween&&(this.outroTransitionTween.kill(),this.outroTransitionTween=null,this.viewport.style.pointerEvents="",n.Ay.set(this.viewport,{clearProps:"opacity,y"}))}transitionToIndustry(t){const e=this.viewport;if(this.killOutroTransition(),this.reducedMotion)return this.selectPill(t),this.activateIndustry(t),window.matchMedia(f).matches?this.jumpToFirstSlideDesktop():this.jumpToFirstSlideMobile(),void p(this.getActiveSections(t),1,this.reducedMotion);e.style.pointerEvents="none",this.outroTransitionTween=n.Ay.to(e,{opacity:0,y:"-4rem",duration:.5,ease:"none",onComplete:()=>{this.selectPill(t),this.activateIndustry(t),window.matchMedia(f).matches?this.jumpToFirstSlideDesktop():this.jumpToFirstSlideMobile(),p(this.getActiveSections(t),1,this.reducedMotion),this.outroTransitionTween=n.Ay.fromTo(e,{opacity:0,y:"4rem"},{opacity:1,y:0,duration:.6,ease:"power1.out",onComplete:()=>{n.Ay.set(e,{clearProps:"opacity,y"}),e.style.pointerEvents="",this.outroTransitionTween=null}})}})}jumpToFirstSlideDesktop(){this.component.offsetHeight,s.A.refresh();const t=this.scrollTriggerInstance;if(!t)return;const e=y(this.activeSectionCount)[1]??0,o=t.start+e*(t.end-t.start);window.scrollTo(0,o)}jumpToFirstSlideMobile(){const t=this.component.getBoundingClientRect().top+window.scrollY,e=this.introSection.scrollHeight;window.scrollTo(0,t+e)}setupMobileSkipRelease(){const t=this.component.querySelector(".platform-story-cep-v2-component__skip-holder");if(!t)return()=>{};const e=parseFloat(getComputedStyle(document.documentElement).fontSize),o=parseFloat(getComputedStyle(this.component).getPropertyValue("--nav-bar-mobile"))*e,r=t=>{const e=t?"true":"false";
1this.component.dataset.skipVisible!==e&&(this.component.dataset.skipVisible=e)};let n=!1;const i=()=>{n=!1;const e=this.viewport.getBoundingClientRect();if(e.bottom<=0)return"true"===t.dataset.released&&(t.style.top="",t.dataset.released="false"),void r(!1);const i=this.component.querySelector('.platform-story-cep-v2-component__industry-group[aria-hidden="false"]'),s=i?.querySelector(".platform-story-cep-v2-component__section--outro");if(!s)return"true"===t.dataset.released&&(t.style.top="",t.dataset.released="false"),void r(!1);const a=i?.querySelector('.platform-story-cep-v2-component__section[data-section="slide"]'),c=!a||a.getBoundingClientRect().top<=o;r(c);const l=s.getBoundingClientRect();l.top>o?"true"===t.dataset.released&&(t.style.top="",t.dataset.released="false"):(t.style.top=l.top-e.top+"px",t.dataset.released="true")},s=()=>{n||(requestAnimationFrame(i),n=!0)};return window.addEventListener("scroll",s,{passive:!0}),i(),()=>{window.removeEventListener("scroll",s),t.style.top="",delete t.dataset.released}}}function _(){document.querySelectorAll(r.COMPONENT_SELECTOR).forEach(t=>new S(t))}},77e3:function(t,e,o){var r;o.d(e,{X:function(){return r}}),function(t){t.COMPONENT='[data-component="platform-story"]',t.PLATFORM_STORY=".platform-story",t.CONTENT=".platform-story__content",t.INTRO=".platform-story__intro",t.INTRO_SECTION=".platform-story__intro-section",t.INTRO_CONTENT=".platform-story__intro-content",t.INTRO_IMAGE_WRAPPER=".platform-story__intro-image-wrapper",t.INTRO_TITLE=".platform-story__intro-title",t.SWIPER=".swiper",t.SWIPER_SLIDE=".swiper-slide",t.SWIPER_PAGINATION=".swiper-pagination",t.SLIDER_CONTAINER=".slider-container",t.PLATFORM_STORY_ITEM=".platform-story-item",t.STORY_ITEM_CONTENT=".platform-story-item__content",t.STORY_ITEM_VISUAL=".platform-story-item__visual",t.TIMELINE_BUTTON=".platform-story__timeline-button",t.TIMELINE_WRAPPER=".platform-story__timeline-wrapper",t.TIMELINE_BG=".platform-story__timeline-bg"}(r||(r={}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.