<!doctype html>
<html lang="en-US" prefix="og: https://ogp.me/ns#">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">

		<link rel="shortcut icon" href="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/cropped-favicon.jpg?fit=186%2C186&amp;ssl=1">
	
	<script class="sciencenews-class-mappings" type="text/javascript">window.sciencenewsClassnames = {"admin":[],"search":{"formWrapper":"search__form-wrapper___1Rkr9","container":"search__container___JhODP","header":"search__header___8gBWQ","searchLinks":"search__search-links___TOXXx","searchLink":"search__search-link___RUru8","heading":"search__heading___h8jtO","notFound":"search__not-found___FtRJn","message":"search__message___yfziA","resultsWrapper":"search__results-wrapper___YxeDo"},"sn-connection":{"summary":"sn-connection__summary___AfHq0","heading":"sn-connection__heading___s6Ko5","description":"sn-connection__description___65q1f","spotlights":"sn-connection__spotlights___PwvZJ","spotlightsHeader":"sn-connection__spotlights-header___7qSlq","spotlightFeature":"sn-connection__spotlight-feature___-KCxZ","milestones":"sn-connection__milestones___VSVXT","milestonesHeader":"sn-connection__milestones-header___TBcvn","milestoneContainer":"sn-connection__milestone-container___8X2mj","milestoneCta":"sn-connection__milestone-cta___v-ZLH"},"ab-test":[],"amp":[],"snc-page":{"content":"snc-page__content___QbGhl","post":"snc-page__post___b0wn7"},"snc-landing":{"wrapper":"snc-landing__wrapper___Gsr-w","spotlights":"snc-landing__spotlights___MAi8H","spotlightsHeader":"snc-landing__spotlights-header___tn-dZ","spotlightFeature":"snc-landing__spotlight-feature___WEW1w"},"snc-landing-slider-sections":{"wrapper":"snc-landing-slider-sections__wrapper___Mv7Ks","wrapperThemes":"snc-landing-slider-sections__wrapper--themes___pMZfX","wrapperConnections":"snc-landing-slider-sections__wrapper--connections___Pnbko","imageNoMobile":"snc-landing-slider-sections__image-no-mobile___0jopQ","container":"snc-landing-slider-sections__container___rjeDZ","header":"snc-landing-slider-sections__header___TEvoc"},"snc-landing-milestones":{"wrapper":"snc-landing-milestones__wrapper___8zo-k","imageNoMobile":"snc-landing-milestones__image-no-mobile___R0Jzq","container":"snc-landing-milestones__container___g2R2y","header":"snc-landing-milestones__header___I1Hi3","milestones":"snc-landing-milestones__milestones___bP7BT","item":"snc-landing-milestones__item___E67dp","item1":"snc-landing-milestones__item--1___5FL9-","year":"snc-landing-milestones__year___3KjUN","thumbnail":"snc-landing-milestones__thumbnail___KdELj","titleWrapper":"snc-landing-milestones__title-wrapper___Cv6Zt","item2":"snc-landing-milestones__item--2___IYd3d","item3":"snc-landing-milestones__item--3___naVQE","item4":"snc-landing-milestones__item--4___fJfi6","title":"snc-landing-milestones__title___PjlIa","cta":"snc-landing-milestones__cta___4lQZA"},"snc-milestones-posts-section":{"container":"snc-milestones-posts-section__container___CyD2-","section":"snc-milestones-posts-section__section___4xgs4","articles":"snc-milestones-posts-section__articles___laiqL","listItem":"snc-milestones-posts-section__list-item___QobKE","decade":"snc-milestones-posts-section__decade___cudcl"},"sn-theme-milestones":{"wrapper":"sn-theme-milestones__wrapper___NMxwx","container":"sn-theme-milestones__container___XP6yn","heading":"sn-theme-milestones__heading___xL96Z","description":"sn-theme-milestones__description___SJHIa","cta":"sn-theme-milestones__cta___ErD6I"},"snc-milestones-archive":{"wrapper":"snc-milestones-archive__wrapper___kqNlt","contentWrapper":"snc-milestones-archive__content-wrapper___HBdtE","heading":"snc-milestones-archive__heading___S4grg","selectedThemes":"snc-milestones-archive__selected-themes___7HFOp","selectedConnections":"snc-milestones-archive__selected-connections___kWVNW","sidebar":"snc-milestones-archive__sidebar___MDGjk","sidebarContainer":"snc-milestones-archive__sidebar-container___YcGKB","themes":"snc-milestones-archive__themes___fxwKn","connections":"snc-milestones-archive__connections___0HqMH"},"snc-milestones-post-item":{"title":"snc-milestones-post-item__title___DsH7m","thumbnail":"snc-milestones-post-item__thumbnail___93FEA","wrapper":"snc-milestones-post-item__wrapper___4kEO3","noImage":"snc-milestones-post-item__no-image___1f2XK","content":"snc-milestones-post-item__content___7-HHy","year":"snc-milestones-post-item__year___altSU","figure":"snc-milestones-post-item__figure___Dtqjf","caption":"snc-milestones-post-item__caption___kM3lD","credit":"snc-milestones-post-item__credit___GIyzP","mobileCaption":"snc-milestones-post-item__mobile-caption___wiQ2m","mobileCredit":"snc-milestones-post-item__mobile-credit___cxYCz","desktopCaption":"snc-milestones-post-item__desktop-caption___TB7aM","desktopCredit":"snc-milestones-post-item__desktop-credit___rYdfv","excerpt":"snc-milestones-post-item__excerpt___cRS1J","richText":"snc-milestones-post-item__rich-text___NSxK8"},"sn-theme":{"content":"sn-theme__content___eMahL","menu":"sn-theme__menu___704ed","post":"sn-theme__post___L-54l","archiveAndLatest":"sn-theme__archive-and-latest___rBveQ"},"collections":[],"single-magazine":[],"_pdf-embed":[],"magazine-archive":{"wrapperOuter":"magazine-archive__wrapper--outer___-owva","nav":"magazine-archive__nav___iEc6v","grid":"magazine-archive__grid___0C5rD","issue":"magazine-archive__issue___SxPor","issueThumbnail":"magazine-archive__issue-thumbnail___1e3yk","issueDate":"magazine-archive__issue-date___gLZt4","gridPrimary":"magazine-archive__grid--primary___WYYq0","gridSecondary":"magazine-archive__grid--secondary___aH5h-","gridTernary":"magazine-archive__grid--ternary___Renjk","gridQuaternary":"magazine-archive__grid--quaternary___TXlr-"},"page":{"body":"page__body___szynj","header":"page__header___-VQUh","immersive":"page__immersive___HblxW","visuallyHidden":"page__visually-hidden___OmvjZ","headerContent":"page__header-content___FF6vO","title":"page__title___E7BUX","deck":"page__deck___cIH5-","figure":"page__figure___V8Agm","thumbnail":"page__thumbnail___CtLEn","figcaption":"page__figcaption___r3c4V","caption":"page__caption___35fyj","credit":"page__credit___6JNCO","mobileCaption":"page__mobile-caption___YDre3","mobileCredit":"page__mobile-credit___-ZRMU","desktopCaption":"page__desktop-caption___Mn3f-","desktopCredit":"page__desktop-credit___DM4Hi"},"single":{"wrapper":"single__wrapper___rmJj2","withSidebar":"single__with-sidebar___rvUX-","body":"single__body___2pHuV","bylineContainer":"single__byline-container___gBoqt","bylineWrapper":"single__byline-wrapper___fuwNn","content":"single__content___9ekjR","richText":"single__rich-text___RmCDp","sidebar":"single__sidebar___A2uoe","footer":"single__footer___Sz7sP"},"nav-bar":{"wrapper":"nav-bar__wrapper___0b-CD","toggle":"nav-bar__toggle___4pRfS","icon":"nav-bar__icon___ypN9u","navBar":"nav-bar__nav-bar___PdKD4","homeLink":"nav-bar__home-link___p-697","tagline":"nav-bar__tagline___fE7LQ","actions":"nav-bar__actions___afEUJ","zephrAuth":"nav-bar__zephr-auth___wuSi4","authHeader":"nav-bar__auth-header___uyIiK","authAction":"nav-bar__auth-action___lulmd","donateLink":"nav-bar__donate-link___gI-RC"},"primary-menu-collapsed":{"menu":"primary-menu-collapsed__menu___LGg1u","topicsMenu":"primary-menu-collapsed__topics-menu___E-2sC","menuItem":"primary-menu-collapsed__menu-item___GlpCD","hasChildren":"primary-menu-collapsed__has-children___gf8O1","subMenu":"primary-menu-collapsed__sub-menu___-YUEF"},"cookie-banner":{"wrapper":"cookie-banner__wrapper___Ok0xr","content":"cookie-banner__content___O0u3i","button":"cookie-banner__button___qECGb"},"form-assembly":[],"snc-signup":{"wrapper":"snc-signup__wrapper___vsf8o","background":"snc-signup__background___tc3WM","container":"snc-signup__container___mlwKW","formWrapper":"snc-signup__form-wrapper___elshh","heading":"snc-signup__heading___ZmWpw","message":"snc-signup__message___Y3XhB","thankyou":"snc-signup__thankyou___ot15k","error":"snc-signup__error___MR-Rh"},"nav-bar-collapsed":{"wrapper":"nav-bar-collapsed__wrapper___P1rfC","toggle":"nav-bar-collapsed__toggle___Br-E6","icon":"nav-bar-collapsed__icon___eaCW4","navBar":"nav-bar-collapsed__nav-bar___DbnSA","homeLink":"nav-bar-collapsed__home-link___LmE0a","tagline":"nav-bar-collapsed__tagline___sX04Q","sectionName":"nav-bar-collapsed__section-name___S467v","lockup":"nav-bar-collapsed__lockup___6r3K6","actions":"nav-bar-collapsed__actions___RKMWh","actionsWrapper":"nav-bar-collapsed__actions-wrapper___zATuM","zephrAuth":"nav-bar-collapsed__zephr-auth___0-Get","authHeader":"nav-bar-collapsed__auth-header___84A4n","authAction":"nav-bar-collapsed__auth-action___lh-QB","donateLink":"nav-bar-collapsed__donate-link___Gysw2"},"ad-block-default":{"wrapper":"ad-block-default__wrapper___MJ0Ey"},"ad-block-sidebar":{"wrapper":"ad-block-sidebar__wrapper___-VwzJ","adspeed":"ad-block-sidebar__adspeed___gGWm1","freestar":"ad-block-sidebar__freestar___92vhb"},"ad-block-leaderboard":{"wrapper":"ad-block-leaderboard__wrapper___YcoEf","adspeed":"ad-block-leaderboard__adspeed___PLJ6q","freestar":"ad-block-leaderboard__freestar___0untO"},"site-header-minimal":{"wrapper":"site-header-minimal__wrapper___qTTL3","top":"site-header-minimal__top___GB7Um","bottom":"site-header-minimal__bottom___64G9B","homeLink":"site-header-minimal__home-link___MIcP9","tagline":"site-header-minimal__tagline___-iDc-"},"follow-us":{"wrapper":"follow-us__wrapper___N8NzF","background":"follow-us__background___WNsfy","container":"follow-us__container___eZ-0T","heading":"follow-us__heading___5-bCN","list":"follow-us__list___3gV9c","link":"follow-us__link___en5Z5","icon":"follow-us__icon___9M7rm","facebook":"follow-us__facebook___lZEoq","twitter":"follow-us__twitter___hewUp","instagram":"follow-us__instagram___KtwXg"},"site-footer":{"wrapper":"site-footer__wrapper___-h1gI","container":"site-footer__container___2d5EZ","content":"site-footer__content___KLJ8g","branding":"site-footer__branding___HC6bd","logo":"site-footer__logo___IY-GE","description":"site-footer__description___Si57o","properties":"site-footer__properties___cMdbY","property":"site-footer__property___yTaDz","info":"site-footer__info___oQYW1","menus":"site-footer__menus___gasYQ","legal":"site-footer__legal___kX-Or","address":"site-footer__address___4unOl","phone":"site-footer__phone___J4dMi","page":"site-footer__page___4E9r6","nav":"site-footer__nav___uCRAS","heading":"site-footer__heading___TjDMa","menu":"site-footer__menu___GFF-A","first":"site-footer__first___f9yod","menuItem":"site-footer__menu-item___kNjbp","social":"site-footer__social___jrzu4","item":"site-footer__item___2y987","link":"site-footer__link___xotbk","icon":"site-footer__icon___zw3zB","facebook":"site-footer__facebook___SToBh","twitter":"site-footer__twitter___D9xsC","rss":"site-footer__rss___j-1bD","instagram":"site-footer__instagram___x-kDN","youtube":"site-footer__youtube___oglUP","tiktok":"site-footer__tiktok___oRYtm"},"ad-block-flex":{"wrapper":"ad-block-flex__wrapper___WjgCY","adspeed":"ad-block-flex__adspeed___SbnwX","freestar":"ad-block-flex__freestar___MqmWq"},"site-header":{"wrapper":"site-header__wrapper___EBXQN","hasAlertBanner":"site-header__has-alert-banner___7Wzs6","branding":"site-header__branding___ANiJ3","homeLink":"site-header__home-link___wduac","tagline":"site-header__tagline___agp8-","alertBanner":"site-header__alert-banner___dqlGJ"},"ad-block-sticky-sidebar":{"wrapper":"ad-block-sticky-sidebar__wrapper___Te-qO"},"ad-block-single-footer":{"wrapper":"ad-block-single-footer__wrapper___K7lKa","adspeed":"ad-block-single-footer__adspeed___NC8g4","freestar":"ad-block-single-footer__freestar___wNhJb"},"tableau":[],"snc-page-header":{"wrapper":"snc-page-header__wrapper___Nnrms","body":"snc-page-header__body___tDsUE","container":"snc-page-header__container___H2H5f","figure":"snc-page-header__figure___Fw-Z6","image":"snc-page-header__image___Pxe-g","figcaption":"snc-page-header__figcaption___abFt3","caption":"snc-page-header__caption___WOmuf","credit":"snc-page-header__credit___I2ucW","mobileCaption":"snc-page-header__mobile-caption___alFoQ","mobileCredit":"snc-page-header__mobile-credit___h1yAV","desktopCaption":"snc-page-header__desktop-caption___ajEfU","desktopCredit":"snc-page-header__desktop-credit___guKmY","heading":"snc-page-header__heading___6a-T6","eyebrow":"snc-page-header__eyebrow___QMpos","lockup":"snc-page-header__lockup___oIOtq"},"term-feature":{"wrapper":"term-feature__wrapper___xSZRn","container":"term-feature__container___CtFTj","hasDivider":"term-feature__has-divider___fNMnv","secondary":"term-feature__secondary___tejjU"},"site-header-collapsed":{"wrapper":"site-header-collapsed__wrapper___UHIfr"},"page-header":{"wrapper":"page-header__wrapper___Y3CKK","container":"page-header__container___ueRzI","heading":"page-header__heading___QJh9c","termDescription":"page-header__term-description___dR6Fu"},"snc-sponsor-footer":{"wrapper":"snc-sponsor-footer__wrapper___-5Nym"},"snc-theme-pagination":{"wrapper":"snc-theme-pagination__wrapper___Qc7mH","container":"snc-theme-pagination__container___MDPMz","arrow":"snc-theme-pagination__arrow___vEMgp","image":"snc-theme-pagination__image___1VevE","arrowLink":"snc-theme-pagination__arrow-link___k56QM"},"compact-feature-primary":{"title":"compact-feature-primary__title___T4gZe","thumbnail":"compact-feature-primary__thumbnail___gZEYn","eyebrow":"compact-feature-primary__eyebrow___teOYP","meta":"compact-feature-primary__meta___ajmO6","byline":"compact-feature-primary__byline___YC-BT","date":"compact-feature-primary__date___Gs5yW","wrapper":"compact-feature-primary__wrapper___OAXTF","figure":"compact-feature-primary__figure___54ob7","content":"compact-feature-primary__content___qRGbF","excerpt":"compact-feature-primary__excerpt___f00Tc"},"term-feature-header":{"wrapper":"term-feature-header__wrapper___WGafn","heading":"term-feature-header__heading___wU0-X","hasParent":"term-feature-header__has-parent___CDj7L","smallHeading":"term-feature-header__small-heading___Mm-f8","termDescription":"term-feature-header__term-description___Vm7s-","parent":"term-feature-header__parent___09nxY","breadcrumbs":"term-feature-header__breadcrumbs___kAlU8","root":"term-feature-header__root___S16Vk","nav":"term-feature-header__nav___5L52F","list":"term-feature-header__list___Ondad","item":"term-feature-header__item___XRU1i","link":"term-feature-header__link___LNGAp"},"search-form":{"wrapper":"search-form__wrapper___rZw9J","input":"search-form__input___CkyNT","select":"search-form__select___DjZmI","label":"search-form__label___Euoee","search":"search-form__search___-j0bG","formItems":"search-form__form-items___PvHXy","item":"search-form__item___WkN2F","flexWrapper":"search-form__flex-wrapper___r4T0i","readability":"search-form__readability___b3A4r","dateContainer":"search-form__date-container___bRKlJ","calendarHolder":"search-form__calendar-holder___lrwBo","pickerToggle":"search-form__picker-toggle___twlWM","icon":"search-form__icon___NvshZ","submit":"search-form__submit___-our3"},"snhs-search-form":{"wrapper":"snhs-search-form__wrapper___k54Uy","input":"snhs-search-form__input___EsuyI","select":"snhs-search-form__select___7CsAj","label":"snhs-search-form__label___vBmRA","search":"snhs-search-form__search___j8ueL","formItems":"snhs-search-form__form-items___w-aBR","topic":"snhs-search-form__topic___I8rD6","exercise":"snhs-search-form__exercise___pXPCm","date":"snhs-search-form__date___HJ17O","flexWrapper":"snhs-search-form__flex-wrapper___GUP86","dateContainer":"snhs-search-form__date-container___ARhL5","calendarHolder":"snhs-search-form__calendar-holder___zoNDA","pickerToggle":"snhs-search-form__picker-toggle___gU4RK","icon":"snhs-search-form__icon___oLyBj","filterWrapper":"snhs-search-form__filter-wrapper___Htb9h","filter":"snhs-search-form__filter___OyuDd","submit":"snhs-search-form__submit___HBxVt"},"index":[],"river-no-sidebar":{"wrapper":"river-no-sidebar__wrapper___ooyGN"},"river-with-sidebar":{"more":"river-with-sidebar__more___0FxVh","content":"river-with-sidebar__content___aeO5a","heading":"river-with-sidebar__heading___2cC-C","list":"river-with-sidebar__list___5dLsp","sidebar":"river-with-sidebar__sidebar___CcMdM"},"widget-post-list":[],"milestone-carousel.module":[],"milestone-carousel":{"container":"milestone-carousel__container___Bu1I0","slides":"milestone-carousel__slides___Ty9jo","wrapper":"milestone-carousel__wrapper___vGCRB","controlsWrapper":"milestone-carousel__controls-wrapper___mbZWF","year":"milestone-carousel__year___QHAKH","yearInner":"milestone-carousel__year-inner___oSXnM","figure":"milestone-carousel__figure___LdGcQ","thumbnail":"milestone-carousel__thumbnail___MtAFO","content":"milestone-carousel__content___SJ-Hq","richText":"milestone-carousel__rich-text___400jj"},"compact-feature-secondary":{"title":"compact-feature-secondary__title___LhFfg","eyebrow":"compact-feature-secondary__eyebrow___SGh3Z","meta":"compact-feature-secondary__meta___-5i8q","byline":"compact-feature-secondary__byline___hK3qm","date":"compact-feature-secondary__date___fZnGB","wrapper":"compact-feature-secondary__wrapper___DB58O"},"widget-post-list-item":{"title":"widget-post-list-item__title___XGFHE","thumbnail":"widget-post-list-item__thumbnail___RyxGO","eyebrow":"widget-post-list-item__eyebrow___Vv3Gn","meta":"widget-post-list-item__meta___NGtqC","byline":"widget-post-list-item__byline___wLFP-","date":"widget-post-list-item__date___4W2tB","wrapper":"widget-post-list-item__wrapper___VMX0N","content":"widget-post-list-item__content___z5CM8"},"expanded-feature-primary":{"title":"expanded-feature-primary__title___e7KZd","thumbnail":"expanded-feature-primary__thumbnail___yjtfD","eyebrow":"expanded-feature-primary__eyebrow___SJ5tR","meta":"expanded-feature-primary__meta___GQBYQ","byline":"expanded-feature-primary__byline___GWygz","date":"expanded-feature-primary__date___38EMj","wrapper":"expanded-feature-primary__wrapper___rKhKU","figure":"expanded-feature-primary__figure___QkH2a","content":"expanded-feature-primary__content___pfqts","excerpt":"expanded-feature-primary__excerpt___R6w3h"},"post-grid":{"container":"post-grid__container___TCyI0","list":"post-grid__list___IJ3eh","wrapper":"post-grid__wrapper___jcp12","title":"post-grid__title___FKaIn","thumbnail":"post-grid__thumbnail___zIDgK","eyebrow":"post-grid__eyebrow___FUJEj","meta":"post-grid__meta___o88Dj","byline":"post-grid__byline___ZoNRX","date":"post-grid__date___cVwvl","figure":"post-grid__figure___qJYj5","content":"post-grid__content___CU-ju"},"expanded-feature-secondary":{"title":"expanded-feature-secondary__title___UHt5H","thumbnail":"expanded-feature-secondary__thumbnail___-trXn","eyebrow":"expanded-feature-secondary__eyebrow___4UtzS","meta":"expanded-feature-secondary__meta___6k-RS","byline":"expanded-feature-secondary__byline___cptiE","date":"expanded-feature-secondary__date___uzWEY","wrapper":"expanded-feature-secondary__wrapper___-NfAn","content":"expanded-feature-secondary__content___hYkkd"},"author-header":{"wrapper":"author-header__wrapper___vQu3G","top":"author-header__top___2t4AP","topInner":"author-header__top-inner___PWe6k","figure":"author-header__figure___J8H4p","thumbnail":"author-header__thumbnail___lLeMQ","content":"author-header__content___81QFR","header":"author-header__header___-KfF1","heading":"author-header__heading___gRgNn","title":"author-header__title___gQS58","bio":"author-header__bio___EMM9J","bioInner":"author-header__bio-inner___VVIs-","contact":"author-header__contact___mqaoE","email":"author-header__email___q9fVh","twitter":"author-header__twitter___4djK-","icon":"author-header__icon___LOIpl"},"taxonomy-detail-header":{"wrapper":"taxonomy-detail-header__wrapper___CXgKf","noImage":"taxonomy-detail-header__no-image___DZQmD","container":"taxonomy-detail-header__container___jnewU","figure":"taxonomy-detail-header__figure___cI8nj","thumbnail":"taxonomy-detail-header__thumbnail___GNcUM","figcaption":"taxonomy-detail-header__figcaption___6cY-J","caption":"taxonomy-detail-header__caption___9LPjI","credit":"taxonomy-detail-header__credit___bwgBM","mobileCaption":"taxonomy-detail-header__mobile-caption___djPLA","mobileCredit":"taxonomy-detail-header__mobile-credit___RFAsB","desktopCaption":"taxonomy-detail-header__desktop-caption___3O-RZ","desktopCredit":"taxonomy-detail-header__desktop-credit___5T9kZ","content":"taxonomy-detail-header__content___TvtlW","eyebrow":"taxonomy-detail-header__eyebrow___ZTTml","title":"taxonomy-detail-header__title___KGyEp","description":"taxonomy-detail-header__description___1ZoO6"},"multimedia-grid":{"container":"multimedia-grid__container___3-qOA","wrapper":"multimedia-grid__wrapper___wIcGc","title":"multimedia-grid__title___jL5hd","thumbnail":"multimedia-grid__thumbnail___U7qje","content":"multimedia-grid__content___FCNpR","figure":"multimedia-grid__figure___-yHKH","icon":"multimedia-grid__icon___ImbZQ","playIcon":"multimedia-grid__play-icon___TduD9","video":"multimedia-grid__video___5O--p","chart":"multimedia-grid__chart___CHrdB","audio":"multimedia-grid__audio___PDH-C","gif":"multimedia-grid__gif___e-1kv","slideshow":"multimedia-grid__slideshow___fGZCK"},"snhs-post-item-river":{"title":"snhs-post-item-river__title___hgy5p","thumbnail":"snhs-post-item-river__thumbnail___lq-Lk","wrapper":"snhs-post-item-river__wrapper___vmA-Q","figure":"snhs-post-item-river__figure___1nVpc","activity":"snhs-post-item-river__activity___a5kU9","comprehension":"snhs-post-item-river__comprehension___YgdJD","discussion":"snhs-post-item-river__discussion___jjzxv","graphOfTheWeek":"snhs-post-item-river__graph-of-the-week___-Ov95","content":"snhs-post-item-river__content___1aQHY","icon":"snhs-post-item-river__icon___1Vm-k","eyebrow":"snhs-post-item-river__eyebrow___Si2cs","componentType":"snhs-post-item-river__component-type___FzYVl","excerpt":"snhs-post-item-river__excerpt___t-Ukn","date":"snhs-post-item-river__date___xI3XA","pubdate":"snhs-post-item-river__pubdate___R3sYQ"},"social-shares":{"wrapper":"social-shares__wrapper___tam23","shareCustomizeLink":"social-shares__share-customize-link___p53Mt","sdTitle":"social-shares__sd-title___Y4fAX","sdContent":"social-shares__sd-content___rq5th","shareIcon":"social-shares__share-icon___wsEDg","shareFacebook":"social-shares__share-facebook___pYoql","shareTwitter":"social-shares__share-twitter___hyn-8","shareReddit":"social-shares__share-reddit___1ZuRI","sharePocket":"social-shares__share-pocket___GV8Kj","shareEmail":"social-shares__share-email___Gd5nh","shareMailto":"social-shares__share-mailto___gSQ8c","sharePrint":"social-shares__share-print___DoyOu","shareTumblr":"social-shares__share-tumblr___EwhGx","shareClassroom":"social-shares__share-classroom___SQ-4v","sharePinterest":"social-shares__share-pinterest___dBRxR"},"snc-spotlight-feature-primary":{"title":"snc-spotlight-feature-primary__title___dAE4R","thumbnail":"snc-spotlight-feature-primary__thumbnail___-EZXM","meta":"snc-spotlight-feature-primary__meta___GzQ8m","byline":"snc-spotlight-feature-primary__byline___BO6n-","date":"snc-spotlight-feature-primary__date___Gk1mm","figure":"snc-spotlight-feature-primary__figure___EmXTk","themesList":"snc-spotlight-feature-primary__themes-list___YGlrR","eyebrow":"snc-spotlight-feature-primary__eyebrow___fV12I","excerpt":"snc-spotlight-feature-primary__excerpt___3cTLW"},"snc-spotlight-feature-secondary":{"title":"snc-spotlight-feature-secondary__title___zv-iE","thumbnail":"snc-spotlight-feature-secondary__thumbnail___3NN2q","meta":"snc-spotlight-feature-secondary__meta___iIQOk","byline":"snc-spotlight-feature-secondary__byline___pFWLk","date":"snc-spotlight-feature-secondary__date___Kj9Z-","figure":"snc-spotlight-feature-secondary__figure___4LQd1","themesList":"snc-spotlight-feature-secondary__themes-list___pDN1W","eyebrow":"snc-spotlight-feature-secondary__eyebrow___30SMj","excerpt":"snc-spotlight-feature-secondary__excerpt___oNM2L"},"video-player":[],"snc-article-associations":[],"featured-articles":{"wrapper":"featured-articles__wrapper___djpRN","list":"featured-articles__list___1zYro","secondary":"featured-articles__secondary___9DM9Y","ternary":"featured-articles__ternary___jra8W"},"snc-sponsors":{"separator":"snc-sponsors__separator___Gzqvx","container":"snc-sponsors__container___Cd9NF","heading":"snc-sponsors__heading___tWu9Y","images":"snc-sponsors__images___LK8i2"},"sn-theme-river-item":{"title":"sn-theme-river-item__title___0OuZ2","thumbnail":"sn-theme-river-item__thumbnail___wtMAe","meta":"sn-theme-river-item__meta___-iCzQ","byline":"sn-theme-river-item__byline___OGpuO","date":"sn-theme-river-item__date___2CUZC","figure":"sn-theme-river-item__figure___gTi7Z","excerpt":"sn-theme-river-item__excerpt___MLmVj"},"milestones-jump-to-decade":{"wrapper":"milestones-jump-to-decade__wrapper___U503i","controller":"milestones-jump-to-decade__controller___RME2z","target":"milestones-jump-to-decade__target___uklmZ","item":"milestones-jump-to-decade__item___CWUoy"},"carousel.module":[],"snc-section-header":{"wrapper":"snc-section-header__wrapper___NO89S","icon":"snc-section-header__icon___osViZ","heading":"snc-section-header__heading___6Iu2C","dek":"snc-section-header__dek___3ipSS"},"sn-theme-river":{"wrapper":"sn-theme-river__wrapper___gazSz","heading":"sn-theme-river__heading___AZHe-","description":"sn-theme-river__description___UAJCv","list":"sn-theme-river__list___u3122","year":"sn-theme-river__year___tB3CA"},"snc-spoke-menu":{"list":"snc-spoke-menu__list___XwCHB","item":"snc-spoke-menu__item___kqLOB","link":"snc-spoke-menu__link___XK5iF"},"featured-primary-two-column":{"title":"featured-primary-two-column__title___-RwGR","thumbnail":"featured-primary-two-column__thumbnail___5iAoR","eyebrow":"featured-primary-two-column__eyebrow___e1VaX","meta":"featured-primary-two-column__meta___woyhW","byline":"featured-primary-two-column__byline___UF1A0","date":"featured-primary-two-column__date___auWHw","wrapper":"featured-primary-two-column__wrapper___e3Ynu","figure":"featured-primary-two-column__figure___gfjrF","content":"featured-primary-two-column__content___kqHcy","excerpt":"featured-primary-two-column__excerpt___7Q9A2"},"featured-secondary":{"title":"featured-secondary__title___mb8GK","thumbnail":"featured-secondary__thumbnail___1qTeQ","eyebrow":"featured-secondary__eyebrow___QtjXw","meta":"featured-secondary__meta___lSKsC","byline":"featured-secondary__byline___qvEKL","date":"featured-secondary__date___tByAn","wrapper":"featured-secondary__wrapper___6uFWZ","content":"featured-secondary__content___aGbcp","figure":"featured-secondary__figure___90qbg"},"snc-slider":{"wrapper":"snc-slider__wrapper___Bv-Ik","subgroup":"snc-slider__subgroup___YdwVV","items":"snc-slider__items___Ay26O","item":"snc-slider__item___5SUao","subItem":"snc-slider__sub-item___CycEr","thumbnail":"snc-slider__thumbnail___om7DK","titleWrapper":"snc-slider__title-wrapper___jcPT8","title":"snc-slider__title___OTvHH","controls":"snc-slider__controls___9HcpK","control":"snc-slider__control___fkaFS","next":"snc-slider__next___1zt6Z","previous":"snc-slider__previous___6ndjg"},"carousel":{"container":"carousel__container___bKHIO","slides":"carousel__slides___eKqkJ","wrapper":"carousel__wrapper___wIECZ","controlsWrapper":"carousel__controls-wrapper___icD8R","title":"carousel__title___1uDeB","thumbnail":"carousel__thumbnail___qpV-2","eyebrow":"carousel__eyebrow___VMI-N","meta":"carousel__meta___gWzdc","byline":"carousel__byline___W1NyC","date":"carousel__date___6yarP","figure":"carousel__figure___kTYKK","content":"carousel__content___Lm9o8"},"featured-primary-three-column":{"title":"featured-primary-three-column__title___l6a96","thumbnail":"featured-primary-three-column__thumbnail___UIfB4","eyebrow":"featured-primary-three-column__eyebrow___oamQy","meta":"featured-primary-three-column__meta___s4d2v","byline":"featured-primary-three-column__byline___Ba1wc","date":"featured-primary-three-column__date___2bHIj","wrapper":"featured-primary-three-column__wrapper___qlFJC","figure":"featured-primary-three-column__figure___dTCfc","content":"featured-primary-three-column__content___ayIEb","excerpt":"featured-primary-three-column__excerpt___YccWW"},"featured-primary-one-column":{"title":"featured-primary-one-column__title___PTjk4","thumbnail":"featured-primary-one-column__thumbnail___yep-D","eyebrow":"featured-primary-one-column__eyebrow___B48-d","meta":"featured-primary-one-column__meta___e3uyI","byline":"featured-primary-one-column__byline___X6Ab6","date":"featured-primary-one-column__date___pR20I","wrapper":"featured-primary-one-column__wrapper___rLsSW","figure":"featured-primary-one-column__figure___B3NO0","content":"featured-primary-one-column__content___xL5Cq","excerpt":"featured-primary-one-column__excerpt___RQD7T"},"magazine-highlight":{"wrapper":"magazine-highlight__wrapper___18H0P","title":"magazine-highlight__title___eih22","figure":"magazine-highlight__figure___70-x6","thumbnail":"magazine-highlight__thumbnail___SCOib","listWrapper":"magazine-highlight__list-wrapper___HMj-P","list":"magazine-highlight__list___UGZWl","listItem":"magazine-highlight__list-item___qdfrC","subscribe":"magazine-highlight__subscribe___xYsG3"},"trending-stories":{"wrapper":"trending-stories__wrapper___-7tOu","heading":"trending-stories__heading___-mY-6","icon":"trending-stories__icon___TyRmb","archiveLink":"trending-stories__archive-link___e25Wo"},"magazine-highlight-article":{"title":"magazine-highlight-article__title___yqOX2","meta":"magazine-highlight-article__meta___Cpm-t","byline":"magazine-highlight-article__byline___4EWUG","date":"magazine-highlight-article__date___1-oH-","wrapper":"magazine-highlight-article__wrapper___gcJYj","item1":"magazine-highlight-article__item-1___-b5NG"},"sns-spotlight-secondary":{"title":"sns-spotlight-secondary__title___yLPhA","eyebrow":"sns-spotlight-secondary__eyebrow___cPn92","meta":"sns-spotlight-secondary__meta___lHOMD","byline":"sns-spotlight-secondary__byline___vlPtM","date":"sns-spotlight-secondary__date___8urNf","wrapper":"sns-spotlight-secondary__wrapper___QpCzC"},"featured-media":{"wrapper":"featured-media__wrapper___mIhxo","background":"featured-media__background___hCQt9","container":"featured-media__container___2Eoqj","header":"featured-media__header___-GVl-","heading":"featured-media__heading___dTEPK","headingDark":"featured-media__heading--dark___gVaDv","list":"featured-media__list___UPJ17","listFiveStory":"featured-media__list--five-story___1ies3","listTenStory":"featured-media__list--ten-story___zc879","pull":"featured-media__pull___xKxud","cta":"featured-media__cta___cL1Q6"},"archive-position-highlight":{"wrapper":"archive-position-highlight__wrapper___G--N8","figure":"archive-position-highlight__figure___dla4T","figureSponsoredContent":"archive-position-highlight__figure--sponsored-content___OXF-L","thumbnail":"archive-position-highlight__thumbnail___Tn2A5","thumbnailSponsoredContent":"archive-position-highlight__thumbnail--sponsored-content___mwywQ","title":"archive-position-highlight__title___pMxVj","titleSponsoredContent":"archive-position-highlight__title--sponsored-content___ZO32g","sponsor":"archive-position-highlight__sponsor___NE51T"},"sns-spotlight":{"wrapper":"sns-spotlight__wrapper___1cn2J","content":"sns-spotlight__content___pKiji","heading":"sns-spotlight__heading___akbAk","subhead":"sns-spotlight__subhead___ZvoFS","primaryWrapper":"sns-spotlight__primary-wrapper___9Pjnm","figure":"sns-spotlight__figure___7zIQp","thumbnail":"sns-spotlight__thumbnail___E6-Oa","primary":"sns-spotlight__primary___P7iu9","cta":"sns-spotlight__cta___pDb6F","list":"sns-spotlight__list___5J1v7"},"magazine-feature":{"wrapper":"magazine-feature__wrapper___FynpP","archive":"magazine-feature__archive___EWcJY","archiveContainer":"magazine-feature__archive-container___AmKWQ","heading":"magazine-feature__heading___Cf5SP","issue":"magazine-feature__issue___OV-OA","issueContainer":"magazine-feature__issue-container___hXrMk"},"sns-spotlight-primary":{"title":"sns-spotlight-primary__title___Ulmt4","eyebrow":"sns-spotlight-primary__eyebrow___Bodab","meta":"sns-spotlight-primary__meta___NXmT4","byline":"sns-spotlight-primary__byline___tOTl3","date":"sns-spotlight-primary__date___4zbyD","wrapper":"sns-spotlight-primary__wrapper___ZSNbn","content":"sns-spotlight-primary__content___CNNLw","excerpt":"sns-spotlight-primary__excerpt___Uh7cX"},"snc-promo":{"section":"snc-promo__section___-y4v-","header":"snc-promo__header___eXyQn","heading":"snc-promo__heading___lW5wm","lockup":"snc-promo__lockup___QI-vq","content":"snc-promo__content___WfSiQ","topText":"snc-promo__top-text___k5fiu","columns":"snc-promo__columns___GSJI1","column":"snc-promo__column___fej0I","columnMobileHidden":"snc-promo__column--mobile-hidden___VJSxh","imageNoMobile":"snc-promo__image-no-mobile___aQUVJ","image":"snc-promo__image___zwP9-","caption":"snc-promo__caption___Wc3tv","button":"snc-promo__button___Ts8Ds"},"featured-media-secondary":{"title":"featured-media-secondary__title___LqM-t","thumbnail":"featured-media-secondary__thumbnail___lwApK","wrapper":"featured-media-secondary__wrapper___h9di9","content":"featured-media-secondary__content___Vmwhw","figure":"featured-media-secondary__figure___Spmxp","icon":"featured-media-secondary__icon___vzzVu","playIcon":"featured-media-secondary__play-icon___DyqS6","video":"featured-media-secondary__video___PO-Et","chart":"featured-media-secondary__chart___m-Ohk","audio":"featured-media-secondary__audio___6-ilb","gif":"featured-media-secondary__gif___rz3UI","slideshow":"featured-media-secondary__slideshow___-eQjL","titleDark":"featured-media-secondary__title--dark___xMePf"},"promoted-stories":{"section":"promoted-stories__section___0m7AO","heading":"promoted-stories__heading___0Ab69","thumbnail":"promoted-stories__thumbnail___L7E8z","container":"promoted-stories__container___aC0SZ","title":"promoted-stories__title___Xi498","eyebrow":"promoted-stories__eyebrow___-Sr9q","meta":"promoted-stories__meta___n-Afy","byline":"promoted-stories__byline___mJZu-","date":"promoted-stories__date___TTHgH","wrapper":"promoted-stories__wrapper___VQiRL","excerpt":"promoted-stories__excerpt___opH5g"},"featured-media-primary":{"title":"featured-media-primary__title___fFhyx","thumbnail":"featured-media-primary__thumbnail___AwbKt","wrapper":"featured-media-primary__wrapper___MAUpC","wide":"featured-media-primary__wide___tldyy","figure":"featured-media-primary__figure___I0uxl","figureInlineVideo":"featured-media-primary__figure--inline-video___F4s1y","figcaption":"featured-media-primary__figcaption___3A-vA","caption":"featured-media-primary__caption___uw56Q","credit":"featured-media-primary__credit___fLj-m","mobileCaption":"featured-media-primary__mobile-caption___8pLf6","mobileCredit":"featured-media-primary__mobile-credit___0fm0N","desktopCaption":"featured-media-primary__desktop-caption___OFKnh","desktopCredit":"featured-media-primary__desktop-credit___wQqhV","icon":"featured-media-primary__icon___3JSS5","playIcon":"featured-media-primary__play-icon___cN01H","video":"featured-media-primary__video___-EFZC","chart":"featured-media-primary__chart___I-5VL","audio":"featured-media-primary__audio___RzC54","gif":"featured-media-primary__gif___7wRVn","slideshow":"featured-media-primary__slideshow___u5Jf6","titleDark":"featured-media-primary__title--dark___TOhJz","excerpt":"featured-media-primary__excerpt___ru8Ij","excerptLight":"featured-media-primary__excerpt--light___lMo2g","excerptDark":"featured-media-primary__excerpt--dark___N8q-s","l1":"featured-media-primary__l1___cb7At"},"issue-meta":[],"topics-river":{"wrapper":"topics-river__wrapper___Dav8L","heading":"topics-river__heading___3cWJY","container":"topics-river__container___zdQ9N"},"term-river-grid":{"container":"term-river-grid__container___lq56H","group":"term-river-grid__group___dbwFB","header":"term-river-grid__header___YLPhY","termName":"term-river-grid__term-name___rIVSK","termDescription":"term-river-grid__term-description___dtFrX","title":"term-river-grid__title___rAITz","thumbnail":"term-river-grid__thumbnail___CSJfq","meta":"term-river-grid__meta___Lg-HO","byline":"term-river-grid__byline___Zxqg2","date":"term-river-grid__date___M9fJv","wrapper":"term-river-grid__wrapper___ceqo9","figure":"term-river-grid__figure___jC5X1"},"lightbox":[],"archive-year-nav":{"wrapper":"archive-year-nav__wrapper___-lHj8","years":"archive-year-nav__years___eB-Cm","year":"archive-year-nav__year___IWg90"},"jump-to-year":{"wrapper":"jump-to-year__wrapper___PUVdU","input":"jump-to-year__input___VsFbs"},"pagination":{"wrapper":"pagination__wrapper___M-SaE"},"archive-header":{"wrapper":"archive-header__wrapper___3xEGa","content":"archive-header__content___Uwow4","title":"archive-header__title___yKrQA","breadcrumbs":"archive-header__breadcrumbs___AEACA","root":"archive-header__root___aoG7X","subtitle":"archive-header__subtitle___SFAn2"},"issue-timeline":{"decade":"issue-timeline__decade___FulCx","year":"issue-timeline__year___rrTHd","last":"issue-timeline__last___0KWfw"},"widget-frontmatter":{"widget":"widget-frontmatter__widget___5j8CR","header":"widget-frontmatter__header___eJ65z","heading":"widget-frontmatter__heading___bHhyP","feedback":"widget-frontmatter__feedback___PhJQ9","puzzleSolution":"widget-frontmatter__puzzle-solution___JXoyf","avatar":"widget-frontmatter__avatar___kWTmK","thumbnail":"widget-frontmatter__thumbnail___mPn0y","authorLink":"widget-frontmatter__author-link___iKhOt","title":"widget-frontmatter__title___IlPZo","meta":"widget-frontmatter__meta___-5lG8","byline":"widget-frontmatter__byline___JQefy","date":"widget-frontmatter__date___Tb3-K","excerpt":"widget-frontmatter__excerpt___IIDEe"},"post-item-river":{"title":"post-item-river__title___vyz1w","thumbnail":"post-item-river__thumbnail___9jT72","eyebrow":"post-item-river__eyebrow___Zir4H","meta":"post-item-river__meta___Lx4Tk","byline":"post-item-river__byline___rf4-j","date":"post-item-river__date___9SCxt","wrapper":"post-item-river__wrapper___Nv-Ol","figure":"post-item-river__figure___sasG5","content":"post-item-river__content___ueKx3","excerpt":"post-item-river__excerpt___SWLb7"},"issue-sections":{"container":"issue-sections__container___GkJta","item":"issue-sections__item___Yk4Am","heading":"issue-sections__heading___gF7yL","title":"issue-sections__title___525fF","thumbnail":"issue-sections__thumbnail___bpvGm","eyebrow":"issue-sections__eyebrow___kZoLL","meta":"issue-sections__meta___XpOa8","byline":"issue-sections__byline___ffKuH","date":"issue-sections__date___KFpzB","wrapper":"issue-sections__wrapper___Fh9yh","content":"issue-sections__content___X6nFJ","excerpt":"issue-sections__excerpt___N8Ujk"},"issue-detail-article":{"title":"issue-detail-article__title___VxiCS","eyebrow":"issue-detail-article__eyebrow___N51Ve","meta":"issue-detail-article__meta___9fauj","byline":"issue-detail-article__byline___nEVg6","date":"issue-detail-article__date___4dob1","wrapper":"issue-detail-article__wrapper___Z5QUd","item1":"issue-detail-article__item-1___2Iodg","excerpt":"issue-detail-article__excerpt___V3Qfu"},"issue-banner":{"detail":"issue-banner__detail___PyRRG","detailContainer":"issue-banner__detail-container___z-baN","header":"issue-banner__header___bovN1","heading":"issue-banner__heading___iV2mk","title":"issue-banner__title___l75zD","issueArrows":"issue-banner__issue-arrows___w-sE3","issueButtons":"issue-banner__issue-buttons___Y4Krx","link":"issue-banner__link___j-XPr","issueMeta":"issue-banner__issue-meta___67YXK","meta":"issue-banner__meta___IYqai","detailArrows":"issue-banner__detail-arrows___0LN5T"},"issue-feature":{"container":"issue-feature__container___XcWER","heading":"issue-feature__heading___BM9d8","title":"issue-feature__title___ALdc7","thumbnail":"issue-feature__thumbnail___6kvhm","meta":"issue-feature__meta___bTFjg","byline":"issue-feature__byline___wH5Q1","date":"issue-feature__date___Z7TJi","wrapper":"issue-feature__wrapper___gTUj-","content":"issue-feature__content___rvhfd","excerpt":"issue-feature__excerpt___if-7Z"},"byline":{"wrapper":"byline__wrapper___hSvwC","authors":"byline__authors___a2txN","published":"byline__published___LoyMY","updated":"byline__updated___v1MVH"},"header-immersive":{"wrapper":"header-immersive__wrapper___3Ez3q","figure":"header-immersive__figure___DTIJ0","thumbnail":"header-immersive__thumbnail___4bHq7","figcaption":"header-immersive__figcaption___Q9fuh","caption":"header-immersive__caption___OPEa-","credit":"header-immersive__credit___vzfhk","mobileCaption":"header-immersive__mobile-caption___HEdm3","mobileCredit":"header-immersive__mobile-credit___xHq2-","desktopCaption":"header-immersive__desktop-caption___D2-3-","desktopCredit":"header-immersive__desktop-credit___-AR-t","content":"header-immersive__content___RdMQT","eyebrow":"header-immersive__eyebrow___r56ex","title":"header-immersive__title___asgYs","deck":"header-immersive__deck___NLdGR"},"header-default":{"wrapper":"header-default__wrapper___VQCho","content":"header-default__content___F5-Yn","terms":"header-default__terms___-BVta","eyebrow":"header-default__eyebrow___gmHtv","columnName":"header-default__column-name___6jfhK","title":"header-default__title___ychM4","deck":"header-default__deck___UAY0V","titleWrapper":"header-default__title-wrapper___kUof-","isColumn":"header-default__is-column___VFBQO","isMigrated":"header-default__is-migrated___AAbFO","columnMeta":"header-default__column-meta___NCx-m","authorBios":"header-default__author-bios___7yNUO","timestamps":"header-default__timestamps___c03gf","published":"header-default__published___bFzIG","updated":"header-default__updated___9-Y1L","thumbnail":"header-default__thumbnail___XBeYr","figcaption":"header-default__figcaption___AGPTF","caption":"header-default__caption___sYDk1","credit":"header-default__credit___jFnF8","mobileCaption":"header-default__mobile-caption___GqLa7","mobileCredit":"header-default__mobile-credit___AM5BY","desktopCaption":"header-default__desktop-caption___ltcD6","desktopCredit":"header-default__desktop-credit___6LQps"},"modal-conversion":[],"column-byline-bio":{"wrapper":"column-byline-bio__wrapper___dlKf7","figure":"column-byline-bio__figure___8izsQ","thumbnail":"column-byline-bio__thumbnail___LrFF0","content":"column-byline-bio__content___XiVaF","header":"column-byline-bio__header___NeMeM","heading":"column-byline-bio__heading___6SIrU","contact":"column-byline-bio__contact___8a3D9","bio":"column-byline-bio__bio___g8gs0"},"modal-signup":[],"slideshow.module":[],"primary-menu":{"menu":"primary-menu__menu___YlL1y","topicsMenu":"primary-menu__topics-menu___g55Mb","menuItem":"primary-menu__menu-item___lG0qw","hasChildren":"primary-menu__has-children___62ePc","subMenu":"primary-menu__sub-menu___Nrtos"},"slideshow":{"container":"slideshow__container___2inGd","slides":"slideshow__slides___BfLMo","wrapper":"slideshow__wrapper___Aebb-","controlsWrapper":"slideshow__controls-wrapper___G6kMs","figure":"slideshow__figure___DHfIZ","snFigurePortraitOrientation":"slideshow__sn-figure-portrait-orientation___6EwPr","galleryCaption":"slideshow__gallery-caption___jcoF1"},"more-on-topic":{"wrapper":"more-on-topic__wrapper___NVO9k","heading":"more-on-topic__heading___oSdNk"},"author-bio":{"wrapper":"author-bio__wrapper___ODe-4","figure":"author-bio__figure___e3jd0","thumbnail":"author-bio__thumbnail___TixlC","content":"author-bio__content___F9GU3","header":"author-bio__header___Z3FmU","heading":"author-bio__heading___MCzOr","contact":"author-bio__contact___6ezbe","email":"author-bio__email___-Nebu","twitter":"author-bio__twitter___NkQDd","icon":"author-bio__icon___dooJH","bio":"author-bio__bio___jkxvt"},"snhs-branding":{"link":"snhs-branding__link___5D6uA","navBar":"snhs-branding__nav-bar___xqYDP","mobileHeader":"snhs-branding__mobile-header___1QtR5","footer":"snhs-branding__footer___PCDVl","tagline":"snhs-branding__tagline___fyf82"},"snhs-featured-guide":{"wrapper":"snhs-featured-guide__wrapper___iVz49","header":"snhs-featured-guide__header___rDKGI","heading":"snhs-featured-guide__heading___rdUD3","meta":"snhs-featured-guide__meta___OBPCx","eyebrow":"snhs-featured-guide__eyebrow___3gQM7","list":"snhs-featured-guide__list___w2bu1","eyebrowItem":"snhs-featured-guide__eyebrow-item___Pblr1","date":"snhs-featured-guide__date___rEyb2","pubdate":"snhs-featured-guide__pubdate___s-aNd","container":"snhs-featured-guide__container___JxJ5U","figcaption":"snhs-featured-guide__figcaption___vh-CH","caption":"snhs-featured-guide__caption___KPROh","credit":"snhs-featured-guide__credit___AtQuj","mobileCaption":"snhs-featured-guide__mobile-caption___19rEw","mobileCredit":"snhs-featured-guide__mobile-credit___s6RrJ","desktopCaption":"snhs-featured-guide__desktop-caption___gRsji","desktopCredit":"snhs-featured-guide__desktop-credit___ypNDO","contentHeading":"snhs-featured-guide__content-heading___4ds8P","content":"snhs-featured-guide__content___vPDmg","richText":"snhs-featured-guide__rich-text___pX09g","links":"snhs-featured-guide__links___oXin5","guideLink":"snhs-featured-guide__guide-link___Q5KOt","download":"snhs-featured-guide__download___pGXxm"},"snhs-eg-component-content":{"wrapper":"snhs-eg-component-content__wrapper___ueFj3","content":"snhs-eg-component-content__content___Fxj-f","sidebar":"snhs-eg-component-content__sidebar___Dk-TW"},"widget-snhs-paired-articles":{"widget":"widget-snhs-paired-articles__widget___2XJAi","header":"widget-snhs-paired-articles__header___1EcUe","heading":"widget-snhs-paired-articles__heading___v9zx0","subheading":"widget-snhs-paired-articles__subheading___klvvb","list":"widget-snhs-paired-articles__list___JGSWN","item":"widget-snhs-paired-articles__item___NJ7lB","name":"widget-snhs-paired-articles__name___Hgqjt","readability":"widget-snhs-paired-articles__readability___DAUxF"},"dropdown-all-topics":{"dropdown":"dropdown-all-topics__dropdown___KlUah","topLevel":"dropdown-all-topics__top-level___Dg2W8","heading":"dropdown-all-topics__heading___tpwME","isParent":"dropdown-all-topics__is-parent___kezpI","childList":"dropdown-all-topics__child-list___SdGes","archiveLink":"dropdown-all-topics__archive-link___DL3yo"},"newsletter-signup":{"wrapper":"newsletter-signup__wrapper___sbuqh","background":"newsletter-signup__background___-tOWa","container":"newsletter-signup__container___m4629","heading":"newsletter-signup__heading___yk04T","message":"newsletter-signup__message___nDsYK","formWrapper":"newsletter-signup__form-wrapper___yHae1","thankyou":"newsletter-signup__thankyou___96com","error":"newsletter-signup__error___nxj5Q"},"dropdown-single-topic":{"dropdown":"dropdown-single-topic__dropdown___3eDGp","noList":"dropdown-single-topic__no-list___zfTPy","topics":"dropdown-single-topic__topics___Z5-Hx","topLevel":"dropdown-single-topic__top-level___4ttkp","heading":"dropdown-single-topic__heading___JST8R","childList":"dropdown-single-topic__child-list___eS8rS","item":"dropdown-single-topic__item___wvtt2","articles":"dropdown-single-topic__articles___gI5om","articleList":"dropdown-single-topic__article-list___lfTEY","title":"dropdown-single-topic__title___W4NNd","eyebrow":"dropdown-single-topic__eyebrow___0Ev-g","meta":"dropdown-single-topic__meta___9Fbke","byline":"dropdown-single-topic__byline___GR-ye","date":"dropdown-single-topic__date___-d2BU","wrapper":"dropdown-single-topic__wrapper___NDTa-"},"article-footer":{"wrapper":"article-footer__wrapper___eChRS","withSidebar":"article-footer__with-sidebar___9oDuK","feedback":"article-footer__feedback___sNXjz","printPowerWordsBtn":"article-footer__print-power-words-btn___NnOdr","powerWords":"article-footer__power-words___V5fm0","pwHeader":"article-footer__pw-header___cii2S","pwHeading":"article-footer__pw-heading___-GYtA","pwAbout":"article-footer__pw-about___D7W9R","notes":"article-footer__notes___hHarv","editorsNote":"article-footer__editors-note___8g2TJ","editorsNoteHeading":"article-footer__editors-note-heading___XEEiZ","citations":"article-footer__citations___wiYwh","citationsHeading":"article-footer__citations-heading___6rnra"},"snhs-guide-river":{"more":"snhs-guide-river__more___qPAQp","river":"snhs-guide-river__river___z-wqj","heading":"snhs-guide-river__heading___zYzTz","item":"snhs-guide-river__item___hsdHr","icon":"snhs-guide-river__icon___SIvf8","activity":"snhs-guide-river__activity___5F4k5","comprehension":"snhs-guide-river__comprehension___bDcql","discussion":"snhs-guide-river__discussion___0NxU9","graphOfTheWeek":"snhs-guide-river__graph-of-the-week___SPGEf","eyebrow":"snhs-guide-river__eyebrow___isBxi","componentType":"snhs-guide-river__component-type___IWQ6z","title":"snhs-guide-river__title___hsONw","excerpt":"snhs-guide-river__excerpt___QAmCx","sidebar":"snhs-guide-river__sidebar___YpQ9E"},"snhs-eg-component-header":{"wrapper":"snhs-eg-component-header__wrapper___Wzxi0","container":"snhs-eg-component-header__container___RZko4","icon":"snhs-eg-component-header__icon___V8TvF","activity":"snhs-eg-component-header__activity___qxj5H","comprehension":"snhs-eg-component-header__comprehension___b1Wax","discussion":"snhs-eg-component-header__discussion___8lhLf","graphOfTheWeek":"snhs-eg-component-header__graph-of-the-week___G-XWq","content":"snhs-eg-component-header__content___SsNy1","eyebrow":"snhs-eg-component-header__eyebrow___hAqvt","componentType":"snhs-eg-component-header__component-type___JoBSp","title":"snhs-eg-component-header__title___4FZkX","parent":"snhs-eg-component-header__parent___1CfOM","downloads":"snhs-eg-component-header__downloads___H-A42","download":"snhs-eg-component-header__download___ryNEj"},"form-assembly-form":[],"topics-menu":[],"newsletter-subscribe":{"wrapper":"newsletter-subscribe__wrapper___J97NH","background":"newsletter-subscribe__background___W-BDi","container":"newsletter-subscribe__container___sLq8W","heading":"newsletter-subscribe__heading___ofa1g","message":"newsletter-subscribe__message___iBN36","link":"newsletter-subscribe__link___KNzuK"},"newsletter-global-subscribe":{"wrapper":"newsletter-global-subscribe__wrapper___jkYtT","container":"newsletter-global-subscribe__container___fVkwE","header":"newsletter-global-subscribe__header___QroCr","heading":"newsletter-global-subscribe__heading___yKH29","message":"newsletter-global-subscribe__message___LDt-P","link":"newsletter-global-subscribe__link___XvwhK"},"header-search":{"component":"header-search__component___HaWFk","wrapper":"header-search__wrapper___aPFS5","isSnhs":"header-search__is-snhs___NXeUi","form":"header-search__form___jUQvh","icon":"header-search__icon___XDwNR","search":"header-search__search___rDKZR","input":"header-search__input___mXBSe","toggle":"header-search__toggle___vQkrq","toggleInner":"header-search__toggle-inner___5P7ST","open":"header-search__open___9MajL","close":"header-search__close___-Jb-H"},"modal-access":[],"snc-menu":{"wrapper":"snc-menu__wrapper___ZXUIu","menu":"snc-menu__menu___Y8xvN","menuItem":"snc-menu__menu-item___GF5jG","icon":"snc-menu__icon___EGqmF","menuItemLink":"snc-menu__menu-item-link___hYCZx","current":"snc-menu__current___RkRyA","popup":"snc-menu__popup___nJOd4","close":"snc-menu__close___hidmh","submenu":"snc-menu__submenu___mXcHh","submenuItem":"snc-menu__submenu-item___kpMcj","submenuItemLink":"snc-menu__submenu-item-link___dRNAL","more":"snc-menu__more___FpA-D","priority":"snc-menu__priority___UDdcr","overflow":"snc-menu__overflow___spBUo","active":"snc-menu__active___19vBW","activeOverflow":"snc-menu__active-overflow___0AM9R"},"photoswipe":[],"default-skin":[],"topics-megamenu":{"wrapper":"topics-megamenu__wrapper___EwIIi","list":"topics-megamenu__list___gr654","item":"topics-megamenu__item___lTAvR","link":"topics-megamenu__link___3zA1X"},"issue-detail":{"container":"issue-detail__container___wT8fW","hasFeatures":"issue-detail__has-features___FpjaQ","hasPdfEmbed":"issue-detail__has-pdf-embed___voage","digitalMagazineWrapper":"issue-detail__digital-magazine-wrapper___Km6zr","snPdfEmbed":"issue-detail__sn-pdf-embed___Dwnkq","timelineWrapper":"issue-detail__timeline-wrapper___lFjaL","figure":"issue-detail__figure___2a5xL","thumbnail":"issue-detail__thumbnail___gquuM","listWrapper":"issue-detail__list-wrapper___ZgKMs","list":"issue-detail__list___k6Nux","listItem":"issue-detail__list-item___M9-NO","subscribe":"issue-detail__subscribe___FrSEz"},"date-picker":[],"rich-text":[],"editor":[]}</script>
			<script>
			window.dataLayer = window.dataLayer || [];
		</script>

		<!-- Google Tag Manager -->
		<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
					new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
				j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
				'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
			})(window,document,'script','dataLayer',"GTM-KQBZ8HP");</script>
		<!-- End Google Tag Manager -->
	
		<script>
		/* eslint-disable */
		(function(d) {
		var config = {
			kitId: "ybw0dqe",
			scriptTimeout: 3000,
			async: true
		},
		h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,'')+' wf-inactive';},config.scriptTimeout),tk=d.createElement('script'),f=false,s=d.getElementsByTagName('script')[0],a;h.className+=' wf-loading';tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!='complete'&&a!='loaded')return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
		})(document);
	</script>
	
		<style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style>
	<!-- Jetpack Site Verification Tags -->
<meta name="google-site-verification" content="NXCoG37edJhcKkUouk5eKriFof-LhSUf4RS1hlkpcTc">

<!-- Search Engine Optimization by Rank Math - https://rankmath.com/ -->
<title>You’ve probably been tricked by fake news and don’t know it | Science News</title>
<meta name="description" content="In the fight against falsified facts, the human brain is both the weakest link and our only hope.">
<meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large">
<link rel="canonical" href="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:title" content="You’ve probably been tricked by fake news and don’t know it">
<meta property="og:description" content="In the fight against falsified facts, the human brain is both the weakest link and our only hope.">
<meta property="og:url" content="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it">
<meta property="og:site_name" content="Science News">
<meta property="article:publisher" content="https://www.facebook.com/sciencenews">
<meta property="og:updated_time" content="2019-11-15T10:22:23-05:00">
<meta property="og:image" content="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2016/12/120216_ee_fakenews_free.jpg">
<meta property="og:image:secure_url" content="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2016/12/120216_ee_fakenews_free.jpg">
<meta property="og:image:width" content="860">
<meta property="og:image:height" content="460">
<meta property="og:image:alt" content="illustration of brain as marionette">
<meta property="og:image:type" content="image/jpeg">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="You’ve probably been tricked by fake news and don’t know it">
<meta name="twitter:description" content="In the fight against falsified facts, the human brain is both the weakest link and our only hope.">
<meta name="twitter:site" content="@sciencenews">
<meta name="twitter:creator" content="@sciencenews">
<meta name="twitter:image" content="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2016/12/120216_ee_fakenews_free.jpg">
<!-- /Rank Math WordPress SEO plugin -->

<link rel="dns-prefetch" href="https://www.sciencenews.org">
<link rel="dns-prefetch" href="//stats.wp.com">
<link href="//www.google-analytics.com" rel="dns-prefetch">
<link href="//load.sumo.com" rel="dns-prefetch">
<link href="//a.pub.network" rel="dns-prefetch">
<link href="https://use.typekit.net" rel="preconnect">
<link href="https://www.googletagmanager.com" rel="preconnect">
<link rel="preconnect" href="//i0.wp.com">
<link rel="alternate" type="application/rss+xml" title="Science News » Feed" href="https://www.sciencenews.org/feed">
<link rel="alternate" type="application/rss+xml" title="Science News » Comments Feed" href="https://www.sciencenews.org/comments/feed">
<link rel="preload" href="https://www.sciencenews.org/wp-content/themes/sciencenews/client/src/fonts/charter_bold.woff2" class="wp-asset-manager sciencenews-charter-bold" as="font" media="all" type="font/woff2" crossorigin><script class="wp-asset-manager global" type="text/javascript">window.amScripts = window.amScripts || {}; window.amScripts["global"] = {"sitePrefix":"sn"}</script><link rel="stylesheet" id="debug-bar-searchpress-css" href="https://www.sciencenews.org/wp-content/plugins/debug-bar-searchpress/css/debug-bar-searchpress.css?ver=1.0.1" type="text/css" media="all">
<link rel="stylesheet" id="wp-block-library-css" href="https://www.sciencenews.org/wp-includes/css/dist/block-library/style.min.css?ver=6.7.2" type="text/css" media="all">
<style id="science-news-interactive-style-inline-css" type="text/css">
.wp-block-science-news-interactive .cesium-infoBox{min-width:340px}.wp-block-science-news-interactive .cesium-infoBox-camera{display:none}.wp-block-science-news-interactive .cesium-viewer{height:90vh}

</style>
<style id="co-authors-plus-coauthors-style-inline-css" type="text/css">
.wp-block-co-authors-plus-coauthors.is-layout-flow [class*=wp-block-co-authors-plus]{display:inline}

</style>
<style id="co-authors-plus-avatar-style-inline-css" type="text/css">
.wp-block-co-authors-plus-avatar :where(img){height:auto;max-width:100%;vertical-align:bottom}.wp-block-co-authors-plus-coauthors.is-layout-flow .wp-block-co-authors-plus-avatar :where(img){vertical-align:middle}.wp-block-co-authors-plus-avatar:is(.alignleft,.alignright){display:table}.wp-block-co-authors-plus-avatar.aligncenter{display:table;margin-inline:auto}

</style>
<style id="co-authors-plus-image-style-inline-css" type="text/css">
.wp-block-co-authors-plus-image{margin-bottom:0}.wp-block-co-authors-plus-image :where(img){height:auto;max-width:100%;vertical-align:bottom}.wp-block-co-authors-plus-coauthors.is-layout-flow .wp-block-co-authors-plus-image :where(img){vertical-align:middle}.wp-block-co-authors-plus-image:is(.alignfull,.alignwide) :where(img){width:100%}.wp-block-co-authors-plus-image:is(.alignleft,.alignright){display:table}.wp-block-co-authors-plus-image.aligncenter{display:table;margin-inline:auto}

</style>
<style id="global-styles-inline-css" type="text/css">
:root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #121212;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #FFFFFF;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--gray-dark: #31313B;--wp--preset--color--gray-mid: #556B7D;--wp--preset--color--gray-light: #F3F6F9;--wp--preset--color--wildfire: #D4441F;--wp--preset--color--green: #219653;--wp--preset--color--aqua: #17ABA0;--wp--preset--color--blue: #176CAB;--wp--preset--color--society-blue: #005587;--wp--preset--color--deep-blue: #10254F;--wp--preset--color--violet: #7D1992;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 0.8125rem;--wp--preset--font-size--medium: 1.625rem;--wp--preset--font-size--large: 2.25rem;--wp--preset--font-size--x-large: 42px;--wp--preset--font-size--normal: 1rem;--wp--preset--font-size--huge: 2.875rem;--wp--preset--font-family--primary: "museo-sans", helvetica, arial, sans-serif;--wp--preset--font-family--secondary: charter, georgia, serif;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:root { --wp--style--global--content-size: var(--block-max-width, 42.5rem);--wp--style--global--wide-size: var(--block-wide-max-width, 55.625rem); }:where(body) { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}.is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}.is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}.is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}.is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}.is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}.is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}.is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}body{padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;}a:where(:not(.wp-element-button)){text-decoration: underline;}:root :where(.wp-element-button, .wp-block-button__link){background-color: #32373c;border-width: 0;color: #fff;font-family: inherit;font-size: inherit;line-height: inherit;padding: calc(0.667em + 2px) calc(1.333em + 2px);text-decoration: none;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-gray-dark-color{color: var(--wp--preset--color--gray-dark) !important;}.has-gray-mid-color{color: var(--wp--preset--color--gray-mid) !important;}.has-gray-light-color{color: var(--wp--preset--color--gray-light) !important;}.has-wildfire-color{color: var(--wp--preset--color--wildfire) !important;}.has-green-color{color: var(--wp--preset--color--green) !important;}.has-aqua-color{color: var(--wp--preset--color--aqua) !important;}.has-blue-color{color: var(--wp--preset--color--blue) !important;}.has-society-blue-color{color: var(--wp--preset--color--society-blue) !important;}.has-deep-blue-color{color: var(--wp--preset--color--deep-blue) !important;}.has-violet-color{color: var(--wp--preset--color--violet) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-gray-dark-background-color{background-color: var(--wp--preset--color--gray-dark) !important;}.has-gray-mid-background-color{background-color: var(--wp--preset--color--gray-mid) !important;}.has-gray-light-background-color{background-color: var(--wp--preset--color--gray-light) !important;}.has-wildfire-background-color{background-color: var(--wp--preset--color--wildfire) !important;}.has-green-background-color{background-color: var(--wp--preset--color--green) !important;}.has-aqua-background-color{background-color: var(--wp--preset--color--aqua) !important;}.has-blue-background-color{background-color: var(--wp--preset--color--blue) !important;}.has-society-blue-background-color{background-color: var(--wp--preset--color--society-blue) !important;}.has-deep-blue-background-color{background-color: var(--wp--preset--color--deep-blue) !important;}.has-violet-background-color{background-color: var(--wp--preset--color--violet) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-gray-dark-border-color{border-color: var(--wp--preset--color--gray-dark) !important;}.has-gray-mid-border-color{border-color: var(--wp--preset--color--gray-mid) !important;}.has-gray-light-border-color{border-color: var(--wp--preset--color--gray-light) !important;}.has-wildfire-border-color{border-color: var(--wp--preset--color--wildfire) !important;}.has-green-border-color{border-color: var(--wp--preset--color--green) !important;}.has-aqua-border-color{border-color: var(--wp--preset--color--aqua) !important;}.has-blue-border-color{border-color: var(--wp--preset--color--blue) !important;}.has-society-blue-border-color{border-color: var(--wp--preset--color--society-blue) !important;}.has-deep-blue-border-color{border-color: var(--wp--preset--color--deep-blue) !important;}.has-violet-border-color{border-color: var(--wp--preset--color--violet) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;}.has-normal-font-size{font-size: var(--wp--preset--font-size--normal) !important;}.has-huge-font-size{font-size: var(--wp--preset--font-size--huge) !important;}.has-primary-font-family{font-family: var(--wp--preset--font-family--primary) !important;}.has-secondary-font-family{font-family: var(--wp--preset--font-family--secondary) !important;}
:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}
:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}
:root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;}
</style>
<link rel="stylesheet" id="sciencenews-single-css" href="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/css/single.min.css?ver=59ed59cbdefa78327edc121220231132" type="text/css" media="all">
<link rel="stylesheet" id="sciencenews-rich-text-css-css" href="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/css/rich-text.min.css?ver=3cd6fde73f67bb0c000c121220231132" type="text/css" media="all">
<link rel="stylesheet" id="sciencenews-modal-conversion-css" href="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/css/modal-conversion.min.css?ver=ed5125da091240ee7ff4121220231132" type="text/css" media="all">
<link rel="stylesheet" id="sciencenews-ab-test-css-css" href="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/css/ab-test.min.css?ver=1c7db92f07f832278b6b121220231132" type="text/css" media="all">
<link rel="stylesheet" id="sciencenews-legacy-slideshow-css-css" href="https://www.sciencenews.org/wp-content/themes/sciencenews/client/legacy/css/slideshow.css?ver=1.0.1" type="text/css" media="all">
<style id="akismet-widget-style-inline-css" type="text/css">

			.a-stats {
				--akismet-color-mid-green: #357b49;
				--akismet-color-white: #fff;
				--akismet-color-light-grey: #f6f7f7;

				max-width: 350px;
				width: auto;
			}

			.a-stats * {
				all: unset;
				box-sizing: border-box;
			}

			.a-stats strong {
				font-weight: 600;
			}

			.a-stats a.a-stats__link,
			.a-stats a.a-stats__link:visited,
			.a-stats a.a-stats__link:active {
				background: var(--akismet-color-mid-green);
				border: none;
				box-shadow: none;
				border-radius: 8px;
				color: var(--akismet-color-white);
				cursor: pointer;
				display: block;
				font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
				font-weight: 500;
				padding: 12px;
				text-align: center;
				text-decoration: none;
				transition: all 0.2s ease;
			}

			/* Extra specificity to deal with TwentyTwentyOne focus style */
			.widget .a-stats a.a-stats__link:focus {
				background: var(--akismet-color-mid-green);
				color: var(--akismet-color-white);
				text-decoration: none;
			}

			.a-stats a.a-stats__link:hover {
				filter: brightness(110%);
				box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.16);
			}

			.a-stats .count {
				color: var(--akismet-color-white);
				display: block;
				font-size: 1.5em;
				line-height: 1.4;
				padding: 0 13px;
				white-space: nowrap;
			}
		
</style>
<link rel="stylesheet" id="social-logos-css" href="https://www.sciencenews.org/wp-content/plugins/jetpack/_inc/social-logos/social-logos.min.css?ver=14.3" type="text/css" media="all">
<script type="text/javascript" src="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/js/modal-conversion.bundle.min.js?ver=fec06a1d7f84f78311c3121220231132" id="sciencenews-modal-conversion-js" async data-wp-strategy="async"></script>
<script type="text/javascript" src="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/js/ab-test.bundle.min.js?ver=4fc721415b02bb7bc498121220231132" id="sciencenews-ab-test-js-js"></script>
<link rel="https://api.w.org/" href="https://www.sciencenews.org/wp-json/"><link rel="alternate" title="JSON" type="application/json" href="https://www.sciencenews.org/wp-json/wp/v2/blog/39834"><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.sciencenews.org/xmlrpc.php?rsd">
<meta name="generator" content="WordPress 6.7.2">
<link rel="shortlink" href="https://www.sciencenews.org/?p=39834">
<link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://www.sciencenews.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.sciencenews.org%2Fblog%2Fscience-the-public%2Fyouve-probably-been-tricked-fake-news-and-dont-know-it">
<link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://www.sciencenews.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.sciencenews.org%2Fblog%2Fscience-the-public%2Fyouve-probably-been-tricked-fake-news-and-dont-know-it&amp;format=xml">
	<style>img#wpstats{display:none}</style>
			<!-- Freestar -->
		<style>
		body {
			--fsAddBuffer: 22px;
		}
		[id='sciencenews-org_leaderboard_incontent'],
		[id='sciencenews-org_leaderboard_atf'],
		[id='sciencenews-org_siderail_right'],
		[id='sciencenews-org_leaderboard_btf'],
		[id='sciencenews-org_sponsored_1'],
		[id='sciencenews-org_sponsored_2'],
		[id='sciencenews-org_sponsored_3'],
		[id='sciencenews-org_sponsored_4'],
		[id='sciencenews-org_siderail_right_2'] {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;
			min-height: calc(var(--height) + var(--fsAddBuffer));
			width: 100%;
		}
		[id='sciencenews-org_leaderboard_atf'] {
			--height: 250px;
		}
		[id='sciencenews-org_leaderboard_btf'] {
			--height: 250px;
		}
		[id='sciencenews-org_leaderboard_incontent'] {
			--height: 50px;
		}
		[id='sciencenews-org_siderail_right'] {
			--height: 250px;
		}
		[id='sciencenews-org_sponsored_1'] {
			--height: 275px;
		}
		[id='sciencenews-org_sponsored_2'] {
			--height: 275px;
		}
		[id='sciencenews-org_sponsored_3'] {
			--height: 275px;
		}
		[id='sciencenews-org_sponsored_4'] {
			--height: 275px;
		}
		@media only screen and (min-width: 768px) {
			[id='sciencenews-org_leaderboard_atf'] {
				--height: 90px;
			}
			[id='sciencenews-org_leaderboard_btf'] {
				--height: 90px;
			}
			[id='sciencenews-org_leaderboard_incontent'] {
				--height: 250px;
			}
			[id='sciencenews-org_siderail_right'] {
				--height: 600px;
			}
			[id='sciencenews-org_siderail_right_2'] {
				--height: 600px;
			}
			[id='sciencenews-org_sponsored_1'] {
				--height: 275px;
			}
			[id='sciencenews-org_sponsored_2'] {
				--height: 275px;
			}
			[id='sciencenews-org_sponsored_3'] {
				--height: 275px;
			}
			[id='sciencenews-org_sponsored_4'] {
				--height: 275px;
			}
		}
		@media only screen and (min-width: 987px) {
			[id='sciencenews-org_leaderboard_atf'] {
				--height: 250px;
			}
			[id='sciencenews-org_leaderboard_btf'] {
				--height: 250px;
			}
		}
		@media only screen and (min-width: 1400px) {
			[id='sciencenews-org_siderail_right'] {
				--height: 600px;
			}
			[id='sciencenews-org_siderail_right_2'] {
				--height: 600px;
			}
		}
	</style>
		<script data-cfasync="false" type="text/javascript">
		(()=>{"use strict";var t={455:(t,e,n)=>{n.d(e,{Z:()=>c});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([t.id,'div._1x7oe5p{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:999999}div._1x7oe5p *{box-sizing:border-box}div._1x7oe5p div._1tkdorm{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;justify-content:flex-start;min-height:25vh;width:50%;background-color:#fff;border:none;border-radius:1em;box-shadow:0 0 10px rgba(0,0,0,.3);text-align:center;font-size:13px;font-family:Arial,Helvetica,sans-serif;font-weight:bold;line-height:2;color:#000}div._1x7oe5p div._1tkdorm *:before,div._1x7oe5p div._1tkdorm *:after{content:"";display:none}@media screen and (max-width: 479px){div._1x7oe5p div._1tkdorm{font-size:13px;width:90%}}@media screen and (min-width: 480px){div._1x7oe5p div._1tkdorm{font-size:14px;width:80%}}@media screen and (min-width: 608px){div._1x7oe5p div._1tkdorm{font-size:14px;width:70%}}@media screen and (min-width: 960px){div._1x7oe5p div._1tkdorm{font-size:16px;width:70%}}@media screen and (min-width: 1200px){div._1x7oe5p div._1tkdorm{font-size:16px;width:840px}}div._1x7oe5p div._1tkdorm header{width:100%;background-color:rgba(0,0,0,0);border:0;color:inherit;display:block;font-size:1em;font-family:inherit;letter-spacing:normal;margin:0;opacity:1;outline:none;padding:1em 2em;position:static;text-align:center}div._1x7oe5p div._1tkdorm header img{display:inline;margin:0 0 16px 0;padding:0;max-width:240px;max-height:60px}div._1x7oe5p div._1tkdorm header h2{display:block;line-height:1.3;padding:0;font-family:inherit;font-weight:normal;font-style:normal;text-decoration:initial;text-align:center;font-size:1.75em;margin:0;color:inherit}div._1x7oe5p div._1tkdorm header h2:not(img+*){margin-top:30px}div._1x7oe5p div._1tkdorm header span.zw3zih{position:absolute;top:0;right:15px;font-size:2em;font-weight:normal;cursor:pointer;color:inherit}div._1x7oe5p div._1tkdorm header span.zw3zih:hover{filter:brightness(115%)}div._1x7oe5p div._1tkdorm section{width:100%;margin:0;padding:1em 2em;text-align:center;font-family:inherit;color:inherit;background:rgba(0,0,0,0)}div._1x7oe5p div._1tkdorm section p{display:block;margin:0 0 1em 0;line-height:1.5;text-align:center;font-size:1em;font-family:inherit;color:inherit;overflow-wrap:break-word;font-weight:normal;font-style:normal;text-decoration:initial}div._1x7oe5p div._1tkdorm section p:last-of-type{margin:0 0 1.5em 0}div._1x7oe5p div._1tkdorm section.ndfh07{display:block}div._1x7oe5p div._1tkdorm section.ndfh07.gez19w{display:none}div._1x7oe5p div._1tkdorm section.ndfh07 a.q769eo._1h8hdqe{color:var(--_1h8hdqe)}div._1x7oe5p div._1tkdorm section.ndfh07 a.q769eo._1wo6gz5{text-decoration:var(--_1wo6gz5)}div._1x7oe5p div._1tkdorm section.ndfh07 a.q769eo.m19f8t:visited{color:var(--m19f8t)}div._1x7oe5p div._1tkdorm section.ndfh07 div._147ewri{display:block;margin:.75em;padding:0}div._1x7oe5p div._1tkdorm section.ndfh07 div._147ewri p._1ehkt64{max-width:80%;margin:0 auto;padding:0;font-size:.85em;color:inherit;font-style:normal;font-weight:normal;cursor:pointer}div._1x7oe5p div._1tkdorm section._1lq9b0z{display:block}div._1x7oe5p div._1tkdorm section._1lq9b0z.gez19w{display:none}div._1x7oe5p div._1tkdorm section._1lq9b0z h4.kt6pt5{color:inherit;text-align:initial;font-weight:normal;font-family:inherit;font-size:1.125em;margin:0 0 .5em .5em}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc{display:flex;margin:1.5em 0}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc ul.snp44k{max-height:300px;flex:2;list-style:none;overflow-y:auto;margin:0 1em 0 0;padding-inline-start:0}@media screen and (min-width: 608px){div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc ul.snp44k{flex:1;margin:0 2em 0 0}}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc ul.snp44k li{padding:.75em;cursor:pointer;background:rgba(0,0,0,.05);font-weight:bold}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc ul.snp44k li:hover{background:rgba(0,0,0,.075)}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc ul.snp44k li.plelsp{color:var(--_1es64bu);background:var(--me7zje)}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc div.m9fhjc{max-height:300px;overflow-y:auto;flex:3;display:flex;flex-direction:column;justify-content:space-between;text-align:initial}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc div.m9fhjc ol._1v529iy{display:none;list-style-type:decimal;text-align:initial;padding:0;margin:0 2em;font-weight:normal}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc div.m9fhjc ol._1v529iy.plelsp{display:block}div._1x7oe5p div._1tkdorm section._1lq9b0z div._15c9yzc div.m9fhjc p{margin:1em 0 0;text-align:inherit;font-style:italic}div._1x7oe5p div._1tkdorm section._1lq9b0z button.s4mudg{font-size:1em;text-transform:initial}div._1x7oe5p div._1tkdorm button._1kssuc{width:auto;height:auto;max-width:90%;cursor:pointer;display:inline-block;letter-spacing:normal;margin:.75em;opacity:1;outline:none;overflow-wrap:break-word;font-family:inherit;font-weight:normal;font-style:normal;text-decoration:initial;text-transform:uppercase;text-align:center;color:#fff;font-size:1.15em;padding:.75em 2em;padding-inline:2em;padding-block:.75em;line-height:normal;background:#40c28a;border:none;border-radius:.25em;box-shadow:none}div._1x7oe5p div._1tkdorm button._1kssuc:hover{filter:brightness(115%);box-shadow:none}div._1x7oe5p div._1tkdorm a._1h94ia9{height:50px;width:50px;position:absolute;bottom:5px;right:5px}div._1x7oe5p div._1tkdorm a._1h94ia9 img{position:initial;height:100%;width:100%;filter:drop-shadow(1px 1px 1px var(--_1vcjqx8))}',""]);const c=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(a[s]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);r&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),e.push(d))}},e}},81:t=>{t.exports=function(t){return t[1]}},379:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var i={},a=[],c=0;c<t.length;c++){var s=t[c],l=r.base?s[0]+r.base:s[0],d=i[l]||0,u="".concat(l," ").concat(d);i[l]=d+1;var f=n(u),p={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==f)e[f].references++,e[f].updater(p);else{var h=o(p,r);r.byIndex=c,e.splice(c,0,{identifier:u,updater:h,references:1})}a.push(u)}return a}function o(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var i=r(t=t||[],o=o||{});return function(t){t=t||[];for(var a=0;a<i.length;a++){var c=n(i[a]);e[c].references--}for(var s=r(t,o),l=0;l<i.length;l++){var d=n(i[l]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}i=s}}},569:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+=`\n/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0,(()=>{const t={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let e;const r=new Uint8Array(16);function o(){if(!e&&(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(r)}const i=[];for(let t=0;t<256;++t)i.push((t+256).toString(16).slice(1));function a(t,e=0){return(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase()}const c=function(e,n,r){if(t.randomUUID&&!n&&!e)return t.randomUUID();const i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){r=r||0;for(let t=0;t<16;++t)n[r+t]=i[t];return n}return a(i)};var s=n(379),l=n.n(s),d=n(795),u=n.n(d),f=n(569),p=n.n(f),h=n(565),v=n.n(h),m=n(216),y=n.n(m),g=n(589),b=n.n(g),x=n(455),w={};w.styleTagTransform=b(),w.setAttributes=v(),w.insert=p().bind(null,"head"),w.domAPI=u(),w.insertStyleElement=y();l()(x.Z,w);x.Z&&x.Z.locals&&x.Z.locals;function k(t){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}function L(){L=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new T(r||[]);return o(a,"_invoke",{value:I(t,n,c)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var f="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function y(){}function g(){}function b(){}var x={};l(x,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(O([])));E&&E!==n&&r.call(E,a)&&(x=E);var C=b.prototype=y.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==k(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function I(e,n,r){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=P(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=u(e,n,r);if("normal"===l.type){if(o=r.done?v:p,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function P(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=u(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function O(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(k(e)+" is not iterable")}return g.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,s,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},S(A.prototype),l(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new A(d(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(C),l(C,s,"Generator"),l(C,a,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:O(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function E(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}var C="ZnMtYWRiLWVycg",S=function(){var t,e=(t=L().mark((function t(){var e,n,r,o,i;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(document.body){t.next=3;break}return t.next=3,new Promise((function(t){return document.addEventListener("DOMContentLoaded",t)}));case 3:for(e=["YWQ=","YmFubmVyLWFk","YmFubmVyX2Fk","YmFubmVyLWFkLWNvbnRhaW5lcg==","YWQtc2lkZXJhaWw=","c3RpY2t5YWRz","aW1wcnRudC1jbnQ="],(n=document.createElement("div")).textContent=Math.random().toString(),n.setAttribute(atob("ZGF0YS1mcmVlc3Rhci1hZA=="),"123"),r=0;r<e.length;r++)n.classList.add(atob(e[r]));if(n.style.display="block",document.body.appendChild(n),o=window.getComputedStyle(n),i=null==o?void 0:o.display,n.remove(),"none"!==i){t.next=15;break}throw new Error(C);case 15:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){E(i,r,o,a,c,"next",t)}function c(t){E(i,r,o,a,c,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),A=function(t){return new Promise((function(e,n){var r=document.createElement("script");try{r.src=t,r.addEventListener("load",(function(){e()})),r.addEventListener("error",(function(){n(C)})),document.head.appendChild(r)}catch(t){n(t)}finally{r.remove()}}))};function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function P(){P=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new T(r||[]);return o(a,"_invoke",{value:S(t,n,c)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var f="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function y(){}function g(){}function b(){}var x={};l(x,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(O([])));k&&k!==n&&r.call(k,a)&&(x=k);var L=b.prototype=y.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==I(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,n,r){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=A(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=u(e,n,r);if("normal"===l.type){if(o=r.done?v:p,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function A(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=u(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function O(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(I(e)+" is not iterable")}return g.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(C.prototype),l(C.prototype,c,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new C(d(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(L),l(L,s,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:O(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Y(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function _(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Y(i,r,o,a,c,"next",t)}function c(t){Y(i,r,o,a,c,"throw",t)}a(void 0)}))}}function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=r.key,i=void 0,i=function(t,e){if("object"!==I(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===I(i)?i:String(i)),r)}var o,i}var O=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=null,this.langCode=null,this.languages=this.getUserPreferredLanguages(e)}var e,n,r,o,i,a;return e=t,n=[{key:"init",value:(a=_(P().mark((function t(){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fetchConfig();case 2:this.config=t.sent,null!==this.config&&(this.langCode=this.getFirstSupportedLanguage(this.languages),this.observe());case 4:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchConfig",value:(i=_(P().mark((function t(){var e,n,r,o,i,a;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(e=["Y29uZmlnLmNvbnRlbnQtc2V0dGluZ3MuY29t","Y29uZmlnLnNpdGUtY29uZmlnLmNvbQ==","29uZmlnLmZyZmlndXJlcy5jb20="]).length-1,r=Number.isNaN(Number(localStorage.getItem("fs.cdi")))?0:Number(localStorage.getItem("fs.cdi")),o=Number.isNaN(Number(localStorage.getItem("fs.cfc")))?0:Number(localStorage.getItem("fs.cfc")),i=atob(e[r]),a="https://".concat(i,"/sciencenews-org.json"),t.prev=6,t.next=9,fetch(a);case 9:return t.abrupt("return",t.sent.json());case 12:return t.prev=12,t.t0=t.catch(6),++o>=3&&(o=0,r++),r>n&&(r=0),t.abrupt("return",null);case 18:return t.prev=18,localStorage.setItem("fs.cdi",r),localStorage.setItem("fs.cfc",o),t.finish(18);case 22:case"end":return t.stop()}}),t,null,[[6,12,18,22]])}))),function(){return i.apply(this,arguments)})},{key:"killScroll",value:function(t){if(t.isScrollDisabled){this.existingOverflow=document.body.style.overflow,document.body.style.overflow="hidden";var e=window.pageYOffset||document.documentElement.scrollTop,n=window.pageXOffset||document.documentElement.scrollLeft;document.body.style.top="-".concat(e,"px"),document.body.style.left="-".concat(n,"px"),window.onscroll=function(){window.scrollTo(n,e)}}}},{key:"reviveScroll",value:function(){document.body.style.overflow=this.existingOverflow||"",window.onscroll=function(){}}},{key:"getUserPreferredLanguages",value:function(t){var e=t.languages,n=t.language,r=void 0===e?[n]:e;if(r)return r.map((function(t){var e=t.trim().toLowerCase();if(!e.includes("zh"))return e.split(/-|_/)[0];var n=e.split(/-|_/)[1];return"zh"===e||["hans","cn","sg"].includes(n)?"zh":["hant","hk","mo","tw"].includes(n)?"zh-hant":void 0}))}},{key:"getFirstSupportedLanguage",value:function(t){var e=this,n=["title","paragraphOne","buttonText"],r=t.find((function(t){return n.every((function(n){return!!e.config[n][t]}))}));return void 0!==r?r:"en"}},{key:"getLocalizedTextContent",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t[e];if(void 0===o)throw new Error("Config text not found for text key ".concat(e));return r?null!==(n=o[this.langCode])&&void 0!==n?n:o.en:o[this.langCode]}},{key:"getPixelString",value:function(t){return"number"==typeof t?"".concat(t,"px"):null}},{key:"pickContrastingColorValue",value:function(t,e,n){var r=t.substring(1,7);return.299*parseInt(r.substring(0,2),16)+.587*parseInt(r.substring(2,4),16)+.114*parseInt(r.substring(4,6),16)>=128?e:n}},{key:"generateOverlay",value:function(t){var e=this,n=t.siteId,r=t.isCloseEnabled,o=t.dismissDuration,i=t.dismissDurationPv,a=t.logoUrl,c=t.font,s=t.paragraphTwo,l=t.paragraphThree,d=t.closeText,u=t.linkText,f=t.linkUrl,p=t.textColor,h=t.headerTextColor,v=t.buttonTextColor,m=t.headerBgColor,y=t.bgColor,g=t.buttonBgColor,b=t.borderColor,x=t.borderWidth,w=t.borderRadius,k=t.closeButtonColor,L=t.closeTextColor,E=t.linkTextColor,C=t.linkTextDecoration,S=t.linkVisitedTextColor,A=t.hasFsBranding,I=t.disableInstructions,P=document.createElement("div");P.style.setProperty("--me7zje",g||"#40C28A"),P.style.setProperty("--_1es64bu",v||"#000000"),P.style.setProperty("--_1vcjqx8",this.pickContrastingColorValue(y||"#FFFFFF","white","black")),E&&P.style.setProperty("--_1h8hdqe",E),S&&P.style.setProperty("--m19f8t",S),C&&P.style.setProperty("--_1wo6gz5",C),P.classList.add("_1x7oe5p"),P.id="_2o8yog",P.dir="auto",this.oid=P.id;var Y=document.createElement("div");Y.classList.add("_1tkdorm"),y&&(Y.style.backgroundColor=y),c&&(Y.style.fontFamily=c),p&&(Y.style.color=p);var _=this.getPixelString(w),T=this.getPixelString(x);_&&(Y.style.borderRadius=_),(b||T)&&(Y.style.borderStyle="solid"),b&&(Y.style.borderColor=b),T&&(Y.style.borderWidth=T);var O=document.createElement("header");if(h&&(O.style.color=h),m){O.style.backgroundColor=m;var z=_||"1em";O.style.borderTopLeftRadius=z,O.style.borderTopRightRadius=z}if(a){var j=document.createElement("img");j.src=a,j.alt="Logo",j.onerror=function(){this.style.display="none"},O.appendChild(j)}var H=document.createElement("h2");H.textContent=this.getLocalizedTextContent(t,"title"),O.appendChild(H);var U=document.createElement("section");U.classList.add("ndfh07");var R=document.createElement("p");if(R.textContent=this.getLocalizedTextContent(t,"paragraphOne"),U.appendChild(R),s&&0!==Object.keys(s).length){var F=document.createElement("p");F.textContent=this.getLocalizedTextContent(t,"paragraphTwo"),U.appendChild(F)}if(l&&0!==Object.keys(l).length){var B=document.createElement("p");B.textContent=this.getLocalizedTextContent(t,"paragraphThree"),U.appendChild(B)}var V=u&&this.getLocalizedTextContent(t,"linkText"),q=f&&this.getLocalizedTextContent(t,"linkUrl",!0);if(V&&q){var G=document.createElement("div");G.style.margin="0 0 1em";var N=document.createElement("a");N.classList.add("q769eo"),E&&N.classList.add("_1h8hdqe"),S&&N.classList.add("m19f8t"),C&&N.classList.add("_1wo6gz5"),N.textContent=V,N.href=q,N.target="_blank",G.appendChild(N),U.appendChild(G)}var Q=document.createElement("button");if(Q.classList.add("_1kssuc"),Q.tabIndex=0,Q.textContent=this.getLocalizedTextContent(t,"buttonText"),g&&(Q.style.backgroundColor=g),v&&(Q.style.color=v),Q.onclick=function(){document.querySelector("section.ndfh07").classList.add("gez19w"),document.querySelector("section._1lq9b0z").classList.remove("gez19w")},U.appendChild(Q),r){var D=function(){P.remove(),e.reviveScroll(),o||i?(sessionStorage.removeItem("fs.adb".concat(n||"",".dis")),i?e.updateValues("p"):o&&e.updateValues("dt")):sessionStorage.setItem("fs.adb".concat(n||"",".dis"),"1")},M=document.createElement("span");if(M.classList.add("zw3zih"),M.innerHTML="&times;",M.tabIndex=0,k&&(M.style.color=k),M.addEventListener("click",D),O.appendChild(M),d&&0!==Object.keys(d).length){var W=document.createElement("div");W.classList.add("_147ewri");var J=document.createElement("p");J.classList.add("_1ehkt64"),J.textContent=this.getLocalizedTextContent(t,"closeText"),L&&(J.style.color=L),J.addEventListener("click",D),W.appendChild(J),U.appendChild(W)}}var Z=document.createElement("section");Z.classList.add("_1lq9b0z","gez19w");var X=document.createElement("h4");X.classList.add("kt6pt5"),X.textContent=this.getLocalizedTextContent(t,"instructionsTitle");var K=document.createElement("div");K.classList.add("_15c9yzc");var $=document.createElement("ul");$.classList.add("snp44k");var tt=document.createElement("div");tt.classList.add("m9fhjc"),I.forEach((function(t,n){var r=document.createElement("li");r.onclick=function(){return function(t){for(var e=document.querySelectorAll(".snp44k > li"),n=document.getElementsByClassName("_1v529iy"),r=0;r<n.length;r++)e[r].classList.remove("plelsp"),n[r].classList.remove("plelsp");e[t].classList.add("plelsp"),n[t].classList.add("plelsp")}(n)},r.textContent=e.getLocalizedTextContent(t,"name",!0),$.appendChild(r);var o=document.createElement("ol");o.classList.add("_1v529iy"),0===n&&(r.classList.add("plelsp"),o.classList.add("plelsp")),e.getLocalizedTextContent(t,"steps").forEach((function(t){var e=document.createElement("li");e.textContent=t,o.appendChild(e)})),tt.appendChild(o)}));var et=this.getLocalizedTextContent(t,"disclaimerText"),nt=document.createElement("p");nt.textContent=et,tt.appendChild(nt),K.appendChild($),K.appendChild(tt);var rt=document.createElement("button");if(rt.classList.add("_1kssuc","s4mudg"),rt.textContent=this.getLocalizedTextContent(t,"backButtonText"),g&&(rt.style.backgroundColor=g),v&&(rt.style.color=v),rt.onclick=function(){document.querySelector("section._1lq9b0z").classList.add("gez19w"),document.querySelector("section.ndfh07").classList.remove("gez19w")},Z.appendChild(X),Z.appendChild(K),Z.appendChild(rt),Y.appendChild(O),Y.appendChild(U),Y.appendChild(Z),A){var ot=document.createElement("a");ot.classList.add("_1h94ia9"),ot.href=atob("aHR0cHM6Ly9mcmVlc3Rhci5jb20vYWQtcHJvZHVjdHMvZGVza3RvcC1tb2JpbGUvZnJlZXN0YXItcmVjb3ZlcmVk"),ot.target="_blank";var it=document.createElement("img");it.alt="Logo",it.src=this.pickContrastingColorValue(y||"#FFFFFF","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAMAAAAPkIrYAAACPVBMVEUAAAAdHRocHBoAwogKCgkcHBoOunUcHBoBw4kJxYwcHBocHBocHBocHBocHBocHBoMDAwcyZYMDAsLCwocHBocHBoJCQkcHBobGxocypYdHRsLCwscHBodHRocHBsdHRsdHRscHBsUFBMG4ocTExIWFhUcHBocHBocHBsdHRsXFxYAwogcHBocHBocHBocHBsdHRsSEhEPDw4QEA4RERAcHBodHRsGxIocHBoeHhwaGhkXFxUVFRQSEhEQEA8NDQwLCwoAwogcHBodHRseHhsUFBMUFBMTExESEhIODg0dHRsfHx0fHx0XFxYXFxUWFhUaGhgQEA4REREKCgkCw4kcHBodHRsaGhkcHBoODg0XFxYPDw4PDw4SEhAODg0J1ZkBw4kcHBocHBodHRoiIiAZGRcQxJIWFhQLy4gQEA8Bw4kBwokDw4oDw4kEw4oIxIsIxIsVFRQjIyIXFxUXFxYDroAVxJUWFhUPyZkMxZUZvpoKuakGxIoJxYwHxIsPxY4Kw4wRxZkEooYgIB4mJiUPxo4Iu4cUFBMKuJ0RupofhmchgGQHxIoLxY0LxY1RUU8cx5IVFRQFu40IwpcOzo0Nw4gW0ZARERAEt3AUzY8Ny6ESEhAJwYwH4pUQEA8PyKRK2LcWFhUIyqkClWcQkW8sdWERoXcNuoYWqn4Ps4IlyJgWyZFG06gG03MI04ofyZoEt3AEpoUGvqIXFxUIvaEPDw4I4GsAwogAw4kCv4YQonYdh2cNqXoZkW0ggGUR8h49AAAAt3RSTlMA/fz9Bf4m9fK++ujw6/PhEpcPB+7kCdCqmZQN+fjOwaecX11QTNjErph4+t3b07R/PzUrGdW+vIp1bVlHQxwUC/f3n5BoWykkIMiNhG5kVTQlIhfty6OHaFJPOzgvJw3pu7ayioB5cUMw9PDl39qvqoJ/fHRgQSocFxQK0caaioJpYmBKOTQoJyL08bampKCQjYhxcWhmZF9dW1dUNTMyMCspHRAG8Ne9qqCcjYJ7cmBSUTkqKRN/kiPNAAAHfElEQVRYw9WX9UPbUBDH716TZWvSllFdHdbRUtrCYDBjBszd3d3d3d3d3V3D9G/bvbXdyJKMbr/t8wO8V5rvu7ucPOA/RJjafahv/PguAL7aSn9Vp77wjwxcG1GQMUkSpwHYggpDlLwTBfhr+kzyIjbUNZUOhnniVNKaDX1iExMhsQb+krF+BRuik4uAM/SHVh0QfRUvwEF3YjoUStFqCdPJ4uzGOTD6Qyu8mD4YgVUAE0W0RsdAQcTcmBqQ1RngHyKJiNUAMorWTEm4YSwIKVt9HBuShRjlY0qSvy9PbI4dmTykMTmZdlOHl9e5rRgB6Ix+Os+B4wdCK4xKYYTbH+guM4xUaQPTu/8MgBKMcZOjWNaK1AApmOTfXOhGee0MMCIqSuVF4PTiCPgjC5mtnn5Ve1FOOsGEkWF0lVZiEy07mWfbOnQcpF9VQTxdBOYIIxTEubQoFyvNxIaz9GDK0jmYntZa/s2NF9P3URInmNiODpIaU4u+wspuitU9I4LdwIDpdtdtkkqx+VAQYxRpMRSHWU/QUVwW7ERv3YHDoTAG2aydAQbbQvoKbcTVJFhLUoXytsE+CmAfywigpROLUxL4xGEA9w8fatMKhw5vBYBeIUcfYZIdO4EGT0qiYHXHhAAXlqkFMG4B8BcZ96K9B2gglXkUfSlVBLstqtrcOqplJwAkWEN5n98LukH2gBCx1sPMtlolCz1mIEUHWjbRc00bee7ubdmB1iAZOgBPAlxXm9Vt7Tt06NCeoB/L1OYKWtE6B31IbFebLdfyoS7DyhZF4ZYDIDjsvbNaK27BT9o1N7cFPU9I6w1wNs5hQTf+6icjcChAjx8pPHMciS0534rWoQpV7bf5R1qGRN/Beno+z5wQTa2M8qOer1SoxImZf9RaRQfuzC7D1i7glF3OfIvDOCULlmR315aSFvfTXOsmnbd0S3ZdykdAFesEuS3rD1CO1bntXQos+bnbXIvMspzJrQOuDHVw1pjbJsRBILgcAuQ5ZSEfLKvumWgdoIxo++Fnn2U170dK+YYtOwCmsWHwi0XjyE3L8v3GWl3pjzzt804GRYZy1pIu1nIaehiDFmxqp5Jp/c4aaW0gs2bNhDx9w/HGhZ2Lc/MCuwNUBn/ryru4n+qxbapOqytFawEYM5EXelo3oRZla5zsMjBrq3YATM4bUoKDIRCs1J2xpWu2yvtd7tiCy2Spuhs0nGThsdnVXEmAGsouPS8quJiqhReZxqziOrRhehBwIjY+2IeCARuWq6pBu7mgmUlDxIQzyeRRQAxxUK3jGjBiy0Muxp//hbpD0/ZrsUSgkhaVXjmtfTgMDHn0icRI6tz6PXvWX7r0av2e9QegBYvduDo74ezSSIC4zKtxHhjS7vPXj1xs1iIwoloRFV/JDICYr0y09oTZCqU9+k20vnw78pinWsVzMGCvZLeH2EVyTpQkqRyi1mIYjFETrY+fj8LLfrw+u94FPR6nc4R1MoAjFPB4eIeYBvel8SZa6qejVM3LuZ/LjP1cw6pBsNcCpwonAdQqgomWeoS325U//DQsnYTYBYpCjdk3wFtEAqcbazWrD4Bzvp9KnAM9bhePd/ds3vL6WYN7zbSW5prpCrJsOejoY53A52vuiuJwCbCYDTXTytf2popmdRzomMTnoY/lRmSjWAOCzaYNmH52nCW7jhmEi40mP/Nt5ipbB9CEncGArj+1ZvJeu19/h7eHeTmX/PR4PN9G/6y1i8xaCTr6syTAMKzP731WMjNsH/snH7eQWRV6s5xpqQg88q8A9UQ/j6HfVMvcrJEiPbWv5a3V4aImm5YGm2tt7kdV9A501AbJpQjWtLzYJ7l1UXOtU2TWU9DRnTvTmSXgFwGbUgxCHZtiprVpCV1GDuvvv5KtGKCOVWveBtcfaHd3MdHaQWbtAB0RkdI9hgnQkAmO4vfPSsFQ644ld0fS0k30AXgclAUaOlvDHn6PHmqodZzMOqOT6snKinnLqoLf8ONpKvMMJg1ytU0FVbjOrHqrayCfOl7dIQGvlXp/75SY1GutpOrZqZOySxTy0YrB/x0w0CWNIrE0a3JqLw9L9FOfKA3Z66kaa6nZ6CFr5Y0k5hUri7S3SVV/GRGaRD5cA3HKeENKrY5BFDMfOnpBnivUm/lIu6f1YYjopUHWtw4bwYSLzMYn+UIJS34m2gkL2dV2kSa084M4wUP9JY5zeQ6ZWabw1K+Jo2tYALK8Pr792Z2WnaGHA92d+M3+x/Q3Z4rN2k3goim0N90APYPWysw1vy/PLsW6Gv7IwAyOr+GnTypDMdOtl+bg6qoIomt+Hz5wJohSDFoh4GfSPO6f0GuCDVHJRLv1L706oP+waNiFaJ89ktsklMoYHw2t0zmNth4e4PTqNlcWERljiKI90jQg+3HMi0p3KAjPQgXleb1zuy43esUmT66vHizkDO/hxRC950LpW+VGa11pb/3UiZVIaJ8wCP4Gz4DZImPh8nWLf0Z/dH9/XQNiWY+x8Nd06V/pRsSQzZ0qSztkidauyNoa+FdmjJhfPsebkh2Z2Y0Te1TDf8p3Lm4o6W/+QtYAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAMAAAAPkIrYAAAC8VBMVEUAAAAAwoj+/v7+/v4Awoj+/v4AwYj+/v4Ss4K3t7f9/f38/Pz9/f0IuYT+/v78/Pz+/v79/f39/f39/f0IVT329vb8/Pz8/PwFnoP19fX19fX8/Pz9/f39/f36+vrz8/P19fX19fX39/f7+/sStIP29vYH1b0AwYf8/Pz19fX4+Pj4+Pj09PTx8fEAwoj6+vr6+vr5+fn39/f29vb29va4uLi4uLj9/f37+/sHuoT7+/v5+fn6+vr19fX6+vr39/f09PT6+vr09PS4uLi4uLj09PS4uLj9/f0BwYf9/f38/Pz7+/v29vb4+Pj19fX09PT6+vry8vL4+Pj19fX4+Pjz8/P29vb29vb4+Pjo6Oj4+Pj4+Pjd3d0IuX74+Pjz8/MDiWP8/Pz8/Pz6+vr29vb7+/v39/f4+Pj6+vrv7+/29vb19fXm5ubu7u739/cEXUL6+vr9/f36+vr5+fkHsIT6+vrw8PD09PT6+vr39/cBwIf9/f0BwIf6+voIuYQEvYUGuoQEvIX6+voHuIP39/fu7u7h4eEHsYLt7e37+/v19fXy8vLv7+/x8fHx8fEGvYrBwcHx8fEFr5UBwIcBwYcDvoYHu4UDvob39/cGuoP6+voJtIUJtIMKrYGEXULt7e3y8vLo6OgIVT0IlX3W1tYHtI8Kv2IehWYhgGQDv4cBwIcEv4YFvIYEvob+/v4KtIAFu4T39/cItoELqoAHuoUGvoPn5+fv7+8NrH7JyckIuXwGs4UDrpMItYTHx8f09PTk5OQGyXUJrJIEmYB8fHwHv5V8fHwJroUGxoHi4uIOoHgExIQIVT4Fsoi7u7v5+fkJsnL09PQGmHIGkXkHtGsRoXcJtIAUoXYIrHzg4ODw8PDp6ekFvYbu7u7Dw8MGxYMEnWIDnXIJx3sMpn7Ozs4Dwaa2trYGyYPX19e7u7sUoIQIVD0H14sH2H8Kums/qEe8vLwgpmLh4eEAw4kAwogQonYdh2cDvYUNqXoZkW0ggGSqNDsXAAAA83RSTlMA/vz+/Pf1+qkH8eX1zfjT++rv7i8I4dZiLR4L8+bGaCsVE8unki732I82LyUO+r64ops0FwkF487LyLWzrn9YVT08FA8KBPTv7N3DtaihmIyEfXt2dW5gW1VLQiwZEAYE3trBsKyll5SPiIaGe29tY11STkdGOighGfPo4dLOvLaxsI6Kh399cWtrZFxSQR4cEhLs6N7Jxr2tnJSDdW9kYE0wLiclEvb07OPWzsO0pqKdmoyFfXZzbm1sYlhNTElIRz8/Pj09Ojk1NTAvLCsmJBwaDQn14Mq0qqejo4t6c2xpaGBcWVhXPDsxMCsqKiIZDw1727kAAAAH5klEQVRYw9WXVYDTQBCG/8w2lAoVChQ93N3d3d3d3d3d3d3d3d3d3d2dFn1iQkvpNSkU3vjuIbud5L+d2dnJBP8hmfdVTJzT6YwJ5KzfMEOeUePxbxRJ2SqhmYhkWRwCIutj89iSLHlm/DWZhjXgR8OajYhRpLk4wloNEXNUuVyyyIi/JGaG2CQ3qpYJCh6tkmBSG61ASnup4wiV+IllilYhvmeSOmXuHz5aU7ByXGoJJBdka9QVIVE1DmUdCYUPcTNkswhBz4HifCmRvrclJgxxHPMTkr58KIEqRbHzxOJBoWppOfSObKVbPeJZ5zvrS8YhCuMRlUGRvCaypsQfKGCisFR8TdDaQSJHywLhjKm2nAHKUF4exmosouH3tJP1efgStYKdHC1iQIsBwlImEwpbqQ1+Sx5y1OBLfifZ8xQOlnfVrFQ0bjpqyuMOwbOtPJmUtQzSU7P4CE6WKrFJTIPibtpgYhWpfjcOflqqX+BP+ZcuYQKgEskid5BcECaOeq0GIldqhEIH6hmjJLuqQRezsRYQz0StiiAUUhnlFBhvFXHVpoIl9B2BRXFEJYRGvMhUgxUj69UHqjSVY8FkFKoU77YsdwHmkzNqgCEfJTSgSCnRAri0+HWShfyXJArzcsGCBVF+cuoU/6rwavElADUspvOGKrKojnCkjmbhbKhAObNg23IpBIoN/bHxYVYyV0Z4WlNyIIUcrSBm6yRXCEjSQHC1JUv67oFVRu+IBUMOWw0sSSq5JD9Y2C1pc45zsVlG5cSNrOWnNVg5XHHpJnCQpVYmYiJ6WO5y6ZSZPzxfxbft+hnqEpQWPqLa7YUQ1VQ0pkdr8gn4yO5yRYCatZJL59GKMY30Jkrhs8SlxEBlJWR434PFIuzwmSK5XEmh4nQaSUpTG0wCvUgXbw+V9ZnScrnMkiz2j/P8MA2L6aZP+K1Wf75ng+ecO23dYLBH/llVuokwThZK75k9LcY3+vzMrqV1VOeSetT2VjwaDLSk6j4Xqyj142dxeDtVYrWks+sF1erH9o3ecSFjMmAMNfFOc4quiGqMkwVe6g1UxHT9LwSJ/QFOiAi14aUxFUhZTf5ZsIubFOVBfnd3KiYxvQ4DUzS0VktuaZbfxpEg8gasG2UAklM++DF2qk7xc7OWViedW5o4wTet48xWekhnbx2eq9SGdPqAqrxJEdP1nazWmsq5tRnaJKfRQNYSCGD/JMnNG+oO1NqtLOsi/DG0L+gdpaeznHJpEUjtvrwFTNKd0f3YuZKXtSO81HXqHdMzTCdHRUbOLhX1hv6oGVIALqlXuGUVChPFqb7neOdwAPtEYmjQaQX7GIik2wY/uicUuaKWp+JdwPSOA1QXg6FF7Stut+d5P9bBj64NRBMDMFwY9/Is2w+tQdDk6scfYtKse20V5syZc/+wvz1jT2oFhWpmuRqQsDiwRySHJtk/ff2s7OekTprmFEZRdM0ALu9P1tQXVBVpYwP5qWkQrS/fll77caQ21oOauLJe1tN2dk5YZHkGH6gE6EqNoUkk6dMyDP1Rh1ZfgJpYsWINt7UHTPo6hWMBMyg/CsvWIFruj8uAY70kF/u5G1oM4eejxo7m7W5GAA2KGoJouZfyZUl/5Uil2aTlZy4xjnO9kbfHaME/UAptLZf7MhTuKn5Ks6EmTuy6HO+KYFgznbK4ucG0eoDx+CmtgIrutkaKn/O8wkYDUlBiaNHnV504x5W5GFRUocrAAIrnbUtEStR1OKJqr8unNZTX1VcjXJQS6Pmzro5SnC1LnX+vNaGH5NYdUPdaZitQ01cautOPaaPf+zhQe1nbqTzQgny9Tik9e2s1j/udVu1ivKyjKrshmqU7MheP7AvQPMqgxLDs77QGcuT7qe2jlEer+29cViNX+2hyquDxGstvfd1Jtb2BjV0Ko4z+7VcFoCrlDq61gaO1Vm1uTWWUUKfzbwuNRRMgS0PKF0xrcQRuRt6orGfNkdmhkjQmfMKx2ynNpnFBtG7xstapP2fCqKrS6uaEP3WT2djlypTToKl1mt/USceqtBJTKSCWScRDODpT78xAbpFYU2s6L2umxodKiQTAemoZaMhAzTiJnZRHQ+uFjvs71bI66o1cnEeTs26gpZBV+caMmVUoYgE9Zj/JrV5WDbP8DOhqtNSCilpG5TMiVTQq6x8zpTfppBSICQjPCIt5NBDfKdppfncJ+yJgkVOkix++bZP4rT8r4OiUFY4CnEslOTKajLCZznDMSpFpr++3B542YOIS+BMjm3Dy5sVqSKURhGHkYDdRwULpz8PLdJ3SBe4PF9pWNsodC3gXJqYZEIzhtthK6qdISJFvj/c2KI/7r5rpfxCjVjaRXbkrRjK6YUBw8hqpHNsNbeKQuWwBqIk3xE6xk6dWiktsKoffwv8sW0pwKNqYSCQrNz9c4R7TMocgcwvloCUoLeS8+AN10pPcvA4PMnccEJnInCxX4i3D27Xb2ryx1Ugkh41UfDfEtVPCePgzHaORo02sH6d0dOKGRiHIZrOREJaETePW8UTCSnJFhEShCmayN/d2jVm65e/Yvn37DjXjFfYufKuV9E3YGiIJkttJHzZSXWcz5W1iJjl3DPwNqedymIVzRuuaqeEhc4phTXPoiUyVY+KvSVUprYM4WJF7Zs0aLY6RZahowsEZs+AfyThsUJOSJexGe9YcuctVqlkX/yffAdbeMQWIuBUAAAAAAElFTkSuQmCC"),ot.appendChild(it),Y.appendChild(ot)}return P.appendChild(Y),P}},{key:"getAndSetOverlay",value:(o=_(P().mark((function t(e){var n,r,o,i;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.post(!0,e),e.dismissDuration||e.dismissDurationPv||"1"!==sessionStorage.getItem("fs.adb".concat(e.siteId||"",".dis"))){t.next=3;break}return t.abrupt("return");case 3:if(n=localStorage.getItem("fs.adb"),r=n&&JSON.parse(n),!e.dismissDurationPv||!r.p||"number"!=typeof r.p){t.next=14;break}if(!(e.dismissDurationPv<=r.p+1)){t.next=10;break}this.clearValue("p"),t.next=12;break;case 10:return this.updateValues("p"),t.abrupt("return");case 12:t.next=15;break;case 14:this.clearValue("p");case 15:if(o=parseInt(r.dt,10),!e.dismissDuration||!o){t.next=25;break}if(!(Math.abs((Date.now()-o)/36e5)<e.dismissDuration)){t.next=22;break}return t.abrupt("return");case 22:this.clearValue("dt");case 23:t.next=26;break;case 25:this.clearValue("dt");case 26:if(document.body){t.next=29;break}return t.next=29,new Promise((function(t){return document.addEventListener("DOMContentLoaded",t)}));case 29:if(this.killScroll(e),null===document.querySelector("#".concat(this.oid))){t.next=32;break}return t.abrupt("return");case 32:i=this.generateOverlay(e),document.body.appendChild(i);case 34:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"getStatus",value:function(t,e){return!0===e?1:2===t||1===t?2:0}},{key:"getAndSetData",value:function(t){var e,n,r,o=localStorage.getItem("fs.adb"),i=o&&JSON.parse(o),a=Date.now();return i?(e=i.i,n=i.ot,r=this.getStatus(i.s,t)):(i={},e=c(),n=a,r=t?1:0),i.i=e,i.s=r,i.ot=n,i.lt=a,localStorage.setItem("fs.adb",JSON.stringify(i)),i}},{key:"updateValues",value:function(t){var e=localStorage.getItem("fs.adb"),n=e&&JSON.parse(e);"p"===t?(n.p=n.p?n.p+1:1,n.dt&&delete n.dt):"dt"===t&&(n.dt=Date.now(),n.p&&delete n.p),localStorage.setItem("fs.adb",JSON.stringify(n))}},{key:"clearValue",value:function(t){var e=localStorage.getItem("fs.adb"),n=e&&JSON.parse(e);n[t]&&(delete n[t],localStorage.setItem("fs.adb",JSON.stringify(n)))}},{key:"post",value:function(t,e){var n=atob("c2l0ZS1jb25maWcuY29t"),r=e.cDomain||n,o="https://".concat(r,"/v2/abr"),i=this.getAndSetData(t),a=e.accountId,c=e.siteId,s=navigator.userAgent||window.navigator.userAgent,l=document.referrer,d=window.location,u={accountId:a,siteId:c,userId:i.i,url:d.href,referalURL:l,userAgent:s,status:function(t){switch(t){case 0:return"not detected";case 1:return"detected";case 2:return"recovered";default:return}}(i.s),returning:i.ot!==i.lt,version:"1.3.4"};fetch(o,{method:"POST",headers:{"Content-Type":"application/json","X-Client-Geo-Location":"{client_region},{client_region_subdivision},{client_city}"},body:JSON.stringify(u)}).catch((function(){}))}},{key:"observe",value:function(){var t=this,e="";new MutationObserver((function(){location.pathname!==e&&(e=location.pathname,t.run())})).observe(document,{subtree:!0,childList:!0})}},{key:"run",value:function(){var t=this,e=this.config;setTimeout(_(P().mark((function n(){return P().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,S().then((function(){return A(atob("aHR0cHM6Ly9hLnB1Yi5uZXR3b3JrL2NvcmUvcHJlYmlkLXVuaXZlcnNhbC1jcmVhdGl2ZS5qcw=="))})).then((function(){return A(atob("aHR0cHM6Ly93d3cuZ29vZ2xldGFnc2VydmljZXMuY29tL3RhZy9qcy9ncHQuanM="))})).then((function(){t.post(!1,e)})).catch((function(n){n!==C&&(null==n?void 0:n.message)!==C||t.getAndSetOverlay(e)}));case 2:case"end":return n.stop()}}),n)}))),500)}}],n&&T(e.prototype,n),r&&T(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();window.fsabrActive=!0,new O(window.navigator).init()})()})();
	</script>
	<script data-cfasync="false" type="text/javascript">
		var freestar = freestar || {};
		freestar.queue = freestar.queue || [];
		freestar.config = freestar.config || {};
		freestar.config.enabled_slots = [];
		freestar.initCallback = function () { (freestar.config.enabled_slots.length === 0) ? freestar.initCallbackCalled = false : freestar.newAdSlots(freestar.config.enabled_slots) }

			</script>
	<script src="https://a.pub.network/sciencenews-org/pubfig.min.js" async></script>
	<!-- End Freestar -->
	
<!-- AdSense verification -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4875049559114942" crossorigin="anonymous"></script>
<!-- End AdSense verification -->
		<!-- GTM Data Layer -->
					<meta name="byline" content="Erika Engelhaupt">
						<meta name="datePublishedText" content="December 4, 2016">
						<meta name="paywallShown" content="no">
						<meta name="paywallArticleAge" content="3022">
					<script>
			dataLayer.push({"byline":"Erika Engelhaupt","datePublishedText":"December 4, 2016","paywallShown":"no","paywallArticleAge":"3022"});
		</script>
		<!-- / GTM Data Layer -->
		<meta property="sn:article-type" content="">
<meta property="sn:collection" content="">
<meta property="category" content="no-meter">
<meta name="referrer" content="no-referrer-when-downgrade">
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style><style class="wp-fonts-local" type="text/css">
@font-face{font-family:charter;font-style:normal;font-weight:300;font-display:fallback;src:url('https://www.sciencenews.org/wp-content/themes/sciencenews/client/src/fonts/charter_regular.woff2') format('woff2');font-stretch:normal;}
@font-face{font-family:charter;font-style:italic;font-weight:300;font-display:fallback;src:url('https://www.sciencenews.org/wp-content/themes/sciencenews/client/src/fonts/charter_italic.woff2') format('woff2');font-stretch:normal;}
@font-face{font-family:charter;font-style:normal;font-weight:700;font-display:fallback;src:url('https://www.sciencenews.org/wp-content/themes/sciencenews/client/src/fonts/charter_bold.woff2') format('woff2');font-stretch:normal;}
@font-face{font-family:charter;font-style:italic;font-weight:700;font-display:fallback;src:url('https://www.sciencenews.org/wp-content/themes/sciencenews/client/src/fonts/charter_bold_italic.woff2') format('woff2');font-stretch:normal;}
</style>
<link rel="icon" href="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/cropped-favicon.jpg?fit=32%2C32&amp;ssl=1" sizes="32x32">
<link rel="icon" href="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/cropped-favicon.jpg?fit=192%2C192&amp;ssl=1" sizes="192x192">
<link rel="apple-touch-icon" href="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/cropped-favicon.jpg?fit=180%2C180&amp;ssl=1">
<meta name="msapplication-TileImage" content="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/cropped-favicon.jpg?fit=270%2C270&amp;ssl=1">
</head>

<body class="blog-template-default single single-blog postid-39834">
	<div class="site-wrapper">


	<!-- Google Tag Manager (noscript) -->
	<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KQBZ8HP" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
	<!-- End Google Tag Manager (noscript) -->

<div id="page" class="site">
	<a class="skip-link" href="#content">Skip to content</a>

	<section class="ad-block__mq-wrapper ad-block-leaderboard__wrapper___YcoEf ad-block-leaderboard__freestar___0untO">
	<div class="content">
		<!-- Tag ID: sciencenews-org_leaderboard_atf -->
<div align="center" data-freestar-ad="__336x280 __336x280" id="sciencenews-org_leaderboard_atf">
	<script data-cfasync="false" type="text/javascript">
		if (window.matchMedia("(min-width: 768px)").matches) {
			freestar.config.enabled_slots.push({ placementName: "sciencenews-org_leaderboard_atf", slotId: "sciencenews-org_leaderboard_atf" });
		} else {
			document.currentScript.closest('.ad-block__mq-wrapper').remove();
		}
	</script>
</div>
	</div>
</section>

<header class="site-header__wrapper___EBXQN" role="banner" id="masthead">
	
<style>
.newsletter-global-subscribe__container___fVkwE{
    background: #225483; 
    color:white; 
    width:100%;
    padding: 10px;
}
</style>
<div class="newsletter-global-subscribe__container___fVkwE">
		
<div class="newsletter-global-subscribe__header___QroCr">
	<strong style="font-size:1.1rem; margin-right:10px;">
		Enjoy unlimited access	</strong>

	<span class="newsletter-global-subscribe__message___LDt-P">
		<p>Only $2.99 a month</p>
	</span>
</div>

<a href="https://www.sciencenews.org/subscribe1-digital-monthly?key=9MNAVBNB2&utm_source=banner&utm_medium=site&utm_campaign=full_digital_access" class="newsletter-global-subscribe__link___XvwhK __sn_ga-header-cta __sn_ga-header-cta--home">Subscribe now</a>
	</div><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["sitewide-banner-cta"] = {
            featureLabel: "CTA: navigation banner",
            outcomeId: "transformation/8",
            outcomeLabel: "Anon Banner - 9MNAVBNB2 $2.99 sub"
          };
        </script>

	
<nav class="nav-bar__wrapper___0b-CD" role="navigation" aria-label="Main" data-component="nav-bar">
	<button class="nav-bar__toggle___4pRfS">
		<span class="nav-bar__icon___ypN9u"></span>
		<span class="screen-reader-text">Menu</span>
	</button>

	<div class="nav-bar__nav-bar___PdKD4">
		<ul class="primary-menu__topics-menu___g55Mb">
			<li class="primary-menu__menu-item___lG0qw primary-menu__has-children___62ePc">
				<a href="https://www.sciencenews.org/topics/">All Topics</a>
				<ul id="topics-menu" class="primary-menu__sub-menu___Nrtos"><li id="menu-item-3138702" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3138702 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/topic/health-medicine" id="menu-link-1">Health</a></li>
<li id="menu-item-3085308" class="menu-item menu-item-type-taxonomy menu-item-object-topic current-blog-ancestor menu-item-3085308 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/topic/humans" id="menu-link-2">Humans</a></li>
<li id="menu-item-952393" class="menu-item menu-item-type-taxonomy menu-item-object-topic menu-item-952393 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/topic/life" id="menu-link-3">Life</a></li>
<li id="menu-item-952395" class="menu-item menu-item-type-taxonomy menu-item-object-topic menu-item-952395 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/topic/earth" id="menu-link-4">Earth</a></li>
<li id="menu-item-952397" class="menu-item menu-item-type-taxonomy menu-item-object-topic menu-item-952397 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/topic/physics" id="menu-link-5">Physics</a></li>
<li id="menu-item-952396" class="menu-item menu-item-type-taxonomy menu-item-object-topic menu-item-952396 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/topic/space" id="menu-link-6">Space</a></li>
</ul>			</li>
		</ul>


		<ul id="primary-menu" class="primary-menu__menu___YlL1y"><li id="menu-item-951020" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-951020 primary-menu__menu-item___lG0qw"><a href="/sn-magazine" id="menu-link-7">Magazine</a></li>
<li id="menu-item-951021" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-951021 primary-menu__menu-item___lG0qw primary-menu__has-children___62ePc"><a href="#" id="menu-link-8">Menu</a>
<ul class="sub-menu primary-menu__sub-menu___Nrtos">
	<li id="menu-item-954334" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-954334 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/all-stories" id="menu-link-9">All Stories</a></li>
	<li id="menu-item-951022" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-951022 primary-menu__menu-item___lG0qw"><a href="/article/tag/multimedia" id="menu-link-10">Multimedia</a></li>
	<li id="menu-item-951023" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-951023 primary-menu__menu-item___lG0qw"><a href="/article-type/reviews-previews" id="menu-link-11">Reviews</a></li>
	<li id="menu-item-3148132" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3148132 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/article-type/puzzles" id="menu-link-12">Puzzles</a></li>
	<li id="menu-item-951024" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-951024 primary-menu__menu-item___lG0qw"><a href="/collections" id="menu-link-13">Collections</a></li>
	<li id="menu-item-3103771" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3103771 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/century" id="menu-link-14">Century of Science</a></li>
	<li id="menu-item-951025" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-951025 primary-menu__menu-item___lG0qw"><a href="/snhs" id="menu-link-15">For Educators</a></li>
	<li id="menu-item-3121173" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3121173 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/collections/2019-novel-coronavirus-outbreak" id="menu-link-16">Coronavirus Outbreak</a></li>
	<li id="menu-item-3125245" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3125245 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/newsletters" id="menu-link-17">Newsletters</a></li>
</ul>
</li>
<li id="menu-item-951026" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-951026 primary-menu__menu-item___lG0qw"><a href="https://www.sciencenews.org/about-science-news" id="menu-link-18">About</a></li>
<li id="menu-item-951027" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-951027 primary-menu__menu-item___lG0qw"><a href="https://www.snexplores.org/" id="menu-link-19">For Students</a></li>
<li id="menu-item-3137708" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3137708 primary-menu__menu-item___lG0qw"><a href="https://www.societyforscience.org/store/" id="menu-link-20">Our Store</a></li>
</ul>
		
<div class="nav-bar__actions___afEUJ">
	

<style>
#action-auth-button {
  /* Remove any existing button styling */

  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  margin-right:8px;
  
  /* Text styling */
  font: inherit;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: .08em;
}

.is-snhs #action-auth-button {
    font-size: 0.9375rem;
    margin-left: 0.5rem;
}

#action-auth-button:hover {
    text-decoration: underline;
}

<style>
@media only screen and (min-width: 480px) {
    .header-auth-button {
        display: none;
    }

/* Link styling */
#action-auth-button:hover {
  text-decoration: underline;
}
</style>

<button id="action-auth-button">SIGN IN</button>

<script>
  document.addEventListener('DOMContentLoaded', function() {
    var button = document.getElementById('action-auth-button');
    button.addEventListener('click', function() {
      window.location.href = 'https://sciencenews.org/sign-in';
    });
  });
</script><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["sign-in-button"] = {
            featureLabel: "Sign In Button - Desktop",
            outcomeId: "transformation/3",
            outcomeLabel: "Sign In"
          };
        </script>

			<a class="nav-bar-donate-link nav-bar__donate-link___gI-RC" href="https://www.sciencenews.org/give?key=9MDONBUT">
			Donate		</a>
	</div>
	</div>

	
<a class="nav-bar__home-link___p-697" href="https://www.sciencenews.org/" rel="home">
	<span class="screen-reader-text">
		Home	</span>

	
<svg focusable="false" aria-hidden="true" viewbox="0 0 330 50" xmlns="http://www.w3.org/2000/svg"><path d="m314.4 47.35c5.78 0 10.6-3.25 10.6-8.85 0-4.52-2.35-6.87-9.58-10.24-6.63-3.13-8.49-4.52-8.49-7.41 0-2.59 2.35-4.28 5.18-4.28 4.4 0 8.61 3.85 10.66 9.52h.72l-1.45-10.54h-.54c-.12 2.83-3.73.12-9.22.12-5.06 0-9.64 3.55-9.64 8.31 0 4.28 2.17 6.38 8.61 9.34 5.96 2.83 8.61 4.82 8.61 8.07s-2.71 5-5.36 5c-3.73 0-9.03-3.79-11.62-10.6h-.78l1.87 11.26h.48c.36-3.55 4.16.3 9.94.3m-37.69-25.54 2.11 5.96-5.24 13.19-7.05-19.15c-1.45-3.85-1.02-4.46 1.14-4.58v-.78h-11.44v.78c1.87.18 3.01 1.57 4.52 5.78l8.85 24.21c1.51-1.08 3.25-1.69 4.94-2.17-.48-2.17.24-4.64 2.05-9.03l2.71-6.81 6.32 18.01c1.45-.72 3.31-1.39 4.88-1.87-.54-2.17.18-4.58 1.87-8.97l5.36-13.67c1.57-3.98 3.25-5.3 5.3-5.48v-.78h-10.24v.78c3.13.12 4.76 1.81 3.37 5.66l-6.63 18.25-6.75-18.91c-1.26-3.61-.48-4.94 2.29-5v-.78h-11.62v.78c1.02.12 2.05 1.33 3.25 4.58m-39.93 5.72c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.56 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-23.38.25c1.02-.84 3.67-2.11 5.84-2.71-.96-1.87-1.39-3.98-1.33-6.93l.36-28.91c0-3.67 1.69-4.88 5.3-5.06v-.78h-13.13v.78c4.46.18 6.44 1.39 6.44 5l-.06 31.26-23.66-37.04h-11.68v.78c3.91.18 5.66 1.39 5.6 5l-.3 31.74c-.06 3.67-1.87 4.88-5.96 5.06v.78h13.67v-.78c-4.22-.18-6.08-1.39-6.14-5l-.24-32.83 25.3 39.63zm-52.4-20.06c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.55 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-27.72.01c5.84 0 10.72-3.61 12.65-9.4l-.54-.3c-1.99 4.16-5.9 5.3-8.79 5.3-6.5 0-11.26-5.6-11.26-14.82 0-6.87 3.49-11.44 8.55-11.44 4.04 0 5.66 2.53 5.66 4.58 0 1.69-.84 2.77-.84 4.28 0 1.93 1.26 3.07 3.01 3.07s3.25-1.51 3.25-4.28c0-4.16-4.04-8.67-10.72-8.67-8.37 0-14.58 7.17-14.58 16.14s5.54 15.54 13.61 15.54m-26.8-.79h13.19v-.78c-2.47-.18-3.73-1.14-3.73-3.98v-17.17c0-6.14-2.95-8.97-7.53-8.97s-8.73 3.07-11.26 8.19h-.3l.72-8.19h-.24l-9.82 2.71.12.78c3.07-.54 3.85.96 3.85 3.73v18.61c0 3.13-1.08 4.16-3.73 4.28v.78h13.61v-.78c-2.65-.18-3.91-1.14-3.91-3.98v-16.62c2.29-4.34 5.48-5.72 7.53-5.72 3.01 0 5 1.93 5 6.63v15.42c0 3.13-1.02 4.16-3.49 4.28v.78zm-39.57-19.03c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.55 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-21.39-36.49c2.11 0 3.85-1.69 3.85-3.73s-1.75-3.85-3.85-3.85c-1.99 0-3.79 1.75-3.79 3.85s1.75 3.73 3.79 3.73m-6.32 35.71h13.25v-.78c-2.41-.18-3.55-1.14-3.55-3.98v-26.14h-.24l-9.64 2.71v.78c2.95-.3 3.91 1.02 3.91 3.91v18.43c0 3.13-1.08 4.16-3.73 4.28v.78zm-13.01.79c5.84 0 10.72-3.61 12.65-9.4l-.54-.3c-1.99 4.16-5.9 5.3-8.79 5.3-6.5 0-11.26-5.6-11.26-14.82 0-6.87 3.49-11.44 8.55-11.44 4.04 0 5.66 2.53 5.66 4.58 0 1.69-.84 2.77-.84 4.28 0 1.93 1.26 3.07 3.01 3.07s3.25-1.51 3.25-4.28c0-4.16-4.04-8.67-10.72-8.67-8.37 0-14.58 7.17-14.58 16.14s5.54 15.54 13.61 15.54m-30.84 0c7.83 0 14.09-4.82 14.09-12.41 0-6.44-3.19-9.52-12.41-13.73-8.55-3.98-11.87-6.63-11.87-10.96 0-3.98 3.19-6.87 7.89-6.87 5.42 0 11.87 4.46 14.15 13.73h.78l-1.14-14.21h-.72c-.06 1.51-.6 2.05-1.51 2.05-1.87 0-6.32-2.53-11.38-2.53-8.13 0-12.89 5.54-12.89 11.62s3.37 9.22 11.32 12.83c9.4 4.4 12.77 6.63 12.77 11.56s-4.16 7.95-8.85 7.95c-5.84 0-13.37-6.87-15.48-16.32h-.78l1.63 16.68h.72c.06-1.87.66-2.47 1.81-2.47 2.23 0 6.38 3.07 11.87 3.07" /><path d="m5 2.41h320v45.17h-320z" fill="none" /></svg>

			<span class="nav-bar__tagline___fE7LQ">
			INDEPENDENT JOURNALISM SINCE 1921		</span>
		</a>

	
<style>
@media only screen and (min-width: 1020px) {
  a#header-auth-button {
      display: none;
  }
}

#header-auth-button {
    /* Remove current button styling */
    border: none;
    background: none;
    color: inherit;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
}
  
#header-auth-button:hover {
   /* Text underline on hover */
   text-decoration: underline;
}
  
/* Font styling */
#header-auth-button {
    font: inherit;
    font-size: 0.73rem;
    font-weight: bold;
    letter-spacing: .08em;
}
</style>

<a id="header-auth-button" href="https://www.sciencenews.org/sign-in">SIGN IN</a><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["sign-in-button-mobile"] = {
            featureLabel: "Sign In Button - Mobile",
            outcomeId: "transformation/2",
            outcomeLabel: "Sign In"
          };
        </script>

	
<div class="header-search__component___HaWFk" data-component="header-search">
	<div class="header-search__wrapper___aPFS5">
		<form class="header-search__form___jUQvh" name="search-form" action="https://www.sciencenews.org" method="GET">
			<span class="header-search__icon___XDwNR header-search__search___rDKZR">
			</span>

			<label class="screen-reader-text" for="header-search-input">
				Search			</label>

			<input class="header-search__input___mXBSe" value="" id="header-search-input" type="search" autocorrect="off" autocapitalize="off" spellcheck="false" name="s" placeholder="Search...">
		</form>
	</div>

	<button class="header-search__toggle___vQkrq" type="button">
		<span class="header-search__toggle-inner___5P7ST">
			<span class="header-search__icon___XDwNR header-search__open___9MajL">
				<span class="screen-reader-text">Open search</span>
			</span>

			<span class="header-search__icon___XDwNR header-search__close___-Jb-H" aria-hidden="true">
				<span class="screen-reader-text">Close search</span>
			</span>
		</span>
	</button>
</div>
</nav>

	<div class="site-header__branding___ANiJ3" data-component="topics-menu">
		
<a class="site-header__home-link___wduac" href="https://www.sciencenews.org/" rel="home">
	<span class="screen-reader-text">
		Home	</span>

	
<svg focusable="false" aria-hidden="true" viewbox="0 0 330 50" xmlns="http://www.w3.org/2000/svg"><path d="m314.4 47.35c5.78 0 10.6-3.25 10.6-8.85 0-4.52-2.35-6.87-9.58-10.24-6.63-3.13-8.49-4.52-8.49-7.41 0-2.59 2.35-4.28 5.18-4.28 4.4 0 8.61 3.85 10.66 9.52h.72l-1.45-10.54h-.54c-.12 2.83-3.73.12-9.22.12-5.06 0-9.64 3.55-9.64 8.31 0 4.28 2.17 6.38 8.61 9.34 5.96 2.83 8.61 4.82 8.61 8.07s-2.71 5-5.36 5c-3.73 0-9.03-3.79-11.62-10.6h-.78l1.87 11.26h.48c.36-3.55 4.16.3 9.94.3m-37.69-25.54 2.11 5.96-5.24 13.19-7.05-19.15c-1.45-3.85-1.02-4.46 1.14-4.58v-.78h-11.44v.78c1.87.18 3.01 1.57 4.52 5.78l8.85 24.21c1.51-1.08 3.25-1.69 4.94-2.17-.48-2.17.24-4.64 2.05-9.03l2.71-6.81 6.32 18.01c1.45-.72 3.31-1.39 4.88-1.87-.54-2.17.18-4.58 1.87-8.97l5.36-13.67c1.57-3.98 3.25-5.3 5.3-5.48v-.78h-10.24v.78c3.13.12 4.76 1.81 3.37 5.66l-6.63 18.25-6.75-18.91c-1.26-3.61-.48-4.94 2.29-5v-.78h-11.62v.78c1.02.12 2.05 1.33 3.25 4.58m-39.93 5.72c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.56 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-23.38.25c1.02-.84 3.67-2.11 5.84-2.71-.96-1.87-1.39-3.98-1.33-6.93l.36-28.91c0-3.67 1.69-4.88 5.3-5.06v-.78h-13.13v.78c4.46.18 6.44 1.39 6.44 5l-.06 31.26-23.66-37.04h-11.68v.78c3.91.18 5.66 1.39 5.6 5l-.3 31.74c-.06 3.67-1.87 4.88-5.96 5.06v.78h13.67v-.78c-4.22-.18-6.08-1.39-6.14-5l-.24-32.83 25.3 39.63zm-52.4-20.06c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.55 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-27.72.01c5.84 0 10.72-3.61 12.65-9.4l-.54-.3c-1.99 4.16-5.9 5.3-8.79 5.3-6.5 0-11.26-5.6-11.26-14.82 0-6.87 3.49-11.44 8.55-11.44 4.04 0 5.66 2.53 5.66 4.58 0 1.69-.84 2.77-.84 4.28 0 1.93 1.26 3.07 3.01 3.07s3.25-1.51 3.25-4.28c0-4.16-4.04-8.67-10.72-8.67-8.37 0-14.58 7.17-14.58 16.14s5.54 15.54 13.61 15.54m-26.8-.79h13.19v-.78c-2.47-.18-3.73-1.14-3.73-3.98v-17.17c0-6.14-2.95-8.97-7.53-8.97s-8.73 3.07-11.26 8.19h-.3l.72-8.19h-.24l-9.82 2.71.12.78c3.07-.54 3.85.96 3.85 3.73v18.61c0 3.13-1.08 4.16-3.73 4.28v.78h13.61v-.78c-2.65-.18-3.91-1.14-3.91-3.98v-16.62c2.29-4.34 5.48-5.72 7.53-5.72 3.01 0 5 1.93 5 6.63v15.42c0 3.13-1.02 4.16-3.49 4.28v.78zm-39.57-19.03c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.55 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-21.39-36.49c2.11 0 3.85-1.69 3.85-3.73s-1.75-3.85-3.85-3.85c-1.99 0-3.79 1.75-3.79 3.85s1.75 3.73 3.79 3.73m-6.32 35.71h13.25v-.78c-2.41-.18-3.55-1.14-3.55-3.98v-26.14h-.24l-9.64 2.71v.78c2.95-.3 3.91 1.02 3.91 3.91v18.43c0 3.13-1.08 4.16-3.73 4.28v.78zm-13.01.79c5.84 0 10.72-3.61 12.65-9.4l-.54-.3c-1.99 4.16-5.9 5.3-8.79 5.3-6.5 0-11.26-5.6-11.26-14.82 0-6.87 3.49-11.44 8.55-11.44 4.04 0 5.66 2.53 5.66 4.58 0 1.69-.84 2.77-.84 4.28 0 1.93 1.26 3.07 3.01 3.07s3.25-1.51 3.25-4.28c0-4.16-4.04-8.67-10.72-8.67-8.37 0-14.58 7.17-14.58 16.14s5.54 15.54 13.61 15.54m-30.84 0c7.83 0 14.09-4.82 14.09-12.41 0-6.44-3.19-9.52-12.41-13.73-8.55-3.98-11.87-6.63-11.87-10.96 0-3.98 3.19-6.87 7.89-6.87 5.42 0 11.87 4.46 14.15 13.73h.78l-1.14-14.21h-.72c-.06 1.51-.6 2.05-1.51 2.05-1.87 0-6.32-2.53-11.38-2.53-8.13 0-12.89 5.54-12.89 11.62s3.37 9.22 11.32 12.83c9.4 4.4 12.77 6.63 12.77 11.56s-4.16 7.95-8.85 7.95c-5.84 0-13.37-6.87-15.48-16.32h-.78l1.63 16.68h.72c.06-1.87.66-2.47 1.81-2.47 2.23 0 6.38 3.07 11.87 3.07" /><path d="m5 2.41h320v45.17h-320z" fill="none" /></svg>

			<span class="site-header__tagline___agp8-">
			INDEPENDENT JOURNALISM SINCE 1921		</span>
		</a>

		
<nav class="topics-megamenu__wrapper___EwIIi" aria-label="Topics">
	<ul class="topics-megamenu__list___gr654">
		<li class="topics-megamenu__item___lTAvR" id="topic-menu-21">
			<a class="topics-megamenu__link___3zA1X" href="https://www.sciencenews.org/topics/">
				All Topics			</a>

			
<ul class="dropdown-all-topics__dropdown___KlUah" id="topic-dropdown-all-22">
	
<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/earth" class="dropdown-all-topics__heading___tpwME dropdown-all-topics__is-parent___kezpI" id="topic-dropdown-23">
		Earth	</a>

			<ul class="dropdown-all-topics__child-list___SdGes">
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/agriculture">
						Agriculture					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/climate">
						Climate					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/oceans">
						Oceans					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/environment">
						Environment					</a>
				</li>
					</ul>
	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/humans" class="dropdown-all-topics__heading___tpwME dropdown-all-topics__is-parent___kezpI" id="topic-dropdown-24">
		Humans	</a>

			<ul class="dropdown-all-topics__child-list___SdGes">
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/anthropology">
						Anthropology					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/health-medicine">
						Health &amp; Medicine					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/archaeology">
						Archaeology					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/psychology">
						Psychology					</a>
				</li>
					</ul>
	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/life" class="dropdown-all-topics__heading___tpwME dropdown-all-topics__is-parent___kezpI" id="topic-dropdown-25">
		Life	</a>

			<ul class="dropdown-all-topics__child-list___SdGes">
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/animals">
						Animals					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/plants">
						Plants					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/ecosystems">
						Ecosystems					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/paleontology">
						Paleontology					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/neuroscience">
						Neuroscience					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/genetics">
						Genetics					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/microbes">
						Microbes					</a>
				</li>
					</ul>
	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/physics" class="dropdown-all-topics__heading___tpwME dropdown-all-topics__is-parent___kezpI" id="topic-dropdown-26">
		Physics	</a>

			<ul class="dropdown-all-topics__child-list___SdGes">
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/materials-science">
						Materials Science					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/quantum-physics">
						Quantum Physics					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/particle-physics">
						Particle Physics					</a>
				</li>
					</ul>
	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/space" class="dropdown-all-topics__heading___tpwME dropdown-all-topics__is-parent___kezpI" id="topic-dropdown-27">
		Space	</a>

			<ul class="dropdown-all-topics__child-list___SdGes">
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/astronomy">
						Astronomy					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/planetary-science">
						Planetary Science					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/cosmology">
						Cosmology					</a>
				</li>
					</ul>
	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/tech" class="dropdown-all-topics__heading___tpwME dropdown-all-topics__is-parent___kezpI" id="topic-dropdown-28">
		Tech	</a>

			<ul class="dropdown-all-topics__child-list___SdGes">
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/computing">
						Computing					</a>
				</li>
											<li class="item">
					<a class="link" href="https://www.sciencenews.org/topic/artificial-intelligence">
						Artificial Intelligence					</a>
				</li>
					</ul>
	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/chemistry" class="dropdown-all-topics__heading___tpwME" id="topic-dropdown-29">
		Chemistry	</a>

	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/math" class="dropdown-all-topics__heading___tpwME" id="topic-dropdown-30">
		Math	</a>

	</li>

<li class="dropdown-all-topics__top-level___Dg2W8">
	<a href="https://www.sciencenews.org/topic/science-society" class="dropdown-all-topics__heading___tpwME" id="topic-dropdown-31">
		Science &amp; Society	</a>

	</li>

	<a href="https://www.sciencenews.org/topics/" class="dropdown-all-topics__archive-link___DL3yo">All Topics</a>
</ul>
		</li>

							<li class="topics-megamenu__item___lTAvR" id="topic-menu-32">
						<a href="https://www.sciencenews.org/topic/health-medicine" class="topics-megamenu__link___3zA1X">Health</a>
											</li>
										<li class="topics-megamenu__item___lTAvR" id="topic-menu-33">
						<a href="https://www.sciencenews.org/topic/humans" class="topics-megamenu__link___3zA1X">Humans</a>
						
<ul class="dropdown-single-topic__dropdown___3eDGp" id="topic-dropdown-humans-34">
	
<li class="dropdown-single-topic__top-level___4ttkp">
	<a href="https://www.sciencenews.org/topic/humans" class="dropdown-single-topic__heading___JST8R is-parent" id="topic-dropdown-35">
		Humans	</a>

			<ul class="dropdown-single-topic__child-list___eS8rS">
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/anthropology">
						Anthropology					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/health-medicine">
						Health &amp; Medicine					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/archaeology">
						Archaeology					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/psychology">
						Psychology					</a>
				</li>
					</ul>
	</li>

	<li class="dropdown-single-topic__articles___gI5om">
				<h2 class="screen-reader-text">Recent posts in Humans</h2>
		<ul class="dropdown-single-topic__article-list___lfTEY" aria-label="Recent posts in Humans">
			
<li class="dropdown-single-topic__wrapper___NDTa- item-1 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/health-medicine" class="dropdown-single-topic__eyebrow___0Ev-g">
							Health &amp; Medicine						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/measles-spreading-questions-answered">
				Measles is spreading. Here’s what experts say you should know			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/mckenzie-prillaman" title="Posts by McKenzie Prillaman">McKenzie Prillaman</a></span> and <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/tina-hesman-saey" title="Posts by Tina Hesman Saey">Tina Hesman Saey</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-14T13:00:00-04:00">9 hours ago</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-2 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/health-medicine" class="dropdown-single-topic__eyebrow___0Ev-g">
							Health &amp; Medicine						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/therapy-dog-kids-anxiety-emergency-room">
				Therapy dogs can ease young patients’ anxiety in the emergency room			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/aimee-cunningham" title="Posts by Aimee Cunningham">Aimee Cunningham</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-14T11:00:00-04:00">11 hours ago</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-3 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/archaeology" class="dropdown-single-topic__eyebrow___0Ev-g">
							Archaeology						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/ancient-maya-puppets-rituals">
				These ancient Maya-era puppets may have been used in rituals			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/tom-metcalfe" title="Posts by Tom Metcalfe">Tom Metcalfe</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-13T12:00:00-04:00">March 13, 2025</time>			</div>
			</div>
</li>		</ul>
	</li>
</ul>
					</li>
										<li class="topics-megamenu__item___lTAvR" id="topic-menu-36">
						<a href="https://www.sciencenews.org/topic/life" class="topics-megamenu__link___3zA1X">Life</a>
						
<ul class="dropdown-single-topic__dropdown___3eDGp" id="topic-dropdown-life-37">
	
<li class="dropdown-single-topic__top-level___4ttkp">
	<a href="https://www.sciencenews.org/topic/life" class="dropdown-single-topic__heading___JST8R is-parent" id="topic-dropdown-38">
		Life	</a>

			<ul class="dropdown-single-topic__child-list___eS8rS">
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/animals">
						Animals					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/plants">
						Plants					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/ecosystems">
						Ecosystems					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/paleontology">
						Paleontology					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/neuroscience">
						Neuroscience					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/genetics">
						Genetics					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/microbes">
						Microbes					</a>
				</li>
					</ul>
	</li>

	<li class="dropdown-single-topic__articles___gI5om">
				<h2 class="screen-reader-text">Recent posts in Life</h2>
		<ul class="dropdown-single-topic__article-list___lfTEY" aria-label="Recent posts in Life">
			
<li class="dropdown-single-topic__wrapper___NDTa- item-1 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/animals" class="dropdown-single-topic__eyebrow___0Ev-g">
							Animals						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/narwhals-arctic-whales-horns-tusks-play">
				Narwhals may use their iconic tusks to play			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/mckenzie-prillaman" title="Posts by McKenzie Prillaman">McKenzie Prillaman</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-14T09:00:00-04:00">13 hours ago</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-2 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/life" class="dropdown-single-topic__eyebrow___0Ev-g">
							Life						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/dark-coats-earliest-mammals-dinosaurs">
				Dark coats may have helped the earliest mammals hide from hungry dinosaurs			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/jake-buehler" title="Posts by Jake Buehler">Jake Buehler</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-13T14:00:00-04:00">March 13, 2025</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-3 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/neuroscience" class="dropdown-single-topic__eyebrow___0Ev-g">
							Neuroscience						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/parenthood-kids-brain-young-aging">
				Parenthood may help the brain stay young			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/mckenzie-prillaman" title="Posts by McKenzie Prillaman">McKenzie Prillaman</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-12T09:00:00-04:00">March 12, 2025</time>			</div>
			</div>
</li>		</ul>
	</li>
</ul>
					</li>
										<li class="topics-megamenu__item___lTAvR" id="topic-menu-39">
						<a href="https://www.sciencenews.org/topic/earth" class="topics-megamenu__link___3zA1X">Earth</a>
						
<ul class="dropdown-single-topic__dropdown___3eDGp" id="topic-dropdown-earth-40">
	
<li class="dropdown-single-topic__top-level___4ttkp">
	<a href="https://www.sciencenews.org/topic/earth" class="dropdown-single-topic__heading___JST8R is-parent" id="topic-dropdown-41">
		Earth	</a>

			<ul class="dropdown-single-topic__child-list___eS8rS">
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/agriculture">
						Agriculture					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/climate">
						Climate					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/oceans">
						Oceans					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/environment">
						Environment					</a>
				</li>
					</ul>
	</li>

	<li class="dropdown-single-topic__articles___gI5om">
				<h2 class="screen-reader-text">Recent posts in Earth</h2>
		<ul class="dropdown-single-topic__article-list___lfTEY" aria-label="Recent posts in Earth">
			
<li class="dropdown-single-topic__wrapper___NDTa- item-1 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/climate" class="dropdown-single-topic__eyebrow___0Ev-g">
							Climate						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/trees-coping-with-extreme-heat">
				Some trees are coping with extreme heat surprisingly well			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/siddhant-pusdekar" title="Posts by Siddhant Pusdekar">Siddhant Pusdekar</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-10T15:11:41-04:00">March 10, 2025</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-2 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/animals" class="dropdown-single-topic__eyebrow___0Ev-g">
							Animals						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/sea-turtles-eggs-climate-change">
				Some sea turtles are laying eggs earlier in response to climate change			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/gennaro-tomma" title="Posts by Gennaro Tomma">Gennaro Tomma</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-07T09:00:00-05:00">March 7, 2025</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-3 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/climate" class="dropdown-single-topic__eyebrow___0Ev-g">
							Climate						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/warming-shrink-cloud-forests">
				Warming is chasing cloud forests steadily uphill			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/douglas-fox" title="Posts by Douglas Fox">Douglas Fox</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-06T14:00:00-05:00">March 6, 2025</time>			</div>
			</div>
</li>		</ul>
	</li>
</ul>
					</li>
										<li class="topics-megamenu__item___lTAvR" id="topic-menu-42">
						<a href="https://www.sciencenews.org/topic/physics" class="topics-megamenu__link___3zA1X">Physics</a>
						
<ul class="dropdown-single-topic__dropdown___3eDGp" id="topic-dropdown-physics-43">
	
<li class="dropdown-single-topic__top-level___4ttkp">
	<a href="https://www.sciencenews.org/topic/physics" class="dropdown-single-topic__heading___JST8R is-parent" id="topic-dropdown-44">
		Physics	</a>

			<ul class="dropdown-single-topic__child-list___eS8rS">
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/materials-science">
						Materials Science					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/quantum-physics">
						Quantum Physics					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/particle-physics">
						Particle Physics					</a>
				</li>
					</ul>
	</li>

	<li class="dropdown-single-topic__articles___gI5om">
				<h2 class="screen-reader-text">Recent posts in Physics</h2>
		<ul class="dropdown-single-topic__article-list___lfTEY" aria-label="Recent posts in Physics">
			
<li class="dropdown-single-topic__wrapper___NDTa- item-1 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/quantum-physics" class="dropdown-single-topic__eyebrow___0Ev-g">
							Quantum Physics						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/quantum-computing-milestone-challenged">
				A quantum computing milestone is immediately challenged by a supercomputer			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/mara-johnson-groh" title="Posts by Mara Johnson-Groh">Mara Johnson-Groh</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-12T12:08:12-04:00">March 12, 2025</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-2 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/math" class="dropdown-single-topic__eyebrow___0Ev-g">
							Math						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/einstein-tile-molecular-cousin-patterns">
				The einstein tile rocked mathematics. Meet its molecular cousin			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/zack-savitsky" title="Posts by Zack Savitsky">Zack Savitsky</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-05T13:00:00-05:00">March 5, 2025</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-3 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/physics" class="dropdown-single-topic__eyebrow___0Ev-g">
							Physics						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/sound-clapping-physics-explained">
				The sound of clapping, explained by physics			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/emily-conover" title="Posts by Emily Conover">Emily Conover</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-04T08:00:00-05:00">March 4, 2025</time>			</div>
			</div>
</li>		</ul>
	</li>
</ul>
					</li>
										<li class="topics-megamenu__item___lTAvR" id="topic-menu-45">
						<a href="https://www.sciencenews.org/topic/space" class="topics-megamenu__link___3zA1X">Space</a>
						
<ul class="dropdown-single-topic__dropdown___3eDGp" id="topic-dropdown-space-46">
	
<li class="dropdown-single-topic__top-level___4ttkp">
	<a href="https://www.sciencenews.org/topic/space" class="dropdown-single-topic__heading___JST8R is-parent" id="topic-dropdown-47">
		Space	</a>

			<ul class="dropdown-single-topic__child-list___eS8rS">
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/astronomy">
						Astronomy					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/planetary-science">
						Planetary Science					</a>
				</li>
											<li class="dropdown-single-topic__item___wvtt2">
					<a class="link" href="https://www.sciencenews.org/topic/cosmology">
						Cosmology					</a>
				</li>
					</ul>
	</li>

	<li class="dropdown-single-topic__articles___gI5om">
				<h2 class="screen-reader-text">Recent posts in Space</h2>
		<ul class="dropdown-single-topic__article-list___lfTEY" aria-label="Recent posts in Space">
			
<li class="dropdown-single-topic__wrapper___NDTa- item-1 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/space" class="dropdown-single-topic__eyebrow___0Ev-g">
							Space						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/lunar-eclipse-moon-lander-blue-ghost">
				The Blue Ghost lander just witnessed a lunar eclipse — from the moon			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/lisa-grossman" title="Posts by Lisa Grossman">Lisa Grossman</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-14T07:29:02-04:00">15 hours ago</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-2 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/chemistry" class="dropdown-single-topic__eyebrow___0Ev-g">
							Chemistry						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/iron-helium-compound-earth-core">
				A new iron compound hints ‘primordial’ helium hides in Earth’s core			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/skyler-ware" title="Posts by Skyler Ware">Skyler Ware</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-13T10:00:00-04:00">March 13, 2025</time>			</div>
			</div>
</li>
<li class="dropdown-single-topic__wrapper___NDTa- item-3 no-image" role="listitem">	
	<div class="content">
								<a href="https://www.sciencenews.org/topic/planetary-science" class="dropdown-single-topic__eyebrow___0Ev-g">
							Planetary Science						</a>
						
		<!-- The post title -->
		<h3 class="dropdown-single-topic__title___W4NNd">
			<a href="https://www.sciencenews.org/article/uranus-energy-planet-sun">
				Uranus emits more heat than previously thought			</a>
		</h3>

		
					<div class="dropdown-single-topic__meta___9Fbke">
				By <span class="dropdown-single-topic__byline___GR-ye author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/ken-croswell" title="Posts by Ken Croswell">Ken Croswell</a></span><time class="dropdown-single-topic__date___-d2BU entry-date published" datetime="2025-03-11T11:00:00-04:00">March 11, 2025</time>			</div>
			</div>
</li>		</ul>
	</li>
</ul>
					</li>
						</ul>
</nav>
	</div>
</header>

	<main id="content" class="site-main">
		

<article id="post-39834" class="single__wrapper___rmJj2 single__with-sidebar___rvUX- post-39834 blog type-blog status-publish has-post-thumbnail hentry topic-psychology topic-science-society blog_term-science-the-public">
	<header class="wrapper is-migrated header-default__wrapper___VQCho header-default__is-migrated___AAbFO">
	<div class="header-default__content___F5-Yn">
		<div class="header-default__terms___-BVta">
							<a class="header-default__column-name___6jfhK" href="https://www.sciencenews.org/blog/science-the-public">
					Science &amp; the Public				</a>
			
							
				
<span class="header-default__eyebrow___gmHtv">
	<a href="https://www.sciencenews.org/topic/psychology">
		Psychology	</a>
</span>
					</div>

		<div class="header-default__title-wrapper___kUof-">
			
<h1 class="header-default__title___ychM4">
	You’ve probably been tricked by fake news and don’t know it</h1>

					</div>

			</div>

		<figure class="figure">
		<div class="header-default__thumbnail___XBeYr">
			<img width="860" height="460" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2016/12/120216_ee_fakenews_free.jpg?fit=860%2C460&amp;ssl=1" class="attachment-x-large size-x-large" alt="illustration of brain as marionette" decoding="async" fetchpriority="high" data-attachment-id="218064" data-permalink="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it/120216_ee_fakenews_free-jpg" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2016/12/120216_ee_fakenews_free.jpg?fit=860%2C460&amp;ssl=1" data-orig-size="860,460" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;SvetaZi&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="120216_ee_fakenews_free.jpg" data-image-description="" data-image-caption="<p>Your brain is easily manipulated by fake news, because even facts you know are false can stick in memory as true.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2016/12/120216_ee_fakenews_free.jpg?fit=680%2C364&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2016/12/120216_ee_fakenews_free.jpg?fit=800%2C428&amp;ssl=1">		</div>

					<figcaption class="header-default__figcaption___AGPTF">
									<span class="header-default__caption___sYDk1">
						<p>Your brain is easily manipulated by fake news, because even facts you know are false can stick in memory as true.</p>
					</span>
				
									<span class="header-default__credit___jFnF8">
						<p>SvetaZi/iStockphoto</p>
					</span>
							</figcaption>
			</figure>
	</header>

	
<div class="social-shares__wrapper___tam23">
	<div class="sharedaddy sd-sharing-enabled"><div class="robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing"><h3 class="sd-title social-shares__sd-title___Y4fAX">Share this:</h3><div class="sd-content social-shares__sd-content___rq5th"><ul><li class="share-mailto social-shares__share-mailto___gSQ8c"><a rel="nofollow noopener noreferrer" data-shared="" class="share-mailto sd-button share-icon social-shares__share-mailto___gSQ8c social-shares__share-icon___wsEDg" href="mailto:?subject=You%E2%80%99ve%20probably%20been%20tricked%20by%20fake%20news%20and%20don%E2%80%99t%20know%20it&amp;body=I%20saw%20this%20on%20Science%20News%3A%20https%3A%2F%2Fwww.sciencenews.org%2Fblog%2Fscience-the-public%2Fyouve-probably-been-tricked-fake-news-and-dont-know-it%3Futm_source%3Dinternal%26utm_medium%3Demail%26utm_campaign%3Demail_share" target="_blank" title="Share via email"><span>Email</span></a></li><li class="share-facebook social-shares__share-facebook___pYoql"><a rel="nofollow noopener noreferrer" data-shared="sharing-facebook-39834" class="share-facebook sd-button share-icon social-shares__share-facebook___pYoql social-shares__share-icon___wsEDg" href="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it?share=facebook" target="_blank" title="Click to share on Facebook"><span>Facebook</span></a></li><li class="share-twitter social-shares__share-twitter___hyn-8"><a rel="nofollow noopener noreferrer" data-shared="sharing-twitter-39834" class="share-twitter sd-button share-icon social-shares__share-twitter___hyn-8 social-shares__share-icon___wsEDg" href="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it?share=twitter" target="_blank" title="Click to share on Twitter"><span>Twitter</span></a></li><li class="share-pinterest social-shares__share-pinterest___dBRxR"><a rel="nofollow noopener noreferrer" data-shared="sharing-pinterest-39834" class="share-pinterest sd-button share-icon social-shares__share-pinterest___dBRxR social-shares__share-icon___wsEDg" href="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it?share=pinterest" target="_blank" title="Click to share on Pinterest"><span>Pinterest</span></a></li><li class="share-pocket social-shares__share-pocket___GV8Kj"><a rel="nofollow noopener noreferrer" data-shared="" class="share-pocket sd-button share-icon social-shares__share-pocket___GV8Kj social-shares__share-icon___wsEDg" href="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it?share=pocket" target="_blank" title="Click to share on Pocket"><span>Pocket</span></a></li><li class="share-reddit social-shares__share-reddit___1ZuRI"><a rel="nofollow noopener noreferrer" data-shared="" class="share-reddit sd-button share-icon social-shares__share-reddit___1ZuRI social-shares__share-icon___wsEDg" href="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it?share=reddit" target="_blank" title="Click to share on Reddit"><span>Reddit</span></a></li><li class="share-print social-shares__share-print___DoyOu"><a rel="nofollow noopener noreferrer" data-shared="" class="share-print sd-button share-icon social-shares__share-print___DoyOu social-shares__share-icon___wsEDg" href="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it#print" target="_blank" title="Click to print"><span>Print</span></a></li></ul></div></div></div></div>
		<div class="single__byline-container___gBoqt">
			<div class="single__byline-wrapper___fuwNn">
				
<div class="byline__wrapper___hSvwC">
	<div class="byline-inner">
		<p class="byline__authors___a2txN">By <span class="byline author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/erika-engelhaupt" title="Posts by Erika Engelhaupt">Erika Engelhaupt</a></span></p>
					<p class="byline__published___LoyMY"><time class="date entry-date byline__published___LoyMY" datetime="2016-12-04T07:00:02-05:00">December 4, 2016 at 7:00 am</time></p>
					</div>
</div>
			</div>
		</div>
		
	<div class="single__body___2pHuV">
		<div class="single__content___9ekjR">
			<div class="rich-text rich-text--with-sidebar single__rich-text___RmCDp" data-component="video-embed">
				
<p>If you spent Thanksgiving trying in vain to convince relatives that the Pope didn’t really endorse Donald Trump or that Hillary Clinton didn’t sell weapons to ISIS, fake news has already weaseled its way into your brain.</p>



<p>Those “stories” and other falsified news <a href="https://www.buzzfeed.com/craigsilverman/viral-fake-election-news-outperformed-real-news-on-facebook?utm_term=.jmG4gkD8l9#.et2oJYMzQk" target="_blank" rel="noopener">outperformed</a> much of the real news on Facebook before the 2016 U.S. presidential election. And on Twitter, an <a href="http://journals.uic.edu/ojs/index.php/fm/article/view/7090/5653" target="_blank" rel="noopener">analysis</a> by University of Southern California computer scientists found that nearly 20 percent of election-related tweets came from bots, computer programs posing as real people and often spouting biased or fake news.</p>



<p>If you care about science, that’s a big problem. As daily news moves past the election, the fake news machine isn’t likely to shut down; it will just look for new kinds of attention-grabbing headlines. Fake news about climate change, vaccines and other hot-button science topics has already proven to get clicks.</p>



<p>And if you think only people on the opposite side of the political fence from you will fall for lies, think again. We all do it. Plenty of research shows that people are more likely to believe news if it confirms their preexisting political views, says cognitive scientist David Rapp of Northwestern University in Evanston, Ill. More surprising, though, are Rapp’s latest studies along with others on learning and memory. They show that when we read inaccurate information, we often <a href="http://cdp.sagepub.com/content/25/4/281.abstract" target="_blank" rel="noopener">remember it later as being true</a>, even if we initially knew it was wrong. That misinformation can then bias us or affect our decisions.</p>


<aside class="sn-conversion rich-text rich-text--with-sidebar"><!-- wp:html -->
<style>
.email-conversion {
  border: 1px solid #ffcccb;
  color: white;
  margin-top: 50px;
  background-image: url("/wp-content/themes/sciencenews/client/src/images/cta-module@2x.jpg");
  padding: 20px;
  clear: both;
}

</style>
<!-- /wp:html -->

<!-- wp:group {"className":"email-conversion newsletter-signup__wrapper___sbuqh"} -->
                        <style>.zephr-form-progress-bar.svelte-d78fa2{width:100%;border:0;border-radius:20px;margin-top:10px}.zephr-form-progress-bar.svelte-d78fa2::-webkit-progress-bar{background-color:var(--zephr-color-background-tinted);border:0;border-radius:20px}.zephr-form-progress-bar.svelte-d78fa2::-webkit-progress-value{background-color:var(--zephr-color-text-tinted);border:0;border-radius:20px}.zephr-progress-bar-step.svelte-d78fa2{margin:auto;color:var(--zephr-color-text-tinted);font-size:var(--zf-subtext-fontSize);font-family:var(--zf-root-fontFamily);cursor:pointer}.zephr-progress-bar-step.svelte-d78fa2:first-child{margin-left:0}.zephr-progress-bar-step.svelte-d78fa2:last-child{margin-right:0}.zephr-progress-bar-step.disabled.svelte-d78fa2{cursor:default}
.apple-pay-button{display:inline-block;-webkit-appearance:-apple-pay-button;-apple-pay-button-type:pay;width:440px;max-width:100%;height:45px;margin-top:20px}.apple-pay-button-black{-apple-pay-button-style:black}#google-pay-button.svelte-1acsmhs{width:440px;max-width:100%;height:45px;margin-top:20px}
.zephr-form-error-message-min-height.svelte-719cfr{min-height:1.1em}.zephr-form-error-message.svelte-719cfr{color:var(--zephr-color-warning-main);font-size:var(--zf-subtext-fontSize);margin-top:0.5em;position:relative;margin-left:1.2em;margin-right:1.2em}
#braintree-dropin-container.svelte-z7jd27{margin-top:1em;margin-bottom:1em}
#stripe-element.svelte-1lhuc6b{margin-top:2em;margin-bottom:1em;border:calc(var(--zephr-input-borderWidth) * 1px) solid
      var(--zephr-input-borderColor);border-radius:calc(var(--zephr-input-borderRadius) * 1px);padding:1em}#stripe-element.svelte-1lhuc6b iframe:focus{outline:none !important}
#stripe-mobile-pay-button.svelte-1t95nqv{width:440px;max-width:100%;height:45px;margin-top:20px}
.svelte-fa-base{height:1em;overflow:visible;transform-origin:center;vertical-align:-0.125em}.svelte-fa-fw{text-align:center;width:1.25em}.svelte-fa-pull-left.svelte-bvo74f{float:left}.svelte-fa-pull-right.svelte-bvo74f{float:right}.svelte-fa-size-lg.svelte-bvo74f{font-size:1.33333em;line-height:0.75em;vertical-align:-0.225em}.svelte-fa-size-sm.svelte-bvo74f{font-size:0.875em}.svelte-fa-size-xs.svelte-bvo74f{font-size:0.75em}.spin.svelte-bvo74f{animation:svelte-bvo74f-spin 2s 0s infinite linear}.pulse.svelte-bvo74f{animation:svelte-bvo74f-spin 1s infinite steps(8)}@keyframes svelte-bvo74f-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
.svelte-fa-layers.svelte-1sinijc{display:inline-block;position:relative}.svelte-fa-layers.svelte-1sinijc .svelte-fa{position:absolute;bottom:0;left:0;right:0;top:0;margin:auto;text-align:center}.svelte-fa-layers.svelte-1sinijc .svelte-fa-layers-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.svelte-fa-layers.svelte-1sinijc .svelte-fa-layers-text span{display:inline-block}.svelte-fa-pull-left.svelte-1sinijc{float:left}.svelte-fa-pull-right.svelte-1sinijc{float:right}.svelte-fa-size-lg.svelte-1sinijc{font-size:1.33333em;line-height:0.75em;vertical-align:-0.225em}.svelte-fa-size-sm.svelte-1sinijc{font-size:0.875em}.svelte-fa-size-xs.svelte-1sinijc{font-size:0.75em}
.container.svelte-1x0c3df{display:inline-block;height:auto}.svelte-fa-size-lg.svelte-1x0c3df{font-size:1.33333em;line-height:0.75em;vertical-align:-0.225em}.svelte-fa-size-sm.svelte-1x0c3df{font-size:0.875em}.svelte-fa-size-xs.svelte-1x0c3df{font-size:0.75em}
.spinner-container.svelte-1isq5k3{text-align:center;padding:2em}
#zuora_payment.svelte-1a5rslt{margin-top:1em;margin-bottom:1em}.zuora-disabled-iframe-container.svelte-1a5rslt .z_hppm_iframe{pointer-events:none;opacity:0.3}.zuora-dynamic-form-disabled.svelte-1a5rslt{pointer-events:none;opacity:0.3}.spinner-overlay.svelte-1a5rslt{width:100%;height:100%;position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center}.form-wrapper.svelte-1a5rslt{position:relative}
.zephr-form-button-top-margin.svelte-1eqnyqe{margin-top:20px}.zephr-form-button.svelte-1eqnyqe{padding:0 20px;text-decoration:none;text-transform:capitalize;border-radius:calc(var(--zephr-button-borderRadius) * 1px);font-size:var(--zf-button-fontSize);font-weight:normal;cursor:pointer;border-style:solid;border-width:calc(var(--zephr-button-borderWidth) * 1px);border-color:var(--zephr-color-action-tinted);transition:backdrop-filter 0.2s, background-color 0.2s;display:flex;justify-content:center;align-items:center;width:100%;background-color:var(--zephr-color-action-main);color:var(--zf-button-color);position:relative;overflow:hidden;font-family:var(--zf-root-fontFamily)}.zephr-form-button.svelte-1eqnyqe:hover{background-color:var(--zephr-color-action-tinted);border-color:var(--zephr-color-action-tinted)}.zephr-form-button.svelte-1eqnyqe:disabled{background-color:var(--zephr-color-background-tinted);border-color:var(--zephr-color-background-tinted)}.zephr-form-button.svelte-1eqnyqe:disabled:hover{background-color:var(--zephr-color-background-tinted);border-color:var(--zephr-color-background-tinted)}.zephr-form-button.inputHeight.svelte-1eqnyqe{height:calc(var(--zephr-input-height) * 1px)}.zephr-form-button.svelte-1eqnyqe:not(inputHeight){height:calc(var(--zephr-button-height) * 1px)}.zephr-form-button.aside.svelte-1eqnyqe{width:auto;margin-left:10px}
.payment-option-wrapper.svelte-wecxzz>input[type="radio"].svelte-wecxzz{display:none}.payment-option-wrapper.svelte-wecxzz.svelte-wecxzz{display:flex;flex:1 0 28%;width:100%}.payment-option-wrapper.svelte-wecxzz.svelte-wecxzz:only-child{max-width:325px}.box-container.svelte-wecxzz.svelte-wecxzz{display:flex;flex-direction:column;flex:1 1 0;width:0;text-align:center}.inner-box.svelte-wecxzz.svelte-wecxzz{border:var(--zf-payment-options-border);border-radius:var(--zf-payment-options-borderRadius);background-color:var(--zf-payment-options-bgColor);height:100%;display:flex;flex-direction:column}.box-container.highlighted.svelte-wecxzz .inner-box.svelte-wecxzz{border-top-left-radius:0;border-top-right-radius:0}.box-container.svelte-wecxzz .box-content.svelte-wecxzz{flex-grow:1;padding:30px 20px;margin:0 10px;overflow:hidden}.box-container.svelte-wecxzz .styled-box-content.svelte-wecxzz{color:var(--zephr-color-text-main);font-family:var(--zf-root-fontFamily)}
  .box-container .styled-box-content h1,
  .box-container .styled-box-content h2,
  .box-container .styled-box-content h3,
  .box-container .styled-box-content p,
  .box-container .styled-box-content span
   {color:var(--zephr-color-text-main);font-family:var(--zf-root-fontFamily)}.payment-options-container .box-container .styled-box-content button{color:#fff;background-color:var(--zephr-color-action-main);border-width:calc(var(--zephr-button-borderWidth) * 1px);border-color:var(--zephr-color-action-tinted);border-radius:calc(var(--zephr-button-borderRadius) * 1px);font-size:var(--zf-button-fontSize)}.payment-options-container .box-container .styled-box-content button:hover{background-color:var(--zephr-color-action-tinted);border-color:var(--zephr-color-action-tinted)}.payment-options-container .box-container .box-content img{max-width:210px;height:auto}.box-top.svelte-wecxzz.svelte-wecxzz{height:40px}.box-container.highlighted.svelte-wecxzz .box-top.svelte-wecxzz{color:var(--zf-payment-options-highlighted-color);background-color:var(--zf-payment-options-highlighted-bgColor);position:relative;border:var(--zf-payment-options-border);border-bottom-width:0;border-radius:var(--zf-payment-options-borderRadius);border-bottom-left-radius:0;border-bottom-right-radius:0;display:flex;justify-content:center;align-items:center}.box-container.highlighted.svelte-wecxzz .box-top .box-top-text.svelte-wecxzz{font-weight:bold}.box-container.svelte-wecxzz .box-bottom.svelte-wecxzz{min-height:60px;display:flex;flex-direction:column;align-items:center;padding:20px 0 30px;margin:0 30px}.button-sub-text.svelte-wecxzz.svelte-wecxzz{margin-top:10px}
.payment-options-container.svelte-15oxdku{flex-wrap:wrap;font-size:var(--zf-payment-options-fontSize);width:100%;color:var(--zf-payment-options-color);line-height:18px;padding:31px 0 20px;display:grid;justify-content:space-evenly;justify-items:center;grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));gap:13px}@media(max-width: 340px){.payment-options-container.svelte-15oxdku{grid-template-columns:repeat(auto-fit, minmax(280px, 1fr))}}
.zephr-form-input-inner-container.svelte-127vcsp{position:relative}.zephr-form-input-full-width.svelte-127vcsp{width:100%}.zephr-form-input.svelte-127vcsp{width:100%;display:block;height:calc(var(--zephr-input-height) * 1px);padding-left:8px;font-size:var(--zf-input-fontSize);border:calc(var(--zephr-input-borderWidth) * 1px) solid
      var(--zephr-input-borderColor);border-radius:calc(var(--zephr-input-borderRadius) * 1px);transition:border-color 0.25s ease, box-shadow 0.25s ease;outline:0;color:var(--zephr-color-text-main);background-color:var(--zf-input-bgColor);font-family:var(--zf-root-fontFamily)}.zephr-form-input.svelte-127vcsp::placeholder{color:var(--zephr-color-background-tinted);font-family:var(--zf-root-fontFamily)}.zephr-form-input-checkbox.svelte-127vcsp{width:auto;height:auto;margin:8px 5px 0 0;float:left}.zephr-form-input-radio.svelte-127vcsp{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.zephr-form-input-color[type="color"].svelte-127vcsp{width:50px;padding:0;border-radius:50%}.zephr-form-input-color[type="color"].svelte-127vcsp::-webkit-color-swatch{border:none;border-radius:50%;padding:0}.zephr-form-input-color[type="color"].svelte-127vcsp::-webkit-color-swatch-wrapper{border:none;border-radius:50%;padding:0}.zephr-form-input.disabled.svelte-127vcsp,.zephr-form-input.disabled.svelte-127vcsp:hover{border:calc(var(--zephr-input-borderWidth) * 1px) solid
      var(--zephr-input-borderColor);background-color:var(--zephr-color-background-tinted)}.zephr-form-input.error.svelte-127vcsp{border:1px solid var(--zephr-color-warning-main)}
.zephr-form-input-label.svelte-vnzoa4.svelte-vnzoa4{margin-top:10px;display:block;line-height:30px;font-size:var(--zf-subtext-fontSize);color:var(--zephr-color-text-tinted);font-family:var(--zf-root-fontFamily)}.zephr-form-input-label.svelte-vnzoa4.svelte-vnzoa4:first-child{margin-top:0}.zephr-form-input-label.svelte-vnzoa4 span.svelte-vnzoa4{display:block}
.zephr-form-password-match.svelte-11tz5c7.svelte-11tz5c7{margin:20px 0;justify-content:center}.zephr-form-password-match.svelte-11tz5c7 ul.svelte-11tz5c7{padding-left:0;margin:0}.zephr-form-password-requirement.svelte-11tz5c7.svelte-11tz5c7{display:flex;align-items:center;color:var(--zephr-color-text-tinted);font-size:var(--zf-subtext-fontSize);min-height:20px;font-family:var(--zf-root-fontFamily)}.zephr-form-password-requirement-icon.svelte-11tz5c7.svelte-11tz5c7{margin-right:10px;font-size:15px}
.zephr-form-password-progress.svelte-1b6w0g8.svelte-1b6w0g8{display:flex;margin-top:10px}.zephr-form-password-bar.svelte-1b6w0g8.svelte-1b6w0g8{width:100%;height:4px;border-radius:2px}.zephr-form-password-bar.svelte-1b6w0g8.svelte-1b6w0g8:not(:first-child){margin-left:8px}.zephr-form-password-requirements.svelte-1b6w0g8.svelte-1b6w0g8{margin:20px 0;justify-content:center}.zephr-form-password-requirements.svelte-1b6w0g8 ul.svelte-1b6w0g8{padding-left:0;margin:0}.zephr-form-password-requirement.svelte-1b6w0g8.svelte-1b6w0g8{display:flex;align-items:center;color:var(--zephr-color-text-tinted);font-size:var(--zf-subtext-fontSize);min-height:20px;font-family:var(--zf-root-fontFamily)}.zephr-form-password-requirement-icon.svelte-1b6w0g8.svelte-1b6w0g8{margin-right:10px;font-size:15px}
#payment-element.svelte-1oygrrs{margin-top:1em;margin-bottom:1em;border:calc(var(--zephr-input-borderWidth) * 1px) solid
            var(--zephr-input-borderColor);border-radius:calc(var(--zephr-input-borderRadius) * 1px);padding:1em}
.check-image.svelte-12ljnq4{height:1.2em;vertical-align:middle;margin-right:0.5em}.zephr-form-success-message.svelte-12ljnq4{color:var(--zephr-color-text-main);display:inline-block}
.zephr-form-verification-resend-link-container.svelte-b6r3ph{margin-bottom:2em}.zephr-form-verification-resend-link.svelte-b6r3ph,.zephr-form-verification-resend-text.svelte-b6r3ph{float:right;position:absolute;padding-right:2px;padding-top:0.5em;padding-left:0.5em;font-size:var(--zf-subtext-fontSize);right:0}.zephr-form-verification-resend-link.svelte-b6r3ph{cursor:pointer;color:var(--zf-link-color)}
.zephr-form-custom-text.svelte-12fdogm{margin-top:1em;margin-bottom:1em;color:var(--zephr-color-text-main)}
.zephr-form-checkbox.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.zephr-form-checkbox-label.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32{display:flex;align-items:center;font-family:var(--zf-root-fontFamily)}.zephr-form-checkmark.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32{position:relative;box-sizing:border-box;height:23px;width:23px;background-color:#fff;border:calc(var(--zephr-input-borderWidth) * 1px) solid
      var(--zephr-input-borderColor);border-radius:6px;margin-right:12px;cursor:pointer}.zephr-form-checkmark.checked.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32{border-color:var(--zephr-color-action-main)}.zephr-form-checkmark.checked.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32:after{content:"";position:absolute;width:6px;height:13px;border:solid var(--zephr-color-action-main);border-width:0 2px 2px 0;transform:rotate(45deg);top:3px;left:8px;box-sizing:border-box}.zephr-form-checkmark.disabled.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32{border:calc(var(--zephr-input-borderWidth) * 1px) solid
      var(--zephr-color-background-tinted)}.zephr-form-checkmark.disabled.checked.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32:after{border:solid var(--zephr-color-background-tinted);border-width:0 2px 2px 0}.zephr-form-checkmark.error.svelte-eyzg32.svelte-eyzg32.svelte-eyzg32{border:calc(var(--zephr-input-borderWidth) * 1px) solid
      var(--zephr-color-warning-main)}.zephr-form-checkbox.svelte-eyzg32:focus-visible+.zephr-form-checkbox-label.svelte-eyzg32>.zephr-form-checkmark.svelte-eyzg32{outline:2px solid var(--zephr-color-action-main);outline-color:-webkit-focus-ring-color}
.zephr-form-input-radio.svelte-17rnpjv.svelte-17rnpjv.svelte-17rnpjv{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.zephr-form-radio-label.svelte-17rnpjv.svelte-17rnpjv.svelte-17rnpjv{display:flex;align-items:center;font-family:var(--zf-root-fontFamily)}.zephr-form-radio-dot.svelte-17rnpjv.svelte-17rnpjv.svelte-17rnpjv{display:block;position:relative;box-sizing:border-box;height:23px;width:23px;background-color:#fff;border:1px solid #ebebeb;border-radius:50%;margin-right:12px;cursor:pointer}.checked.svelte-17rnpjv.svelte-17rnpjv.svelte-17rnpjv{border-color:var(--zephr-color-action-main)}.checked.svelte-17rnpjv.svelte-17rnpjv.svelte-17rnpjv:after{content:"";position:absolute;width:17px;height:17px;background:var(--zephr-color-action-main);border-radius:50%;top:2px;left:2px}.disabled.checked.svelte-17rnpjv.svelte-17rnpjv.svelte-17rnpjv:after{background:var(--zephr-color-background-tinted)}.error.svelte-17rnpjv.svelte-17rnpjv.svelte-17rnpjv{border:1px solid var(--zephr-color-warning-main)}.zephr-form-input-radio.svelte-17rnpjv:focus-visible+.zephr-form-radio-label.svelte-17rnpjv>.zephr-form-radio-dot.svelte-17rnpjv{outline:2px solid var(--zephr-color-action-main);outline-color:-webkit-focus-ring-color}
.zephr-form-input-error-text.svelte-1f2hwm0{color:var(--zephr-color-warning-main);font-family:var(--zf-root-fontFamily)}.zephr-form-input-select.svelte-1f2hwm0{display:block;appearance:auto;width:100%;height:calc(var(--zephr-input-height) * 1px);font-size:var(--zf-input-fontSize);font-family:var(--zf-root-fontFamily);border:calc(var(--zephr-input-borderWidth) * 1px) solid
      var(--zephr-input-borderColor);border-radius:calc(var(--zephr-input-borderRadius) * 1px);transition:border-color 0.25s ease, box-shadow 0.25s ease;outline:0;color:var(--zephr-color-text-main);background-color:var(--zf-input-bgColor);padding:10px}.zephr-form-input-select.unselected.svelte-1f2hwm0{color:var(--zephr-color-background-tinted)}.zephr-form-input-select.error.svelte-1f2hwm0{border-color:var(--zephr-color-warning-main)}.zephr-form-input-textarea.svelte-1f2hwm0{display:block;min-height:calc(var(--zephr-input-height) * 1px);min-width:100%;max-width:100%;background-color:var(--zf-input-bgColor);border:calc(var(--zephr-input-borderWidth) * 1px) solid var(--zephr-input-borderColor);border-radius:calc(var(--zephr-input-borderRadius) * 1px);transition:border-color 0.25s ease, box-shadow 0.25s ease;color:var(--zephr-color-text-main);font-size:var(--zf-input-fontSize);font-weight:300;padding:16px 8px;font-family:var(--zf-root-fontFamily);outline:0}.zephr-form-input-textarea.svelte-1f2hwm0::placeholder{color:var(--zephr-color-background-tinted);font-family:var(--zf-root-fontFamily)}.zephr-form-input-slider-output.svelte-1f2hwm0{margin:13px 0 0 10px}
.zephr-form-link.svelte-1mdtotm{margin:10px 0;color:var(--zf-link-color);text-decoration:underline;cursor:pointer;font-family:var(--zf-root-fontFamily)}.zephr-form-link-disabled.svelte-1mdtotm{color:var(--zephr-color-text-main);cursor:not-allowed;text-decoration:none}.zephr-form-link-no-underline.svelte-1mdtotm{text-decoration:none}
.zephr-form-reset-link-container.svelte-11qigta{min-height:2.5em}.zephr-form-link-message.svelte-11qigta{margin:10px 0 10px 20px;font-family:var(--zf-root-fontFamily)}
.zephr-form-reset-link-container.svelte-11qigta{min-height:2.5em}.zephr-form-link-message.svelte-11qigta{margin:10px 0 10px 20px;font-family:var(--zf-root-fontFamily)}
.zephr-form-google-icon.svelte-155mfls{width:20px}
.zephr-form-social-sign-in.svelte-18a7qws{align-items:center}.zephr-form-social-sign-in-button.svelte-18a7qws{width:100%;min-height:55px;padding:15px;color:#000;background-color:#fff;box-shadow:0 0 5px rgba(0, 0, 0, 0.3);border-radius:10px;font-size:17px;display:flex;align-items:center;cursor:pointer;margin-top:20px;font-family:var(--zf-root-fontFamily)}.zephr-form-social-sign-in-button.svelte-18a7qws:hover{background-color:#fafafa}.zephr-form-social-sign-in-icon.svelte-18a7qws{display:flex;justify-content:center;margin-right:30px;width:25px}
.zephr-form-promo-input-container.svelte-19l6fte{flex:0.6}.zephr-form-promo-activate-line.svelte-19l6fte{display:flex;cursor:pointer;min-height:calc(var(--zephr-input-height) * 1px);margin:1em 1.2em;font-size:var(--zf-payment-summary-fontSize);line-height:calc(var(--zephr-input-height) * 1px);color:var(--zf-link-color)}.zephr-form-promo-line.svelte-19l6fte{display:flex;min-height:calc(var(--zephr-input-height) * 1px);margin:1em 1.2em}.zephr-form-addon-line.svelte-19l6fte{display:flex;padding-top:1em;padding-bottom:1em;margin-left:1.2em}.zephr-form-summary-prorate-disclaimer.svelte-19l6fte{padding-top:0.25em;padding-left:1em;color:var(--zephr-color-text-tinted)}.zephr-form-summary-charge-description.svelte-19l6fte{color:var(--zephr-color-text-tinted)}.zephr-form-charge-line.svelte-19l6fte{display:flex;padding-top:1em;margin-left:1.2em;padding-left:1em}.zephr-form-summary-line-right.svelte-19l6fte{margin-left:auto;margin-right:1.5em;text-align:right}.zephr-form-summary-line-left.svelte-19l6fte{margin-left:10px}.zephr-form-summary-promo-middle.svelte-19l6fte{position:relative;top:calc(var(--zephr-input-height) * 0.5px)}.zephr-form-summary.svelte-19l6fte{border:var(--zf-payment-summary-border);border-radius:var(--zf-payment-summary-borderRadius);padding-top:1em;padding-bottom:1em;font-size:var(--zf-payment-summary-fontSize);margin-top:1.5em;margin-bottom:1.5em;color:var(--zf-payment-summary-color);background-color:var(--zf-payment-summary-bgColor)}.zephr-form-summary.svelte-19l6fte:first-child{margin-top:0}.zephr-form-summary-title.svelte-19l6fte{margin-bottom:1em;margin-left:1.2em}.zephr-form-summary-price-line.svelte-19l6fte{font-weight:bold;padding-left:1em;padding-top:1em}.zephr-form-summary-line.svelte-19l6fte{display:flex}.zephr-form-summary-price-line-upper.svelte-19l6fte{border-top:var(--zf-payment-summary-border);margin-top:1em}.zephr-form-summary-line-title.svelte-19l6fte{flex:0 0 65%;margin-left:1.2em}.zephr-form-summary-line-price.svelte-19l6fte{flex:1;text-align:right;margin-right:1.5em}
.zephr-form-divider-container.svelte-svq2r5{display:flex;align-items:center;justify-content:center;margin:1.5em 0}.zephr-form-divider-line.svelte-svq2r5{height:1px;width:50%;margin:0 5px;background-color:var(--zephr-color-text-tinted)}.zephr-form-divider-line-complete.svelte-svq2r5{height:1px;width:100%;margin:0 5px;background-color:var(--zephr-color-text-tinted)}.zephr-form-divider-text.svelte-svq2r5{margin:0 12px;color:var(--zephr-color-text-main);font-size:var(--zf-info-fontSize);font-family:var(--zf-root-fontFamily);white-space:nowrap}
.zephr-form-login-link.svelte-1bpa3mq.svelte-1bpa3mq{margin-top:1em;margin-bottom:1em;text-align:center}.zephr-form-login-link.svelte-1bpa3mq>a.svelte-1bpa3mq{color:var(--zf-link-color);margin-left:0.25em}
.zephr-form-account-code-container.svelte-ctt9he{margin-top:1.5em}
.zephr-form-invitation-container.svelte-yy7ok3{border:1px solid;margin:1.5em 0;padding:20px;color:var(--zephr-color-text-main)}.zephr-form-invitation-title.svelte-yy7ok3{margin-bottom:20px;font-weight:bold;font-family:var(--zf-root-fontFamily)}.zephr-form-invitation-email.svelte-yy7ok3{display:flex;align-items:center}.zephr-form-invitation-input-container.svelte-yy7ok3{flex-grow:1}.zephr-form-invitation-success-message.svelte-yy7ok3{margin-top:0.5em}
.subscription-option-product-label{margin-bottom:5px;margin-top:0}.subscription-option-wrapper.svelte-1ecrab7{display:flex;flex:1 0 28%;width:100%;max-width:400px}.subscription-option-wrapper.svelte-1ecrab7:only-child{max-width:325px}.subscription-option-box{display:flex;flex-direction:column;flex:1 1 0;width:0}.info-row.svelte-1ecrab7{margin-top:7px;margin-bottom:7px}.info-label.svelte-1ecrab7{display:inline;margin-right:10px}.info.svelte-1ecrab7{display:inline}hr.svelte-1ecrab7{border-width:1px 0px 0px;margin:5px 5px;border-color:var(--zephr-color-background-tinted)}.inner-box.svelte-1ecrab7{border:var(--zf-payment-options-border);border-radius:var(--zf-payment-options-borderRadius);background-color:var(--zf-payment-options-bgColor);height:100%;display:flex;flex-direction:column;flex-grow:1;padding:20px 20px;margin:0 10px;overflow:hidden}.change-disabled-label.svelte-1ecrab7{margin-top:15px}
.subscription-options-container.svelte-1nzbr4y{flex-wrap:wrap;font-size:var(--zf-payment-options-fontSize);width:100%;color:var(--zf-payment-options-color);line-height:18px;padding:31px 0 20px;display:grid;justify-content:space-evenly;justify-items:center;grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));gap:13px}@media(max-width: 340px){.subscription-options-container.svelte-1nzbr4y{grid-template-columns:repeat(auto-fit, minmax(280px, 1fr))}}
.subscription-list-item.svelte-1wg9q7{font-family:var(--zephr-typography-body-font), var(--zephr-typography-body-fallbackFont);color:var(--zephr-color-text-main)}hr.svelte-1wg9q7{border-width:1px 0px 0px;margin:20px 0px;border-color:var(--zephr-color-background-tinted)}.inactive.svelte-1wg9q7{text-decoration:line-through}h3.svelte-1wg9q7{margin:0 0 20px}.inner-box.svelte-1wg9q7{display:flex;flex-direction:column;flex-grow:1;padding:30px 20px;margin:0 10px;overflow:hidden;min-width:300px}
.zephr-form-tablink.svelte-ky9lgg{display:flex;align-items:center;cursor:pointer;justify-content:space-between;text-decoration:none;color:var(--zephr-color-text-main);font-weight:590;padding:var(--zf-list-subscriptions-section-padding);border-bottom:1px solid var(--zephr-color-background-tinted)}.zephr-form-tablink.svelte-ky9lgg:hover{text-decoration:underline}.zephr-form-tablink.svelte-ky9lgg:last-child{border-bottom:none
  }
.zephr-subscription-list-box-item.svelte-h57nmp.svelte-h57nmp{font-family:var(--zephr-typography-body-font), var(--zephr-typography-body-fallbackFont);color:var(--zephr-color-text-main);max-width:var(--zf-list-subscriptions-container-maxWidth);border-radius:var(--zf-list-subscriptions-container-borderRadius);border:var(--zf-list-subscriptions-container-border);padding:var(--zf-list-subscriptions-container-padding)}.zephr-inner-box.svelte-h57nmp.svelte-h57nmp{display:flex;flex-direction:column;flex-grow:1}.zephr-box-item-information.svelte-h57nmp.svelte-h57nmp{font-size:var(--zf-list-subscriptions-info-fontSize);color:var(--zephr-color-text-tinted);margin-top:8px}.zephr-section.svelte-h57nmp.svelte-h57nmp{padding:var(--zf-list-subscriptions-section-padding);border-bottom:1px solid var(--zephr-color-background-tinted);gap:8px}.zephr-section.svelte-h57nmp.svelte-h57nmp:first-child{padding-top:0;border-bottom:none
  }.zephr-section.svelte-h57nmp.svelte-h57nmp:last-child{border-bottom:none
  }.zephr-section.svelte-h57nmp span.svelte-h57nmp{font-weight:590}.zephr-section.svelte-h57nmp h2.svelte-h57nmp{margin:0}
.subscriptions-list-container.svelte-2hm0a{margin-top:40px;display:flex;flex-direction:column;gap:40px}
.past-subscriptions-link-wrapper.svelte-1gacumx{margin:10px 0}
.event-link-wrapper{margin-top:10px}.float-right.svelte-12vtv9v{float:right;margin-top:calc(var(--zephr-input-height) * -1px + 5px)}
.bold-label.svelte-121zkre label{font-weight:bold}.read-only-input.svelte-121zkre{border:none;background:none;color:#333;cursor:default;outline:none;flex-grow:1;margin-right:10px;margin-top:15px}.zephr-form-relative-container.svelte-121zkre{display:flex;align-items:center;justify-content:space-between;width:100%}.update-link{white-space:nowrap;text-decoration:none;font-size:0.75em}
.bold-label.svelte-121zkre label{font-weight:bold}.read-only-input.svelte-121zkre{border:none;background:none;color:#333;cursor:default;outline:none;flex-grow:1;margin-right:10px;margin-top:15px}.zephr-form-relative-container.svelte-121zkre{display:flex;align-items:center;justify-content:space-between;width:100%}.update-link{white-space:nowrap;text-decoration:none;font-size:0.75em}
.zephr-form-ro-attribute{display:flex;align-items:center;height:50px;justify-content:flex-start}.zephr-form-ro-attribute-label{margin-right:10px;&:after {
      content: ": ";
    }}
hr.svelte-4jb3ht{border-width:1px 0px 0px;margin:20px 0px;border-color:var(--zephr-color-background-tinted)}.session-container.svelte-4jb3ht{padding:15px;display:flex;flex-direction:column}.device-title.svelte-4jb3ht{font-weight:bold;font-size:1.2em;margin-bottom:10px}.current-device.svelte-4jb3ht{color:#777;font-size:0.9em;margin-left:10px}.login-time.svelte-4jb3ht,.browser.svelte-4jb3ht,.country.svelte-4jb3ht{margin-bottom:10px;font-size:0.9em}
.sign-out-all.svelte-1gdzu2p{color:#0073e6;cursor:pointer;font-size:1em;margin:20px 0;text-align:center}.sign-out-all.svelte-1gdzu2p:hover{text-decoration:underline}
.table.svelte-15e6uru.svelte-15e6uru{display:grid;grid-template-columns:0.7fr 1.4fr 1fr 0.6fr}.table-head.svelte-15e6uru.svelte-15e6uru{display:contents}.table-row.svelte-15e6uru.svelte-15e6uru{display:contents}.table-head.svelte-15e6uru>div.svelte-15e6uru{font-size:13px;padding:13px 10px 10px;border-bottom:1px solid var(--zephr-color-background-tinted)}.table-row.svelte-15e6uru>div.svelte-15e6uru{font-size:var(--zf-info-fontSize);height:60px;padding:0 10px;border-bottom:1px solid var(--zephr-color-background-tinted);display:flex;align-items:center}.table-head.svelte-15e6uru>div.svelte-15e6uru:first-child,.table-row.svelte-15e6uru>div.svelte-15e6uru:first-child{padding-left:0}.table-head.svelte-15e6uru>div.svelte-15e6uru:last-child,.table-row.svelte-15e6uru>div.svelte-15e6uru:last-child{padding-right:0}.taxes.svelte-15e6uru.svelte-15e6uru{color:var(--zephr-color-background-tinted);white-space:pre;font-size:small}
.zephr-form-button-group.svelte-s116f2{display:flex;flex-direction:row;gap:12px;margin-top:20px}.zephr-form-back-button.svelte-s116f2{padding:0 20px;border-radius:calc(var(--zephr-button-borderRadius) * 1px);border-style:solid;border-width:calc(var(--zephr-button-borderWidth) * 1px);border-color:var(--zephr-color-action-main);display:flex;justify-content:center;align-items:center;width:100%;background-color:var(--zephr-color-action-main);color:var(--zf-button-color);cursor:pointer}.zephr-form-continue-button.svelte-s116f2{padding:0 20px;border-radius:calc(var(--zephr-button-borderRadius) * 1px);border-style:solid;border-width:calc(var(--zephr-button-borderWidth) * 1px);border-color:var(--zephr-color-action-main);display:flex;justify-content:center;align-items:center;width:100%;background-color:var(--zf-button-color);color:var(--zephr-color-action-main);cursor:pointer}.zephr-form-back-button.svelte-s116f2:hover{background-color:var(--zephr-color-action-tinted);border-color:var(--zephr-color-action-tinted)}.zephr-form-continue-button.svelte-s116f2:hover{background-color:var(--zephr-color-action-tinted);border-color:var(--zephr-color-action-tinted);color:var(--zf-button-color)}.zephr-form-back-button.svelte-s116f2:not(inputHeight){height:calc(var(--zephr-button-height) * 1px)}.zephr-form-continue-button.svelte-s116f2:not(inputHeight){height:calc(var(--zephr-button-height) * 1px)}
.zephr-form-button.svelte-16hrghb{padding:0 20px;text-decoration:none;text-transform:capitalize;border-radius:calc(var(--zephr-button-borderRadius) * 1px);font-size:var(--zf-button-fontSize);font-weight:normal;cursor:pointer;border-style:solid;border-width:calc(var(--zephr-button-borderWidth) * 1px);border-color:var(--zephr-color-action-tinted);transition:backdrop-filter 0.2s, background-color 0.2s;display:flex;justify-content:center;align-items:center;width:100%;background-color:var(--zephr-color-action-main);color:var(--zf-button-color);position:relative;overflow:hidden;font-family:var(--zf-root-fontFamily);height:calc(var(--zephr-button-height) * 1px)}.zephr-form-button.svelte-16hrghb:hover{background-color:var(--zephr-color-action-tinted);border-color:var(--zephr-color-action-tinted);color:var(--zf-button-color)}.zephr-form-button-top-margin.svelte-16hrghb{margin-top:20px}
.zephr-form-max-width{max-width:var(--zf-container-maxWidth);margin:auto}.zephr-form-content.svelte-1v11ws7{padding:var(--zf-container-padding);background-color:var(--zf-container-bgColor);border:var(--zf-container-border);border-radius:var(--zf-container-borderRadius)}.zephr-payment-options-content.svelte-1v11ws7{background-color:transparent;border:none;border-radius:0}.close-button-container.svelte-1v11ws7{text-align:right;width:100%;margin-bottom:15px}.close-button.svelte-1v11ws7{cursor:pointer;display:inline;padding:7px;min-width:32px;min-height:32px;border-radius:16px;margin:1px}
.zephr-form{--zf-root-fontSize:16px;--zf-root-fontFamily:var(--zephr-typography-body-font), var(--zephr-typography-body-fallbackFont);--zf-container-maxWidth:440px;--zf-container-padding:20px;--zf-container-margin:20px auto;--zf-container-border:none;--zf-container-borderRadius:calc(var(--zephr-input-borderRadius) * 1px);--zf-container-color:var(--zephr-color-text-main);--zf-container-bgColor:var(--zephr-color-background-main, transparent);--zf-info-fontSize:14px;--zf-subtext-fontSize:12px;--zf-link-color:#6ba5e9;--zf-input-fontSize:var(--zf-root-fontSize);--zf-input-bgColor:var(--zephr-color-background-main, transparent);--zf-button-fontSize:calc(var(--zephr-button-fontSize, 16) * 1px);--zf-button-color:#fff;--zf-password-valid-color:#7bcb7f;--zf-password-invalid-color:#c4c4c4;--zf-payment-options-fontSize:var(--zf-subtext-fontSize);--zf-payment-options-color:var(--zephr-color-text-main);--zf-payment-options-bgColor:var(--zf-container-bgColor);--zf-payment-options-border:calc(var(--zephr-input-borderWidth) * 1px) solid var(--zephr-input-borderColor);--zf-payment-options-borderRadius:calc(var(--zephr-input-borderRadius) * 1px);--zf-payment-options-highlighted-color:var(--zephr-color-text-main);--zf-payment-options-highlighted-bgColor:var(--zephr-color-accent-main);--zf-payment-summary-fontSize:var(--zf-subtext-fontSize);--zf-payment-summary-color:var(--zephr-color-text-main);--zf-payment-summary-bgColor:var(--zf-input-bgColor);--zf-payment-summary-border:calc(var(--zephr-input-borderWidth) * 1px) solid var(--zephr-input-borderColor);--zf-payment-summary-borderRadius:calc(var(--zephr-input-borderRadius) * 1px);--zf-list-subscriptions-container-maxWidth:630px;--zf-list-subscriptions-container-padding:24px;--zf-list-subscriptions-section-padding:16px 0px;--zf-list-subscriptions-container-border:calc(var(--zephr-input-borderWidth) * 1px) solid var(--zephr-input-borderColor);--zf-list-subscriptions-container-borderRadius:calc(var(--zephr-input-borderRadius) * 1px);--zf-list-subscriptions-info-fontSize:var(--zf-info-fontSize)}.zephr-form.svelte-jjl1p8{color:var(--zf-container-color);margin:var(--zf-container-margin);font-size:var(--zf-root-fontSize);font-family:var(--zf-root-fontFamily)}.zephr-form *{box-sizing:border-box}:where(.zephr-form) button{text-transform:unset;overflow:visible;font-family:var(--zf-root-fontFamily, unset);font-size:var(--zf-root-fontSize, unset);line-height:unset;margin:unset;padding:unset;border:unset;background:unset;&:hover, &:focus-visible {
            border: unset;
            background: unset;
        }}.zephr-form-disabled-div{pointer-events:none;opacity:0.8}.zephr-form-relative-container{position:relative}.zephr-form-flex-container{display:flex}.zephr-form-input-inner-button{cursor:pointer;position:absolute;top:50%;transform:translateY(-50%);right:5px;padding:10px 5px}.zephr-form-input-inner-text{color:var(--zephr-color-text-main);font-size:var(--zf-subtext-fontSize);font-weight:bold;font-family:var(--zf-root-fontFamily)}
</style>
                        <script data-cmp-ab="2">!function(){"use strict";function e(){}function t(e,t){for(const r in t)e[r]=t[r];return e}function r(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(r)}function a(e){return"function"==typeof e}function i(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let s;function c(e,t){return e===t||(s||(s=document.createElement("a")),s.href=t,e===s.href)}function l(e,t,r,n){if(e){const o=u(e,t,r,n);return e[0](o)}}function u(e,r,n,o){return e[1]&&o?t(n.ctx.slice(),e[1](o(r))):n.ctx}function p(e,t,r,n){if(e[2]&&n){const o=e[2](n(r));if(void 0===t.dirty)return o;if("object"==typeof o){const e=[],r=Math.max(t.dirty.length,o.length);for(let n=0;n<r;n+=1)e[n]=t.dirty[n]|o[n];return e}return t.dirty|o}return t.dirty}function d(e,t,r,n,o,a){if(o){const i=u(t,r,n,a);e.p(i,o)}}function m(e){if(e.ctx.length>32){const t=[],r=e.ctx.length/32;for(let e=0;e<r;e++)t[e]=-1;return t}return-1}function f(e){return null==e?"":e}function h(e,t){e.appendChild(t)}function y(e,t,r){e.insertBefore(t,r||null)}function g(e){e.parentNode&&e.parentNode.removeChild(e)}function b(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function P(e){return document.createElement(e)}function A(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function S(e){return document.createTextNode(e)}function E(){return S(" ")}function C(){return S("")}function v(e,t,r,n){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}function T(e){return function(t){return t.preventDefault(),e.call(this,t)}}function _(e,t,r){null==r?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}const O=["width","height"];function w(e,t){const r=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in t)null==t[n]?e.removeAttribute(n):"style"===n?e.style.cssText=t[n]:"__value"===n?e.value=e[n]=t[n]:r[n]&&r[n].set&&-1===O.indexOf(n)?e[n]=t[n]:_(e,n,t[n])}function I(e,t){t=""+t,e.data!==t&&(e.data=t)}function R(e,t){e.value=null==t?"":t}function $(e,t,r,n){null==r?e.style.removeProperty(t):e.style.setProperty(t,r,n?"important":"")}function M(e,t,r){for(let r=0;r<e.options.length;r+=1){const n=e.options[r];if(n.__value===t)return void(n.selected=!0)}r&&void 0===t||(e.selectedIndex=-1)}function N(e,t,r){e.classList.toggle(t,!!r)}function x(e,t){return new e(t)}let L;function F(e){L=e}function z(){if(!L)throw new Error("Function called outside component initialization");return L}function k(e){z().$$.on_mount.push(e)}function D(){const e=z();return(t,r,{cancelable:n=!1}={})=>{const o=e.$$.callbacks[t];if(o){const a=function(e,t,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:n})}(t,r,{cancelable:n});return o.slice().forEach((t=>{t.call(e,a)})),!a.defaultPrevented}return!0}}const B=[],U=[];let V=[];const G=[],j=Promise.resolve();let q=!1;function H(e){V.push(e)}const K=new Set;let Y=0;function W(){if(0!==Y)return;const e=L;do{try{for(;Y<B.length;){const e=B[Y];Y++,F(e),J(e.$$)}}catch(e){throw B.length=0,Y=0,e}for(F(null),B.length=0,Y=0;U.length;)U.pop()();for(let e=0;e<V.length;e+=1){const t=V[e];K.has(t)||(K.add(t),t())}V.length=0}while(B.length);for(;G.length;)G.pop()();q=!1,K.clear(),F(e)}function J(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(H)}}const Q=new Set;let Z;function X(){Z={r:0,c:[],p:Z}}function ee(){Z.r||o(Z.c),Z=Z.p}function te(e,t){e&&e.i&&(Q.delete(e),e.i(t))}function re(e,t,r,n){if(e&&e.o){if(Q.has(e))return;Q.add(e),Z.c.push((()=>{Q.delete(e),n&&(r&&e.d(1),n())})),e.o(t)}else n&&n()}function ne(e){return void 0!==e?.length?e:Array.from(e)}function oe(e,t){const r={},n={},o={$$scope:1};let a=e.length;for(;a--;){const i=e[a],s=t[a];if(s){for(const e in i)e in s||(n[e]=1);for(const e in s)o[e]||(r[e]=s[e],o[e]=1);e[a]=s}else for(const e in i)o[e]=1}for(const e in n)e in r||(r[e]=void 0);return r}function ae(e){return"object"==typeof e&&null!==e?e:{}}function ie(e){e&&e.c()}function se(e,t,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,n),H((()=>{const t=e.$$.on_mount.map(r).filter(a);e.$$.on_destroy?e.$$.on_destroy.push(...t):o(t),e.$$.on_mount=[]})),s.forEach(H)}function ce(e,t){const r=e.$$;null!==r.fragment&&(!function(e){const t=[],r=[];V.forEach((n=>-1===e.indexOf(n)?t.push(n):r.push(n))),r.forEach((e=>e())),V=t}(r.after_update),o(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function le(e,t){-1===e.$$.dirty[0]&&(B.push(e),q||(q=!0,j.then(W)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ue(t,r,a,i,s,c,l=null,u=[-1]){const p=L;F(t);const d=t.$$={fragment:null,ctx:[],props:c,update:e,not_equal:s,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(p?p.$$.context:[])),callbacks:n(),dirty:u,skip_bound:!1,root:r.target||p.$$.root};l&&l(d.root);let m=!1;if(d.ctx=a?a(t,r.props||{},((e,r,...n)=>{const o=n.length?n[0]:r;return d.ctx&&s(d.ctx[e],d.ctx[e]=o)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](o),m&&le(t,e)),r})):[],d.update(),m=!0,o(d.before_update),d.fragment=!!i&&i(d.ctx),r.target){if(r.hydrate){const e=function(e){return Array.from(e.childNodes)}(r.target);d.fragment&&d.fragment.l(e),e.forEach(g)}else d.fragment&&d.fragment.c();r.intro&&te(t.$$.fragment),se(t,r.target,r.anchor),W()}F(p)}class pe{$$=void 0;$$set=void 0;$destroy(){ce(this,1),this.$destroy=e}$on(t,r){if(!a(r))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const e=n.indexOf(r);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");const de="700px",me="10000px",fe="0px",he=500;function ye(e,t){let r=t;e.style.maxHeight=t?me:fe,e.style.overflow=t?"unset":"hidden";const n=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return n&&(e.style.display=t?"unset":"none"),{update(t){if(n)return void(e.style.display=t?"unset":"none");if(t===r)return;r=t;const o=t?de:fe,a=t?fe:de;e.animate([{maxHeight:a,overflow:"hidden"},{maxHeight:o,overflow:"hidden"}],{duration:he,fill:"both"}).addEventListener("finish",(()=>{t&&e.animate([{maxHeight:o,overflow:"hidden"},{maxHeight:me,overflow:"hidden"}],{duration:100,fill:"both"})}))}}}const ge="progress_bar",be="payment_option_selection",Pe="password",Ae="otp_code",Se="button",Ee="payment",Ce="payment-pre-loader",ve="email_address",Te="success_message",_e="text",Oe="user_attribute",we="link",Ie="resend_login_link",Re="social_sign_in",$e="payment_summary",Me="divider",Ne="show_login_link",xe="account_code",Le="mobile_payment",Fe="invitation",ze="template_component",ke="subscription_select",De="event_link",Be="subscriptions_list",Ue="past_subscriptions_link",Ve="billing_history",Ge="change_payment_method_button",je="read_only_email_address",qe="read_only_password",He="read_only_user_attribute",Ke="change_payment_method",Ye="devices_list",We="sign_out_of_devices_button",Je="button_group",Qe="link_button";var Ze;!function(e){e.FORM_START="FORM_START",e.LOGIN_REGISTRATION_COMPLETE="LOGIN_REGISTRATION_COMPLETE",e.SECTION_EMAIL_COMPLETE="SECTION_EMAIL_COMPLETE",e.SECTION_PASSWORD_RESET_COMPLETE="SECTION_PASSWORD_RESET_COMPLETE",e.SECTION_FORGOT_PASSWORD_COMPLETE="SECTION_FORGOT_PASSWORD_COMPLETE",e.PART_PLAN_SELECT_COMPLETE="PART_PLAN_SELECT_COMPLETE",e.PART_ACCOUNT_VERIFICATION_COMPLETE="PART_ACCOUNT_VERIFICATION_COMPLETE",e.PART_PAYMENT_COMPLETE="PART_PAYMENT_COMPLETE",e.PART_SUCCESS_COMPLETE="PART_SUCCESS_COMPLETE",e.PART_CONTACT_VERIFICATION_COMPLETE="PART_CONTACT_VERIFICATION_COMPLETE",e.PART_PROFILE_UPDATE_COMPLETE="PART_PROFILE_UPDATE_COMPLETE",e.PART_EMAIL_UPDATE_COMPLETE="PART_EMAIL_UPDATE_COMPLETE",e.PART_EMAIL_UPDATE_OTP_COMPLETE="PART_EMAIL_UPDATE_OTP_COMPLETE",e.PART_PASSWORD_UPDATE_COMPLETE="PART_PASSWORD_UPDATE_COMPLETE",e.PART_PASSWORD_UPDATE_OTP_COMPLETE="PART_PASSWORD_UPDATE_OTP_COMPLETE",e.PART_ATTRIBUTES_UPDATE_COMPLETE="PART_ATTRIBUTES_UPDATE_COMPLETE",e.REGISTRATION_CUSTOM_COMPLETE="REGISTRATION_CUSTOM_COMPLETE",e.SELECT_SUBSCRIPTION_COMPLETE="SELECT_SUBSCRIPTION_COMPLETE",e.UPDATE="UPDATE",e.GO_BACK="GO_BACK",e.VERIFY_EMAIL_UPDATE_OTP="VERIFY_EMAIL_UPDATE_OTP",e.VERIFY_PASSWORD_UPDATE_OTP="VERIFY_PASSWORD_UPDATE_OTP",e.PART_CHANGE_PAYMENT_COMPLETE="PART_CHANGE_PAYMENT_COMPLETE",e.LIST_DEVICES_SESSIONS="LIST_DEVICES_SESSIONS",e.SIGN_OUT_ALL_DEVICES="SIGN_OUT_ALL_DEVICES",e.SIGN_OUT_SINGLE_DEVICE="SIGN_OUT_SINGLE_DEVICE"}(Ze||(Ze={}));const Xe={PLAN_SELECT:{type:"plan-select",order:0,completionEvent:Ze.PART_PLAN_SELECT_COMPLETE},ACCOUNT_VERIFICATION:{type:"account-verification",order:1,completionEvent:Ze.PART_ACCOUNT_VERIFICATION_COMPLETE},PAYMENT:{type:"payment",order:2,completionEvent:Ze.PART_PAYMENT_COMPLETE},SUCCESS:{type:"success",order:3,completionEvent:Ze.PART_SUCCESS_COMPLETE},CONTACT_VERIFICATION:{type:"contact-verification",order:1,completionEvent:Ze.PART_CONTACT_VERIFICATION_COMPLETE},PROFILE_UPDATE:{type:"profile-update",order:0,completionEvent:Ze.PART_PROFILE_UPDATE_COMPLETE},SELECT_SUBSCRIPTION:{type:"select-subscription",order:0,completionEvent:Ze.SELECT_SUBSCRIPTION_COMPLETE},EMAIL_UPDATE:{type:"email-update",order:0,completionEvent:Ze.PART_EMAIL_UPDATE_COMPLETE},EMAIL_UPDATE_OTP:{type:"email-update-otp",order:0,completionEvent:Ze.PART_EMAIL_UPDATE_OTP_COMPLETE},PASSWORD_UPDATE:{type:"password-update",order:0,completionEvent:Ze.PART_PASSWORD_UPDATE_COMPLETE},PASSWORD_UPDATE_OTP:{type:"password-update-otp",order:0,completionEvent:Ze.PART_PASSWORD_UPDATE_OTP_COMPLETE},ATTRIBUTES_UPDATE:{type:"attributes-update",order:0,completionEvent:Ze.PART_ATTRIBUTES_UPDATE_COMPLETE},LIST_SUBSCRIPTIONS:{type:"list-subscriptions",order:0},BILLING_HISTORY:{type:"billing-history",order:0},PAST_SUBSCRIPTIONS:{type:"past-subscriptions",order:0},CHANGE_PAYMENT:{type:"change-payment",order:2,completionEvent:Ze.PART_CHANGE_PAYMENT_COMPLETE},DEVICES_SESSIONS:{type:"devices-sessions",order:0,completionEvent:Ze.LIST_DEVICES_SESSIONS},CANCEL_SUCCESS:{type:"cancel-success",order:3}},et=e=>Object.values(Xe).find((t=>t.type==e))||(()=>{throw`No part ${e} found`})();var tt;!function(e){e[e.USER_DOES_NOT_EXIST=0]="USER_DOES_NOT_EXIST",e[e.USER_ALREADY_EXISTS=1]="USER_ALREADY_EXISTS",e[e.PASSWORD_NOT_STRONG_ENOUGH=2]="PASSWORD_NOT_STRONG_ENOUGH",e[e.EMAIL_VERIFICATION_REQUIRED=3]="EMAIL_VERIFICATION_REQUIRED",e[e.VERIFICATION_CODE_OR_PASSWORD_INCORRECT=4]="VERIFICATION_CODE_OR_PASSWORD_INCORRECT",e[e.VERIFICATION_CODE_INCORRECT=5]="VERIFICATION_CODE_INCORRECT",e[e.LOGIN_FAILED=6]="LOGIN_FAILED",e[e.UNKNOWN_LOGIN_REGISTER_ERROR=7]="UNKNOWN_LOGIN_REGISTER_ERROR",e[e.NO_COOKIE_FROM_LOGIN_REGISTER_ERROR=8]="NO_COOKIE_FROM_LOGIN_REGISTER_ERROR",e[e.NO_ACCOUNT_ACCESS=9]="NO_ACCOUNT_ACCESS",e[e.ACCOUNT_NOT_FOUND=10]="ACCOUNT_NOT_FOUND",e[e.PAYMENT_PROCESSING_ERROR=11]="PAYMENT_PROCESSING_ERROR",e[e.MOBILE_PAYMENT_PROCESSING_ERROR=12]="MOBILE_PAYMENT_PROCESSING_ERROR",e[e.PASSWORD_RESET_LINK_SEND_ERROR=13]="PASSWORD_RESET_LINK_SEND_ERROR",e[e.PASSWORD_RESET_ERROR=14]="PASSWORD_RESET_ERROR",e[e.VERIFICATION_CODE_SEND_ERROR=15]="VERIFICATION_CODE_SEND_ERROR",e[e.SOCIAL_SIGNIN_REGISTRATION_LOGIN_ERROR=16]="SOCIAL_SIGNIN_REGISTRATION_LOGIN_ERROR",e[e.PROMO_CODE_EXPIRED_ERROR=17]="PROMO_CODE_EXPIRED_ERROR",e[e.PROMO_CODE_INVALID_ERROR=18]="PROMO_CODE_INVALID_ERROR",e[e.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR=19]="PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR",e[e.INVITATION_FAILED_LIMIT_REACHED=20]="INVITATION_FAILED_LIMIT_REACHED",e[e.INVITATION_FAILED_DUPLICATE_EMAIL=21]="INVITATION_FAILED_DUPLICATE_EMAIL",e[e.INVITATION_FAILED_INVALID_EMAIL=22]="INVITATION_FAILED_INVALID_EMAIL",e[e.INVITATION_FAILED_NO_PRODUCT_ACCESS=23]="INVITATION_FAILED_NO_PRODUCT_ACCESS",e[e.INVITATION_FAILED_UNKNOWN=24]="INVITATION_FAILED_UNKNOWN",e[e.TOO_MANY_SESSIONS=25]="TOO_MANY_SESSIONS",e[e.INVALID_USER_ATTRIBUTES=26]="INVALID_USER_ATTRIBUTES",e[e.CONTACT_CREATION_NOT_ENABLED=27]="CONTACT_CREATION_NOT_ENABLED",e[e.NO_AUTHENTICATED_SESSION=28]="NO_AUTHENTICATED_SESSION",e[e.BLOCKED_EMAIL_DOMAIN=29]="BLOCKED_EMAIL_DOMAIN",e[e.UNKNOWN=30]="UNKNOWN"}(tt||(tt={}));const rt={[tt.USER_DOES_NOT_EXIST]:{languagePackKey:"forms.errors.user-not-found",fallbackMessage:"User not found.",jumpToPart:Xe.ACCOUNT_VERIFICATION.type,displayOnElements:[ve]},[tt.USER_ALREADY_EXISTS]:{languagePackKey:"forms.errors.email-taken",fallbackMessage:"This email address is already registered. Please log in to continue.",jumpToPart:Xe.ACCOUNT_VERIFICATION.type,displayOnElements:[ve]},[tt.EMAIL_VERIFICATION_REQUIRED]:{languagePackKey:"forms.errors.email-verification-required",fallbackMessage:"Email verification is required",jumpToPart:Xe.ACCOUNT_VERIFICATION.type,displayOnElements:[ve]},[tt.VERIFICATION_CODE_OR_PASSWORD_INCORRECT]:{languagePackKey:"forms.errors.otp-or-password-incorrect",fallbackMessage:"The password or code you entered is incorrect.",displayOnElements:[Ae,Pe]},[tt.VERIFICATION_CODE_INCORRECT]:{languagePackKey:"forms.errors.otp-incorrect",fallbackMessage:"The code you entered is incorrect.",displayOnElements:[Ae]},[tt.LOGIN_FAILED]:{languagePackKey:"forms.errors.login-failed",fallbackMessage:"The email address or password you entered is incorrect.",displayOnElements:[Pe,Ae]},[tt.PASSWORD_NOT_STRONG_ENOUGH]:{languagePackKey:"n/a",fallbackMessage:"",useDymamicMessage:!0,displayOnElements:[Pe]},[tt.UNKNOWN_LOGIN_REGISTER_ERROR]:{languagePackKey:"forms.errors.unknown-error",fallbackMessage:"Something went wrong. Please try again later",displayOnElements:[Pe,Ae]},[tt.NO_COOKIE_FROM_LOGIN_REGISTER_ERROR]:{languagePackKey:"forms.errors.unknown-error",fallbackMessage:"Something went wrong. Please try again later",displayOnElements:[Pe,Ae]},[tt.NO_ACCOUNT_ACCESS]:{languagePackKey:"forms.errors.too-many-requests",fallbackMessage:"To gain login access, please contact your administrator.",displayOnElements:[Pe]},[tt.ACCOUNT_NOT_FOUND]:{languagePackKey:"forms.errors.company-account-not-found",fallbackMessage:"Account not found.",jumpToPart:Xe.ACCOUNT_VERIFICATION.type,displayOnElements:[xe]},[tt.PAYMENT_PROCESSING_ERROR]:{languagePackKey:"forms.errors.unknown-payment-error",fallbackMessage:"Something went wrong when processing your payment. Please try again later.",displayOnElements:[Ee]},[tt.MOBILE_PAYMENT_PROCESSING_ERROR]:{languagePackKey:"forms.errors.unknown-payment-error",fallbackMessage:"Something went wrong when processing your payment. Please try again later.",displayOnElements:[Le]},[tt.PASSWORD_RESET_LINK_SEND_ERROR]:{languagePackKey:"forms.errors.password-reset-link-send-failed",fallbackMessage:"Unable to send a password reset link. Please try again later",displayOnElements:[we]},[tt.VERIFICATION_CODE_SEND_ERROR]:{languagePackKey:"forms.errors.otp-send-failed",fallbackMessage:"Unable to send a verification code. Please try again later",displayOnElements:[Ae]},[tt.PASSWORD_RESET_ERROR]:{languagePackKey:"forms.errors.password-reset-failed",fallbackMessage:"Unable to reset your password. Please try again later",displayOnElements:[Pe]},[tt.SOCIAL_SIGNIN_REGISTRATION_LOGIN_ERROR]:{languagePackKey:"forms.errors.unknown-error",fallbackMessage:"Something went wrong. Please try again later",displayOnElements:[Re]},[tt.PROMO_CODE_EXPIRED_ERROR]:{languagePackKey:"forms.errors.promo-code-expired",fallbackMessage:"Promo code expired",displayOnElements:[$e]},[tt.PROMO_CODE_INVALID_ERROR]:{languagePackKey:"forms.errors.promo-code-invalid",fallbackMessage:"Invalid promo code",displayOnElements:[$e]},[tt.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR]:{languagePackKey:"forms.errors.promo-code-invalid-for-payment-option",fallbackMessage:"Promo code cannot be applied to selected option",displayOnElements:[$e]},[tt.INVITATION_FAILED_LIMIT_REACHED]:{languagePackKey:"forms.errors.invitation-failed-limit-reached",fallbackMessage:"You have reached the sharing limit for this product",displayOnElements:[Fe]},[tt.INVITATION_FAILED_DUPLICATE_EMAIL]:{languagePackKey:"forms.errors.invitation-failed-duplicate-email",fallbackMessage:"An invite has already been created for this email",displayOnElements:[Fe]},[tt.INVITATION_FAILED_INVALID_EMAIL]:{languagePackKey:"forms.errors.invitation-failed-invalid-email",fallbackMessage:"Invalid email address",displayOnElements:[Fe]},[tt.INVITATION_FAILED_NO_PRODUCT_ACCESS]:{languagePackKey:"forms.errors.invitation-failed-no-product-access",fallbackMessage:"You do not currently have access to this product",displayOnElements:[Fe]},[tt.INVITATION_FAILED_UNKNOWN]:{languagePackKey:"forms.errors.unknown-error",fallbackMessage:"Something went wrong. Please try again later",displayOnElements:[Fe]},[tt.TOO_MANY_SESSIONS]:{languagePackKey:"forms.errors.session-limit-reached",fallbackMessage:"You have reached the session limit. Please log out from another device to access this content.",displayOnElements:[ve]},[tt.INVALID_USER_ATTRIBUTES]:{languagePackKey:"forms.errors.user-attribute-invalid",fallbackMessage:"Invalid User Attribute",displayOnElements:[Oe]},[tt.CONTACT_CREATION_NOT_ENABLED]:{languagePackKey:"forms.errors.contact-creation-disabled",fallbackMessage:"This operation is not possible at the moment, please try again later.",jumpToPart:Xe.ACCOUNT_VERIFICATION.type,displayOnElements:[ve]},[tt.NO_AUTHENTICATED_SESSION]:{languagePackKey:"forms.errors.no-authenticated-session",fallbackMessage:"Please login to update your profile"},[tt.BLOCKED_EMAIL_DOMAIN]:{languagePackKey:"forms.errors.email-domain-blocked",fallbackMessage:"Please use a different email address, this domain is not supported.",jumpToPart:Xe.ACCOUNT_VERIFICATION.type,displayOnElements:[ve]},[tt.UNKNOWN]:{languagePackKey:"forms.errors.unknown-error",fallbackMessage:"Something went wrong. Please try again later"}},nt=(e,t)=>t.serverErrors.find((t=>rt[t].displayOnElements?.includes(e)))??void 0,ot={PLAN_SELECT:{type:"plan_select",defaultLabel:"Plan Select",fullWidth:!0},EMAIL:{type:"email",defaultLabel:"Account Verification",completionEvent:Ze.SECTION_EMAIL_COMPLETE},PASSWORD_SETUP:{type:"password_setup",defaultLabel:"Password Setup"},PASSWORDLESS_VIA_LOGIN_LINK:{type:"passwordless_login_via_link",defaultLabel:"Passwordless Login via Login Link"},VERIFICATION_CODE_LOGIN:{type:"verification_code_login",defaultLabel:""},VERIFICATION_CODE_REGISTRATION:{type:"verification_code_registration",defaultLabel:""},LOGIN_PASSWORD:{type:"login_password",defaultLabel:"Login"},REGISTRATION_CUSTOM:{type:"registration_custom",defaultLabel:""},FORGOT_PASSWORD:{type:"forgot_password",defaultLabel:"",completionEvent:Ze.SECTION_FORGOT_PASSWORD_COMPLETE},PASSWORD_RESET:{type:"reset_password",defaultLabel:"",completionEvent:Ze.SECTION_PASSWORD_RESET_COMPLETE},SUCCESS:{type:"success",defaultLabel:""},EMAIL_VERIFIED:{type:"email_verified",defaultLabel:""},READ_ONLY_PROFILE:{type:"read_only_profile",defaultLabel:"Read Only Profile"},UPDATE_EMAIL:{type:"update_email",defaultLabel:"Update Email"},UPDATE_PASSWORD:{type:"update_password",defaultLabel:"Update Password"},UPDATE_ATTRIBUTES:{type:"update_attributes",defaultLabel:"Update Attributes"},CHANGE_PAYMENT:{type:"change-payment",completionEvent:Ze.PART_CHANGE_PAYMENT_COMPLETE,defaultLabel:""},SELECT:{type:"select",defaultLabel:"",fullWidth:!0},LIST:{type:"list",defaultLabel:"",fullWidth:!0},PAST_SUBSCRIPTIONS:{type:"past-subscriptions",defaultLabel:"",fullWidth:!0}},at=e=>Object.values(ot).find((t=>t.type==e));function it(e,t,r){const n={event:t,formType:e.formType,formId:e.formId,ruleId:e.ruleId,outcomeId:e.outcomeId,...r};if(window.postMessage({"zephr-form-datalayer-event":n},window.origin),!e.organisationConfiguration.trackFormDataLayerEvents)return;const o=e.organisationConfiguration.dataLayerName||"dataLayer";window[o]=window[o]||[],window[o].push(n)}const st=(e,t,r)=>{const n=((e,t)=>t.parts.flatMap((e=>e.sections.map((t=>({part:e,section:t}))))).find((t=>t.section.type===e)))(e,t);if(!n)throw`Cannot find section ${e}`;const o=r.getFormState();return ht({form:t,formActions:r,part:n.part,section:n.section,previousPart:o.currentPart,previousSection:o.currentSection}),Promise.resolve()},ct=(e,t,r)=>{if(t.environment.previewMode)return;const n=t.parts.find((t=>t.type==e)),o=r.getFormState();return ht({form:t,formActions:r,part:n,section:n.sections[0],previousPart:o.currentPart,previousSection:o.currentSection}),Promise.resolve()},lt=(e,t,r)=>{const n=t.sections.findIndex((t=>t.order==e.order));return t.sections.length>n+1?{section:t.sections[n+1],part:t}:((e,t)=>{const r=et(e.type);if(r){const n=t.parts.find((e=>et(e.type).order===r.order+1))??t.parts[t.parts.indexOf(e)+1];if(n)return{section:n.sections[0],part:n}}return null})(t,r)},ut=e=>e?.startsWith("custom_")?"registration_custom":e,pt=(e,t,r)=>t.sectionFlow.sectionVisibilities.find((t=>t.type===ut(e.type)))?.isVisible(t,r)??!0,dt=(e,t,r)=>{const n=t.sectionFlow.sectionVisibilities.find((t=>t.type===ut(e.type)));return(n?.isDisplayedInProgressBar&&pt(e,t,r))??!0},mt=(e,t,r)=>{if(e.environment.previewMode)return;let n=0,o={part:t.currentPart,section:t.currentSection};do{if(n++,n>50)throw new Error(`Cannot move from ${t.currentPart.type}:${t.currentSection.type}. \n      Exceeded max loop size after ${o?.part?.type}:${o?.section?.type}\n    `);const r=lt(o?.section,o?.part,e);if(r?.part.type===o?.part?.type&&r?.section.type===o?.section?.type&&r?.section.order===o?.section?.order)throw new Error(`Cannot move from ${t.currentPart.type}:${t.currentSection.type}. \n        Infinte loop found at next section ${r?.part?.type}:${r?.section?.type}\n      `);o=r}while(o&&!pt(o.section,e,t));if(!o||o.part!==t.currentPart){const n=et(t.currentPart.type),o=n?.completionEvent&&e.sectionFlow.eventHandlers[n.completionEvent];if(o)return o(e,t,r)}if(!o)throw"No next section";return ht({form:e,formActions:r,part:o.part,section:o.section,previousPart:t.currentPart,previousSection:t.currentSection}),Promise.resolve()},ft=(e,t,r)=>{if(e.environment.previewMode)return;const n=at(t.currentSection.type);return((n&&e.sectionFlow.eventHandlers[n.completionEvent])??mt)(e,t,r)},ht=({form:e,formActions:t,part:r,section:n,previousSection:o,previousPart:a})=>{t.updateFormState({currentPart:r,currentSection:n}),it(e,"zephr_form_section_change",{sectionId:n.type,previousSectionId:o.type,partId:r.type,previousPartId:a.type}),(e=>{try{const t=document.getElementById(e);if(!t)return;const{top:r}=t.getBoundingClientRect();r<0&&t.scrollIntoView({block:"start",inline:"nearest"})}catch(e){console.error(e)}})(e.formId)};function yt(e,t,r){const n=e.slice();n[7]=t[r];const o=!n[0]&&!n[7].isDisabled&&n[7].order<n[2].order;return n[8]=o,n}function gt(e){let t,r,n,o=ne(e[3]),a=[];for(let t=0;t<o.length;t+=1)a[t]=At(yt(e,o,t));return{c(){t=P("div");for(let e=0;e<a.length;e+=1)a[e].c();r=E(),n=P("progress"),_(t,"class","zephr-form-flex-container"),N(t,"zephr-payment-form-flex-container",e[1]),_(n,"class","zephr-form-progress-bar svelte-d78fa2"),_(n,"id","progress-bar"),_(n,"max","100"),n.value=e[4],N(n,"zephr-payment-form-progress-bar",e[1])},m(e,o){y(e,t,o);for(let e=0;e<a.length;e+=1)a[e]&&a[e].m(t,null);y(e,r,o),y(e,n,o)},p(e,r){if(15&r){let n;for(o=ne(e[3]),n=0;n<o.length;n+=1){const i=yt(e,o,n);a[n]?a[n].p(i,r):(a[n]=At(i),a[n].c(),a[n].m(t,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=o.length}2&r&&N(t,"zephr-payment-form-flex-container",e[1]),16&r&&(n.value=e[4]),2&r&&N(n,"zephr-payment-form-progress-bar",e[1])},d(e){e&&(g(t),g(r),g(n)),b(a,e)}}}function bt(e){let t,r,n,o=e[7].label+"";return{c(){t=P("div"),r=S(o),n=E(),_(t,"class","zephr-progress-bar-step disabled svelte-d78fa2"),N(t,"zephr-payment-progress-bar-step",e[1])},m(e,o){y(e,t,o),h(t,r),h(t,n)},p(e,n){8&n&&o!==(o=e[7].label+"")&&I(r,o),2&n&&N(t,"zephr-payment-progress-bar-step",e[1])},d(e){e&&g(t)}}}function Pt(e){let t,r,n,o,a,i=e[7].label+"";function s(){return e[6](e[7])}return{c(){t=P("button"),r=S(i),n=E(),_(t,"type","button"),_(t,"class","zephr-progress-bar-step svelte-d78fa2"),N(t,"zephr-payment-progress-bar-step",e[1])},m(e,i){y(e,t,i),h(t,r),h(t,n),o||(a=v(t,"click",T(s)),o=!0)},p(n,o){e=n,8&o&&i!==(i=e[7].label+"")&&I(r,i),2&o&&N(t,"zephr-payment-progress-bar-step",e[1])},d(e){e&&g(t),o=!1,a()}}}function At(e){let t;function r(e,t){return e[8]?Pt:bt}let n=r(e),o=n(e);return{c(){o.c(),t=C()},m(e,r){o.m(e,r),y(e,t,r)},p(e,a){n===(n=r(e))&&o?o.p(e,a):(o.d(1),o=n(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){e&&g(t),o.d(e)}}}function St(t){let r,n=!isNaN(t[4]),o=n&&gt(t);return{c(){o&&o.c(),r=C()},m(e,t){o&&o.m(e,t),y(e,r,t)},p(e,[t]){16&t&&(n=!isNaN(e[4])),n?o?o.p(e,t):(o=gt(e),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},i:e,o:e,d(e){e&&g(r),o&&o.d(e)}}}function Et(e,t,r){let n,o,a,{disabled:i}=t,{items:s}=t,{isPaymentForm:c=!1}=t;return e.$$set=e=>{"disabled"in e&&r(0,i=e.disabled),"items"in e&&r(5,s=e.items),"isPaymentForm"in e&&r(1,c=e.isPaymentForm)},e.$$.update=()=>{32&e.$$.dirty&&r(2,n=s.find((e=>e.isCurrent))),32&e.$$.dirty&&r(3,o=s.filter((e=>e.isVisible))),12&e.$$.dirty&&r(4,a=Math.floor(100/(o.length-1)*(n.isVisible?n.visibleOrder:Math.max.apply(Math,o.filter((e=>e.order<n.order)).map((e=>e.visibleOrder))))))},[i,c,n,o,a,s,e=>{e.onSelect()}]}class Ct extends pe{constructor(e){super(),ue(this,e,Et,St,i,{disabled:0,items:5,isPaymentForm:1})}}var vt;!function(e){e.EMPTY="EMPTY",e.PAYMENT="PAYMENT",e.CHANGE_SUBSCRIPTION="CHANGE_SUBSCRIPTION",e.REGISTRATION="REGISTRATION",e.CONTACT="CONTACT",e.DATA_CAPTURE="DATA_CAPTURE",e.COMPLETE_REGISTRATION="COMPLETE_REGISTRATION",e.UPDATE_PROFILE="UPDATE_PROFILE",e.CANCEL_SUBSCRIPTION="CANCEL_SUBSCRIPTION",e.LIST_SUBSCRIPTIONS="LIST_SUBSCRIPTIONS",e.DEVICES="DEVICES"}(vt||(vt={}));const Tt=(e,t,r)=>{let n=0,o=0;return e.parts.flatMap((e=>e.sections.map((t=>({part:e,section:t}))))).map((({part:a,section:i})=>({type:i.type,isVisible:dt(i,e,t),label:i.label??a.label??at(i.type)?.defaultLabel,isCurrent:t.currentSection==i,isDisabled:t.loginRegistrationComplete&&![Xe.PLAN_SELECT.type].includes(a.type),order:n++,visibleOrder:dt(i,e,t)?o++:null,onSelect:()=>ht({form:e,formActions:r,part:a,section:i,previousSection:t.currentSection,previousPart:t.currentPart})})))},_t={matches:e=>e.type===ge,create:(e,t,r)=>({component:Ct,props:{disabled:t.isBusy,items:Tt(e,t,r),isPaymentForm:e.formType===vt.PAYMENT}})},Ot=e=>e.typeConfiguration;function wt(t){let r,n,o,a,i,s,l,u,p,d,m,f;return{c(){r=P("script"),r.innerHTML="",o=P("script"),o.innerHTML="",i=P("script"),i.innerHTML="",l=P("script"),l.innerHTML="",p=E(),d=P("div"),m=E(),f=P("div"),f.innerHTML="",c(r.src,n="https://js.braintreegateway.com/web/3.85.3/js/google-payment.min.js")||_(r,"src","https://js.braintreegateway.com/web/3.85.3/js/google-payment.min.js"),c(o.src,a="https://pay.google.com/gp/p/js/pay.js")||_(o,"src","https://pay.google.com/gp/p/js/pay.js"),_(o,"onload","window.googlePayLoadBraintreeCallback()"),c(i.src,s="https://js.braintreegateway.com/web/3.85.3/js/client.min.js")||_(i,"src","https://js.braintreegateway.com/web/3.85.3/js/client.min.js"),_(i,"onload","window.braintreeLoadCallback()"),c(l.src,u="https://js.braintreegateway.com/web/3.85.3/js/apple-pay.min.js")||_(l,"src","https://js.braintreegateway.com/web/3.85.3/js/apple-pay.min.js"),_(l,"onload","window.applePayLoadBraintreeCallback()"),_(d,"id","google-pay-button"),_(d,"class","svelte-1acsmhs"),N(d,"zephr-form-disabled-div",t[0]),N(d,"zephr-payment-form-disabled-div",t[0]),_(f,"id","apple_pay_button")},m(e,t){h(document.head,r),h(document.head,o),h(document.head,i),h(document.head,l),y(e,p,t),y(e,d,t),y(e,m,t),y(e,f,t)},p(e,[t]){1&t&&N(d,"zephr-form-disabled-div",e[0]),1&t&&N(d,"zephr-payment-form-disabled-div",e[0])},i:e,o:e,d(e){e&&(g(p),g(d),g(m),g(f)),g(r),g(o),g(i),g(l)}}}function It(e,t,r){let{onMountCallback:n}=t,{isDisabled:o}=t,{disableCoreDependencyHeader:a}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(1,n=e.onMountCallback),"isDisabled"in e&&r(0,o=e.isDisabled),"disableCoreDependencyHeader"in e&&r(2,a=e.disableCoreDependencyHeader)},[o,n,a]}function Rt(t){let r,n,o;return{c(){r=P("div"),n=P("div"),o=S(t[0]),_(n,"class","zephr-form-error-message svelte-719cfr"),_(n,"aria-live","assertive"),N(n,"zephr-payment-form-error-message",!t[1]),_(r,"class","zephr-form-error-message-min-height svelte-719cfr"),N(r,"zephr-payment-form-error-message-min-height",!t[1])},m(e,t){y(e,r,t),h(r,n),h(n,o)},p(e,[t]){1&t&&I(o,e[0]),2&t&&N(n,"zephr-payment-form-error-message",!e[1]),2&t&&N(r,"zephr-payment-form-error-message-min-height",!e[1])},i:e,o:e,d(e){e&&g(r)}}}function $t(e,t,r){let{error:n}=t,{isPaymentForm:o=!1}=t;return e.$$set=e=>{"error"in e&&r(0,n=e.error),"isPaymentForm"in e&&r(1,o=e.isPaymentForm)},[n,o]}class Mt extends pe{constructor(e){super(),ue(this,e,$t,Rt,i,{error:0,isPaymentForm:1})}}function Nt(e){let t,r,n,o,a,i,s;return i=new Mt({props:{error:e[0]?.message??e[2]??"",isPaymentForm:!0}}),{c(){t=P("script"),t.innerHTML="",n=E(),o=P("div"),a=E(),ie(i.$$.fragment),c(t.src,r="https://js.braintreegateway.com/web/dropin/1.33.2/js/dropin.min.js")||_(t,"src","https://js.braintreegateway.com/web/dropin/1.33.2/js/dropin.min.js"),_(t,"onload","window.braintreeLoadCallback()"),_(o,"id","braintree-dropin-container"),_(o,"class","svelte-z7jd27"),N(o,"zephr-form-disabled-div",e[1]),N(o,"zephr-payment-form-disabled-div",e[1])},m(e,r){h(document.head,t),y(e,n,r),y(e,o,r),y(e,a,r),se(i,e,r),s=!0},p(e,[t]){(!s||2&t)&&N(o,"zephr-form-disabled-div",e[1]),(!s||2&t)&&N(o,"zephr-payment-form-disabled-div",e[1]);const r={};5&t&&(r.error=e[0]?.message??e[2]??""),i.$set(r)},i(e){s||(te(i.$$.fragment,e),s=!0)},o(e){re(i.$$.fragment,e),s=!1},d(e){e&&(g(n),g(o),g(a)),g(t),ce(i,e)}}}function xt(e,t,r){let{onMountCallback:n}=t,{providerError:o}=t,{isDisabled:a}=t,{isLoaded:i}=t,{error:s=null}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(3,n=e.onMountCallback),"providerError"in e&&r(0,o=e.providerError),"isDisabled"in e&&r(1,a=e.isDisabled),"isLoaded"in e&&r(4,i=e.isLoaded),"error"in e&&r(2,s=e.error)},[o,a,s,n,i]}function Lt(e){let t,r,n,o,a,i,s;return i=new Mt({props:{error:e[0]?.message??(e[2]?e[3]:"")??"",isPaymentForm:!0}}),{c(){t=P("script"),t.innerHTML="",n=E(),o=P("div"),a=E(),ie(i.$$.fragment),c(t.src,r="https://js.stripe.com/v3/")||_(t,"src","https://js.stripe.com/v3/"),_(t,"onload","window.stripeLoadCallback()"),_(o,"id","stripe-element"),_(o,"class","svelte-1lhuc6b"),N(o,"zephr-form-disabled-div",e[1]),N(o,"zephr-payment-form-disabled-div",e[1])},m(e,r){h(document.head,t),y(e,n,r),y(e,o,r),y(e,a,r),se(i,e,r),s=!0},p(e,[t]){(!s||2&t)&&N(o,"zephr-form-disabled-div",e[1]),(!s||2&t)&&N(o,"zephr-payment-form-disabled-div",e[1]);const r={};13&t&&(r.error=e[0]?.message??(e[2]?e[3]:"")??""),i.$set(r)},i(e){s||(te(i.$$.fragment,e),s=!0)},o(e){re(i.$$.fragment,e),s=!1},d(e){e&&(g(n),g(o),g(a)),g(t),ce(i,e)}}}function Ft(e,t,r){let{onMountCallback:n}=t,{providerError:o}=t,{isDisabled:a}=t,{isComplete:i}=t,{isLoaded:s}=t,{error:c=null}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(4,n=e.onMountCallback),"providerError"in e&&r(0,o=e.providerError),"isDisabled"in e&&r(1,a=e.isDisabled),"isComplete"in e&&r(2,i=e.isComplete),"isLoaded"in e&&r(5,s=e.isLoaded),"error"in e&&r(3,c=e.error)},[o,a,i,c,n,s]}function zt(e){let t,r;return{c(){t=P("script"),t.innerHTML="",c(t.src,r="https://js.stripe.com/v3/")||_(t,"src","https://js.stripe.com/v3/"),_(t,"onload","window.stripeLoadCallback()")},m(e,r){y(e,t,r)},d(e){e&&g(t)}}}function kt(t){let r,n,o,a,i,s=!t[1]&&zt();return{c(){r=P("script"),r.innerHTML="",s&&s.c(),o=C(),a=E(),i=P("div"),c(r.src,n="https://pay.google.com/gp/p/js/pay.js")||_(r,"src","https://pay.google.com/gp/p/js/pay.js"),_(r,"onload","window.googlePayLoadStripeCallback()"),_(i,"id","stripe-mobile-pay-button"),_(i,"class","svelte-1t95nqv"),N(i,"zephr-form-disabled-div",t[0]),N(i,"zephr-payment-form-disabled-div",t[0])},m(e,t){h(document.head,r),s&&s.m(document.head,null),h(document.head,o),y(e,a,t),y(e,i,t)},p(e,[t]){e[1]?s&&(s.d(1),s=null):s||(s=zt(),s.c(),s.m(o.parentNode,o)),1&t&&N(i,"zephr-form-disabled-div",e[0]),1&t&&N(i,"zephr-payment-form-disabled-div",e[0])},i:e,o:e,d(e){e&&(g(a),g(i)),g(r),s&&s.d(e),g(o)}}}function Dt(e,t,r){let{onMountCallback:n}=t,{isDisabled:o}=t,{disableCoreDependencyHeader:a}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(2,n=e.onMountCallback),"isDisabled"in e&&r(0,o=e.isDisabled),"disableCoreDependencyHeader"in e&&r(1,a=e.disableCoreDependencyHeader)},[o,a,n]}var Bt={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},Ut={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},Vt={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},Gt={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]};function jt(e){let t,r,n,o,a,i,s;function c(e,t){return"string"==typeof e[16][4]?Ht:qt}let l=c(e),u=l(e);return{c(){t=A("svg"),r=A("g"),n=A("g"),u.c(),_(n,"transform",e[15]),_(r,"transform",o="translate("+e[16][0]/2+" "+e[16][1]/2+")"),_(r,"transform-origin",a=e[16][0]/4+" 0"),_(t,"id",e[1]),_(t,"class",i="svelte-fa svelte-fa-base "+e[0]+" svelte-bvo74f"),_(t,"style",e[2]),_(t,"viewBox",s="0 0 "+e[16][0]+" "+e[16][1]),_(t,"aria-hidden","true"),_(t,"role","img"),_(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"pulse",e[8]),N(t,"svelte-fa-size-lg","lg"===e[3]),N(t,"svelte-fa-size-sm","sm"===e[3]),N(t,"svelte-fa-size-xs","xs"===e[3]),N(t,"svelte-fa-fw",e[5]),N(t,"svelte-fa-pull-left","left"===e[6]),N(t,"svelte-fa-pull-right","right"===e[6]),N(t,"spin",e[7])},m(o,a){y(o,t,a),h(t,r),h(r,n),u.m(n,null),e[23](t)},p(e,p){l===(l=c(e))&&u?u.p(e,p):(u.d(1),u=l(e),u&&(u.c(),u.m(n,null))),32768&p&&_(n,"transform",e[15]),65536&p&&o!==(o="translate("+e[16][0]/2+" "+e[16][1]/2+")")&&_(r,"transform",o),65536&p&&a!==(a=e[16][0]/4+" 0")&&_(r,"transform-origin",a),2&p&&_(t,"id",e[1]),1&p&&i!==(i="svelte-fa svelte-fa-base "+e[0]+" svelte-bvo74f")&&_(t,"class",i),4&p&&_(t,"style",e[2]),65536&p&&s!==(s="0 0 "+e[16][0]+" "+e[16][1])&&_(t,"viewBox",s),257&p&&N(t,"pulse",e[8]),9&p&&N(t,"svelte-fa-size-lg","lg"===e[3]),9&p&&N(t,"svelte-fa-size-sm","sm"===e[3]),9&p&&N(t,"svelte-fa-size-xs","xs"===e[3]),33&p&&N(t,"svelte-fa-fw",e[5]),65&p&&N(t,"svelte-fa-pull-left","left"===e[6]),65&p&&N(t,"svelte-fa-pull-right","right"===e[6]),129&p&&N(t,"spin",e[7])},d(r){r&&g(t),u.d(),e[23](null)}}}function qt(e){let t,r,n,o,a,i,s,c,l,u;return{c(){t=A("path"),i=A("path"),_(t,"d",r=e[16][4][0]),_(t,"fill",n=e[10]||e[4]||"currentColor"),_(t,"fill-opacity",o=0!=e[13]?e[11]:e[12]),_(t,"transform",a="translate("+e[16][0]/-2+" "+e[16][1]/-2+")"),_(i,"d",s=e[16][4][1]),_(i,"fill",c=e[9]||e[4]||"currentColor"),_(i,"fill-opacity",l=0!=e[13]?e[12]:e[11]),_(i,"transform",u="translate("+e[16][0]/-2+" "+e[16][1]/-2+")")},m(e,r){y(e,t,r),y(e,i,r)},p(e,p){65536&p&&r!==(r=e[16][4][0])&&_(t,"d",r),1040&p&&n!==(n=e[10]||e[4]||"currentColor")&&_(t,"fill",n),14336&p&&o!==(o=0!=e[13]?e[11]:e[12])&&_(t,"fill-opacity",o),65536&p&&a!==(a="translate("+e[16][0]/-2+" "+e[16][1]/-2+")")&&_(t,"transform",a),65536&p&&s!==(s=e[16][4][1])&&_(i,"d",s),528&p&&c!==(c=e[9]||e[4]||"currentColor")&&_(i,"fill",c),14336&p&&l!==(l=0!=e[13]?e[12]:e[11])&&_(i,"fill-opacity",l),65536&p&&u!==(u="translate("+e[16][0]/-2+" "+e[16][1]/-2+")")&&_(i,"transform",u)},d(e){e&&(g(t),g(i))}}}function Ht(e){let t,r,n,o;return{c(){t=A("path"),_(t,"d",r=e[16][4]),_(t,"fill",n=e[4]||e[9]||"currentColor"),_(t,"transform",o="translate("+e[16][0]/-2+" "+e[16][1]/-2+")")},m(e,r){y(e,t,r)},p(e,a){65536&a&&r!==(r=e[16][4])&&_(t,"d",r),528&a&&n!==(n=e[4]||e[9]||"currentColor")&&_(t,"fill",n),65536&a&&o!==(o="translate("+e[16][0]/-2+" "+e[16][1]/-2+")")&&_(t,"transform",o)},d(e){e&&g(t)}}}function Kt(t){let r,n=t[16][4]&&jt(t);return{c(){n&&n.c(),r=C()},m(e,t){n&&n.m(e,t),y(e,r,t)},p(e,[t]){e[16][4]?n?n.p(e,t):(n=jt(e),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d(e)}}}function Yt(e,t,r){let n,o,a,{class:i}=t,{id:s}=t,{style:c}=t,{icon:l}=t,{size:u}=t,{color:p}=t,{fw:d=!1}=t,{pull:m}=t,{scale:f=1}=t,{translateX:h=0}=t,{translateY:y=0}=t,{rotate:g}=t,{flip:b}=t,{spin:P=!1}=t,{pulse:A=!1}=t,{primaryColor:S=""}=t,{secondaryColor:E=""}=t,{primaryOpacity:C=1}=t,{secondaryOpacity:v=.4}=t,{swapOpacity:T=!1}=t;return e.$$set=e=>{"class"in e&&r(0,i=e.class),"id"in e&&r(1,s=e.id),"style"in e&&r(2,c=e.style),"icon"in e&&r(17,l=e.icon),"size"in e&&r(3,u=e.size),"color"in e&&r(4,p=e.color),"fw"in e&&r(5,d=e.fw),"pull"in e&&r(6,m=e.pull),"scale"in e&&r(18,f=e.scale),"translateX"in e&&r(19,h=e.translateX),"translateY"in e&&r(20,y=e.translateY),"rotate"in e&&r(21,g=e.rotate),"flip"in e&&r(22,b=e.flip),"spin"in e&&r(7,P=e.spin),"pulse"in e&&r(8,A=e.pulse),"primaryColor"in e&&r(9,S=e.primaryColor),"secondaryColor"in e&&r(10,E=e.secondaryColor),"primaryOpacity"in e&&r(11,C=e.primaryOpacity),"secondaryOpacity"in e&&r(12,v=e.secondaryOpacity),"swapOpacity"in e&&r(13,T=e.swapOpacity)},e.$$.update=()=>{16392&e.$$.dirty&&a&&u&&function(e,t){e.style.fontSize=t&&"lg"!==t&&"sm"!==t&&"xs"!==t?t.replace("x","em"):""}(a,u),131072&e.$$.dirty&&r(16,n=l&&l.icon||[0,0,"",[],""]),8126464&e.$$.dirty&&r(15,o=function(e,t,r,n,o,a=1,i="",s=""){let c=1,l=1;o&&("horizontal"==o?c=-1:"vertical"==o?l=-1:c=l=-1),"string"==typeof e&&(e=parseFloat(e)),"string"==typeof t&&(t=parseFloat(t)),"string"==typeof r&&(r=parseFloat(r));let u=`translate(${t*a}${i},${r*a}${i}) scale(${c*e},${l*e})`;return n&&(u+=` rotate(${n}${s})`),u}(f,h,y,g,b,512))},[i,s,c,u,p,d,m,P,A,S,E,C,v,T,a,o,n,l,f,h,y,g,b,function(e){U[e?"unshift":"push"]((()=>{a=e,r(14,a)}))}]}class Wt extends pe{constructor(e){super(),ue(this,e,Yt,Kt,i,{class:0,id:1,style:2,icon:17,size:3,color:4,fw:5,pull:6,scale:18,translateX:19,translateY:20,rotate:21,flip:22,spin:7,pulse:8,primaryColor:9,secondaryColor:10,primaryOpacity:11,secondaryOpacity:12,swapOpacity:13})}}function Jt(t){let r,n,o;return n=new Wt({props:{size:"2x",icon:Ut,spin:!0}}),{c(){r=P("div"),ie(n.$$.fragment),_(r,"class","spinner-container svelte-1isq5k3")},m(e,t){y(e,r,t),se(n,r,null),o=!0},p:e,i(e){o||(te(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&g(r),ce(n)}}}class Qt extends pe{constructor(e){super(),ue(this,e,null,Jt,i,{})}}function Zt(e){let t,r;return t=new Qt({}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Xt(e){let t,r,n;return r=new Qt({}),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","spinner-overlay svelte-1a5rslt")},m(e,o){y(e,t,o),se(r,t,null),n=!0},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function er(e){let t,r,n,o,a,i,s,c,l,u,p,d=!e[2]&&Zt(),m=e[3]&&Xt();return u=new Mt({props:{error:e[1]?.message??e[4]??"",isPaymentForm:!0}}),{c(){d&&d.c(),t=E(),r=P("div"),m&&m.c(),n=E(),o=P("div"),s=E(),c=P("div"),l=E(),ie(u.$$.fragment),_(o,"id","zuora_payment"),_(o,"class",a=f(e[0]?"zuora-disabled-iframe-container zuora-dynamic-form-disabled":"")+" svelte-1a5rslt"),_(r,"class",i=f(e[3]?"zuora-dynamic-form-disabled form-wrapper":"form-wrapper")+" svelte-1a5rslt"),_(c,"id","core-style")},m(e,a){d&&d.m(e,a),y(e,t,a),y(e,r,a),m&&m.m(r,null),h(r,n),h(r,o),y(e,s,a),y(e,c,a),y(e,l,a),se(u,e,a),p=!0},p(e,[s]){e[2]?d&&(X(),re(d,1,1,(()=>{d=null})),ee()):d?4&s&&te(d,1):(d=Zt(),d.c(),te(d,1),d.m(t.parentNode,t)),e[3]?m?8&s&&te(m,1):(m=Xt(),m.c(),te(m,1),m.m(r,n)):m&&(X(),re(m,1,1,(()=>{m=null})),ee()),(!p||1&s&&a!==(a=f(e[0]?"zuora-disabled-iframe-container zuora-dynamic-form-disabled":"")+" svelte-1a5rslt"))&&_(o,"class",a),(!p||8&s&&i!==(i=f(e[3]?"zuora-dynamic-form-disabled form-wrapper":"form-wrapper")+" svelte-1a5rslt"))&&_(r,"class",i);const c={};18&s&&(c.error=e[1]?.message??e[4]??""),u.$set(c)},i(e){p||(te(d),te(m),te(u.$$.fragment,e),p=!0)},o(e){re(d),re(m),re(u.$$.fragment,e),p=!1},d(e){e&&(g(t),g(r),g(s),g(c),g(l)),d&&d.d(e),m&&m.d(),ce(u,e)}}}function tr(e,t,r){let{onMountCallback:n}=t,{isDisabled:o}=t,{providerError:a}=t,{isLoaded:i}=t,{isBusy:s}=t,{error:c=null}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(5,n=e.onMountCallback),"isDisabled"in e&&r(0,o=e.isDisabled),"providerError"in e&&r(1,a=e.providerError),"isLoaded"in e&&r(2,i=e.isLoaded),"isBusy"in e&&r(3,s=e.isBusy),"error"in e&&r(4,c=e.error)},[o,a,i,s,c,n]}function rr(t){let r,n;return{c(){r=P("script"),r.innerHTML="",_(r,"type","text/javascript"),c(r.src,n="https://static.zuora.com/Resources/libs/hosted/1.3.1/zuora-min.js")||_(r,"src","https://static.zuora.com/Resources/libs/hosted/1.3.1/zuora-min.js"),_(r,"onload","window.zuoraLoadCallback()")},m(e,t){h(document.head,r)},p:e,i:e,o:e,d(e){g(r)}}}function nr(e,t,r){let{onMountCallback:n}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(0,n=e.onMountCallback)},[n]}class or extends pe{constructor(e){super(),ue(this,e,nr,rr,i,{onMountCallback:0})}}const ar="braintree",ir="stripe",sr="zuora-billing",cr=new Headers;cr.append("Content-Type","application/json"),cr.append("Accept","application/json");const lr=async(e,t,r,n=null,o=!1)=>{o||r.updateFormState({serverErrors:[]}),r.incrementRequestCount(n);try{return await fetch(`${r.apiUrlBase}/${e}`,{method:t.method,body:null==t.bodyObject?void 0:JSON.stringify(t.bodyObject),headers:cr,credentials:"include"})}finally{r.decrementRequestCount(n)}},ur=e=>"ONE_OFF"===e.type,pr=(e,t,r,n)=>{if(t.paymentOption.pricePointId)return{url:`blaize/payment/${r}/buy`,body:{product_id:t.paymentOption.productId,price_point_id:t.paymentOption.slug,discount_code:t.promoCodeValid?t.promoCode:void 0,...n}};let o,a,i={};if(Ot(e).changeSubscriptionMode){o=`subscriptions/${t.validChangeFromPlans.find((e=>t.paymentOption.slug===e.planSlug&&t.paymentOption.productId===e.productId)).changesFromSubscription.externalId}`,a="PATCH",i={navigated_from:`ChangeForm ${window.location.href}`}}else ur(t.paymentOption)?(o="payment/buy",a="POST"):(o="subscribe",a="POST");return{url:`zephr/${o}`,method:a,body:{product_id:t.paymentOption.productId,plan_id:t.paymentOption.slug,discount_code:t.promoCodeValid?t.promoCode:void 0,...i,vendor_fields:n??{}}}};let dr;const mr=new Promise((function(e){window.braintreeLoadCallback=e})),fr=e=>({flow:"ONE_OFF"===e.paymentOption.type?"checkout":"vault",singleUse:!0,buttonStyle:{shape:"rect",size:"medium"},commit:!1,currency:e.paymentOption.currencyCode.toLowerCase(),amount:e.paymentOptionPrices.totalPrice}),hr=(e,t)=>lr("blaize/payment/braintree/token",{method:"GET"},t,null,!0).then((e=>e.json())).then((e=>e.token));var yr;!function(e){e.GOOGLE_PAY="GOOGLE_PAY",e.APPLE_PAY="APPLE_PAY"}(yr||(yr={}));const gr=new Promise((function(e){window.googlePayLoadBraintreeCallback=e})),br=new Promise((function(e){window.applePayLoadBraintreeCallback=e})),Pr=(e,t,r)=>{const n=JSON.parse(e.organisationConfiguration?.braintreeMobilePaymentConfig??"{}");let o;return gr.then((()=>{const a=document.getElementById("google-pay-button");for(;a.firstChild;)a.removeChild(a.lastChild);if(!n?.google)return a.style.display="none",void console.error("Braintree Mobile payments are not configured in the console");t=r.getFormState(),o=new window.google.payments.api.PaymentsClient({environment:e.organisationConfiguration.braintreeSandboxEnv?"TEST":"PRODUCTION"}),mr.then((()=>hr(0,r))).then((i=>{window.braintree.client.create({authorization:i},((i,s)=>{for(;a.firstChild;)a.removeChild(a.lastChild);if(i)return console.error("Error creating braintree client",i),void(a.style.display="none");window.braintree.googlePayment.create({client:s,googlePayVersion:2,googleMerchantId:n.google.googleMerchantId},((n,i)=>{if(n)return console.error("Error creating braintree client",n),void(a.style.display="none");o.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:i.createPaymentDataRequest().allowedPaymentMethods,existingPaymentMethodRequired:!0}).then((n=>{n.result&&n.paymentMethodPresent||(a.style.display="none",console.error(n.paymentMethodPresent?"Google Pay support not found":"No payment method"),r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]})),a.appendChild(o.createButton({buttonColor:"default",buttonType:"plain",buttonSizeMode:"fill",onClick:()=>{Ar(e,t,r,i,o)}}))}))}))}))}))}))},Ar=(e,t,r,n,o)=>{r.updateFormState({mobilePaymentService:yr.GOOGLE_PAY,serverErrors:[]});const a=n.createPaymentDataRequest({transactionInfo:{currencyCode:t.paymentOption.currencyCode,totalPriceStatus:"FINAL",totalPrice:t.paymentOptionPrices.totalPrice.toFixed(2)},emailRequired:!1,shippingAddressRequired:!1});o.loadPaymentData(a).then((function(t){n.parseResponse(t,((t,n)=>{if(t||!n.nonce)return r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR],mobilePaymentService:null}),console.error("Error requesting payment data",t,n),void it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]});r.updateFormState({mobilePaymentMethodId:n.nonce}),r.completeSection()}))})).catch((function(t){console.warn("Error requesting payment data",t),r.updateFormState({mobilePaymentService:null,serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]})}))},Sr=(e,t,r)=>{const n=document.getElementById("apple_pay_button");for(;n.firstChild;)n.removeChild(n.lastChild);return br.then((()=>window.ApplePaySession&&window.ApplePaySession.supportsVersion(3)&&window.ApplePaySession.canMakePayments()?mr.then((()=>hr(0,r))).then((o=>{window.braintree.client.create({authorization:o},((o,a)=>{if(o)return n.style.display="none",void console.error("Error creating braintree client:",o);window.braintree.applePay.create({client:a},(function(o,a){for(;n.firstChild;)n.removeChild(n.lastChild);if(o)return n.style.display="none",void console.error("Error creating applePayInstance:",o);const i=a.createPaymentRequest({total:{label:t.paymentOption.label,amount:t.paymentOptionPrices.totalPrice.toFixed(2)}}),s=document.createElement("div");s.classList.add("apple-pay-button"),s.classList.add("apple-pay-button-black"),n.appendChild(s),s.addEventListener("click",(function(){Er(e,t,r,i,a)}))}))}))})):(n.style.display="none",void console.log("Cannot make payments with Apple Pay"))))},Er=(e,t,r,n,o)=>{r.updateFormState({mobilePaymentService:yr.APPLE_PAY,serverErrors:[]});const a=new ApplePaySession(3,n);a.onvalidatemerchant=function(n){o.performValidation({validationURL:n.validationURL,displayName:t.paymentOption.label},(function(t,n){if(t)return r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR],mobilePaymentService:null}),console.log("err in onvalidatemerchant in apple pay configuration: ",t),void it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]});a.completeMerchantValidation(n)}))},a.onpaymentauthorized=function(t){o.tokenize({token:t.payment.token},(function(t,n){if(t)return r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR],mobilePaymentService:null}),console.error("Error tokenizing Apple Pay:",t),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),void a.completePayment(ApplePaySession.STATUS_FAILURE);r.updateFormState({mobilePaymentMethodId:n.nonce}),r.completeSection(),a.completePayment(ApplePaySession.STATUS_SUCCESS)}))},a.begin()},Cr=["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"],vr=e=>Cr.includes(e),Tr=e=>{const t=JSON.parse(e??"{}");return{variables:{color:t?.color?.text?.main??"#32325d",fontFamily:`${t?.typography?.body?.font}, ${t?.typography?.body?.fallbackFont},  "Helvetica Neue", Helvetica, sans-serif`,fontSmooth:"always",fontSizeBase:"16px",colorWarningText:t?.color?.warning?.main??"#fa755a",colorIconCardError:t?.color?.warning?.main??"#fa755a",borderRadius:`${t?.input?.borderRadius??"4"}px`},rules:{".Input::placeholder":{color:"#aab7c4"}}}},_r={base:{color:"#32325d",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}},Or=(e,t,r)=>t.organisationConfiguration.stripeAutomaticTaxEnabled&&t.formType!==vt.LIST_SUBSCRIPTIONS||Ot(t).paymentProviderFormConfig?.usePaymentElement?((e,t,r)=>{const n=r.getFormState(),o=vr(n.paymentOption.currencyCode.toUpperCase())?1:100;return e.elements({mode:"payment",currency:n.paymentOption.currencyCode.toLowerCase(),amount:parseFloat((n.paymentOptionPrices.totalPrice*o).toFixed(2)),setup_future_usage:"off_session",appearance:Tr(t.organisationConfiguration.siteStyles),paymentMethodTypes:["card"]}).create("payment",{terms:{card:"never"},wallets:{applePay:"never",googlePay:"never"}})})(e,t,r):(e=>e.elements().create("card",{style:_r}))(e);
/*!
	 * mustache.js - Logic-less {{mustache}} templates with JavaScript
	 * http://github.com/janl/mustache.js
	 */
var wr=Object.prototype.toString,Ir=Array.isArray||function(e){return"[object Array]"===wr.call(e)};function Rr(e){return"function"==typeof e}function $r(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Mr(e,t){return null!=e&&"object"==typeof e&&t in e}var Nr=RegExp.prototype.test;var xr=/\S/;function Lr(e){return!function(e,t){return Nr.call(e,t)}(xr,e)}var Fr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};var zr=/\s*/,kr=/\s+/,Dr=/\s*=/,Br=/\s*\}/,Ur=/#|\^|\/|>|\{|&|=|!/;function Vr(e){this.string=e,this.tail=e,this.pos=0}function Gr(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function jr(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Vr.prototype.eos=function(){return""===this.tail},Vr.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},Vr.prototype.scanUntil=function(e){var t,r=this.tail.search(e);switch(r){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,r),this.tail=this.tail.substring(r)}return this.pos+=t.length,t},Gr.prototype.push=function(e){return new Gr(e,this)},Gr.prototype.lookup=function(e){var t,r,n,o=this.cache;if(o.hasOwnProperty(e))t=o[e];else{for(var a,i,s,c=this,l=!1;c;){if(e.indexOf(".")>0)for(a=c.view,i=e.split("."),s=0;null!=a&&s<i.length;)s===i.length-1&&(l=Mr(a,i[s])||(r=a,n=i[s],null!=r&&"object"!=typeof r&&r.hasOwnProperty&&r.hasOwnProperty(n))),a=a[i[s++]];else a=c.view[e],l=Mr(c.view,e);if(l){t=a;break}c=c.parent}o[e]=t}return Rr(t)&&(t=t.call(this.view)),t},jr.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},jr.prototype.parse=function(e,t){var r=this.templateCache,n=e+":"+(t||qr.tags).join(":"),o=void 0!==r,a=o?r.get(n):void 0;return null==a&&(a=function(e,t){if(!e)return[];var r,n,o,a=!1,i=[],s=[],c=[],l=!1,u=!1,p="",d=0;function m(){if(l&&!u)for(;c.length;)delete s[c.pop()];else c=[];l=!1,u=!1}function f(e){if("string"==typeof e&&(e=e.split(kr,2)),!Ir(e)||2!==e.length)throw new Error("Invalid tags: "+e);r=new RegExp($r(e[0])+"\\s*"),n=new RegExp("\\s*"+$r(e[1])),o=new RegExp("\\s*"+$r("}"+e[1]))}f(t||qr.tags);for(var h,y,g,b,P,A,S=new Vr(e);!S.eos();){if(h=S.pos,g=S.scanUntil(r))for(var E=0,C=g.length;E<C;++E)Lr(b=g.charAt(E))?(c.push(s.length),p+=b):(u=!0,a=!0,p+=" "),s.push(["text",b,h,h+1]),h+=1,"\n"===b&&(m(),p="",d=0,a=!1);if(!S.scan(r))break;if(l=!0,y=S.scan(Ur)||"name",S.scan(zr),"="===y?(g=S.scanUntil(Dr),S.scan(Dr),S.scanUntil(n)):"{"===y?(g=S.scanUntil(o),S.scan(Br),S.scanUntil(n),y="&"):g=S.scanUntil(n),!S.scan(n))throw new Error("Unclosed tag at "+S.pos);if(P=">"==y?[y,g,h,S.pos,p,d,a]:[y,g,h,S.pos],d++,s.push(P),"#"===y||"^"===y)i.push(P);else if("/"===y){if(!(A=i.pop()))throw new Error('Unopened section "'+g+'" at '+h);if(A[1]!==g)throw new Error('Unclosed section "'+A[1]+'" at '+h)}else"name"===y||"{"===y||"&"===y?u=!0:"="===y&&f(g)}if(m(),A=i.pop())throw new Error('Unclosed section "'+A[1]+'" at '+S.pos);return function(e){for(var t,r=[],n=r,o=[],a=0,i=e.length;a<i;++a)switch((t=e[a])[0]){case"#":case"^":n.push(t),o.push(t),n=t[4]=[];break;case"/":o.pop()[5]=t[2],n=o.length>0?o[o.length-1][4]:r;break;default:n.push(t)}return r}(function(e){for(var t,r,n=[],o=0,a=e.length;o<a;++o)(t=e[o])&&("text"===t[0]&&r&&"text"===r[0]?(r[1]+=t[1],r[3]=t[3]):(n.push(t),r=t));return n}(s))}(e,t),o&&r.set(n,a)),a},jr.prototype.render=function(e,t,r,n){var o=this.getConfigTags(n),a=this.parse(e,o),i=t instanceof Gr?t:new Gr(t,void 0);return this.renderTokens(a,i,r,e,n)},jr.prototype.renderTokens=function(e,t,r,n,o){for(var a,i,s,c="",l=0,u=e.length;l<u;++l)s=void 0,"#"===(i=(a=e[l])[0])?s=this.renderSection(a,t,r,n,o):"^"===i?s=this.renderInverted(a,t,r,n,o):">"===i?s=this.renderPartial(a,t,r,o):"&"===i?s=this.unescapedValue(a,t):"name"===i?s=this.escapedValue(a,t,o):"text"===i&&(s=this.rawValue(a)),void 0!==s&&(c+=s);return c},jr.prototype.renderSection=function(e,t,r,n,o){var a=this,i="",s=t.lookup(e[1]);if(s){if(Ir(s))for(var c=0,l=s.length;c<l;++c)i+=this.renderTokens(e[4],t.push(s[c]),r,n,o);else if("object"==typeof s||"string"==typeof s||"number"==typeof s)i+=this.renderTokens(e[4],t.push(s),r,n,o);else if(Rr(s)){if("string"!=typeof n)throw new Error("Cannot use higher-order sections without the original template");null!=(s=s.call(t.view,n.slice(e[3],e[5]),(function(e){return a.render(e,t,r,o)})))&&(i+=s)}else i+=this.renderTokens(e[4],t,r,n,o);return i}},jr.prototype.renderInverted=function(e,t,r,n,o){var a=t.lookup(e[1]);if(!a||Ir(a)&&0===a.length)return this.renderTokens(e[4],t,r,n,o)},jr.prototype.indentPartial=function(e,t,r){for(var n=t.replace(/[^ \t]/g,""),o=e.split("\n"),a=0;a<o.length;a++)o[a].length&&(a>0||!r)&&(o[a]=n+o[a]);return o.join("\n")},jr.prototype.renderPartial=function(e,t,r,n){if(r){var o=this.getConfigTags(n),a=Rr(r)?r(e[1]):r[e[1]];if(null!=a){var i=e[6],s=e[5],c=e[4],l=a;0==s&&c&&(l=this.indentPartial(a,c,i));var u=this.parse(l,o);return this.renderTokens(u,t,r,l,n)}}},jr.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(null!=r)return r},jr.prototype.escapedValue=function(e,t,r){var n=this.getConfigEscape(r)||qr.escape,o=t.lookup(e[1]);if(null!=o)return"number"==typeof o&&n===qr.escape?String(o):n(o)},jr.prototype.rawValue=function(e){return e[1]},jr.prototype.getConfigTags=function(e){return Ir(e)?e:e&&"object"==typeof e?e.tags:void 0},jr.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!Ir(e)?e.escape:void 0};var qr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){Hr.templateCache=e},get templateCache(){return Hr.templateCache}},Hr=new jr;qr.clearCache=function(){return Hr.clearCache()},qr.parse=function(e,t){return Hr.parse(e,t)},qr.render=function(e,t,r,n){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+((Ir(o=e)?"array":typeof o)+'" was given as the first argument for mustache#render(template, view, partials)'));var o;return Hr.render(e,t,r,n)},qr.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return Fr[e]}))},qr.Scanner=Vr,qr.Context=Gr,qr.Writer=jr;const Kr=(e,t)=>qr.render(e,t),Yr=async e=>{try{return await lr("blaize/profile",{method:"GET"},e).then((e=>e.json()))}catch(e){return console.error("Failed to fetch user attributes:",e),{}}},Wr=async e=>{try{const t=await lr("zephr/public/sessions/v1/sessions",{method:"GET"},e,null,!0);return await t.json()}catch(e){return console.error("Failed to fetch sessions:",e),[]}},Jr=()=>{const e=new URLSearchParams(window.location.search);return{source:e.get("utm_source"),medium:e.get("utm_medium"),campaign:e.get("utm_campaign"),term:e.get("utm_term"),content:e.get("utm_content")}},Qr=async(e,t)=>{try{const[r,n]=await Promise.all([Wr(t),Yr(t)]),o=r.find((e=>e.requestingSession))||null;return{page:{url:window.location.href,path:window.location.pathname,searchParameters:Object.fromEntries(new URLSearchParams(window.location.search)),utmParameters:Jr(),referrer:document.referrer||null},user:{attributes:n,session:o?{id:o.id,tenantId:o.tenantId,userId:o.userId,deviceName:o.deviceName,browser:o.browser,startDate:o.startDate,ipAddress:o.ipAddress??null,requestingSession:o.requestingSession}:null,geoLocation:{city:o?.city??"unknown",country:o?.country??"unknown",state:o?.geoState??"unknown",ipAddress:o?.ipAddress??null}},form:{id:e.id,outcomeId:e.outcomeId,ruleId:e.ruleId}}}catch(e){throw console.error("Failed to initialize subscription scope:",e),e}};let Zr,Xr,en;const tn=e=>Zr||(Zr=new Promise((function(e){window.stripeLoadCallback=e})).then((()=>(e=>lr("blaize/payment/stripe/publicKey",{method:"GET"},e,null,!0).then((e=>e.text())))(e))).then((e=>(Xr=window.Stripe(e),Xr)))),rn=(e,t,r)=>{const n=t.paymentMethodId;return r.incrementRequestCount(),n?on(e,t,r,n):Xr.createPaymentMethod("card",en,{}).then((async({error:n,paymentMethod:o})=>{if(n||!o)throw r.decrementRequestCount(),`Error requesting payment method ${JSON.stringify(n)}`;await on(e,t,r,o.id)}))},nn=(e,t,r,n)=>lr("zephr/payment/stripe/updateSubscription",{method:"POST",bodyObject:{payment_method_id:n,subscription_id:t.selectedSubscription.externalId}},r),on=async(e,t,r,n)=>{const o=Ot(e).paymentProviderFormConfig?.subscriptionMetadata||{},a={};if(o){const t=await Qr(e,r);for(const[e,r]of Object.entries(o))a[e]=Kr(r,t)||""}const i=!!Object.keys(a).length,{url:s,body:c,method:l}=pr(e,t,ir,{payment_method:n,billing_address_provided:!!t.billingAddress.country,...i?{subscription_metadata:JSON.stringify(a)}:{}});return lr(s,{method:l,bodyObject:c},r).then((async e=>{if(!e?.ok)throw JSON.stringify(e);return e.json()})).then((o=>{if(!o.grant_id){if("requires_action"===o.paymentIntentStatus)return Xr.confirmCardPayment(o.clientSecret??o.client_secret).then((s=>{if(s.error||!s.paymentIntent)throw`Error requesting payment method ${JSON.stringify(s)}`;if(ur(t.paymentOption)&&o.payment_intent_id){const{url:s,body:c,method:l}=pr(e,t,ir,{payment_method:n,billing_address_provided:!!t.billingAddress.country,payment_intent_id:o.payment_intent_id,...i?{subscription_metadata:JSON.stringify(a)}:{}});return lr(s,{method:l,bodyObject:c},r).then((e=>{if(!e?.ok)throw e}))}return lr("blaize/payment/stripe/subscription/confirmation",{method:"POST",bodyObject:{subscriptionId:o.subscriptionId}},r).then((e=>{if(!e?.ok)throw e}))}));throw JSON.stringify(o)}})).catch((e=>{throw console.error(e),e})).finally((()=>{r.decrementRequestCount()}))},an=new Promise((function(e){window.googlePayLoadStripeCallback=e})),sn=async(e,t,r,n,o,a)=>{if(o.googlePay?t.updateFormState({mobilePaymentService:yr.GOOGLE_PAY,serverErrors:[]}):o.applePay&&t.updateFormState({mobilePaymentService:yr.APPLE_PAY,serverErrors:[]}),!n)return n.complete("fail"),t.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),void it(a,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]});const i=n.paymentMethod.billing_details.address;if(a.organisationConfiguration.stripeAutomaticTaxEnabled&&(e=await oo(a,t.updateFormState({billingAddress:{country:i.country,postalCode:i.postal_code}}),t)),e=t.updateFormState({paymentMethodId:n.paymentMethod.id}),n.complete("success"),e.paymentOptionPrices.taxPrice||!e.canAttemptSectionCompletion){const t=e.elementValidity.find((e=>!e.isValid&&"payment"!=e.elementType))?.elementId,r=t?document.getElementById(`zephr-form-${t}`):document.getElementsByClassName("zephr-form-button")[0];r?.scrollIntoView({block:"center"})}else t.completeSection()},cn=1e-5,ln=(e,t)=>{try{if(3===t?.length){const r=((e,t)=>new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:Math.abs(e)%1<cn?0:void 0,maximumFractionDigits:Math.abs(e)%1<cn?0:2}).format(e))(e,t);if(!r.includes("¤"))return r}}catch(e){console.warn(`Error formatting currency for symbol ${t}`,e)}return((e,t)=>1===t?.length?`${t}${e}`:`${e} ${t}`.trim())(e,t)},un=async(e,t,r,n=!1)=>{const o=ro(e.organisationConfiguration.paymentProvider);return o.hasProductAddons&&(t.loginRegistrationComplete||t.userSession)?lr(o.productAddonPath,{method:"POST",bodyObject:{promoCode:t.promoCodeValid?t.promoCode:null,paymentOptions:Ot(e).paymentOptions}},r,null,!0).then((async n=>{if(!n.ok)return console.log("error loading product addons",n),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]}),r.updateFormState({addons:[],serverErrors:[tt.UNKNOWN]});const o=await n.json();try{const e=o.map((e=>({id:e.id,label:e.label,planPrices:e.paymentOptions.map((e=>({planSlug:e.slug,productId:e.productId,addonPrice:e.addonPrice})))})));return r.updateFormState({addons:e})}catch(e){return console.error("Error parsing product addons response",e,o),t}})).then((async t=>(n||await pn(e,t,r),t))):Promise.resolve(t)},pn=async(e,t,r)=>{if(t.currentSection.elements.some((e=>e.type===Le&&!1!==e.config?.enabled))){r.incrementRequestCount();try{await no(e.organisationConfiguration.paymentProvider).loader(e,t,r)}finally{r.decrementRequestCount()}}},dn=e=>e.addons.map((t=>{const r=t.planPrices.find((t=>t.planSlug===e.paymentOption.slug&&t.productId===e.paymentOption.productId));return r&&{label:t.label,addonPrice:r.addonPrice,addonPriceFormattedString:ln(r.addonPrice,e.paymentOption.currencyCode)}})).filter((e=>e)),mn=(e,t,r)=>{const n=dn(t),o=Ot(e).paymentOptions.find((e=>e.productId==t.paymentOption.productId&&e.slug==t.paymentOption.slug)).price,a=t.discountedPlanPrices.find((e=>e.planSlug===t.paymentOption.slug&&e.productId===t.paymentOption.productId))?.discountPrice??o,i=o-a,s=n.reduce(((e,t)=>e+t.addonPrice),a);return Promise.resolve({slug:t.paymentOption.slug,productId:t.paymentOption.productId,promoCode:t.promoCode,addonPrices:n,billingAddress:t.billingAddress,totalPrice:s,totalPriceFormattedString:ln(s,t.paymentOption.currencyCode),netPrice:o,netPriceFormattedString:ln(o,t.paymentOption.currencyCode),discountPrice:i,discountPriceFormattedPrice:ln(i,t.paymentOption.currencyCode),chargeItems:[]})},fn=(e,t)=>Ot(e).formCurrency??t.paymentOption?.currencyCode,hn=async(e,t,r,n)=>{const o=t.paymentOption&&await oo(e,t,r),[a,i]=(navigator.language??"").split("-"),s={locale:a||"en",region:Ot(e).requestCountry||i||"US",currency:fn(e,t),amount:`${o?.paymentOptionPrices?.totalPrice??"0.00"}`,profile:Ot(e).paymentProviderFormConfig?.paymentFormNumber??void 0,createPaymentSession:()=>(async(e,t)=>{if(t.getFormState().isBusy)console.warn("Form is busy - ignoring payment request");else{t.updateFormState({serverErrors:[],paymentProviderFormBusy:!0}),t.incrementRequestCount();try{const r=await lr("zephr/public/payment/v1/billing/payment-sessions",{method:"POST",bodyObject:{currency:fn(e,t.getFormState()),amount:t.getFormState().paymentOptionPrices?.totalPrice??.01}},t);if(r.ok)return(await r.json())?.token;console.error("Error occurred while creating payment session.",r),t.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR],paymentProviderFormBusy:!1}),it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]})}catch(r){console.error("Error occurred while creating payment session.",r),t.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR],paymentProviderFormBusy:!1}),it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]})}}})(e,r),onComplete:t=>((e,t,r)=>{if(!r?.success||!r.paymentMethodId)return t.decrementRequestCount(),console.warn("Non-success payment result",r),t.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR],paymentProviderFormBusy:!1}),void it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]});const n=t.getFormState();t.updateFormState({paymentFormComplete:!0,paymentProviderVendorFields:{currency:fn(e,n),detail:JSON.stringify({refId:r.paymentMethodId,email:n.emailAddress}),...n.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(n.dynamicOfferResult)}:{}}}),t.decrementRequestCount(),t.completeSection()})(e,r,t)},c=window.Zuora(n);(await c.createPaymentForm(s)).mount("#zuora_payment"),r.updateFormState({paymentProviderFormLoaded:!0})};let yn;const gn=()=>null!=yn?yn:yn=new Promise((function(e){window.zuoraLoadCallback=e})),bn=e=>Ot(e).paymentProviderFormConfig?.useDynamicForm,Pn=(e,t)=>bn(e)?(async(e,t)=>{const r=await lr("zephr/public/payment/v1/billing/publishable-key",{method:"GET"},t);return(await r.json())?.message})(0,t):lr("plugins/public/zuora-billing/payment-form-token",{method:"POST",bodyObject:{hostedPageId:Ot(e).paymentProviderFormConfig.hostedPageId,hostedPageUrl:Ot(e).paymentProviderFormConfig.hostedPageUrl}},t).then((e=>e.json())),An=(e,t)=>{const r=e.trim();try{switch(t.toUpperCase()){case"INTEGER":{const e=parseInt(r,10);if(isNaN(e))throw new Error;return e}case"NUMBER":{const e=parseFloat(r);if(isNaN(e))throw new Error;return e}case"BOOLEAN":return"true"===r.toLowerCase();default:return r.toString()}}catch(e){return console.warn(`Error casting custom field value "${r}" to type ${t}`),null}},Sn=(e,t,r)=>!Ot(t).changeSubscriptionMode||t.environment.previewMode?e:{...e,products:e.products.map((e=>({...e,paymentPlans:e.paymentPlans.filter((t=>r.validChangeFromPlans.some((r=>r.planSlug===t.planId&&r.productId===e.id))))})))};function En(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?En(Object(r),!0).forEach((function(t){vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):En(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tn(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var _n,On={countries:{AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Caribbean Netherlands",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos Islands",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czechia",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena, Ascension and Tristan da Cunha",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Türkiye",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States of America",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands (UK)",VI:"Virgin Islands (US)",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},timezones:{"Africa/Abidjan":{u:0,c:["CI","BF","GH","GM","GN","IS","ML","MR","SH","SL","SN","TG"]},"Africa/Accra":{a:"Africa/Abidjan",c:["GH"],r:1},"Africa/Addis_Ababa":{a:"Africa/Nairobi",c:["ET"],r:1},"Africa/Algiers":{u:60,c:["DZ"]},"Africa/Asmara":{a:"Africa/Nairobi",c:["ER"],r:1},"Africa/Asmera":{a:"Africa/Nairobi",c:["ER"],r:1},"Africa/Bamako":{a:"Africa/Abidjan",c:["ML"],r:1},"Africa/Bangui":{a:"Africa/Lagos",c:["CF"],r:1},"Africa/Banjul":{a:"Africa/Abidjan",c:["GM"],r:1},"Africa/Bissau":{u:0,c:["GW"]},"Africa/Blantyre":{a:"Africa/Maputo",c:["MW"],r:1},"Africa/Brazzaville":{a:"Africa/Lagos",c:["CG"],r:1},"Africa/Bujumbura":{a:"Africa/Maputo",c:["BI"],r:1},"Africa/Cairo":{u:120,d:180,c:["EG"]},"Africa/Casablanca":{u:60,d:0,c:["MA"]},"Africa/Ceuta":{u:60,d:120,c:["ES"]},"Africa/Conakry":{a:"Africa/Abidjan",c:["GN"],r:1},"Africa/Dakar":{a:"Africa/Abidjan",c:["SN"],r:1},"Africa/Dar_es_Salaam":{a:"Africa/Nairobi",c:["TZ"],r:1},"Africa/Djibouti":{a:"Africa/Nairobi",c:["DJ"],r:1},"Africa/Douala":{a:"Africa/Lagos",c:["CM"],r:1},"Africa/El_Aaiun":{u:60,d:0,c:["EH"]},"Africa/Freetown":{a:"Africa/Abidjan",c:["SL"],r:1},"Africa/Gaborone":{a:"Africa/Maputo",c:["BW"],r:1},"Africa/Harare":{a:"Africa/Maputo",c:["ZW"],r:1},"Africa/Johannesburg":{u:120,c:["ZA","LS","SZ"]},"Africa/Juba":{u:120,c:["SS"]},"Africa/Kampala":{a:"Africa/Nairobi",c:["UG"],r:1},"Africa/Khartoum":{u:120,c:["SD"]},"Africa/Kigali":{a:"Africa/Maputo",c:["RW"],r:1},"Africa/Kinshasa":{a:"Africa/Lagos",c:["CD"],r:1},"Africa/Lagos":{u:60,c:["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"]},"Africa/Libreville":{a:"Africa/Lagos",c:["GA"],r:1},"Africa/Lome":{a:"Africa/Abidjan",c:["TG"],r:1},"Africa/Luanda":{a:"Africa/Lagos",c:["AO"],r:1},"Africa/Lubumbashi":{a:"Africa/Maputo",c:["CD"],r:1},"Africa/Lusaka":{a:"Africa/Maputo",c:["ZM"],r:1},"Africa/Malabo":{a:"Africa/Lagos",c:["GQ"],r:1},"Africa/Maputo":{u:120,c:["MZ","BI","BW","CD","MW","RW","ZM","ZW"]},"Africa/Maseru":{a:"Africa/Johannesburg",c:["LS"],r:1},"Africa/Mbabane":{a:"Africa/Johannesburg",c:["SZ"],r:1},"Africa/Mogadishu":{a:"Africa/Nairobi",c:["SO"],r:1},"Africa/Monrovia":{u:0,c:["LR"]},"Africa/Nairobi":{u:180,c:["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"]},"Africa/Ndjamena":{u:60,c:["TD"]},"Africa/Niamey":{a:"Africa/Lagos",c:["NE"],r:1},"Africa/Nouakchott":{a:"Africa/Abidjan",c:["MR"],r:1},"Africa/Ouagadougou":{a:"Africa/Abidjan",c:["BF"],r:1},"Africa/Porto-Novo":{a:"Africa/Lagos",c:["BJ"],r:1},"Africa/Sao_Tome":{u:0,c:["ST"]},"Africa/Timbuktu":{a:"Africa/Abidjan",c:["ML"],r:1},"Africa/Tripoli":{u:120,c:["LY"]},"Africa/Tunis":{u:60,c:["TN"]},"Africa/Windhoek":{u:120,c:["NA"]},"America/Adak":{u:-600,d:-540,c:["US"]},"America/Anchorage":{u:-540,d:-480,c:["US"]},"America/Anguilla":{a:"America/Puerto_Rico",c:["AI"],r:1},"America/Antigua":{a:"America/Puerto_Rico",c:["AG"],r:1},"America/Araguaina":{u:-180,c:["BR"]},"America/Argentina/Buenos_Aires":{u:-180,c:["AR"]},"America/Argentina/Catamarca":{u:-180,c:["AR"]},"America/Argentina/ComodRivadavia":{a:"America/Argentina/Catamarca",r:1},"America/Argentina/Cordoba":{u:-180,c:["AR"]},"America/Argentina/Jujuy":{u:-180,c:["AR"]},"America/Argentina/La_Rioja":{u:-180,c:["AR"]},"America/Argentina/Mendoza":{u:-180,c:["AR"]},"America/Argentina/Rio_Gallegos":{u:-180,c:["AR"]},"America/Argentina/Salta":{u:-180,c:["AR"]},"America/Argentina/San_Juan":{u:-180,c:["AR"]},"America/Argentina/San_Luis":{u:-180,c:["AR"]},"America/Argentina/Tucuman":{u:-180,c:["AR"]},"America/Argentina/Ushuaia":{u:-180,c:["AR"]},"America/Aruba":{a:"America/Puerto_Rico",c:["AW"],r:1},"America/Asuncion":{u:-240,d:-180,c:["PY"]},"America/Atikokan":{a:"America/Panama",c:["CA"],r:1},"America/Atka":{a:"America/Adak",r:1},"America/Bahia":{u:-180,c:["BR"]},"America/Bahia_Banderas":{u:-360,c:["MX"]},"America/Barbados":{u:-240,c:["BB"]},"America/Belem":{u:-180,c:["BR"]},"America/Belize":{u:-360,c:["BZ"]},"America/Blanc-Sablon":{a:"America/Puerto_Rico",c:["CA"],r:1},"America/Boa_Vista":{u:-240,c:["BR"]},"America/Bogota":{u:-300,c:["CO"]},"America/Boise":{u:-420,d:-360,c:["US"]},"America/Buenos_Aires":{a:"America/Argentina/Buenos_Aires",r:1},"America/Cambridge_Bay":{u:-420,d:-360,c:["CA"]},"America/Campo_Grande":{u:-240,c:["BR"]},"America/Cancun":{u:-300,c:["MX"]},"America/Caracas":{u:-240,c:["VE"]},"America/Catamarca":{a:"America/Argentina/Catamarca",r:1},"America/Cayenne":{u:-180,c:["GF"]},"America/Cayman":{a:"America/Panama",c:["KY"],r:1},"America/Chicago":{u:-360,d:-300,c:["US"]},"America/Chihuahua":{u:-360,c:["MX"]},"America/Ciudad_Juarez":{u:-420,d:-360,c:["MX"]},"America/Coral_Harbour":{a:"America/Panama",c:["CA"],r:1},"America/Cordoba":{a:"America/Argentina/Cordoba",r:1},"America/Costa_Rica":{u:-360,c:["CR"]},"America/Creston":{a:"America/Phoenix",c:["CA"],r:1},"America/Cuiaba":{u:-240,c:["BR"]},"America/Curacao":{a:"America/Puerto_Rico",c:["CW"],r:1},"America/Danmarkshavn":{u:0,c:["GL"]},"America/Dawson":{u:-420,c:["CA"]},"America/Dawson_Creek":{u:-420,c:["CA"]},"America/Denver":{u:-420,d:-360,c:["US"]},"America/Detroit":{u:-300,d:-240,c:["US"]},"America/Dominica":{a:"America/Puerto_Rico",c:["DM"],r:1},"America/Edmonton":{u:-420,d:-360,c:["CA"]},"America/Eirunepe":{u:-300,c:["BR"]},"America/El_Salvador":{u:-360,c:["SV"]},"America/Ensenada":{a:"America/Tijuana",r:1},"America/Fort_Nelson":{u:-420,c:["CA"]},"America/Fort_Wayne":{a:"America/Indiana/Indianapolis",r:1},"America/Fortaleza":{u:-180,c:["BR"]},"America/Glace_Bay":{u:-240,d:-180,c:["CA"]},"America/Godthab":{a:"America/Nuuk",r:1},"America/Goose_Bay":{u:-240,d:-180,c:["CA"]},"America/Grand_Turk":{u:-300,d:-240,c:["TC"]},"America/Grenada":{a:"America/Puerto_Rico",c:["GD"],r:1},"America/Guadeloupe":{a:"America/Puerto_Rico",c:["GP"],r:1},"America/Guatemala":{u:-360,c:["GT"]},"America/Guayaquil":{u:-300,c:["EC"]},"America/Guyana":{u:-240,c:["GY"]},"America/Halifax":{u:-240,d:-180,c:["CA"]},"America/Havana":{u:-300,d:-240,c:["CU"]},"America/Hermosillo":{u:-420,c:["MX"]},"America/Indiana/Indianapolis":{u:-300,d:-240,c:["US"]},"America/Indiana/Knox":{u:-360,d:-300,c:["US"]},"America/Indiana/Marengo":{u:-300,d:-240,c:["US"]},"America/Indiana/Petersburg":{u:-300,d:-240,c:["US"]},"America/Indiana/Tell_City":{u:-360,d:-300,c:["US"]},"America/Indiana/Vevay":{u:-300,d:-240,c:["US"]},"America/Indiana/Vincennes":{u:-300,d:-240,c:["US"]},"America/Indiana/Winamac":{u:-300,d:-240,c:["US"]},"America/Indianapolis":{a:"America/Indiana/Indianapolis",r:1},"America/Inuvik":{u:-420,d:-360,c:["CA"]},"America/Iqaluit":{u:-300,d:-240,c:["CA"]},"America/Jamaica":{u:-300,c:["JM"]},"America/Jujuy":{a:"America/Argentina/Jujuy",r:1},"America/Juneau":{u:-540,d:-480,c:["US"]},"America/Kentucky/Louisville":{u:-300,d:-240,c:["US"]},"America/Kentucky/Monticello":{u:-300,d:-240,c:["US"]},"America/Knox_IN":{a:"America/Indiana/Knox",r:1},"America/Kralendijk":{a:"America/Puerto_Rico",c:["BQ"],r:1},"America/La_Paz":{u:-240,c:["BO"]},"America/Lima":{u:-300,c:["PE"]},"America/Los_Angeles":{u:-480,d:-420,c:["US"]},"America/Louisville":{a:"America/Kentucky/Louisville",r:1},"America/Lower_Princes":{a:"America/Puerto_Rico",c:["SX"],r:1},"America/Maceio":{u:-180,c:["BR"]},"America/Managua":{u:-360,c:["NI"]},"America/Manaus":{u:-240,c:["BR"]},"America/Marigot":{a:"America/Puerto_Rico",c:["MF"],r:1},"America/Martinique":{u:-240,c:["MQ"]},"America/Matamoros":{u:-360,d:-300,c:["MX"]},"America/Mazatlan":{u:-420,c:["MX"]},"America/Mendoza":{a:"America/Argentina/Mendoza",r:1},"America/Menominee":{u:-360,d:-300,c:["US"]},"America/Merida":{u:-360,c:["MX"]},"America/Metlakatla":{u:-540,d:-480,c:["US"]},"America/Mexico_City":{u:-360,c:["MX"]},"America/Miquelon":{u:-180,d:-120,c:["PM"]},"America/Moncton":{u:-240,d:-180,c:["CA"]},"America/Monterrey":{u:-360,c:["MX"]},"America/Montevideo":{u:-180,c:["UY"]},"America/Montreal":{a:"America/Toronto",c:["CA"],r:1},"America/Montserrat":{a:"America/Puerto_Rico",c:["MS"],r:1},"America/Nassau":{a:"America/Toronto",c:["BS"],r:1},"America/New_York":{u:-300,d:-240,c:["US"]},"America/Nipigon":{a:"America/Toronto",c:["CA"],r:1},"America/Nome":{u:-540,d:-480,c:["US"]},"America/Noronha":{u:-120,c:["BR"]},"America/North_Dakota/Beulah":{u:-360,d:-300,c:["US"]},"America/North_Dakota/Center":{u:-360,d:-300,c:["US"]},"America/North_Dakota/New_Salem":{u:-360,d:-300,c:["US"]},"America/Nuuk":{u:-120,d:-60,c:["GL"]},"America/Ojinaga":{u:-360,d:-300,c:["MX"]},"America/Panama":{u:-300,c:["PA","CA","KY"]},"America/Pangnirtung":{a:"America/Iqaluit",r:1},"America/Paramaribo":{u:-180,c:["SR"]},"America/Phoenix":{u:-420,c:["US","CA"]},"America/Port-au-Prince":{u:-300,d:-240,c:["HT"]},"America/Port_of_Spain":{a:"America/Puerto_Rico",c:["TT"],r:1},"America/Porto_Acre":{a:"America/Rio_Branco",r:1},"America/Porto_Velho":{u:-240,c:["BR"]},"America/Puerto_Rico":{u:-240,c:["PR","AG","CA","AI","AW","BL","BQ","CW","DM","GD","GP","KN","LC","MF","MS","SX","TT","VC","VG","VI"]},"America/Punta_Arenas":{u:-180,c:["CL"]},"America/Rainy_River":{a:"America/Winnipeg",r:1},"America/Rankin_Inlet":{u:-360,d:-300,c:["CA"]},"America/Recife":{u:-180,c:["BR"]},"America/Regina":{u:-360,c:["CA"]},"America/Resolute":{u:-360,d:-300,c:["CA"]},"America/Rio_Branco":{u:-300,c:["BR"]},"America/Rosario":{a:"America/Argentina/Cordoba",r:1},"America/Santa_Isabel":{a:"America/Tijuana",r:1},"America/Santarem":{u:-180,c:["BR"]},"America/Santiago":{u:-240,d:-180,c:["CL"]},"America/Santo_Domingo":{u:-240,c:["DO"]},"America/Sao_Paulo":{u:-180,c:["BR"]},"America/Scoresbysund":{u:-60,d:0,c:["GL"]},"America/Shiprock":{a:"America/Denver",r:1},"America/Sitka":{u:-540,d:-480,c:["US"]},"America/St_Barthelemy":{a:"America/Puerto_Rico",c:["BL"],r:1},"America/St_Johns":{u:-210,d:-150,c:["CA"]},"America/St_Kitts":{a:"America/Puerto_Rico",c:["KN"],r:1},"America/St_Lucia":{a:"America/Puerto_Rico",c:["LC"],r:1},"America/St_Thomas":{a:"America/Puerto_Rico",c:["VI"],r:1},"America/St_Vincent":{a:"America/Puerto_Rico",c:["VC"],r:1},"America/Swift_Current":{u:-360,c:["CA"]},"America/Tegucigalpa":{u:-360,c:["HN"]},"America/Thule":{u:-240,d:-180,c:["GL"]},"America/Thunder_Bay":{a:"America/Toronto",c:["CA"],r:1},"America/Tijuana":{u:-480,d:-420,c:["MX"]},"America/Toronto":{u:-300,d:-240,c:["CA","BS"]},"America/Tortola":{a:"America/Puerto_Rico",c:["VG"],r:1},"America/Vancouver":{u:-480,d:-420,c:["CA"]},"America/Virgin":{a:"America/Puerto_Rico",c:["VI"],r:1},"America/Whitehorse":{u:-420,c:["CA"]},"America/Winnipeg":{u:-360,d:-300,c:["CA"]},"America/Yakutat":{u:-540,d:-480,c:["US"]},"America/Yellowknife":{a:"America/Edmonton",r:1},"Antarctica/Casey":{u:660,c:["AQ"]},"Antarctica/Davis":{u:420,c:["AQ"]},"Antarctica/DumontDUrville":{a:"Pacific/Port_Moresby",c:["AQ"],r:1},"Antarctica/Macquarie":{u:600,d:660,c:["AU"]},"Antarctica/Mawson":{u:300,c:["AQ"]},"Antarctica/McMurdo":{a:"Pacific/Auckland",c:["AQ"],r:1},"Antarctica/Palmer":{u:-180,c:["AQ"]},"Antarctica/Rothera":{u:-180,c:["AQ"]},"Antarctica/South_Pole":{a:"Pacific/Auckland",c:["AQ"],r:1},"Antarctica/Syowa":{a:"Asia/Riyadh",c:["AQ"],r:1},"Antarctica/Troll":{u:0,d:120,c:["AQ"]},"Antarctica/Vostok":{a:"Asia/Urumqi",c:["AQ"],r:1},"Arctic/Longyearbyen":{a:"Europe/Berlin",c:["SJ"],r:1},"Asia/Aden":{a:"Asia/Riyadh",c:["YE"],r:1},"Asia/Almaty":{u:360,c:["KZ"]},"Asia/Amman":{u:180,c:["JO"]},"Asia/Anadyr":{u:720,c:["RU"]},"Asia/Aqtau":{u:300,c:["KZ"]},"Asia/Aqtobe":{u:300,c:["KZ"]},"Asia/Ashgabat":{u:300,c:["TM"]},"Asia/Ashkhabad":{a:"Asia/Ashgabat",r:1},"Asia/Atyrau":{u:300,c:["KZ"]},"Asia/Baghdad":{u:180,c:["IQ"]},"Asia/Bahrain":{a:"Asia/Qatar",c:["BH"],r:1},"Asia/Baku":{u:240,c:["AZ"]},"Asia/Bangkok":{u:420,c:["TH","CX","KH","LA","VN"]},"Asia/Barnaul":{u:420,c:["RU"]},"Asia/Beirut":{u:120,d:180,c:["LB"]},"Asia/Bishkek":{u:360,c:["KG"]},"Asia/Brunei":{a:"Asia/Kuching",c:["BN"],r:1},"Asia/Calcutta":{a:"Asia/Kolkata",r:1},"Asia/Chita":{u:540,c:["RU"]},"Asia/Choibalsan":{u:480,c:["MN"]},"Asia/Chongqing":{a:"Asia/Shanghai",r:1},"Asia/Chungking":{a:"Asia/Shanghai",r:1},"Asia/Colombo":{u:330,c:["LK"]},"Asia/Dacca":{a:"Asia/Dhaka",r:1},"Asia/Damascus":{u:180,c:["SY"]},"Asia/Dhaka":{u:360,c:["BD"]},"Asia/Dili":{u:540,c:["TL"]},"Asia/Dubai":{u:240,c:["AE","OM","RE","SC","TF"]},"Asia/Dushanbe":{u:300,c:["TJ"]},"Asia/Famagusta":{u:120,d:180,c:["CY"]},"Asia/Gaza":{u:120,d:180,c:["PS"]},"Asia/Harbin":{a:"Asia/Shanghai",r:1},"Asia/Hebron":{u:120,d:180,c:["PS"]},"Asia/Ho_Chi_Minh":{u:420,c:["VN"]},"Asia/Hong_Kong":{u:480,c:["HK"]},"Asia/Hovd":{u:420,c:["MN"]},"Asia/Irkutsk":{u:480,c:["RU"]},"Asia/Istanbul":{a:"Europe/Istanbul",r:1},"Asia/Jakarta":{u:420,c:["ID"]},"Asia/Jayapura":{u:540,c:["ID"]},"Asia/Jerusalem":{u:120,d:180,c:["IL"]},"Asia/Kabul":{u:270,c:["AF"]},"Asia/Kamchatka":{u:720,c:["RU"]},"Asia/Karachi":{u:300,c:["PK"]},"Asia/Kashgar":{a:"Asia/Urumqi",c:["CN"],r:1},"Asia/Kathmandu":{u:345,c:["NP"]},"Asia/Katmandu":{a:"Asia/Kathmandu",r:1},"Asia/Khandyga":{u:540,c:["RU"]},"Asia/Kolkata":{u:330,c:["IN"]},"Asia/Krasnoyarsk":{u:420,c:["RU"]},"Asia/Kuala_Lumpur":{a:"Asia/Singapore",c:["MY"],r:1},"Asia/Kuching":{u:480,c:["MY","BN"]},"Asia/Kuwait":{a:"Asia/Riyadh",c:["KW"],r:1},"Asia/Macao":{a:"Asia/Macau",r:1},"Asia/Macau":{u:480,c:["MO"]},"Asia/Magadan":{u:660,c:["RU"]},"Asia/Makassar":{u:480,c:["ID"]},"Asia/Manila":{u:480,c:["PH"]},"Asia/Muscat":{a:"Asia/Dubai",c:["OM"],r:1},"Asia/Nicosia":{u:120,d:180,c:["CY"]},"Asia/Novokuznetsk":{u:420,c:["RU"]},"Asia/Novosibirsk":{u:420,c:["RU"]},"Asia/Omsk":{u:360,c:["RU"]},"Asia/Oral":{u:300,c:["KZ"]},"Asia/Phnom_Penh":{a:"Asia/Bangkok",c:["KH"],r:1},"Asia/Pontianak":{u:420,c:["ID"]},"Asia/Pyongyang":{u:540,c:["KP"]},"Asia/Qatar":{u:180,c:["QA","BH"]},"Asia/Qostanay":{u:360,c:["KZ"]},"Asia/Qyzylorda":{u:300,c:["KZ"]},"Asia/Rangoon":{a:"Asia/Yangon",c:["MM"],r:1},"Asia/Riyadh":{u:180,c:["SA","AQ","KW","YE"]},"Asia/Saigon":{a:"Asia/Ho_Chi_Minh",r:1},"Asia/Sakhalin":{u:660,c:["RU"]},"Asia/Samarkand":{u:300,c:["UZ"]},"Asia/Seoul":{u:540,c:["KR"]},"Asia/Shanghai":{u:480,c:["CN"]},"Asia/Singapore":{u:480,c:["SG","MY"]},"Asia/Srednekolymsk":{u:660,c:["RU"]},"Asia/Taipei":{u:480,c:["TW"]},"Asia/Tashkent":{u:300,c:["UZ"]},"Asia/Tbilisi":{u:240,c:["GE"]},"Asia/Tehran":{u:210,c:["IR"]},"Asia/Tel_Aviv":{a:"Asia/Jerusalem",r:1},"Asia/Thimbu":{a:"Asia/Thimphu",r:1},"Asia/Thimphu":{u:360,c:["BT"]},"Asia/Tokyo":{u:540,c:["JP"]},"Asia/Tomsk":{u:420,c:["RU"]},"Asia/Ujung_Pandang":{a:"Asia/Makassar",r:1},"Asia/Ulaanbaatar":{u:480,c:["MN"]},"Asia/Ulan_Bator":{a:"Asia/Ulaanbaatar",r:1},"Asia/Urumqi":{u:360,c:["CN","AQ"]},"Asia/Ust-Nera":{u:600,c:["RU"]},"Asia/Vientiane":{a:"Asia/Bangkok",c:["LA"],r:1},"Asia/Vladivostok":{u:600,c:["RU"]},"Asia/Yakutsk":{u:540,c:["RU"]},"Asia/Yangon":{u:390,c:["MM","CC"]},"Asia/Yekaterinburg":{u:300,c:["RU"]},"Asia/Yerevan":{u:240,c:["AM"]},"Atlantic/Azores":{u:-60,d:0,c:["PT"]},"Atlantic/Bermuda":{u:-240,d:-180,c:["BM"]},"Atlantic/Canary":{u:0,d:60,c:["ES"]},"Atlantic/Cape_Verde":{u:-60,c:["CV"]},"Atlantic/Faeroe":{a:"Atlantic/Faroe",r:1},"Atlantic/Faroe":{u:0,d:60,c:["FO"]},"Atlantic/Jan_Mayen":{a:"Europe/Berlin",c:["SJ"],r:1},"Atlantic/Madeira":{u:0,d:60,c:["PT"]},"Atlantic/Reykjavik":{a:"Africa/Abidjan",c:["IS"],r:1},"Atlantic/South_Georgia":{u:-120,c:["GS"]},"Atlantic/St_Helena":{a:"Africa/Abidjan",c:["SH"],r:1},"Atlantic/Stanley":{u:-180,c:["FK"]},"Australia/ACT":{a:"Australia/Sydney",r:1},"Australia/Adelaide":{u:570,d:630,c:["AU"]},"Australia/Brisbane":{u:600,c:["AU"]},"Australia/Broken_Hill":{u:570,d:630,c:["AU"]},"Australia/Canberra":{a:"Australia/Sydney",r:1},"Australia/Currie":{a:"Australia/Hobart",r:1},"Australia/Darwin":{u:570,c:["AU"]},"Australia/Eucla":{u:525,c:["AU"]},"Australia/Hobart":{u:600,d:660,c:["AU"]},"Australia/LHI":{a:"Australia/Lord_Howe",r:1},"Australia/Lindeman":{u:600,c:["AU"]},"Australia/Lord_Howe":{u:630,d:660,c:["AU"]},"Australia/Melbourne":{u:600,d:660,c:["AU"]},"Australia/NSW":{a:"Australia/Sydney",r:1},"Australia/North":{a:"Australia/Darwin",r:1},"Australia/Perth":{u:480,c:["AU"]},"Australia/Queensland":{a:"Australia/Brisbane",r:1},"Australia/South":{a:"Australia/Adelaide",r:1},"Australia/Sydney":{u:600,d:660,c:["AU"]},"Australia/Tasmania":{a:"Australia/Hobart",r:1},"Australia/Victoria":{a:"Australia/Melbourne",r:1},"Australia/West":{a:"Australia/Perth",r:1},"Australia/Yancowinna":{a:"Australia/Broken_Hill",r:1},"Brazil/Acre":{a:"America/Rio_Branco",r:1},"Brazil/DeNoronha":{a:"America/Noronha",r:1},"Brazil/East":{a:"America/Sao_Paulo",r:1},"Brazil/West":{a:"America/Manaus",r:1},CET:{u:60,d:120},CST6CDT:{u:-360,d:-300},"Canada/Atlantic":{a:"America/Halifax",r:1},"Canada/Central":{a:"America/Winnipeg",r:1},"Canada/Eastern":{a:"America/Toronto",c:["CA"],r:1},"Canada/Mountain":{a:"America/Edmonton",r:1},"Canada/Newfoundland":{a:"America/St_Johns",r:1},"Canada/Pacific":{a:"America/Vancouver",r:1},"Canada/Saskatchewan":{a:"America/Regina",r:1},"Canada/Yukon":{a:"America/Whitehorse",r:1},"Chile/Continental":{a:"America/Santiago",r:1},"Chile/EasterIsland":{a:"Pacific/Easter",r:1},Cuba:{a:"America/Havana",r:1},EET:{u:120,d:180},EST:{u:-300},EST5EDT:{u:-300,d:-240},Egypt:{a:"Africa/Cairo",r:1},Eire:{a:"Europe/Dublin",r:1},"Etc/GMT":{u:0},"Etc/GMT+0":{a:"Etc/GMT",r:1},"Etc/GMT+1":{u:-60},"Etc/GMT+10":{u:-600},"Etc/GMT+11":{u:-660},"Etc/GMT+12":{u:-720},"Etc/GMT+2":{u:-120},"Etc/GMT+3":{u:-180},"Etc/GMT+4":{u:-240},"Etc/GMT+5":{u:-300},"Etc/GMT+6":{u:-360},"Etc/GMT+7":{u:-420},"Etc/GMT+8":{u:-480},"Etc/GMT+9":{u:-540},"Etc/GMT-0":{a:"Etc/GMT",r:1},"Etc/GMT-1":{u:60},"Etc/GMT-10":{u:600},"Etc/GMT-11":{u:660},"Etc/GMT-12":{u:720},"Etc/GMT-13":{u:780},"Etc/GMT-14":{u:840},"Etc/GMT-2":{u:120},"Etc/GMT-3":{u:180},"Etc/GMT-4":{u:240},"Etc/GMT-5":{u:300},"Etc/GMT-6":{u:360},"Etc/GMT-7":{u:420},"Etc/GMT-8":{u:480},"Etc/GMT-9":{u:540},"Etc/GMT0":{a:"Etc/GMT",r:1},"Etc/Greenwich":{a:"Etc/GMT",r:1},"Etc/UCT":{a:"Etc/UTC",r:1},"Etc/UTC":{u:0},"Etc/Universal":{a:"Etc/UTC",r:1},"Etc/Zulu":{a:"Etc/UTC",r:1},"Europe/Amsterdam":{a:"Europe/Brussels",c:["NL"],r:1},"Europe/Andorra":{u:60,d:120,c:["AD"]},"Europe/Astrakhan":{u:240,c:["RU"]},"Europe/Athens":{u:120,d:180,c:["GR"]},"Europe/Belfast":{a:"Europe/London",c:["GB"],r:1},"Europe/Belgrade":{u:60,d:120,c:["RS","BA","HR","ME","MK","SI"]},"Europe/Berlin":{u:60,d:120,c:["DE","DK","NO","SE","SJ"]},"Europe/Bratislava":{a:"Europe/Prague",c:["SK"],r:1},"Europe/Brussels":{u:60,d:120,c:["BE","LU","NL"]},"Europe/Bucharest":{u:120,d:180,c:["RO"]},"Europe/Budapest":{u:60,d:120,c:["HU"]},"Europe/Busingen":{a:"Europe/Zurich",c:["DE"],r:1},"Europe/Chisinau":{u:120,d:180,c:["MD"]},"Europe/Copenhagen":{a:"Europe/Berlin",c:["DK"],r:1},"Europe/Dublin":{u:60,d:0,c:["IE"]},"Europe/Gibraltar":{u:60,d:120,c:["GI"]},"Europe/Guernsey":{a:"Europe/London",c:["GG"],r:1},"Europe/Helsinki":{u:120,d:180,c:["FI","AX"]},"Europe/Isle_of_Man":{a:"Europe/London",c:["IM"],r:1},"Europe/Istanbul":{u:180,c:["TR"]},"Europe/Jersey":{a:"Europe/London",c:["JE"],r:1},"Europe/Kaliningrad":{u:120,c:["RU"]},"Europe/Kiev":{a:"Europe/Kyiv",r:1},"Europe/Kirov":{u:180,c:["RU"]},"Europe/Kyiv":{u:120,d:180,c:["UA"]},"Europe/Lisbon":{u:0,d:60,c:["PT"]},"Europe/Ljubljana":{a:"Europe/Belgrade",c:["SI"],r:1},"Europe/London":{u:0,d:60,c:["GB","GG","IM","JE"]},"Europe/Luxembourg":{a:"Europe/Brussels",c:["LU"],r:1},"Europe/Madrid":{u:60,d:120,c:["ES"]},"Europe/Malta":{u:60,d:120,c:["MT"]},"Europe/Mariehamn":{a:"Europe/Helsinki",c:["AX"],r:1},"Europe/Minsk":{u:180,c:["BY"]},"Europe/Monaco":{a:"Europe/Paris",c:["MC"],r:1},"Europe/Moscow":{u:180,c:["RU"]},"Europe/Nicosia":{a:"Asia/Nicosia",r:1},"Europe/Oslo":{a:"Europe/Berlin",c:["NO"],r:1},"Europe/Paris":{u:60,d:120,c:["FR","MC"]},"Europe/Podgorica":{a:"Europe/Belgrade",c:["ME"],r:1},"Europe/Prague":{u:60,d:120,c:["CZ","SK"]},"Europe/Riga":{u:120,d:180,c:["LV"]},"Europe/Rome":{u:60,d:120,c:["IT","SM","VA"]},"Europe/Samara":{u:240,c:["RU"]},"Europe/San_Marino":{a:"Europe/Rome",c:["SM"],r:1},"Europe/Sarajevo":{a:"Europe/Belgrade",c:["BA"],r:1},"Europe/Saratov":{u:240,c:["RU"]},"Europe/Simferopol":{u:180,c:["RU","UA"]},"Europe/Skopje":{a:"Europe/Belgrade",c:["MK"],r:1},"Europe/Sofia":{u:120,d:180,c:["BG"]},"Europe/Stockholm":{a:"Europe/Berlin",c:["SE"],r:1},"Europe/Tallinn":{u:120,d:180,c:["EE"]},"Europe/Tirane":{u:60,d:120,c:["AL"]},"Europe/Tiraspol":{a:"Europe/Chisinau",r:1},"Europe/Ulyanovsk":{u:240,c:["RU"]},"Europe/Uzhgorod":{a:"Europe/Kyiv",r:1},"Europe/Vaduz":{a:"Europe/Zurich",c:["LI"],r:1},"Europe/Vatican":{a:"Europe/Rome",c:["VA"],r:1},"Europe/Vienna":{u:60,d:120,c:["AT"]},"Europe/Vilnius":{u:120,d:180,c:["LT"]},"Europe/Volgograd":{u:180,c:["RU"]},"Europe/Warsaw":{u:60,d:120,c:["PL"]},"Europe/Zagreb":{a:"Europe/Belgrade",c:["HR"],r:1},"Europe/Zaporozhye":{a:"Europe/Kyiv",r:1},"Europe/Zurich":{u:60,d:120,c:["CH","DE","LI"]},Factory:{u:0},GB:{a:"Europe/London",c:["GB"],r:1},"GB-Eire":{a:"Europe/London",c:["GB"],r:1},GMT:{a:"Etc/GMT",r:1},"GMT+0":{a:"Etc/GMT",r:1},"GMT-0":{a:"Etc/GMT",r:1},GMT0:{a:"Etc/GMT",r:1},Greenwich:{a:"Etc/GMT",r:1},HST:{u:-600},Hongkong:{a:"Asia/Hong_Kong",r:1},Iceland:{a:"Africa/Abidjan",c:["IS"],r:1},"Indian/Antananarivo":{a:"Africa/Nairobi",c:["MG"],r:1},"Indian/Chagos":{u:360,c:["IO"]},"Indian/Christmas":{a:"Asia/Bangkok",c:["CX"],r:1},"Indian/Cocos":{a:"Asia/Yangon",c:["CC"],r:1},"Indian/Comoro":{a:"Africa/Nairobi",c:["KM"],r:1},"Indian/Kerguelen":{a:"Indian/Maldives",c:["TF"],r:1},"Indian/Mahe":{a:"Asia/Dubai",c:["SC"],r:1},"Indian/Maldives":{u:300,c:["MV","TF"]},"Indian/Mauritius":{u:240,c:["MU"]},"Indian/Mayotte":{a:"Africa/Nairobi",c:["YT"],r:1},"Indian/Reunion":{a:"Asia/Dubai",c:["RE"],r:1},Iran:{a:"Asia/Tehran",r:1},Israel:{a:"Asia/Jerusalem",r:1},Jamaica:{a:"America/Jamaica",r:1},Japan:{a:"Asia/Tokyo",r:1},Kwajalein:{a:"Pacific/Kwajalein",r:1},Libya:{a:"Africa/Tripoli",r:1},MET:{u:60,d:120},MST:{u:-420},MST7MDT:{u:-420,d:-360},"Mexico/BajaNorte":{a:"America/Tijuana",r:1},"Mexico/BajaSur":{a:"America/Mazatlan",r:1},"Mexico/General":{a:"America/Mexico_City",r:1},NZ:{a:"Pacific/Auckland",c:["NZ"],r:1},"NZ-CHAT":{a:"Pacific/Chatham",r:1},Navajo:{a:"America/Denver",r:1},PRC:{a:"Asia/Shanghai",r:1},PST8PDT:{u:-480,d:-420},"Pacific/Apia":{u:780,c:["WS"]},"Pacific/Auckland":{u:720,d:780,c:["NZ","AQ"]},"Pacific/Bougainville":{u:660,c:["PG"]},"Pacific/Chatham":{u:765,d:825,c:["NZ"]},"Pacific/Chuuk":{a:"Pacific/Port_Moresby",c:["FM"],r:1},"Pacific/Easter":{u:-360,d:-300,c:["CL"]},"Pacific/Efate":{u:660,c:["VU"]},"Pacific/Enderbury":{a:"Pacific/Kanton",r:1},"Pacific/Fakaofo":{u:780,c:["TK"]},"Pacific/Fiji":{u:720,c:["FJ"]},"Pacific/Funafuti":{a:"Pacific/Tarawa",c:["TV"],r:1},"Pacific/Galapagos":{u:-360,c:["EC"]},"Pacific/Gambier":{u:-540,c:["PF"]},"Pacific/Guadalcanal":{u:660,c:["SB","FM"]},"Pacific/Guam":{u:600,c:["GU","MP"]},"Pacific/Honolulu":{u:-600,c:["US"]},"Pacific/Johnston":{a:"Pacific/Honolulu",r:1},"Pacific/Kanton":{u:780,c:["KI"]},"Pacific/Kiritimati":{u:840,c:["KI"]},"Pacific/Kosrae":{u:660,c:["FM"]},"Pacific/Kwajalein":{u:720,c:["MH"]},"Pacific/Majuro":{a:"Pacific/Tarawa",c:["MH"],r:1},"Pacific/Marquesas":{u:-570,c:["PF"]},"Pacific/Midway":{a:"Pacific/Pago_Pago",c:["UM"],r:1},"Pacific/Nauru":{u:720,c:["NR"]},"Pacific/Niue":{u:-660,c:["NU"]},"Pacific/Norfolk":{u:660,d:720,c:["NF"]},"Pacific/Noumea":{u:660,c:["NC"]},"Pacific/Pago_Pago":{u:-660,c:["AS","UM"]},"Pacific/Palau":{u:540,c:["PW"]},"Pacific/Pitcairn":{u:-480,c:["PN"]},"Pacific/Pohnpei":{a:"Pacific/Guadalcanal",c:["FM"],r:1},"Pacific/Ponape":{a:"Pacific/Guadalcanal",c:["FM"],r:1},"Pacific/Port_Moresby":{u:600,c:["PG","AQ","FM"]},"Pacific/Rarotonga":{u:-600,c:["CK"]},"Pacific/Saipan":{a:"Pacific/Guam",c:["MP"],r:1},"Pacific/Samoa":{a:"Pacific/Pago_Pago",c:["AS"],r:1},"Pacific/Tahiti":{u:-600,c:["PF"]},"Pacific/Tarawa":{u:720,c:["KI","MH","TV","UM","WF"]},"Pacific/Tongatapu":{u:780,c:["TO"]},"Pacific/Truk":{a:"Pacific/Port_Moresby",c:["FM"],r:1},"Pacific/Wake":{a:"Pacific/Tarawa",c:["UM"],r:1},"Pacific/Wallis":{a:"Pacific/Tarawa",c:["WF"],r:1},"Pacific/Yap":{a:"Pacific/Port_Moresby",c:["FM"],r:1},Poland:{a:"Europe/Warsaw",r:1},Portugal:{a:"Europe/Lisbon",r:1},ROC:{a:"Asia/Taipei",r:1},ROK:{a:"Asia/Seoul",r:1},Singapore:{a:"Asia/Singapore",c:["SG"],r:1},Turkey:{a:"Europe/Istanbul",r:1},UCT:{a:"Etc/UTC",r:1},"US/Alaska":{a:"America/Anchorage",r:1},"US/Aleutian":{a:"America/Adak",r:1},"US/Arizona":{a:"America/Phoenix",c:["US"],r:1},"US/Central":{a:"America/Chicago",r:1},"US/East-Indiana":{a:"America/Indiana/Indianapolis",r:1},"US/Eastern":{a:"America/New_York",r:1},"US/Hawaii":{a:"Pacific/Honolulu",r:1},"US/Indiana-Starke":{a:"America/Indiana/Knox",r:1},"US/Michigan":{a:"America/Detroit",r:1},"US/Mountain":{a:"America/Denver",r:1},"US/Pacific":{a:"America/Los_Angeles",r:1},"US/Samoa":{a:"Pacific/Pago_Pago",c:["AS"],r:1},UTC:{a:"Etc/UTC",r:1},Universal:{a:"Etc/UTC",r:1},"W-SU":{a:"Europe/Moscow",r:1},WET:{u:0,d:60},Zulu:{a:"Etc/UTC",r:1}}};function wn(e,t){var r=e.countries[t];if(!r)return null;var n=function(e){_n||(_n=function(e){return Object.keys(e.timezones).reduce((function(t,r){var n=e.timezones[r],o=n.c,a=n.a,i=e.timezones[a]||{},s=o||i.c;return s?(s.forEach((function(e){t[e]||Object.assign(t,vn({},e,{current:[],all:[]})),void 0===n.r&&t[e].current.push(r),t[e].all.push(r)})),t):t}),{})}(e));return _n}(e)[t]||{};return{id:t,name:r,timezones:n.current||[],allTimezones:n.all||[]}}function In(e){var t=Math.floor(Math.abs(e)/60),r=e%60;return"".concat(e<0?"-":"+").concat(Rn(t),":").concat(Rn(r))}function Rn(e){var t=Math.abs(e);return"".concat(t<10?"0":"").concat(t)}var $n=["allTimezones"];Object.keys(On.timezones).length;var Mn={},Nn={};function xn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Mn[e]||function(e){if(!e)return;Mn[e.id]=e}(wn(On,e)),function(e,t){if(!e)return null;var r=t||{},n=r.deprecated;e.allTimezones;var o=Tn(e,$n),a=n?e.allTimezones:e.timezones;return Cn(Cn({},o),{},{timezones:a})}(Mn[e],t)}function Ln(e){return Nn[e]||function(e){if(!e)return;Nn[e.name]=e,Object.keys(e).length}(function(e,t){var r=e.timezones[t];if(!r)return null;var n=r.a,o=void 0===n?null:n,a=Cn(Cn({},o?e.timezones[o]:{}),e.timezones[t]),i=a.c||[],s=a.u,c=Number.isInteger(a.d)?a.d:s,l={name:t,countries:i,utcOffset:s,utcOffsetStr:In(s),dstOffset:c,dstOffsetStr:In(c),aliasOf:o};return r.r&&(l.deprecated=!0),l}(On,e)),Nn[e]?Cn({},Nn[e]):null}const Fn=()=>{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return((Ln(e)||{}).countries||[]).map((function(e){return xn(e,t)}))}(e)[0]?.id??""},zn=e=>"unknown"===e?.toLowerCase()?"":e,kn=(e,t,r)=>{if(e.environment.previewMode)return(e=>{const t=e?.products?e.products[0].paymentPlans[0].charges[0]:{prices:[{price:25}],chargeData:{name:"Monthly Fee"}},r=t.prices[0]?.price,n=t.chargeData?.name;return{success:!0,contractedMrr:r,totalContractedValue:null,amount:r+3,amountWithoutTax:r,taxAmount:3,invoiceTargetDate:"2024-05-20",documentDate:"2024-05-20",invoiceItems:{0:{serviceStartDate:"2024-05-20",serviceEndDate:"2024-06-19",chargeAmount:r,taxAmount:3,chargeDescription:"",chargeName:n,productName:"Product",productRatePlanChargeId:"8ad097b48f533234018f57a8982a5a45",quantity:1,unitOfMeasure:""}}}})(Ot(e).dynamicOfferPreview??{});const n={account:{city:zn(Ot(e).requestCity),country:zn(Ot(e).requestCountry)||Fn(),county:"",state:zn(Ot(e).requestState),zipCode:zn(Ot(e).requestZipCode)},currency:fn(e,t),ratePlanIds:[t.paymentOption.slug],termType:"EVERGREEN",...t.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(t.dynamicOfferResult),productId:t.paymentOption.productId}:{}};return lr("plugins/public/zuora-billing/preview-subscription",{method:"POST",bodyObject:n},r).then((e=>e.json()))},Dn=(e,t="en-UK")=>{if(!e)return"";const r=new Date(e);return Number.isNaN(r.getDate())?"Unknown":r.toLocaleDateString(t,{day:"numeric",month:"short",year:"numeric"})},Bn=/^<<<([a-z0-9\-.]+)\|(.*)>>>$/,Un=(e,t)=>{if(null==t)return"";const r=e.languagePack?.entries??{},n=rt[t];return r[n.languagePackKey]??n.fallbackMessage},Vn=(e,t,r)=>{try{return(e.languagePack?.entries??{})[t]??r}catch(e){return console.warn(`error resolving language pack key in string ${t}`,e),r}},Gn=e=>Vn(e,"pages.common.date-time-format-locale","en-US"),jn=(e,t)=>{try{return null==t?t:"object"==typeof t||Array.isArray(t)?Array.isArray(t)?t.map((t=>jn(e,t))):Object.entries(t).reduce(((t,[r,n])=>({...t,[r]:jn(e,n)})),{}):"string"==typeof t||t instanceof String?((e,t)=>{if(!t)return t;try{const r=Bn.exec(t);return r&&r[1]?(e?.entries??{})[r[1]]??r[2]:t}catch(e){return console.warn(`error resolving language pack key in string ${t}`,e),t}})(e,t):t}catch(e){return console.warn("error resolving language pack entries",e),t}},qn=(e,t)=>{try{if(t.isOneOff)return"";const r=Vn(e,"forms.billing.history.every","every"),n=t["transaction-history"]?.[0]??t["next-billing-time"],o=n?.["human-readable-amount"];if(!o)return"";const a=t.currency_code?.toUpperCase()??o.replace(/[0-9,.]/g,""),{discounts_applied:i,pre_discount_price:s,billing_frequency:c,billing_frequency_unit:l}=t??{};if(!i&&s&&c&&l)return 1===c?`${a} ${s}/${l.toLowerCase()}`:`${a} ${s} ${r} ${c} ${l.toLowerCase()}s`;const u=Number(o.replace(/[^\d.-]/g,"")),p=Number.isInteger(u)?u.toFixed(0):u;return 1===n.cycleCount?`${a}${p}/${n.cycle}`:`${a} ${p} ${r} ${n.cycleCount} ${n.cycle}s`}catch{return console.error("Failed to get subscription amount"),""}},Hn=(e,t,r)=>(e?"":"+")+`${(t/100).toFixed(2)} ${r}`+(e?" incl.":""),Kn=(e,t)=>{try{const r=t["default-tax-rates"],n=t["managed-by"].toLowerCase(),o="canceled"===t["subscription-state"].toLowerCase(),a=Dn("stripe"===n?t.ended:t.ends),i=Gn(e);let s=t["transaction-history"].reduce(((e,t)=>{const o=Dn(t.time,i),a=((e,t,r,n)=>{try{const o=new Date(e),a=(()=>{switch(t){case"day":return o.setDate(o.getDate()+r);case"week":return o.setDate(o.getDate()+7*r);case"month":return o.setMonth(o.getMonth()+r);case"year":return o.setFullYear(o.getFullYear()+r);default:return null}})();return`${Dn(e,n)} - ${Dn(a,n)}`}catch{return console.error("Failed to get subscription period"),""}})(t.time,t.cycle,t.cycleCount,i),{cents:s,currency:c,taxRate:l}=t;let u,p;if(l){const{displayName:e,taxInclusive:t,taxPercent:r}=l;({taxes:p,total:u}=((e,t,r,n)=>{try{const o=n*(e/100),a=((e+(r?0:o))/100).toFixed(2);return{taxes:`(${Hn(r,o,t)})`,total:a}}catch{return console.error("Failed to get subscription tax"),{taxes:"",total:0}}})(s,e,t,r))}else r?.length?({taxes:p,total:u}=((e,t)=>{try{const r=[];let n=e;t.forEach((t=>{const o=t.taxPercent*(e/100),a=Hn(t.taxInclusive,o,t.displayName);r.push(a),n+=t.taxInclusive?0:o}));const o=(n/100).toFixed(2);return{taxes:`(${r.join(", ")})`,total:o}}catch{return console.error("Failed to get subscription default tax"),{taxes:"",total:0}}})(s,r)):(u=(s/100).toFixed(2),p=null);return[...e,{date:o,period:a,subtotal:"stripe"===n?(t.cents/100).toFixed(2):null,currency:c,taxes:p,total:u}]}),[]);return o&&(s=[{date:a,period:"canceled"},...s]),s}catch{return console.error("Failed to get subscription billing history"),null}},Yn=(e,t,r,n)=>lr(`blaize/payment/${e.organisationConfiguration.paymentProvider}/subscriptions`,{method:"GET"},r,null,!0).then((e=>e.ok?e.json():[])).then((t=>t.filter((e=>!n||"active"===e["subscription-state"]?.toLowerCase())).map((t=>({externalId:t["external-id"],productId:t["blaize-product"].id,productLabel:t["blaize-product"].label??t["blaize-product"].id,planId:t.plan_id,planLabel:t.plan_name,currency:t.currency_code,status:"active"===t["subscription-state"]?.toLowerCase()?"active":"inactive",nextBillingTime:Dn(t["next-billing-time"]),amount:qn(e,t),transactionHistory:Kn(e,t)}))))),Wn={draft:"pending","pending activation":"pending","pending acceptance":"pending",active:"active",cancelled:"inactive",expired:"inactive",suspended:"inactive"},Jn=(e,t)=>lr("zephr/payment/stripe/create-subscription-previews",{method:"POST",bodyObject:{product_id:e.paymentOption.productId,plan_id:e.paymentOption.slug,billing_country:e.billingAddress.country,billing_post_code:e.billingAddress.postalCode,promo_code:e.promoCodeValid?e.promoCode:void 0}},t,null,!0).then((e=>e.json()));function Qn(t){let r,n;return{c(){r=P("script"),r.innerHTML="",_(r,"type","text/javascript"),c(r.src,n="https://js.zuora.com/payment/v3/zuora.js")||_(r,"src","https://js.zuora.com/payment/v3/zuora.js"),_(r,"onload","window.zuoraLoadCallback()")},m(e,t){h(document.head,r)},p:e,i:e,o:e,d(e){g(r)}}}function Zn(e,t,r){let{onMountCallback:n}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(0,n=e.onMountCallback)},[n]}class Xn extends pe{constructor(e){super(),ue(this,e,Zn,Qn,i,{onMountCallback:0})}}const eo={[ar]:{loader:(e,t,r)=>{const n=Ot(e).paymentProviderFormConfig?.enablePaypal;r.incrementRequestCount(),mr.then((()=>hr(0,r))).then((e=>{window.braintree.dropin.create({authorization:e,container:"#braintree-dropin-container",...n?{paypal:fr(t)}:{}},((e,t)=>{if(r.decrementRequestCount(),dr=t,r.updateFormState({paymentProviderFormLoaded:!0}),e)throw e;dr.isPaymentMethodRequestable()&&r.updateFormState({paymentFormComplete:!0}),dr.on("paymentMethodRequestable",(()=>{r.updateFormState({paymentFormComplete:!0})})),dr.on("noPaymentMethodRequestable",(()=>{r.updateFormState({paymentFormComplete:!1})}))}))})).catch((e=>{console.error(e),r.decrementRequestCount()}))},preLoader:null,completer:async(e,t,r)=>{let n,o;r.incrementRequestCount();const a=new Promise(((e,t)=>{n=e,o=t})),i=e=>{console.error(e),r.decrementRequestCount(),o()};return dr.requestPaymentMethod(((o,a)=>{!o&&a||i(`Error requesting payment method ${JSON.stringify(o)}`);const{url:s,body:c,method:l}=pr(e,t,ar,{payment_nonce:a.nonce,..."PayPalAccount"===a.type?{paypal:!0}:{}});return lr(s,{method:l,bodyObject:c},r).then((e=>{if(e?.ok)return r.decrementRequestCount(),void n();i(e)})).catch((e=>{i(e)}))})),a},changePaymentCompleter:async(e,t,r)=>{let n,o;const a=new Promise(((e,t)=>{n=e,o=t}));return dr.requestPaymentMethod(((e,a)=>(!e&&a||console.error(`Error requesting payment method ${JSON.stringify(e)}`),lr(`blaize/payment/braintree/subscriptions/${t.selectedSubscription?.externalId}`,{method:"PATCH",bodyObject:{payment_method_nonce:a?.nonce}},r).then((e=>{console.log(e),e?.ok?n():o(e)})).catch((e=>{o(e)}))))),a},component:class extends pe{constructor(e){super(),ue(this,e,xt,Nt,i,{onMountCallback:3,providerError:0,isDisabled:1,isLoaded:4,error:2})}},preLoaderComponent:null,promoCodeCheckPath:"blaize/payment/braintree/promo-code-check",productAddonPath:"blaize/payment/braintree/addons-check",existingSubscriptionLoader:Yn,priceCalculator:mn,hasProductAddons:!0,hasPromoCodes:()=>!0,internalSubmit:()=>!1,noPaymentForm:()=>!1,canAttemptIncompletePaymentFormSubmission:!1},[ir]:{loader:(e,t,r)=>{r.incrementRequestCount(),tn(r).then((()=>{en=Or(Xr,e,r),en.mount("#stripe-element"),en.addEventListener("change",(t=>{r.updateFormState({paymentProviderError:t.error,paymentFormComplete:t.complete,serverErrors:[]}),e.organisationConfiguration.stripeAutomaticTaxEnabled&&e.formType!==vt.LIST_SUBSCRIPTIONS&&((e,t,r)=>{e.complete&&(r.incrementRequestCount(),Xr.createPaymentMethod("card",en,{}).then((({error:e,paymentMethod:t})=>e||!t?(console.error(`Error requesting payment method ${JSON.stringify(e)}`),null):(r.updateFormState({paymentMethodId:t.id}),t?.billing_details?.address))).catch((e=>(console.error(`Error requesting payment method ${JSON.stringify(e)}`),null))).then((e=>oo(t,r.updateFormState({billingAddress:{country:e?.country,postalCode:e?.postal_code}}),r))).catch((e=>{console.error(`Error requesting payment method ${JSON.stringify(e)}`)})).finally((()=>{r.decrementRequestCount()})))})(t,e,r)})),en.addEventListener("ready",(()=>{r.updateFormState({paymentProviderFormLoaded:!0})})),r.decrementRequestCount()})).catch((e=>{console.error(e),r.decrementRequestCount()}))},preLoader:null,completer:rn,changePaymentCompleter:(e,t,r)=>{const n=t.paymentMethodId;return r.incrementRequestCount(),n?nn(e,t,r,n):Xr.createPaymentMethod("card",en,{}).then((async({error:n,paymentMethod:o})=>{if(n||!o)throw r.decrementRequestCount(),`Error requesting payment method ${JSON.stringify(n)}`;await lr("zephr/payment/stripe/setupIntentSecret",{method:"POST"},r).then((async e=>{const t=(await e.json()).clientSecret;return Xr.confirmCardSetup(t,{payment_method:{card:en}})})).then((async n=>nn(e,t,r,n.setupIntent.payment_method)))}))},component:class extends pe{constructor(e){super(),ue(this,e,Ft,Lt,i,{onMountCallback:4,providerError:0,isDisabled:1,isComplete:2,isLoaded:5,error:3})}},preLoaderComponent:null,promoCodeCheckPath:"zephr/payment/stripe/promo-code-check",existingSubscriptionLoader:Yn,priceCalculator:(e,t,r)=>e.organisationConfiguration.stripeAutomaticTaxEnabled&&null!=t.billingAddress.country?Jn(t,r).then((r=>{if(!r.total)return mn(e,t);const n=vr(t.paymentOption.currencyCode.toUpperCase())?1:.01,o=e=>ln(e*n,t.paymentOption.currencyCode);return{slug:t.paymentOption.slug,productId:t.paymentOption.productId,promoCode:t.promoCode,billingAddress:t.billingAddress,addonPrices:[],totalPrice:r.total*n,totalPriceFormattedString:o(r.total),netPrice:r.sub_total*n,netPriceFormattedString:o(r.sub_total),taxPrice:r.tax?r.tax*n:null,taxPriceFormattedString:r.tax?o(r.tax):null,discountPrice:r.discount?r.discount*n:null,discountPriceFormattedPrice:r.discount?o(r.discount):null,chargeItems:[]}})).catch((r=>(console.error(`Error calculating stripe tax preview ${JSON.stringify(r)}`),mn(e,t)))):mn(e,t),changeSubscriptionProrateCalculator:(e,t,r)=>{const n=t.validChangeFromPlans.find((e=>t.paymentOption.slug===e.planSlug&&t.paymentOption.productId===e.productId))?.changesFromSubscription;if(n)return lr(`zephr/payment/stripe/subscriptions/${n.externalId}/change-previews`,{method:"POST",bodyObject:{plan_id:t.paymentOption.slug}},r).then((e=>e.json())).then((e=>{const r=vr(t.paymentOption.currencyCode.toUpperCase())?1:.01;return{totalPrice:e.total*r,totalPriceFormattedString:ln(e.total*r,t.paymentOption.currencyCode),subTotalPrice:e.sub_total*r,subTotalPriceFormattedString:ln(e.sub_total*r,t.paymentOption.currencyCode)}}));console.error("No valid change from subscription")},hasProductAddons:!1,hasPromoCodes:()=>!0,internalSubmit:()=>!1,noPaymentForm:()=>!1,canAttemptIncompletePaymentFormSubmission:!0},[sr]:{loader:(e,t,r)=>{Ot(e).changeSubscriptionMode?r.updateFormState({paymentFormComplete:!0}):gn().then((()=>Pn(e,r))).then((n=>{if(!fn(e,t))return r.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR]}),console.error("Form currency not set"),void it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]});if(bn(e))return hn(e,t,r,n);const o={tenantId:n.tenantId,token:n.token,signature:n.signature,key:n.key,id:n.id,url:n.url,style:"inline",submitEnabled:!0},a={email:t.emailAddress};window.Z.setEventHandler("onloadCallback",(()=>{r.updateFormState({paymentProviderFormLoaded:!0})})),window.Z.render(o,a,(n=>{if("true"!==n.success)return console.error("Payment failed",n),r.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR]}),void it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]});r.updateFormState({paymentFormComplete:!0,paymentProviderVendorFields:{currency:fn(e,t),detail:JSON.stringify({creditCardCountry:n.creditCardCountry,creditCardState:n.creditCardState,refId:n.refId,email:n.email}),...t.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(t.dynamicOfferResult)}:{}}}),r.completeSection()}))}))},preLoader:gn,completer:async(e,t,r)=>{r.incrementRequestCount();try{if(!Ot(e).changeSubscriptionMode&&!t.paymentProviderVendorFields)return console.error("Flow error - no Zuora vendor fields found"),r.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]}),Promise.resolve();const n=Ot(e).paymentProviderFormConfig?.subscriptionCustomFields||[],o={};if(n?.length){const t=await Qr(e,r);for(const e of n){const r=Kr(e.value,t)||"";o[e.name]=An(r,e.type)}}const a=!!Object.keys(o).length,i={...t.paymentProviderVendorFields,...a?{subscriptionCustomFields:JSON.stringify(o)}:{}},{url:s,body:c,method:l}=pr(e,t,sr,i),u=Ot(e).changeSubscriptionMode?c:{...c,plan_id:`zuora-billing_product_rate_plan-${c.plan_id}-unused`};return await lr(s,{method:l,bodyObject:u},r).then((e=>{if(!e?.ok)return console.error("Error when subscribing",e),Promise.reject()}))}finally{r.decrementRequestCount(),r.updateFormState({paymentProviderFormBusy:!1})}},changePaymentCompleter:(e,t,r)=>{console.log(t.paymentProviderVendorFields);const n=JSON.parse(t.paymentProviderVendorFields?.detail).refId;return lr("plugins/public/zuora-billing/update-account",{method:"POST",bodyObject:{paymentMethodId:n}},r).then((e=>{if(!e?.ok)return console.error("Error when changing default payment method",e),Promise.reject()}))},component:class extends pe{constructor(e){super(),ue(this,e,tr,er,i,{onMountCallback:5,isDisabled:0,providerError:1,isLoaded:2,isBusy:3,error:4})}},preLoaderComponent:e=>e?.useDynamicForm?Xn:or,promoCodeCheckPath:"",promoCodeServiceOverride:async(e,t,r)=>(async(e,t,r)=>{if(e.environment.previewMode)return;const n=Ot(e).dynamicOffer?.id;if(!n)throw Error("Missing Dynamic Offer id");let o;try{o=document.cookie.match(/blaize_session=[0-9a-z-]+/)[0].substring(15)}catch{o=null}const a=(t?.dynamicOfferResult?.products??[]).flatMap((e=>e.paymentPlans.map((t=>({id:e.id,payment_plan:{provider:"zuora-billing",plan_id:t.planId,charges:t.charges.map((e=>({charge_definition_id:e.chargeDefinitionData.productChargeDefinitionId,currency:e.prices[0]?.currency,price:e.prices[0].price})))}}))))),i=await lr("zephr/public/decisions/v1/promo-codes",{method:"POST",bodyObject:{promo_code:t.promoCode,session:o,selected_products:a}},r,"promo-code");if(!i.ok)return it(e,"zephr_form_error",{error:tt[tt.PROMO_CODE_INVALID_ERROR]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[tt.PROMO_CODE_INVALID_ERROR],discountedPlanPrices:[]}));const s=await i.json(),c=s?.products?.find((e=>e.id===t.paymentOption.productId&&e.paymentPlans.some((e=>e.planId===t.paymentOption.slug))));if(!c)return it(e,"zephr_form_error",{error:tt[tt.PROMO_CODE_INVALID_ERROR]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[tt.PROMO_CODE_INVALID_ERROR],discountedPlanPrices:[]}));const l=r.updateFormState({promoCodeValid:!0,serverErrors:[],discountedPlanPrices:[],originalDynamicOfferResult:t.dynamicOfferResult,dynamicOfferResult:{...t.dynamicOfferResult,...s}});await oo(e,l,r)})(e,t,r),priceCalculator:(e,t,r)=>gn().then((()=>kn(e,t,r))).then((r=>({slug:t.paymentOption.slug,productId:t.paymentOption.productId,promoCode:t.promoCode,addonPrices:[],totalPrice:r.amount,totalPriceFormattedString:ln(r.amount,fn(e,t)),netPrice:r.amountWithoutTax,netPriceFormattedString:ln(r.amountWithoutTax,fn(e,t)),taxPrice:r.taxAmount||null,taxPriceFormattedString:r.taxAmount?ln(r.taxAmount,fn(e,t)):null,discountPrice:0,discountPriceFormattedPrice:ln(0,fn(e,t)),chargeItems:[...Object.values(r.invoiceItems)].filter((e=>e.chargeAmount)).map((r=>({label:r.chargeName,priceFormattedString:ln(r.chargeAmount,fn(e,t))}))),billingAddress:t.billingAddress}))),existingSubscriptionLoader:(e,t,r,n)=>lr("plugins/public/zuora-billing/subscriptions",{method:"GET"},r,null,!0).then((e=>e.json())).then((e=>[...Object.values(e.subscriptions)])).then((r=>r.filter((e=>!n||"active"===e.status?.toLowerCase())).map((r=>{const n=[...Object.values(r.ratePlans)],o=1===n.length?n:n.filter((e=>"Add"===e.lastChangeType));if(1!==o.length&&console.warn(`Subscription ${r.id} has ${o.length} active rate plans`,n),o[0]&&!Ot(e).dynamicOffer?.id&&fn(e,t)&&![...Object.values(o[0].ratePlanCharges??{})].every((r=>r?.currency===fn(e,t))))return console.log(`Subscription ${r.id} is not in the form currency`),null;const a=r.contractedMrr&&r.currency&&r.currentTermPeriodType?`${r.currency} ${r.contractedMrr}`:"";return{externalId:r.id,productId:r.SubscriptionExperienceProductID__c,productLabel:o[0]?.productName,planId:o[0]?.productRatePlanId,planLabel:null,currency:o[0]?.ratePlanCharges[0]?.currency,status:Wn[r.status?.toLowerCase()]??"inactive",amount:a}})).filter((e=>e&&null!=e.planId&&null!=e.productId)))),changeSubscriptionProrateCalculator:(e,t,r)=>{const n=t.validChangeFromPlans.find((e=>t.paymentOption.slug===e.planSlug&&t.paymentOption.productId===e.productId))?.changesFromSubscription;if(n)return lr("plugins/public/zuora-billing/subscription-change-preview",{method:"POST",bodyObject:{subscriptionId:n.externalId,newProductRatePlanId:t.paymentOption.slug,currency:fn(e,t),...t.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(t.dynamicOfferResult),productId:t.paymentOption.productId}:{}}},r).then((e=>e.json())).then((r=>({totalPrice:r.amount,totalPriceFormattedString:ln(r.amount,fn(e,t)),subTotalPrice:r.amountWithoutTax,subTotalPriceFormattedString:ln(r.amountWithoutTax,fn(e,t))})));console.error("No valid change from subscription")},hasProductAddons:!1,hasPromoCodes:e=>Ot(e).dynamicOffer&&!Ot(e).changeSubscriptionMode,internalSubmit:e=>!Ot(e).changeSubscriptionMode,noPaymentForm:e=>Ot(e).changeSubscriptionMode,canAttemptIncompletePaymentFormSubmission:!1}},to={[ar]:{loader:async(e,t,r)=>{await Pr(e,t,r),await Sr(e,t,r)},completer:(e,t,r)=>{const{url:n,body:o,method:a}=pr(e,t,ar,{payment_nonce:t.mobilePaymentMethodId,vault_payment_method:!0});return lr(n,{method:a,bodyObject:o},r).then((e=>{if(!e?.ok)throw JSON.stringify(e)}))},component:class extends pe{constructor(e){super(),ue(this,e,It,wt,i,{onMountCallback:1,isDisabled:0,disableCoreDependencyHeader:2})}},previewMode:e=>e.environment.previewMode},[ir]:{loader:async(e,t,r)=>{const n=JSON.parse(e.organisationConfiguration?.stripeMobilePaymentConfig??"{}"),o=document.getElementById("stripe-mobile-pay-button");return n?.google||n?.apple?an.then((async()=>await tn(r))).then((a=>{t=r.getFormState();const i=vr(t.paymentOption.currencyCode.toUpperCase())?1:100,s={country:n.google?.countryCode??n.apple?.countryCode,currency:t.paymentOption.currencyCode.toLowerCase(),total:{label:t.paymentOption.label,amount:parseFloat((t.paymentOptionPrices.totalPrice*i).toFixed(2))},requestPayerName:!0},c=a.paymentRequest(s),l=a.elements().create("paymentRequestButton",{paymentRequest:c});c.canMakePayment().then((n=>{if(!n||!n.googlePay&&!n.applePay)return console.warn("Cannot make mobile payments on this browser",n),void(o.style.display="none");l.mount("#stripe-mobile-pay-button"),c.on("paymentmethod",(o=>{sn(t,r,a,o,n,e)}))}))})).catch((t=>{console.error(t),r.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]})})):(o.style.display="none",void console.error("Stripe Mobile payments are not configured in the console"))},completer:rn,component:class extends pe{constructor(e){super(),ue(this,e,Dt,kt,i,{onMountCallback:2,isDisabled:0,disableCoreDependencyHeader:1})}},previewMode:e=>e.environment.previewMode}},ro=e=>{const t=eo[e];if(!t)throw`Payment provider ${e} not configured.`;return t},no=e=>{const t=to[e];if(!t)throw`Mobile payment provider ${e} not configured.`;return t},oo=async(e,t,r)=>{if(null!=t.paymentOptionPrices&&t.paymentOptionPrices.productId===t.paymentOption.productId&&t.paymentOptionPrices.slug===t.paymentOption.slug&&t.paymentOptionPrices.promoCode===t.promoCode&&t.paymentOptionPrices.addonPrices==dn(t)&&t.paymentOptionPrices.billingAddress.country===t.billingAddress.country&&t.paymentOptionPrices.billingAddress.postalCode===t.billingAddress.postalCode&&0==t.paymentOptionPrices.addonPrices.length&&0==dn(t).length)return t;r.updateFormState({paymentOptionPrices:null});const n=await ro(e.organisationConfiguration.paymentProvider).priceCalculator(e,t,r);return r.updateFormState({paymentOptionPrices:n})};function ao(t){let r,n,o,i;return{c(){r=P("button"),n=S(t[1]),_(r,"class","zephr-form-button svelte-1eqnyqe"),_(r,"type","submit"),r.disabled=t[0],N(r,"zephr-payment-form-button",t[5]),N(r,"zephr-form-button-top-margin",!t[2]),N(r,"zephr-payment-form-button-top-margin",t[5]&&!t[2]),N(r,"inputHeight",t[3]),N(r,"aside",t[4])},m(e,s){y(e,r,s),h(r,n),o||(i=v(r,"click",T((function(){a(t[6])&&t[6].apply(this,arguments)}))),o=!0)},p(e,[o]){t=e,2&o&&I(n,t[1]),1&o&&(r.disabled=t[0]),32&o&&N(r,"zephr-payment-form-button",t[5]),4&o&&N(r,"zephr-form-button-top-margin",!t[2]),36&o&&N(r,"zephr-payment-form-button-top-margin",t[5]&&!t[2]),8&o&&N(r,"inputHeight",t[3]),16&o&&N(r,"aside",t[4])},i:e,o:e,d(e){e&&g(r),o=!1,i()}}}function io(e,t,r){let{disabled:n}=t,{text:o}=t,{noMargin:a=!1}=t,{inputHeight:i=!1}=t,{aside:s=!1}=t,{isPaymentForm:c=!1}=t,{onClick:l}=t;return e.$$set=e=>{"disabled"in e&&r(0,n=e.disabled),"text"in e&&r(1,o=e.text),"noMargin"in e&&r(2,a=e.noMargin),"inputHeight"in e&&r(3,i=e.inputHeight),"aside"in e&&r(4,s=e.aside),"isPaymentForm"in e&&r(5,c=e.isPaymentForm),"onClick"in e&&r(6,l=e.onClick)},[n,o,a,i,s,c,l]}class so extends pe{constructor(e){super(),ue(this,e,io,ao,i,{disabled:0,text:1,noMargin:2,inputHeight:3,aside:4,isPaymentForm:5,onClick:6})}}function co(e){let t,r,n=e[1].highlightedText+"";return{c(){t=P("div"),r=S(n),_(t,"class","box-top-text svelte-wecxzz")},m(e,n){y(e,t,n),h(t,r)},p(e,t){2&t&&n!==(n=e[1].highlightedText+"")&&I(r,n)},d(e){e&&g(t)}}}function lo(e){let t,r,n=e[1].disclaimerMessage+"";return{c(){t=P("span"),r=S(n),_(t,"class","button-sub-text svelte-wecxzz")},m(e,n){y(e,t,n),h(t,r)},p(e,t){2&t&&n!==(n=e[1].disclaimerMessage+"")&&I(r,n)},d(e){e&&g(t)}}}function uo(e){let t,r,n,o,i,s,c,l,u,p,d,m,f,b,A,S,C,O,w,I=(e[1].description??"")+"",R=e[1].highlightedText&&co(e);f=new so({props:{disabled:!1,text:e[1].selectButtonText??"Select Plan",onClick:e[0],isPaymentForm:!0}});let M=e[1].disclaimerMessage&&lo(e);return{c(){t=P("div"),r=P("input"),i=E(),s=P("div"),c=P("div"),R&&R.c(),l=E(),u=P("div"),p=P("div"),d=E(),m=P("div"),ie(f.$$.fragment),b=E(),M&&M.c(),_(r,"type","radio"),_(r,"name","boxSelect"),_(r,"id",n="boxSelect-"+e[1].slug+"-"+e[1].productId+"}"),r.value=o=e[1].price,_(r,"class","svelte-wecxzz"),_(c,"class","box-top svelte-wecxzz"),_(p,"class","box-content svelte-wecxzz"),N(p,"styled-box-content",e[2]),_(m,"class","box-bottom svelte-wecxzz"),_(u,"class",A="inner-box "+(e[1].highlightedText||"")+" svelte-wecxzz"),_(s,"class",S="box-container "+(e[1].highlightedText?"highlighted":"")+" svelte-wecxzz"),_(s,"aria-hidden","true"),$(s,"cursor","pointer"),_(t,"class","payment-option-wrapper svelte-wecxzz")},m(n,o){y(n,t,o),h(t,r),h(t,i),h(t,s),h(s,c),R&&R.m(c,null),h(s,l),h(s,u),h(u,p),p.innerHTML=I,h(u,d),h(u,m),se(f,m,null),h(m,b),M&&M.m(m,null),C=!0,O||(w=v(s,"click",T((function(){a(e[0])&&e[0].apply(this,arguments)}))),O=!0)},p(t,[a]){e=t,(!C||2&a&&n!==(n="boxSelect-"+e[1].slug+"-"+e[1].productId+"}"))&&_(r,"id",n),(!C||2&a&&o!==(o=e[1].price))&&(r.value=o),e[1].highlightedText?R?R.p(e,a):(R=co(e),R.c(),R.m(c,null)):R&&(R.d(1),R=null),(!C||2&a)&&I!==(I=(e[1].description??"")+"")&&(p.innerHTML=I),(!C||4&a)&&N(p,"styled-box-content",e[2]);const i={};2&a&&(i.text=e[1].selectButtonText??"Select Plan"),1&a&&(i.onClick=e[0]),f.$set(i),e[1].disclaimerMessage?M?M.p(e,a):(M=lo(e),M.c(),M.m(m,null)):M&&(M.d(1),M=null),(!C||2&a&&A!==(A="inner-box "+(e[1].highlightedText||"")+" svelte-wecxzz"))&&_(u,"class",A),(!C||2&a&&S!==(S="box-container "+(e[1].highlightedText?"highlighted":"")+" svelte-wecxzz"))&&_(s,"class",S)},i(e){C||(te(f.$$.fragment,e),C=!0)},o(e){re(f.$$.fragment,e),C=!1},d(e){e&&g(t),R&&R.d(),ce(f),M&&M.d(),O=!1,w()}}}function po(e,t,r){let{onSelect:n}=t,{paymentOption:o}=t,{styleDescription:a}=t;return e.$$set=e=>{"onSelect"in e&&r(0,n=e.onSelect),"paymentOption"in e&&r(1,o=e.paymentOption),"styleDescription"in e&&r(2,a=e.styleDescription)},[n,o,a]}class mo extends pe{constructor(e){super(),ue(this,e,po,uo,i,{onSelect:0,paymentOption:1,styleDescription:2})}}function fo(e,t,r){const n=e.slice();return n[6]=t[r],n}function ho(e){let t,r;function n(){return e[5](e[6])}return t=new mo({props:{paymentOption:e[6],styleDescription:e[0].styleDescription,onSelect:n}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(r,o){e=r;const a={};4&o&&(a.paymentOption=e[6]),1&o&&(a.styleDescription=e[0].styleDescription),6&o&&(a.onSelect=n),t.$set(a)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function yo(e){let t,r,n=ne(e[2]),o=[];for(let t=0;t<n.length;t+=1)o[t]=ho(fo(e,n,t));const a=e=>re(o[e],1,1,(()=>{o[e]=null}));return{c(){t=P("div");for(let e=0;e<o.length;e+=1)o[e].c();_(t,"class","payment-options-container svelte-15oxdku")},m(e,n){y(e,t,n);for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,null);r=!0},p(e,[r]){if(7&r){let i;for(n=ne(e[2]),i=0;i<n.length;i+=1){const a=fo(e,n,i);o[i]?(o[i].p(a,r),te(o[i],1)):(o[i]=ho(a),o[i].c(),te(o[i],1),o[i].m(t,null))}for(X(),i=n.length;i<o.length;i+=1)a(i);ee()}},i(e){if(!r){for(let e=0;e<n.length;e+=1)te(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)re(o[e]);r=!1},d(e){e&&g(t),b(o,e)}}}function go(e,t,r){let n,{paymentOptions:o}=t,{config:a}=t,{onSelect:i}=t,{logView:s}=t;s();return e.$$set=e=>{"paymentOptions"in e&&r(3,o=e.paymentOptions),"config"in e&&r(0,a=e.config),"onSelect"in e&&r(1,i=e.onSelect),"logView"in e&&r(4,s=e.logView)},e.$$.update=()=>{8&e.$$.dirty&&r(2,n=o.sort(((e,t)=>e.fieldOrder-t.fieldOrder)))},[a,i,n,o,s,e=>i(e)]}class bo extends pe{constructor(e){super(),ue(this,e,go,yo,i,{paymentOptions:3,config:0,onSelect:1,logView:4})}}const Po=(e,t)=>Ot(e).changeSubscriptionMode?Ot(e).paymentOptions.filter((e=>t.validChangeFromPlans.some((t=>t.productId===e.productId&&t.planSlug===e.slug)))):Ot(e).paymentOptions,Ao={matches:e=>e.type===be,create:(e,t,r,n)=>({component:bo,props:{paymentOptions:Po(e,t),config:n||{},onSelect:async n=>{r.updateFormState({paymentOption:n,serverErrors:[],billingAddress:{country:null,postalCode:null}}),e.organisationConfiguration.trackFormDataLayerEvents&&await oo(e,t,r);const o=r.getFormState().paymentOptionPrices?.totalPrice;it(e,"zephr_form_payment_option_selected",{productId:n.productId,planId:n.slug,price:o}),it(e,"select_item",{ecommerce:{items:[{item_id:n.slug,item_name:n.productId,price:o,quantity:1}]}}),it(e,"add_to_cart",{ecommerce:{currency:Ot(e).formCurrency??n?.currencyCode,value:o,items:[{item_id:n.slug,item_name:n.productId,price:o,quantity:1}]}}),it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.completeSection()},logView:()=>{Po(e,t).forEach((t=>it(e,"view_item",{ecommerce:{currency:Ot(e).formCurrency??t?.currencyCode,value:t.price,items:[{item_id:t.slug,item_name:t.productId,price:t.price,quantity:1}]}})))}}})};function So(e){let t,r,n,o,i;return{c(){t=P("button"),r=P("span"),n=S(e[16]),_(r,"class","zephr-form-input-inner-text"),N(r,"zephr-payment-form-input-inner-text",e[7]),_(t,"type","button"),_(t,"class","zephr-form-input-inner-button")},m(s,c){y(s,t,c),h(t,r),h(r,n),e[28](t),o||(i=v(t,"click",T((function(){a(e[17])&&e[17].apply(this,arguments)}))),o=!0)},p(t,o){e=t,65536&o&&I(n,e[16]),128&o&&N(r,"zephr-payment-form-input-inner-text",e[7])},d(r){r&&g(t),e[28](null),o=!1,i()}}}function Eo(e){let t,r;return t=new Mt({props:{error:e[6],isPaymentForm:e[7]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};64&r&&(n.error=e[6]),128&r&&(n.isPaymentForm=e[7]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Co(e){let t,r,n,i,s,c,u,b,A,S,T,O,w,I,R,$,M,x,L=e[16]&&So(e);const F=e[26].default,z=l(F,e,e[25],null);let k=e[6]&&Eo(e);return{c(){t=P("div"),r=P("input"),O=E(),L&&L.c(),w=E(),z&&z.c(),I=E(),k&&k.c(),R=C(),_(r,"id",e[0]),_(r,"name",e[1]),r.required=e[3],r.disabled=e[4],_(r,"type",e[2]),r.value=n=e[8]||null,_(r,"autocomplete",i=e[19]||null),r.checked=s=e[10]||null,_(r,"placeholder",c=e[9]||null),_(r,"pattern",u=e[11]||null),_(r,"min",b=e[12]||null),_(r,"max",A=e[13]||null),_(r,"maxlength",e[15]),_(r,"step",S=e[14]||null),_(r,"class",T=f(`zephr-form-input ${e[2]&&`zephr-form-input-${e[2]}`} ${e[7]&&e[2]&&`zephr-payment-form-input-${e[2]}`}`)+" svelte-127vcsp"),N(r,"disabled",e[4]),N(r,"error",e[5]||e[6]),N(r,"zephr-form-input-full-width",e[18]),N(r,"zephr-payment-form-input",e[7]),N(r,"zephr-payment-form-input-full-width",e[7]&&e[18]),_(t,"class","zephr-form-input-inner-container svelte-127vcsp"),N(t,"zephr-payment-form-input-inner-container",e[7])},m(n,o){y(n,t,o),h(t,r),e[27](r),h(t,O),L&&L.m(t,null),y(n,w,o),z&&z.m(n,o),y(n,I,o),k&&k.m(n,o),y(n,R,o),$=!0,M||(x=[v(r,"focus",(function(){a(e[20])&&e[20].apply(this,arguments)})),v(r,"blur",(function(){a(e[21])&&e[21].apply(this,arguments)})),v(r,"input",e[24]),v(r,"paste",e[24])],M=!0)},p(o,[a]){e=o,(!$||1&a)&&_(r,"id",e[0]),(!$||2&a)&&_(r,"name",e[1]),(!$||8&a)&&(r.required=e[3]),(!$||16&a)&&(r.disabled=e[4]),(!$||4&a)&&_(r,"type",e[2]),(!$||256&a&&n!==(n=e[8]||null)&&r.value!==n)&&(r.value=n),(!$||524288&a&&i!==(i=e[19]||null))&&_(r,"autocomplete",i),(!$||1024&a&&s!==(s=e[10]||null))&&(r.checked=s),(!$||512&a&&c!==(c=e[9]||null))&&_(r,"placeholder",c),(!$||2048&a&&u!==(u=e[11]||null))&&_(r,"pattern",u),(!$||4096&a&&b!==(b=e[12]||null))&&_(r,"min",b),(!$||8192&a&&A!==(A=e[13]||null))&&_(r,"max",A),(!$||32768&a)&&_(r,"maxlength",e[15]),(!$||16384&a&&S!==(S=e[14]||null))&&_(r,"step",S),(!$||132&a&&T!==(T=f(`zephr-form-input ${e[2]&&`zephr-form-input-${e[2]}`} ${e[7]&&e[2]&&`zephr-payment-form-input-${e[2]}`}`)+" svelte-127vcsp"))&&_(r,"class",T),(!$||148&a)&&N(r,"disabled",e[4]),(!$||228&a)&&N(r,"error",e[5]||e[6]),(!$||262276&a)&&N(r,"zephr-form-input-full-width",e[18]),(!$||132&a)&&N(r,"zephr-payment-form-input",e[7]),(!$||262276&a)&&N(r,"zephr-payment-form-input-full-width",e[7]&&e[18]),e[16]?L?L.p(e,a):(L=So(e),L.c(),L.m(t,null)):L&&(L.d(1),L=null),(!$||128&a)&&N(t,"zephr-payment-form-input-inner-container",e[7]),z&&z.p&&(!$||33554432&a)&&d(z,F,e,e[25],$?p(F,e[25],a,null):m(e[25]),null),e[6]?k?(k.p(e,a),64&a&&te(k,1)):(k=Eo(e),k.c(),te(k,1),k.m(R.parentNode,R)):k&&(X(),re(k,1,1,(()=>{k=null})),ee())},i(e){$||(te(z,e),te(k),$=!0)},o(e){re(z,e),re(k),$=!1},d(r){r&&(g(t),g(w),g(I),g(R)),e[27](null),L&&L.d(),z&&z.d(r),k&&k.d(r),M=!1,o(x)}}}function vo(e,t,r){let{$$slots:n={},$$scope:o}=t;const a=D();let i,s,{id:c}=t,{name:l=c}=t,{type:u="text"}=t,{required:p=!0}=t,{disabled:d=!1}=t,{hasError:m=!1}=t,{errorMessage:f=null}=t,{isPaymentForm:h=!1}=t,{value:y=""}=t,{placeholder:g=""}=t,{checked:b=!1}=t,{pattern:P=""}=t,{min:A=0}=t,{max:S=0}=t,{step:E=0}=t,{maxlength:C=null}=t,{innerText:v=null}=t,{innerTextOnClick:T=null}=t,{fill:_=!1}=t,{autocomplete:O=""}=t,{onFocus:w}=t,{onBlur:I}=t;var R;return R=()=>{v&&s&&i&&r(22,i.style.paddingRight=`${s.offsetWidth+8}px`,i)},z().$$.after_update.push(R),e.$$set=e=>{"id"in e&&r(0,c=e.id),"name"in e&&r(1,l=e.name),"type"in e&&r(2,u=e.type),"required"in e&&r(3,p=e.required),"disabled"in e&&r(4,d=e.disabled),"hasError"in e&&r(5,m=e.hasError),"errorMessage"in e&&r(6,f=e.errorMessage),"isPaymentForm"in e&&r(7,h=e.isPaymentForm),"value"in e&&r(8,y=e.value),"placeholder"in e&&r(9,g=e.placeholder),"checked"in e&&r(10,b=e.checked),"pattern"in e&&r(11,P=e.pattern),"min"in e&&r(12,A=e.min),"max"in e&&r(13,S=e.max),"step"in e&&r(14,E=e.step),"maxlength"in e&&r(15,C=e.maxlength),"innerText"in e&&r(16,v=e.innerText),"innerTextOnClick"in e&&r(17,T=e.innerTextOnClick),"fill"in e&&r(18,_=e.fill),"autocomplete"in e&&r(19,O=e.autocomplete),"onFocus"in e&&r(20,w=e.onFocus),"onBlur"in e&&r(21,I=e.onBlur),"$$scope"in e&&r(25,o=e.$$scope)},[c,l,u,p,d,m,f,h,y,g,b,P,A,S,E,C,v,T,_,O,w,I,i,s,e=>{a("change","checkbox"!==u?e.target.value:e.target.checked)},o,n,function(e){U[e?"unshift":"push"]((()=>{i=e,r(22,i)}))},function(e){U[e?"unshift":"push"]((()=>{s=e,r(23,s)}))}]}class To extends pe{constructor(e){super(),ue(this,e,vo,Co,i,{id:0,name:1,type:2,required:3,disabled:4,hasError:5,errorMessage:6,isPaymentForm:7,value:8,placeholder:9,checked:10,pattern:11,min:12,max:13,step:14,maxlength:15,innerText:16,innerTextOnClick:17,fill:18,autocomplete:19,onFocus:20,onBlur:21})}}function _o(e){let t,r;return{c(){t=P("span"),r=S(e[1]),_(t,"class","svelte-vnzoa4")},m(e,n){y(e,t,n),h(t,r)},p(e,t){2&t&&I(r,e[1])},d(e){e&&g(t)}}}function Oo(e){let t,r,n,o,a,i,s=e[1]&&_o(e);const c=e[6].default,u=l(c,e,e[5],null);return{c(){t=P("label"),r=P("span"),n=S(e[2]),o=E(),s&&s.c(),a=E(),u&&u.c(),_(r,"class","svelte-vnzoa4"),_(t,"class","zephr-form-input-label svelte-vnzoa4"),_(t,"for",e[0]),_(t,"style",e[3]),N(t,"zephr-payment-form-input-label",e[4])},m(e,c){y(e,t,c),h(t,r),h(r,n),h(t,o),s&&s.m(t,null),h(t,a),u&&u.m(t,null),i=!0},p(e,[r]){(!i||4&r)&&I(n,e[2]),e[1]?s?s.p(e,r):(s=_o(e),s.c(),s.m(t,a)):s&&(s.d(1),s=null),u&&u.p&&(!i||32&r)&&d(u,c,e,e[5],i?p(c,e[5],r,null):m(e[5]),null),(!i||1&r)&&_(t,"for",e[0]),(!i||8&r)&&_(t,"style",e[3]),(!i||16&r)&&N(t,"zephr-payment-form-input-label",e[4])},i(e){i||(te(u,e),i=!0)},o(e){re(u,e),i=!1},d(e){e&&g(t),s&&s.d(),u&&u.d(e)}}}function wo(e,t,r){let{$$slots:n={},$$scope:o}=t,{forInput:a}=t,{sublabel:i=""}=t,{label:s=""}=t,{style:c=""}=t,{isPaymentForm:l=!1}=t;return e.$$set=e=>{"forInput"in e&&r(0,a=e.forInput),"sublabel"in e&&r(1,i=e.sublabel),"label"in e&&r(2,s=e.label),"style"in e&&r(3,c=e.style),"isPaymentForm"in e&&r(4,l=e.isPaymentForm),"$$scope"in e&&r(5,o=e.$$scope)},[a,i,s,c,l,o,n]}class Io extends pe{constructor(e){super(),ue(this,e,wo,Oo,i,{forInput:0,sublabel:1,label:2,style:3,isPaymentForm:4})}}function Ro(e){let t,r,n,o,a;return t=new Io({props:{forInput:e[13],label:e[1],isPaymentForm:e[8]}}),o=new To({props:{disabled:e[0],required:!0,id:e[13],type:e[14],value:e[11],placeholder:e[2],errorMessage:e[5],autocomplete:e[7],isPaymentForm:e[8],innerTextOnClick:e[16],innerText:e[12]?e[4]:e[3],onFocus:e[9],onBlur:e[10]}}),o.$on("change",e[17]),{c(){ie(t.$$.fragment),r=E(),n=P("div"),ie(o.$$.fragment),_(n,"class","zephr-form-relative-container"),N(n,"zephr-payment-form-relative-container",e[8])},m(e,i){se(t,e,i),y(e,r,i),y(e,n,i),se(o,n,null),a=!0},p(e,[r]){const i={};8192&r&&(i.forInput=e[13]),2&r&&(i.label=e[1]),256&r&&(i.isPaymentForm=e[8]),t.$set(i);const s={};1&r&&(s.disabled=e[0]),8192&r&&(s.id=e[13]),16384&r&&(s.type=e[14]),2048&r&&(s.value=e[11]),4&r&&(s.placeholder=e[2]),32&r&&(s.errorMessage=e[5]),128&r&&(s.autocomplete=e[7]),256&r&&(s.isPaymentForm=e[8]),4096&r&&(s.innerTextOnClick=e[16]),4120&r&&(s.innerText=e[12]?e[4]:e[3]),512&r&&(s.onFocus=e[9]),1024&r&&(s.onBlur=e[10]),o.$set(s),(!a||256&r)&&N(n,"zephr-payment-form-relative-container",e[8])},i(e){a||(te(t.$$.fragment,e),te(o.$$.fragment,e),a=!0)},o(e){re(t.$$.fragment,e),re(o.$$.fragment,e),a=!1},d(e){e&&(g(r),g(n)),ce(t,e),ce(o)}}}function $o(e,t,r){let n,o,{disabled:a}=t,{label:i}=t,{placeholder:s}=t,{isMainPassword:c}=t,{showLabel:l}=t,{hideLabel:u}=t,{error:p=null}=t,{onChange:d}=t,{autocomplete:m}=t,{isPaymentForm:f=!1}=t,{onFocus:h}=t,{onBlur:y}=t,{password:g}=t,b=!1;return e.$$set=e=>{"disabled"in e&&r(0,a=e.disabled),"label"in e&&r(1,i=e.label),"placeholder"in e&&r(2,s=e.placeholder),"isMainPassword"in e&&r(15,c=e.isMainPassword),"showLabel"in e&&r(3,l=e.showLabel),"hideLabel"in e&&r(4,u=e.hideLabel),"error"in e&&r(5,p=e.error),"onChange"in e&&r(6,d=e.onChange),"autocomplete"in e&&r(7,m=e.autocomplete),"isPaymentForm"in e&&r(8,f=e.isPaymentForm),"onFocus"in e&&r(9,h=e.onFocus),"onBlur"in e&&r(10,y=e.onBlur),"password"in e&&r(11,g=e.password)},e.$$.update=()=>{4096&e.$$.dirty&&r(14,n=b?"text":"password"),32768&e.$$.dirty&&r(13,o="zephr-form-"+(c?"password":"confirm-password"))},[a,i,s,l,u,p,d,m,f,h,y,g,b,o,n,c,()=>r(12,b=!b),({detail:e})=>d(e)]}class Mo extends pe{constructor(e){super(),ue(this,e,$o,Ro,i,{disabled:0,label:1,placeholder:2,isMainPassword:15,showLabel:3,hideLabel:4,error:5,onChange:6,autocomplete:7,isPaymentForm:8,onFocus:9,onBlur:10,password:11})}}function No(e){let t,r,n,o,a,i,s,c;return a=new Wt({props:{icon:Bt,color:e[0]&&e[0]===e[1]?xo:Lo}}),{c(){t=P("div"),r=P("ul"),n=P("li"),o=P("div"),ie(a.$$.fragment),i=E(),s=S(e[2]),_(o,"class","zephr-form-password-requirement-icon svelte-11tz5c7"),N(o,"zephr-payment-form-password-requirement-icon",e[3]),_(n,"class","zephr-form-password-requirement svelte-11tz5c7"),N(n,"zephr-payment-form-password-requirement",e[3]),_(r,"class","svelte-11tz5c7"),_(t,"class","zephr-form-flex-container zephr-form-password-match svelte-11tz5c7"),N(t,"zephr-payment-form-flex-container",e[3]),N(t,"zephr-payment-form-password-match",e[3])},m(e,l){y(e,t,l),h(t,r),h(r,n),h(n,o),se(a,o,null),h(n,i),h(n,s),c=!0},p(e,[r]){const i={};3&r&&(i.color=e[0]&&e[0]===e[1]?xo:Lo),a.$set(i),(!c||8&r)&&N(o,"zephr-payment-form-password-requirement-icon",e[3]),(!c||4&r)&&I(s,e[2]),(!c||8&r)&&N(n,"zephr-payment-form-password-requirement",e[3]),(!c||8&r)&&N(t,"zephr-payment-form-flex-container",e[3]),(!c||8&r)&&N(t,"zephr-payment-form-password-match",e[3])},i(e){c||(te(a.$$.fragment,e),c=!0)},o(e){re(a.$$.fragment,e),c=!1},d(e){e&&g(t),ce(a)}}}const xo="var(--zf-password-valid-color)",Lo="var(--zf-password-invalid-color)";function Fo(e,t,r){let{password:n}=t,{confirmPassword:o}=t,{passwordsMatchText:a}=t,{isPaymentForm:i=!1}=t;return e.$$set=e=>{"password"in e&&r(0,n=e.password),"confirmPassword"in e&&r(1,o=e.confirmPassword),"passwordsMatchText"in e&&r(2,a=e.passwordsMatchText),"isPaymentForm"in e&&r(3,i=e.isPaymentForm)},[n,o,a,i]}class zo extends pe{constructor(e){super(),ue(this,e,Fo,No,i,{password:0,confirmPassword:1,passwordsMatchText:2,isPaymentForm:3})}}function ko(e,t,r){const n=e.slice();return n[12]=t[r],n[14]=r,n}function Do(e){let t;return{c(){t=P("div"),_(t,"class","zephr-form-password-bar svelte-1b6w0g8"),$(t,"background-color",e[3]>e[14]?qo:Ho),N(t,"zephr-payment-form-password-bar",e[2])},m(e,r){y(e,t,r)},p(e,r){8&r&&$(t,"background-color",e[3]>e[14]?qo:Ho),4&r&&N(t,"zephr-payment-form-password-bar",e[2])},d(e){e&&g(t)}}}function Bo(e){let t,r,n,o,a,i,s=e[1].minLengthValidationText+"";return n=new Wt({props:{icon:Bt,color:e[4]?qo:Ho}}),{c(){t=P("li"),r=P("div"),ie(n.$$.fragment),o=E(),a=S(s),_(r,"class","zephr-form-password-requirement-icon svelte-1b6w0g8"),N(r,"zephr-payment-form-password-requirement-icon",e[2]),_(t,"class","zephr-form-password-requirement svelte-1b6w0g8"),N(t,"zephr-payment-form-password-requirement",e[2])},m(e,s){y(e,t,s),h(t,r),se(n,r,null),h(t,o),h(t,a),i=!0},p(e,o){const c={};16&o&&(c.color=e[4]?qo:Ho),n.$set(c),(!i||4&o)&&N(r,"zephr-payment-form-password-requirement-icon",e[2]),(!i||2&o)&&s!==(s=e[1].minLengthValidationText+"")&&I(a,s),(!i||4&o)&&N(t,"zephr-payment-form-password-requirement",e[2])},i(e){i||(te(n.$$.fragment,e),i=!0)},o(e){re(n.$$.fragment,e),i=!1},d(e){e&&g(t),ce(n)}}}function Uo(e){let t,r,n,o,a,i,s=e[1].uppercaseValidationText+"";return n=new Wt({props:{icon:Bt,color:e[7]?qo:Ho}}),{c(){t=P("li"),r=P("div"),ie(n.$$.fragment),o=E(),a=S(s),_(r,"class","zephr-form-password-requirement-icon svelte-1b6w0g8"),N(r,"zephr-payment-form-password-requirement-icon",e[2]),_(t,"class","zephr-form-password-requirement svelte-1b6w0g8"),N(t,"zephr-payment-form-password-requirement",e[2])},m(e,s){y(e,t,s),h(t,r),se(n,r,null),h(t,o),h(t,a),i=!0},p(e,o){const c={};128&o&&(c.color=e[7]?qo:Ho),n.$set(c),(!i||4&o)&&N(r,"zephr-payment-form-password-requirement-icon",e[2]),(!i||2&o)&&s!==(s=e[1].uppercaseValidationText+"")&&I(a,s),(!i||4&o)&&N(t,"zephr-payment-form-password-requirement",e[2])},i(e){i||(te(n.$$.fragment,e),i=!0)},o(e){re(n.$$.fragment,e),i=!1},d(e){e&&g(t),ce(n)}}}function Vo(e){let t,r,n,o,a,i,s=e[1].numberValidationText+"";return n=new Wt({props:{icon:Bt,color:e[6]?qo:Ho}}),{c(){t=P("li"),r=P("div"),ie(n.$$.fragment),o=E(),a=S(s),_(r,"class","zephr-form-password-requirement-icon svelte-1b6w0g8"),N(r,"zephr-payment-form-password-requirement-icon",e[2]),_(t,"class","zephr-form-password-requirement svelte-1b6w0g8"),N(t,"zephr-payment-form-password-requirement",e[2])},m(e,s){y(e,t,s),h(t,r),se(n,r,null),h(t,o),h(t,a),i=!0},p(e,o){const c={};64&o&&(c.color=e[6]?qo:Ho),n.$set(c),(!i||4&o)&&N(r,"zephr-payment-form-password-requirement-icon",e[2]),(!i||2&o)&&s!==(s=e[1].numberValidationText+"")&&I(a,s),(!i||4&o)&&N(t,"zephr-payment-form-password-requirement",e[2])},i(e){i||(te(n.$$.fragment,e),i=!0)},o(e){re(n.$$.fragment,e),i=!1},d(e){e&&g(t),ce(n)}}}function Go(e){let t,r,n,o,a,i,s=e[1].symbolValidationText+"";return n=new Wt({props:{icon:Bt,color:e[5]?qo:Ho}}),{c(){t=P("li"),r=P("div"),ie(n.$$.fragment),o=E(),a=S(s),_(r,"class","zephr-form-password-requirement-icon svelte-1b6w0g8"),N(r,"zephr-payment-form-password-requirement-icon",e[2]),_(t,"class","zephr-form-password-requirement svelte-1b6w0g8"),N(t,"zephr-payment-form-password-requirement",e[2])},m(e,s){y(e,t,s),h(t,r),se(n,r,null),h(t,o),h(t,a),i=!0},p(e,o){const c={};32&o&&(c.color=e[5]?qo:Ho),n.$set(c),(!i||4&o)&&N(r,"zephr-payment-form-password-requirement-icon",e[2]),(!i||2&o)&&s!==(s=e[1].symbolValidationText+"")&&I(a,s),(!i||4&o)&&N(t,"zephr-payment-form-password-requirement",e[2])},i(e){i||(te(n.$$.fragment,e),i=!0)},o(e){re(n.$$.fragment,e),i=!1},d(e){e&&g(t),ce(n)}}}function jo(e){let t,r,n,o,a,i,s,c,l=ne(Array(e[8])),u=[];for(let t=0;t<l.length;t+=1)u[t]=Do(ko(e,l,t));let p=e[0].minLength&&Bo(e),d=e[0].requireUppercase&&Uo(e),m=e[0].requireNumbers&&Vo(e),f=e[0].requireSpecialCharacters&&Go(e);return{c(){t=P("div");for(let e=0;e<u.length;e+=1)u[e].c();r=E(),n=P("div"),o=P("ul"),p&&p.c(),a=E(),d&&d.c(),i=E(),m&&m.c(),s=E(),f&&f.c(),_(t,"class","zephr-form-password-progress svelte-1b6w0g8"),N(t,"zephr-payment-form-password-progress",e[2]),_(o,"class","svelte-1b6w0g8"),_(n,"class","zephr-form-flex-container zephr-form-password-requirements svelte-1b6w0g8"),N(n,"zephr-payment-form-flex-container",e[2]),N(n,"zephr-payment-form-password-requirements",e[2])},m(e,l){y(e,t,l);for(let e=0;e<u.length;e+=1)u[e]&&u[e].m(t,null);y(e,r,l),y(e,n,l),h(n,o),p&&p.m(o,null),h(o,a),d&&d.m(o,null),h(o,i),m&&m.m(o,null),h(o,s),f&&f.m(o,null),c=!0},p(e,[r]){if(12&r){let n;for(l=ne(Array(e[8])),n=0;n<l.length;n+=1){const o=ko(e,l,n);u[n]?u[n].p(o,r):(u[n]=Do(o),u[n].c(),u[n].m(t,null))}for(;n<u.length;n+=1)u[n].d(1);u.length=l.length}(!c||4&r)&&N(t,"zephr-payment-form-password-progress",e[2]),e[0].minLength?p?(p.p(e,r),1&r&&te(p,1)):(p=Bo(e),p.c(),te(p,1),p.m(o,a)):p&&(X(),re(p,1,1,(()=>{p=null})),ee()),e[0].requireUppercase?d?(d.p(e,r),1&r&&te(d,1)):(d=Uo(e),d.c(),te(d,1),d.m(o,i)):d&&(X(),re(d,1,1,(()=>{d=null})),ee()),e[0].requireNumbers?m?(m.p(e,r),1&r&&te(m,1)):(m=Vo(e),m.c(),te(m,1),m.m(o,s)):m&&(X(),re(m,1,1,(()=>{m=null})),ee()),e[0].requireSpecialCharacters?f?(f.p(e,r),1&r&&te(f,1)):(f=Go(e),f.c(),te(f,1),f.m(o,null)):f&&(X(),re(f,1,1,(()=>{f=null})),ee()),(!c||4&r)&&N(n,"zephr-payment-form-flex-container",e[2]),(!c||4&r)&&N(n,"zephr-payment-form-password-requirements",e[2])},i(e){c||(te(p),te(d),te(m),te(f),c=!0)},o(e){re(p),re(d),re(m),re(f),c=!1},d(e){e&&(g(t),g(r),g(n)),b(u,e),p&&p.d(),d&&d.d(),m&&m.d(),f&&f.d()}}}const qo="var(--zf-password-valid-color)",Ho="var(--zf-password-invalid-color)";function Ko(e,t,r){let n,o,a,i,{passwordRequirements:s}=t,{passwordValidationTexts:c}=t,{isPaymentForm:l=!1}=t,{onChange:u}=t,{password:p}=t,{passwordIsValid:d}=t,m=0,f=Object.values(s).reduce(((e,t)=>e+(t?1:0)),0);return e.$$set=e=>{"passwordRequirements"in e&&r(0,s=e.passwordRequirements),"passwordValidationTexts"in e&&r(1,c=e.passwordValidationTexts),"isPaymentForm"in e&&r(2,l=e.isPaymentForm),"onChange"in e&&r(9,u=e.onChange),"password"in e&&r(10,p=e.password),"passwordIsValid"in e&&r(11,d=e.passwordIsValid)},e.$$.update=()=>{1024&e.$$.dirty&&r(7,n=/[A-Z]+/.test(p)),1024&e.$$.dirty&&r(6,o=/[0-9]+/.test(p)),1024&e.$$.dirty&&r(5,a=/[^a-z0-9A-Z]+/.test(p)),1025&e.$$.dirty&&r(4,i=p?.length>=s.minLength),3593&e.$$.dirty&&(r(3,m=0),/[A-Z]+/.test(p)&&s.requireUppercase&&r(3,m+=1),/[0-9]+/.test(p)&&s.requireNumbers&&r(3,m+=1),/[^a-z0-9A-Z]+/.test(p)&&s.requireSpecialCharacters&&r(3,m+=1),p?.length>=s.minLength&&s.minLength&&r(3,m+=1),m>=f!==d&&u(m>=f))},[s,c,l,m,i,a,o,n,f,u,p,d]}class Yo extends pe{constructor(e){super(),ue(this,e,Ko,jo,i,{passwordRequirements:0,passwordValidationTexts:1,isPaymentForm:2,onChange:9,password:10,passwordIsValid:11})}}function Wo(e){let t,r;return t=new Yo({props:{password:e[12],passwordIsValid:e[14],passwordRequirements:e[1],passwordValidationTexts:e[16],isPaymentForm:e[3],onChange:e[10]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};4096&r&&(n.password=e[12]),16384&r&&(n.passwordIsValid=e[14]),2&r&&(n.passwordRequirements=e[1]),8&r&&(n.isPaymentForm=e[3]),1024&r&&(n.onChange=e[10]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Jo(e){let t,r;return t=new Mo({props:{disabled:e[11],password:e[13],isMainPassword:!1,label:e[0].confirm,hideLabel:e[0].hide,showLabel:e[0].show,placeholder:e[0].confirmPlaceholder,isPaymentForm:e[3],autocomplete:"new-password",onChange:e[7],onFocus:e[8],onBlur:e[9]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};2048&r&&(n.disabled=e[11]),8192&r&&(n.password=e[13]),1&r&&(n.label=e[0].confirm),1&r&&(n.hideLabel=e[0].hide),1&r&&(n.showLabel=e[0].show),1&r&&(n.placeholder=e[0].confirmPlaceholder),8&r&&(n.isPaymentForm=e[3]),128&r&&(n.onChange=e[7]),256&r&&(n.onFocus=e[8]),512&r&&(n.onBlur=e[9]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Qo(e){let t,r;return t=new zo({props:{password:e[12],confirmPassword:e[13],passwordsMatchText:e[16].passwordsMatchText,isPaymentForm:e[3]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};4096&r&&(n.password=e[12]),8192&r&&(n.confirmPassword=e[13]),8&r&&(n.isPaymentForm=e[3]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Zo(e){let t,r;return t=new Mt({props:{error:e[15]??"",isPaymentForm:e[3]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};32768&r&&(n.error=e[15]??""),8&r&&(n.isPaymentForm=e[3]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Xo(e){let t,r,n,o,a,i,s;t=new Mo({props:{disabled:e[11],password:e[12],isMainPassword:!0,label:e[0].password,hideLabel:e[0].hide,showLabel:e[0].show,placeholder:e[0].placeholder,isPaymentForm:e[3],autocomplete:e[2]?"current-password":"new-password",onChange:e[4],onFocus:e[5],onBlur:e[6]}});let c=e[0].passValidatorEnabled&&Wo(e),l=!e[2]&&Jo(e),u=e[0].passwordsMatchIndicatorEnabled&&Qo(e),p=e[15]&&Zo(e);return{c(){ie(t.$$.fragment),r=E(),c&&c.c(),n=E(),l&&l.c(),o=E(),u&&u.c(),a=E(),p&&p.c(),i=C()},m(e,d){se(t,e,d),y(e,r,d),c&&c.m(e,d),y(e,n,d),l&&l.m(e,d),y(e,o,d),u&&u.m(e,d),y(e,a,d),p&&p.m(e,d),y(e,i,d),s=!0},p(e,[r]){const s={};2048&r&&(s.disabled=e[11]),4096&r&&(s.password=e[12]),1&r&&(s.label=e[0].password),1&r&&(s.hideLabel=e[0].hide),1&r&&(s.showLabel=e[0].show),1&r&&(s.placeholder=e[0].placeholder),8&r&&(s.isPaymentForm=e[3]),4&r&&(s.autocomplete=e[2]?"current-password":"new-password"),16&r&&(s.onChange=e[4]),32&r&&(s.onFocus=e[5]),64&r&&(s.onBlur=e[6]),t.$set(s),e[0].passValidatorEnabled?c?(c.p(e,r),1&r&&te(c,1)):(c=Wo(e),c.c(),te(c,1),c.m(n.parentNode,n)):c&&(X(),re(c,1,1,(()=>{c=null})),ee()),e[2]?l&&(X(),re(l,1,1,(()=>{l=null})),ee()):l?(l.p(e,r),4&r&&te(l,1)):(l=Jo(e),l.c(),te(l,1),l.m(o.parentNode,o)),e[0].passwordsMatchIndicatorEnabled?u?(u.p(e,r),1&r&&te(u,1)):(u=Qo(e),u.c(),te(u,1),u.m(a.parentNode,a)):u&&(X(),re(u,1,1,(()=>{u=null})),ee()),e[15]?p?(p.p(e,r),32768&r&&te(p,1)):(p=Zo(e),p.c(),te(p,1),p.m(i.parentNode,i)):p&&(X(),re(p,1,1,(()=>{p=null})),ee())},i(e){s||(te(t.$$.fragment,e),te(c),te(l),te(u),te(p),s=!0)},o(e){re(t.$$.fragment,e),re(c),re(l),re(u),re(p),s=!1},d(e){e&&(g(r),g(n),g(o),g(a),g(i)),ce(t,e),c&&c.d(e),l&&l.d(e),u&&u.d(e),p&&p.d(e)}}}function ea(e,t,r){let{config:n}=t,{passwordRequirements:o}=t,{hideConfirmPassword:a}=t,{isPaymentForm:i=!1}=t,{onPasswordChange:s}=t,{onPasswordFocus:c}=t,{onPasswordBlur:l}=t,{onConfirmPasswordChange:u}=t,{onConfirmPasswordFocus:p}=t,{onConfirmPasswordBlur:d}=t,{onPasswordIsValidChange:m}=t,{disabled:f}=t,{password:h}=t,{confirmPassword:y}=t,{passwordIsValid:g}=t,{error:b=null}=t,P={minLengthValidationText:n.minLengthValidation||`Must include at least ${o.minLength} characters`,uppercaseValidationText:n.uppercaseValidation||"Must include an uppercase letter",numberValidationText:n.numberValidation||"Must include a number character",symbolValidationText:n.symbolValidation||"Must include a supported symbol",passwordsMatchText:n.passwordsMatchText||"Passwords match"};return e.$$set=e=>{"config"in e&&r(0,n=e.config),"passwordRequirements"in e&&r(1,o=e.passwordRequirements),"hideConfirmPassword"in e&&r(2,a=e.hideConfirmPassword),"isPaymentForm"in e&&r(3,i=e.isPaymentForm),"onPasswordChange"in e&&r(4,s=e.onPasswordChange),"onPasswordFocus"in e&&r(5,c=e.onPasswordFocus),"onPasswordBlur"in e&&r(6,l=e.onPasswordBlur),"onConfirmPasswordChange"in e&&r(7,u=e.onConfirmPasswordChange),"onConfirmPasswordFocus"in e&&r(8,p=e.onConfirmPasswordFocus),"onConfirmPasswordBlur"in e&&r(9,d=e.onConfirmPasswordBlur),"onPasswordIsValidChange"in e&&r(10,m=e.onPasswordIsValidChange),"disabled"in e&&r(11,f=e.disabled),"password"in e&&r(12,h=e.password),"confirmPassword"in e&&r(13,y=e.confirmPassword),"passwordIsValid"in e&&r(14,g=e.passwordIsValid),"error"in e&&r(15,b=e.error)},[n,o,a,i,s,c,l,u,p,d,m,f,h,y,g,b,P]}class ta extends pe{constructor(e){super(),ue(this,e,ea,Xo,i,{config:0,passwordRequirements:1,hideConfirmPassword:2,isPaymentForm:3,onPasswordChange:4,onPasswordFocus:5,onPasswordBlur:6,onConfirmPasswordChange:7,onConfirmPasswordFocus:8,onConfirmPasswordBlur:9,onPasswordIsValidChange:10,disabled:11,password:12,confirmPassword:13,passwordIsValid:14,error:15})}}const ra={matches:e=>e.type===Pe&&null!=e.config?.confirm,create:(e,t,r,n)=>({component:ta,props:{disabled:t.isBusy,config:n,passwordRequirements:e.organisationConfiguration.passwordStrengthRequirements,hideConfirmPassword:e.organisationConfiguration.hideConfirmPasswordOnRegForm,isPaymentForm:e.formType===vt.PAYMENT,onPasswordChange:n=>{r.updateFormState({createPassword:n}),it(e,"zephr_form_input_change",{inputName:"zephr-form-password",sectionId:t.currentSection.type,field:"create-password"})},onPasswordFocus:()=>it(e,"zephr_form_input_focus",{inputName:"zephr-form-password",sectionId:t.currentSection.type,field:"create-password"}),onPasswordBlur:()=>it(e,"zephr_form_input_blur",{inputName:"zephr-form-password",sectionId:t.currentSection.type,field:"create-password"}),onConfirmPasswordChange:n=>{r.updateFormState({confirmCreatePassword:n}),it(e,"zephr_form_input_change",{inputName:"zephr-form-confirm-password",sectionId:t.currentSection.type,field:"confirm-password"})},onConfirmPasswordFocus:()=>it(e,"zephr_form_input_focus",{inputName:"zephr-form-confirm-password",sectionId:t.currentSection.type,field:"confirm-password"}),onConfirmPasswordBlur:()=>it(e,"zephr_form_input_blur",{inputName:"zephr-form-confirm-password",sectionId:t.currentSection.type,field:"confirm-password"}),onPasswordIsValidChange:e=>r.updateFormState({passwordIsValid:e}),password:t.createPassword,confirmPassword:t.confirmCreatePassword,passwordIsValid:t.passwordIsValid},isValid:null!=t.password&&(!n.passValidatorEnabled||t.passwordIsValid)&&(e.organisationConfiguration.hideConfirmPasswordOnRegForm||t.createPassword===t.confirmCreatePassword)})},na={matches:e=>e.type===Pe&&null==e.config?.confirm,create:(e,t,r,n)=>{const o=n.isUpdatePasswordCurrentPassword?"currentPassword":"password";return{component:Mo,props:{disabled:t.isBusy,label:n.password,placeholder:n.placeholder,isMainPassword:!0,showLabel:n.showLabel,hideLabel:n.hideLabel,password:t[o],autocomplete:"password",onChange:n=>{r.updateFormState({[o]:n}),it(e,"zephr_form_input_change",{inputName:"zephr-form-password",sectionId:t.currentSection.type,field:"password"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:"zephr-form-password",sectionId:t.currentSection.type,field:"password"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:"zephr-form-password",sectionId:t.currentSection.type,field:"password"})},isValid:(a=t[o],null!=a&&a.length>2)};var a}},oa={matches:e=>e.type===Se&&!e.config.isLogin&&!e.config.isCancel,create:(e,t,r,n)=>({component:so,props:{disabled:t.isBusy||!t.canAttemptSectionCompletion,text:n.text,onClick:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.attemptCompleteSection()},isPaymentForm:e.formType===vt.PAYMENT}})};function aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ia={exports:{}};!function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();
/**
		 * @author Leandro Silva
		 * @copyright 2012, 2017 Leandro Silva (http://grafluxe.com)
		 * @license MIT
		 *
		 * @classdesc
		 * Validate email address patterns that others don't. This project aims to support all common addresses along
		 * with many rare ones that are considered valid under RFC standards. It can be used in both client and server
		 * side environments.
		 *
		 * <p>
		 *   <b>Valid email addresses that are supported:</b>
		 *   <ul>
		 *     <li>niceandsimple@example.com</li>
		 *     <li>very.common@example.com</li>
		 *     <li>a.little.lengthy.but.fine@dept.example.com</li>
		 *     <li>disposable.style.email.with+symbol@example.com</li>
		 *     <li>other.email-with-dash@example.com</li>
		 *     <li>"much.more unusual"@example.com</li>
		 *     <li>"very.unusual.@.unusual.com"@example.com</li>
		 *     <li>#!$%&\'*+-/=?^_\`{}|~@example.org</li>
		 *     <li>" "@example.org</li>
		 *     <li>üñîçøðé@üñîçøðé.com</li>
		 *     <li>admin@mailserver1</li>
		 *     <li>user@tt</li>
		 *     <li>"hi"@example.com</li>
		 *     <li>jsmith@[192.168.2.1]</li>
		 *     <li>jsmith@[IPv6:2001:db8::1]</li>
		 *     <li>email@123.123.123.123</li>
		 *     <li>"()<>[]:,;@\\\"!#$%&\'*+-/=?^_\`{}| ~.a"@example.org</li>
		 *     <li>abc."defghi".xyz@example.com</li>
		 *     <li>_______@example.com</li>
		 *     <li>very.unusual."@".unusual.com@example.com</li>
		 *     <li>john.smith(comment)@example.com</li>
		 *     <li>(comment)john.smith@example.com</li>
		 *     <li>"()<>[]:,;@\\\"!#$%&\'*+-/=?^_\`{}| ~.a"(comment)@example.org</li>
		 *   </ul>
		 *
		 *   <b>Valid (but rare) email addresses that are not supported:</b>
		 *   <ul>
		 *     <li>"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com</li>
		 *     <li>"()<>[]:,;@\"!#$%&\'*+-/=?^_\`{}| ~.a"@example.org</li>
		 *     <li>abc."d\"efghi".xyz@example.com</li>
		 *     <li>much."more\ unusual"@example.com</li>
		 *   </ul>
		 * </p>
		*/
var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"isValidAddress",value:function(e){return this._whitelist(e)&&!this._blacklist(e)&&!this._tooLong(e)}},{key:"getParts",value:function(e){var t=e.match(/[^@]*$/);return{local:e.substr(0,t.index-1)||"",domain:t[0]||""}}},{key:"_whitelist",value:function(e){return/^(?=\s)|^(?:(?!.+\.{2,})(?!\.)(?:[\w.!#$%&'*+\-\/=?\^`{|} ~]|[^\x00-\x7F])+[^\."]@|^"(?:[\w.!#$%&'*+\-\/=?\^`{|} ~(),:;<>@\[\]]|[^\x00-\x7F])+"@|(?:[\w.!#$%&'*+\-\/=?\^`{|} ~]|[^\x00-\x7F])+\."(?:[\w.!#$%&'*+\-\/=?\^`{|} ~"(),:;<>\\@\[\]]|[^\x00-\x7F])+"\.(?:[\w.!#$%&'*+\-\/=?\^`{|} ~]|[^\x00-\x7F])+@)(?!-)(?!.*-\.)(?:[a-zA-Z0-9-.]|[^\x00-\x7F])+$|^".+"@.+|.+@\[(?:\w+\.|\w+:){3}.+\]|^\(.+\)|\(.+\)@/.test(e)}},{key:"_blacklist",value:function(e){return/^@|^\s|@\[?(?=\d).*\d{4,}|"(?!.+\\").+".+"|.\(.+\)@(?=.+@)/.test(e)}},{key:"_tooLong",value:function(e){var t=this.getParts(e);return t.domain.length>=253||t.local.length>=64||e.length>=254}}]),e}();"object"===t(e)&&e.exports&&(e.exports=n)}(ia);const sa=new(aa(ia.exports)),ca=e=>!!e&&sa.isValidAddress(e);function la(e){let t,r,n,o,a;return t=new Io({props:{forInput:e[11],label:e[2],isPaymentForm:e[6]}}),o=new To({props:{id:e[11],autocomplete:"email",type:"email",name:"email",disabled:e[1],value:e[0],placeholder:e[3],errorMessage:e[5],innerTextOnClick:e[7],innerText:e[7]&&(e[4]||"Edit"),isPaymentForm:e[6],onFocus:e[9],onBlur:e[10]}}),o.$on("change",e[13]),{c(){ie(t.$$.fragment),r=E(),n=P("div"),ie(o.$$.fragment),_(n,"class","zephr-form-relative-container"),N(n,"zephr-payment-form-relative-container",e[6])},m(e,i){se(t,e,i),y(e,r,i),y(e,n,i),se(o,n,null),a=!0},p(e,[r]){const i={};4&r&&(i.label=e[2]),64&r&&(i.isPaymentForm=e[6]),t.$set(i);const s={};2&r&&(s.disabled=e[1]),1&r&&(s.value=e[0]),8&r&&(s.placeholder=e[3]),32&r&&(s.errorMessage=e[5]),128&r&&(s.innerTextOnClick=e[7]),144&r&&(s.innerText=e[7]&&(e[4]||"Edit")),64&r&&(s.isPaymentForm=e[6]),512&r&&(s.onFocus=e[9]),1024&r&&(s.onBlur=e[10]),o.$set(s),(!a||64&r)&&N(n,"zephr-payment-form-relative-container",e[6])},i(e){a||(te(t.$$.fragment,e),te(o.$$.fragment,e),a=!0)},o(e){re(t.$$.fragment,e),re(o.$$.fragment,e),a=!1},d(e){e&&(g(r),g(n)),ce(t,e),ce(o)}}}function ua(e,t,r){let{formKey:n}=t,{emailAddress:o}=t,{disabled:a}=t,{label:i}=t,{placeholder:s}=t,{editText:c}=t,{error:l=null}=t,{isPaymentForm:u=!1}=t,{onEdit:p}=t,{onChange:d}=t,{onFocus:m}=t,{onBlur:f}=t;const h=`zephr-form-identifier-${n}`;return e.$$set=e=>{"formKey"in e&&r(12,n=e.formKey),"emailAddress"in e&&r(0,o=e.emailAddress),"disabled"in e&&r(1,a=e.disabled),"label"in e&&r(2,i=e.label),"placeholder"in e&&r(3,s=e.placeholder),"editText"in e&&r(4,c=e.editText),"error"in e&&r(5,l=e.error),"isPaymentForm"in e&&r(6,u=e.isPaymentForm),"onEdit"in e&&r(7,p=e.onEdit),"onChange"in e&&r(8,d=e.onChange),"onFocus"in e&&r(9,m=e.onFocus),"onBlur"in e&&r(10,f=e.onBlur)},[o,a,i,s,c,l,u,p,d,m,f,h,n,({detail:e})=>d(e)]}class pa extends pe{constructor(e){super(),ue(this,e,ua,la,i,{formKey:12,emailAddress:0,disabled:1,label:2,placeholder:3,editText:4,error:5,isPaymentForm:6,onEdit:7,onChange:8,onFocus:9,onBlur:10})}}const da={matches:e=>e.type===ve,create:(e,t,r,n)=>{const o=n.disabled||t.isBusy;return{component:pa,props:{formKey:e.uniqueKey,disabled:o,emailAddress:t.emailAddress,label:n.label,placeholder:n.placeholder,editText:n.editText,onChange:n=>{!o&&r.updateFormState({userExists:void 0,emailIsContact:void 0,emailAddress:n,verificationCode:"",verificationCodeValid:void 0,serverErrors:[]}),it(e,"zephr_form_input_change",{inputName:`zephr-form-identifier-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"email"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-identifier-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"email"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-identifier-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"email"}),onEdit:n.disabled&&(()=>{r.jumpToPartStart(Xe.ACCOUNT_VERIFICATION.type)}),isPaymentForm:e.formType===vt.PAYMENT},isValid:ca(t.emailAddress)}}};function ma(e){let t,r;return t=new Mt({props:{error:e[0]?.message??e[1]??"",isPaymentForm:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,[r]){const n={};3&r&&(n.error=e[0]?.message??e[1]??""),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function fa(e,t,r){let{providerError:n}=t,{error:o=null}=t;return e.$$set=e=>{"providerError"in e&&r(0,n=e.providerError),"error"in e&&r(1,o=e.error)},[n,o]}class ha extends pe{constructor(e){super(),ue(this,e,fa,ma,i,{providerError:0,error:1})}}const ya={matches:e=>e.type===Ee||e.type===Ke,create:(e,t,r)=>{const n=ro(e.organisationConfiguration.paymentProvider);return n.noPaymentForm(e)?{component:ha,props:{providerError:t.paymentProviderError},isValid:!0}:{component:n.component,props:{isLoaded:t.paymentProviderFormLoaded,isBusy:t.paymentProviderFormBusy,providerError:t.paymentProviderError,isComplete:t.paymentFormComplete,isDisabled:n.internalSubmit(e)?!t.canAttemptSectionCompletion:t.isBusy||null!=t.mobilePaymentService,onMountCallback:()=>{r.updateFormState({paymentProviderFormLoaded:!1}),n.loader(e,t,r)}},isValid:n.internalSubmit(e)?void 0:t.paymentFormComplete&&!t.paymentProviderError}}},ga=e=>e.parts.flatMap((e=>e.sections)).flatMap((e=>e.elements)).some((e=>e.type===Ee&&!1!==e.config?.enabled)),ba={matches:e=>e.type===Le,create:(e,t,r)=>{const n=no(e.organisationConfiguration.paymentProvider);return e.environment.previewMode?null:{component:n.component,props:{isDisabled:t.isBusy||null!=t.mobilePaymentService,onMountCallback:()=>n.loader(e,t,r),disableCoreDependencyHeader:ga(e)}}}};function Pa(t){let r,n,o,a,i,s;return{c(){r=P("div"),n=P("img"),a=E(),i=P("div"),s=S(t[0]),_(n,"class","check-image svelte-12ljnq4"),c(n.src,o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABiCAYAAABAkr0NAAAJa0lEQVR4Xu2dT28TRxTA39oGUsHBiC/giKT/LiRHpBYIUPWQEmfVD9BwrQoJpZW4JbkhtRUO9E74AO3GQTkVCLSVOGIurVRCky/QkgNIodjezoxjsrZ3Zt7Mzu7OOraEkOLZ9Zv3m3lv/rx540BWPtc2S1Cvl6DplJjITb/1f/CTc7bAgW1w/G0oFLbg+vBWFqrnWCfkwmYRXtbH4HVuDPJwwp24MBNFRu9BtUbAERjOIzjUrMH3ow+jvC+OZ+2AQFv5q+Y0gF92z0+diaOiwXd691YJCKcKh3MrNvSW9CDQFv9Pk7TyZBTPA8t6iuMswVD+YVpAkofwzbMzUPdn3InpL+Ju8arv99bvLsNQbjFpGMlBoMp/7cwnYW5Uld9dnpmrQ/5iUv4jfgjfbo7BTuOGKeUzBeWpow35NPwi+WsRcn7RPVseiwwjoZ4RHwRq87fr8+5EeU5HGS1lw1PIE1t9AGpaJoI2gCaUoEFGWw3ntG5D8NarFRgqLGnJgKh8PBCI6XE/Lq8jfr+jiLe+ugQFfwWOFGqwMLyt+jyqfASfROS7CJWRZdTvKBQyC0Gj9Sdtfzt0c3VzGhpvplUGCaxXFAuLJhuJOQhkrO+enNzENgBSmUVSmYrJymB/u6fctT9LsJNfUILxeG3YlHkyA+HqxrR7asrDKMEq5XcLrAjD+3XVhR9GVjD1FpWJDuHy83n33IUFmSDM7Bx+cxGufxA+spG9IMnvFWB49+8uwM3ji1HEiwYBC8BQi4lSUa1nv96YcU9P3ZY9GxWEPgQEANb6j+VdK+y+TJO875G9IgoIPQgoAHevwK3jFd26W/fc3DPiuMvzIrl0QahDwAD4rTqR1JQ/UViI+Y8OCDUIlzdn3XOTwtbtPf6JDN0y4Hx16RHz5J78XDgU9+79TKzA+2grgIdAlgDcjyafCLtjvwNoVx4D4ve1cfhuuIZhjYOAmIj1fQ8ImVNIewRyQoeDcGljXbT4te8AIHsEGx3eGpmQ9QY5BIkj9hS6nUyYTH4vMdMY/yCGIDFD3r0+G4bqtgLJpM6TmCUxhNlnT3ibI2wNqDIqXa7QrVfmnpt7XiGRIbNhcsvMEh+CjG75D7kpy5wmIwhMl/Ff1Nf5jZa/F8FVpFv90OeJtG8dsYyRzD88WTsatoQTDkHgjAdmSEJCsLzB010vBJkzHpghMQViltzxyRdcKxLSG3ohCHxBXHussl6eue/Jtql7ajJ0kyusN/RAEPqCQS/AtwfBBNfr0mMnhEEvwCtZVlKw4ur9QrZFf9zbFu2EoEBPJsPge6IBjj675w17EAQOeeALNJvUpedz7vkLN0IncAEHvQdB9MB+8AU0PH+IHDAxGXQmGCkFHfQehNm/yRLFZz3xmyxSuXL8omZbsP+xrgmWzs6YsJKc5YygSWpBEJmift2qpPXmzHCNml+Rg941SS0IolFRv5oiwRKDd9+rws33yMkhMx/esL8NuwVh7q/lsBDAvjVFsjUewxBk+m1B4PqDeKKQzbQvzbdg9spNb1RJLI0DIg/ebxv3GADrayT8fXhZE3H4Y4LAAI/4BQdEjqOf/EFaAHaxcP0CGfg4wJkfyHaDjLaUuF+WMgBWvcsbK+65qXJ3VekWsQO8cSw9NVMZ0TrqFLdOld5vAwA2+Anf/qSnkxwRoczHktoCgELgWRwyEiPmKDymyMv6JM0mABTCV2SP4ZPePQbvwUrNETmMzAb12gaAQviShJF+Gh5GyocQ1/A0EFTMUhq8U3BNnf1ivsJGAFQuwTA1WQicSYssOArtiG0FYBUEzjCNyhgZhM0AsgIhEgjbAVgFAXPSBRlO/tZEZQGAVRDYpAVx9gsLIisAtCGYXkkMelcTILIEgNZdYAUc7jJ2V1gGeoSCLRgFRNYACCDQNbp0ly10QGQRgHTZIu0FPBUQWQUgXcATLCyZ3GcVWikMCJKaQZbExItjQwZrXmXluIFgdCnblk0dBAhRPa0GQAQXb+rYtL2pCcJ2AMKQIra9KaIUU7qxqKYp+Lz1AKiwvDUzsowNS++O2xnyguwRmQDAnLI4pMje4C8JiMwAQFiaFgSRX0hzh40DIksAhAOf3T2bQFQ2Z5sz7Q3/LhCZAiAyRbv+gBbZgyA6dcg5+ikbGhv7np4R3iGZf02HrhsTkP8i7tA0kA1hD4LIJA3SJ+jhEoU/BraPUcel+ioQTE+dWk/xe0Fn9pdOCJywDCpB5kNgtNQY4SGFQ5joI7SD3qAGROUocu9hcpGDzmp+UzX9RS+t0As6R0ftn9ZICxBd6v56g2pylvAEIxpJMvpLjRFqo5GcJRyCrDfEuf8cof6pP6qZnEUr6RQLXzxamDB65jd1DUYXQGiGBCvS4uxdojQL9DKHyuiV6KL3yRtEZog22qXRcV5NxRAkSVi9+6szcHPkTp+oUb8akszJskxpYghULEG6BTaJ2+/+QXYcF5GwUQ6BgZAlpzV3tYl+c0zhSZkjNpacltYNkxsaG7qYgq5i+UmDqatxPYHWAhPzs19AYAAomGk8BIR/YD6i30FgACgu/atBoFpGbML37YorJrQf4Yi7zaM6BCwIA7cuxWLLdV+KucBDAwAVRw8CFkRCF4jq6hX1HLs3uuHJ7u2MkrRXHwISBPMTaQSRoTQsKYS8xC8KgGg9oS0/wke0QKRz4bQWC3ZdfeO2rPW36hU9e360ntCuoSAjbrcSrIZBTc+/TXJ5k/wGRQbA0CaXGQhUIsSELgjEKhiKym8Nxc3domUOApWMXQXcJJfChV/mEGYaGIy8XzVxkaiy6dG4sp7dGV3ML5hcxjcLoa0F5J2Voaaq0LwTW04N2kheklvK6w65g3kq9NYPEci45j/xQNg1T7BzcE6lV3SYK3Y9vP8I8k4Ncvkt7J1lHUqkDvZNg1wND2fIvxMYRxveW823/uDvxAeh/SvIC0QxpoTt6DUdem38NoETfn18wy/pKrunZ9KGMJS/otUAMBXaLRM/hLYwGvZXoR5GiyZ9ZX1yEGLoGUY1T0c8dJAQp0/iCJw8hCCM/w4QW+3P8m5kMq3kUHtPTQ44VTiWWzY54lGRPT0IQSmp33h1kKRF9sum7LlwlNNW/OHcitGEVyqaD5S1A0K38Mx/5EgGe/805IijPVvuyWavUl9mZhrwFA41a3CkUEurxfNkthNCmLR0uFmvl8AvFMFvFKHpl3qK5Zwt9recvwWFwpYNrRzTWP4HK7laSxb9gaIAAAAASUVORK5CYII=")||_(n,"src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABiCAYAAABAkr0NAAAJa0lEQVR4Xu2dT28TRxTA39oGUsHBiC/giKT/LiRHpBYIUPWQEmfVD9BwrQoJpZW4JbkhtRUO9E74AO3GQTkVCLSVOGIurVRCky/QkgNIodjezoxjsrZ3Zt7Mzu7OOraEkOLZ9Zv3m3lv/rx540BWPtc2S1Cvl6DplJjITb/1f/CTc7bAgW1w/G0oFLbg+vBWFqrnWCfkwmYRXtbH4HVuDPJwwp24MBNFRu9BtUbAERjOIzjUrMH3ow+jvC+OZ+2AQFv5q+Y0gF92z0+diaOiwXd691YJCKcKh3MrNvSW9CDQFv9Pk7TyZBTPA8t6iuMswVD+YVpAkofwzbMzUPdn3InpL+Ju8arv99bvLsNQbjFpGMlBoMp/7cwnYW5Uld9dnpmrQ/5iUv4jfgjfbo7BTuOGKeUzBeWpow35NPwi+WsRcn7RPVseiwwjoZ4RHwRq87fr8+5EeU5HGS1lw1PIE1t9AGpaJoI2gCaUoEFGWw3ntG5D8NarFRgqLGnJgKh8PBCI6XE/Lq8jfr+jiLe+ugQFfwWOFGqwMLyt+jyqfASfROS7CJWRZdTvKBQyC0Gj9Sdtfzt0c3VzGhpvplUGCaxXFAuLJhuJOQhkrO+enNzENgBSmUVSmYrJymB/u6fctT9LsJNfUILxeG3YlHkyA+HqxrR7asrDKMEq5XcLrAjD+3XVhR9GVjD1FpWJDuHy83n33IUFmSDM7Bx+cxGufxA+spG9IMnvFWB49+8uwM3ji1HEiwYBC8BQi4lSUa1nv96YcU9P3ZY9GxWEPgQEANb6j+VdK+y+TJO875G9IgoIPQgoAHevwK3jFd26W/fc3DPiuMvzIrl0QahDwAD4rTqR1JQ/UViI+Y8OCDUIlzdn3XOTwtbtPf6JDN0y4Hx16RHz5J78XDgU9+79TKzA+2grgIdAlgDcjyafCLtjvwNoVx4D4ve1cfhuuIZhjYOAmIj1fQ8ImVNIewRyQoeDcGljXbT4te8AIHsEGx3eGpmQ9QY5BIkj9hS6nUyYTH4vMdMY/yCGIDFD3r0+G4bqtgLJpM6TmCUxhNlnT3ibI2wNqDIqXa7QrVfmnpt7XiGRIbNhcsvMEh+CjG75D7kpy5wmIwhMl/Ff1Nf5jZa/F8FVpFv90OeJtG8dsYyRzD88WTsatoQTDkHgjAdmSEJCsLzB010vBJkzHpghMQViltzxyRdcKxLSG3ohCHxBXHussl6eue/Jtql7ajJ0kyusN/RAEPqCQS/AtwfBBNfr0mMnhEEvwCtZVlKw4ur9QrZFf9zbFu2EoEBPJsPge6IBjj675w17EAQOeeALNJvUpedz7vkLN0IncAEHvQdB9MB+8AU0PH+IHDAxGXQmGCkFHfQehNm/yRLFZz3xmyxSuXL8omZbsP+xrgmWzs6YsJKc5YygSWpBEJmift2qpPXmzHCNml+Rg941SS0IolFRv5oiwRKDd9+rws33yMkhMx/esL8NuwVh7q/lsBDAvjVFsjUewxBk+m1B4PqDeKKQzbQvzbdg9spNb1RJLI0DIg/ebxv3GADrayT8fXhZE3H4Y4LAAI/4BQdEjqOf/EFaAHaxcP0CGfg4wJkfyHaDjLaUuF+WMgBWvcsbK+65qXJ3VekWsQO8cSw9NVMZ0TrqFLdOld5vAwA2+Anf/qSnkxwRoczHktoCgELgWRwyEiPmKDymyMv6JM0mABTCV2SP4ZPePQbvwUrNETmMzAb12gaAQviShJF+Gh5GyocQ1/A0EFTMUhq8U3BNnf1ivsJGAFQuwTA1WQicSYssOArtiG0FYBUEzjCNyhgZhM0AsgIhEgjbAVgFAXPSBRlO/tZEZQGAVRDYpAVx9gsLIisAtCGYXkkMelcTILIEgNZdYAUc7jJ2V1gGeoSCLRgFRNYACCDQNbp0ly10QGQRgHTZIu0FPBUQWQUgXcATLCyZ3GcVWikMCJKaQZbExItjQwZrXmXluIFgdCnblk0dBAhRPa0GQAQXb+rYtL2pCcJ2AMKQIra9KaIUU7qxqKYp+Lz1AKiwvDUzsowNS++O2xnyguwRmQDAnLI4pMje4C8JiMwAQFiaFgSRX0hzh40DIksAhAOf3T2bQFQ2Z5sz7Q3/LhCZAiAyRbv+gBbZgyA6dcg5+ikbGhv7np4R3iGZf02HrhsTkP8i7tA0kA1hD4LIJA3SJ+jhEoU/BraPUcel+ioQTE+dWk/xe0Fn9pdOCJywDCpB5kNgtNQY4SGFQ5joI7SD3qAGROUocu9hcpGDzmp+UzX9RS+t0As6R0ftn9ZICxBd6v56g2pylvAEIxpJMvpLjRFqo5GcJRyCrDfEuf8cof6pP6qZnEUr6RQLXzxamDB65jd1DUYXQGiGBCvS4uxdojQL9DKHyuiV6KL3yRtEZog22qXRcV5NxRAkSVi9+6szcHPkTp+oUb8akszJskxpYghULEG6BTaJ2+/+QXYcF5GwUQ6BgZAlpzV3tYl+c0zhSZkjNpacltYNkxsaG7qYgq5i+UmDqatxPYHWAhPzs19AYAAomGk8BIR/YD6i30FgACgu/atBoFpGbML37YorJrQf4Yi7zaM6BCwIA7cuxWLLdV+KucBDAwAVRw8CFkRCF4jq6hX1HLs3uuHJ7u2MkrRXHwISBPMTaQSRoTQsKYS8xC8KgGg9oS0/wke0QKRz4bQWC3ZdfeO2rPW36hU9e360ntCuoSAjbrcSrIZBTc+/TXJ5k/wGRQbA0CaXGQhUIsSELgjEKhiKym8Nxc3domUOApWMXQXcJJfChV/mEGYaGIy8XzVxkaiy6dG4sp7dGV3ML5hcxjcLoa0F5J2Voaaq0LwTW04N2kheklvK6w65g3kq9NYPEci45j/xQNg1T7BzcE6lV3SYK3Y9vP8I8k4Ncvkt7J1lHUqkDvZNg1wND2fIvxMYRxveW823/uDvxAeh/SvIC0QxpoTt6DUdem38NoETfn18wy/pKrunZ9KGMJS/otUAMBXaLRM/hLYwGvZXoR5GiyZ9ZX1yEGLoGUY1T0c8dJAQp0/iCJw8hCCM/w4QW+3P8m5kMq3kUHtPTQ44VTiWWzY54lGRPT0IQSmp33h1kKRF9sum7LlwlNNW/OHcitGEVyqaD5S1A0K38Mx/5EgGe/805IijPVvuyWavUl9mZhrwFA41a3CkUEurxfNkthNCmLR0uFmvl8AvFMFvFKHpl3qK5Zwt9recvwWFwpYNrRzTWP4HK7laSxb9gaIAAAAASUVORK5CYII="),_(n,"alt","Success indicator"),_(i,"class","zephr-form-success-message svelte-12ljnq4"),N(i,"zephr-payment-form-success-message",t[1])},m(e,t){y(e,r,t),h(r,n),h(r,a),h(r,i),h(i,s)},p(e,[t]){1&t&&I(s,e[0]),2&t&&N(i,"zephr-payment-form-success-message",e[1])},i:e,o:e,d(e){e&&g(r)}}}function Aa(e,t,r){let{text:n}=t,{isPaymentForm:o=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"isPaymentForm"in e&&r(1,o=e.isPaymentForm)},[n,o]}class Sa extends pe{constructor(e){super(),ue(this,e,Aa,Pa,i,{text:0,isPaymentForm:1})}}const Ea={matches:e=>e.type===Te,create:(e,t,r,n)=>({component:Sa,props:{text:n?.text,isPaymentForm:e.formType===vt.PAYMENT}})},Ca=(e,t)=>({identifiers:{email_address:t},delivery:{method:"email",destination:t,action:e,redirect:window.location.href.replace(window.location.origin,"")}}),va=async(e,t,r,n)=>{try{(await lr("blaize/token-exchange",{method:"POST",bodyObject:Ca(t,r)},n)).ok||(n.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]}))}catch(t){n.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]})}},Ta=e=>e.formType===vt.REGISTRATION&&!1===Ot(e).usePassword&&!0===e.organisationConfiguration.requireEmailVerfication&&!1===Ot(e).useVerificationCodes,_a=async(e,t,r)=>Ia(t,r).then((async n=>{if(!n.redirected){const o=200===n.status,a=e.parts.flatMap((e=>e.sections)).some((e=>e.type===ot.VERIFICATION_CODE_REGISTRATION.type)),i=!!o&&((await n.json()).contact&&a),s=o&&!i;r.updateFormState({userExists:s,emailIsContact:i});return Ta(e)?s?(va(e,"login",t.emailAddress,r),st(ot.PASSWORDLESS_VIA_LOGIN_LINK.type,e,r)):mt(e,t,r):i||Ot(e).useVerificationCodes||e.organisationConfiguration.twoFactorEmailAuthenticationEnabled?(wa(e,t,r),st(s?ot.VERIFICATION_CODE_LOGIN.type:ot.VERIFICATION_CODE_REGISTRATION.type,e,r)):st(s?ot.LOGIN_PASSWORD.type:ot.PASSWORD_SETUP.type,e,r)}window.location.replace(n.url)})),Oa=e=>({identifiers:{email_address:e.emailAddress},delivery:{method:"email",destination:e.emailAddress,action:e.userExists?"login":"register",redirect:window.location.href.replace(window.location.origin,"")}}),wa=async(e,t,r)=>{r.updateFormState({verificationCode:"",verificationCodeValid:void 0});const n=await lr("blaize/two-factor-authentication",{method:"POST",bodyObject:Oa(t)},r);return n.ok||(r.updateFormState({serverErrors:[tt.VERIFICATION_CODE_SEND_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]})),n.ok},Ia=async(e,t)=>(t.updateFormState({password:"",verificationCode:void 0,verificationCodeValid:void 0,forgotPassword:!1}),await lr("zephr/media/user/info",{method:"POST",bodyObject:{identifiers:{email_address:e.emailAddress}}},t)),Ra=async e=>await new Promise((t=>setTimeout(t,e.environment.reduceDelays?1:1500))),$a=async(e,t,r)=>{r.incrementRequestCount(),r.updateFormState({verificationCodeValid:void 0});const n=await lr(`zephr/users/reset/${t.verificationCode}`,{method:"POST",bodyObject:{identifiers:{email_address:t.emailAddress}}},r);return it(e,"zephr_form_password_reset_code_validate",{success:n?.ok}),n.ok?Ra(e).then((()=>{r.decrementRequestCount(),r.jumpToSection(ot.PASSWORD_RESET.type)})):(r.updateFormState({serverErrors:[tt.VERIFICATION_CODE_INCORRECT]}),it(e,"zephr_form_error",{error:tt[tt.VERIFICATION_CODE_INCORRECT]}),r.decrementRequestCount(),Promise.resolve())},Ma=async(e,t,r)=>{r.updateFormState({createPassword:"",confirmCreatePassword:"",forgotPassword:!0,verificationCode:""}),r.incrementRequestCount();const n=await lr("zephr/users/reset",{method:"POST",bodyObject:{identifiers:{email_address:t.emailAddress}}},r);return it(e,"zephr_form_password_reset_code_sent",{success:n?.ok}),n.ok?Ra(e).then((()=>{r.decrementRequestCount(),r.jumpToSection(ot.FORGOT_PASSWORD.type)})):(r.updateFormState({serverErrors:[tt.PASSWORD_RESET_LINK_SEND_ERROR]}),r.decrementRequestCount(),it(e,"zephr_form_error",{error:tt[tt.PASSWORD_RESET_LINK_SEND_ERROR]}),Promise.resolve())},Na=async(e,t,r)=>{const n=await lr(`zephr/users/reset/${t.verificationCode}`,{method:"POST",bodyObject:{identifiers:{email_address:t.emailAddress},validators:{password:t.createPassword}}},r);return it(e,"zephr_form_password_reset",{success:n?.ok}),n.ok?(r.updateFormState({verificationCode:"",forgotPassword:!1}),r.jumpToPartStart(Xe.ACCOUNT_VERIFICATION.type)):(r.updateFormState({serverErrors:[tt.PASSWORD_RESET_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),Promise.resolve())};function xa(e){let t;function r(e,t){return e[14]&&!e[5]?Fa:La}let n=r(e),o=n(e);return{c(){o.c(),t=C()},m(e,r){o.m(e,r),y(e,t,r)},p(e,a){n===(n=r(e))&&o?o.p(e,a):(o.d(1),o=n(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){e&&g(t),o.d(e)}}}function La(e){let t,r,n,o;return{c(){t=P("button"),r=S(e[3]),_(t,"class","zephr-form-verification-resend-link svelte-b6r3ph"),N(t,"zephr-payment-form-verification-resend-link",e[9])},m(a,i){y(a,t,i),h(t,r),n||(o=v(t,"click",e[15]),n=!0)},p(e,n){8&n&&I(r,e[3]),512&n&&N(t,"zephr-payment-form-verification-resend-link",e[9])},d(e){e&&g(t),n=!1,o()}}}function Fa(e){let t,r;return{c(){t=P("div"),r=S(e[2]),_(t,"class","zephr-form-verification-resend-text svelte-b6r3ph"),N(t,"zephr-payment-form-verification-resend-text",e[9])},m(e,n){y(e,t,n),h(t,r)},p(e,n){4&n&&I(r,e[2]),512&n&&N(t,"zephr-payment-form-verification-resend-text",e[9])},d(e){e&&g(t)}}}function za(e){let t,r=e[3]&&xa(e);return{c(){r&&r.c(),t=C()},m(e,n){r&&r.m(e,n),y(e,t,n)},p(e,n){e[3]?r?r.p(e,n):(r=xa(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){e&&g(t),r&&r.d(e)}}}function ka(e){let t,r;return t=new Wt({props:{icon:Vt}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Da(e){let t,r;return t=new Wt({props:{icon:Ut,spin:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ba(e){let t,r,n,o,a,i,s,c;t=new Io({props:{forInput:"zephr-form-verification-code",label:e[0],isPaymentForm:e[9]}}),o=new To({props:{id:"zephr-form-verification-code",value:e[8],placeholder:e[1],maxlength:6,hasError:null!=e[5],errorMessage:e[5],isPaymentForm:e[9],onFocus:e[12],onBlur:e[13],$$slots:{default:[za]},$$scope:{ctx:e}}}),o.$on("change",e[16]);let l=e[6]&&ka(),u=e[8]&&!e[6]&&e[7]&&Da();return{c(){ie(t.$$.fragment),r=E(),n=P("div"),ie(o.$$.fragment),a=E(),i=P("div"),l&&l.c(),s=E(),u&&u.c(),_(i,"class","zephr-form-input-inner-text"),N(i,"zephr-payment-form-input-inner-text",e[9]),_(n,"class","zephr-form-relative-container zephr-form-verification-resend-link-container svelte-b6r3ph"),N(n,"zephr-payment-form-relative-container",e[9]),N(n,"zephr-payment-form-verification-resend-link-container",e[9])},m(e,p){se(t,e,p),y(e,r,p),y(e,n,p),se(o,n,null),h(n,a),h(n,i),l&&l.m(i,null),h(i,s),u&&u.m(i,null),c=!0},p(e,[r]){const a={};1&r&&(a.label=e[0]),512&r&&(a.isPaymentForm=e[9]),t.$set(a);const p={};256&r&&(p.value=e[8]),2&r&&(p.placeholder=e[1]),32&r&&(p.hasError=null!=e[5]),32&r&&(p.errorMessage=e[5]),512&r&&(p.isPaymentForm=e[9]),4096&r&&(p.onFocus=e[12]),8192&r&&(p.onBlur=e[13]),150060&r&&(p.$$scope={dirty:r,ctx:e}),o.$set(p),e[6]?l?64&r&&te(l,1):(l=ka(),l.c(),te(l,1),l.m(i,s)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),e[8]&&!e[6]&&e[7]?u?448&r&&te(u,1):(u=Da(),u.c(),te(u,1),u.m(i,null)):u&&(X(),re(u,1,1,(()=>{u=null})),ee()),(!c||512&r)&&N(i,"zephr-payment-form-input-inner-text",e[9]),(!c||512&r)&&N(n,"zephr-payment-form-relative-container",e[9]),(!c||512&r)&&N(n,"zephr-payment-form-verification-resend-link-container",e[9])},i(e){c||(te(t.$$.fragment,e),te(o.$$.fragment,e),te(l),te(u),c=!0)},o(e){re(t.$$.fragment,e),re(o.$$.fragment,e),re(l),re(u),c=!1},d(e){e&&(g(r),g(n)),ce(t,e),ce(o),l&&l.d(),u&&u.d()}}}function Ua(e,t,r){let{label:n}=t,{placeholder:o}=t,{resendMessage:a=null}=t,{resendText:i=null}=t,{disabled:s}=t,{error:c=null}=t,{codeValid:l}=t,{formBusy:u}=t,{code:p}=t,{isPaymentForm:d=!1}=t,{onChange:m}=t,{onResendVerificationCode:f}=t,{onFocus:h}=t,{onBlur:y}=t,g=!1;return e.$$set=e=>{"label"in e&&r(0,n=e.label),"placeholder"in e&&r(1,o=e.placeholder),"resendMessage"in e&&r(2,a=e.resendMessage),"resendText"in e&&r(3,i=e.resendText),"disabled"in e&&r(4,s=e.disabled),"error"in e&&r(5,c=e.error),"codeValid"in e&&r(6,l=e.codeValid),"formBusy"in e&&r(7,u=e.formBusy),"code"in e&&r(8,p=e.code),"isPaymentForm"in e&&r(9,d=e.isPaymentForm),"onChange"in e&&r(10,m=e.onChange),"onResendVerificationCode"in e&&r(11,f=e.onResendVerificationCode),"onFocus"in e&&r(12,h=e.onFocus),"onBlur"in e&&r(13,y=e.onBlur)},[n,o,a,i,s,c,l,u,p,d,m,f,h,y,g,()=>{a&&(r(14,g=!0),setTimeout((()=>r(14,g=!1)),2e3)),f()},({detail:e})=>!s&&m(e)]}class Va extends pe{constructor(e){super(),ue(this,e,Ua,Ba,i,{label:0,placeholder:1,resendMessage:2,resendText:3,disabled:4,error:5,codeValid:6,formBusy:7,code:8,isPaymentForm:9,onChange:10,onResendVerificationCode:11,onFocus:12,onBlur:13})}}const Ga=e=>6===e?.length,ja={matches:e=>e.type===Ae,create:(e,t,r,n)=>({component:Va,props:{code:t.verificationCode,label:n.label,placeholder:n.placeholder,resendMessage:n.message,resendText:n.resendText,disabled:t.isBusy||t.verificationCodeValid,codeValid:t.verificationCodeValid,formBusy:t.isBusy,isPaymentForm:e.formType===vt.PAYMENT,onResendVerificationCode:()=>{(t.currentSection.type===ot.FORGOT_PASSWORD.type?Ma:wa)(e,t,r)},onChange:o=>{const a=r.updateFormState({verificationCodeValid:void 0,verificationCode:o,serverErrors:[]}),i=(e=>!e.elementValidity.filter((t=>t.partType===e.currentPart.type&&t.sectionType===e.currentSection.type&&t.sectionOrder===e.currentSection.order&&"user_attribute"===t.elementType)).some((e=>!e.isValid)))(t);if(r.updateFormState({showFieldErrors:!i}),Ga(o)){if(n.verificationEvent)return void r.onEvent(n.verificationEvent);t.currentSection.type===ot.FORGOT_PASSWORD.type?r.completeSection():i&&(async(e,t,r)=>{if(!(await lr("zephr/media/user/otp-check",{method:"POST",bodyObject:{code:t.verificationCode,email:t.emailAddress}},r)).ok)return r.updateFormState({verificationCodeValid:!1,serverErrors:[tt.VERIFICATION_CODE_INCORRECT]}),void it(e,"zephr_form_error",{error:tt[tt.VERIFICATION_CODE_INCORRECT]});r.updateFormState({verificationCodeValid:!1,serverErrors:[]}),r.completeSection()})(e,a,r)}it(e,"zephr_form_input_change",{inputName:"zephr-form-verification-code",sectionId:t.currentSection.type,field:"verification-code"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:"zephr-form-verification-code",sectionId:t.currentSection.type,field:"verification-code"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:"zephr-form-verification-code",sectionId:t.currentSection.type,field:"verification-code"})},isValid:Ga(t.verificationCode)})};function qa(t){let r;return{c(){r=P("div"),_(r,"class","zephr-form-custom-text svelte-12fdogm"),$(r,"text-align",t[1]?"center":"initial"),N(r,"zephr-payment-form-custom-text",t[2])},m(e,n){y(e,r,n),r.innerHTML=t[0]},p(e,[t]){1&t&&(r.innerHTML=e[0]),2&t&&$(r,"text-align",e[1]?"center":"initial"),4&t&&N(r,"zephr-payment-form-custom-text",e[2])},i:e,o:e,d(e){e&&g(r)}}}function Ha(e,t,r){let{text:n}=t,{centerText:o=!1}=t,{isPaymentForm:a=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"centerText"in e&&r(1,o=e.centerText),"isPaymentForm"in e&&r(2,a=e.isPaymentForm)},[n,o,a]}class Ka extends pe{constructor(e){super(),ue(this,e,Ha,qa,i,{text:0,centerText:1,isPaymentForm:2})}}const Ya={matches:e=>e.type===_e,create:(e,t,r,n)=>({component:Ka,props:{text:n.text,centerText:n.centerText,isPaymentForm:e.formType===vt.PAYMENT}})};function Wa(r){let n,o,a,i,s,c,l,u,p=[{id:r[0]},{name:r[1]},{required:r[2]},{disabled:r[3]},r[8],{type:"checkbox"},{class:"zephr-form-checkbox"}],d={};for(let e=0;e<p.length;e+=1)d=t(d,p[e]);return{c(){n=P("input"),o=E(),a=P("label"),i=P("div"),s=E(),c=S(r[6]),w(n,d),N(n,"disabled",r[3]),N(n,"error",r[4]),N(n,"zephr-payment-form-checkbox",r[5]),N(n,"svelte-eyzg32",!0),_(i,"class","zephr-form-checkmark svelte-eyzg32"),N(i,"zephr-payment-form-checkmark",r[5]),N(i,"disabled",r[3]),N(i,"checked",r[7]),N(i,"error",r[4]),_(a,"for",r[0]),_(a,"class","zephr-form-checkbox-label svelte-eyzg32"),N(a,"zephr-payment-form-checkbox-label",r[5])},m(e,t){y(e,n,t),n.autofocus&&n.focus(),y(e,o,t),y(e,a,t),h(a,i),h(a,s),h(a,c),l||(u=v(n,"input",r[9]),l=!0)},p(e,[t]){w(n,d=oe(p,[1&t&&{id:e[0]},2&t&&{name:e[1]},4&t&&{required:e[2]},8&t&&{disabled:e[3]},256&t&&e[8],{type:"checkbox"},{class:"zephr-form-checkbox"}])),N(n,"disabled",e[3]),N(n,"error",e[4]),N(n,"zephr-payment-form-checkbox",e[5]),N(n,"svelte-eyzg32",!0),32&t&&N(i,"zephr-payment-form-checkmark",e[5]),8&t&&N(i,"disabled",e[3]),128&t&&N(i,"checked",e[7]),16&t&&N(i,"error",e[4]),64&t&&I(c,e[6]),1&t&&_(a,"for",e[0]),32&t&&N(a,"zephr-payment-form-checkbox-label",e[5])},i:e,o:e,d(e){e&&(g(n),g(o),g(a)),l=!1,u()}}}function Ja(e,t,r){const n=D();let{id:o}=t,{name:a=o}=t,{required:i=!0}=t,{disabled:s=!1}=t,{hasError:c=!1}=t,{isPaymentForm:l=!1}=t,{label:u=""}=t,{value:p}=t,{placeholder:d=""}=t,{checked:m=!1}=t,{pattern:f=""}=t,h={};m&&(h.checked=m),d&&(h.placeholder=d),f&&(h.pattern=f),p&&(h.value=p);return e.$$set=e=>{"id"in e&&r(0,o=e.id),"name"in e&&r(1,a=e.name),"required"in e&&r(2,i=e.required),"disabled"in e&&r(3,s=e.disabled),"hasError"in e&&r(4,c=e.hasError),"isPaymentForm"in e&&r(5,l=e.isPaymentForm),"label"in e&&r(6,u=e.label),"value"in e&&r(10,p=e.value),"placeholder"in e&&r(11,d=e.placeholder),"checked"in e&&r(7,m=e.checked),"pattern"in e&&r(12,f=e.pattern)},[o,a,i,s,c,l,u,m,h,e=>{n("change",e.target.checked)},p,d,f]}class Qa extends pe{constructor(e){super(),ue(this,e,Ja,Wa,i,{id:0,name:1,required:2,disabled:3,hasError:4,isPaymentForm:5,label:6,value:10,placeholder:11,checked:7,pattern:12})}}function Za(r){let n,o,a,i,s,c,l,u,p=[{id:r[0]},{name:r[1]},{required:r[2]},{disabled:r[3]},r[8],{type:"radio"},{class:"zephr-form-input-radio"}],d={};for(let e=0;e<p.length;e+=1)d=t(d,p[e]);return{c(){n=P("input"),o=E(),a=P("label"),i=P("span"),s=E(),c=S(r[6]),w(n,d),N(n,"zephr-payment-form-input-radio",r[5]),N(n,"disabled",r[3]),N(n,"error",r[4]),N(n,"svelte-17rnpjv",!0),_(i,"class","zephr-form-radio-dot svelte-17rnpjv"),N(i,"zephr-payment-form-radio-dot",r[5]),N(i,"disabled",r[3]),N(i,"checked",r[7]),N(i,"error",r[4]),_(a,"for",r[0]),_(a,"class","zephr-form-radio-label svelte-17rnpjv"),N(a,"zephr-payment-form-radio-label",r[5])},m(e,t){y(e,n,t),n.autofocus&&n.focus(),y(e,o,t),y(e,a,t),h(a,i),h(a,s),h(a,c),l||(u=v(n,"input",r[9]),l=!0)},p(e,[t]){w(n,d=oe(p,[1&t&&{id:e[0]},2&t&&{name:e[1]},4&t&&{required:e[2]},8&t&&{disabled:e[3]},256&t&&e[8],{type:"radio"},{class:"zephr-form-input-radio"}])),N(n,"zephr-payment-form-input-radio",e[5]),N(n,"disabled",e[3]),N(n,"error",e[4]),N(n,"svelte-17rnpjv",!0),32&t&&N(i,"zephr-payment-form-radio-dot",e[5]),8&t&&N(i,"disabled",e[3]),128&t&&N(i,"checked",e[7]),16&t&&N(i,"error",e[4]),64&t&&I(c,e[6]),1&t&&_(a,"for",e[0]),32&t&&N(a,"zephr-payment-form-radio-label",e[5])},i:e,o:e,d(e){e&&(g(n),g(o),g(a)),l=!1,u()}}}function Xa(e,t,r){const n=D();let{id:o}=t,{name:a=o}=t,{required:i=!0}=t,{disabled:s=!1}=t,{hasError:c=!1}=t,{isPaymentForm:l=!1}=t,{label:u=""}=t,{value:p}=t,{placeholder:d=""}=t,{checked:m=!1}=t,{pattern:f=""}=t,h={};m&&(h.checked=m),d&&(h.placeholder=d),f&&(h.pattern=f),p&&(h.value=p);return e.$$set=e=>{"id"in e&&r(0,o=e.id),"name"in e&&r(1,a=e.name),"required"in e&&r(2,i=e.required),"disabled"in e&&r(3,s=e.disabled),"hasError"in e&&r(4,c=e.hasError),"isPaymentForm"in e&&r(5,l=e.isPaymentForm),"label"in e&&r(6,u=e.label),"value"in e&&r(10,p=e.value),"placeholder"in e&&r(11,d=e.placeholder),"checked"in e&&r(7,m=e.checked),"pattern"in e&&r(12,f=e.pattern)},[o,a,i,s,c,l,u,m,h,e=>{n("change",e.target.value)},p,d,f]}class ei extends pe{constructor(e){super(),ue(this,e,Xa,Za,i,{id:0,name:1,required:2,disabled:3,hasError:4,isPaymentForm:5,label:6,value:10,placeholder:11,checked:7,pattern:12})}}function ti(e,t,r){const n=e.slice();return n[19]=t[r],n}function ri(e,t,r){const n=e.slice();return n[19]=t[r],n}function ni(e){let t,r;return t=new To({props:{id:e[10],name:e[0].slug,required:e[0].required||e[1]?.required,type:e[1]?.["input-type"],value:e[2],checked:"checkbox"===e[1]?.["input-type"]&&e[2],pattern:e[1]?.["validation-expression"],placeholder:e[0].placeholder,hasError:e[8],isPaymentForm:e[3],onFocus:e[5],onBlur:e[6]}}),t.$on("change",e[18]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.name=e[0].slug),3&r&&(n.required=e[0].required||e[1]?.required),2&r&&(n.type=e[1]?.["input-type"]),4&r&&(n.value=e[2]),6&r&&(n.checked="checkbox"===e[1]?.["input-type"]&&e[2]),2&r&&(n.pattern=e[1]?.["validation-expression"]),1&r&&(n.placeholder=e[0].placeholder),256&r&&(n.hasError=e[8]),8&r&&(n.isPaymentForm=e[3]),32&r&&(n.onFocus=e[5]),64&r&&(n.onBlur=e[6]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function oi(e){let t,r,n,o;r=new To({props:{id:e[10],required:e[0].required||e[1]?.required,type:e[1]["input-type"],value:e[2],min:e[1]["range-start"],max:e[1]["range-end"],step:e[1]["range-start"],isPaymentForm:e[3],onFocus:e[5],onBlur:e[6]}}),r.$on("change",e[17]);let a="range"===e[1]["input-type"]&&null!=e[2]&&li(e);return{c(){t=P("div"),ie(r.$$.fragment),n=E(),a&&a.c(),_(t,"class","zephr-form-flex-container"),N(t,"zephr-payment-form-flex-container",e[3])},m(e,i){y(e,t,i),se(r,t,null),h(t,n),a&&a.m(t,null),o=!0},p(e,n){const i={};3&n&&(i.required=e[0].required||e[1]?.required),2&n&&(i.type=e[1]["input-type"]),4&n&&(i.value=e[2]),2&n&&(i.min=e[1]["range-start"]),2&n&&(i.max=e[1]["range-end"]),2&n&&(i.step=e[1]["range-start"]),8&n&&(i.isPaymentForm=e[3]),32&n&&(i.onFocus=e[5]),64&n&&(i.onBlur=e[6]),r.$set(i),"range"===e[1]["input-type"]&&null!=e[2]?a?a.p(e,n):(a=li(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null),(!o||8&n)&&N(t,"zephr-payment-form-flex-container",e[3])},i(e){o||(te(r.$$.fragment,e),o=!0)},o(e){re(r.$$.fragment,e),o=!1},d(e){e&&g(t),ce(r),a&&a.d()}}}function ai(t){let r,n,o,a,i;return{c(){r=P("textarea"),_(r,"id",t[10]),_(r,"class","zephr-form-input zephr-form-input-textarea svelte-1f2hwm0"),r.required=n=t[0].required||t[1]?.required,_(r,"placeholder",o=t[0].placeholder),N(r,"zephr-payment-form-input",t[3]),N(r,"zephr-payment-form-input-textarea",t[3])},m(e,n){y(e,r,n),R(r,t[7]),a||(i=v(r,"input",t[16]),a=!0)},p(e,t){3&t&&n!==(n=e[0].required||e[1]?.required)&&(r.required=n),1&t&&o!==(o=e[0].placeholder)&&_(r,"placeholder",o),128&t&&R(r,e[7]),8&t&&N(r,"zephr-payment-form-input",e[3]),8&t&&N(r,"zephr-payment-form-input-textarea",e[3])},i:e,o:e,d(e){e&&g(r),a=!1,i()}}}function ii(t){let r,n,o,a,i,s,c,l,u=(t[0].placeholder??"")+"",p=ne(t[1]?.["select-options"]),d=[];for(let e=0;e<p.length;e+=1)d[e]=ui(ti(t,p,e));return{c(){r=P("select"),n=P("option"),o=S(u);for(let e=0;e<d.length;e+=1)d[e].c();n.disabled=!0,n.__value="",R(n,n.__value),_(r,"id",t[10]),_(r,"name",a=t[0].slug),_(r,"class","zephr-form-input zephr-form-input-select svelte-1f2hwm0"),r.required=i=t[0].required||t[1]?.required,N(r,"zephr-payment-form-input",t[3]),N(r,"zephr-payment-form-input-select",t[3]),N(r,"unselected",!t[2]),N(r,"error",t[8])},m(e,a){y(e,r,a),h(r,n),h(n,o);for(let e=0;e<d.length;e+=1)d[e]&&d[e].m(r,null);M(r,t[2]??""),c||(l=v(r,"change",t[15]),c=!0)},p(e,t){if(1&t&&u!==(u=(e[0].placeholder??"")+"")&&I(o,u),6&t){let n;for(p=ne(e[1]?.["select-options"]),n=0;n<p.length;n+=1){const o=ti(e,p,n);d[n]?d[n].p(o,t):(d[n]=ui(o),d[n].c(),d[n].m(r,null))}for(;n<d.length;n+=1)d[n].d(1);d.length=p.length}1&t&&a!==(a=e[0].slug)&&_(r,"name",a),3&t&&i!==(i=e[0].required||e[1]?.required)&&(r.required=i),6&t&&s!==(s=e[2]??"")&&M(r,e[2]??""),8&t&&N(r,"zephr-payment-form-input",e[3]),8&t&&N(r,"zephr-payment-form-input-select",e[3]),4&t&&N(r,"unselected",!e[2]),256&t&&N(r,"error",e[8])},i:e,o:e,d(e){e&&g(r),b(d,e),c=!1,l()}}}function si(e){let t,r;return t=new Qa({props:{id:e[10],name:e[0].slug,label:`${e[0].label}${e[0].required||e[1]?.required?"*":""}`,required:e[0].required||e[1]?.required,value:e[2],checked:e[2],pattern:e[1]?.["validation-expression"],placeholder:e[0].placeholder,hasError:e[8],isPaymentForm:e[3]}}),t.$on("change",e[14]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.name=e[0].slug),3&r&&(n.label=`${e[0].label}${e[0].required||e[1]?.required?"*":""}`),3&r&&(n.required=e[0].required||e[1]?.required),4&r&&(n.value=e[2]),4&r&&(n.checked=e[2]),2&r&&(n.pattern=e[1]?.["validation-expression"]),1&r&&(n.placeholder=e[0].placeholder),256&r&&(n.hasError=e[8]),8&r&&(n.isPaymentForm=e[3]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function ci(e){let t,r,n=ne(e[1]?.["select-options"]),o=[];for(let t=0;t<n.length;t+=1)o[t]=pi(ri(e,n,t));const a=e=>re(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=C()},m(e,n){for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,n);y(e,t,n),r=!0},p(e,r){if(1311&r){let i;for(n=ne(e[1]?.["select-options"]),i=0;i<n.length;i+=1){const a=ri(e,n,i);o[i]?(o[i].p(a,r),te(o[i],1)):(o[i]=pi(a),o[i].c(),te(o[i],1),o[i].m(t.parentNode,t))}for(X(),i=n.length;i<o.length;i+=1)a(i);ee()}},i(e){if(!r){for(let e=0;e<n.length;e+=1)te(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)re(o[e]);r=!1},d(e){e&&g(t),b(o,e)}}}function li(e){let t,r;return{c(){t=P("output"),r=S(e[2]),_(t,"class","zephr-form-input-slider-output svelte-1f2hwm0"),N(t,"zephr-payment-form-input-slider-output",e[3])},m(e,n){y(e,t,n),h(t,r)},p(e,n){4&n&&I(r,e[2]),8&n&&N(t,"zephr-payment-form-input-slider-output",e[3])},d(e){e&&g(t)}}}function ui(e){let t,r,n,o,a,i=e[19].label+"";return{c(){t=P("option"),r=S(i),n=E(),t.__value=o=e[19].value,R(t,t.__value),t.selected=a=e[2]===e[19].value},m(e,o){y(e,t,o),h(t,r),h(t,n)},p(e,n){2&n&&i!==(i=e[19].label+"")&&I(r,i),2&n&&o!==(o=e[19].value)&&(t.__value=o,R(t,t.__value)),6&n&&a!==(a=e[2]===e[19].value)&&(t.selected=a)},d(e){e&&g(t)}}}function pi(e){let t,r;return t=new ei({props:{id:e[10]+"-"+e[19].value,name:e[0].slug,label:e[19].label,required:e[0].required||e[1]?.required,value:e[19].value,checked:e[2]===e[19].value,hasError:e[8],isPaymentForm:e[3]}}),t.$on("change",e[13]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};2&r&&(n.id=e[10]+"-"+e[19].value),1&r&&(n.name=e[0].slug),2&r&&(n.label=e[19].label),3&r&&(n.required=e[0].required||e[1]?.required),2&r&&(n.value=e[19].value),6&r&&(n.checked=e[2]===e[19].value),256&r&&(n.hasError=e[8]),8&r&&(n.isPaymentForm=e[3]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function di(e){let t,r,n,o;const a=[ci,si,ii,ai,oi,ni],i=[];function s(e,t){return"radio"===e[1]?.["input-type"]?0:"checkbox"===e[1]?.["input-type"]?1:"select"===e[1]?.["input-type"]?2:"textarea"===e[1]?.["input-type"]?3:"range"===e[1]?.["input-type"]?4:5}return t=s(e),r=i[t]=a[t](e),{c(){r.c(),n=C()},m(e,r){i[t].m(e,r),y(e,n,r),o=!0},p(e,o){let c=t;t=s(e),t===c?i[t].p(e,o):(X(),re(i[c],1,1,(()=>{i[c]=null})),ee(),r=i[t],r?r.p(e,o):(r=i[t]=a[t](e),r.c()),te(r,1),r.m(n.parentNode,n))},i(e){o||(te(r),o=!0)},o(e){re(r),o=!1},d(e){e&&g(n),i[t].d(e)}}}function mi(e){let t;return{c(){t=P("div"),t.textContent="Mandatory information must be entered",_(t,"class","zephr-form-input-error-text svelte-1f2hwm0"),N(t,"zephr-payment-form-input-error-text",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&N(t,"zephr-payment-form-input-error-text",e[3])},d(e){e&&g(t)}}}function fi(e){let t,r,n,o;t=new Io({props:{forInput:e[10],sublabel:e[1]["public-description"],label:/(hidden|checkbox)/.test(e[1]?.["input-type"]||"")?"":`${e[0].label}${e[0].required||e[1]?.required?"*":""}`,isPaymentForm:e[3],$$slots:{default:[di]},$$scope:{ctx:e}}});let a=e[8]&&mi(e);return{c(){ie(t.$$.fragment),r=E(),a&&a.c(),n=C()},m(e,i){se(t,e,i),y(e,r,i),a&&a.m(e,i),y(e,n,i),o=!0},p(e,[r]){const o={};2&r&&(o.sublabel=e[1]["public-description"]),3&r&&(o.label=/(hidden|checkbox)/.test(e[1]?.["input-type"]||"")?"":`${e[0].label}${e[0].required||e[1]?.required?"*":""}`),8&r&&(o.isPaymentForm=e[3]),16777727&r&&(o.$$scope={dirty:r,ctx:e}),t.$set(o),e[8]?a?a.p(e,r):(a=mi(e),a.c(),a.m(n.parentNode,n)):a&&(a.d(1),a=null)},i(e){o||(te(t.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),o=!1},d(e){e&&(g(r),g(n)),ce(t,e),a&&a.d(e)}}}function hi(e,t,r){let n,{formKey:o}=t,{config:a}=t,{attributeSchema:i}=t,{value:s}=t,{error:c}=t,{isPaymentForm:l=!1}=t,{onChange:u}=t,{onFocus:p}=t,{onBlur:d}=t,m=s;const f=e=>e,h=`zephr-form-${a.slug}-${o}`;return e.$$set=e=>{"formKey"in e&&r(11,o=e.formKey),"config"in e&&r(0,a=e.config),"attributeSchema"in e&&r(1,i=e.attributeSchema),"value"in e&&r(2,s=e.value),"error"in e&&r(12,c=e.error),"isPaymentForm"in e&&r(3,l=e.isPaymentForm),"onChange"in e&&r(4,u=e.onChange),"onFocus"in e&&r(5,p=e.onFocus),"onBlur"in e&&r(6,d=e.onBlur)},e.$$.update=()=>{4096&e.$$.dirty&&r(8,n=!!c),150&e.$$.dirty&&"textarea"===i?.["input-type"]&&m!==s&&u(m)},[a,i,s,l,u,p,d,m,n,f,h,o,c,({detail:e})=>u(e),({detail:e})=>u(e),e=>u(e.target.value),function(){m=this.value,r(7,m)},({detail:e})=>u(e),({detail:e})=>u(e)]}class yi extends pe{constructor(e){super(),ue(this,e,hi,fi,i,{formKey:11,config:0,attributeSchema:1,value:2,error:12,isPaymentForm:3,onChange:4,onFocus:5,onBlur:6})}}const gi=e=>null==e||""===e,bi={matches:e=>e.type===Oe,create:(e,t,r,n)=>{const o=e.organisationConfiguration.schemaFields.find((e=>e.slug===n.slug)),a=t.hideIfSetAttributes?.includes(n.slug);if(null==o||a)return;const i=o.required||n.required,s=t.userAttributes[n.slug]??(t.readOnlyAttributeValues??{})[n.slug];return{component:yi,props:{formKey:e.uniqueKey,config:n,value:s,attributeSchema:o,isPaymentForm:e.formType===vt.PAYMENT,onChange:o=>{r.updateFormState({userAttributes:{...t.userAttributes,[n.slug]:o}}),it(e,"zephr_form_input_change",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug})},isValid:!(i&&gi(s)||i&&"checkbox"===o["input-type"]&&!s||"email"===o["input-type"]&&!gi(s)&&!ca(s))}}};function Pi(t){let r,n,o,a;return{c(){r=P("button"),n=S(t[0]),_(r,"type","button"),_(r,"class","zephr-form-link svelte-1mdtotm"),N(r,"zephr-form-link-disabled",t[1]),N(r,"zephr-form-link-no-underline",t[3])},m(e,i){y(e,r,i),h(r,n),o||(a=v(r,"click",t[5]),o=!0)},p(e,[t]){1&t&&I(n,e[0]),2&t&&N(r,"zephr-form-link-disabled",e[1]),8&t&&N(r,"zephr-form-link-no-underline",e[3])},i:e,o:e,d(e){e&&g(r),o=!1,a()}}}function Ai(e,t,r){let{text:n}=t,{disabled:o=!1}=t,{onClick:a=(()=>{})}=t,{noUnderline:i=!1}=t;const s=D();return e.$$set=e=>{"text"in e&&r(0,n=e.text),"disabled"in e&&r(1,o=e.disabled),"onClick"in e&&r(2,a=e.onClick),"noUnderline"in e&&r(3,i=e.noUnderline)},[n,o,a,i,s,()=>{a(),s("linkClick",null)}]}class Si extends pe{constructor(e){super(),ue(this,e,Ai,Pi,i,{text:0,disabled:1,onClick:2,noUnderline:3})}}function Ei(e){let t,r;return t=new Si({props:{text:e[0],onClick:e[2]}}),t.$on("linkClick",e[7]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),4&r&&(n.onClick=e[2]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ci(t){let r,n;return{c(){r=P("div"),n=S(t[1]),_(r,"class","zephr-form-link-message svelte-11qigta")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2&t&&I(n,e[1])},i:e,o:e,d(e){e&&g(r)}}}function vi(e){let t,r;return t=new Mt({props:{error:e[3],isPaymentForm:e[5]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.error=e[3]),32&r&&(n.isPaymentForm=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ti(e){let t,r,n,o,a;const i=[Ci,Ei],s=[];function c(e,t){return e[6]&&!e[3]?0:1}r=c(e),n=s[r]=i[r](e);let l=e[3]&&vi(e);return{c(){t=P("div"),n.c(),o=E(),l&&l.c(),_(t,"class","zephr-form-flex-container zephr-form-reset-link-container svelte-11qigta"),N(t,"zephr-payment-form-flex-container",e[5])},m(e,n){y(e,t,n),s[r].m(t,null),h(t,o),l&&l.m(t,null),a=!0},p(e,[u]){let p=r;r=c(e),r===p?s[r].p(e,u):(X(),re(s[p],1,1,(()=>{s[p]=null})),ee(),n=s[r],n?n.p(e,u):(n=s[r]=i[r](e),n.c()),te(n,1),n.m(t,o)),e[3]?l?(l.p(e,u),8&u&&te(l,1)):(l=vi(e),l.c(),te(l,1),l.m(t,null)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),(!a||32&u)&&N(t,"zephr-payment-form-flex-container",e[5])},i(e){a||(te(n),te(l),a=!0)},o(e){re(n),re(l),a=!1},d(e){e&&g(t),s[r].d(),l&&l.d()}}}function _i(e,t,r){let{text:n}=t,{message:o}=t,{onClick:a}=t,{error:i=null}=t,{delayMs:s}=t,{isPaymentForm:c=!1}=t,l=!1;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"message"in e&&r(1,o=e.message),"onClick"in e&&r(2,a=e.onClick),"error"in e&&r(3,i=e.error),"delayMs"in e&&r(4,s=e.delayMs),"isPaymentForm"in e&&r(5,c=e.isPaymentForm)},[n,o,a,i,s,c,l,()=>{o&&(r(6,l=!0),setTimeout((()=>r(6,l=!1)),s))}]}class Oi extends pe{constructor(e){super(),ue(this,e,_i,Ti,i,{text:0,message:1,onClick:2,error:3,delayMs:4,isPaymentForm:5})}}const wi={matches:e=>e.type===we,create:(e,t,r,n)=>({component:Oi,props:{text:n.text,message:n.message,delayMs:e.environment.reduceDelays?1:3e3,isPaymentForm:e.formType===vt.PAYMENT,onClick:()=>Ma(e,t,r)}})};function Ii(e){let t,r;return t=new Si({props:{text:e[0],onClick:e[2]}}),t.$on("linkClick",e[7]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),4&r&&(n.onClick=e[2]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ri(t){let r,n;return{c(){r=P("div"),n=S(t[1]),_(r,"class","zephr-form-link-message svelte-11qigta")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2&t&&I(n,e[1])},i:e,o:e,d(e){e&&g(r)}}}function $i(e){let t,r;return t=new Mt({props:{error:e[3],isPaymentForm:e[5]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.error=e[3]),32&r&&(n.isPaymentForm=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Mi(e){let t,r,n,o,a;const i=[Ri,Ii],s=[];function c(e,t){return e[6]&&!e[3]?0:1}r=c(e),n=s[r]=i[r](e);let l=e[3]&&$i(e);return{c(){t=P("div"),n.c(),o=E(),l&&l.c(),_(t,"class","zephr-form-flex-container zephr-form-reset-link-container svelte-11qigta"),N(t,"zephr-payment-form-flex-container",e[5])},m(e,n){y(e,t,n),s[r].m(t,null),h(t,o),l&&l.m(t,null),a=!0},p(e,[u]){let p=r;r=c(e),r===p?s[r].p(e,u):(X(),re(s[p],1,1,(()=>{s[p]=null})),ee(),n=s[r],n?n.p(e,u):(n=s[r]=i[r](e),n.c()),te(n,1),n.m(t,o)),e[3]?l?(l.p(e,u),8&u&&te(l,1)):(l=$i(e),l.c(),te(l,1),l.m(t,null)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),(!a||32&u)&&N(t,"zephr-payment-form-flex-container",e[5])},i(e){a||(te(n),te(l),a=!0)},o(e){re(n),re(l),a=!1},d(e){e&&g(t),s[r].d(),l&&l.d()}}}function Ni(e,t,r){let{text:n}=t,{message:o}=t,{onClick:a}=t,{error:i=null}=t,{delayMs:s}=t,{isPaymentForm:c=!1}=t,l=!1;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"message"in e&&r(1,o=e.message),"onClick"in e&&r(2,a=e.onClick),"error"in e&&r(3,i=e.error),"delayMs"in e&&r(4,s=e.delayMs),"isPaymentForm"in e&&r(5,c=e.isPaymentForm)},[n,o,a,i,s,c,l,()=>{o&&(r(6,l=!0),setTimeout((()=>r(6,l=!1)),s))}]}class xi extends pe{constructor(e){super(),ue(this,e,Ni,Mi,i,{text:0,message:1,onClick:2,error:3,delayMs:4,isPaymentForm:5})}}const Li={matches:e=>e.type===Ie,create:(e,t,r,n)=>({component:xi,props:{text:n.text,message:n.message,delayMs:e.environment.reduceDelays?1:3e3,isPaymentForm:e.formType===vt.PAYMENT,onClick:async()=>{await va(e,"login",t.emailAddress,r)}}})},Fi=(e,t)=>r=>{if(r?.data?.fromZephr)if(window.removeEventListener("message",window.zephrOAuthListener),e.environment.debugLogging&&console.log("Social signin message:",r),"register"===r.data.action){const n=t.updateFormState({emailAddress:r.data.identifier,socialSigninToken:r.data.stateKey,userAttributes:r.data.userAttributes??{},socialSignin:!0,userExists:!1,emailIsContact:void 0});if(e.organisationConfiguration.requireEmailVerfication)return void wa(e,n,t);mt(e,n,t)}else"otp"==r.data.action?(t.updateFormState({emailAddress:r.data.identifier,socialSigninToken:r.data.stateKey,userAttributes:r.data.userAttributes??{},socialSignin:!0,userExists:!0,emailIsContact:!1}),t.jumpToSection(ot.VERIFICATION_CODE_LOGIN.type)):"login"===r.data.action?(document.cookie=r.data.cookie,t.updateFormState({socialSignin:!0,userExists:!0,loginRegistrationComplete:!0,emailIsContact:!1}),t.onEvent(Ze.LOGIN_REGISTRATION_COMPLETE)):t.updateFormState({socialSigninError:r.data.message??"Something went wrong. Please try again later!"})};var zi={prefix:"fab",iconName:"microsoft",icon:[448,512,[],"f3ca","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"]},ki={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},Di={prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]},Bi={prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"]},Ui={prefix:"fab",iconName:"twitter",icon:[512,512,[],"f099","M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"]};function Vi(t){let r,n,o,a,i;return{c(){r=A("svg"),n=A("path"),o=A("path"),a=A("path"),i=A("path"),_(n,"d","M533.5 278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1 33.8-25.7 63.7-54.4 82.7v68h87.7c51.5-47.4 81.1-117.4 81.1-200.2z"),_(n,"fill","#4285f4"),_(o,"d","M272.1 544.3c73.4 0 135.3-24.1 180.4-65.7l-87.7-68c-24.4 16.6-55.9 26-92.6 26-71 0-131.2-47.9-152.8-112.3H28.9v70.1c46.2 91.9 140.3 149.9 243.2 149.9z"),_(o,"fill","#34a853"),_(a,"d","M119.3 324.3c-11.4-33.8-11.4-70.4 0-104.2V150H28.9c-38.6 76.9-38.6 167.5 0 244.4l90.4-70.1z"),_(a,"fill","#fbbc04"),_(i,"d","M272.1 107.7c38.8-.6 76.3 14 104.4 40.8l77.7-77.7C405 24.6 339.7-.8 272.1 0 169.2 0 75.1 58 28.9 150l90.4 70.1c21.5-64.5 81.8-112.4 152.8-112.4z"),_(i,"fill","#ea4335"),_(r,"class","zephr-form-social-sign-in-icon zephr-form-google-icon svelte-155mfls"),_(r,"viewBox","0 0 533.5 544.3"),_(r,"xmlns","http://www.w3.org/2000/svg")},m(e,t){y(e,r,t),h(r,n),h(r,o),h(r,a),h(r,i)},p:e,i:e,o:e,d(e){e&&g(r)}}}class Gi extends pe{constructor(e){super(),ue(this,e,null,Vi,i,{})}}function ji(e,t,r){const n=e.slice();return n[8]=t[r],n}function qi(e){let t,r,n,o,a,i,s,c,l,u,p,d,m=e[8]+"";const f=[Ki,Hi],b=[];function A(e,t){return"Google"===e[8]?0:1}function C(){return e[6](e[8])}return o=A(e),a=b[o]=f[o](e),{c(){t=P("button"),r=P("span"),n=P("span"),a.c(),i=E(),s=S(e[4]),c=E(),l=S(m),_(n,"class","zephr-form-social-sign-in-icon svelte-18a7qws"),N(n,"zephr-payment-form-social-sign-in-icon",e[3]),_(r,"class","zephr-form-flex-container zephr-form-social-sign-in svelte-18a7qws"),N(r,"zephr-payment-form-flex-container",e[3]),N(r,"zephr-payment-form-social-sign-in",e[3]),_(t,"type","button"),_(t,"class","zephr-form-button zephr-form-social-sign-in-button svelte-18a7qws"),N(t,"zephr-payment-form-button",e[3]),N(t,"zephr-payment-form-social-sign-in-button",e[3])},m(e,a){y(e,t,a),h(t,r),h(r,n),b[o].m(n,null),h(r,i),h(r,s),h(r,c),h(r,l),u=!0,p||(d=v(t,"click",T(C)),p=!0)},p(i,s){let c=o;o=A(e=i),o===c?b[o].p(e,s):(X(),re(b[c],1,1,(()=>{b[c]=null})),ee(),a=b[o],a?a.p(e,s):(a=b[o]=f[o](e),a.c()),te(a,1),a.m(n,null)),(!u||8&s)&&N(n,"zephr-payment-form-social-sign-in-icon",e[3]),(!u||1&s)&&m!==(m=e[8]+"")&&I(l,m),(!u||8&s)&&N(r,"zephr-payment-form-flex-container",e[3]),(!u||8&s)&&N(r,"zephr-payment-form-social-sign-in",e[3]),(!u||8&s)&&N(t,"zephr-payment-form-button",e[3]),(!u||8&s)&&N(t,"zephr-payment-form-social-sign-in-button",e[3])},i(e){u||(te(a),u=!0)},o(e){re(a),u=!1},d(e){e&&g(t),b[o].d(),p=!1,d()}}}function Hi(e){let r,n;const o=[e[5](e[8])];let a={};for(let e=0;e<o.length;e+=1)a=t(a,o[e]);return r=new Wt({props:a}),{c(){ie(r.$$.fragment)},m(e,t){se(r,e,t),n=!0},p(e,t){const n=33&t?oe(o,[ae(e[5](e[8]))]):{};r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){ce(r,e)}}}function Ki(t){let r,n;return r=new Gi({}),{c(){ie(r.$$.fragment)},m(e,t){se(r,e,t),n=!0},p:e,i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){ce(r,e)}}}function Yi(e){let t,r,n=!0===e[0][e[8]]&&"labelText"!==e[8]&&"allowEmptyLabel"!==e[8]&&qi(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,r){!0===e[0][e[8]]&&"labelText"!==e[8]&&"allowEmptyLabel"!==e[8]?n?(n.p(e,r),1&r&&te(n,1)):(n=qi(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Wi(e){let t,r;return t=new Mt({props:{error:e[2],isPaymentForm:e[3]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};4&r&&(n.error=e[2]),8&r&&(n.isPaymentForm=e[3]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ji(e){let t,r,n,o=ne(Object.keys(e[0])),a=[];for(let t=0;t<o.length;t+=1)a[t]=Yi(ji(e,o,t));const i=e=>re(a[e],1,1,(()=>{a[e]=null}));let s=e[2]&&Wi(e);return{c(){for(let e=0;e<a.length;e+=1)a[e].c();t=E(),s&&s.c(),r=C()},m(e,o){for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(e,o);y(e,t,o),s&&s.m(e,o),y(e,r,o),n=!0},p(e,[n]){if(59&n){let r;for(o=ne(Object.keys(e[0])),r=0;r<o.length;r+=1){const i=ji(e,o,r);a[r]?(a[r].p(i,n),te(a[r],1)):(a[r]=Yi(i),a[r].c(),te(a[r],1),a[r].m(t.parentNode,t))}for(X(),r=o.length;r<a.length;r+=1)i(r);ee()}e[2]?s?(s.p(e,n),4&n&&te(s,1)):(s=Wi(e),s.c(),te(s,1),s.m(r.parentNode,r)):s&&(X(),re(s,1,1,(()=>{s=null})),ee())},i(e){if(!n){for(let e=0;e<o.length;e+=1)te(a[e]);te(s),n=!0}},o(e){a=a.filter(Boolean);for(let e=0;e<a.length;e+=1)re(a[e]);re(s),n=!1},d(e){e&&(g(t),g(r)),b(a,e),s&&s.d(e)}}}function Qi(e,t,r){let{config:n}=t,{onSelectProvider:o}=t,{error:a=null}=t,{isPaymentForm:i=!1}=t;const s=n.allowEmptyLabel?"":"Continue with",c=n.labelText?n.labelText:s;return e.$$set=e=>{"config"in e&&r(0,n=e.config),"onSelectProvider"in e&&r(1,o=e.onSelectProvider),"error"in e&&r(2,a=e.error),"isPaymentForm"in e&&r(3,i=e.isPaymentForm)},[n,o,a,i,c,e=>{switch(e){case"Facebook":default:return{icon:Bi,color:"#1877f2",size:"lg"};case"LinkedIn":return{icon:Di,color:"#0a66c2",size:"lg"};case"Apple":return{icon:ki,color:"#000",size:"lg"};case"Microsoft":return{icon:zi,color:"#00a4ef",size:"lg"};case"Twitter":return{icon:Ui,color:"#08a0e9",size:"lg"}}},e=>o(e.toLowerCase())]}class Zi extends pe{constructor(e){super(),ue(this,e,Qi,Ji,i,{config:0,onSelectProvider:1,error:2,isPaymentForm:3})}}const Xi={matches:e=>e.type===Re,create:(e,t,r,n)=>{const{enabled:o,hide:a,show:i,...s}=n??{};return{component:Zi,props:{config:s,isPaymentForm:e.formType===vt.PAYMENT,onSelectProvider:t=>((e,t,r)=>{r.updateFormState({socialSigninError:void 0}),window.open(`${t.environment.apiUrlBase??""}/blaize/oauth/${e}`,e+" sign-in","menubar=no,location=yes,resizable=no,scrollbars=no,status=no,width=500,height=600");const n=Fi(t,r);window.zephrOAuthListener=n,window.addEventListener("message",n)})(t,e,r)}}}},es="promo-code",ts=async(e,t,r)=>{const n=await un(e,t,r,!0),o=await oo(e,n,r);if(t.currentSection.elements.some((e=>e.type===Le&&!1!==e.config?.enabled))){r.incrementRequestCount();try{await no(e.organisationConfiguration.paymentProvider).loader(e,o,r)}finally{r.decrementRequestCount()}}},rs=async(e,t,r)=>{const n=ro(e.organisationConfiguration.paymentProvider);return n.hasPromoCodes(e)?n?.promoCodeServiceOverride?n.promoCodeServiceOverride(e,t,r):(async(e,t,r)=>{r.updateFormState({promoCodeValid:void 0,serverErrors:[],discountedPlanPrices:[]});const n=ro(e.organisationConfiguration.paymentProvider),o=await lr(n.promoCodeCheckPath,{method:"POST",bodyObject:{promoCode:t.promoCode,paymentOptions:Ot(e).paymentOptions}},r,es);if(!o.ok){let t;if(403===o.status){const e=await o.json();t=2===e?.code||3===e?.code?tt.PROMO_CODE_EXPIRED_ERROR:tt.PROMO_CODE_INVALID_ERROR}else t=tt.PROMO_CODE_INVALID_ERROR,console.error("Unknown error evaluating promo code",o);return it(e,"zephr_form_error",{error:tt[t]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[t],discountedPlanPrices:[]}))}const a=(await o.json()).paymentOptions.map((e=>({planSlug:e.slug,productId:e.productId,discountPrice:e.discountPrice})));return a.find((e=>e.planSlug===t.paymentOption.slug&&e.productId===t.paymentOption.productId))?Promise.resolve(r.updateFormState({promoCodeValid:!0,serverErrors:[],discountedPlanPrices:a})):(it(e,"zephr_form_error",{error:tt[tt.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[tt.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR],discountedPlanPrices:a})))})(e,t,r).then((t=>ts(e,t,r))):t};function ns(e,t,r){const n=e.slice();return n[34]=t[r],n}function os(e,t,r){const n=e.slice();return n[37]=t[r],n}function as(e){let t,r,n,o,a,i,s,c=e[37].label+"",l=e[37].priceFormattedString+"";return{c(){t=P("div"),r=P("span"),n=S(c),o=E(),a=P("div"),i=P("span"),s=S(l),_(r,"class","zephr-form-summary-charge-description zephr-payment-form-summary-charge-description svelte-19l6fte"),_(a,"class","zephr-form-summary-line-right zephr-payment-form-summary-line-right svelte-19l6fte"),_(t,"class","zephr-form-charge-line zephr-payment-form-charge-line svelte-19l6fte")},m(e,c){y(e,t,c),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(i,s)},p(e,t){524288&t[0]&&c!==(c=e[37].label+"")&&I(n,c),524288&t[0]&&l!==(l=e[37].priceFormattedString+"")&&I(s,l)},d(e){e&&g(t)}}}function is(e){let t,r,n,o,a,i;return{c(){t=P("div"),r=P("div"),n=S(e[22]),o=E(),a=P("div"),i=S(e[21]),_(r,"class","zephr-form-summary-charge-description zephr-payment-form-summary-charge-description svelte-19l6fte"),_(a,"class","zephr-form-summary-line-right zephr-payment-form-summary-line-right svelte-19l6fte"),_(t,"class","zephr-form-charge-line zephr-payment-form-charge-line svelte-19l6fte")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i)},p(e,t){4194304&t[0]&&I(n,e[22]),2097152&t[0]&&I(i,e[21])},d(e){e&&g(t)}}}function ss(e){let t,r,n,o,a,i,s,c=e[34].label+"",l=e[34].addonPrice+"";return{c(){t=P("div"),r=P("span"),n=S(c),o=E(),a=P("div"),i=P("span"),s=S(l),_(a,"class","zephr-form-summary-line-right zephr-payment-form-summary-line-right svelte-19l6fte"),_(t,"class","zephr-form-addon-line zephr-payment-form-addon-line svelte-19l6fte")},m(e,c){y(e,t,c),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(i,s)},p(e,t){262144&t[0]&&c!==(c=e[34].label+"")&&I(n,c),262144&t[0]&&l!==(l=e[34].addonPrice+"")&&I(s,l)},d(e){e&&g(t)}}}function cs(e){let t,r,n,o=!e[17]&&!(e[27]||e[11])&&ls(e),a=(e[27]||e[11])&&us(e);return{c(){o&&o.c(),t=E(),a&&a.c(),r=C()},m(e,i){o&&o.m(e,i),y(e,t,i),a&&a.m(e,i),y(e,r,i),n=!0},p(e,n){e[17]||e[27]||e[11]?o&&(o.d(1),o=null):o?o.p(e,n):(o=ls(e),o.c(),o.m(t.parentNode,t)),e[27]||e[11]?a?(a.p(e,n),134219776&n[0]&&te(a,1)):(a=us(e),a.c(),te(a,1),a.m(r.parentNode,r)):a&&(X(),re(a,1,1,(()=>{a=null})),ee())},i(e){n||(te(a),n=!0)},o(e){re(a),n=!1},d(e){e&&(g(t),g(r)),o&&o.d(e),a&&a.d(e)}}}function ls(e){let t,r,n,o,a;return{c(){t=P("button"),r=P("span"),n=S(e[4]),_(t,"type","button"),_(t,"class","zephr-form-promo-activate-line zephr-payment-form-promo-activate-line svelte-19l6fte")},m(i,s){y(i,t,s),h(t,r),h(r,n),o||(a=v(t,"click",e[32]),o=!0)},p(e,t){16&t[0]&&I(n,e[4])},d(e){e&&g(t),o=!1,a()}}}function us(e){let t,r,n,o,a,i,s,c,l,u,p,d;const m=[ds,ps],b=[];function A(e,t){return e[17]&&e[11]?0:e[17]?-1:1}~(n=A(e))&&(o=b[n]=m[n](e));const S=[gs,ys],v=[];function T(e,t){return e[12]?0:e[17]?-1:1}~(s=T(e))&&(c=v[s]=S[s](e));let O=e[14]&&Ps(e);return{c(){t=P("div"),r=P("div"),o&&o.c(),a=E(),i=P("div"),c&&c.c(),u=E(),O&&O.c(),p=C(),_(r,"class","zephr-form-promo-input-container zephr-payment-form-promo-input-container svelte-19l6fte"),_(i,"class",l=f(e[12]?"zephr-form-summary-line-right zephr-payment-form-summary-line-right":"zephr-form-summary-line-left zephr-payment-form-summary-line-left")+" svelte-19l6fte"),_(t,"class","zephr-form-promo-line zephr-payment-form-promo-line svelte-19l6fte")},m(e,o){y(e,t,o),h(t,r),~n&&b[n].m(r,null),h(t,a),h(t,i),~s&&v[s].m(i,null),y(e,u,o),O&&O.m(e,o),y(e,p,o),d=!0},p(e,t){let a=n;n=A(e),n===a?~n&&b[n].p(e,t):(o&&(X(),re(b[a],1,1,(()=>{b[a]=null})),ee()),~n?(o=b[n],o?o.p(e,t):(o=b[n]=m[n](e),o.c()),te(o,1),o.m(r,null)):o=null);let u=s;s=T(e),s===u?~s&&v[s].p(e,t):(c&&(X(),re(v[u],1,1,(()=>{v[u]=null})),ee()),~s?(c=v[s],c?c.p(e,t):(c=v[s]=S[s](e),c.c()),te(c,1),c.m(i,null)):c=null),(!d||4096&t[0]&&l!==(l=f(e[12]?"zephr-form-summary-line-right zephr-payment-form-summary-line-right":"zephr-form-summary-line-left zephr-payment-form-summary-line-left")+" svelte-19l6fte"))&&_(i,"class",l),e[14]?O?(O.p(e,t),16384&t[0]&&te(O,1)):(O=Ps(e),O.c(),te(O,1),O.m(p.parentNode,p)):O&&(X(),re(O,1,1,(()=>{O=null})),ee())},i(e){d||(te(o),te(c),te(O),d=!0)},o(e){re(o),re(c),re(O),d=!1},d(e){e&&(g(t),g(u),g(p)),~n&&b[n].d(),~s&&v[s].d(),O&&O.d(e)}}}function ps(e){let t,r,n;return r=new To({props:{id:"zephr-form-promo-code",value:e[11],placeholder:e[5],maxlength:50,hasError:null!=e[14],fill:!0,isPaymentForm:!0,onFocus:e[25],onBlur:e[26],$$slots:{default:[hs]},$$scope:{ctx:e}}}),r.$on("change",e[33]),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","zephr-form-relative-container zephr-form-promo-input zephr-form-relative-container zephr-payment-form-promo-input")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,t){const n={};2048&t[0]&&(n.value=e[11]),32&t[0]&&(n.placeholder=e[5]),16384&t[0]&&(n.hasError=null!=e[14]),33554432&t[0]&&(n.onFocus=e[25]),67108864&t[0]&&(n.onBlur=e[26]),53248&t[0]|512&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function ds(t){let r,n;return{c(){r=P("span"),n=S(t[11]),_(r,"class","zephr-form-summary-promo-middle zephr-payment-form-summary-promo-middle svelte-19l6fte")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2048&t[0]&&I(n,e[11])},i:e,o:e,d(e){e&&g(r)}}}function ms(e){let t,r;return t=new Wt({props:{icon:Ut,spin:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function fs(e){let t,r;return t=new Wt({props:{icon:Vt}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function hs(e){let t,r,n,o;const a=[fs,ms],i=[];function s(e,t){return e[12]?0:e[15]&&!e[14]?1:-1}return~(r=s(e))&&(n=i[r]=a[r](e)),{c(){t=P("div"),n&&n.c(),_(t,"class","zephr-form-input-inner-text zephr-payment-form-input-inner-text zephr-form-input-inner-button")},m(e,n){y(e,t,n),~r&&i[r].m(t,null),o=!0},p(e,o){let c=r;r=s(e),r!==c&&(n&&(X(),re(i[c],1,1,(()=>{i[c]=null})),ee()),~r?(n=i[r],n||(n=i[r]=a[r](e),n.c()),te(n,1),n.m(t,null)):n=null)},i(e){o||(te(n),o=!0)},o(e){re(n),o=!1},d(e){e&&g(t),~r&&i[r].d()}}}function ys(e){let t,r;return t=new so({props:{disabled:e[16],text:e[6],onClick:e[24],noMargin:!0,inputHeight:!0,isPaymentForm:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};65536&r[0]&&(n.disabled=e[16]),64&r[0]&&(n.text=e[6]),16777216&r[0]&&(n.onClick=e[24]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function gs(t){let r,n=t[0]&&bs(t);return{c(){r=P("span"),n&&n.c(),_(r,"class","zephr-form-summary-promo-middle zephr-payment-form-summary-promo-middle svelte-19l6fte")},m(e,t){y(e,r,t),n&&n.m(r,null)},p(e,t){e[0]?n?n.p(e,t):(n=bs(e),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d()}}}function bs(e){let t,r;return{c(){t=S("- "),r=S(e[13])},m(e,n){y(e,t,n),y(e,r,n)},p(e,t){8192&t[0]&&I(r,e[13])},d(e){e&&(g(t),g(r))}}}function Ps(e){let t,r;return t=new Mt({props:{error:e[14],isPaymentForm:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};16384&r[0]&&(n.error=e[14]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function As(e){let t,r;return{c(){t=P("div"),r=S(e[10]),_(t,"class","zephr-form-summary-prorate-disclaimer zephr-payment-form-summary-prorate-disclaimer svelte-19l6fte")},m(e,n){y(e,t,n),h(t,r)},p(e,t){1024&t[0]&&I(r,e[10])},d(e){e&&g(t)}}}function Ss(e){let t,r,n,o,a,i,s=(e[9]??"DUE TODAY")+"",c=e[20].totalPriceFormattedString+"";return{c(){t=P("div"),r=P("div"),n=S(s),o=E(),a=P("div"),i=S(c),_(r,"class","zephr-form-summary-line-total-title zephr-payment-form-summary-line-total-title"),_(a,"class","zephr-form-summary-line-price zephr-payment-form-summary-line-price svelte-19l6fte"),_(t,"class","zephr-form-summary-line zephr-form-summary-price-line zephr-payment-form-summary-line zephr-payment-form-summary-price-line svelte-19l6fte")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i)},p(e,t){512&t[0]&&s!==(s=(e[9]??"DUE TODAY")+"")&&I(n,s),1048576&t[0]&&c!==(c=e[20].totalPriceFormattedString+"")&&I(i,c)},d(e){e&&g(t)}}}function Es(e){let t,r,n,o,a,i,s,c,l,u,p,d,m,f,A,C,v,T,O,w,R,$,M,N,x=ne(e[19]),L=[];for(let t=0;t<x.length;t+=1)L[t]=as(os(e,x,t));let F=e[21]&&is(e),z=ne(e[18]),k=[];for(let t=0;t<z.length;t+=1)k[t]=ss(ns(e,z,t));let D=e[3]&&cs(e),B=e[10]&&As(e),U=e[20]&&Ss(e);return{c(){t=P("div"),r=P("div"),n=S(e[7]),o=E(),a=P("div"),i=P("div"),s=S(e[1]),c=E(),l=P("div"),u=S(e[28]),p=E();for(let e=0;e<L.length;e+=1)L[e].c();d=E(),F&&F.c(),m=E();for(let e=0;e<k.length;e+=1)k[e].c();f=E(),D&&D.c(),A=E(),C=P("div"),v=P("div"),T=S(e[8]),O=E(),w=P("div"),R=S(e[2]),$=E(),B&&B.c(),M=E(),U&&U.c(),_(r,"class","zephr-form-summary-title zephr-payment-form-summary-title svelte-19l6fte"),_(i,"class","zephr-form-summary-line-title zephr-payment-form-summary-line-title svelte-19l6fte"),_(l,"class","zephr-form-summary-line-price zephr-payment-form-summary-line-price svelte-19l6fte"),_(a,"class","zephr-form-summary-line zephr-payment-form-summary-line svelte-19l6fte"),_(v,"class","zephr-form-summary-line-total-title zephr-payment-form-summary-line-total-title"),_(w,"class","zephr-form-summary-line-price zephr-payment-form-summary-line-price svelte-19l6fte"),_(C,"class","zephr-form-summary-line zephr-form-summary-price-line zephr-form-summary-price-line-upper zephr-payment-form-summary-line zephr-payment-form-summary-price-line zephr-payment-form-summary-price-line-upper svelte-19l6fte"),_(t,"class","zephr-form-summary zephr-payment-form-summary svelte-19l6fte")},m(e,g){y(e,t,g),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(i,s),h(a,c),h(a,l),h(l,u),h(t,p);for(let e=0;e<L.length;e+=1)L[e]&&L[e].m(t,null);h(t,d),F&&F.m(t,null),h(t,m);for(let e=0;e<k.length;e+=1)k[e]&&k[e].m(t,null);h(t,f),D&&D.m(t,null),h(t,A),h(t,C),h(C,v),h(v,T),h(C,O),h(C,w),h(w,R),h(t,$),B&&B.m(t,null),h(t,M),U&&U.m(t,null),N=!0},p(e,r){if((!N||128&r[0])&&I(n,e[7]),(!N||2&r[0])&&I(s,e[1]),(!N||268435456&r[0])&&I(u,e[28]),524288&r[0]){let n;for(x=ne(e[19]),n=0;n<x.length;n+=1){const o=os(e,x,n);L[n]?L[n].p(o,r):(L[n]=as(o),L[n].c(),L[n].m(t,d))}for(;n<L.length;n+=1)L[n].d(1);L.length=x.length}if(e[21]?F?F.p(e,r):(F=is(e),F.c(),F.m(t,m)):F&&(F.d(1),F=null),262144&r[0]){let n;for(z=ne(e[18]),n=0;n<z.length;n+=1){const o=ns(e,z,n);k[n]?k[n].p(o,r):(k[n]=ss(o),k[n].c(),k[n].m(t,f))}for(;n<k.length;n+=1)k[n].d(1);k.length=z.length}e[3]?D?(D.p(e,r),8&r[0]&&te(D,1)):(D=cs(e),D.c(),te(D,1),D.m(t,A)):D&&(X(),re(D,1,1,(()=>{D=null})),ee()),(!N||256&r[0])&&I(T,e[8]),(!N||4&r[0])&&I(R,e[2]),e[10]?B?B.p(e,r):(B=As(e),B.c(),B.m(t,M)):B&&(B.d(1),B=null),e[20]?U?U.p(e,r):(U=Ss(e),U.c(),U.m(t,null)):U&&(U.d(1),U=null)},i(e){N||(te(D),N=!0)},o(e){re(D),N=!1},d(e){e&&g(t),b(L,e),F&&F.d(),b(k,e),D&&D.d(),B&&B.d(),U&&U.d()}}}function Cs(e,t,r){let n,{showPromoCodeDiscountAmount:o=!0}=t,{planTitle:a}=t,{price:i}=t,{totalPrice:s}=t,{allowPromoCodes:c}=t,{promoCodeLinkText:l}=t,{promoCodePlaceholder:u}=t,{promoCodeButtonText:p}=t,{title:d}=t,{totalLabel:m}=t,{prorateLabel:f}=t,{prorateDisclaimer:h}=t,{promoCode:y}=t,{promoCodeValid:g}=t,{discountAmount:b}=t,{error:P=null}=t,{busy:A}=t,{promoCodeDisabled:S}=t,{paymentProcessed:E}=t,{addons:C}=t,{chargeItems:v}=t,{changeSubscriptionProrate:T}=t,{tax:_}=t,{taxLabel:O}=t,{subTotal:w}=t,{onChangePromoCode:I}=t,{verifyPromoCode:R}=t,{onFocus:$}=t,{onBlur:M}=t,{logBeginCheckout:N}=t,x=!1;N();return e.$$set=e=>{"showPromoCodeDiscountAmount"in e&&r(0,o=e.showPromoCodeDiscountAmount),"planTitle"in e&&r(1,a=e.planTitle),"price"in e&&r(29,i=e.price),"totalPrice"in e&&r(2,s=e.totalPrice),"allowPromoCodes"in e&&r(3,c=e.allowPromoCodes),"promoCodeLinkText"in e&&r(4,l=e.promoCodeLinkText),"promoCodePlaceholder"in e&&r(5,u=e.promoCodePlaceholder),"promoCodeButtonText"in e&&r(6,p=e.promoCodeButtonText),"title"in e&&r(7,d=e.title),"totalLabel"in e&&r(8,m=e.totalLabel),"prorateLabel"in e&&r(9,f=e.prorateLabel),"prorateDisclaimer"in e&&r(10,h=e.prorateDisclaimer),"promoCode"in e&&r(11,y=e.promoCode),"promoCodeValid"in e&&r(12,g=e.promoCodeValid),"discountAmount"in e&&r(13,b=e.discountAmount),"error"in e&&r(14,P=e.error),"busy"in e&&r(15,A=e.busy),"promoCodeDisabled"in e&&r(16,S=e.promoCodeDisabled),"paymentProcessed"in e&&r(17,E=e.paymentProcessed),"addons"in e&&r(18,C=e.addons),"chargeItems"in e&&r(19,v=e.chargeItems),"changeSubscriptionProrate"in e&&r(20,T=e.changeSubscriptionProrate),"tax"in e&&r(21,_=e.tax),"taxLabel"in e&&r(22,O=e.taxLabel),"subTotal"in e&&r(30,w=e.subTotal),"onChangePromoCode"in e&&r(23,I=e.onChangePromoCode),"verifyPromoCode"in e&&r(24,R=e.verifyPromoCode),"onFocus"in e&&r(25,$=e.onFocus),"onBlur"in e&&r(26,M=e.onBlur),"logBeginCheckout"in e&&r(31,N=e.logBeginCheckout)},e.$$.update=()=>{1611137024&e.$$.dirty[0]&&r(28,n=v.length?"":w||i)},[o,a,s,c,l,u,p,d,m,f,h,y,g,b,P,A,S,E,C,v,T,_,O,I,R,$,M,x,n,i,w,N,()=>r(27,x=!0),({detail:e})=>I(e)]}class vs extends pe{constructor(e){super(),ue(this,e,Cs,Es,i,{showPromoCodeDiscountAmount:0,planTitle:1,price:29,totalPrice:2,allowPromoCodes:3,promoCodeLinkText:4,promoCodePlaceholder:5,promoCodeButtonText:6,title:7,totalLabel:8,prorateLabel:9,prorateDisclaimer:10,promoCode:11,promoCodeValid:12,discountAmount:13,error:14,busy:15,promoCodeDisabled:16,paymentProcessed:17,addons:18,chargeItems:19,changeSubscriptionProrate:20,tax:21,taxLabel:22,subTotal:30,onChangePromoCode:23,verifyPromoCode:24,onFocus:25,onBlur:26,logBeginCheckout:31},null,[-1,-1])}}const Ts={matches:e=>e.type===$e,create:(e,t,r,n)=>{const o=ro(e.organisationConfiguration.paymentProvider);return{component:vs,props:{showPromoCodeDiscountAmount:!Ot(e).dynamicOffer,price:t.paymentOptionPrices?.netPriceFormattedString??"-",totalPrice:t.paymentOptionPrices?.totalPriceFormattedString??"-",tax:t.paymentOptionPrices?.taxPriceFormattedString,taxLabel:n.taxLabel??"Tax",subTotal:t.paymentOptionPrices?.netPriceFormattedString,planTitle:t.paymentOption.label,allowPromoCodes:(Ot(e).promoCodeConfig?.promoCodeAllowed||Ot(e).dynamicOffer)&&o.hasPromoCodes(e),promoCodeLinkText:Ot(e).promoCodeConfig?.promoCodeText,promoCodePlaceholder:Ot(e).promoCodeConfig?.promoCodePlaceholder,promoCodeButtonText:Ot(e).promoCodeConfig?.promoCodeButtonText,totalLabel:n.total,prorateLabel:n.prorateLabel,prorateDisclaimer:!Ot(e).changeSubscriptionMode||o.changeSubscriptionProrateCalculator?null:n.prorateDisclaimer,title:n.title,promoCode:t.promoCode,busy:t.isBusyByKey[es],promoCodeDisabled:t.isBusy||0===t.promoCode?.length,paymentProcessed:t.paymentProcessed,discountAmount:t.paymentOptionPrices?.discountPriceFormattedPrice??"-",addons:dn(t).map((e=>({label:e.label,addonPrice:ln(e.addonPrice,t.paymentOption.currencyCode)}))),chargeItems:t.paymentOptionPrices?.chargeItems??[],promoCodeValid:t.promoCodeValid,changeSubscriptionProrate:t.changeSubscriptionProrate,onChangePromoCode:n=>{let o=r.updateFormState({promoCode:n,promoCodeValid:void 0,discountedPlanPrices:[]});t.promoCodeValid&&(t.originalDynamicOfferResult&&(o=r.updateFormState({dynamicOfferResult:t.originalDynamicOfferResult})),ts(e,o,r)),it(e,"zephr_form_input_change",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"}),verifyPromoCode:()=>{rs(e,t,r)},logBeginCheckout:async()=>{t.userExists&&(e.organisationConfiguration.trackFormDataLayerEvents&&await oo(e,t,r),it(e,"begin_checkout",{ecommerce:{currency:fn(e,t),value:r.getFormState().paymentOptionPrices?.totalPrice,items:[{item_id:t.paymentOption.slug,item_name:t.paymentOption.productId,price:r.getFormState().paymentOptionPrices?.totalPrice,quantity:1}]}}))}}}}};function _s(e){let t,r,n,o=e[1]&&Os(e),a=e[0]&&Rs(e),i=e[1]&&e[0]&&$s(e);return{c(){t=P("div"),o&&o.c(),r=E(),a&&a.c(),n=E(),i&&i.c(),_(t,"class","zephr-form-divider-container svelte-svq2r5"),N(t,"zephr-payment-form-divider-container",e[3])},m(e,s){y(e,t,s),o&&o.m(t,null),h(t,r),a&&a.m(t,null),h(t,n),i&&i.m(t,null)},p(e,s){e[1]?o?o.p(e,s):(o=Os(e),o.c(),o.m(t,r)):o&&(o.d(1),o=null),e[0]?a?a.p(e,s):(a=Rs(e),a.c(),a.m(t,n)):a&&(a.d(1),a=null),e[1]&&e[0]?i?i.p(e,s):(i=$s(e),i.c(),i.m(t,null)):i&&(i.d(1),i=null),8&s&&N(t,"zephr-payment-form-divider-container",e[3])},d(e){e&&g(t),o&&o.d(),a&&a.d(),i&&i.d()}}}function Os(e){let t;function r(e,t){return e[0]?Is:ws}let n=r(e),o=n(e);return{c(){o.c(),t=C()},m(e,r){o.m(e,r),y(e,t,r)},p(e,a){n===(n=r(e))&&o?o.p(e,a):(o.d(1),o=n(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){e&&g(t),o.d(e)}}}function ws(t){let r;return{c(){r=P("div"),_(r,"class","zephr-form-divider-line-complete svelte-svq2r5")},m(e,t){y(e,r,t)},p:e,d(e){e&&g(r)}}}function Is(e){let t;return{c(){t=P("div"),_(t,"class","zephr-form-divider-line svelte-svq2r5"),N(t,"zephr-payment-form-divider-line",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&N(t,"zephr-payment-form-divider-line",e[3])},d(e){e&&g(t)}}}function Rs(e){let t,r;return{c(){t=P("span"),r=S(e[0]),_(t,"class","zephr-form-divider-text svelte-svq2r5"),N(t,"zephr-payment-form-divider-text",e[3])},m(e,n){y(e,t,n),h(t,r)},p(e,n){1&n&&I(r,e[0]),8&n&&N(t,"zephr-payment-form-divider-text",e[3])},d(e){e&&g(t)}}}function $s(e){let t;return{c(){t=P("div"),_(t,"class","zephr-form-divider-line svelte-svq2r5"),N(t,"zephr-payment-form-divider-line",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&N(t,"zephr-payment-form-divider-line",e[3])},d(e){e&&g(t)}}}function Ms(t){let r,n=t[2]&&_s(t);return{c(){n&&n.c(),r=C()},m(e,t){n&&n.m(e,t),y(e,r,t)},p(e,[t]){e[2]?n?n.p(e,t):(n=_s(e),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d(e)}}}function Ns(e,t,r){let{text:n}=t,{showLine:o}=t,{show:a}=t,{isPaymentForm:i=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"showLine"in e&&r(1,o=e.showLine),"show"in e&&r(2,a=e.show),"isPaymentForm"in e&&r(3,i=e.isPaymentForm)},[n,o,a,i]}class xs extends pe{constructor(e){super(),ue(this,e,Ns,Ms,i,{text:0,showLine:1,show:2,isPaymentForm:3})}}const Ls={matches:e=>e.type===Me,create:(e,t,r,n)=>({component:xs,props:{text:n.text,showLine:n.showLine,show:n.show,isPaymentForm:e.formType===vt.PAYMENT}})};function Fs(t){let r,n,o,a,i;return{c(){r=P("div"),n=S(t[0]),o=E(),a=P("a"),i=S(t[1]),_(a,"href",t[2]),_(a,"class","svelte-1bpa3mq"),_(r,"class","zephr-form-login-link svelte-1bpa3mq"),N(r,"zephr-payment-login-link",t[3])},m(e,t){y(e,r,t),h(r,n),h(r,o),h(r,a),h(a,i)},p(e,[t]){1&t&&I(n,e[0]),2&t&&I(i,e[1]),4&t&&_(a,"href",e[2]),8&t&&N(r,"zephr-payment-login-link",e[3])},i:e,o:e,d(e){e&&g(r)}}}function zs(e,t,r){let{text:n}=t,{linkText:o}=t,{url:a}=t,{isPaymentForm:i=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"linkText"in e&&r(1,o=e.linkText),"url"in e&&r(2,a=e.url),"isPaymentForm"in e&&r(3,i=e.isPaymentForm)},[n,o,a,i]}class ks extends pe{constructor(e){super(),ue(this,e,zs,Fs,i,{text:0,linkText:1,url:2,isPaymentForm:3})}}const Ds={matches:e=>e.type===Ne,create:(e,t,r,n)=>({component:ks,props:{text:n.alreadyRegText,linkText:n.loginText,url:n.url,isPaymentForm:e.formType===vt.PAYMENT}})},Bs={matches:e=>e.type===Se&&e.config.isLogin,create:(e,t,r,n)=>({component:so,props:{disabled:t.isBusy,text:n.text,onClick:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.updateFormState({forgotPassword:!1}),r.jumpToPartStart(Xe.ACCOUNT_VERIFICATION.type)},isPaymentForm:e.formType===vt.PAYMENT}})},Us={matches:e=>e.type===Se&&e.config.isCancel,create:(e,t,r,n)=>({component:so,props:{text:n.text,onClick:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.updateFormState({confirmCancel:!0}),r.completeSection()}}})};function Vs(e){let t,r;return t=new Si({props:{text:e[0]}}),t.$on("linkClick",e[10]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Gs(e){let t,r,n,o;return t=new Io({props:{forInput:e[8],label:e[0]}}),n=new To({props:{id:e[8],value:e[2],errorMessage:e[3],placeholder:e[1],onFocus:e[5],onBlur:e[6]}}),n.$on("change",e[11]),{c(){ie(t.$$.fragment),r=E(),ie(n.$$.fragment)},m(e,a){se(t,e,a),y(e,r,a),se(n,e,a),o=!0},p(e,r){const o={};1&r&&(o.label=e[0]),t.$set(o);const a={};4&r&&(a.value=e[2]),8&r&&(a.errorMessage=e[3]),2&r&&(a.placeholder=e[1]),32&r&&(a.onFocus=e[5]),64&r&&(a.onBlur=e[6]),n.$set(a)},i(e){o||(te(t.$$.fragment,e),te(n.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),re(n.$$.fragment,e),o=!1},d(e){e&&g(r),ce(t,e),ce(n,e)}}}function js(e){let t,r,n,o=!e[7]&&Vs(e),a=(e[2]||e[7])&&Gs(e);return{c(){t=P("div"),o&&o.c(),r=E(),a&&a.c(),_(t,"class","zephr-form-account-code-container svelte-ctt9he")},m(e,i){y(e,t,i),o&&o.m(t,null),h(t,r),a&&a.m(t,null),n=!0},p(e,[n]){e[7]?o&&(X(),re(o,1,1,(()=>{o=null})),ee()):o?(o.p(e,n),128&n&&te(o,1)):(o=Vs(e),o.c(),te(o,1),o.m(t,r)),e[2]||e[7]?a?(a.p(e,n),132&n&&te(a,1)):(a=Gs(e),a.c(),te(a,1),a.m(t,null)):a&&(X(),re(a,1,1,(()=>{a=null})),ee())},i(e){n||(te(o),te(a),n=!0)},o(e){re(o),re(a),n=!1},d(e){e&&g(t),o&&o.d(),a&&a.d()}}}function qs(e,t,r){let{formKey:n}=t,{label:o}=t,{placeholder:a}=t,{accountMembershipCode:i}=t,{error:s=null}=t,{onChange:c}=t,{onFocus:l}=t,{onBlur:u}=t,p=!1;const d=`zephr-form-account-code-${n}`;return e.$$set=e=>{"formKey"in e&&r(9,n=e.formKey),"label"in e&&r(0,o=e.label),"placeholder"in e&&r(1,a=e.placeholder),"accountMembershipCode"in e&&r(2,i=e.accountMembershipCode),"error"in e&&r(3,s=e.error),"onChange"in e&&r(4,c=e.onChange),"onFocus"in e&&r(5,l=e.onFocus),"onBlur"in e&&r(6,u=e.onBlur)},[o,a,i,s,c,l,u,p,d,n,()=>r(7,p=!0),e=>c(e.detail)]}class Hs extends pe{constructor(e){super(),ue(this,e,qs,js,i,{formKey:9,label:0,placeholder:1,accountMembershipCode:2,error:3,onChange:4,onFocus:5,onBlur:6})}}const Ks={matches:e=>e.type===xe,create:(e,t,r,n)=>({component:Hs,props:{formKey:e.uniqueKey,label:n.label,placeholder:n.placeholder,accountMembershipCode:t.accountMembershipCode,onChange:n=>{r.updateFormState({accountMembershipCode:n,serverErrors:[]}),it(e,"zephr_form_input_change",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"})}})};function Ys(e){let t,r,n;return r=new Sa({props:{text:e[4]}}),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","zephr-form-invitation-success-message svelte-yy7ok3")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,t){const n={};16&t&&(n.text=e[4]),r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function Ws(e){let t,r,n,o,a,i,s,c,l,u,p,d,m,f,b,A;c=new Io({props:{forInput:e[14],label:e[2],isPaymentForm:e[11]}}),d=new To({props:{disabled:e[10],required:!0,id:e[14],value:e[7]??"",errorMessage:e[9],isPaymentForm:e[11],onFocus:e[12],onBlur:e[13]}}),d.$on("change",e[16]),f=new so({props:{disabled:!ca(e[7])||e[10],text:e[3],onClick:e[5],noMargin:!0,inputHeight:!0,aside:!0,isPaymentForm:e[11]}});let C=e[8]&&Ys(e);return{c(){t=P("div"),r=P("div"),n=S(e[0]),o=E(),a=P("div"),i=S(e[1]),s=E(),ie(c.$$.fragment),l=E(),u=P("div"),p=P("div"),ie(d.$$.fragment),m=E(),ie(f.$$.fragment),b=E(),C&&C.c(),_(r,"class","zephr-form-invitation-title svelte-yy7ok3"),_(a,"class","zephr-form-invitation-description"),_(p,"class","zephr-form-invitation-input-container svelte-yy7ok3"),_(u,"class","zephr-form-relative-container zephr-form-invitation-email svelte-yy7ok3"),N(u,"zephr-payment-form-relative-container",e[11]),_(t,"class","zephr-form-invitation-container svelte-yy7ok3")},m(e,g){y(e,t,g),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(t,s),se(c,t,null),h(t,l),h(t,u),h(u,p),se(d,p,null),h(u,m),se(f,u,null),h(t,b),C&&C.m(t,null),A=!0},p(e,[r]){(!A||1&r)&&I(n,e[0]),(!A||2&r)&&I(i,e[1]);const o={};4&r&&(o.label=e[2]),2048&r&&(o.isPaymentForm=e[11]),c.$set(o);const a={};1024&r&&(a.disabled=e[10]),128&r&&(a.value=e[7]??""),512&r&&(a.errorMessage=e[9]),2048&r&&(a.isPaymentForm=e[11]),4096&r&&(a.onFocus=e[12]),8192&r&&(a.onBlur=e[13]),d.$set(a);const s={};1152&r&&(s.disabled=!ca(e[7])||e[10]),8&r&&(s.text=e[3]),32&r&&(s.onClick=e[5]),2048&r&&(s.isPaymentForm=e[11]),f.$set(s),(!A||2048&r)&&N(u,"zephr-payment-form-relative-container",e[11]),e[8]?C?(C.p(e,r),256&r&&te(C,1)):(C=Ys(e),C.c(),te(C,1),C.m(t,null)):C&&(X(),re(C,1,1,(()=>{C=null})),ee())},i(e){A||(te(c.$$.fragment,e),te(d.$$.fragment,e),te(f.$$.fragment,e),te(C),A=!0)},o(e){re(c.$$.fragment,e),re(d.$$.fragment,e),re(f.$$.fragment,e),re(C),A=!1},d(e){e&&g(t),ce(c),ce(d),ce(f),C&&C.d()}}}function Js(e,t,r){let{formKey:n}=t,{title:o}=t,{description:a}=t,{label:i}=t,{btnText:s}=t,{linkSentText:c}=t,{onSendInviteClick:l}=t,{onChange:u}=t,{invitationEmail:p}=t,{invitationSent:d}=t,{error:m=null}=t,{isBusy:f}=t,{isPaymentForm:h=!1}=t,{onFocus:y}=t,{onBlur:g}=t;const b=`zephr-form-invitation-email-${n}`;return e.$$set=e=>{"formKey"in e&&r(15,n=e.formKey),"title"in e&&r(0,o=e.title),"description"in e&&r(1,a=e.description),"label"in e&&r(2,i=e.label),"btnText"in e&&r(3,s=e.btnText),"linkSentText"in e&&r(4,c=e.linkSentText),"onSendInviteClick"in e&&r(5,l=e.onSendInviteClick),"onChange"in e&&r(6,u=e.onChange),"invitationEmail"in e&&r(7,p=e.invitationEmail),"invitationSent"in e&&r(8,d=e.invitationSent),"error"in e&&r(9,m=e.error),"isBusy"in e&&r(10,f=e.isBusy),"isPaymentForm"in e&&r(11,h=e.isPaymentForm),"onFocus"in e&&r(12,y=e.onFocus),"onBlur"in e&&r(13,g=e.onBlur)},[o,a,i,s,c,l,u,p,d,m,f,h,y,g,b,n,({detail:e})=>u(e)]}class Qs extends pe{constructor(e){super(),ue(this,e,Js,Ws,i,{formKey:15,title:0,description:1,label:2,btnText:3,linkSentText:4,onSendInviteClick:5,onChange:6,invitationEmail:7,invitationSent:8,error:9,isBusy:10,isPaymentForm:11,onFocus:12,onBlur:13})}}const Zs=async(e,t,r)=>{let n;n=t.userExists?await(e=>lr("blaize/profile",{method:"GET"},e).then((e=>e.json())))(r):t.userAttributes;const o=((e,t)=>(e??[]).reduce(((e,r)=>{const n=t[r.attrSlug];return{...e,[r.fieldName]:n}}),{}))(Ot(e).invitationMetadata.mapping,n),a=await lr("zephr/public/products/v1/shares/invitations/emails",{method:"POST",bodyObject:{product_id:t.paymentOption.productId,email_address:t.invitationEmail,base_url:Ot(e).invitationMetadata.url,meta_data:o}},r),i=await a.json();if(a.ok)r.updateFormState({invitationSent:!0,invitationEmail:""}),setTimeout((()=>{r.updateFormState({invitationSent:!1})}),3e3);else{const t=(s=i,403===s?.status&&s?.message?.includes("you do not have access to")?tt.INVITATION_FAILED_NO_PRODUCT_ACCESS:400===s?.status&&s?.message?.includes("Invalid recipient email")?tt.INVITATION_FAILED_INVALID_EMAIL:400===s?.status&&s?.message?.includes("reached the configured limit")?tt.INVITATION_FAILED_LIMIT_REACHED:409===s?.status?tt.INVITATION_FAILED_DUPLICATE_EMAIL:tt.INVITATION_FAILED_UNKNOWN);it(e,"zephr_form_error",{error:tt[t]}),r.updateFormState({invitationSent:!1,serverErrors:[t]})}var s},Xs={matches:e=>e.type===Fe,create:(e,t,r,n)=>t.paymentOption?.product_sharing_limit>0?{component:Qs,props:{formKey:e.uniqueKey,title:n.title,description:n.description,label:n.label,btnText:n.btnText,linkSentText:n.linkSentText,onSendInviteClick:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),Zs(e,t,r)},onChange:n=>{r.updateFormState({invitationEmail:n,serverErrors:[]}),it(e,"zephr_form_input_change",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"}),invitationEmail:t.invitationEmail,invitationSent:t.invitationSent,isBusy:t.isBusy,isPaymentForm:e.formType===vt.PAYMENT}}:{component:null,props:{}}};class ec extends pe{constructor(e){super(),ue(this,e,null,null,i,{})}}const tc={matches:e=>e.type===Ce,create:(e,t,r)=>{const n=ro(e.organisationConfiguration.paymentProvider);if(null==n.preLoaderComponent)return{component:ec,props:{}};return{component:n.preLoaderComponent(Ot(e).paymentProviderFormConfig),props:{onMountCallback:()=>n.preLoader()}}}};function rc(t){let r;return{c(){r=P("div")},m(e,n){y(e,r,n),r.innerHTML=t[0]},p(e,[t]){1&t&&(r.innerHTML=e[0])},i:e,o:e,d(e){e&&g(r)}}}function nc(e,t,r){let{html:n}=t;return e.$$set=e=>{"html"in e&&r(0,n=e.html)},[n]}class oc extends pe{constructor(e){super(),ue(this,e,nc,rc,i,{html:0})}}const ac=()=>(Math.random()+1).toString(36).substring(7),ic=ac(),sc=e=>e.dynamicOfferResult?Object.entries({tagline:e.dynamicOfferResult.tagline,...e.dynamicOfferResult.custom??{}}).reduce(((e,[t,r])=>(t&&null!=r&&(e[t]=r),e)),{}):{},cc=(e,t)=>(e.templateVariables??[]).reduce(((e,r)=>null==r.defaultValue||r.paymentOptionLevel!=t?e:{...e,[r.key]:r.defaultValue}),{}),lc=e=>{window.Zephr||(window.Zephr={}),window.Zephr.forms||(window.Zephr.forms={}),window.Zephr.forms[e.formInstanceId]=e},uc=(e,t,r,n,o,a)=>{if(!o)return{scope:{},actions:{}};try{const i=new Function("state","form","scope",o),s=(t.customComponentState??{})[r.id??"_"];return i(t.dynamicOfferResult?{...s??{},dynamicOfferResult:Sn(t.dynamicOfferResult,e,t)}:s,n,a)}catch(e){return console.error("Error evaluating pre-render script",e),{scope:{error:e},actions:{}}}},pc=(e,t,r)=>n=>{t.updateFormState({customComponentState:{...e.customComponentState??{},[r]:{...(e.customComponentState??{})[r]??{},...n??{}}}})},dc=(e,t,r,n)=>(o,a)=>{let i;if(n){const e=r.dynamicOfferResult.products.find((e=>e.id===o)),t=e?.paymentPlans.find((e=>e.planId===a));i={slug:t.planId,productId:e.id,label:e.label,currencyCode:t.charges[0].prices[0].currency}}else i=Ot(e).paymentOptions?.find((e=>e.productId===o&&e.slug===a));i?(t.updateFormState({paymentOption:i,serverErrors:[],billingAddress:{country:null,postalCode:null}}),t.completeSection()):console.warn(`No payment option exists for ${o} ${a}.`)},mc=(e,t,r,n,o)=>{const a=!!Ot(e).dynamicOffer?.id,i=(Ot(e).paymentOptions??[]).map(((e,t)=>({slug:e.slug,productId:e.productId,label:e.label,price:e.price,currencyCode:e.currencyCode,formattedPrice:ln(e.price,e.currencyCode),index:t,...cc(o,!0),...e.templateValues??{}})));return{formId:e.id,formInstanceId:ic,paymentOptions:i,ref:`window.Zephr.forms['${ic}']`,setState:pc(t,r,n.id??"_"),getState:()=>r.getFormState(),selectPaymentOption:dc(e,r,t,a)}},fc={matches:e=>e.type===ze,create:(e,t,r,n)=>{const o=((e,t,r,n)=>{const o=(e.resolvedComponentTemplates??[]).find((e=>e.id===n.templateId));if(!o)return console.warn(`No component template found for id '${n.templateId}'`),"";const a=mc(e,t,r,n,o),i={...cc(o,!1),...n.templateValues??{},...sc(t),zephrForm:a,zephrOutcomeId:e.outcomeId,zephrRuleId:e.ruleId},s=uc(e,t,n,a,o.preRenderScript,i),c={...i,...s.scope??{}};a.actions=s.actions??{},lc(a);try{return qr.render(`\n        ${o.css?`<style>${o.css}</style>`:""}\n        ${o.html??""}\n        `,c)}catch(e){return console.error("Error rendering mustache template",e),""}})(e,t,r,n);return{component:oc,props:{html:o}}}};function hc(e){let t,r,n,o=e[0].planLabel+"";return{c(){t=P("div"),r=P("h3"),n=S(o),_(t,"class","plan-label")},m(e,o){y(e,t,o),h(t,r),h(r,n)},p(e,t){1&t&&o!==(o=e[0].planLabel+"")&&I(n,o)},d(e){e&&g(t)}}}function yc(e){let t,r,n,o,a,i,s,c,l=e[0].amount+"";return{c(){t=P("hr"),r=E(),n=P("div"),o=P("div"),a=S(e[2]),i=E(),s=P("div"),c=S(l),_(t,"class","svelte-1ecrab7"),_(o,"class","info-label svelte-1ecrab7"),_(s,"class","info svelte-1ecrab7"),_(n,"class","info-row svelte-1ecrab7")},m(e,l){y(e,t,l),y(e,r,l),y(e,n,l),h(n,o),h(o,a),h(n,i),h(n,s),h(s,c)},p(e,t){4&t&&I(a,e[2]),1&t&&l!==(l=e[0].amount+"")&&I(c,l)},d(e){e&&(g(t),g(r),g(n))}}}function gc(e){let t,r,n,o,a,i,s,c,l=e[0].nextBillingTime+"";return{c(){t=P("hr"),r=E(),n=P("div"),o=P("div"),a=S(e[3]),i=E(),s=P("div"),c=S(l),_(t,"class","svelte-1ecrab7"),_(o,"class","info-label svelte-1ecrab7"),_(s,"class","info svelte-1ecrab7"),_(n,"class","info-row svelte-1ecrab7")},m(e,l){y(e,t,l),y(e,r,l),y(e,n,l),h(n,o),h(o,a),h(n,i),h(n,s),h(s,c)},p(e,t){8&t&&I(a,e[3]),1&t&&l!==(l=e[0].nextBillingTime+"")&&I(c,l)},d(e){e&&(g(t),g(r),g(n))}}}function bc(e){let t;return{c(){t=P("div"),_(t,"class","change-disabled-label svelte-1ecrab7")},m(r,n){y(r,t,n),t.innerHTML=e[4]},p(e,r){16&r&&(t.innerHTML=e[4])},d(e){e&&g(t)}}}function Pc(e){let t,r,n,o,i,s,c,l,u,p,d,m,f,b,A,C,O=e[0].productLabel+"",w=e[0].planLabel&&hc(e),R=e[0].amount&&e[2]&&yc(e),$=e[0].nextBillingTime&&e[3]&&gc(e);d=new so({props:{disabled:e[0].cannotBeChanged,text:e[1]??"Select",onClick:e[5]}});let M=e[0].cannotBeChanged&&bc(e);return{c(){t=P("div"),r=P("div"),n=P("div"),o=P("div"),i=P("h2"),s=S(O),c=E(),w&&w.c(),l=E(),R&&R.c(),u=E(),$&&$.c(),p=E(),ie(d.$$.fragment),m=E(),M&&M.c(),_(o,"class","subscription-option-product-label"),_(n,"class","inner-box svelte-1ecrab7"),_(r,"class","subscription-option-box"),_(r,"aria-hidden","true"),_(r,"style",f=e[0].cannotBeChanged?"":"cursor: pointer;"),_(t,"class","subscription-option-wrapper svelte-1ecrab7")},m(f,g){var P;y(f,t,g),h(t,r),h(r,n),h(n,o),h(o,i),h(i,s),h(n,c),w&&w.m(n,null),h(n,l),R&&R.m(n,null),h(n,u),$&&$.m(n,null),h(n,p),se(d,n,null),h(n,m),M&&M.m(n,null),b=!0,A||(C=v(r,"click",(P=T((function(){a(e[5])&&e[5].apply(this,arguments)})),function(e){e.target===this&&P.call(this,e)})),A=!0)},p(t,[o]){e=t,(!b||1&o)&&O!==(O=e[0].productLabel+"")&&I(s,O),e[0].planLabel?w?w.p(e,o):(w=hc(e),w.c(),w.m(n,l)):w&&(w.d(1),w=null),e[0].amount&&e[2]?R?R.p(e,o):(R=yc(e),R.c(),R.m(n,u)):R&&(R.d(1),R=null),e[0].nextBillingTime&&e[3]?$?$.p(e,o):($=gc(e),$.c(),$.m(n,p)):$&&($.d(1),$=null);const a={};1&o&&(a.disabled=e[0].cannotBeChanged),2&o&&(a.text=e[1]??"Select"),32&o&&(a.onClick=e[5]),d.$set(a),e[0].cannotBeChanged?M?M.p(e,o):(M=bc(e),M.c(),M.m(n,null)):M&&(M.d(1),M=null),(!b||1&o&&f!==(f=e[0].cannotBeChanged?"":"cursor: pointer;"))&&_(r,"style",f)},i(e){b||(te(d.$$.fragment,e),b=!0)},o(e){re(d.$$.fragment,e),b=!1},d(e){e&&g(t),w&&w.d(),R&&R.d(),$&&$.d(),ce(d),M&&M.d(),A=!1,C()}}}function Ac(e,t,r){let{subscription:n}=t,{selectButtonText:o}=t,{amountLabel:a}=t,{nextBillingDateLabel:i}=t,{noChangePlanMappingMessage:s}=t,{onSelect:c}=t;return e.$$set=e=>{"subscription"in e&&r(0,n=e.subscription),"selectButtonText"in e&&r(1,o=e.selectButtonText),"amountLabel"in e&&r(2,a=e.amountLabel),"nextBillingDateLabel"in e&&r(3,i=e.nextBillingDateLabel),"noChangePlanMappingMessage"in e&&r(4,s=e.noChangePlanMappingMessage),"onSelect"in e&&r(5,c=e.onSelect)},[n,o,a,i,s,c]}class Sc extends pe{constructor(e){super(),ue(this,e,Ac,Pc,i,{subscription:0,selectButtonText:1,amountLabel:2,nextBillingDateLabel:3,noChangePlanMappingMessage:4,onSelect:5})}}function Ec(e,t,r){const n=e.slice();return n[8]=t[r],n}function Cc(e){let t,r;return t=new Qt({}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function vc(e){let t;return{c(){t=P("div")},m(r,n){y(r,t,n),t.innerHTML=e[0]},p(e,r){1&r&&(t.innerHTML=e[0])},d(e){e&&g(t)}}}function Tc(e){let t,r;function n(){return e[7](e[8])}return t=new Sc({props:{subscription:e[8],selectButtonText:e[5],noChangePlanMappingMessage:e[1],amountLabel:e[3],nextBillingDateLabel:e[4],onSelect:n}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(r,o){e=r;const a={};4&o&&(a.subscription=e[8]),32&o&&(a.selectButtonText=e[5]),2&o&&(a.noChangePlanMappingMessage=e[1]),8&o&&(a.amountLabel=e[3]),16&o&&(a.nextBillingDateLabel=e[4]),68&o&&(a.onSelect=n),t.$set(a)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function _c(e){let t,r,n,o,a=null==e[2]&&Cc(),i=null!=e[2]&&!e[2].length&&vc(e),s=ne(e[2]??[]),c=[];for(let t=0;t<s.length;t+=1)c[t]=Tc(Ec(e,s,t));const l=e=>re(c[e],1,1,(()=>{c[e]=null}));return{c(){t=P("div"),a&&a.c(),r=E(),i&&i.c(),n=E();for(let e=0;e<c.length;e+=1)c[e].c();_(t,"class","subscription-options-container svelte-1nzbr4y")},m(e,s){y(e,t,s),a&&a.m(t,null),h(t,r),i&&i.m(t,null),h(t,n);for(let e=0;e<c.length;e+=1)c[e]&&c[e].m(t,null);o=!0},p(e,[o]){if(null==e[2]?a?4&o&&te(a,1):(a=Cc(),a.c(),te(a,1),a.m(t,r)):a&&(X(),re(a,1,1,(()=>{a=null})),ee()),null==e[2]||e[2].length?i&&(i.d(1),i=null):i?i.p(e,o):(i=vc(e),i.c(),i.m(t,n)),126&o){let r;for(s=ne(e[2]??[]),r=0;r<s.length;r+=1){const n=Ec(e,s,r);c[r]?(c[r].p(n,o),te(c[r],1)):(c[r]=Tc(n),c[r].c(),te(c[r],1),c[r].m(t,null))}for(X(),r=s.length;r<c.length;r+=1)l(r);ee()}},i(e){if(!o){te(a);for(let e=0;e<s.length;e+=1)te(c[e]);o=!0}},o(e){re(a),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)re(c[e]);o=!1},d(e){e&&g(t),a&&a.d(),i&&i.d(),b(c,e)}}}function Oc(e,t,r){let{noSubscriptionsMessage:n}=t,{noChangePlanMappingMessage:o}=t,{subscriptions:a}=t,{amountLabel:i}=t,{nextBillingDateLabel:s}=t,{selectButtonText:c}=t,{onSelect:l}=t;return e.$$set=e=>{"noSubscriptionsMessage"in e&&r(0,n=e.noSubscriptionsMessage),"noChangePlanMappingMessage"in e&&r(1,o=e.noChangePlanMappingMessage),"subscriptions"in e&&r(2,a=e.subscriptions),"amountLabel"in e&&r(3,i=e.amountLabel),"nextBillingDateLabel"in e&&r(4,s=e.nextBillingDateLabel),"selectButtonText"in e&&r(5,c=e.selectButtonText),"onSelect"in e&&r(6,l=e.onSelect)},[n,o,a,i,s,c,l,e=>l(e)]}class wc extends pe{constructor(e){super(),ue(this,e,Oc,_c,i,{noSubscriptionsMessage:0,noChangePlanMappingMessage:1,subscriptions:2,amountLabel:3,nextBillingDateLabel:4,selectButtonText:5,onSelect:6})}}const Ic={matches:e=>e.type===ke,create:(e,t,r,n)=>({component:wc,props:{noSubscriptionsMessage:n.noSubscriptionsMessage,selectButtonText:n.selectButtonText,noChangePlanMappingMessage:n.noChangePlanMappingMessage,amountLabel:n.amountLabel,nextBillingDateLabel:n.nextBillingDateLabel,subscriptions:t.existingSubscriptions?t.existingSubscriptions.filter((e=>"inactive"!==e.status)):null,onSelect:n=>{r.updateFormState({selectedSubscription:n}),it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.completeSection()}}})};function Rc(e){let t,r,n,o,a,i,s,c=e[4]&&$c(e);return{c(){t=P("div"),r=P("div"),n=S(e[3]),o=E(),c&&c.c(),a=E(),i=P("hr"),_(r,"class","information"),_(t,"class","section"),_(i,"class","svelte-1wg9q7")},m(e,l){y(e,t,l),h(t,r),h(r,n),h(r,o),c&&c.m(r,null),y(e,a,l),y(e,i,l),s=!0},p(e,t){(!s||8&t)&&I(n,e[3]),e[4]?c?(c.p(e,t),16&t&&te(c,1)):(c=$c(e),c.c(),te(c,1),c.m(r,null)):c&&(X(),re(c,1,1,(()=>{c=null})),ee())},i(e){s||(te(c),s=!0)},o(e){re(c),s=!1},d(e){e&&(g(t),g(a),g(i)),c&&c.d()}}}function $c(e){let t,r;return t=new Si({props:{text:e[4]}}),t.$on("linkClick",e[7]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};16&r&&(n.text=e[4]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Mc(e){let t,r,n,o,a,i,s,c,l=e[0].nextBillingTime+"";return{c(){t=P("div"),r=P("h3"),n=S(e[1]),o=E(),a=P("div"),i=S(l),s=E(),c=P("hr"),_(r,"class","svelte-1wg9q7"),_(a,"class","information"),_(t,"class","section"),_(c,"class","svelte-1wg9q7")},m(e,l){y(e,t,l),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),y(e,s,l),y(e,c,l)},p(e,t){2&t&&I(n,e[1]),1&t&&l!==(l=e[0].nextBillingTime+"")&&I(i,l)},d(e){e&&(g(t),g(s),g(c))}}}function Nc(e){let t,r,n,o,a,i,s,c,l=e[0].amount+"";return{c(){t=P("div"),r=P("h3"),n=S(e[2]),o=E(),a=P("div"),i=S(l),s=E(),c=P("hr"),_(r,"class","svelte-1wg9q7"),_(a,"class","information"),_(t,"class","section"),_(c,"class","svelte-1wg9q7")},m(e,l){y(e,t,l),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),y(e,s,l),y(e,c,l)},p(e,t){4&t&&I(n,e[2]),1&t&&l!==(l=e[0].amount+"")&&I(i,l)},d(e){e&&(g(t),g(s),g(c))}}}function xc(e){let t,r,n,o,a,i,s,c,l,u,p,d,m=e[0].productLabel+"",b=e[6]&&Rc(e),A="active"===e[0].status&&e[0].nextBillingTime&&Mc(e),C=e[0].amount&&Nc(e);return{c(){t=P("div"),r=P("div"),n=P("div"),o=P("h2"),a=S(m),s=E(),c=P("hr"),l=E(),b&&b.c(),u=E(),A&&A.c(),p=E(),C&&C.c(),_(o,"class",i=f("inactive"===e[0].status?"inactive":"")+" svelte-1wg9q7"),_(n,"class","section"),_(c,"class","svelte-1wg9q7"),_(r,"class","inner-box svelte-1wg9q7"),_(t,"class","subscription-list-item svelte-1wg9q7")},m(e,i){y(e,t,i),h(t,r),h(r,n),h(n,o),h(o,a),h(r,s),h(r,c),h(r,l),b&&b.m(r,null),h(r,u),A&&A.m(r,null),h(r,p),C&&C.m(r,null),d=!0},p(e,[t]){(!d||1&t)&&m!==(m=e[0].productLabel+"")&&I(a,m),(!d||1&t&&i!==(i=f("inactive"===e[0].status?"inactive":"")+" svelte-1wg9q7"))&&_(o,"class",i),e[6]?b?(b.p(e,t),64&t&&te(b,1)):(b=Rc(e),b.c(),te(b,1),b.m(r,u)):b&&(X(),re(b,1,1,(()=>{b=null})),ee()),"active"===e[0].status&&e[0].nextBillingTime?A?A.p(e,t):(A=Mc(e),A.c(),A.m(r,p)):A&&(A.d(1),A=null),e[0].amount?C?C.p(e,t):(C=Nc(e),C.c(),C.m(r,null)):C&&(C.d(1),C=null)},i(e){d||(te(b),d=!0)},o(e){re(b),d=!1},d(e){e&&g(t),b&&b.d(),A&&A.d(),C&&C.d()}}}function Lc(e,t,r){let{subscription:n}=t,{nextPaymentDateText:o}=t,{subscriptionRateText:a}=t,{billingHistoryText:i}=t,{billingHistoryLink:s}=t,{onViewHistory:c}=t,{showBillingHistory:l}=t;return e.$$set=e=>{"subscription"in e&&r(0,n=e.subscription),"nextPaymentDateText"in e&&r(1,o=e.nextPaymentDateText),"subscriptionRateText"in e&&r(2,a=e.subscriptionRateText),"billingHistoryText"in e&&r(3,i=e.billingHistoryText),"billingHistoryLink"in e&&r(4,s=e.billingHistoryLink),"onViewHistory"in e&&r(5,c=e.onViewHistory),"showBillingHistory"in e&&r(6,l=e.showBillingHistory)},[n,o,a,i,s,c,l,()=>c(n)]}class Fc extends pe{constructor(e){super(),ue(this,e,Lc,xc,i,{subscription:0,nextPaymentDateText:1,subscriptionRateText:2,billingHistoryText:3,billingHistoryLink:4,onViewHistory:5,showBillingHistory:6})}}function zc(t){let r,n,o,a,i,s,c,l,u;return{c(){r=P("a"),n=P("span"),o=S(t[0]),a=E(),i=A("svg"),s=A("path"),_(s,"fill","currentColor"),_(s,"d","M305 239c9.4 9.4 9.4 24.6 0 33.9L113 465c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l175-175L79 81c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L305 239z"),_(i,"aria-hidden","true"),_(i,"focusable","false"),_(i,"data-prefix","far"),_(i,"data-icon","chevron-right"),_(i,"class","svg-inline--fa fa-chevron-right sc-egTsrv kzAurc"),_(i,"role","img"),_(i,"xmlns","http://www.w3.org/2000/svg"),_(i,"viewBox","0 0 320 512"),_(i,"width","16"),_(i,"height","16"),_(r,"class","zephr-form-tablink svelte-ky9lgg"),_(r,"href",c=!t[1]||window.Zephr&&window.Zephr.isCustomPage&&t[1].startsWith(window.Zephr.customPagePath)?"javascript: void(0)":t[1])},m(e,c){y(e,r,c),h(r,n),h(n,o),h(r,a),h(r,i),h(i,s),l||(u=v(r,"click",t[4]),l=!0)},p(e,[t]){1&t&&I(o,e[0]),2&t&&c!==(c=!e[1]||window.Zephr&&window.Zephr.isCustomPage&&e[1].startsWith(window.Zephr.customPagePath)?"javascript: void(0)":e[1])&&_(r,"href",c)},i:e,o:e,d(e){e&&g(r),l=!1,u()}}}function kc(e,t,r){let{text:n}=t,{path:o=""}=t,{onClick:a=(()=>{})}=t,{logDlEvent:i=(()=>{})}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"path"in e&&r(1,o=e.path),"onClick"in e&&r(2,a=e.onClick),"logDlEvent"in e&&r(3,i=e.logDlEvent)},[n,o,a,i,()=>{i?.(),window.Zephr&&window.Zephr.isCustomPage&&o.startsWith(window.Zephr.customPagePath)?window.history.pushState({},"",o):a()}]}class Dc extends pe{constructor(e){super(),ue(this,e,kc,zc,i,{text:0,path:1,onClick:2,logDlEvent:3})}}function Bc(e,t,r){const n=e.slice();return n[20]=t[r],n[22]=r,n}function Uc(e){let t,r,n=ne(e[13]),o=[];for(let t=0;t<n.length;t+=1)o[t]=el(Bc(e,n,t));const a=e=>re(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=C()},m(e,n){for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,n);y(e,t,n),r=!0},p(e,r){if(32767&r){let i;for(n=ne(e[13]),i=0;i<n.length;i+=1){const a=Bc(e,n,i);o[i]?(o[i].p(a,r),te(o[i],1)):(o[i]=el(a),o[i].c(),te(o[i],1),o[i].m(t.parentNode,t))}for(X(),i=n.length;i<o.length;i+=1)a(i);ee()}},i(e){if(!r){for(let e=0;e<n.length;e+=1)te(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)re(o[e]);r=!1},d(e){e&&g(t),b(o,e)}}}function Vc(t){let r,n=t[0].amount&&tl(t);return{c(){n&&n.c(),r=C()},m(e,t){n&&n.m(e,t),y(e,r,t)},p(e,t){e[0].amount?n?n.p(e,t):(n=tl(e),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d(e)}}}function Gc(e){let t,r,n=e[0].amount&&jc(e),o="active"===e[0].status&&e[0].nextBillingTime&&qc(e);return{c(){n&&n.c(),t=E(),o&&o.c(),r=C()},m(e,a){n&&n.m(e,a),y(e,t,a),o&&o.m(e,a),y(e,r,a)},p(e,a){e[0].amount?n?n.p(e,a):(n=jc(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),"active"===e[0].status&&e[0].nextBillingTime?o?o.p(e,a):(o=qc(e),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},d(e){e&&(g(t),g(r)),n&&n.d(e),o&&o.d(e)}}}function jc(e){let t,r,n,o,a,i,s=e[0].amount+"";return{c(){t=P("div"),r=P("span"),n=S(e[2]),o=E(),a=P("div"),i=S(s),_(r,"class","svelte-h57nmp"),_(a,"class","zephr-box-item-information svelte-h57nmp"),_(t,"class","zephr-section svelte-h57nmp")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i)},p(e,t){4&t&&I(n,e[2]),1&t&&s!==(s=e[0].amount+"")&&I(i,s)},d(e){e&&g(t)}}}function qc(e){let t,r,n,o,a,i,s=e[0].nextBillingTime+"";return{c(){t=P("div"),r=P("span"),n=S(e[1]),o=E(),a=P("div"),i=S(s),_(r,"class","svelte-h57nmp"),_(a,"class","zephr-box-item-information svelte-h57nmp"),_(t,"class","zephr-section svelte-h57nmp")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i)},p(e,t){2&t&&I(n,e[1]),1&t&&s!==(s=e[0].nextBillingTime+"")&&I(i,s)},d(e){e&&g(t)}}}function Hc(e){let t,r,n=e[3]&&Kc(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,r){e[3]?n?(n.p(e,r),8&r&&te(n,1)):(n=Kc(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Kc(e){let t,r;return t=new Dc({props:{text:e[3],onClick:e[16]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.text=e[3]),17&r&&(n.onClick=e[16]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Yc(e){let t,r,n=e[8]&&Wc(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,r){e[8]?n?(n.p(e,r),256&r&&te(n,1)):(n=Wc(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Wc(e){let t,r;return t=new Dc({props:{text:e[8],onClick:e[17]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};256&r&&(n.text=e[8]),33&r&&(n.onClick=e[17]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Jc(e){let t,r,n=e[9]&&Qc(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,r){e[9]?n?(n.p(e,r),512&r&&te(n,1)):(n=Qc(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Qc(e){let t,r;return t=new Dc({props:{text:e[9],path:`${e[11]}?subscription=${e[0].externalId}`,logDlEvent:e[18]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};512&r&&(n.text=e[9]),2049&r&&(n.path=`${e[11]}?subscription=${e[0].externalId}`),65&r&&(n.logDlEvent=e[18]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Zc(e){let t,r,n=e[10]&&Xc(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,r){e[10]?n?(n.p(e,r),1024&r&&te(n,1)):(n=Xc(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Xc(e){let t,r;return t=new Dc({props:{text:e[10],path:`${e[12]}?subscription=${e[0].externalId}`,logDlEvent:e[19]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1024&r&&(n.text=e[10]),4097&r&&(n.path=`${e[12]}?subscription=${e[0].externalId}`),129&r&&(n.logDlEvent=e[19]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function el(e){let t,r,n,o,a,i,s="subscription_information"===e[20]&&!e[14].subscriptionInformation&&Gc(e),c="billing_history"===e[20]&&!e[14].billingHistory&&Hc(e),l="change_payment"===e[20]&&!e[14].changePayment&&Yc(e),u="change_subscription"===e[20]&&!e[14].changeSubscription&&Jc(e),p="cancel_subscription"===e[20]&&!e[14].cancelSubscription&&Zc(e);return{c(){s&&s.c(),t=E(),c&&c.c(),r=E(),l&&l.c(),n=E(),u&&u.c(),o=E(),p&&p.c(),a=C()},m(e,d){s&&s.m(e,d),y(e,t,d),c&&c.m(e,d),y(e,r,d),l&&l.m(e,d),y(e,n,d),u&&u.m(e,d),y(e,o,d),p&&p.m(e,d),y(e,a,d),i=!0},p(e,i){"subscription_information"!==e[20]||e[14].subscriptionInformation?s&&(s.d(1),s=null):s?s.p(e,i):(s=Gc(e),s.c(),s.m(t.parentNode,t)),"billing_history"!==e[20]||e[14].billingHistory?c&&(X(),re(c,1,1,(()=>{c=null})),ee()):c?(c.p(e,i),24576&i&&te(c,1)):(c=Hc(e),c.c(),te(c,1),c.m(r.parentNode,r)),"change_payment"!==e[20]||e[14].changePayment?l&&(X(),re(l,1,1,(()=>{l=null})),ee()):l?(l.p(e,i),24576&i&&te(l,1)):(l=Yc(e),l.c(),te(l,1),l.m(n.parentNode,n)),"change_subscription"!==e[20]||e[14].changeSubscription?u&&(X(),re(u,1,1,(()=>{u=null})),ee()):u?(u.p(e,i),24576&i&&te(u,1)):(u=Jc(e),u.c(),te(u,1),u.m(o.parentNode,o)),"cancel_subscription"!==e[20]||e[14].cancelSubscription?p&&(X(),re(p,1,1,(()=>{p=null})),ee()):p?(p.p(e,i),24576&i&&te(p,1)):(p=Zc(e),p.c(),te(p,1),p.m(a.parentNode,a))},i(e){i||(te(c),te(l),te(u),te(p),i=!0)},o(e){re(c),re(l),re(u),re(p),i=!1},d(e){e&&(g(t),g(r),g(n),g(o),g(a)),s&&s.d(e),c&&c.d(e),l&&l.d(e),u&&u.d(e),p&&p.d(e)}}}function tl(e){let t,r,n,o,a,i,s=e[0].amount+"";return{c(){t=P("div"),r=P("span"),n=S(e[2]),o=E(),a=P("div"),i=S(s),_(r,"class","svelte-h57nmp"),_(a,"class","zephr-box-item-information svelte-h57nmp"),_(t,"class","zephr-section svelte-h57nmp")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i)},p(e,t){4&t&&I(n,e[2]),1&t&&s!==(s=e[0].amount+"")&&I(i,s)},d(e){e&&g(t)}}}function rl(e){let t,r,n,o,a,i,s,c,l,u=e[0].productLabel+"";const p=[Vc,Uc],d=[];function m(e,t){return e[15]?0:1}return s=m(e),c=d[s]=p[s](e),{c(){t=P("div"),r=P("div"),n=P("div"),o=P("h2"),a=S(u),i=E(),c.c(),_(o,"class","svelte-h57nmp"),_(n,"class","zephr-section svelte-h57nmp"),_(r,"class","zephr-inner-box svelte-h57nmp"),_(t,"class","zephr-subscription-list-box-item svelte-h57nmp")},m(e,c){y(e,t,c),h(t,r),h(r,n),h(n,o),h(o,a),h(r,i),d[s].m(r,null),l=!0},p(e,[t]){(!l||1&t)&&u!==(u=e[0].productLabel+"")&&I(a,u);let n=s;s=m(e),s===n?d[s].p(e,t):(X(),re(d[n],1,1,(()=>{d[n]=null})),ee(),c=d[s],c?c.p(e,t):(c=d[s]=p[s](e),c.c()),te(c,1),c.m(r,null))},i(e){l||(te(c),l=!0)},o(e){re(c),l=!1},d(e){e&&g(t),d[s].d()}}}function nl(e,t,r){let{subscription:n}=t,{nextPaymentDateText:o}=t,{subscriptionRateText:a}=t,{billingHistoryLink:i}=t,{onViewHistory:s}=t,{onChangePayment:c}=t,{logChangeSubscription:l}=t,{logCancelSubscription:u}=t,{changePaymentMethodText:p}=t,{changeSubscriptionText:d}=t,{cancelSubscriptionText:m}=t,{changeSubscriptionPath:f}=t,{cancelSubscriptionPath:h}=t,{elementsOrder:y}=t,{elementsHide:g}=t,{isInactive:b=!1}=t;return e.$$set=e=>{"subscription"in e&&r(0,n=e.subscription),"nextPaymentDateText"in e&&r(1,o=e.nextPaymentDateText),"subscriptionRateText"in e&&r(2,a=e.subscriptionRateText),"billingHistoryLink"in e&&r(3,i=e.billingHistoryLink),"onViewHistory"in e&&r(4,s=e.onViewHistory),"onChangePayment"in e&&r(5,c=e.onChangePayment),"logChangeSubscription"in e&&r(6,l=e.logChangeSubscription),"logCancelSubscription"in e&&r(7,u=e.logCancelSubscription),"changePaymentMethodText"in e&&r(8,p=e.changePaymentMethodText),"changeSubscriptionText"in e&&r(9,d=e.changeSubscriptionText),"cancelSubscriptionText"in e&&r(10,m=e.cancelSubscriptionText),"changeSubscriptionPath"in e&&r(11,f=e.changeSubscriptionPath),"cancelSubscriptionPath"in e&&r(12,h=e.cancelSubscriptionPath),"elementsOrder"in e&&r(13,y=e.elementsOrder),"elementsHide"in e&&r(14,g=e.elementsHide),"isInactive"in e&&r(15,b=e.isInactive)},[n,o,a,i,s,c,l,u,p,d,m,f,h,y,g,b,()=>s(n),()=>c(n),()=>l(n),()=>u(n)]}class ol extends pe{constructor(e){super(),ue(this,e,nl,rl,i,{subscription:0,nextPaymentDateText:1,subscriptionRateText:2,billingHistoryLink:3,onViewHistory:4,onChangePayment:5,logChangeSubscription:6,logCancelSubscription:7,changePaymentMethodText:8,changeSubscriptionText:9,cancelSubscriptionText:10,changeSubscriptionPath:11,cancelSubscriptionPath:12,elementsOrder:13,elementsHide:14,isInactive:15})}}function al(e,t,r){const n=e.slice();return n[22]=t[r],n}function il(e,t,r){const n=e.slice();return n[22]=t[r],n}function sl(e){let t,r;return t=new Qt({}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function cl(e){let t,r,n,o=!e[10]&&!e[6].length&&ll(e),a=ne(e[6]),i=[];for(let t=0;t<a.length;t+=1)i[t]=ml(il(e,a,t));const s=e=>re(i[e],1,1,(()=>{i[e]=null}));return{c(){o&&o.c(),t=E();for(let e=0;e<i.length;e+=1)i[e].c();r=C()},m(e,a){o&&o.m(e,a),y(e,t,a);for(let t=0;t<i.length;t+=1)i[t]&&i[t].m(e,a);y(e,r,a),n=!0},p(e,n){if(e[10]||e[6].length?o&&(o.d(1),o=null):o?o.p(e,n):(o=ll(e),o.c(),o.m(t.parentNode,t)),2095996&n){let t;for(a=ne(e[6]),t=0;t<a.length;t+=1){const o=il(e,a,t);i[t]?(i[t].p(o,n),te(i[t],1)):(i[t]=ml(o),i[t].c(),te(i[t],1),i[t].m(r.parentNode,r))}for(X(),t=a.length;t<i.length;t+=1)s(t);ee()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)te(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)re(i[e]);n=!1},d(e){e&&(g(t),g(r)),o&&o.d(e),b(i,e)}}}function ll(e){let t;return{c(){t=P("div")},m(r,n){y(r,t,n),t.innerHTML=e[1]},p(e,r){2&r&&(t.innerHTML=e[1])},d(e){e&&g(t)}}}function ul(e){let t,r,n,o;t=new Fc({props:{subscription:e[22],nextPaymentDateText:e[4],subscriptionRateText:e[5],billingHistoryText:e[2],billingHistoryLink:e[3],onViewHistory:e[14],showBillingHistory:"zuora-billing"!==e[8]}});let a="zuora-billing"!==e[8]&&"active"===e[22].status&&dl(e);return{c(){ie(t.$$.fragment),r=E(),a&&a.c(),n=C()},m(e,i){se(t,e,i),y(e,r,i),a&&a.m(e,i),y(e,n,i),o=!0},p(e,r){const o={};64&r&&(o.subscription=e[22]),16&r&&(o.nextPaymentDateText=e[4]),32&r&&(o.subscriptionRateText=e[5]),4&r&&(o.billingHistoryText=e[2]),8&r&&(o.billingHistoryLink=e[3]),16384&r&&(o.onViewHistory=e[14]),256&r&&(o.showBillingHistory="zuora-billing"!==e[8]),t.$set(o),"zuora-billing"!==e[8]&&"active"===e[22].status?a?(a.p(e,r),320&r&&te(a,1)):(a=dl(e),a.c(),te(a,1),a.m(n.parentNode,n)):a&&(X(),re(a,1,1,(()=>{a=null})),ee())},i(e){o||(te(t.$$.fragment,e),te(a),o=!0)},o(e){re(t.$$.fragment,e),re(a),o=!1},d(e){e&&(g(r),g(n)),ce(t,e),a&&a.d(e)}}}function pl(e){let t,r;return t=new ol({props:{subscription:e[22],nextPaymentDateText:e[4],subscriptionRateText:e[5],billingHistoryLink:e[3],onViewHistory:e[14],onChangePayment:e[11],logChangeSubscription:e[12],logCancelSubscription:e[13],changePaymentMethodText:e[9],changeSubscriptionText:e[15],cancelSubscriptionText:e[16],changeSubscriptionPath:e[17],cancelSubscriptionPath:e[18],elementsOrder:e[19],elementsHide:e[20]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};64&r&&(n.subscription=e[22]),16&r&&(n.nextPaymentDateText=e[4]),32&r&&(n.subscriptionRateText=e[5]),8&r&&(n.billingHistoryLink=e[3]),16384&r&&(n.onViewHistory=e[14]),2048&r&&(n.onChangePayment=e[11]),4096&r&&(n.logChangeSubscription=e[12]),8192&r&&(n.logCancelSubscription=e[13]),512&r&&(n.changePaymentMethodText=e[9]),32768&r&&(n.changeSubscriptionText=e[15]),65536&r&&(n.cancelSubscriptionText=e[16]),131072&r&&(n.changeSubscriptionPath=e[17]),262144&r&&(n.cancelSubscriptionPath=e[18]),524288&r&&(n.elementsOrder=e[19]),1048576&r&&(n.elementsHide=e[20]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function dl(e){let t,r;function n(){return e[21](e[22])}return t=new so({props:{disabled:!1,text:e[9],onClick:n,noMargin:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(r,o){e=r;const a={};512&o&&(a.text=e[9]),2112&o&&(a.onClick=n),t.$set(a)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function ml(e){let t,r,n,o;const a=[pl,ul],i=[];function s(e,t){return e[19]?0:1}return t=s(e),r=i[t]=a[t](e),{c(){r.c(),n=C()},m(e,r){i[t].m(e,r),y(e,n,r),o=!0},p(e,o){let c=t;t=s(e),t===c?i[t].p(e,o):(X(),re(i[c],1,1,(()=>{i[c]=null})),ee(),r=i[t],r?r.p(e,o):(r=i[t]=a[t](e),r.c()),te(r,1),r.m(n.parentNode,n))},i(e){o||(te(r),o=!0)},o(e){re(r),o=!1},d(e){e&&g(n),i[t].d(e)}}}function fl(e){let t,r,n,o=!e[10]&&!e[7].length&&hl(e),a=ne(e[7]),i=[];for(let t=0;t<a.length;t+=1)i[t]=yl(al(e,a,t));const s=e=>re(i[e],1,1,(()=>{i[e]=null}));return{c(){o&&o.c(),t=E();for(let e=0;e<i.length;e+=1)i[e].c();r=C()},m(e,a){o&&o.m(e,a),y(e,t,a);for(let t=0;t<i.length;t+=1)i[t]&&i[t].m(e,a);y(e,r,a),n=!0},p(e,n){if(e[10]||e[7].length?o&&(o.d(1),o=null):o?o.p(e,n):(o=hl(e),o.c(),o.m(t.parentNode,t)),160&n){let t;for(a=ne(e[7]),t=0;t<a.length;t+=1){const o=al(e,a,t);i[t]?(i[t].p(o,n),te(i[t],1)):(i[t]=yl(o),i[t].c(),te(i[t],1),i[t].m(r.parentNode,r))}for(X(),t=a.length;t<i.length;t+=1)s(t);ee()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)te(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)re(i[e]);n=!1},d(e){e&&(g(t),g(r)),o&&o.d(e),b(i,e)}}}function hl(e){let t;return{c(){t=P("div")},m(r,n){y(r,t,n),t.innerHTML=e[1]},p(e,r){2&r&&(t.innerHTML=e[1])},d(e){e&&g(t)}}}function yl(e){let t,r;return t=new ol({props:{subscription:e[22],isInactive:!0,subscriptionRateText:e[5]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};128&r&&(n.subscription=e[22]),32&r&&(n.subscriptionRateText=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function gl(e){let t,r,n,o,a=e[10]&&sl(),i=!e[0]&&cl(e),s=e[0]&&fl(e);return{c(){t=P("div"),a&&a.c(),r=E(),i&&i.c(),n=E(),s&&s.c(),_(t,"class","subscriptions-list-container svelte-2hm0a")},m(e,c){y(e,t,c),a&&a.m(t,null),h(t,r),i&&i.m(t,null),h(t,n),s&&s.m(t,null),o=!0},p(e,[o]){e[10]?a?1024&o&&te(a,1):(a=sl(),a.c(),te(a,1),a.m(t,r)):a&&(X(),re(a,1,1,(()=>{a=null})),ee()),e[0]?i&&(X(),re(i,1,1,(()=>{i=null})),ee()):i?(i.p(e,o),1&o&&te(i,1)):(i=cl(e),i.c(),te(i,1),i.m(t,n)),e[0]?s?(s.p(e,o),1&o&&te(s,1)):(s=fl(e),s.c(),te(s,1),s.m(t,null)):s&&(X(),re(s,1,1,(()=>{s=null})),ee())},i(e){o||(te(a),te(i),te(s),o=!0)},o(e){re(a),re(i),re(s),o=!1},d(e){e&&g(t),a&&a.d(),i&&i.d(),s&&s.d()}}}function bl(e,t,r){let{isPastSubscriptions:n}=t,{noSubscriptionsMessage:o}=t,{billingHistoryText:a}=t,{billingHistoryLink:i}=t,{nextPaymentDateText:s}=t,{subscriptionRateText:c}=t,{subscriptions:l}=t,{inactiveSubscriptions:u}=t,{paymentProvider:p}=t,{changePaymentMethodText:d}=t,{loading:m}=t,{onChangePayment:f}=t,{logChangeSubscription:h}=t,{logCancelSubscription:y}=t,{onViewHistory:g}=t,{changeSubscriptionText:b}=t,{cancelSubscriptionText:P}=t,{changeSubscriptionPath:A}=t,{cancelSubscriptionPath:S}=t,{elementsOrder:E}=t,{elementsHide:C}=t;return e.$$set=e=>{"isPastSubscriptions"in e&&r(0,n=e.isPastSubscriptions),"noSubscriptionsMessage"in e&&r(1,o=e.noSubscriptionsMessage),"billingHistoryText"in e&&r(2,a=e.billingHistoryText),"billingHistoryLink"in e&&r(3,i=e.billingHistoryLink),"nextPaymentDateText"in e&&r(4,s=e.nextPaymentDateText),"subscriptionRateText"in e&&r(5,c=e.subscriptionRateText),"subscriptions"in e&&r(6,l=e.subscriptions),"inactiveSubscriptions"in e&&r(7,u=e.inactiveSubscriptions),"paymentProvider"in e&&r(8,p=e.paymentProvider),"changePaymentMethodText"in e&&r(9,d=e.changePaymentMethodText),"loading"in e&&r(10,m=e.loading),"onChangePayment"in e&&r(11,f=e.onChangePayment),"logChangeSubscription"in e&&r(12,h=e.logChangeSubscription),"logCancelSubscription"in e&&r(13,y=e.logCancelSubscription),"onViewHistory"in e&&r(14,g=e.onViewHistory),"changeSubscriptionText"in e&&r(15,b=e.changeSubscriptionText),"cancelSubscriptionText"in e&&r(16,P=e.cancelSubscriptionText),"changeSubscriptionPath"in e&&r(17,A=e.changeSubscriptionPath),"cancelSubscriptionPath"in e&&r(18,S=e.cancelSubscriptionPath),"elementsOrder"in e&&r(19,E=e.elementsOrder),"elementsHide"in e&&r(20,C=e.elementsHide)},[n,o,a,i,s,c,l,u,p,d,m,f,h,y,g,b,P,A,S,E,C,e=>f(e)]}class Pl extends pe{constructor(e){super(),ue(this,e,bl,gl,i,{isPastSubscriptions:0,noSubscriptionsMessage:1,billingHistoryText:2,billingHistoryLink:3,nextPaymentDateText:4,subscriptionRateText:5,subscriptions:6,inactiveSubscriptions:7,paymentProvider:8,changePaymentMethodText:9,loading:10,onChangePayment:11,logChangeSubscription:12,logCancelSubscription:13,onViewHistory:14,changeSubscriptionText:15,cancelSubscriptionText:16,changeSubscriptionPath:17,cancelSubscriptionPath:18,elementsOrder:19,elementsHide:20})}}const Al={matches:e=>e.type===Be,create:(e,t,r,n)=>({component:Pl,props:{isPastSubscriptions:n.isPastSubscriptions,subscriptionTitle:n.subscriptionTitle,billingHistoryText:n.billingHistoryText,billingHistoryLink:n.billingHistoryLink,noSubscriptionsMessage:n.noSubscriptionsMessage,nextPaymentDateText:n.nextPaymentDateText,subscriptionRateText:n.subscriptionRateText,loading:!t.existingSubscriptions,subscriptions:t.existingSubscriptions?t.existingSubscriptions.filter((e=>"active"===e.status)):[],inactiveSubscriptions:t.existingSubscriptions?t.existingSubscriptions.filter((e=>"active"!==e.status)):[],paymentProvider:e.organisationConfiguration.paymentProvider,changePaymentMethodText:n.changePaymentMethodText,onChangePayment:n=>{r.updateFormState({selectedSubscription:n}),it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.completeSection()},onViewHistory:t=>{r.updateFormState({selectedSubscription:t}),r.jumpToPartStart("billing-history"),it(e,"zephr_form_billing_history_view",null)},logChangeSubscription:t=>{it(e,"zephr_form_subscription_change_clicked",{productId:t.productId,planId:t.externalId})},logCancelSubscription:t=>{it(e,"zephr_form_cancel_subscription_clicked",{productId:t.productId,planId:t.externalId})},changeSubscriptionText:n.changeSubscriptionText,cancelSubscriptionText:n.cancelSubscriptionText,changeSubscriptionPath:n.changeSubscriptionPath,cancelSubscriptionPath:n.cancelSubscriptionPath,elementsOrder:n.elementsOrder,elementsHide:{subscriptionInformation:n?.hideSubscriptionInformation,changePayment:n?.hideChangePayment,changeSubscription:n?.hideChangeSubscription,cancelSubscription:n?.hideCancelSubscription,billingHistory:n?.hideBillingHistory}}})};function Sl(e){let t,r,n;return r=new Si({props:{text:e[2]}}),r.$on("linkClick",(function(){a(e[3])&&e[3].apply(this,arguments)})),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","past-subscriptions-link-wrapper svelte-1gacumx")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(t,n){e=t;const o={};4&n&&(o.text=e[2]),r.$set(o)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function El(e){let t,r,n=e[1]&&!e[0]&&Sl(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,[r]){e[1]&&!e[0]?n?(n.p(e,r),3&r&&te(n,1)):(n=Sl(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Cl(e,t,r){let{loading:n}=t,{show:o}=t,{linkText:a}=t,{onClick:i}=t;return e.$$set=e=>{"loading"in e&&r(0,n=e.loading),"show"in e&&r(1,o=e.show),"linkText"in e&&r(2,a=e.linkText),"onClick"in e&&r(3,i=e.onClick)},[n,o,a,i]}class vl extends pe{constructor(e){super(),ue(this,e,Cl,El,i,{loading:0,show:1,linkText:2,onClick:3})}}const Tl={matches:e=>e.type===Ue,create:(e,t,r,n)=>({component:vl,props:{loading:!t.existingSubscriptions,show:n.show,linkText:n.linkText,onClick:()=>{r.jumpToPartStart("past-subscriptions")}}})};function _l(e){let t,r,n;return r=new so({props:{disabled:!1,text:e[0],onClick:e[2]}}),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","change-payment-method-button-container")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,[t]){const n={};1&t&&(n.text=e[0]),2&t&&(n.onClick=e[2]),r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function Ol(e,t,r){let{text:n}=t,{onChangePayment:o}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"onChangePayment"in e&&r(1,o=e.onChangePayment)},[n,o,()=>o()]}class wl extends pe{constructor(e){super(),ue(this,e,Ol,_l,i,{text:0,onChangePayment:1})}}const Il={matches:e=>e.type===Ge,create:(e,t,r,n)=>({component:wl,props:{text:n.text,onChangePayment:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.completeSection()}}})};function Rl(e){let t,r,n,o;return r=new Si({props:{text:e[0],onClick:e[2]}}),r.$on("linkClick",(function(){a(e[2])&&e[2].apply(this,arguments)})),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class",n=f("event-link-wrapper "+(e[1]?"float-right":""))+" svelte-12vtv9v")},m(e,n){y(e,t,n),se(r,t,null),o=!0},p(a,[i]){e=a;const s={};1&i&&(s.text=e[0]),4&i&&(s.onClick=e[2]),r.$set(s),(!o||2&i&&n!==(n=f("event-link-wrapper "+(e[1]?"float-right":""))+" svelte-12vtv9v"))&&_(t,"class",n)},i(e){o||(te(r.$$.fragment,e),o=!0)},o(e){re(r.$$.fragment,e),o=!1},d(e){e&&g(t),ce(r)}}}function $l(e,t,r){let{text:n}=t,{floatRight:o}=t,{onClick:a}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"floatRight"in e&&r(1,o=e.floatRight),"onClick"in e&&r(2,a=e.onClick)},[n,o,a]}class Ml extends pe{constructor(e){super(),ue(this,e,$l,Rl,i,{text:0,floatRight:1,onClick:2})}}const Nl={matches:e=>e.type===De,create:(e,t,r,n)=>({component:Ml,props:{text:n.text,floatRight:n.floatRight,onClick:()=>{r.onEvent(n.event)}}})};function xl(e){let t,r;return t=new Si({props:{text:e[2]}}),t.$on("linkClick",(function(){a(e[4])&&e[4].apply(this,arguments)})),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(r,n){e=r;const o={};4&n&&(o.text=e[2]),t.$set(o)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ll(e){let t,r,n,o,a,i,s;r=new Io({props:{forInput:e[5],label:e[0]}});let c=e[3]&&xl(e);return{c(){t=P("div"),ie(r.$$.fragment),n=E(),o=P("div"),a=P("input"),i=E(),c&&c.c(),_(t,"class","bold-label svelte-121zkre"),_(a,"id",e[5]),_(a,"type","email"),_(a,"name","email"),a.value=e[1],a.readOnly=!0,_(a,"class","read-only-input svelte-121zkre"),_(o,"class","zephr-form-relative-container svelte-121zkre")},m(e,l){y(e,t,l),se(r,t,null),y(e,n,l),y(e,o,l),h(o,a),h(o,i),c&&c.m(o,null),s=!0},p(e,[t]){const n={};1&t&&(n.label=e[0]),r.$set(n),(!s||2&t&&a.value!==e[1])&&(a.value=e[1]),e[3]?c?(c.p(e,t),8&t&&te(c,1)):(c=xl(e),c.c(),te(c,1),c.m(o,null)):c&&(X(),re(c,1,1,(()=>{c=null})),ee())},i(e){s||(te(r.$$.fragment,e),te(c),s=!0)},o(e){re(r.$$.fragment,e),re(c),s=!1},d(e){e&&(g(t),g(n),g(o)),ce(r),c&&c.d()}}}function Fl(e,t,r){let{formKey:n}=t,{label:o}=t,{emailAddress:a}=t,{updateLabel:i}=t,{updateEnabled:s}=t,{onUpdate:c}=t;const l=`zephr-form-read-only-email-address-${n}`;return e.$$set=e=>{"formKey"in e&&r(6,n=e.formKey),"label"in e&&r(0,o=e.label),"emailAddress"in e&&r(1,a=e.emailAddress),"updateLabel"in e&&r(2,i=e.updateLabel),"updateEnabled"in e&&r(3,s=e.updateEnabled),"onUpdate"in e&&r(4,c=e.onUpdate)},[o,a,i,s,c,l,n]}class zl extends pe{constructor(e){super(),ue(this,e,Fl,Ll,i,{formKey:6,label:0,emailAddress:1,updateLabel:2,updateEnabled:3,onUpdate:4})}}const kl={matches:e=>e.type===je,create:(e,t,r,n)=>({component:zl,props:{formKey:e.uniqueKey,emailAddress:t.readOnlyEmail??"",label:n.label,updateLabel:n.updateLinkLabel,updateEnabled:n.updateLinkEnabled,onUpdate:()=>r.jumpToPartStart("email-update")}})};function Dl(e){let t,r;return t=new Si({props:{text:e[1]}}),t.$on("linkClick",(function(){a(e[3])&&e[3].apply(this,arguments)})),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(r,n){e=r;const o={};2&n&&(o.text=e[1]),t.$set(o)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Bl(e){let t,r,n,o,a,i,s;r=new Io({props:{forInput:e[4],label:e[0]}});let c=e[2]&&Dl(e);return{c(){t=P("div"),ie(r.$$.fragment),n=E(),o=P("div"),a=P("input"),i=E(),c&&c.c(),_(t,"class","bold-label svelte-121zkre"),_(a,"id",e[4]),_(a,"type","password"),a.value="••••••••••••••••",a.readOnly=!0,_(a,"class","read-only-input svelte-121zkre"),_(o,"class","zephr-form-relative-container svelte-121zkre")},m(e,l){y(e,t,l),se(r,t,null),y(e,n,l),y(e,o,l),h(o,a),h(o,i),c&&c.m(o,null),s=!0},p(e,[t]){const n={};1&t&&(n.label=e[0]),r.$set(n),e[2]?c?(c.p(e,t),4&t&&te(c,1)):(c=Dl(e),c.c(),te(c,1),c.m(o,null)):c&&(X(),re(c,1,1,(()=>{c=null})),ee())},i(e){s||(te(r.$$.fragment,e),te(c),s=!0)},o(e){re(r.$$.fragment,e),re(c),s=!1},d(e){e&&(g(t),g(n),g(o)),ce(r),c&&c.d()}}}function Ul(e,t,r){let{formKey:n}=t,{label:o}=t,{updateLabel:a}=t,{updateEnabled:i}=t,{onUpdate:s}=t;const c=`zephr-form-read-only-password-${n}`;return e.$$set=e=>{"formKey"in e&&r(5,n=e.formKey),"label"in e&&r(0,o=e.label),"updateLabel"in e&&r(1,a=e.updateLabel),"updateEnabled"in e&&r(2,i=e.updateEnabled),"onUpdate"in e&&r(3,s=e.onUpdate)},[o,a,i,s,c,n]}class Vl extends pe{constructor(e){super(),ue(this,e,Ul,Bl,i,{formKey:5,label:0,updateLabel:1,updateEnabled:2,onUpdate:3})}}const Gl={matches:e=>e.type===qe,create:(e,t,r,n)=>({component:Vl,props:{formKey:e.uniqueKey,label:n.label,updateLabel:n.updateLinkLabel,updateEnabled:n.updateLinkEnabled,onUpdate:()=>r.jumpToPartStart("password-update")}})};function jl(t){let r,n,o,a,i,s;return{c(){r=P("div"),n=P("div"),o=S(t[3]),a=E(),i=P("div"),s=S(t[2]),_(n,"class","zephr-form-ro-attribute-label"),_(i,"class","zephr-form-ro-attribute-value"),_(r,"class","zephr-form-ro-attribute")},m(e,t){y(e,r,t),h(r,n),h(n,o),h(r,a),h(r,i),h(i,s)},p(e,t){8&t&&I(o,e[3]),4&t&&I(s,e[2])},i:e,o:e,d(e){e&&g(r)}}}function ql(e){let t,r,n;return r=new Qa({props:{id:`zephr-form-ro-checkbox-${e[1]}`,name:e[1],label:e[3],required:!1,value:e[2],checked:e[2],disabled:!0}}),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","zephr-form-ro-attribute")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,t){const n={};2&t&&(n.id=`zephr-form-ro-checkbox-${e[1]}`),2&t&&(n.name=e[1]),8&t&&(n.label=e[3]),4&t&&(n.value=e[2]),4&t&&(n.checked=e[2]),r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function Hl(e){let t,r,n,o;const a=[ql,jl],i=[];function s(e,t){return e[0]?0:1}return t=s(e),r=i[t]=a[t](e),{c(){r.c(),n=C()},m(e,r){i[t].m(e,r),y(e,n,r),o=!0},p(e,[o]){let c=t;t=s(e),t===c?i[t].p(e,o):(X(),re(i[c],1,1,(()=>{i[c]=null})),ee(),r=i[t],r?r.p(e,o):(r=i[t]=a[t](e),r.c()),te(r,1),r.m(n.parentNode,n))},i(e){o||(te(r),o=!0)},o(e){re(r),o=!1},d(e){e&&g(n),i[t].d(e)}}}function Kl(e,t,r){let{isCheckbox:n}=t,{slug:o}=t,{value:a}=t,{label:i}=t;return e.$$set=e=>{"isCheckbox"in e&&r(0,n=e.isCheckbox),"slug"in e&&r(1,o=e.slug),"value"in e&&r(2,a=e.value),"label"in e&&r(3,i=e.label)},[n,o,a,i]}class Yl extends pe{constructor(e){super(),ue(this,e,Kl,Hl,i,{isCheckbox:0,slug:1,value:2,label:3})}}const Wl=["radio","select"],Jl={matches:e=>e.type===He,create:(e,t,r,n)=>{const o=e.organisationConfiguration.schemaFields.find((e=>e.slug===n.slug));let a=(t.readOnlyAttributeValues??{})[n.slug]??"";a&&Wl.includes(o?.["input-type"])&&(a=(o?.["select-options"]??[]).find((e=>e.value===a))?.label??a);const i="checkbox"===o?.["input-type"];return{component:Yl,props:{value:a,slug:n.slug,label:n.label,isCheckbox:i}}}};function Ql(e){let t,r;return{c(){t=P("span"),r=S(e[2]),_(t,"class","current-device svelte-4jb3ht")},m(e,n){y(e,t,n),h(t,r)},p(e,t){4&t&&I(r,e[2])},d(e){e&&g(t)}}}function Zl(e){let t,r;return t=new so({props:{disabled:!1,text:e[4],onClick:e[5]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};16&r&&(n.text=e[4]),3&r&&(n.onClick=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Xl(e){let t,r,n,o,a,i,s,c,l,u,p,d,m,f,b,A,C,v,T,O=e[0].deviceName+"",w=e[0].startDate+"",R=e[0].browser+"",$=e[0].country+"",M=e[0].requestingSession&&Ql(e),N=!e[0].requestingSession&&Zl(e);return{c(){t=P("div"),r=P("div"),n=S(O),o=E(),M&&M.c(),a=E(),i=P("div"),s=S(e[3]),c=S(": "),l=S(w),u=E(),p=P("div"),d=S(R),m=E(),f=P("div"),b=S($),A=E(),N&&N.c(),C=E(),v=P("hr"),_(r,"class","device-title svelte-4jb3ht"),_(i,"class","login-time svelte-4jb3ht"),_(p,"class","browser svelte-4jb3ht"),_(f,"class","country svelte-4jb3ht"),_(v,"class","svelte-4jb3ht"),_(t,"class","session-container svelte-4jb3ht")},m(e,g){y(e,t,g),h(t,r),h(r,n),h(r,o),M&&M.m(r,null),h(t,a),h(t,i),h(i,s),h(i,c),h(i,l),h(t,u),h(t,p),h(p,d),h(t,m),h(t,f),h(f,b),h(t,A),N&&N.m(t,null),h(t,C),h(t,v),T=!0},p(e,[o]){(!T||1&o)&&O!==(O=e[0].deviceName+"")&&I(n,O),e[0].requestingSession?M?M.p(e,o):(M=Ql(e),M.c(),M.m(r,null)):M&&(M.d(1),M=null),(!T||8&o)&&I(s,e[3]),(!T||1&o)&&w!==(w=e[0].startDate+"")&&I(l,w),(!T||1&o)&&R!==(R=e[0].browser+"")&&I(d,R),(!T||1&o)&&$!==($=e[0].country+"")&&I(b,$),e[0].requestingSession?N&&(X(),re(N,1,1,(()=>{N=null})),ee()):N?(N.p(e,o),1&o&&te(N,1)):(N=Zl(e),N.c(),te(N,1),N.m(t,C))},i(e){T||(te(N),T=!0)},o(e){re(N),T=!1},d(e){e&&g(t),M&&M.d(),N&&N.d()}}}function eu(e,t,r){let{deviceSession:n}=t,{onDeviceSignOut:o}=t,{currentDeviceLabel:a}=t,{loginTimeLabel:i}=t,{signOutLabel:s}=t;return e.$$set=e=>{"deviceSession"in e&&r(0,n=e.deviceSession),"onDeviceSignOut"in e&&r(1,o=e.onDeviceSignOut),"currentDeviceLabel"in e&&r(2,a=e.currentDeviceLabel),"loginTimeLabel"in e&&r(3,i=e.loginTimeLabel),"signOutLabel"in e&&r(4,s=e.signOutLabel)},[n,o,a,i,s,()=>o(n.id)]}class tu extends pe{constructor(e){super(),ue(this,e,eu,Xl,i,{deviceSession:0,onDeviceSignOut:1,currentDeviceLabel:2,loginTimeLabel:3,signOutLabel:4})}}function ru(e,t,r){const n=e.slice();return n[7]=t[r],n}function nu(e){let t,r;return t=new Wt({props:{icon:Ut,spin:!0,size:"lg"}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function ou(e){let t;return{c(){t=P("div")},m(r,n){y(r,t,n),t.innerHTML=e[1]},p(e,r){2&r&&(t.innerHTML=e[1])},d(e){e&&g(t)}}}function au(e){let t,r;return t=new tu({props:{deviceSession:e[7],currentDeviceLabel:e[3],loginTimeLabel:e[4],signOutLabel:e[5],onDeviceSignOut:e[6]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.deviceSession=e[7]),8&r&&(n.currentDeviceLabel=e[3]),16&r&&(n.loginTimeLabel=e[4]),32&r&&(n.signOutLabel=e[5]),64&r&&(n.onDeviceSignOut=e[6]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function iu(e){let t,r,n,o,a,i,s,c,l=null==e[0]&&nu(),u=null!=e[0]&&!e[0].length&&ou(e),p=ne(e[0]??[]),d=[];for(let t=0;t<p.length;t+=1)d[t]=au(ru(e,p,t));const m=e=>re(d[e],1,1,(()=>{d[e]=null}));return{c(){t=P("div"),r=P("div"),n=P("h1"),o=S(e[2]),a=E(),l&&l.c(),i=E(),u&&u.c(),s=E();for(let e=0;e<d.length;e+=1)d[e].c();_(n,"class","current-device"),_(r,"class","your-devices"),_(t,"class","devices-sessions-container")},m(e,p){y(e,t,p),h(t,r),h(r,n),h(n,o),h(t,a),l&&l.m(t,null),h(t,i),u&&u.m(t,null),h(t,s);for(let e=0;e<d.length;e+=1)d[e]&&d[e].m(t,null);c=!0},p(e,[r]){if((!c||4&r)&&I(o,e[2]),null==e[0]?l?1&r&&te(l,1):(l=nu(),l.c(),te(l,1),l.m(t,i)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),null==e[0]||e[0].length?u&&(u.d(1),u=null):u?u.p(e,r):(u=ou(e),u.c(),u.m(t,s)),121&r){let n;for(p=ne(e[0]??[]),n=0;n<p.length;n+=1){const o=ru(e,p,n);d[n]?(d[n].p(o,r),te(d[n],1)):(d[n]=au(o),d[n].c(),te(d[n],1),d[n].m(t,null))}for(X(),n=p.length;n<d.length;n+=1)m(n);ee()}},i(e){if(!c){te(l);for(let e=0;e<p.length;e+=1)te(d[e]);c=!0}},o(e){re(l),d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)re(d[e]);c=!1},d(e){e&&g(t),l&&l.d(),u&&u.d(),b(d,e)}}}function su(e,t,r){let{devicesSessions:n}=t,{noDeviceSessionsMessage:o}=t,{yourDevicesLabel:a}=t,{currentDeviceLabel:i}=t,{loginTimeLabel:s}=t,{signOutLabel:c}=t,{onDeviceSignOut:l}=t;return e.$$set=e=>{"devicesSessions"in e&&r(0,n=e.devicesSessions),"noDeviceSessionsMessage"in e&&r(1,o=e.noDeviceSessionsMessage),"yourDevicesLabel"in e&&r(2,a=e.yourDevicesLabel),"currentDeviceLabel"in e&&r(3,i=e.currentDeviceLabel),"loginTimeLabel"in e&&r(4,s=e.loginTimeLabel),"signOutLabel"in e&&r(5,c=e.signOutLabel),"onDeviceSignOut"in e&&r(6,l=e.onDeviceSignOut)},[n,o,a,i,s,c,l]}class cu extends pe{constructor(e){super(),ue(this,e,su,iu,i,{devicesSessions:0,noDeviceSessionsMessage:1,yourDevicesLabel:2,currentDeviceLabel:3,loginTimeLabel:4,signOutLabel:5,onDeviceSignOut:6})}}const lu=async(e,t,r)=>{const n=await uu(e,t,r);return r.updateFormState({availableDeviceSessions:n}),n},uu=(e,t,r)=>lr("zephr/public/sessions/v1/sessions",{method:"GET"},r,null,!0).then((e=>e.ok?e.json():[])).then((t=>t.map((t=>({tenantId:t.tenantId,userId:t.userId,id:t.id,startDate:new Date(t.startDate).toLocaleString(Gn(e),{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}),deviceName:t.deviceName,browser:t.browser,requestingSession:t.requestingSession,city:t.city??null,country:t.country??null,geoState:t.geoState??null,ipAddress:t.ipAddress??null}))))),pu=async(e,t,r,n)=>{try{return 200===(await lr(`zephr/public/sessions/v1/sessions/${n}`,{method:"DELETE"},r,null,!0)).status}catch(e){return console.error("Error occurred while signing out device:",e),!1}},du={matches:e=>e.type===Ye,create:(e,t,r,n)=>({component:cu,props:{yourDevicesLabel:n.yourDevicesLabel,noDeviceSessionsMessage:n.noDeviceSessionsMessage,devicesSessions:t.availableDeviceSessions,currentDeviceLabel:n.currentDeviceLabel,loginTimeLabel:n.loginTimeLabel,signOutLabel:n.signOutLabel,onDeviceSignOut:n=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),it(e,"zephr_form_device_logout",{deviceId:n}),(async(e,t,r,n)=>{if(await pu(e,t,r,n))return console.log("Successfully signed out device."),lu(e,t,r);console.error("Failed to sign out device.")})(e,t,r,n)}}})};function mu(e){let t,r,n,o;return{c(){t=P("div"),r=S(e[2]),_(t,"class","sign-out-all svelte-1gdzu2p")},m(i,s){y(i,t,s),h(t,r),n||(o=v(t,"click",(function(){a(e[0])&&e[0].apply(this,arguments)})),n=!0)},p(t,n){e=t,4&n&&I(r,e[2])},d(e){e&&g(t),n=!1,o()}}}function fu(t){let r,n=!t[1]&&mu(t);return{c(){n&&n.c(),r=C()},m(e,t){n&&n.m(e,t),y(e,r,t)},p(e,[t]){e[1]?n&&(n.d(1),n=null):n?n.p(e,t):(n=mu(e),n.c(),n.m(r.parentNode,r))},i:e,o:e,d(e){e&&g(r),n&&n.d(e)}}}function hu(e,t,r){let{onSignOutAllDevices:n}=t,{hidden:o}=t,{text:a}=t;return e.$$set=e=>{"onSignOutAllDevices"in e&&r(0,n=e.onSignOutAllDevices),"hidden"in e&&r(1,o=e.hidden),"text"in e&&r(2,a=e.text)},[n,o,a]}class yu extends pe{constructor(e){super(),ue(this,e,hu,fu,i,{onSignOutAllDevices:0,hidden:1,text:2})}}const gu=async(e,t,r)=>{try{return 200===(await lr("zephr/public/sessions/v1/sessions?except-current",{method:"DELETE"},r,null,!0)).status}catch(e){return console.error("Error occurred while signing out devices:",e),!1}},bu={matches:e=>e.type===We,create:(e,t,r,n)=>({component:yu,props:{hidden:t.availableDeviceSessions?.length<=1,text:n.text,onSignOutAllDevices:()=>{it(e,"zephr_form_sign_out_all_devices",null),(async(e,t,r)=>{if(await gu(e,t,r))return console.log("Successfully signed out of all devices."),lu(e,t,r);console.error("Failed to sign out of all devices.")})(e,t,r)}}})};function Pu(e,t,r){const n=e.slice();return n[5]=t[r],n}function Au(e){let t,r,n,o,a,i=e[5].currency+"",s=e[5].subtotal+"",c=e[5].taxes&&Su(e);return{c(){t=S(i),r=E(),n=S(s),o=E(),c&&c.c(),a=C()},m(e,i){y(e,t,i),y(e,r,i),y(e,n,i),y(e,o,i),c&&c.m(e,i),y(e,a,i)},p(e,r){1&r&&i!==(i=e[5].currency+"")&&I(t,i),1&r&&s!==(s=e[5].subtotal+"")&&I(n,s),e[5].taxes?c?c.p(e,r):(c=Su(e),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(e){e&&(g(t),g(r),g(n),g(o),g(a)),c&&c.d(e)}}}function Su(e){let t,r,n=` ${e[5].taxes}`;return{c(){t=P("span"),r=S(n),_(t,"class","taxes svelte-15e6uru")},m(e,n){y(e,t,n),h(t,r)},p(e,t){1&t&&n!==(n=` ${e[5].taxes}`)&&I(r,n)},d(e){e&&g(t)}}}function Eu(e){let t,r,n,o=e[5].currency+"",a=e[5].total+"";return{c(){t=S(o),r=E(),n=S(a)},m(e,o){y(e,t,o),y(e,r,o),y(e,n,o)},p(e,r){1&r&&o!==(o=e[5].currency+"")&&I(t,o),1&r&&a!==(a=e[5].total+"")&&I(n,a)},d(e){e&&(g(t),g(r),g(n))}}}function Cu(e){let t,r,n,o,a,i,s,c,l,u,p,d=e[5].date+"",m=e[5].period+"",f=e[5].subtotal&&Au(e),b=e[5].total&&Eu(e);return{c(){t=P("div"),r=P("div"),n=S(d),o=E(),a=P("div"),i=S(m),s=E(),c=P("div"),f&&f.c(),l=E(),u=P("div"),b&&b.c(),p=E(),_(r,"class","svelte-15e6uru"),_(a,"class","svelte-15e6uru"),_(c,"class","svelte-15e6uru"),_(u,"class","svelte-15e6uru"),_(t,"class","table-row svelte-15e6uru")},m(e,d){y(e,t,d),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(t,s),h(t,c),f&&f.m(c,null),h(t,l),h(t,u),b&&b.m(u,null),h(t,p)},p(e,t){1&t&&d!==(d=e[5].date+"")&&I(n,d),1&t&&m!==(m=e[5].period+"")&&I(i,m),e[5].subtotal?f?f.p(e,t):(f=Au(e),f.c(),f.m(c,null)):f&&(f.d(1),f=null),e[5].total?b?b.p(e,t):(b=Eu(e),b.c(),b.m(u,null)):b&&(b.d(1),b=null)},d(e){e&&g(t),f&&f.d(),b&&b.d()}}}function vu(t){let r,n,o,a,i,s,c,l,u,p,d,m,f,A,C,v=ne(t[0]??[]),T=[];for(let e=0;e<v.length;e+=1)T[e]=Cu(Pu(t,v,e));return{c(){r=P("div"),n=P("div"),o=P("div"),a=P("div"),i=S(t[1]),s=E(),c=P("div"),l=S(t[2]),u=E(),p=P("div"),d=S(t[3]),m=E(),f=P("div"),A=S(t[4]),C=E();for(let e=0;e<T.length;e+=1)T[e].c();_(a,"class","svelte-15e6uru"),_(c,"class","svelte-15e6uru"),_(p,"class","svelte-15e6uru"),_(f,"class","svelte-15e6uru"),_(o,"class","table-head svelte-15e6uru"),_(n,"class","table svelte-15e6uru"),_(r,"class","billing-history-container")},m(e,t){y(e,r,t),h(r,n),h(n,o),h(o,a),h(a,i),h(o,s),h(o,c),h(c,l),h(o,u),h(o,p),h(p,d),h(o,m),h(o,f),h(f,A),h(n,C);for(let e=0;e<T.length;e+=1)T[e]&&T[e].m(n,null)},p(e,[t]){if(2&t&&I(i,e[1]),4&t&&I(l,e[2]),8&t&&I(d,e[3]),16&t&&I(A,e[4]),1&t){let r;for(v=ne(e[0]??[]),r=0;r<v.length;r+=1){const o=Pu(e,v,r);T[r]?T[r].p(o,t):(T[r]=Cu(o),T[r].c(),T[r].m(n,null))}for(;r<T.length;r+=1)T[r].d(1);T.length=v.length}},i:e,o:e,d(e){e&&g(r),b(T,e)}}}function Tu(e,t,r){let{historyItems:n}=t,{dateLabel:o}=t,{periodLabel:a}=t,{subtotalLabel:i}=t,{totalLabel:s}=t;return e.$$set=e=>{"historyItems"in e&&r(0,n=e.historyItems),"dateLabel"in e&&r(1,o=e.dateLabel),"periodLabel"in e&&r(2,a=e.periodLabel),"subtotalLabel"in e&&r(3,i=e.subtotalLabel),"totalLabel"in e&&r(4,s=e.totalLabel)},[n,o,a,i,s]}class _u extends pe{constructor(e){super(),ue(this,e,Tu,vu,i,{historyItems:0,dateLabel:1,periodLabel:2,subtotalLabel:3,totalLabel:4})}}const Ou={matches:e=>e.type===Ve,create:(e,t,r)=>({component:_u,props:{historyItems:t.selectedSubscription?.transactionHistory,dateLabel:Vn(e,"forms.billing.history.date","Date"),periodLabel:Vn(e,"forms.billing.history.period","Period"),subtotalLabel:Vn(e,"forms.billing.history.subtotal","Subtotal"),totalLabel:Vn(e,"forms.billing.history.total","Total")}})};function wu(e){let t,r,n,o;return{c(){t=P("button"),r=S(e[1]),_(t,"class","zephr-form-back-button svelte-s116f2"),_(t,"type","submit")},m(i,s){y(i,t,s),h(t,r),n||(o=v(t,"click",T((function(){a(e[3])&&e[3].apply(this,arguments)}))),n=!0)},p(t,n){e=t,2&n&&I(r,e[1])},d(e){e&&g(t),n=!1,o()}}}function Iu(t){let r,n,o,i,s,c,l=t[2]&&wu(t);return{c(){r=P("div"),l&&l.c(),n=E(),o=P("button"),i=S(t[0]),_(o,"class","zephr-form-continue-button svelte-s116f2"),_(o,"type","submit"),_(r,"class","zephr-form-button-group zephr-form-max-width svelte-s116f2")},m(e,u){y(e,r,u),l&&l.m(r,null),h(r,n),h(r,o),h(o,i),s||(c=v(o,"click",T((function(){a(t[4])&&t[4].apply(this,arguments)}))),s=!0)},p(e,[o]){(t=e)[2]?l?l.p(t,o):(l=wu(t),l.c(),l.m(r,n)):l&&(l.d(1),l=null),1&o&&I(i,t[0])},i:e,o:e,d(e){e&&g(r),l&&l.d(),s=!1,c()}}}function Ru(e,t,r){let{continueText:n}=t,{backText:o}=t,{backEnabled:a}=t,{onBack:i}=t,{onClick:s}=t;return e.$$set=e=>{"continueText"in e&&r(0,n=e.continueText),"backText"in e&&r(1,o=e.backText),"backEnabled"in e&&r(2,a=e.backEnabled),"onBack"in e&&r(3,i=e.onBack),"onClick"in e&&r(4,s=e.onClick)},[n,o,a,i,s]}class $u extends pe{constructor(e){super(),ue(this,e,Ru,Iu,i,{continueText:0,backText:1,backEnabled:2,onBack:3,onClick:4})}}const Mu={matches:e=>e.type===Je,create:(e,t,r,n)=>({component:$u,props:{continueText:n.continueText,backText:n.backText,backEnabled:n.backEnabled,onClick:()=>{n.isCancel&&r.updateFormState({confirmCancel:!0}),r.updateFormState({isExternalReferrer:!1}),r.attemptCompleteSection()},onBack:()=>{n.backToURL?window.location.pathname=n.backURL:t.isExternalReferrer?window.history.back():r.onEvent(n.event)}}})};function Nu(t){let r,n;return{c(){r=P("a"),n=S(t[0]),_(r,"class","zephr-form-button zephr-form-button-top-margin svelte-16hrghb"),_(r,"href",t[1])},m(e,t){y(e,r,t),h(r,n)},p(e,[t]){1&t&&I(n,e[0]),2&t&&_(r,"href",e[1])},i:e,o:e,d(e){e&&g(r)}}}function xu(e,t,r){let{text:n}=t,{href:o}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"href"in e&&r(1,o=e.href)},[n,o]}class Lu extends pe{constructor(e){super(),ue(this,e,xu,Nu,i,{text:0,href:1})}}const Fu=[_t,Ao,ra,na,oa,da,ya,ba,Ea,ja,Ya,bi,wi,Li,Xi,Ts,Ls,Ds,Bs,Us,Ks,Xs,tc,fc,Ic,Al,Tl,Il,Nl,kl,Gl,Jl,du,bu,Ou,Mu,{matches:e=>e.type===Qe,create:(e,t,r,n)=>({component:Lu,props:{text:n.text,href:n.href}})}];function zu(e){let r,n,o,a;const i=[e[4](e[2].props,e[0],e[1])];var s=e[2].component;function c(e,r){let n={};for(let e=0;e<i.length;e+=1)n=t(n,i[e]);return void 0!==r&&23&r&&(n=t(n,oe(i,[ae(e[4](e[2].props,e[0],e[1]))]))),{props:n}}s&&(r=x(s,c(e)));let l=!1===e[2].isValid&&e[0].showFieldErrors&&ku(e);return{c(){r&&ie(r.$$.fragment),n=E(),l&&l.c(),o=C()},m(e,t){r&&se(r,e,t),y(e,n,t),l&&l.m(e,t),y(e,o,t),a=!0},p(e,t){if(4&t&&s!==(s=e[2].component)){if(r){X();const e=r;re(e.$$.fragment,1,0,(()=>{ce(e,1)})),ee()}s?(r=x(s,c(e,t)),ie(r.$$.fragment),te(r.$$.fragment,1),se(r,n.parentNode,n)):r=null}else if(s){const n=23&t?oe(i,[ae(e[4](e[2].props,e[0],e[1]))]):{};r.$set(n)}!1===e[2].isValid&&e[0].showFieldErrors?l?(l.p(e,t),5&t&&te(l,1)):(l=ku(e),l.c(),te(l,1),l.m(o.parentNode,o)):l&&(X(),re(l,1,1,(()=>{l=null})),ee())},i(e){a||(r&&te(r.$$.fragment,e),te(l),a=!0)},o(e){r&&re(r.$$.fragment,e),re(l),a=!1},d(e){e&&(g(n),g(o)),r&&ce(r,e),l&&l.d(e)}}}function ku(t){let r,n;return r=new Mt({props:{error:"Field is invalid",isPaymentForm:t[3]}}),{c(){ie(r.$$.fragment)},m(e,t){se(r,e,t),n=!0},p:e,i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){ce(r,e)}}}function Du(e){let t,r,n=e[2]&&zu(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,[r]){e[2]?n?(n.p(e,r),4&r&&te(n,1)):(n=zu(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Bu(e,t,r){let n,{form:o}=t,{formActions:a}=t,i="PAYMENT"===o.formType,{formState:s}=t,{sectionElement:c}=t;return e.$$set=e=>{"form"in e&&r(5,o=e.form),"formActions"in e&&r(6,a=e.formActions),"formState"in e&&r(0,s=e.formState),"sectionElement"in e&&r(1,c=e.sectionElement)},e.$$.update=()=>{3&e.$$.dirty&&r(2,n=((e,t)=>{if(!1===t.config?.enabled||!0===t.hidden)return null;const r=Fu.find((r=>r.matches(t,o,e.currentPart,e.currentSection)));if(!r)throw`Unknown element ${JSON.stringify(t)}`;const n=r.create(o,e,a,t.config);return((e,t,r,n)=>{if(void 0!==e?.isValid){const o={partType:t.currentPart.type,sectionType:t.currentSection.type,sectionOrder:t.currentSection.order,elementType:r.type,elementOrder:r.order,isValid:e.isValid,elementId:r.config?.slug},a=t.elementValidity.find((e=>e.partType===o.partType&&e.sectionType===o.sectionType&&e.sectionOrder===o.sectionOrder&&e.elementType===o.elementType&&e.elementOrder===o.elementOrder));a?.isValid!==o.isValid&&n.updateFormState({elementValidity:[...t.elementValidity.filter((e=>e!=a)),o]})}})(n,e,t,a),n})(s,c))},[s,c,n,i,(e,t,r)=>{const a=nt(r.type,t),i=rt[a];if(i){const e={error:tt[a],errorMessage:Un(o,a),success:!1,formSlug:o.id},t=JSON.stringify(e);window?.webkit?.messageHandlers?.messageHandler?.postMessage(t),window?.AndroidFormEventListener?.processFormEvent(t)}return i?{...n.props,error:n.props.error??(i.useDymamicMessage?t.dynamicServerErrorMessage:Un(o,a))}:e},o,a]}class Uu extends pe{constructor(e){super(),ue(this,e,Bu,Du,i,{form:5,formActions:6,formState:0,sectionElement:1})}}const Vu=e=>e.parts.flatMap((e=>e.sections)).flatMap((e=>e.elements)).filter((e=>e.type===Oe)).map((e=>e.config)).reduce(((t,r)=>{const n=e.organisationConfiguration.schemaFields.find((e=>e.slug===r.slug));return n?{...t,[r.slug]:(r.defaultValue||n["select-options"]?.find((e=>e.default))?.value)??void 0}:{...t}}),{}),Gu=()=>{window.Blaize||(window.Blaize={formPreProcessors:{},formPostProcessors:{},registerFormPreProcessor:function(e,t){window.Blaize.formPreProcessors[e]||(window.Blaize.formPreProcessors[e]=[]),"function"==typeof t&&window.Blaize.formPreProcessors[e].push(t)},registerFormPostProcessor:function(e,t){window.Blaize.formPostProcessors[e]||(window.Blaize.formPostProcessors[e]=[]),"function"==typeof t&&window.Blaize.formPostProcessors[e].push(t)},preProcessFormData:function(e,t){if(window.Blaize.formPreProcessors[e]||window.Blaize.formPreProcessors["*"]){const r=[];window.Blaize.formPreProcessors["*"]&&window.Blaize.formPreProcessors["*"].forEach((function(e){r.push(e)})),window.Blaize.formPreProcessors[e]&&window.Blaize.formPreProcessors[e].forEach((function(e){r.push(e)})),r.forEach((function(e){const r=e(t);null!=r&&(t=r)}))}return t},postProcessFormData:function(e,t,r){if(window.Blaize.formPostProcessors[e]||window.Blaize.formPostProcessors["*"]){const n=[];window.Blaize.formPostProcessors["*"]&&window.Blaize.formPostProcessors["*"].forEach((function(e){n.push(e)})),window.Blaize.formPostProcessors[e]&&window.Blaize.formPostProcessors[e].forEach((function(e){n.push(e)})),n.forEach((function(e){e(t,r)}))}}})};function ju(e){let t,r;const n=e[3].default,o=l(n,e,e[2],null);return{c(){t=P("div"),o&&o.c()},m(n,a){y(n,t,a),o&&o.m(t,null),e[4](t),r=!0},p(e,[t]){o&&o.p&&(!r||4&t)&&d(o,n,e,e[2],r?p(n,e[2],t,null):m(e[2]),null)},i(e){r||(te(o,e),r=!0)},o(e){re(o,e),r=!1},d(r){r&&g(t),o&&o.d(r),e[4](null)}}}function qu(e,t,r){let n,o,{$$slots:a={},$$scope:i}=t,{form:s}=t,c=!1;const l=D();return k((()=>("undefined"!=typeof IntersectionObserver&&(o=new IntersectionObserver((e=>{const t=e[0];c=t?.isIntersecting,l("observe",t),c&&s&&(it(s,"zephr_form_view",null),o.unobserve(n))}),{threshold:.75}),n&&o.observe(n)),()=>{o&&o.disconnect()}))),e.$$set=e=>{"form"in e&&r(1,s=e.form),"$$scope"in e&&r(2,i=e.$$scope)},[n,s,i,a,function(e){U[e?"unshift":"push"]((()=>{n=e,r(0,n)}))}]}class Hu extends pe{constructor(e){super(),ue(this,e,qu,ju,i,{form:1})}}function Ku(e,t,r){const n=e.slice();return n[20]=t[r],n}function Yu(e){let t,r,n,o;t=new Hu({props:{form:e[4],$$slots:{default:[Qu]},$$scope:{ctx:e}}});let a=e[2]&&Zu(e);return{c(){ie(t.$$.fragment),r=E(),a&&a.c(),n=C()},m(e,i){se(t,e,i),y(e,r,i),a&&a.m(e,i),y(e,n,i),o=!0},p(e,r){const o={};8388611&r&&(o.$$scope={dirty:r,ctx:e}),t.$set(o),e[2]?a?(a.p(e,r),4&r&&te(a,1)):(a=Zu(e),a.c(),te(a,1),a.m(n.parentNode,n)):a&&(X(),re(a,1,1,(()=>{a=null})),ee())},i(e){o||(te(t.$$.fragment,e),te(a),o=!0)},o(e){re(t.$$.fragment,e),re(a),o=!1},d(e){e&&(g(r),g(n)),ce(t,e),a&&a.d(e)}}}function Wu(t){let r;return{c(){r=P("div"),r.textContent=`${Un(t[4],tt.UNKNOWN)}`},m(e,t){y(e,r,t)},p:e,i:e,o:e,d(e){e&&g(r)}}}function Ju(e){let t,r;return t=new Uu({props:{form:e[4],formState:e[0],formActions:e[6],sectionElement:e[20]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.formState=e[0]),1&r&&(n.sectionElement=e[20]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Qu(e){let t,r,n,o,a=ne(e[4].sectionFlow.extraElements.concat(e[0].currentSection.elements||[])),i=[];for(let t=0;t<a.length;t+=1)i[t]=Ju(Ku(e,a,t));const s=e=>re(i[e],1,1,(()=>{i[e]=null}));return{c(){t=P("form");for(let e=0;e<i.length;e+=1)i[e].c();_(t,"class","zephr-form-content svelte-1v11ws7"),N(t,"zephr-payment-options-content",e[1])},m(e,a){y(e,t,a);for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,null);r=!0,n||(o=v(t,"submit",ep),n=!0)},p(e,n){if(81&n){let r;for(a=ne(e[4].sectionFlow.extraElements.concat(e[0].currentSection.elements||[])),r=0;r<a.length;r+=1){const o=Ku(e,a,r);i[r]?(i[r].p(o,n),te(i[r],1)):(i[r]=Ju(o),i[r].c(),te(i[r],1),i[r].m(t,null))}for(X(),r=a.length;r<i.length;r+=1)s(r);ee()}(!r||2&n)&&N(t,"zephr-payment-options-content",e[1])},i(e){if(!r){for(let e=0;e<a.length;e+=1)te(i[e]);r=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)re(i[e]);r=!1},d(e){e&&g(t),b(i,e),n=!1,o()}}}function Zu(e){let t,r;return t=new Mt({props:{error:Un(e[4],e[2]),isPaymentForm:e[5]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};4&r&&(n.error=Un(e[4],e[2])),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Xu(t){let r,n,o,i,s,c,l,u,p=t[8]&&function(t){let r,n,o,a,i,s;return o=new Wt({props:{icon:Gt}}),{c(){r=P("div"),n=P("button"),ie(o.$$.fragment),_(n,"type","button"),_(n,"class","close-button svelte-1v11ws7"),_(r,"class","close-button-container svelte-1v11ws7")},m(e,c){y(e,r,c),h(r,n),se(o,n,null),a=!0,i||(s=v(n,"click",t[7]),i=!0)},p:e,i(e){a||(te(o.$$.fragment,e),a=!0)},o(e){re(o.$$.fragment,e),a=!1},d(e){e&&g(r),ce(o),i=!1,s()}}}(t);const d=[Wu,Yu],m=[];return o=1,i=m[1]=d[1](t),{c(){r=P("div"),p&&p.c(),n=E(),i.c(),N(r,"zephr-form-max-width",!t[1]),N(r,"zephr-payment-form-max-width",!t[1])},m(o,i){var d;y(o,r,i),p&&p.m(r,null),h(r,n),m[1].m(r,null),c=!0,l||(d=s=ye.call(null,r,t[3]),u=d&&a(d.destroy)?d.destroy:e,l=!0)},p(e,[t]){e[8]&&p.p(e,t),i.p(e,t),s&&a(s.update)&&8&t&&s.update.call(null,e[3]),(!c||2&t)&&N(r,"zephr-form-max-width",!e[1]),(!c||2&t)&&N(r,"zephr-payment-form-max-width",!e[1])},i(e){c||(te(p),te(i),c=!0)},o(e){re(p),re(i),c=!1},d(e){e&&g(r),p&&p.d(),m[1].d(),l=!1,u()}}}const ep=e=>e?.preventDefault();function tp(e,t,r){let n,o,a;k(Gu);let{formConfiguration:i}=t,s=(e=>({...e,parts:e.parts.sort(((e,t)=>et(e.type).order-et(t.type).order)).map((e=>({...e,sections:e.sections.sort(((e,t)=>e.order-t.order)).map((e=>({...e,elements:e.elements.sort(((e,t)=>e.order-t.order))})))})))}))(i);s.environment.debugLogging&&console.log(s);let c="PAYMENT"===s.formType,l={};const u=s.environment.previewMode&&s.environment.previewInitialState?((e,t)=>{const[r,n]=e.includes(":")?e.split(":"):[null,e];return t.parts.flatMap((e=>e.sections.map((t=>({part:e,section:t}))))).find((e=>e.section.type===n&&(!r||e.part.type===r)))})(s.environment.previewInitialState,s):null;let p=Object.freeze({currentPart:u?.part??s.parts[0],currentSection:u?.section??s.parts[0].sections[0],paymentOption:null,paymentOptionPrices:null,emailAddress:"",createPassword:"",password:"",confirmCreatePassword:"",accountMembershipCode:"",passwordIsValid:!1,elementValidity:[],canAttemptSectionCompletion:!0,showFieldErrors:!1,loginRegistrationComplete:!1,serverErrors:[],isBusy:!1,isBusyByKey:[],formCannotBeActioned:!1,forgotPassword:!1,promoCode:"",addons:[],discountedPlanPrices:[],paymentProviderFormLoaded:!1,paymentProviderError:null,paymentFormComplete:!1,paymentProviderVendorFields:null,verificationCode:"",userAttributes:Vu(s),socialSignin:!1,paymentProcessed:!1,invitationEmail:"",invitationSent:!1,validChangeFromPlans:[],taxCalculations:{},billingAddress:{country:null,postalCode:null},formPrerequisiteLoaded:!s.sectionFlow.formRequiresPrerequisiteLoading(s),dynamicOfferResult:null,originalDynamicOfferResult:null});const d=e=>(r(0,p=Object.freeze({...p,...e})),s.environment.debugLogging&&console.log(p),s.environment.onStateChanged(e,p),p),m=(e,t)=>{const r=t??"default";if(void 0===l[r]&&(l[r]=0),l[r]+=e,l[r]<0)throw"Negative request count";const n=Object.values(l).some((e=>e>0));n!==p.isBusy&&d({isBusy:n});const o=l[r]>0;o!==p.isBusyByKey[r]&&d({isBusyByKey:{...p.isBusyByKey,[r]:o}})},f={updateFormState:d,attemptCompleteSection:()=>{((e,t,r)=>{if(r.getFormState().canAttemptSectionCompletion){const t=r.updateFormState({showFieldErrors:!1});return ft(e,t,r)}r.updateFormState({showFieldErrors:!0}),Promise.resolve()})(s,0,f)},completeSection:()=>{ft(s,p,f)},jumpToPartStart:e=>{ct(e,s,f)},jumpToSection:e=>{st(e,s,f)},onEvent:e=>{s.environment.previewMode||s.sectionFlow.eventHandlers[e]?.(s,p,f)},incrementRequestCount:(e=null)=>m(1,e),decrementRequestCount:(e=null)=>m(-1,e),getFormState:()=>p,apiUrlBase:s.environment.apiUrlBase};s.environment.previewMode&&s.environment.previewBundle?.setupPreviewMode(s,f),k((()=>{f.onEvent(Ze.FORM_START),it(s,"zephr_form_render",null)}));let h=!1;const y=s.sectionFlow.canDismissFormManually(s);return e.$$set=e=>{"formConfiguration"in e&&r(9,i=e.formConfiguration)},e.$$.update=()=>{if(1&e.$$.dirty){const e=s.sectionFlow.canAttemptSectionCompletion(s,p);e!=p.canAttemptSectionCompletion&&d({canAttemptSectionCompletion:e})}1025&e.$$.dirty&&r(3,n=!h&&p.formPrerequisiteLoaded&&!p.formCannotBeActioned),1&e.$$.dirty&&r(2,o=p.serverErrors[0]&&0===(p.currentSection.elements||[]).filter((e=>nt(e.type,p))).length?p.serverErrors[0]:null),1&e.$$.dirty&&r(1,a=[...Object.values(ot)].find((e=>e.type===p.currentSection.type))?.fullWidth)},[p,a,o,n,s,c,f,()=>r(10,h=!0),y,i,h]}class rp extends pe{constructor(e){super(),ue(this,e,tp,Xu,i,{formConfiguration:9})}}const np={"--zephr-button-borderRadius":"9","--zephr-button-borderWidth":"0","--zephr-button-fontSize":"16","--zephr-button-fontWeight":"normal","--zephr-button-height":"50","--zephr-color-accent-main":"#dcf1fb","--zephr-color-accent-tinted":"#81cdf1","--zephr-color-action-main":"#006edb","--zephr-color-action-tinted":"#0f87ff","--zephr-color-background-main":"#fff","--zephr-color-background-tinted":"#ccc","--zephr-color-text-main":"#000","--zephr-color-text-tinted":"#333","--zephr-color-warning-main":"#d90b00","--zephr-color-warning-tinted":"#ff190d","--zephr-input-borderColor":"#333","--zephr-input-borderRadius":"5","--zephr-input-borderWidth":"1","--zephr-input-height":"50","--zephr-typography-title-fallbackFont":"sans-serif","--zephr-typography-title-font":"Roboto","--zephr-typography-body-fallbackFont":"sans-serif","--zephr-typography-body-font":"Roboto"};function op(e){switch(e){case vt.CHANGE_SUBSCRIPTION:case vt.PAYMENT:return"zephr-payment-form";case vt.REGISTRATION:case vt.COMPLETE_REGISTRATION:return"zephr-registration-form";case vt.CONTACT:return"zephr-contact-form";case vt.DATA_CAPTURE:return"zephr-data-capture-form";default:return""}}const ap=async e=>{if(!document.cookie?.includes("blaize_session"))return e.updateFormState({userSession:!1}),!1;let t;try{t=await lr("blaize/account",{method:"GET"},e)}catch(e){console.error(e)}if(t?.ok){const r=await t.json();e.updateFormState({userExists:!0,emailIsContact:!1,emailAddress:r.identifiers?.email_address,userSession:!0,loginRegistrationComplete:!0})}else e.updateFormState({userSession:!1});return t?.ok},ip=(e,t,r)=>t.parts.find((t=>t.type===e)).sections.flatMap((e=>e.elements)).filter((e=>e.type===Oe)).map((e=>e.config)).reduce(((e,t)=>r.userAttributes?{...e,[t.slug]:r.userAttributes[t.slug]}:{...e}),{}),sp=(e,t,r)=>401===e?t.indexOf("verification is required")>-1?tt.EMAIL_VERIFICATION_REQUIRED:t.indexOf("session must be authenticated")>-1?tt.NO_AUTHENTICATED_SESSION:r.verificationCode?tt.VERIFICATION_CODE_OR_PASSWORD_INCORRECT:tt.LOGIN_FAILED:402===e&&t?.includes("this domain is not supported.")?tt.BLOCKED_EMAIL_DOMAIN:409===e?tt.USER_ALREADY_EXISTS:400===e&&t?.includes("The provided password is not strong enough")?tt.PASSWORD_NOT_STRONG_ENOUGH:404===e&&t?.includes("account")?tt.ACCOUNT_NOT_FOUND:404===e?tt.USER_DOES_NOT_EXIST:429===e&&t?.includes("sessions limit reached")?tt.TOO_MANY_SESSIONS:429===e?tt.NO_ACCOUNT_ACCESS:r.socialSignin?tt.SOCIAL_SIGNIN_REGISTRATION_LOGIN_ERROR:403===e&&t?.includes("Contact creation not enabled")?tt.CONTACT_CREATION_NOT_ENABLED:tt.UNKNOWN_LOGIN_REGISTER_ERROR,cp=(e,t,r)=>{t.organisationConfiguration.ruleAnalyticsEnabled&&lr("zephr/public/rule-outcomes/v1/conversions",{method:"POST",bodyObject:{conversion:e,ruleId:t.ruleId,outcomeId:t.outcomeId}},r)},lp="sharing_id",up=e=>{try{const t=new URL(e);return t.searchParams.has(lp)?(t.searchParams.delete(lp),t.href):e}catch{return e}},pp=(e,t)=>t,dp=(e,t)=>{const r=Ot(e).autoApplyAttributes??{},n=window.Blaize?.preProcessFormData??pp,o={...ip(Xe.ACCOUNT_VERIFICATION.type,e,t),...r},a=(()=>{try{const e=new URLSearchParams(window.location.search).get(lp);return e?{product_sharing_id:e}:null}catch{return null}})();return n(e.id,{identifiers:{email_address:t.emailAddress},validators:{password:t.createPassword||void 0,email_otp:t.verificationCode||void 0,token_exchange:t.socialSigninToken||void 0},attributes:Object.keys(o).length?o:void 0,account_membership_code:t.accountMembershipCode||void 0,...a??{}})},mp=async(e,t,r)=>{const n=dp(e,t),o=await lr("blaize/register",{method:"POST",bodyObject:n},r);return hp(n,o,e,t,r)},fp=async(e,t,r)=>{const n=(e=>({identifiers:{email_address:e.emailAddress},validators:{password:e.password||void 0,email_otp:e.verificationCode||void 0,token_exchange:e.socialSigninToken||void 0}}))(t),o=await lr("blaize/login",{method:"POST",bodyObject:n},r);return hp(null,o,e,t,r)},hp=async(e,t,r,n,o)=>{if(it(r,e?"zephr_form_register":"zephr_form_login",{success:t?.ok}),!t?.ok){n.verificationCode&&o.updateFormState({verificationCodeValid:!1});const e=(await t.json())?.message,a=sp(t.status,e,n);return it(r,"zephr_form_error",{error:tt[a]}),a===tt.PASSWORD_NOT_STRONG_ENOUGH&&o.updateFormState({dynamicServerErrorMessage:e}),o.updateFormState({serverErrors:[a]}),rt[a].jumpToPart&&o.jumpToPartStart(rt[a].jumpToPart),Promise.resolve()}return n.userExists||((e,t)=>{cp("REGISTERED",e,t)})(r,o),t.json().then((async t=>{const a=t.cookie?.includes("blaize_session");if(a)document.cookie=t.cookie;else if(!r.sectionFlow.canPartiallyRegister)return console.warn("No cookie returned from login/register endpoint - most likely incorrect form configuration."),o.updateFormState({serverErrors:[tt.NO_COOKIE_FROM_LOGIN_REGISTER_ERROR]}),Promise.resolve();return e&&window.Blaize?.postProcessFormData&&window.Blaize.postProcessFormData(r.id,e,t),n.verificationCode&&n.currentSection.elements.some((e=>e.type===Ae))&&(o.updateFormState({verificationCodeValid:!0}),await Ra(r)),o.updateFormState({loginRegistrationComplete:!0}),o.onEvent(Ze.LOGIN_REGISTRATION_COMPLETE)}))},yp=async(e,t,r,n)=>{const o=ip(e,t,r);if(0===Object.keys(o).length)return Promise.resolve();const a=await lr("blaize/profile",{method:"PATCH",bodyObject:o},n);if(!a.ok)throw n.updateFormState({serverErrors:[tt.INVALID_USER_ATTRIBUTES]}),it(t,"zephr_form_error",{error:tt[tt.INVALID_USER_ATTRIBUTES]}),`Error submitting user attributes ${JSON.stringify(a)}`;return Promise.resolve()};let gp;const bp=new Uint8Array(16);function Pp(){if(!gp&&(gp="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gp(bp)}const Ap=[];for(let e=0;e<256;++e)Ap.push((e+256).toString(16).slice(1));var Sp={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ep(e,t,r){if(Sp.randomUUID&&!t&&!e)return Sp.randomUUID();const n=(e=e||{}).random||(e.rng||Pp)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return Ap[e[t+0]]+Ap[e[t+1]]+Ap[e[t+2]]+Ap[e[t+3]]+"-"+Ap[e[t+4]]+Ap[e[t+5]]+"-"+Ap[e[t+6]]+Ap[e[t+7]]+"-"+Ap[e[t+8]]+Ap[e[t+9]]+"-"+Ap[e[t+10]]+Ap[e[t+11]]+Ap[e[t+12]]+Ap[e[t+13]]+Ap[e[t+14]]+Ap[e[t+15]]}(n)}const Cp=(e,t,r)=>yp(Xe.PAYMENT.type,e,t,r).then((()=>(null==t.mobilePaymentService?ro(e.organisationConfiguration.paymentProvider).completer:no(e.organisationConfiguration.paymentProvider).completer)(e,t,r).then((()=>{const n={error:null,errorMessage:"",success:!0,formSlug:e.id},o=JSON.stringify(n);if(window?.webkit?.messageHandlers?.messageHandler?.postMessage(o),window?.AndroidFormEventListener?.processFormEvent(o),((e,t)=>{cp(Ot(e).changeSubscriptionMode?Ot(e).changeSubscriptionConversionName??"CHANGE_SUBSCRIPTION":"CUSTOMER",e,t)})(e,r),r.updateFormState({paymentProcessed:!0}),it(e,"zephr_form_purchase",{productId:t.paymentOption.productId,planId:t.paymentOption.slug,price:t.paymentOptionPrices?.totalPrice}),it(e,"purchase",{ecommerce:{transaction_id:Ep(),value:t.paymentOptionPrices?.totalPrice,tax:t.paymentOptionPrices?.taxPrice,currency:fn(e,t),coupon:t.promoCode,items:[{item_id:t.paymentOption.slug,item_name:t.paymentOption.productId,price:t.paymentOptionPrices?.totalPrice,quantity:1}]}}),t.convertCancelSubscriptionToAcceptOffer&&it(e,"zephr_form_subscription_cancel_accept_offer",{canceledProductId:t.selectedSubscription.productId,acceptedProductId:t.paymentOption.productId,productLabel:t.paymentOption.label,currency:t.paymentOption.currencyCode,amount:t.paymentOptionPrices?.totalPrice}),r.jumpToPartStart(Xe.SUCCESS.type),Ot(e).changeSubscriptionMode){const r=t.validChangeFromPlans.find((e=>t.paymentOption.slug===e.planSlug&&t.paymentOption.productId===e.productId)).changesFromSubscription;it(e,"zephr_form_subscription_change",{fromProductId:r.productId,fromProductAmount:r.amount,toProductId:t.paymentOption.productId,toProductAmount:t.paymentOptionPrices.netPriceFormattedString})}})).catch((n=>{const o=null==t.mobilePaymentService?tt.PAYMENT_PROCESSING_ERROR:tt.MOBILE_PAYMENT_PROCESSING_ERROR;console.error("Error completing payment",n),it(e,"zephr_form_payment_failure",{reason:n}),r.updateFormState({mobilePaymentService:null,serverErrors:[o]}),it(e,"zephr_form_error",{error:tt[o]})})))),vp=async(e,t,r)=>{if(!Ot(e).changeSubscriptionMode)return;r.updateFormState({changeSubscriptionProrate:null});const n=ro(e.organisationConfiguration.paymentProvider).changeSubscriptionProrateCalculator;if(!n)return;const o=await n(e,t,r);r.updateFormState({changeSubscriptionProrate:o})},Tp=e=>new URL(e).searchParams.get("subscription"),_p=(e,t)=>0===e.length?[]:Ot(t).paymentOptions.map((r=>{const n=(Ot(t).changeSubscriptionPlanMappings??[]).find((e=>e.toPlan.planSlug===r.slug&&e.toPlan.productId===r.productId));if(!n)return;const o=e.filter((e=>!(e.planId===r.slug&&e.productId===r.productId)&&(n.fromAnyPlan||n.fromPlans.some((t=>t.planSlug===e.planId&&t.productId===e.productId)))));return 0!==o.length?(o.length>1&&console.log("Found multiple valid subscriptions to move to payment option, selecting the first",r),{planSlug:r.slug,productId:r.productId,changesFromSubscription:e[0]}):void 0})).filter(Boolean),Op=async(e,t,r,n,o)=>{const a=ro(e.organisationConfiguration.paymentProvider).existingSubscriptionLoader;if(!a)return console.error(`Existing subscription loader not configured for ${e.organisationConfiguration.paymentProvider}`),void r.updateFormState({formCannotBeActioned:!0});let i;try{i=await a(e,t,r,!0)}catch(e){return console.error("Unable to load subscriptions",e),void r.updateFormState({formCannotBeActioned:!0})}const s=Tp(window.location.href);if(s){const t=i.filter((e=>e.externalId===s));t.length&&_p(t,e).length&&(i=t)}if(n)return void wp(i,t,r);const c=_p(i,e),l=Ot(e).subscriptionSelectionMode;return 0===i.length?console.warn("Not showing form as user has no active subscriptions"):0===c.length&&!l&&o&&console.warn("Not showing form as no payment options can be actioned with the user's current subscriptions"),l&&(i=i.map((t=>(Ot(e).changeSubscriptionPlanMappings.some((e=>e.fromAnyPlan||e.fromPlans.some((e=>e.planSlug===t.planId&&e.productId===t.productId))))?t.cannotBeChanged=!1:t.cannotBeChanged=!0,t)))),r.updateFormState({existingSubscriptions:i,formCannotBeActioned:0===c.length&&!l&&o,validChangeFromPlans:c,formPrerequisiteLoaded:!0}),i},wp=(e,t,r)=>{if(0===e.length)return console.log("No subscriptions available."),void r.updateFormState({existingSubscriptions:[],formCannotBeActioned:!0,validChangeFromPlans:[],formPrerequisiteLoaded:!0});const n=t.dynamicOfferResult;n||console.log("No dynamic offer result available.");const o=n?.products?.flatMap((t=>t.paymentPlans.filter((r=>{const n=e.some((e=>e.planId===r.planId&&e.productId===t.id)),o=e.every((e=>r.charges.every((t=>t.prices?.some((t=>t.currency===e.currency))))));return!n&&o})).map((r=>({planSlug:r.planId,productId:t.id,changesFromSubscription:e.find((e=>r.charges.every((t=>t.prices?.some((t=>t.currency===e.currency))))))}))).filter((e=>!!e.changesFromSubscription))))??[];r.updateFormState({existingSubscriptions:e,formCannotBeActioned:0===o.length,validChangeFromPlans:o,formPrerequisiteLoaded:!0})};let Ip;const Rp=new Promise((function(e){Ip=e})),$p={[Ze.FORM_START]:async(e,t,r)=>{const n=!!Ot(e).dynamicOffer?.id||!!Ot(e).dynamicOfferPreview;return n&&await(async(e,t)=>{const r=Ot(e).dynamicOffer?.id,n=Ot(e).dynamicOfferPreview;if(e.environment.previewMode)return void t.updateFormState({dynamicOfferResult:n});let o;try{o=document.cookie.match(/blaize_session=[0-9a-z-]+/)[0].substring(15)}catch{o=null}if(!r)throw Error("Missing Dynamic Offer id");const a=await lr("zephr/public/decisions/v2/dynamic-offers",{method:"POST",bodyObject:{dynamic_offer:{slug:r},session:o}},t),i=await a.json();t.updateFormState({dynamicOfferResult:i})})(e,r).catch((e=>{console.error("Error loading Dynamic Offer",e)})),ap(r).then((async t=>{if(Ip(Ip),Ot(e).changeSubscriptionMode){r.updateFormState({formCannotBeActioned:!t}),await Op(e,r.getFormState(),r,n,!0);Tp(window.location.href)&&1===r.getFormState().existingSubscriptions.length&&r.jumpToPartStart(Xe.PLAN_SELECT.type)}}))},[Ze.LOGIN_REGISTRATION_COMPLETE]:(e,t,r)=>un(e,r.getFormState(),r).then((()=>oo(e,r.getFormState(),r))).then((()=>r.jumpToPartStart(Xe.PAYMENT.type))),[Ze.SECTION_EMAIL_COMPLETE]:_a,[Ze.SECTION_PASSWORD_RESET_COMPLETE]:Na,[Ze.SECTION_FORGOT_PASSWORD_COMPLETE]:$a,[Ze.PART_PLAN_SELECT_COMPLETE]:(e,t,r)=>Rp.then((async()=>{const n=r.getFormState();if(n.userSession||n.loginRegistrationComplete){const t=await un(e,n,r);oo(e,t,r),vp(e,t,r),r.jumpToPartStart(Xe.PAYMENT.type)}else oo(e,t,r),vp(e,t,r),r.jumpToPartStart(Xe.ACCOUNT_VERIFICATION.type)})),[Ze.PART_ACCOUNT_VERIFICATION_COMPLETE]:(e,t,r)=>(t.userExists?fp:mp)(e,t,r),[Ze.PART_PAYMENT_COMPLETE]:Cp,[Ze.PART_SUCCESS_COMPLETE]:(e,t,r)=>yp(Xe.SUCCESS.type,e,t,r).then((()=>{window.location.reload()})),[Ze.SELECT_SUBSCRIPTION_COMPLETE]:(e,t,r)=>{const n=_p([t.selectedSubscription],e);r.updateFormState({existingSubscriptions:[t.selectedSubscription],formCannotBeActioned:0===n.length,validChangeFromPlans:n,formPrerequisiteLoaded:!0}),r.jumpToPartStart(Xe.PLAN_SELECT.type)}},Mp=[{type:ot.EMAIL.type,isDisplayedInProgressBar:!0,isVisible:e=>!Ot(e).changeSubscriptionMode},{type:ot.LOGIN_PASSWORD.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>Ot(e).usePassword&&t.userExists&&!t.socialSignin},{type:ot.PASSWORD_SETUP.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>Ot(e).usePassword&&!t.userExists&&!t.socialSignin},{type:ot.SUCCESS.type,isDisplayedInProgressBar:!1,isVisible:()=>!0},{type:ot.PASSWORD_RESET.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>Ot(e).usePassword&&t.forgotPassword},{type:ot.FORGOT_PASSWORD.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>Ot(e).usePassword&&t.forgotPassword},{type:ot.VERIFICATION_CODE_LOGIN.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>(t.userExists&&(Ot(e).useVerificationCodes||t.socialSignin))??!1},{type:ot.VERIFICATION_CODE_REGISTRATION.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>(!t.userExists&&(Ot(e).useVerificationCodes||t.emailIsContact))??!1},{type:ot.REGISTRATION_CUSTOM.type,isDisplayedInProgressBar:!0,isVisible:(e,t)=>!t.userExists}],Np={extraElements:[{type:Ce,order:-1}],sectionVisibilities:Mp,eventHandlers:$p,canAttemptSectionCompletion:(e,t)=>{const r=ro(e.organisationConfiguration.paymentProvider);return!t.elementValidity.filter((e=>e.partType===t.currentPart.type&&e.sectionType===t.currentSection.type&&e.sectionOrder===t.currentSection.order)).filter((e=>!(e.elementType===Ee&&r.canAttemptIncompletePaymentFormSubmission&&t.paymentProviderFormLoaded))).some((e=>!e.isValid))},canDismissFormManually:e=>Ot(e).changeSubscriptionMode,formRequiresPrerequisiteLoading:e=>Ot(e).changeSubscriptionMode},xp={extraElements:[],eventHandlers:{[Ze.LOGIN_REGISTRATION_COMPLETE]:async(e,t,r)=>{const n=Ot(e),o=Ta(e);return!t.userExists&&(o||e.organisationConfiguration.requireEmailVerfication&&!n.useVerificationCodes)?(await va(e,"register",t.emailAddress,r),await st(ot.EMAIL_VERIFIED.type,e,r),Promise.resolve()):(n.showSuccessOnFormCompletion&&!t.userExists?await st(ot.SUCCESS.type,e,r):(window.location.href=up(window.location.href),window.flowpoint&&window.flowpoint.track("Registration/Login Form Submitted")),Promise.resolve())},[Ze.SECTION_EMAIL_COMPLETE]:_a,[Ze.SECTION_PASSWORD_RESET_COMPLETE]:Na,[Ze.SECTION_FORGOT_PASSWORD_COMPLETE]:$a,[Ze.PART_ACCOUNT_VERIFICATION_COMPLETE]:(e,t,r)=>(t.userExists?fp:mp)(e,t,r),[Ze.PART_SUCCESS_COMPLETE]:()=>(window.location.href=up(window.location.href),window.flowpoint&&window.flowpoint.track("Registration/Login Form Submitted"),Promise.resolve())},sectionVisibilities:[{type:ot.EMAIL.type,isDisplayedInProgressBar:!0,isVisible:()=>!0},{type:ot.LOGIN_PASSWORD.type,isDisplayedInProgressBar:!0,isVisible:(e,t)=>Ot(e).usePassword&&t.userExists&&!t.socialSignin},{type:ot.PASSWORD_SETUP.type,isDisplayedInProgressBar:!0,isVisible:(e,t)=>Ot(e).usePassword&&!t.userExists&&!t.socialSignin},{type:ot.PASSWORD_RESET.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>Ot(e).usePassword&&t.forgotPassword},{type:ot.FORGOT_PASSWORD.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>Ot(e).usePassword&&t.forgotPassword},{type:ot.VERIFICATION_CODE_LOGIN.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>(t.userExists&&(Ot(e).useVerificationCodes||t.socialSignin))??!1},{type:ot.VERIFICATION_CODE_REGISTRATION.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>(!t.userExists&&(Ot(e).useVerificationCodes||t.emailIsContact))??!1},{type:ot.REGISTRATION_CUSTOM.type,isDisplayedInProgressBar:!0,isVisible:(e,t)=>!t.userExists},{type:ot.SUCCESS.type,isDisplayedInProgressBar:!1,isVisible:()=>!0},{type:ot.EMAIL_VERIFIED.type,isDisplayedInProgressBar:!1,isVisible:e=>e.organisationConfiguration.requireEmailVerfication&&!Ot(e).useVerificationCodes},{type:ot.PASSWORDLESS_VIA_LOGIN_LINK.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>t.userExists&&Ta(e)}],canAttemptSectionCompletion:(e,t)=>!t.elementValidity.filter((e=>e.partType===t.currentPart.type&&e.sectionType===t.currentSection.type&&e.sectionOrder===t.currentSection.order)).some((e=>!e.isValid)),canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!1,canPartiallyRegister:!0},Lp=(e,t)=>t,Fp=async(e,t,r)=>{const n=((e,t)=>{const r=Ot(e).autoApplyAttributes??{},n=window.Blaize?.preProcessFormData??Lp,o={...ip(Xe.CONTACT_VERIFICATION.type,e,t),...r};return n(e.id,{identifiers:{email_address:t.emailAddress},attributes:Object.keys(o).length?o:void 0})})(e,t);return(async(e,t,r,n,o)=>{const a=await t.json();if(t?.ok)return cp("CONTACT",r,o),window.Blaize?.postProcessFormData&&window.Blaize.postProcessFormData(r.id,e,a),Promise.resolve(!0);const i=sp(t.status,a?.message,n);return o.updateFormState({serverErrors:[i]}),it(r,"zephr_form_error",{error:tt[i]}),rt[i].jumpToPart&&o.jumpToPartStart(rt[i].jumpToPart),Promise.resolve(!1)})(n,await lr("zephr/createContact",{method:"POST",bodyObject:n},r),e,t,r)},zp={extraElements:[],eventHandlers:{[Ze.FORM_START]:async(e,t,r)=>{await ap(r)},[Ze.PART_CONTACT_VERIFICATION_COMPLETE]:async(e,t,r)=>{const n=Ot(e);try{await Fp(e,t,r),n.showSuccessOnFormCompletion?await ct(Xe.SUCCESS.type,e,r):window.location.reload()}catch(t){console.error(t),await st(ot.EMAIL.type,e,r)}}},sectionVisibilities:[{type:ot.EMAIL.type,isDisplayedInProgressBar:!1,isVisible:()=>!0},{type:ot.REGISTRATION_CUSTOM.type,isDisplayedInProgressBar:!1,isVisible:(e,t)=>!t.userExists}],canAttemptSectionCompletion:(e,t)=>!t.elementValidity.filter((e=>e.partType===t.currentPart.type&&e.sectionType===t.currentSection.type&&e.sectionOrder===t.currentSection.order)).some((e=>!e.isValid)),canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!1},kp=(e,t)=>t,Dp=async(e,t,r,n)=>{const o=((e,t,r)=>{const n=window.Blaize?.preProcessFormData??kp,o=ip(r,e,t),a=Ot(e).autoApplyAttributes??{};return n(e.id,{...o,...a,...t.createPassword&&{"blaize-validator":t.createPassword}})})(e,t,n);t.fireCancelationReasonEvent&&r.updateFormState({cancelationReasonAttributes:o});return(async(e,t,r,n,o,a)=>{if(t?.ok){n.formType==vt.UPDATE_PROFILE&&it(n,"zephr_form_profile_update",{success:t?.ok,...Object.entries(r).reduce(((e,[t,r])=>({...e,[`attr_${t}`]:r})),{})}),n.formType==vt.DATA_CAPTURE&&(cp("Data Captured",n,a),it(n,"zephr_form_data_capture",{success:t?.ok,...Object.entries(r).reduce(((e,[t,r])=>({...e,[`attr_${t}`]:r})),{})})),n.formType==vt.COMPLETE_REGISTRATION&&(cp("Completed Registration",n,a),it(n,"zephr_form_complete_registration",{success:t?.ok,...Object.entries(r).reduce(((e,[t,r])=>({...e,[`attr_${t}`]:r})),{})}));const o=await t.json();return e&&window.Blaize?.postProcessFormData&&window.Blaize.postProcessFormData(n.id,e,o),Promise.resolve(!0)}const i=(await t.json())?.message,s=sp(t.status,i,o);return a.updateFormState({serverErrors:[s]}),it(n,"zephr_form_error",{error:tt[s]}),Promise.resolve(!1)})(o,await lr("blaize/profile",{method:"PATCH",bodyObject:o},r),ip(n,e,t),e,t,r)},Bp={extraElements:[],eventHandlers:{[Ze.FORM_START]:async(e,t,r)=>{const n=e.parts.map((e=>e.sections)).reduce(((e,t)=>{const r=t.map((e=>e.elements.filter((e=>"user_attribute"==e.type&&e.config.hideIfSet)).map((e=>e.config.slug))));return e.concat(r)}),[]).flat(),o=[];try{const a=await lr("blaize/profile",{method:"GET"},r);if(a?.ok){const i=await a.json();Ot(e).autoApplyAttributes&&Object.keys(Ot(e).autoApplyAttributes).forEach((e=>{Object.prototype.hasOwnProperty.call(i,e)&&delete i[e]})),n.forEach((e=>{Object.prototype.hasOwnProperty.call(i,e)&&o.push(e)})),o.length==Object.keys(t.userAttributes).length&&e.formType!=vt.COMPLETE_REGISTRATION?console.warn("Not showing form as user has no attributes to update"):r.updateFormState({formPrerequisiteLoaded:!0,hideIfSetAttributes:o,userAttributes:{...i}})}}catch(e){console.error(e)}},[Ze.PART_PROFILE_UPDATE_COMPLETE]:async(e,t,r)=>{const n=Ot(e);try{await Dp(e,t,r,Xe.PROFILE_UPDATE.type).then((async t=>{t&&n.showSuccessOnFormCompletion?await ct(Xe.SUCCESS.type,e,r):t&&window.location.reload()}))}catch(e){console.error(e)}}},sectionVisibilities:[],canAttemptSectionCompletion:(e,t)=>!t.elementValidity.filter((e=>e.partType===t.currentPart.type&&e.sectionType===t.currentSection.type&&e.sectionOrder===t.currentSection.order)).some((e=>!e.isValid)),canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!0},Up=async(e,t,r)=>{r.incrementRequestCount();try{await Promise.all([Gp(r),jp(r)])}finally{r.decrementRequestCount()}},Vp=async(e,t,r,n)=>{r.updateFormState({emailAddress:null,password:null,createPassword:null,passwordIsValid:null,verificationCode:null,currentPassword:null,serverErrors:[]}),n?await Up(0,0,r):Up(0,0,r),await ct(Xe.PROFILE_UPDATE.type,e,r)},Gp=async e=>{try{const t=await lr("blaize/profile",{method:"GET"},e),r=await t.json();e.updateFormState({readOnlyAttributeValues:r})}catch(e){console.error("Unable to load user profile",e)}},jp=async e=>{try{const t=await lr("blaize/account",{method:"GET"},e),r=(await t.json())?.identifiers.email_address;e.updateFormState({readOnlyEmail:r})}catch(e){console.error("Unable to load user email",e)}},qp={extraElements:[],eventHandlers:{[Ze.FORM_START]:Up,[Ze.GO_BACK]:async(e,t,r)=>Vp(e,t,r,!1),[Ze.UPDATE]:async(e,t,r)=>{await ct(Xe.ATTRIBUTES_UPDATE.type,e,r)},[Ze.PART_EMAIL_UPDATE_COMPLETE]:async(e,t,r)=>{const n=await(async(e,t,r)=>{try{const n=!t.password,o={current_identifiers:{email_address:t.readOnlyEmail},new_identifiers:{email_address:t.emailAddress},...n?{}:{validators:{password:t.password}}},a=await lr(n?"blaize/users/update-email":"zephr/users/update-email",{method:"POST",bodyObject:o},r);return it(e,"zephr_form_email_update_code_sent",{success:a?.ok}),!!a.ok||(r.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]}),!1)}catch(t){return r.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]}),!1}})(e,t,r);n&&await ct(Xe.EMAIL_UPDATE_OTP.type,e,r)},[Ze.VERIFY_EMAIL_UPDATE_OTP]:async(e,t,r)=>{const n=await(async(e,t,r)=>{r.incrementRequestCount(),r.updateFormState({verificationCodeValid:void 0});const n=await lr(`zephr/users/update-email/${t.verificationCode}`,{method:"POST",bodyObject:{current_identifiers:{email_address:t.readOnlyEmail}}},r);return it(e,"zephr_form_password_reset_code_validate",{success:n?.ok}),n.ok?(await Ra(e),r.decrementRequestCount(),!0):(r.updateFormState({serverErrors:[tt.VERIFICATION_CODE_INCORRECT]}),it(e,"zephr_form_error",{error:tt[tt.VERIFICATION_CODE_INCORRECT]}),r.decrementRequestCount(),!1)})(e,t,r);n&&await Vp(e,t,r,!0)},[Ze.PART_PASSWORD_UPDATE_COMPLETE]:async(e,t,r)=>{const n=await(async(e,t,r)=>{try{const n={current_validators:{password:t.currentPassword},new_validators:{password:t.createPassword}},o=await lr("zephr/users/change-password",{method:"POST",bodyObject:n},r);return it(e,"zephr_form_password_update_code_sent",{success:o?.ok}),!!o.ok||(r.updateFormState({serverErrors:[tt.UNKNOWN]}),!1)}catch(e){return r.updateFormState({serverErrors:[tt.UNKNOWN]}),!1}})(e,t,r);n&&await ct(Xe.PASSWORD_UPDATE_OTP.type,e,r)},[Ze.VERIFY_PASSWORD_UPDATE_OTP]:async(e,t,r)=>{const n=await(async(e,t,r)=>{r.incrementRequestCount(),r.updateFormState({verificationCodeValid:void 0});const n=await lr(`zephr/users/change-password/${t.verificationCode}`,{method:"GET"},r);return it(e,"zephr_form_password_update_code_validate",{success:n?.ok}),n.ok?(await Ra(e),r.decrementRequestCount(),!0):(r.updateFormState({serverErrors:[tt.VERIFICATION_CODE_INCORRECT]}),it(e,"zephr_form_error",{error:tt[tt.VERIFICATION_CODE_INCORRECT]}),r.decrementRequestCount(),!1)})(e,t,r);n&&await Vp(e,t,r,!0)},[Ze.PART_ATTRIBUTES_UPDATE_COMPLETE]:async(e,t,r)=>{await Dp(e,t,r,Xe.ATTRIBUTES_UPDATE.type)&&await Vp(e,t,r,!0)}},sectionVisibilities:[],canAttemptSectionCompletion:(e,t)=>!t.elementValidity.filter((e=>e.partType===t.currentPart.type&&e.sectionType===t.currentSection.type&&e.sectionOrder===t.currentSection.order)).some((e=>!e.isValid)),canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!1},Hp=async(e,t,r,n)=>{const o=ro(e.organisationConfiguration.paymentProvider)?.existingSubscriptionLoader;o||console.error(`Existing subscription loader not configured for ${e.organisationConfiguration.paymentProvider}`);const a=o?await o(e,t,r,n):[];return r.updateFormState({existingSubscriptions:a}),a},Kp=async(e,t)=>{const r=t.getFormState();try{(await lr(`zephr/subscriptions/${r.selectedSubscription.externalId}`,{method:"DELETE"},t)).ok?(r.fireCancelationReasonEvent&&it(e,"zephr_form_subscription_cancel_reason",{productId:r.selectedSubscription.productId,...Object.entries(r.cancelationReasonAttributes).reduce(((e,[t,r])=>({...e,[`attr_${t}`]:r})),{})}),it(e,"zephr_form_subscription_cancel",{productId:r.selectedSubscription.productId,productLabel:r.selectedSubscription.productLabel,currency:r.selectedSubscription.currency,amount:r.selectedSubscription.amount}),e.parts.some((e=>e.type==Xe.CANCEL_SUCCESS.type))?t.jumpToPartStart(Xe.CANCEL_SUCCESS.type):t.jumpToPartStart(Xe.SUCCESS.type)):(t.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]}))}catch(r){console.error("Error occurred while cancelling subscription.",r),t.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]})}},Yp={extraElements:[],eventHandlers:{[Ze.FORM_START]:async(e,t,r)=>{const n=Ot(e).hasSaveOffer?await Op(e,t,r,!1,!1):await Hp(e,t,r,!0),o=Tp(window.location.href);if(!o)return;const a=n.find((e=>e.externalId===o));a&&(r.updateFormState({selectedSubscription:a,isExternalReferrer:!0}),r.completeSection())},[Ze.SELECT_SUBSCRIPTION_COMPLETE]:async(e,t,r)=>{Ot(e).hasCancelReason?(r.updateFormState({fireCancelationReasonEvent:!0,cancelFlowSubscriptionSelectedId:t.selectedSubscription.externalId}),r.jumpToPartStart(Xe.ATTRIBUTES_UPDATE.type)):0===t.validChangeFromPlans.length?await Kp(e,r):Ot(e).hasSaveOffer?(r.updateFormState({cancelFlowSubscriptionSelectedId:t.selectedSubscription.externalId}),r.jumpToPartStart(Xe.PLAN_SELECT.type)):await Kp(e,r)},[Ze.GO_BACK]:async(e,t,r)=>(r.jumpToPartStart(Xe.SELECT_SUBSCRIPTION.type),Promise.resolve()),[Ze.PART_PLAN_SELECT_COMPLETE]:async(e,t,r)=>{if(t.confirmCancel)await Kp(e,r);else{const t=r.getFormState(),n=await un(e,t,r);oo(e,n,r),vp(e,n,r),r.updateFormState({convertCancelSubscriptionToAcceptOffer:!0}),r.jumpToPartStart(Xe.PAYMENT.type)}},[Ze.PART_PAYMENT_COMPLETE]:Cp,[Ze.PART_ATTRIBUTES_UPDATE_COMPLETE]:async(e,t,r)=>{await Dp(e,t,r,Xe.ATTRIBUTES_UPDATE.type)&&(0===t.validChangeFromPlans.length?await Kp(e,r):Ot(e).hasSaveOffer?r.jumpToPartStart(Xe.PLAN_SELECT.type):await Kp(e,r))}},sectionVisibilities:[],canAttemptSectionCompletion:()=>!0,canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!1},Wp={[Ze.FORM_START]:async(e,t,r)=>{await Hp(e,t,r,!1)},[Ze.GO_BACK]:async(e,t,r)=>(r.jumpToPartStart(Xe.LIST_SUBSCRIPTIONS.type),Promise.resolve()),[Ze.PART_CHANGE_PAYMENT_COMPLETE]:async(e,t,r)=>{const n=ro(e.organisationConfiguration.paymentProvider).changePaymentCompleter;await n(e,t,r).then((()=>{r.updateFormState({paymentProviderFormBusy:!1}),r.jumpToPartStart(Xe.SUCCESS.type),it(e,"zephr_form_payment_method_changed",null)})).catch((n=>{const o=null==t.mobilePaymentService?tt.PAYMENT_PROCESSING_ERROR:tt.MOBILE_PAYMENT_PROCESSING_ERROR;console.error("Error completing payment change",n),r.updateFormState({mobilePaymentService:null,paymentProviderFormBusy:!1,serverErrors:[o]}),it(e,"zephr_form_error",{error:tt[o]})}))}},Jp={extraElements:[{type:Ce,order:-1}],eventHandlers:Wp,sectionVisibilities:[],canAttemptSectionCompletion:(e,t)=>!t.elementValidity.filter((e=>e.partType===t.currentPart.type&&e.sectionType===t.currentSection.type&&e.sectionOrder===t.currentSection.order)).some((e=>!e.isValid)),canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!1},Qp={extraElements:[],eventHandlers:{[Ze.FORM_START]:async(e,t,r)=>{await lu(e,t,r)}},sectionVisibilities:[],canAttemptSectionCompletion:(e,t)=>!t.elementValidity.filter((e=>e.partType===t.currentPart.type&&e.sectionType===t.currentSection.type&&e.sectionOrder===t.currentSection.order)).some((e=>!e.isValid)),canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!1},Zp={[vt.PAYMENT]:Np,[vt.CHANGE_SUBSCRIPTION]:Np,[vt.REGISTRATION]:xp,[vt.CONTACT]:zp,[vt.DATA_CAPTURE]:Bp,[vt.COMPLETE_REGISTRATION]:Bp,[vt.UPDATE_PROFILE]:qp,[vt.CANCEL_SUBSCRIPTION]:Yp,[vt.LIST_SUBSCRIPTIONS]:Jp,[vt.DEVICES]:Qp,[vt.EMPTY]:{extraElements:[],sectionVisibilities:[],eventHandlers:{},canAttemptSectionCompletion:()=>!0,canDismissFormManually:()=>!1,formRequiresPrerequisiteLoading:()=>!1}},Xp=Date.parse("2024-04-19T00:00:00Z"),ed={"--zf-container-color":"unset","--zf-container-bgColor":"#fff","--zf-container-borderRadius":"0","--zf-input-bgColor":"#fff","--zf-payment-options-border":"1px solid #000","--zf-payment-options-color":"#000","--zf-payment-options-bgColor":"#fff","--zf-payment-summary-border":"1px solid #000","--zf-payment-summary-borderRadius":"0","--zf-payment-summary-color":"unset","--zf-payment-summary-bgColor":"transparent"},td=(e,t)=>(t||0)<Xp?((e,t)=>`${e};\n${Object.entries(t).map((([e,t])=>`${e}: ${t}`)).join(";\n")}`)(e,ed):e;function rd(e){let t,r,n,o;return r=new rp({props:{formConfiguration:e[2]}}),{c(){t=P("div"),ie(r.$$.fragment),_(t,"id",e[2].formId),_(t,"class",n=f(`zephr-form ${op(e[0])}`)+" svelte-jjl1p8"),_(t,"style",e[1])},m(e,n){y(e,t,n),se(r,t,null),o=!0},p(e,[r]){(!o||1&r&&n!==(n=f(`zephr-form ${op(e[0])}`)+" svelte-jjl1p8"))&&_(t,"class",n)},i(e){o||(te(r.$$.fragment,e),o=!0)},o(e){re(r.$$.fragment,e),o=!1},d(e){e&&g(t),ce(r)}}}function nd(e,t,r){let{formType:n}=t,{formConfig:o}=t,{formTypeConfig:a}=t,{organisationConfig:i}=t,{environment:s={}}=t;const c={apiUrlBase:"",onStateChanged:()=>{},debugLogging:!1,reduceDelays:!1,previewMode:!1,...s,...o?._spikeApiUrl?{apiUrlBase:o._spikeApiUrl}:{}},l=JSON.parse(i.siteStyles??"{}"),u=td((e=>{const t={},r=(e,n)=>{null!==e&&"object"==typeof e?Object.entries(e).forEach((([e,t])=>{r(t,n.concat(`${n?"-":""}${e}`))})):t[`--zephr-${n}`]=e};return r(e,""),Object.entries({...np,...t}).map((([e,t])=>`${e}: ${t}`)).join(";\n")})(l),o.timestamp),p=(e=>{const t=Zp[e];if(!t)throw`No flow for form type ${e}`;return t})(n),d=jn(o.languagePack,o),m=jn(o.languagePack,a),f=jn(o.languagePack,i),h=ac(),y=n===vt.PAYMENT,g={environment:c,formType:n,...d,organisationConfiguration:f,typeConfiguration:m,sectionFlow:p,uniqueKey:h,formId:y?"zephr-payment-form-root":`zephr-form-root-${h}`};return e.$$set=e=>{"formType"in e&&r(0,n=e.formType),"formConfig"in e&&r(3,o=e.formConfig),"formTypeConfig"in e&&r(4,a=e.formTypeConfig),"organisationConfig"in e&&r(5,i=e.organisationConfig),"environment"in e&&r(6,s=e.environment)},[n,u,g,o,a,i,s]}class od extends pe{constructor(e){super(),ue(this,e,nd,rd,i,{formType:0,formConfig:3,formTypeConfig:4,organisationConfig:5,environment:6})}}null==window.Zephr&&(window.Zephr={}),window.Zephr.renderForm=(e,t)=>{const r="string"==typeof e||e instanceof String?document.getElementById(e):e;return new od({target:r,props:t})},window.Zephr.translateFormProps=(e,t)=>{if("main:1"===e)return t;throw`Unknown props version ${e}`}}();
</script>
                        <style>.zephr-form-max-width.zephr-payment-form-max-width {
    background-image: url(https://www.sciencenews.org/wp-content/themes/sciencenews/client/src/images/cta-module@2x.jpg);
    padding:20px;
    max-width: 700px;
}

.zephr-form-custom-text > p {
    display: none;
}

form.zephr-form-content {
    opacity: .9;
}

label.zephr-form-checkbox-label {
    font-size: 1.2rem;
    font-weight: bolder;
}

.zephr-form-custom-text > h4 {
    color: black !important;
}

button.zephr-form-button {
    background: #d4441f !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
}

label.zephr-payment-form-checkbox-label {
    color: white;
    font-size: 1.6rem;
}

.zephr-form-content {
    background:#2f537f;
    
}

.zephr-payment-form-custom-text {
    margin-top: .2rem;
}

.zephr-payment-form-checkbox-label {
    display: flex;
    align-items: center;
    font-family: var(--zephr-typography-body-font), var(--zephr-typography-body-fallbackFont);
    color: white;
    font-weight: bold;
}</style>
                        <div id="zephr-form-y5kaMK" class="zephr-form-container">
                        </div>
                        <script data-cmp-ab="2">
                            var element = document.currentScript;
                            while(!(element.classList && element.classList.contains('zephr-form-container'))){
                                element = element.previousSibling;
                            }
                            window.Zephr.renderForm(element, window.Zephr.translateFormProps("main:1", {"formType":"CONTACT","formConfig":{"parts":[{"type":"contact-verification","sections":[{"type":"email","order":0,"elements":[{"type":"text","id":"a08fe022-52e9","config":{"text":"<h2 style=\"color: black;\"><strong>The best of Science News - direct to your inbox</strong></h2>","centerText":true},"order":0},{"type":"text","id":"1ec91bf0-5648","config":{"text":"<p>Headlines and summaries of the latest Science News articles, delivered to your email inbox every Thursday.</p>","centerText":true},"order":1},{"type":"email_address","id":"0286f144-7648","config":{"label":"Email","placeholder":"Your email address"},"order":2},{"type":"button","id":"5d0a78e3-0f24","config":{"text":"Continue","isSubmit":false},"order":3}]},{"type":"custom_a146ace6-2112-4543-961b-a4fb19054859","label":"Additional Section 1","order":1,"elements":[{"type":"user_attribute","order":0,"id":"b31472bb-e1ae-483a-aaec-148d5048fbae","config":{"slug":"general-newsletter","label":"Latest from Science News","defaultValue":true}},{"type":"text","order":1,"id":"c56e9e3c-c6c3-4d32-a695-dac1c340261c","config":{"text":"<p style=\"font-size: 12px; text-align: left;\">All the major breakthroughs of the week delivered every Thursday.</p>","centerText":true}},{"type":"user_attribute","order":2,"id":"7eb05539-2f18-428c-a489-286ce42642ad","config":{"slug":"health--medicine-newsletter","label":"Health & Medicine"}},{"type":"text","order":3,"id":"ff6b563b-479d-419f-9d71-1b750c8cb56e","config":{"text":"<p style=\"font-size: 12px; text-align: left;\">The latest discoveries in health and medicine delivered every other Friday.</p>","centerText":true}},{"type":"user_attribute","order":4,"id":"1a6aaf9f-9af1-48db-af64-873b0fd7457e","config":{"slug":"space-newsletter","label":"Space"}},{"type":"text","order":5,"id":"a04aa846-b37e-4dee-8c9d-b6f3dc783b18","config":{"text":"<p style=\"font-size: 12px; text-align: left;\">The awe and wonder of our universe delivered to your inbox every other Thursday.</p>","centerText":true}},{"type":"button","id":"82ab2ee0-202d-4d6e-87f5-a01809de38b4","config":{"text":"Submit","isSubmit":true},"order":6},{"type":"text","order":7,"id":"64758970-d624-43f2-b73d-e52b12b26fd8","config":{"text":"<p style=\"font-size: 10px; text-align: center;\">By continuing, you acknowledge that you are at least 13 years of age and agree to the Terms of Service and Privacy Policy.</p>","centerText":true}}]}]},{"type":"success","sections":[{"type":"success","order":0,"elements":[{"type":"text","id":"success-initial-text","order":0,"config":{"text":"<center> Thanks for subscribing!"}}]}]}],"timestamp":1741124695110,"id":"U-HNmDn6","outcomeId":"graph/1#2,graph/1#3,graph/1#5,graph/2#1,graph/2#32,subrule/3#1,subrule/3#6,subrule/3#10,graph/2#29,graph/2#23,subrule/1#1,subrule/1#8,transformation/12","ruleId":"H-newsletter-signup-308","resolvedComponentTemplates":[],"languagePack":{"entries":{"forms.billing.history.date":"Date","forms.billing.history.every":"every","forms.billing.history.period":"Period","forms.billing.history.subtotal":"Subtotal","forms.billing.history.total":"Total","forms.buttons.back-button":"Back","forms.common.account-code.label":"Have an account registration code? Enter it here","forms.common.account-code.placeholder":"e.g. ACCOUNT001","forms.common.additional-section":"Additional Section","forms.common.continue":"Continue","forms.common.current-password":"Current Password","forms.common.divider-text":"or use","forms.common.email":"Email","forms.common.email-edit":"Edit","forms.common.email-placeholder":"Your email address","forms.common.otp.code-sent-to":"A message with a code has been sent to","forms.common.otp.enter-code":"Enter the code in the box below.","forms.common.otp.forgot-password":"Forgot Password?","forms.common.otp.forgot-password-code-sent":"Code sent!","forms.common.otp.label":"Code","forms.common.otp.placeholder":"e.g. 350271","forms.common.otp.resend":"Didn't get a code?","forms.common.otp.resent":"Resent!","forms.common.password":"Password","forms.common.password-confirm":"Confirm Password","forms.common.password-confirm-placeholder":"confirm password...","forms.common.password-hide":"Hide","forms.common.password-placeholder":"password...","forms.common.password-show":"Show","forms.common.password-validator.length":"Must include at least 8 characters","forms.common.password-validator.match":"Passwords match","forms.common.password-validator.number":"Must include a number character","forms.common.password-validator.symbol":"Must include a supported symbol","forms.common.password-validator.uppercase":"Must include an uppercase letter","forms.common.social-sign-in-label":"Continue with","forms.common.submit":"Submit","forms.common.update":"Update","forms.complete-registration-form.default-intro-text":"Set up your password","forms.complete-registration-form.default-success-message":"Thank you for updating your profile.","forms.contact-form.default-intro-text-1":"Stay in touch","forms.contact-form.default-intro-text-2":"Subscribe to our newsletter today","forms.contact-form.default-success-message":"Thank you for submitting your contact information.","forms.data-capture-form.default-intro-text":"Tell us more about you!","forms.data-capture-form.default-success-message":"Thank you for updating your profile.","forms.devices.current-device-label":"Current Device","forms.devices.login-time-label":"Login Time","forms.devices.no-session-message":"No Device sessions recorded","forms.devices.sign-out-button":"Sign Out","forms.devices.sign-out-of-other-devices-button":"Sign Out of Other Devices","forms.devices.your-devices-label":"Your Devices","forms.errors.company-account-not-found":"Account not found","forms.errors.contact-creation-disabled":"This operation is not possible at the moment, please try again later","forms.errors.email-domain-blocked":"Please use a different email address, this domain is not supported","forms.errors.email-taken":"This email address is already registered. Please log in to continue","forms.errors.email-verification-required":"Email verification is required","forms.errors.invitation-failed-duplicate-email":"An invite has already been created for this email","forms.errors.invitation-failed-invalid-email":"Invalid email address","forms.errors.invitation-failed-limit-reached":"You have reached the sharing limit for this product","forms.errors.invitation-failed-no-product-access":"You do not currently have access to this product","forms.errors.login-failed":"The email address or password you entered is incorrect","forms.errors.no-authenticated-session":"Please login to update your profile","forms.errors.otp-incorrect":"The code you entered is incorrect","forms.errors.otp-or-password-incorrect":"The password or code you entered is incorrect","forms.errors.otp-send-failed":"Unable to send a verification code. Please try again later","forms.errors.password-reset-failed":"Unable to reset your password. Please try again later","forms.errors.password-reset-link-send-failed":"Unable to send a password reset link. Please try again later","forms.errors.promo-code-expired":"Promo code expired","forms.errors.promo-code-invalid":"Invalid promo code","forms.errors.promo-code-invalid-for-payment-option":"Promo code cannot be applied to selected option","forms.errors.session-limit-reached":"You have reached the session limit. Please log out from another device to access this content","forms.errors.too-many-requests":"To gain login access, please contact your administrator","forms.errors.unknown-error":"Something went wrong. Please try again later","forms.errors.unknown-payment-error":"Something went wrong when processing your payment. Please try again later","forms.errors.user-attribute-invalid":"Invalid user attribute","forms.errors.user-not-found":"User not found","forms.list-subscriptions.billing-history-link":"Billing history","forms.list-subscriptions.billing-history-text":"To see previous invoices visit","forms.list-subscriptions.cancel-subscription-text":"Cancel subscription","forms.list-subscriptions.change-default-payment-method-button":"Change Default Payment Method","forms.list-subscriptions.change-payment-method-button":"Change Payment Method","forms.list-subscriptions.change-payment-success-text":"Payment successfully changed","forms.list-subscriptions.change-subscription-text":"Change subscription","forms.list-subscriptions.next-payment-date":"Next payment date","forms.list-subscriptions.no-subscriptions-message":"You don't have any subscriptions","forms.list-subscriptions.subscription-rate-label":"Subscription rate","forms.payment.account-verification-section":"Account Verification","forms.payment.invitation-button":"Send Invite","forms.payment.invitation-description":"You can invite people by entering their email","forms.payment.invitation-label":"Email Address","forms.payment.invitation-link-sent":"Invite sent!","forms.payment.invitation-title":"Invite people to your sharable plan","forms.payment.login":"Login","forms.payment.login-link":"Login","forms.payment.login-link-message":"Already a registered user?","forms.payment.password-setup-text":"Create an account","forms.payment.payment-button":"Confirm and process payment","forms.payment.payment-option-select-button":"Select Plan","forms.payment.payment-section":"Payment Details","forms.payment.payment-summary-disclaimer":"Today's payment may vary","forms.payment.payment-summary-prorate":"DUE TODAY","forms.payment.payment-summary-tax":"Tax","forms.payment.payment-summary-title":"Subscription","forms.payment.payment-summary-total":"TOTAL","forms.payment.plan-select-section":"Plan Select","forms.payment.promo-code-button":"Verify","forms.payment.promo-code-placeholder":"Promo code","forms.payment.promo-code-text":"Have a promo code?","forms.payment.reset-password-text":"Reset your password","forms.payment.success-button":"Continue Reading","forms.payment.success-message":"Payment processed successfully","forms.registration.account-verification-section":"Account Verification","forms.registration.default-intro-text":"You've reached the limit of free articles","forms.registration.email-verification-required-message":"A link has been sent to you. Please check your Email.","forms.registration.login":"Login","forms.registration.login-link-text":"A login link has been sent to","forms.registration.password-setup-section":"Password Setup","forms.registration.password-setup-text":"Create an account","forms.registration.resend-login-link":"Didn't get a link?","forms.registration.resend-login-link-resent":"Resent!","forms.registration.reset":"Reset!","forms.registration.reset-password-text":"Reset your password","forms.registration.success-button":"Continue Reading","forms.registration.success-message":"You have signed up successfully!","forms.subscription-cancel.back-button":"Back","forms.subscription-cancel.cancel-button":"Cancel Subscription","forms.subscription-cancel.confirm-text":"Are you sure you want to cancel?","forms.subscription-cancel.intro-text":"Select a subscription to cancel","forms.subscription-cancel.offer-text":"<h2>We are sorry to see you go</h2>Here is a special offer just for you.","forms.subscription-cancel.payment-option-select-button":"Accept Offer","forms.subscription-cancel.reason-text":"<h2>We would like to hear your feedback</h2>We'd appreciate it if you could to take a moment to let us know why you are cancelling.","forms.subscription-cancel.success-text":"Your subscription has been cancelled","forms.subscription-select.amount-label":"Amount:","forms.subscription-select.intro-text":"Select a subscription to upgrade","forms.subscription-select.next-billing-date-label":"Next billing date:","forms.subscription-select.no-change-plan-mapping-message":"No upgrade options are available for this subscription","forms.subscription-select.no-subscriptions-message":"No subscriptions available","forms.subscription-select.select-button":"Select","forms.update-profile.update-email-title":"<h2>Update Email Address</h2>","forms.update-profile.update-password-title":"<h2>Update Password</h2>","forms.update-profile.your-profile":"Your Profile","forms.update-profile.your-profile-title":"<h2>Your Profile</h2>","hidden.example-key":"Hello world","hidden.form-preview.locale":"en-US","hidden.forms-preview.example-payment-option-description":"Example Payment Option","hidden.forms-preview.example-payment-option-label":"Example Offer","interstitial-page.password-reset.new-password":"New password:","interstitial-page.password-reset.password-mismatch-error":"You did not enter the same password twice","interstitial-page.password-reset.repeat-password":"Repeat password:","interstitial-page.password-reset.reset-button":"Reset","interstitial-page.password-reset.return-home-link":"Go back to the site","interstitial-page.password-reset.success-message":"Your password has been reset successfully!","interstitial-page.password-reset.title":"Change your password","interstitial-page.password-reset.unknown-error":"Something went wrong! Please try again later.","interstitial-page.passwordless-login.title":"Welcome","interstitial-page.update-email.enter-password":"Please enter your current password to complete the email update request.","interstitial-page.update-email.incorrect-password-error":"Incorrect password.","interstitial-page.update-email.password":"Password:","interstitial-page.update-email.return-home-link":"Go back to the site","interstitial-page.update-email.submit-button":"Update","interstitial-page.update-email.title":"Changing your email","interstitial-page.update-email.unknown-error":"Something went wrong! Please try again later.","interstitial-page.update-email-passwordless.message":"Please check the inbox of your new email for further instructions.","interstitial-page.update-email-passwordless.title":"Changing your email","interstitial-page.update-email-passwordless-success.message":"You have successfully changed your email address.","interstitial-page.update-email-passwordless-success.title":"Changing your email","interstitial-page.update-email-success.message":"Your email has been updated successfully!","pages.account-management.account-select-dropdown":"Select account","pages.account-management.delete-link":"Delete","pages.account-management.delete-modal-body":"Are you sure you want to delete this user?","pages.account-management.delete-modal-button":"Yes Delete","pages.account-management.delete-modal-title":"You are about to delete user","pages.account-management.delete-success-modal-body":"has been successfully deleted.","pages.account-management.delete-success-modal-title":"User Deleted","pages.account-management.errors.already-exists":"already exists","pages.account-management.errors.delete-fail":"Failed to delete","pages.account-management.errors.invite-fail":"Could not invite user","pages.account-management.invite-button-text":"Invite a User","pages.account-management.invite-modal-cancel-button":"Cancel","pages.account-management.invite-modal-confirm-button":"Invite User","pages.account-management.invite-modal-email-label":"Email Address","pages.account-management.invite-modal-email-placeholder":"Enter Email Address","pages.account-management.invite-modal-title":"Invite User","pages.account-management.invite-success-modal-body":"An invite has been sent to","pages.account-management.no-users":"No users found","pages.account-management.owner":"Owner","pages.account-management.search-button-text":"Search","pages.account-management.search-placeholder-text":"Search for a user","pages.account-management.success-modal-button":"Close","pages.account-management.title":"Manage Your Users","pages.cancel.back-to-subscriptions":"Back to Subscriptions","pages.cancel.cancel-subscription":"Cancel Subscription","pages.cancel.cancelled":"Cancelled","pages.cancel.continue-subscription":"Continue Subscription","pages.cancel.days-left":"DAYS LEFT:","pages.cancel.plan-frequency":"Frequency","pages.cancel.plan-name":"Name","pages.cancel.plan-next-billing":"Next Billing","pages.cancel.plan-period":"Period","pages.cancel.plan-price":"Price","pages.cancel.plan-type":"Type","pages.cancel.select-plans":"Select the plans you wish to cancel","pages.cancel.status-active":"Active","pages.cancel.status-cancelled":"Cancelled","pages.cancel.status-draft":"Draft","pages.cancel.status-expired":"Expired","pages.cancel.status-pending-acceptance":"Pending Acceptance","pages.cancel.status-pending-activation":"Pending Activation","pages.cancel.status-suspended":"Suspended","pages.cancel.status-unknown":"Unknown","pages.cancel.subscription-ends-on":"Subscription ends on","pages.cancel.subscription-will-end-on":"Your subscription will end on","pages.cancel.success":"You've cancelled your subscription","pages.cancel.until-cancelled":"Until Cancelled","pages.common.collapsible-content-text":"See details","pages.common.confirmation-modal-cancel-button":"Cancel","pages.common.confirmation-modal-confirm-button":"Confirm","pages.common.confirmation-primary-error-message":"Something went wrong!","pages.common.confirmation-secondary-error-message":"Try again later.","pages.common.date-time-format-locale":"en-US","pages.common.input-errors-invalid-email":"Please enter a valid email","pages.common.input-errors-invalid-url":"Please enter a valid URL","pages.common.input-errors-missing-value":"Please enter a value","pages.common.loading":"Loading...","pages.common.no-access-back-link":"Go Back","pages.common.no-access-body":"Sorry, you are not allowed to access this page. Click the button to go back.","pages.common.no-access-title":"No access.","pages.common.password-hide":"Hide","pages.common.password-show":"Show","pages.login-reg.already-registered-sign-in":"Already registered? Sign in","pages.login-reg.cancel":"Cancel","pages.login-reg.complete-registration-button":"Complete Registration","pages.login-reg.continue-with-apple":"Continue with Apple","pages.login-reg.continue-with-facebook":"Continue with Facebook","pages.login-reg.continue-with-google":"Continue with Google","pages.login-reg.continue-with-linkedin":"Continue with Linkedin","pages.login-reg.continue-with-microsoft":"Continue with Microsoft","pages.login-reg.continue-with-open-id-connect":"Continue with Open ID Connect","pages.login-reg.continue-with-twitter":"Continue with X","pages.login-reg.create-account":"Create an account","pages.login-reg.email-me-login-link":"Email me login link","pages.login-reg.email-me-reset-code":"Email me reset code","pages.login-reg.email-placeholder":"Email Address","pages.login-reg.enter-account-reg-code-here":"Enter an account registration code here","pages.login-reg.errors.contact-admin":"Please contact the administrator","pages.login-reg.errors.email-already-taken":"Email already taken","pages.login-reg.errors.email-verification-required":"Email verification is required","pages.login-reg.errors.password-incorrect":"The password you entered is incorrect","pages.login-reg.errors.password-not-strong-enough":"Password is not strong enough","pages.login-reg.errors.seat-capacity":"Your registration request couldn't be completed due to account seat capacity issue.","pages.login-reg.errors.something-went-wrong":"Something went wrong!","pages.login-reg.errors.to-gain-access-contact-admin":"To gain login access, please contact your administrator","pages.login-reg.errors.try-again-later":"Please try again later.","pages.login-reg.errors.user-not-found":"User not found","pages.login-reg.errors.username-already-taken":"Username already taken","pages.login-reg.forgotten-password":"Forgotten Password?","pages.login-reg.logging-in":"Logging in...","pages.login-reg.login-button":"Login","pages.login-reg.login-to-account":"Login to your account","pages.login-reg.or":"Or","pages.login-reg.password-placeholder":"Password","pages.login-reg.password-requirement":"Password must be a minimum of 8 characters and contain uppercase and lowercase, numbers and at least 1 special character.","pages.login-reg.register-button":"Register","pages.login-reg.register-for-account":"Register for an account","pages.login-reg.reset-your-password":"Reset your password","pages.login-reg.wait":"Please wait...","pages.pref-center.devices.current-device":"Current Device","pages.pref-center.devices.error-loading":"There was an error getting the device list","pages.pref-center.devices.sign-in-time":"Login date and time:","pages.pref-center.devices.sign-out":"Sign out","pages.pref-center.devices.sign-out-all":"Sign out of all other devices","pages.pref-center.devices.sign-out-all-success":"All other devices are now signed out","pages.pref-center.devices.sign-out-fail":"Signing out failed","pages.pref-center.devices.sign-out-success":"is now signed out.","pages.pref-center.devices.title":"Your Devices","pages.pref-center.devices.unknown-device":"Unknown","pages.pref-center.email-update-passwordless-message":"A link has been sent to your current email. Please check your inbox.","pages.pref-center.email-update-passwordless-title":"Check Your Inbox","pages.pref-center.general-error":"Something went wrong - please try again later","pages.pref-center.profile.attributes-select-list-placeholder":"Select One","pages.pref-center.profile.attributes-update-save":"Save","pages.pref-center.profile.attributes-update-title":"Your profile","pages.pref-center.profile.email":"Email Address","pages.pref-center.profile.email-update-email-label":"New Email","pages.pref-center.profile.email-update-email-placeholder":"Enter Email","pages.pref-center.profile.email-update-password-label":"Your Password","pages.pref-center.profile.email-update-password-placeholder":"Enter password","pages.pref-center.profile.email-update-save":"Save","pages.pref-center.profile.email-update-step-2-title":"Update Email Address","pages.pref-center.profile.email-update-title":"Update Email Address","pages.pref-center.profile.errors.change-email-error":"Sorry but your email address has not been changed. Please try again.","pages.pref-center.profile.errors.change-password-error":"Sorry but we were unable to reset your password. Please try again.","pages.pref-center.profile.errors.email-already-taken-error":"This email address is already taken.","pages.pref-center.profile.errors.incorrect-code":"Entered code is incorrect","pages.pref-center.profile.errors.incorrect-password":"The password you entered is incorrect","pages.pref-center.profile.errors.password-validation-error":"Password is not strong enough","pages.pref-center.profile.errors.unsuccessful":"Unsuccessful","pages.pref-center.profile.errors.update-profile-error":"Sorry but we were unable to update your profile. Please try again.","pages.pref-center.profile.password":"Password","pages.pref-center.profile.password-update-current-password-label":"Current Password","pages.pref-center.profile.password-update-current-password-placeholder":"Enter your password","pages.pref-center.profile.password-update-new-password-label":"New Password","pages.pref-center.profile.password-update-new-password-placeholder":"Enter a password","pages.pref-center.profile.password-update-save":"Continue","pages.pref-center.profile.password-update-step-2-title":"Reset your password","pages.pref-center.profile.password-update-title":"Update Password","pages.pref-center.profile.title":"Your Profile","pages.pref-center.profile.update":"Update","pages.pref-center.profile.update-email-successful":"Your email address has been changed.","pages.pref-center.profile.update-password-successful":"Your password has been reset.","pages.pref-center.profile.update-profile-successful":"Your profile has been updated.","pages.pref-center.profile.update-return-text":"Return to Personal Information","pages.pref-center.profile.update-step-2-code-label":"Code","pages.pref-center.profile.update-step-2-code-placeholder":"e.g. 350271","pages.pref-center.profile.update-step-2-enter-code":"Enter the code in the box below.","pages.pref-center.profile.update-step-2-message-sent":"A message with a code has been sent to email address:","pages.pref-center.profile.update-step-2-new-code-modal-body":"Would you like to send a new verification code to","pages.pref-center.profile.update-step-2-new-code-modal-button":"Resend Code","pages.pref-center.profile.update-step-2-new-code-modal-title":"Get a new verification code","pages.pref-center.profile.update-step-2-resend-code-link-text":"Didn't get a code?","pages.pref-center.profile.update-step-2-save":"Submit","pages.pref-center.profile.update-successful":"Success","pages.pref-center.share-product.modal-body":"You can invite people by entering their email. Available seats:","pages.pref-center.share-product.modal-email-label":"Email Address","pages.pref-center.share-product.modal-email-placeholder":"Enter Email Address","pages.pref-center.share-product.modal-send-button-text":"Send Invite","pages.pref-center.share-product.modal-title":"Invite people to your sharable subscription","pages.pref-center.shared-members.done-button":"Done","pages.pref-center.shared-members.invite-button-text":"Invite new members","pages.pref-center.shared-members.manage-shared-members-title":"Manage shared members","pages.pref-center.shared-members.no-members":"This product is not currently shared with anyone.","pages.pref-center.shared-members.seats-used":"seats used","pages.pref-center.shared-members.status-active":"Active","pages.pref-center.shared-members.status-inactive":"Inactive","pages.pref-center.shared-members.status-pending":"Pending","pages.pref-center.shared-members.table-header-date":"Date Shared","pages.pref-center.shared-members.table-header-email":"Email Address","pages.pref-center.shared-members.table-header-status":"Status","pages.pref-center.shared-members.table-remove-member":"Remove member","pages.pref-center.shared-members.title":"Shared Members","pages.pref-center.shared-products.errors.existing-invite-error":"An invite has already been created for this email","pages.pref-center.shared-products.errors.invalid-email-error":"Invalid email address","pages.pref-center.shared-products.errors.limit-reached-error":"You have reached the sharing limit for this product","pages.pref-center.shared-products.errors.no-access-error":"You do not currently have access to this product","pages.pref-center.shared-products.leave-product-body":"Are you sure you want to leave this shared product?","pages.pref-center.shared-products.leave-product-title":"Leave Product","pages.pref-center.shared-products.no-subscriptions":"You do not currently have any products shared with you.","pages.pref-center.shared-products.remove-invite-body":"Are you sure you want to remove this pending invite from your subscription?","pages.pref-center.shared-products.remove-invite-title":"Remove Invite","pages.pref-center.shared-products.remove-member-body":"Are you sure you want to remove this user from your subscription?","pages.pref-center.shared-products.remove-member-title":"Remove Member","pages.pref-center.shared-products.remove-subscription":"Leave shared subscription","pages.pref-center.shared-products.shared-by":"Shared by","pages.pref-center.subscriptions.billing-history-link":"Billing History.","pages.pref-center.subscriptions.billing-history-table-canceled":"Subscription canceled","pages.pref-center.subscriptions.billing-history-table-header-date":"Date","pages.pref-center.subscriptions.billing-history-table-header-period":"Subscription Period","pages.pref-center.subscriptions.billing-history-table-header-subtotal":"Subtotal","pages.pref-center.subscriptions.billing-history-table-header-total":"Total","pages.pref-center.subscriptions.billing-history-title":"Billing History","pages.pref-center.subscriptions.cancel-subscription-confirm-modal-body":"Your subscription has been canceled.","pages.pref-center.subscriptions.cancel-subscription-confirm-modal-button":"Close","pages.pref-center.subscriptions.cancel-subscription-confirm-modal-title":"Subscription canceled","pages.pref-center.subscriptions.cancel-subscription-modal-body":"Are you sure you want to cancel the subscription","pages.pref-center.subscriptions.cancel-subscription-modal-button":"Cancel Subscription","pages.pref-center.subscriptions.cancel-subscription-modal-title":"Cancel your subscription","pages.pref-center.subscriptions.cancel-subscription-title":"Cancel your subscription","pages.pref-center.subscriptions.canceled-date":"Canceled on","pages.pref-center.subscriptions.change-multi-subscription-screen-active-subscription":"active","pages.pref-center.subscriptions.change-multi-subscription-screen-best-value":"best value","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-confirm-modal-body":"Your subscriptions have been canceled.","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-confirm-modal-title":"Subscriptions canceled","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-modal-title":"Cancel your subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-text":"Cancel Subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-current-subscription":"current subscription","pages.pref-center.subscriptions.change-multi-subscription-screen-current-subscriptions-title":"Current Subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-edit-subscription-text":"Edit","pages.pref-center.subscriptions.change-multi-subscription-screen-new-subscriptions-title":"New Subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-review-button":"Review Changes","pages.pref-center.subscriptions.change-multi-subscription-screen-title":"Manage Subscriptions","pages.pref-center.subscriptions.change-payment-method-description":"Adjust how you pay for the product.","pages.pref-center.subscriptions.change-payment-method-screen-description":"This credit card will be used as the payment method for the following subscription:","pages.pref-center.subscriptions.change-payment-method-screen-save-button":"Save","pages.pref-center.subscriptions.change-payment-method-screen-title":"Enter Payment Detail","pages.pref-center.subscriptions.change-payment-method-title":"Change payment method","pages.pref-center.subscriptions.change-single-subscription-screen-add-new":"Add a new card","pages.pref-center.subscriptions.change-single-subscription-screen-best-value":"Best Value","pages.pref-center.subscriptions.change-single-subscription-screen-confirm-button":"CONFIRM & PROCESS PAYMENT","pages.pref-center.subscriptions.change-single-subscription-screen-current-subscription-title":"Current Subscription","pages.pref-center.subscriptions.change-single-subscription-screen-existing-payment":"Use existing payment method","pages.pref-center.subscriptions.change-single-subscription-screen-new-subscription-description":"Change your current subscription for another.","pages.pref-center.subscriptions.change-single-subscription-screen-new-subscription-title":"Change Subscription","pages.pref-center.subscriptions.change-single-subscription-screen-payment-method-selection":"Payment Method","pages.pref-center.subscriptions.change-single-subscription-screen-review-button":"Review Changes","pages.pref-center.subscriptions.change-single-subscription-screen-select-plan":"Select Plan","pages.pref-center.subscriptions.change-single-subscription-screen-selected-plan":"Selected Plan","pages.pref-center.subscriptions.change-single-subscription-screen-title":"Manage Subscription","pages.pref-center.subscriptions.change-single-subscription-title":"Change your subscription","pages.pref-center.subscriptions.change-subscription-description":"Adjust what products you have access to.","pages.pref-center.subscriptions.change-subscriptions-title":"Change your subscriptions","pages.pref-center.subscriptions.invoices-text":"To see previous invoices visit","pages.pref-center.subscriptions.manage-single-subscription-title":"Manage Subscription","pages.pref-center.subscriptions.manage-subscriptions-title":"Manage Subscriptions","pages.pref-center.subscriptions.next-payment-title":"Next payment date","pages.pref-center.subscriptions.no-subscriptions":"You don't have any subscriptions.","pages.pref-center.subscriptions.one-off-expiry-date":"Expiry Date","pages.pref-center.subscriptions.one-off-price-title":"Price","pages.pref-center.subscriptions.payment-information-title":"Payment Information","pages.pref-center.subscriptions.payment-processing-text":"(payment processing)","pages.pref-center.subscriptions.product-canceled":"Product canceled","pages.pref-center.subscriptions.return-to-subscription-text":"Return to Subscription","pages.pref-center.subscriptions.return-to-subscriptions-text":"Return to Subscriptions","pages.pref-center.subscriptions.subscription-rate-title":"Subscription rate","pages.pref-center.subscriptions.update-success":"Update success"}}},"formTypeConfig":{"showSuccessOnFormCompletion":true,"autoApplyAttributes":{"last_name":"Science"},"requestCountry":"US","requestState":"California","requestCity":"Los Angeles","requestZipCode":"90014"},"organisationConfig":{"schemaFields":[{"slug":"address-line-1","visibility":"PUBLIC","label":"Address Line 1","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"address-line-2","visibility":"PUBLIC","label":"Address Line 2","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"already-a-print-subscriber","visibility":"PUBLIC","label":"I have completed the steps above to link my email to my active print subscription.","required":false,"public-description":"","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"campaign","visibility":"PUBLIC","label":"Campaign","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"city","visibility":"PUBLIC","label":"City","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"country","visibility":"PUBLIC","label":"Country","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"USA","value":"USA","default":false}],"range-start":null,"range-end":null,"range-step":null},{"slug":"country-int","visibility":"PUBLIC","label":"CountryInt","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"CANADA","value":"CANADA","default":false},{"label":"MEXICO","value":"MEXICO","default":false},{"label":"UNITED KINGDOM","value":"UNITED KINGDOM","default":false},{"label":"ANDORRA","value":"ANDORRA","default":false},{"label":"UNITED ARAB EMIRATES","value":"UNITED ARAB EMIRATES","default":false},{"label":"AFGHANISTAN","value":"AFGHANISTAN","default":false},{"label":"ANTIGUA AND BARBUDA","value":"ANTIGUA AND BARBUDA","default":false},{"label":"ANGUILLA","value":"ANGUILLA","default":false},{"label":"ALBANIA","value":"ALBANIA","default":false},{"label":"ARMENIA","value":"ARMENIA","default":false},{"label":"NETHERLANDS ANTILLES","value":"NETHERLANDS ANTILLES","default":false},{"label":"ANGOLA","value":"ANGOLA","default":false},{"label":"ANTARCTICA","value":"ANTARCTICA","default":false},{"label":"ARGENTINA","value":"ARGENTINA","default":false},{"label":"AUSTRIA","value":"AUSTRIA","default":false},{"label":"AUSTRALIA","value":"AUSTRALIA","default":false},{"label":"ARUBA","value":"ARUBA","default":false},{"label":"AZERBAIJAN","value":"AZERBAIJAN","default":false},{"label":"BOSNIA AND HERZEGOVINA","value":"BOSNIA AND HERZEGOVINA","default":false},{"label":"BARBADOS","value":"BARBADOS","default":false},{"label":"BANGLADESH","value":"BANGLADESH","default":false},{"label":"BELGIUM","value":"BELGIUM","default":false},{"label":"BURKINA FASO","value":"BURKINA FASO","default":false},{"label":"BULGARIA","value":"BULGARIA","default":false},{"label":"BAHRAIN","value":"BAHRAIN","default":false},{"label":"BURUNDI","value":"BURUNDI","default":false},{"label":"BENIN","value":"BENIN","default":false},{"label":"BERMUDA","value":"BERMUDA","default":false},{"label":"BRUNEI DARUSSALAM","value":"BRUNEI DARUSSALAM","default":false},{"label":"BOLIVIA","value":"BOLIVIA","default":false},{"label":"BRAZIL","value":"BRAZIL","default":false},{"label":"BAHAMAS","value":"BAHAMAS","default":false},{"label":"BHUTAN","value":"BHUTAN","default":false},{"label":"BOUVET ISLAND","value":"BOUVET ISLAND","default":false},{"label":"BOTSWANA","value":"BOTSWANA","default":false},{"label":"BELARUS","value":"BELARUS","default":false},{"label":"BELIZE","value":"BELIZE","default":false},{"label":"COCOS (KEELING) ISLANDS","value":"COCOS (KEELING) ISLANDS","default":false},{"label":"CONGO, DEMOCRATIC REP OF THE","value":"CONGO, DEMOCRATIC REP OF THE","default":false},{"label":"CENTRAL AFRICAN REPUBLIC","value":"CENTRAL AFRICAN REPUBLIC","default":false},{"label":"CONGO","value":"CONGO","default":false},{"label":"SWITZERLAND","value":"SWITZERLAND","default":false},{"label":"CÔTE D'IVOIRE","value":"CÔTE D'IVOIRE","default":false},{"label":"COOK ISLANDS","value":"COOK ISLANDS","default":false},{"label":"CHILE","value":"CHILE","default":false},{"label":"CAMEROON","value":"CAMEROON","default":false},{"label":"CHINA","value":"CHINA","default":false},{"label":"COLOMBIA","value":"COLOMBIA","default":false},{"label":"COSTA RICA","value":"COSTA RICA","default":false},{"label":"CUBA","value":"CUBA","default":false},{"label":"CAPE VERDE","value":"CAPE VERDE","default":false},{"label":"CHRISTMAS ISLAND","value":"CHRISTMAS ISLAND","default":false},{"label":"CYPRUS","value":"CYPRUS","default":false},{"label":"CZECH REPUBLIC","value":"CZECH REPUBLIC","default":false},{"label":"GERMANY","value":"GERMANY","default":false},{"label":"DJIBOUTI","value":"DJIBOUTI","default":false},{"label":"DENMARK","value":"DENMARK","default":false},{"label":"DOMINICA","value":"DOMINICA","default":false},{"label":"DOMINICAN REPUBLIC","value":"DOMINICAN REPUBLIC","default":false},{"label":"ALGERIA","value":"ALGERIA","default":false},{"label":"ECUADOR","value":"ECUADOR","default":false},{"label":"ESTONIA","value":"ESTONIA","default":false},{"label":"EGYPT","value":"EGYPT","default":false},{"label":"WESTERN SAHARA","value":"WESTERN SAHARA","default":false},{"label":"ERITREA","value":"ERITREA","default":false},{"label":"SPAIN","value":"SPAIN","default":false},{"label":"ETHIOPIA","value":"ETHIOPIA","default":false},{"label":"FINLAND","value":"FINLAND","default":false},{"label":"FIJI","value":"FIJI","default":false},{"label":"FALKLAND ISLANDS (MALVINAS)","value":"FALKLAND ISLANDS (MALVINAS)","default":false},{"label":"MICRONESIA, FEDERATED STATES OF","value":"MICRONESIA, FEDERATED STATES OF","default":false},{"label":"FAROE ISLANDS","value":"FAROE ISLANDS","default":false},{"label":"FRANCE","value":"FRANCE","default":false},{"label":"FRANCE METROPOLITAN","value":"FRANCE METROPOLITAN","default":false},{"label":"GABON","value":"GABON","default":false},{"label":"GRENADA","value":"GRENADA","default":false},{"label":"GEORGIA","value":"GEORGIA","default":false},{"label":"FRENCH GUIANA","value":"FRENCH GUIANA","default":false},{"label":"GHANA","value":"GHANA","default":false},{"label":"GIBRALTAR","value":"GIBRALTAR","default":false},{"label":"GREENLAND","value":"GREENLAND","default":false},{"label":"GAMBIA","value":"GAMBIA","default":false},{"label":"GUINEA","value":"GUINEA","default":false},{"label":"GUADELOUPE","value":"GUADELOUPE","default":false},{"label":"EQUATORIAL GUINEA","value":"EQUATORIAL GUINEA","default":false},{"label":"GREECE","value":"GREECE","default":false},{"label":"SOUTH GEORGIA SOUTH SANDWICH","value":"SOUTH GEORGIA SOUTH SANDWICH","default":false},{"label":"GUATEMALA","value":"GUATEMALA","default":false},{"label":"GUAM","value":"GUAM","default":false},{"label":"GUINEA-BISSAU","value":"GUINEA-BISSAU","default":false},{"label":"GUYANA","value":"GUYANA","default":false},{"label":"HONG KONG","value":"HONG KONG","default":false},{"label":"HEARD ISLAND/MCDONALD ISLANDS","value":"HEARD ISLAND/MCDONALD ISLANDS","default":false},{"label":"HONDURAS","value":"HONDURAS","default":false},{"label":"CROATIA","value":"CROATIA","default":false},{"label":"HAITI","value":"HAITI","default":false},{"label":"HUNGARY","value":"HUNGARY","default":false},{"label":"INDONESIA","value":"INDONESIA","default":false},{"label":"IRELAND","value":"IRELAND","default":false},{"label":"ISRAEL","value":"ISRAEL","default":false},{"label":"INDIA","value":"INDIA","default":false},{"label":"BRITISH INDIAN OCEAN TERRITORY","value":"BRITISH INDIAN OCEAN TERRITORY","default":false},{"label":"IRAQ","value":"IRAQ","default":false},{"label":"IRAN (ISLAMIC REPUBLIC OF)","value":"IRAN (ISLAMIC REPUBLIC OF)","default":false},{"label":"ICELAND","value":"ICELAND","default":false},{"label":"ITALY","value":"ITALY","default":false},{"label":"JAMAICA","value":"JAMAICA","default":false},{"label":"JORDAN","value":"JORDAN","default":false},{"label":"JAPAN","value":"JAPAN","default":false},{"label":"KENYA","value":"KENYA","default":false},{"label":"KYRGYZSTAN","value":"KYRGYZSTAN","default":false},{"label":"CAMBODIA","value":"CAMBODIA","default":false},{"label":"KIRIBATI","value":"KIRIBATI","default":false},{"label":"COMOROS","value":"COMOROS","default":false},{"label":"SAINT KITTS AND NEVIS","value":"SAINT KITTS AND NEVIS","default":false},{"label":"KOREA D.P.R.O.","value":"KOREA D.P.R.O.","default":false},{"label":"KOREA, REP OF (SOUTH KOREA)","value":"KOREA, REP OF (SOUTH KOREA)","default":false},{"label":"KUWAIT","value":"KUWAIT","default":false},{"label":"CAYMAN ISLANDS","value":"CAYMAN ISLANDS","default":false},{"label":"KAZAKHSTAN","value":"KAZAKHSTAN","default":false},{"label":"LAO PEOPLE'S DEMOCRATIC REP","value":"LAO PEOPLE'S DEMOCRATIC REP","default":false},{"label":"LEBANON","value":"LEBANON","default":false},{"label":"SAINT LUCIA","value":"SAINT LUCIA","default":false},{"label":"LIECHTENSTEIN","value":"LIECHTENSTEIN","default":false},{"label":"SRI LANKA","value":"SRI LANKA","default":false},{"label":"LIBERIA","value":"LIBERIA","default":false},{"label":"LESOTHO","value":"LESOTHO","default":false},{"label":"LITHUANIA","value":"LITHUANIA","default":false},{"label":"LUXEMBOURG","value":"LUXEMBOURG","default":false},{"label":"LATVIA","value":"LATVIA","default":false},{"label":"LIBYAN ARAB JAMAHIRIYA","value":"LIBYAN ARAB JAMAHIRIYA","default":false},{"label":"MOROCCO","value":"MOROCCO","default":false},{"label":"MONACO","value":"MONACO","default":false},{"label":"MOLDOVA, REPUBLIC OF","value":"MOLDOVA, REPUBLIC OF","default":false},{"label":"MONTENEGRO","value":"MONTENEGRO","default":false},{"label":"MADAGASCAR","value":"MADAGASCAR","default":false},{"label":"MARSHALL ISLANDS","value":"MARSHALL ISLANDS","default":false},{"label":"MACEDONIA","value":"MACEDONIA","default":false},{"label":"MALI","value":"MALI","default":false},{"label":"MYANMAR","value":"MYANMAR","default":false},{"label":"MONGOLIA","value":"MONGOLIA","default":false},{"label":"MACAU","value":"MACAU","default":false},{"label":"NORTHERN MARIANA ISLANDS","value":"NORTHERN MARIANA ISLANDS","default":false},{"label":"MARTINIQUE","value":"MARTINIQUE","default":false},{"label":"MAURITANIA","value":"MAURITANIA","default":false},{"label":"MONTSERRAT","value":"MONTSERRAT","default":false},{"label":"MALTA","value":"MALTA","default":false},{"label":"MAURITIUS","value":"MAURITIUS","default":false},{"label":"MALDIVES","value":"MALDIVES","default":false},{"label":"MALAWI","value":"MALAWI","default":false},{"label":"MALAYSIA","value":"MALAYSIA","default":false},{"label":"MOZAMBIQUE","value":"MOZAMBIQUE","default":false},{"label":"NAMIBIA","value":"NAMIBIA","default":false},{"label":"NEW CALEDONIA","value":"NEW CALEDONIA","default":false},{"label":"NIGER","value":"NIGER","default":false},{"label":"NORFOLK ISLAND","value":"NORFOLK ISLAND","default":false},{"label":"NIGERIA","value":"NIGERIA","default":false},{"label":"NICARAGUA","value":"NICARAGUA","default":false},{"label":"NETHERLANDS","value":"NETHERLANDS","default":false},{"label":"NORWAY","value":"NORWAY","default":false},{"label":"NEPAL","value":"NEPAL","default":false},{"label":"NAURU","value":"NAURU","default":false},{"label":"NIUE","value":"NIUE","default":false},{"label":"NEW ZEALAND","value":"NEW ZEALAND","default":false},{"label":"OMAN","value":"OMAN","default":false},{"label":"PANAMA","value":"PANAMA","default":false},{"label":"PERU","value":"PERU","default":false},{"label":"FRENCH POLYNESIA","value":"FRENCH POLYNESIA","default":false},{"label":"PAPUA NEW GUINEA","value":"PAPUA NEW GUINEA","default":false},{"label":"PHILIPPINES","value":"PHILIPPINES","default":false},{"label":"PAKISTAN","value":"PAKISTAN","default":false},{"label":"POLAND","value":"POLAND","default":false},{"label":"SAINT PIERRE AND MIQUELON","value":"SAINT PIERRE AND MIQUELON","default":false},{"label":"PITCAIRN","value":"PITCAIRN","default":false},{"label":"PUERTO RICO","value":"PUERTO RICO","default":false},{"label":"PORTUGAL","value":"PORTUGAL","default":false},{"label":"PALAU","value":"PALAU","default":false},{"label":"PARAGUAY","value":"PARAGUAY","default":false},{"label":"QATAR","value":"QATAR","default":false},{"label":"RÉUNION (FRANCE)","value":"RÉUNION (FRANCE)","default":false},{"label":"ROMANIA","value":"ROMANIA","default":false},{"label":"SERBIA AND MONTENEGRO","value":"SERBIA AND MONTENEGRO","default":false},{"label":"RUSSIAN FEDERATION","value":"RUSSIAN FEDERATION","default":false},{"label":"RWANDA","value":"RWANDA","default":false},{"label":"SAUDI ARABIA","value":"SAUDI ARABIA","default":false},{"label":"SOLOMON ISLANDS","value":"SOLOMON ISLANDS","default":false},{"label":"SEYCHELLES","value":"SEYCHELLES","default":false},{"label":"SUDAN","value":"SUDAN","default":false},{"label":"SWEDEN","value":"SWEDEN","default":false},{"label":"SINGAPORE","value":"SINGAPORE","default":false},{"label":"SAINT HELENA (UNITED KINGDOM)","value":"SAINT HELENA (UNITED KINGDOM)","default":false},{"label":"SLOVENIA","value":"SLOVENIA","default":false},{"label":"SVALBARD AND JAN MAYEN","value":"SVALBARD AND JAN MAYEN","default":false},{"label":"SLOVAKIA","value":"SLOVAKIA","default":false},{"label":"SIERRA LEONE","value":"SIERRA LEONE","default":false},{"label":"SAN MARINO","value":"SAN MARINO","default":false},{"label":"SENEGAL","value":"SENEGAL","default":false},{"label":"SOMALIA","value":"SOMALIA","default":false},{"label":"SURINAME","value":"SURINAME","default":false},{"label":"SAO TOME AND PRINCIPE","value":"SAO TOME AND PRINCIPE","default":false},{"label":"EL SALVADOR","value":"EL SALVADOR","default":false},{"label":"SYRIAN ARAB REPUBLIC","value":"SYRIAN ARAB REPUBLIC","default":false},{"label":"SWAZILAND","value":"SWAZILAND","default":false},{"label":"TURKS AND CAICOS ISLANDS","value":"TURKS AND CAICOS ISLANDS","default":false},{"label":"CHAD","value":"CHAD","default":false},{"label":"FRENCH SOUTHERN TERRITORIES","value":"FRENCH SOUTHERN TERRITORIES","default":false},{"label":"TOGO","value":"TOGO","default":false},{"label":"THAILAND","value":"THAILAND","default":false},{"label":"TAJIKISTAN","value":"TAJIKISTAN","default":false},{"label":"TOKELAU","value":"TOKELAU","default":false},{"label":"TIMOR-LESTE","value":"TIMOR-LESTE","default":false},{"label":"TURKMENISTAN","value":"TURKMENISTAN","default":false},{"label":"TUNISIA","value":"TUNISIA","default":false},{"label":"TONGA","value":"TONGA","default":false},{"label":"TURKEY","value":"TURKEY","default":false},{"label":"TRINIDAD AND TOBAGO","value":"TRINIDAD AND TOBAGO","default":false},{"label":"TUVALU","value":"TUVALU","default":false},{"label":"TAIWAN","value":"TAIWAN","default":false},{"label":"TANZANIA, UNITED REPUBLIC OF","value":"TANZANIA, UNITED REPUBLIC OF","default":false},{"label":"UKRAINE","value":"UKRAINE","default":false},{"label":"UGANDA","value":"UGANDA","default":false},{"label":"UNITED STATES MINOR OUTLYING ISLANDS","value":"UNITED STATES MINOR OUTLYING ISLANDS","default":false},{"label":"URUGUAY","value":"URUGUAY","default":false},{"label":"UZBEKISTAN","value":"UZBEKISTAN","default":false},{"label":"HOLY SEE (VATICAN CITY STATE)","value":"HOLY SEE (VATICAN CITY STATE)","default":false},{"label":"SAINT VINCENT AND THE GRENADINES","value":"SAINT VINCENT AND THE GRENADINES","default":false},{"label":"VENEZUELA","value":"VENEZUELA","default":false},{"label":"VIRGIN ISLANDS, BRITISH","value":"VIRGIN ISLANDS, BRITISH","default":false},{"label":"VIRGIN ISLANDS, U.S.","value":"VIRGIN ISLANDS, U.S.","default":false},{"label":"VIET NAM","value":"VIET NAM","default":false},{"label":"VANUATU","value":"VANUATU","default":false},{"label":"WALLIS AND FUTUNA","value":"WALLIS AND FUTUNA","default":false},{"label":"SAMOA","value":"SAMOA","default":false},{"label":"KOSOVO","value":"KOSOVO","default":false},{"label":"YEMEN","value":"YEMEN","default":false},{"label":"MAYOTTE","value":"MAYOTTE","default":false},{"label":"SOUTH AFRICA","value":"SOUTH AFRICA","default":false},{"label":"ZAMBIA","value":"ZAMBIA","default":false},{"label":"ZIMBABWE","value":"ZIMBABWE","default":false}],"range-start":null,"range-end":null,"range-step":null},{"slug":"electricity-saved-my-brain-newsletter","visibility":"PUBLIC","label":"Electricity Saved My Brain Newsletter","required":false,"public-description":"","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"first-name","visibility":"PUBLIC","label":"First Name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"first-test-newsletter","visibility":"PUBLIC","label":"First Test Newsletter","required":false,"public-description":"Latest News Test","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"general-newsletter","visibility":"PUBLIC","label":"Latest from Science News","required":false,"public-description":"All the major breakthroughs of the week delivered every Thursday.","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"gift-address-line-1","visibility":"PUBLIC","label":"Gift Address Line 1","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"gift-address-line-2","visibility":"PUBLIC","label":"Gift Address Line 2","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"gift-city","visibility":"PUBLIC","label":"Gift City","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"gift-country","visibility":"PUBLIC","label":"Gift Country","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"USA","value":"USA","default":false},{"label":"CANADA","value":"CANADA","default":false},{"label":"MEXICO","value":"MEXICO","default":false},{"label":"UNITED KINGDOM","value":"UNITED KINGDOM","default":false},{"label":"ANDORRA","value":"ANDORRA","default":false},{"label":"UNITED ARAB EMIRATES","value":"UNITED ARAB EMIRATES","default":false},{"label":"AFGHANISTAN","value":"AFGHANISTAN","default":false},{"label":"ANTIGUA AND BARBUDA","value":"ANTIGUA AND BARBUDA","default":false},{"label":"ANGUILLA","value":"ANGUILLA","default":false},{"label":"ALBANIA","value":"ALBANIA","default":false},{"label":"ARMENIA","value":"ARMENIA","default":false},{"label":"NETHERLANDS ANTILLES","value":"NETHERLANDS ANTILLES","default":false},{"label":"ANGOLA","value":"ANGOLA","default":false},{"label":"ANTARCTICA","value":"ANTARCTICA","default":false},{"label":"ARGENTINA","value":"ARGENTINA","default":false},{"label":"AUSTRIA","value":"AUSTRIA","default":false},{"label":"AUSTRALIA","value":"AUSTRALIA","default":false},{"label":"ARUBA","value":"ARUBA","default":false},{"label":"AZERBAIJAN","value":"AZERBAIJAN","default":false},{"label":"BOSNIA AND HERZEGOVINA","value":"BOSNIA AND HERZEGOVINA","default":false},{"label":"BARBADOS","value":"BARBADOS","default":false},{"label":"BANGLADESH","value":"BANGLADESH","default":false},{"label":"BELGIUM","value":"BELGIUM","default":false},{"label":"BURKINA FASO","value":"BURKINA FASO","default":false},{"label":"BULGARIA","value":"BULGARIA","default":false},{"label":"BAHRAIN","value":"BAHRAIN","default":false},{"label":"BURUNDI","value":"BURUNDI","default":false},{"label":"BENIN","value":"BENIN","default":false},{"label":"BERMUDA","value":"BERMUDA","default":false},{"label":"BRUNEI DARUSSALAM","value":"BRUNEI DARUSSALAM","default":false},{"label":"BOLIVIA","value":"BOLIVIA","default":false},{"label":"BRAZIL","value":"BRAZIL","default":false},{"label":"BAHAMAS","value":"BAHAMAS","default":false},{"label":"BHUTAN","value":"BHUTAN","default":false},{"label":"BOUVET ISLAND","value":"BOUVET ISLAND","default":false},{"label":"BOTSWANA","value":"BOTSWANA","default":false},{"label":"BELARUS","value":"BELARUS","default":false},{"label":"BELIZE","value":"BELIZE","default":false},{"label":"COCOS (KEELING) ISLANDS","value":"COCOS (KEELING) ISLANDS","default":false},{"label":"CONGO, DEMOCRATIC REP OF THE","value":"CONGO, DEMOCRATIC REP OF THE","default":false},{"label":"CENTRAL AFRICAN REPUBLIC","value":"CENTRAL AFRICAN REPUBLIC","default":false},{"label":"CONGO","value":"CONGO","default":false},{"label":"SWITZERLAND","value":"SWITZERLAND","default":false},{"label":"CÔTE D'IVOIRE","value":"CÔTE D'IVOIRE","default":false},{"label":"COOK ISLANDS","value":"COOK ISLANDS","default":false},{"label":"CHILE","value":"CHILE","default":false},{"label":"CAMEROON","value":"CAMEROON","default":false},{"label":"CHINA","value":"CHINA","default":false},{"label":"COLOMBIA","value":"COLOMBIA","default":false},{"label":"COSTA RICA","value":"COSTA RICA","default":false},{"label":"CUBA","value":"CUBA","default":false},{"label":"CAPE VERDE","value":"CAPE VERDE","default":false},{"label":"CHRISTMAS ISLAND","value":"CHRISTMAS ISLAND","default":false},{"label":"CYPRUS","value":"CYPRUS","default":false},{"label":"CZECH REPUBLIC","value":"CZECH REPUBLIC","default":false},{"label":"GERMANY","value":"GERMANY","default":false},{"label":"DJIBOUTI","value":"DJIBOUTI","default":false},{"label":"DENMARK","value":"DENMARK","default":false},{"label":"DOMINICA","value":"DOMINICA","default":false},{"label":"DOMINICAN REPUBLIC","value":"DOMINICAN REPUBLIC","default":false},{"label":"ALGERIA","value":"ALGERIA","default":false},{"label":"ECUADOR","value":"ECUADOR","default":false},{"label":"ESTONIA","value":"ESTONIA","default":false},{"label":"EGYPT","value":"EGYPT","default":false},{"label":"WESTERN SAHARA","value":"WESTERN SAHARA","default":false},{"label":"ERITREA","value":"ERITREA","default":false},{"label":"SPAIN","value":"SPAIN","default":false},{"label":"ETHIOPIA","value":"ETHIOPIA","default":false},{"label":"FINLAND","value":"FINLAND","default":false},{"label":"FIJI","value":"FIJI","default":false},{"label":"FALKLAND ISLANDS (MALVINAS)","value":"FALKLAND ISLANDS (MALVINAS)","default":false},{"label":"MICRONESIA, FEDERATED STATES OF","value":"MICRONESIA, FEDERATED STATES OF","default":false},{"label":"FAROE ISLANDS","value":"FAROE ISLANDS","default":false},{"label":"FRANCE","value":"FRANCE","default":false},{"label":"FRANCE METROPOLITAN","value":"FRANCE METROPOLITAN","default":false},{"label":"GABON","value":"GABON","default":false},{"label":"GRENADA","value":"GRENADA","default":false},{"label":"GEORGIA","value":"GEORGIA","default":false},{"label":"FRENCH GUIANA","value":"FRENCH GUIANA","default":false},{"label":"GHANA","value":"GHANA","default":false},{"label":"GIBRALTAR","value":"GIBRALTAR","default":false},{"label":"GREENLAND","value":"GREENLAND","default":false},{"label":"GAMBIA","value":"GAMBIA","default":false},{"label":"GUINEA","value":"GUINEA","default":false},{"label":"GUADELOUPE","value":"GUADELOUPE","default":false},{"label":"EQUATORIAL GUINEA","value":"EQUATORIAL GUINEA","default":false},{"label":"GREECE","value":"GREECE","default":false},{"label":"SOUTH GEORGIA SOUTH SANDWICH","value":"SOUTH GEORGIA SOUTH SANDWICH","default":false},{"label":"GUATEMALA","value":"GUATEMALA","default":false},{"label":"GUAM","value":"GUAM","default":false},{"label":"GUINEA-BISSAU","value":"GUINEA-BISSAU","default":false},{"label":"GUYANA","value":"GUYANA","default":false},{"label":"HONG KONG","value":"HONG KONG","default":false},{"label":"HEARD ISLAND/MCDONALD ISLANDS","value":"HEARD ISLAND/MCDONALD ISLANDS","default":false},{"label":"HONDURAS","value":"HONDURAS","default":false},{"label":"CROATIA","value":"CROATIA","default":false},{"label":"HAITI","value":"HAITI","default":false},{"label":"HUNGARY","value":"HUNGARY","default":false},{"label":"INDONESIA","value":"INDONESIA","default":false},{"label":"IRELAND","value":"IRELAND","default":false},{"label":"ISRAEL","value":"ISRAEL","default":false},{"label":"INDIA","value":"INDIA","default":false},{"label":"BRITISH INDIAN OCEAN TERRITORY","value":"BRITISH INDIAN OCEAN TERRITORY","default":false},{"label":"IRAQ","value":"IRAQ","default":false},{"label":"IRAN (ISLAMIC REPUBLIC OF)","value":"IRAN (ISLAMIC REPUBLIC OF)","default":false},{"label":"ICELAND","value":"ICELAND","default":false},{"label":"ITALY","value":"ITALY","default":false},{"label":"JAMAICA","value":"JAMAICA","default":false},{"label":"JORDAN","value":"JORDAN","default":false},{"label":"JAPAN","value":"JAPAN","default":false},{"label":"KENYA","value":"KENYA","default":false},{"label":"KYRGYZSTAN","value":"KYRGYZSTAN","default":false},{"label":"CAMBODIA","value":"CAMBODIA","default":false},{"label":"KIRIBATI","value":"KIRIBATI","default":false},{"label":"COMOROS","value":"COMOROS","default":false},{"label":"SAINT KITTS AND NEVIS","value":"SAINT KITTS AND NEVIS","default":false},{"label":"KOREA D.P.R.O.","value":"KOREA D.P.R.O.","default":false},{"label":"KOREA, REP OF (SOUTH KOREA)","value":"KOREA, REP OF (SOUTH KOREA)","default":false},{"label":"KUWAIT","value":"KUWAIT","default":false},{"label":"CAYMAN ISLANDS","value":"CAYMAN ISLANDS","default":false},{"label":"KAZAKHSTAN","value":"KAZAKHSTAN","default":false},{"label":"LAO PEOPLE'S DEMOCRATIC REP","value":"LAO PEOPLE'S DEMOCRATIC REP","default":false},{"label":"LEBANON","value":"LEBANON","default":false},{"label":"SAINT LUCIA","value":"SAINT LUCIA","default":false},{"label":"LIECHTENSTEIN","value":"LIECHTENSTEIN","default":false},{"label":"SRI LANKA","value":"SRI LANKA","default":false},{"label":"LIBERIA","value":"LIBERIA","default":false},{"label":"LESOTHO","value":"LESOTHO","default":false},{"label":"LITHUANIA","value":"LITHUANIA","default":false},{"label":"LUXEMBOURG","value":"LUXEMBOURG","default":false},{"label":"LATVIA","value":"LATVIA","default":false},{"label":"LIBYAN ARAB JAMAHIRIYA","value":"LIBYAN ARAB JAMAHIRIYA","default":false},{"label":"MOROCCO","value":"MOROCCO","default":false},{"label":"MONACO","value":"MONACO","default":false},{"label":"MOLDOVA, REPUBLIC OF","value":"MOLDOVA, REPUBLIC OF","default":false},{"label":"MONTENEGRO","value":"MONTENEGRO","default":false},{"label":"MADAGASCAR","value":"MADAGASCAR","default":false},{"label":"MARSHALL ISLANDS","value":"MARSHALL ISLANDS","default":false},{"label":"MACEDONIA","value":"MACEDONIA","default":false},{"label":"MALI","value":"MALI","default":false},{"label":"MYANMAR","value":"MYANMAR","default":false},{"label":"MONGOLIA","value":"MONGOLIA","default":false},{"label":"MACAU","value":"MACAU","default":false},{"label":"NORTHERN MARIANA ISLANDS","value":"NORTHERN MARIANA ISLANDS","default":false},{"label":"MARTINIQUE","value":"MARTINIQUE","default":false},{"label":"MAURITANIA","value":"MAURITANIA","default":false},{"label":"MONTSERRAT","value":"MONTSERRAT","default":false},{"label":"MALTA","value":"MALTA","default":false},{"label":"MAURITIUS","value":"MAURITIUS","default":false},{"label":"MALDIVES","value":"MALDIVES","default":false},{"label":"MALAWI","value":"MALAWI","default":false},{"label":"MALAYSIA","value":"MALAYSIA","default":false},{"label":"MOZAMBIQUE","value":"MOZAMBIQUE","default":false},{"label":"NAMIBIA","value":"NAMIBIA","default":false},{"label":"NEW CALEDONIA","value":"NEW CALEDONIA","default":false},{"label":"NIGER","value":"NIGER","default":false},{"label":"NORFOLK ISLAND","value":"NORFOLK ISLAND","default":false},{"label":"NIGERIA","value":"NIGERIA","default":false},{"label":"NICARAGUA","value":"NICARAGUA","default":false},{"label":"NETHERLANDS","value":"NETHERLANDS","default":false},{"label":"NORWAY","value":"NORWAY","default":false},{"label":"NEPAL","value":"NEPAL","default":false},{"label":"NAURU","value":"NAURU","default":false},{"label":"NIUE","value":"NIUE","default":false},{"label":"NEW ZEALAND","value":"NEW ZEALAND","default":false},{"label":"OMAN","value":"OMAN","default":false},{"label":"PANAMA","value":"PANAMA","default":false},{"label":"PERU","value":"PERU","default":false},{"label":"FRENCH POLYNESIA","value":"FRENCH POLYNESIA","default":false},{"label":"PAPUA NEW GUINEA","value":"PAPUA NEW GUINEA","default":false},{"label":"PHILIPPINES","value":"PHILIPPINES","default":false},{"label":"PAKISTAN","value":"PAKISTAN","default":false},{"label":"POLAND","value":"POLAND","default":false},{"label":"SAINT PIERRE AND MIQUELON","value":"SAINT PIERRE AND MIQUELON","default":false},{"label":"PITCAIRN","value":"PITCAIRN","default":false},{"label":"PUERTO RICO","value":"PUERTO RICO","default":false},{"label":"PORTUGAL","value":"PORTUGAL","default":false},{"label":"PALAU","value":"PALAU","default":false},{"label":"PARAGUAY","value":"PARAGUAY","default":false},{"label":"QATAR","value":"QATAR","default":false},{"label":"RÉUNION (FRANCE)","value":"RÉUNION (FRANCE)","default":false},{"label":"ROMANIA","value":"ROMANIA","default":false},{"label":"SERBIA AND MONTENEGRO","value":"SERBIA AND MONTENEGRO","default":false},{"label":"RUSSIAN FEDERATION","value":"RUSSIAN FEDERATION","default":false},{"label":"RWANDA","value":"RWANDA","default":false},{"label":"SAUDI ARABIA","value":"SAUDI ARABIA","default":false},{"label":"SOLOMON ISLANDS","value":"SOLOMON ISLANDS","default":false},{"label":"SEYCHELLES","value":"SEYCHELLES","default":false},{"label":"SUDAN","value":"SUDAN","default":false},{"label":"SWEDEN","value":"SWEDEN","default":false},{"label":"SINGAPORE","value":"SINGAPORE","default":false},{"label":"SAINT HELENA (UNITED KINGDOM)","value":"SAINT HELENA (UNITED KINGDOM)","default":false},{"label":"SLOVENIA","value":"SLOVENIA","default":false},{"label":"SVALBARD AND JAN MAYEN","value":"SVALBARD AND JAN MAYEN","default":false},{"label":"SLOVAKIA","value":"SLOVAKIA","default":false},{"label":"SIERRA LEONE","value":"SIERRA LEONE","default":false},{"label":"SAN MARINO","value":"SAN MARINO","default":false},{"label":"SENEGAL","value":"SENEGAL","default":false},{"label":"SOMALIA","value":"SOMALIA","default":false},{"label":"SURINAME","value":"SURINAME","default":false},{"label":"SAO TOME AND PRINCIPE","value":"SAO TOME AND PRINCIPE","default":false},{"label":"EL SALVADOR","value":"EL SALVADOR","default":false},{"label":"SYRIAN ARAB REPUBLIC","value":"SYRIAN ARAB REPUBLIC","default":false},{"label":"SWAZILAND","value":"SWAZILAND","default":false},{"label":"TURKS AND CAICOS ISLANDS","value":"TURKS AND CAICOS ISLANDS","default":false},{"label":"CHAD","value":"CHAD","default":false},{"label":"FRENCH SOUTHERN TERRITORIES","value":"FRENCH SOUTHERN TERRITORIES","default":false},{"label":"TOGO","value":"TOGO","default":false},{"label":"THAILAND","value":"THAILAND","default":false},{"label":"TAJIKISTAN","value":"TAJIKISTAN","default":false},{"label":"TOKELAU","value":"TOKELAU","default":false},{"label":"TIMOR-LESTE","value":"TIMOR-LESTE","default":false},{"label":"TURKMENISTAN","value":"TURKMENISTAN","default":false},{"label":"TUNISIA","value":"TUNISIA","default":false},{"label":"TONGA","value":"TONGA","default":false},{"label":"TURKEY","value":"TURKEY","default":false},{"label":"TRINIDAD AND TOBAGO","value":"TRINIDAD AND TOBAGO","default":false},{"label":"TUVALU","value":"TUVALU","default":false},{"label":"TAIWAN","value":"TAIWAN","default":false},{"label":"TANZANIA, UNITED REPUBLIC OF","value":"TANZANIA, UNITED REPUBLIC OF","default":false},{"label":"UKRAINE","value":"UKRAINE","default":false},{"label":"UGANDA","value":"UGANDA","default":false},{"label":"UNITED STATES MINOR OUTLYING ISLANDS","value":"UNITED STATES MINOR OUTLYING ISLANDS","default":false},{"label":"URUGUAY","value":"URUGUAY","default":false},{"label":"UZBEKISTAN","value":"UZBEKISTAN","default":false},{"label":"HOLY SEE (VATICAN CITY STATE)","value":"HOLY SEE (VATICAN CITY STATE)","default":false},{"label":"SAINT VINCENT AND THE GRENADINES","value":"SAINT VINCENT AND THE GRENADINES","default":false},{"label":"VENEZUELA","value":"VENEZUELA","default":false},{"label":"VIRGIN ISLANDS, BRITISH","value":"VIRGIN ISLANDS, BRITISH","default":false},{"label":"VIRGIN ISLANDS, U.S.","value":"VIRGIN ISLANDS, U.S.","default":false},{"label":"VIET NAM","value":"VIET NAM","default":false},{"label":"VANUATU","value":"VANUATU","default":false},{"label":"WALLIS AND FUTUNA","value":"WALLIS AND FUTUNA","default":false},{"label":"SAMOA","value":"SAMOA","default":false},{"label":"KOSOVO","value":"KOSOVO","default":false},{"label":"YEMEN","value":"YEMEN","default":false},{"label":"MAYOTTE","value":"MAYOTTE","default":false},{"label":"SOUTH AFRICA","value":"SOUTH AFRICA","default":false},{"label":"ZAMBIA","value":"ZAMBIA","default":false},{"label":"ZIMBABWE","value":"ZIMBABWE","default":false}],"range-start":null,"range-end":null,"range-step":null},{"slug":"gift-recipient-first-name","visibility":"PUBLIC","label":"Gift Recipient First Name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"gift-recipient-last-name","visibility":"PUBLIC","label":"Gift Recipient Last Name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"gift-state","visibility":"PUBLIC","label":"Gift State","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"Alabama","value":"Alabama","default":false},{"label":"Alaska","value":"Alaska","default":false},{"label":"Arizona","value":"Arizona","default":false},{"label":"Arkansas","value":"Arkansas","default":false},{"label":"California","value":"California","default":false},{"label":"Colorado","value":"Colorado","default":false},{"label":"Connecticut","value":"Connecticut","default":false},{"label":"District of Columbia","value":"District of Columbia","default":false},{"label":"Delaware","value":"Delaware","default":false},{"label":"Florida","value":"Florida","default":false},{"label":"Georgia","value":"Georgia","default":false},{"label":"Hawaii","value":"Hawaii","default":false},{"label":"Idaho","value":"Idaho","default":false},{"label":"Illinois","value":"Illinois","default":false},{"label":"Indiana","value":"Indiana","default":false},{"label":"Iowa","value":"Iowa","default":false},{"label":"Kansas","value":"Kansas","default":false},{"label":"Kentucky","value":"Kentucky","default":false},{"label":"Louisiana","value":"Louisiana","default":false},{"label":"Maine","value":"Maine","default":false},{"label":"Maryland","value":"Maryland","default":false},{"label":"Massachusetts","value":"Massachusetts","default":false},{"label":"Michigan","value":"Michigan","default":false},{"label":"Minnesota","value":"Minnesota","default":false},{"label":"Mississippi","value":"Mississippi","default":false},{"label":"Missouri","value":"Missouri","default":false},{"label":"Montana","value":"Montana","default":false},{"label":"Nebraska","value":"Nebraska","default":false},{"label":"Nevada","value":"Nevada","default":false},{"label":"New Hampshire","value":"New Hampshire","default":false},{"label":"New Jersey","value":"New Jersey","default":false},{"label":"New Mexico","value":"New Mexico","default":false},{"label":"New York","value":"New York","default":false},{"label":"North Carolina","value":"North Carolina","default":false},{"label":"North Dakota","value":"North Dakota","default":false},{"label":"Ohio","value":"Ohio","default":false},{"label":"Oklahoma","value":"Oklahoma","default":false},{"label":"Oregon","value":"Oregon","default":false},{"label":"Pennsylvania","value":"Pennsylvania","default":false},{"label":"Rhode Island","value":"Rhode Island","default":false},{"label":"South Carolina","value":"South Carolina","default":false},{"label":"South Dakota","value":"South Dakota","default":false},{"label":"Tennessee","value":"Tennessee","default":false},{"label":"Texas","value":"Texas","default":false},{"label":"Utah","value":"Utah","default":false},{"label":"Vermont","value":"Vermont","default":false},{"label":"Virginia","value":"Virginia","default":false},{"label":"Washington","value":"Washington","default":false},{"label":"West Virginia","value":"West Virginia","default":false},{"label":"Wisconsin","value":"Wisconsin","default":false},{"label":"Wyoming","value":"Wyoming","default":false}],"range-start":0,"range-end":100,"range-step":5},{"slug":"gift-zip-or-postal-code","visibility":"PUBLIC","label":"Gift Zip or Postal Code","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"health--medicine-newsletter","visibility":"PUBLIC","label":"Health & Medicine","required":false,"public-description":"The latest discoveries in health and medicine delivered every other Tuesday.","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"imported","visibility":"PUBLIC","label":"Imported","required":false,"public-description":"","validation-expression":null,"input-type":"date","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"investors-lab-newsletter","visibility":"PUBLIC","label":"Investors Lab Newsletter","required":false,"public-description":"","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"isdomesticonly","visibility":"PUBLIC","label":"isDomesticOnly","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"isrequiresfulfillment","visibility":"PUBLIC","label":"isRequiresFulfillment","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"last_name","visibility":"PUBLIC","label":"Last_Name","required":false,"public-description":"last_name","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"last-name","visibility":"PUBLIC","label":"Last Name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"legacy-subscriber-type","visibility":"PUBLIC","label":"Legacy Subscriber Type","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"Monthly","value":"Monthly","default":false},{"label":"SFS Subs","value":"SFS Subs","default":false}],"range-start":null,"range-end":null,"range-step":null},{"slug":"order-code","visibility":"PUBLIC","label":"Order Code","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"science-news-learning","visibility":"PUBLIC","label":"Science News Learning","required":false,"public-description":"Lesson plans to incorporate Science News Learning into classroom curricula delivered every Friday.","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"second-test-newsletter","visibility":"PUBLIC","label":"Second Test Newsletter","required":false,"public-description":"More General News Test","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"source-code","visibility":"PUBLIC","label":"Source Code","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"space-newsletter","visibility":"PUBLIC","label":"Space","required":false,"public-description":"The awe and wonder of our universe delivered to your inbox every other Friday.","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"state","visibility":"PUBLIC","label":"State","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"Alabama","value":"Alabama","default":false},{"label":"Alaska","value":"Alaska","default":false},{"label":"Arizona","value":"Arizona","default":false},{"label":"Arkansas","value":"Arkansas","default":false},{"label":"California","value":"California","default":false},{"label":"Colorado","value":"Colorado","default":false},{"label":"Connecticut","value":"Connecticut","default":false},{"label":"Delaware","value":"Delaware","default":false},{"label":"District of Columbia","value":"District of Columbia","default":false},{"label":"Florida","value":"Florida","default":false},{"label":"Georgia","value":"Georgia","default":false},{"label":"Hawaii","value":"Hawaii","default":false},{"label":"Idaho","value":"Idaho","default":false},{"label":"Illinois","value":"Illinois","default":false},{"label":"Indiana","value":"Indiana","default":false},{"label":"Iowa","value":"Iowa","default":false},{"label":"Kansas","value":"Kansas","default":false},{"label":"Kentucky","value":"Kentucky","default":false},{"label":"Louisiana","value":"Louisiana","default":false},{"label":"Maine","value":"Maine","default":false},{"label":"Maryland","value":"Maryland","default":false},{"label":"Massachusetts","value":"Massachusetts","default":false},{"label":"Michigan","value":"Michigan","default":false},{"label":"Minnesota","value":"Minnesota","default":false},{"label":"Mississippi","value":"Mississippi","default":false},{"label":"Missouri","value":"Missouri","default":false},{"label":"Montana","value":"Montana","default":false},{"label":"Nebraska","value":"Nebraska","default":false},{"label":"Nevada","value":"Nevada","default":false},{"label":"New Hampshire","value":"New Hampshire","default":false},{"label":"New Jersey","value":"New Jersey","default":false},{"label":"New Mexico","value":"New Mexico","default":false},{"label":"New York","value":"New York","default":false},{"label":"North Carolina","value":"North Carolina","default":false},{"label":"North Dakota","value":"North Dakota","default":false},{"label":"Ohio","value":"Ohio","default":false},{"label":"Oklahoma","value":"Oklahoma","default":false},{"label":"Oregon","value":"Oregon","default":false},{"label":"Pennsylvania","value":"Pennsylvania","default":false},{"label":"Rhode Island","value":"Rhode Island","default":false},{"label":"South Carolina","value":"South Carolina","default":false},{"label":"South Dakota","value":"South Dakota","default":false},{"label":"Tennessee","value":"Tennessee","default":false},{"label":"Texas","value":"Texas","default":false},{"label":"Utah","value":"Utah","default":false},{"label":"Vermont","value":"Vermont","default":false},{"label":"Virginia","value":"Virginia","default":false},{"label":"Washington","value":"Washington","default":false},{"label":"West Virginia","value":"West Virginia","default":false},{"label":"Wisconsin","value":"Wisconsin","default":false},{"label":"Wyoming","value":"Wyoming","default":false}],"range-start":0,"range-end":100,"range-step":5},{"slug":"state-canada","visibility":"PUBLIC","label":"State (Canada)","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"Alberta","value":"Alberta","default":false},{"label":"British Columbia","value":"British Columbia","default":false},{"label":"Manitoba","value":"Manitoba","default":false},{"label":"New Brunswick","value":"New Brunswick","default":false},{"label":"Newfoundland and Labrador","value":"Newfoundland and Labrador","default":false},{"label":"Northwest Territories","value":"Northwest Territories","default":false},{"label":"Nova Scotia","value":"Nova Scotia","default":false},{"label":"Nunavat","value":"Nunavat","default":false},{"label":"Ontario","value":"Ontario","default":false},{"label":"Prince Edward Island","value":"Prince Edward Island","default":false},{"label":"Quebec","value":"Quebec","default":false},{"label":"Saskatchewan","value":"Saskachewan","default":false},{"label":"Yukon","value":"Yukon","default":false}],"range-start":0,"range-end":100,"range-step":5},{"slug":"temporary-open-access","visibility":"PUBLIC","label":"Temporary Open Access","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"Yes","value":"Yes","default":false},{"label":"No","value":"No","default":false}],"range-start":null,"range-end":null,"range-step":null},{"slug":"the-cheat-sheet--resources-for-parents-and-teachers-delivered-mondays","visibility":"PUBLIC","label":"The Cheat Sheet","required":false,"public-description":"Helpful resources for teachers and parents from Science News Explores delivered every Monday.","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"welcome-email-product-name","visibility":"PUBLIC","label":"Welcome Email Product Name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"welcome-email-subscription-cost","visibility":"PUBLIC","label":"Welcome Email Subscription Cost","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"welcome-email-subscription-date","visibility":"PUBLIC","label":"Welcome Email Subscription Date","required":false,"public-description":"","validation-expression":null,"input-type":"date","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"welcome-email-subscription-period","visibility":"PUBLIC","label":"Welcome Email Subscription Period","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"zip-or-postal-code","visibility":"PUBLIC","label":"Zip or Postal Code","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":0,"range-end":100,"range-step":5}],"siteStyles":"{\"color\":{\"text\":{\"main\":\"#000000\",\"tinted\":\"#333333\"},\"background\":{\"main\":\"#FFFFFF\",\"tinted\":\"#cccccc\"},\"accent\":{\"main\":\"#DCF1FB\",\"tinted\":\"#81cdf1\"},\"action\":{\"main\":\"#e04a1f\",\"tinted\":\"#e66d4c\"},\"warning\":{\"main\":\"#D90B00\",\"tinted\":\"#ff190d\"}},\"typography\":{\"title\":{\"font\":\"Roboto\",\"fallbackFont\":\"sans-serif\"},\"body\":{\"font\":\"Roboto\",\"fallbackFont\":\"sans-serif\"}},\"button\":{\"fontWeight\":\"normal\",\"fontSize\":\"16\",\"borderWidth\":\"0\",\"borderRadius\":\"1\",\"height\":\"50\"},\"input\":{\"borderColor\":\"#333333\",\"borderWidth\":\"1\",\"borderRadius\":\"1\",\"height\":\"50\"}}","twoFactorEmailAuthenticationEnabled":false,"requireEmailVerfication":false,"hideConfirmPasswordOnRegForm":false,"passwordStrengthRequirements":{"minLength":8,"requireUppercase":true,"requireNumbers":true,"requireSpecialCharacters":true},"ruleAnalyticsEnabled":true,"paymentProvider":"stripe","braintreeSandboxEnv":true,"braintreeMobilePaymentConfig":null,"stripeMobilePaymentConfig":"{\"google\":{\"countryCode\":\"US\"},\"apple\":{\"countryCode\":\"US\"}}","stripeAutomaticTaxEnabled":false,"dataLayerName":"dataLayer","trackFormDataLayerEvents":false}})); 
                        </script><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["newsletter-signup"] = {
            featureLabel: "CTA: article top",
            outcomeId: "transformation/12",
            outcomeLabel: "homePageNewsletter (NEW VERSION) "
          };
        </script>
<!-- /wp:group --></aside>


<p>So just <em>reading</em> fake news can taint you with misinformation. In several experiments, Rapp’s team asked people to read short anecdotes or statements that contained either correct information or untruths. One example of untruthiness: The capital of Russia is St. Petersburg. (It’s Moscow.) Then the researchers surprised these people with a trivia quiz, including some questions about the “facts.” It turns out that people who read the untruths consistently gave more incorrect answers than those who read true or unrelated information, even if they had looked up the correct information previously. Troublingly, these people also then tended to believe that they had already known those incorrect facts before the experiment, showing how easy it is to forget where you “learned” something.</p>



<p>Whether someone can identify the capital of Russia may not seem important, but assertions involving incorrect scientific concepts (such as “brushing your teeth too much can lead to gum disease”) worked the same way in the experiments, and people used the incorrect information to make judgments. So someone who hears over and over again that “trees cause more pollution than automobiles do” might use that incorrect fact to oppose environmental regulations. In fact, I worry that just by me repeating that tired old line, you’ll remember it.</p>



<p>Even more alarming, we also <a href="https://www.ncbi.nlm.nih.gov/pubmed/22640369" target="_blank" rel="noopener">pick up incorrect information from pure fiction</a>, such as novels. Research finds that when we read fictional stories, we don’t just remember facts and plotlines. We use remembered bits of information to make deductions about how the world works, like a sorely misguided Sherlock Holmes.</p>



<p>And again, <a href="http://link.springer.com/article/10.3758/BF03193260" target="_blank" rel="noopener">knowing it’s fiction doesn’t help</a>. This means we now have a public unwittingly armed to assess fake news about GMOs using a genetics lesson gleaned from <em>Jurassic Park</em>.</p>



<p>Part of the problem lies in how our brain forms memories. For one, the more often a message is repeated (say on Facebook and Twitter), the more likely we are to remember it, an effect called fluent retrieval. That’s fine, but then our brains go one step further. “When we can remember something more easily, we’re more likely to believe it’s true,” says Rapp. This is one of the reasons that the social media echo chamber is so effective. Repeat a lie often enough, and it starts to feel like truth.</p>



<p>“I’ve had cases on my own Facebook feed,” says Rapp, “where people repeat a message they disagree with in an attempt to prove it wrong, and they accidentally amplify it.”</p>



<p>If you think you’ve never shared fake news, I have more bad news. We’re pretty bad at distinguishing fake news from real on social media, says Emilio Ferrara of the University of Southern California in Los Angeles. Ferrara published his <a href="http://journals.uic.edu/ojs/index.php/fm/article/view/7090/5653" target="_blank" rel="noopener">findings of widespread Twitter bots</a> in the run-up to the election in <em>First Monday</em>, a computer science journal focused on the internet.</p>



<p>He found that human Twitter users retweeted messages from bots at the same rate as messages from real people, “which means that the average user most likely retweets this content unconditionally,” he says. “It was an unexpected finding, because as an informed reader, I don’t retweet everything I see. But we see systematic lack of a critical ability to distinguish sources.”</p>



<p>Are we doomed, then, to repeat fake news until it becomes real in our minds? Rapp says no, but we’ll need to dust off the critical-thinking skills we learned in grade school.</p>



<p>First, we have to work extra hard while reading to not only remember a fact, but to remember that it’s false. “One idea is that when we encode problematic information as memory, unless we tag it as ‘wrong,’ we might accidentally retrieve that wrong info as real,” Rapp says.</p>


<aside class="sn-conversion rich-text rich-text--with-sidebar"><!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|gray-mid"}}}},"backgroundColor":"gray-light","textColor":"gray-mid"} -->
<p class="has-text-align-center" style="color:gray; margin-bottom:0px; font-size:.9rem;">Sponsor Message</p>
<!-- Tag ID: sciencenews-org_leaderboard_incontent -->
<div align="center" data-freestar-ad="__320x50 __300x250" id="sciencenews-org_leaderboard_incontent">
  <script data-cfasync="false" type="text/javascript">
    freestar.config.enabled_slots.push({ placementName: "sciencenews-org_leaderboard_incontent", slotId: "sciencenews-org_leaderboard_incontent" });
  </script>
</div><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["cta-article-inline-2-ad"] = {
            featureLabel: "CTA: article middle",
            outcomeId: "transformation/1",
            outcomeLabel: "Freestar ad leaderboard_incontent"
          };
        </script>
<!-- /wp:paragraph --></aside>


<p>In his <a href="http://link.springer.com/article/10.3758%2Fs13421-013-0339-0" target="_blank" rel="noopener">experiments</a>, people were better at remembering which facts were false if they fact-checked and corrected information as they read, or at least highlighted incorrect facts.</p>



<p>Explicitly noticing when something might be untrue, and then making an effort to fact-check it, can go a long way, Rapp says. That could be as simple as doing a Google search or checking a site like Snopes.com. Taking mental note of a story’s source and whether it’s reliable helps, too. In general, reinforcing correct knowledge in our memory as we read and compartmentalizing incorrect facts into a “not true” mental category can help keep our brains from becoming a murky fact stew.</p>



<p>In the end, the solution to the fake news problem lies in our own brains. While Facebook and Google try to block fake news with algorithms and starve it of ad dollars, the only way to really curb it is for readers to recognize it, and not share it.</p>

			</div> <!-- /.rich-text -->
			
<footer class="article-footer__wrapper___eChRS article-footer__with-sidebar___9oDuK">
			<p class="article-footer__feedback___sNXjz">Questions or comments on this article? E-mail us at&nbsp;<a href="mailto:feedback@sciencenews.org">feedback@sciencenews.org</a> | <a href="https://www.sciencenews.org/permission-republish">Reprints FAQ</a></p>
	
	
	
	
	
<div class="author-bio__wrapper___ODe-4">
	
	<div class="author-bio__content___F9GU3">
		<div class="author-bio__header___Z3FmU">
						<h3 class="author-bio__heading___MCzOr">About <a href="https://www.sciencenews.org/author/erika-engelhaupt" title="Posts by Erika Engelhaupt">Erika Engelhaupt</a></h3>

					</div>

		<div class="author-bio__bio___jkxvt">
			<p>Erika Engelhaupt is a freelance science writer and editor based in Knoxville, Tenn.</p>
		</div>
	</div>
</div>

	<aside class="sn-conversion rich-text rich-text--with-sidebar"><!-- wp:html -->
<style>
.donate-box {
  border-top: 7px solid red !important;
  border: 1px solid #ffcccb;
  margin-top: 50px;
  background-color: #fdfbf2;
  padding: 20px;
}
.from-nature-index__heading___AhgOe {
  display: none;
}
</style>
<!-- /wp:html -->

<!-- wp:group {"className":"donate-box"} -->
<style>.from-nature-index__heading___AhgOe {
    display: none;
}</style><div id="donateConversion" class="wp-block-group donate-box"><!-- wp:paragraph {"align":"left","style":{"typography":{"fontSize":"1.1em"}}} -->
<p class="has-text-align-left" style="font-size:1.1em">
We are at a critical time and <strong><mark>supporting science journalism 
is more important than ever</mark></strong>. <em>Science News</em> and our 
parent organization, the Society for Science, need your help to strengthen 
scientific literacy and ensure that important societal decisions are made 
with science in mind.</p>

<p class="has-text-align-left" style="font-size:1.1em">
Please 
<a href="https://www.sciencenews.org/subscribe1-print-digital?key=9MENDCON&utm_source=end-of-article&utm_medium=site&utm_campaign=non-sub-control">
subscribe to Science News and <strong>add $16</strong></a> to expand 
science literacy and understanding.
</p>
<!-- /wp:paragraph -->

<!-- wp:spacer {"height":"10px"} -->
<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></div><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["end-of-article-donate-cta"] = {
            featureLabel: "CTA: article end",
            outcomeId: "transformation/4",
            outcomeLabel: "non-subscribe policy CTA - 9MENDCON"
          };
        </script>
<!-- /wp:group --></aside></footer>
		</div>

					<aside class="single__sidebar___A2uoe">
				<section class="ad-block__mq-wrapper ad-block-sidebar__wrapper___-VwzJ ad-block-sidebar__freestar___92vhb">
	<div class="content">
		<!-- Tag ID: sciencenews-org_siderail_right -->
<div data-freestar-ad="__300x600" id="sciencenews-org_siderail_right" style="text-align: center;">
	<script data-cfasync="false" type="text/javascript">
		if (window.matchMedia("(min-width: 0px)").matches) {
			freestar.config.enabled_slots.push({ placementName: "sciencenews-org_siderail_right", slotId: "sciencenews-org_siderail_right" });
		} else {
			document.currentScript.closest('.ad-block__mq-wrapper').remove();
		}
	</script>
</div>
	</div>
</section>
<div class="widget-post-list widget-post-list--related-posts">
	<h3 class="widget-post-list__heading">
		Related Stories	</h3>

	<ol>
		
<li class="widget-post-list-item__wrapper___VMX0N item-1 with-image has-eyebrow-flag" role="listitem">			<figure class="figure">
			<a class="widget-post-list-item__thumbnail___RyxGO" href="https://www.sciencenews.org/article/parenthood-kids-brain-young-aging" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="A mom and dad sit on a green couch holding their three kids playfully." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3151322" data-permalink="https://www.sciencenews.org/030425_mp_parenthood-brain_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="030425_mp_parenthood-brain_feat" data-image-description="" data-image-caption="<p>As the number of kids parented increases, so does coordination between brain regions’ activities — particularly in a network that helps us infer other people’s thoughts — a new study reports.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="widget-post-list-item__content___z5CM8">
								<a href="https://www.sciencenews.org/topic/neuroscience" class="widget-post-list-item__eyebrow___Vv3Gn">
							Neuroscience						</a>
						
		<!-- The post title -->
		<h3 class="widget-post-list-item__title___XGFHE">
			<a href="https://www.sciencenews.org/article/parenthood-kids-brain-young-aging">
				Parenthood may help the brain stay young			</a>
		</h3>

		
					<div class="widget-post-list-item__meta___NGtqC">
				By <span class="widget-post-list-item__byline___wLFP- author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/mckenzie-prillaman" title="Posts by McKenzie Prillaman">McKenzie Prillaman</a></span><time class="widget-post-list-item__date___4W2tB entry-date published" datetime="2025-03-12T09:00:00-04:00">March 12, 2025</time>			</div>
			</div>
</li>
<li class="widget-post-list-item__wrapper___VMX0N item-2 with-image has-eyebrow-flag" role="listitem">			<figure class="figure">
			<a class="widget-post-list-item__thumbnail___RyxGO" href="https://www.sciencenews.org/article/why-chaos-seekers-want-world-burn" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="Some people generate chaos as a solution to their problems." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3150652" data-permalink="https://www.sciencenews.org/021125_sg_chaos_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="021125_sg_chaos_feat" data-image-description="" data-image-caption="<p>About 15 percent of the U.S. population desires chaos. Chaos seekers tend to harbor dark personality traits and feel as if they are losing social status.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="widget-post-list-item__content___z5CM8">
								<a href="https://www.sciencenews.org/topic/science-society" class="widget-post-list-item__eyebrow___Vv3Gn">
							Science &amp; Society						</a>
						
		<!-- The post title -->
		<h3 class="widget-post-list-item__title___XGFHE">
			<a href="https://www.sciencenews.org/article/why-chaos-seekers-want-world-burn">
				Why some chaos-seekers just want to watch the world burn			</a>
		</h3>

		
					<div class="widget-post-list-item__meta___NGtqC">
				By <span class="widget-post-list-item__byline___wLFP- author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/sujata-gupta" title="Posts by Sujata Gupta">Sujata Gupta</a></span><time class="widget-post-list-item__date___4W2tB entry-date published" datetime="2025-02-21T11:00:00-05:00">February 21, 2025</time>			</div>
			</div>
</li>
<li class="widget-post-list-item__wrapper___VMX0N item-3 with-image has-eyebrow-flag" role="listitem">			<figure class="figure">
			<a class="widget-post-list-item__thumbnail___RyxGO" href="https://www.sciencenews.org/article/negative-thoughts-anxiety-depression" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="This illustration shows a silhouette of a person with a scribbled cloud rising from their head. Getting stuck in negative thoughts common to many mental health disorders." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3150082" data-permalink="https://www.sciencenews.org/020625_sg_negative-thinking_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="020625_sg_negative-thinking_feat" data-image-description="" data-image-caption="<p>Repetitive negative thinking is common in patients with depression, anxiety, PTSD, insomnia and suicidal ideation. Transdiagnostic clinicians seek to dismantle those problematic thinking patterns, even absent an official diagnosis.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="widget-post-list-item__content___z5CM8">
								<a href="https://www.sciencenews.org/topic/psychology" class="widget-post-list-item__eyebrow___Vv3Gn">
							Psychology						</a>
						
		<!-- The post title -->
		<h3 class="widget-post-list-item__title___XGFHE">
			<a href="https://www.sciencenews.org/article/negative-thoughts-anxiety-depression">
				Breaking negative thought&nbsp;patterns&nbsp;could ward off anxiety, depression			</a>
		</h3>

		
					<div class="widget-post-list-item__meta___NGtqC">
				By <span class="widget-post-list-item__byline___wLFP- author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/sujata-gupta" title="Posts by Sujata Gupta">Sujata Gupta</a></span><time class="widget-post-list-item__date___4W2tB entry-date published" datetime="2025-02-11T11:00:00-05:00">February 11, 2025</time>			</div>
			</div>
</li>	</ol>
</div>
<section class="ad-block__mq-wrapper ad-block-sticky-sidebar__wrapper___Te-qO freestar">
	<div class="content">
		<!-- Tag ID: sciencenews-org_siderail_right_2 -->
<div align="center" data-freestar-ad="__300x600" id="sciencenews-org_siderail_right_2">
	<script data-cfasync="false" type="text/javascript">
		if (window.matchMedia("(min-width: 0px)").matches) {
			freestar.config.enabled_slots.push({ placementName: "sciencenews-org_siderail_right_2", slotId: "sciencenews-org_siderail_right_2" });
		} else {
			document.currentScript.closest('.ad-block__mq-wrapper').remove();
		}
	</script>
</div>
	</div>
</section>
			</aside>
			</div>
</article><!-- #post-## -->


<section class="more-on-topic__wrapper___NVO9k">
	<h2 id="carousel-heading" class="more-on-topic__heading___oSdNk">
		More Stories from Science News on <a href="https://www.sciencenews.org/topic/psychology">Psychology</a>
	</h2>
	
<div class="carousel__container___bKHIO" data-component="carousel" aria-labelledby="carousel-heading">
	<div class="carousel__controls-wrapper___icD8R"></div>

	<div class="swiper">
		<ol class="slides swiper-wrapper carousel__slides___eKqkJ">
			
<li class="carousel__wrapper___wIECZ item-1 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/parenthood-kids-brain-young-aging" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="A mom and dad sit on a green couch holding their three kids playfully." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3151322" data-permalink="https://www.sciencenews.org/030425_mp_parenthood-brain_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="030425_mp_parenthood-brain_feat" data-image-description="" data-image-caption="<p>As the number of kids parented increases, so does coordination between brain regions’ activities — particularly in a network that helps us infer other people’s thoughts — a new study reports.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/03/030425_mp_parenthood-brain_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/neuroscience" class="carousel__eyebrow___VMI-N">
							Neuroscience						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/parenthood-kids-brain-young-aging">
				Parenthood may help the brain stay young			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/mckenzie-prillaman" title="Posts by McKenzie Prillaman">McKenzie Prillaman</a></span><time class="carousel__date___6yarP entry-date published" datetime="2025-03-12T09:00:00-04:00">March 12, 2025</time>			</div>
			</div>
</li>
<li class="carousel__wrapper___wIECZ item-2 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/why-chaos-seekers-want-world-burn" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="Some people generate chaos as a solution to their problems." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3150652" data-permalink="https://www.sciencenews.org/021125_sg_chaos_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="021125_sg_chaos_feat" data-image-description="" data-image-caption="<p>About 15 percent of the U.S. population desires chaos. Chaos seekers tend to harbor dark personality traits and feel as if they are losing social status.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/021125_sg_chaos_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/science-society" class="carousel__eyebrow___VMI-N">
							Science &amp; Society						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/why-chaos-seekers-want-world-burn">
				Why some chaos-seekers just want to watch the world burn			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/sujata-gupta" title="Posts by Sujata Gupta">Sujata Gupta</a></span><time class="carousel__date___6yarP entry-date published" datetime="2025-02-21T11:00:00-05:00">February 21, 2025</time>			</div>
			</div>
</li>
<li class="carousel__wrapper___wIECZ item-3 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/negative-thoughts-anxiety-depression" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="This illustration shows a silhouette of a person with a scribbled cloud rising from their head. Getting stuck in negative thoughts common to many mental health disorders." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3150082" data-permalink="https://www.sciencenews.org/020625_sg_negative-thinking_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="020625_sg_negative-thinking_feat" data-image-description="" data-image-caption="<p>Repetitive negative thinking is common in patients with depression, anxiety, PTSD, insomnia and suicidal ideation. Transdiagnostic clinicians seek to dismantle those problematic thinking patterns, even absent an official diagnosis.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/02/020625_sg_negative-thinking_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/psychology" class="carousel__eyebrow___VMI-N">
							Psychology						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/negative-thoughts-anxiety-depression">
				Breaking negative thought&nbsp;patterns&nbsp;could ward off anxiety, depression			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/sujata-gupta" title="Posts by Sujata Gupta">Sujata Gupta</a></span><time class="carousel__date___6yarP entry-date published" datetime="2025-02-11T11:00:00-05:00">February 11, 2025</time>			</div>
			</div>
</li>
<li class="carousel__wrapper___wIECZ item-4 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/ai-chatbot-personalities" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="Researchers prompt chatbots to fill out standard personality tests." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3149486" data-permalink="https://www.sciencenews.org/012425_sg_ai-personality_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="012425_sg_ai-personality_feat" data-image-description="" data-image-caption="<p>Chatbots’ training imbues them with personality traits, some researchers suspect. To find out, researchers are prompting the bots to answer questions from standard personality tests, as shown here.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/012425_sg_ai-personality_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/artificial-intelligence" class="carousel__eyebrow___VMI-N">
							Artificial Intelligence						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/ai-chatbot-personalities">
				Are AI chatbot ‘personalities’ in the eye of the beholder?			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/sujata-gupta" title="Posts by Sujata Gupta">Sujata Gupta</a></span><time class="carousel__date___6yarP entry-date published" datetime="2025-02-05T09:00:00-05:00">February 5, 2025</time>			</div>
			</div>
</li>
<li class="carousel__wrapper___wIECZ item-5 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/survivors-la-fires-mental-health" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="couple observes LA fire damage" loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3148739" data-permalink="https://www.sciencenews.org/011725_sg_mental-health-fires_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;Copyright 2025 The Associated Press. All rights reserved&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="011725_sg_mental-health-fires_feat" data-image-description="" data-image-caption="<p>A trio of catastrophic wildfires in Los Angeles, including the Eaton Fire shown here, have killed dozens and leveled entire neighborhoods. Survivors need psychological and logistic support to mitigate long-term psychological distress, experts say.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/011725_sg_mental-health-fires_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/psychology" class="carousel__eyebrow___VMI-N">
							Psychology						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/survivors-la-fires-mental-health">
				Survivors of the LA fires will face a complex blend of mental health challenges			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/sujata-gupta" title="Posts by Sujata Gupta">Sujata Gupta</a></span><time class="carousel__date___6yarP entry-date published" datetime="2025-01-17T16:24:10-05:00">January 17, 2025</time>			</div>
			</div>
</li>
<li class="carousel__wrapper___wIECZ item-6 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/shadows-into-light-book-review-child" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="A child soldier holding a gun on their back walking down a path." loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3148210" data-permalink="https://www.sciencenews.org/010125_shadows-into-light_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;Credit: WENN Rights Ltd \/ Alamy Stock Photo&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="010125_shadows-into-light_feat" data-image-description="" data-image-caption="<p>Researchers are studying how to help children and their families recover from the trauma of war.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2025/01/010125_shadows-into-light_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/humans" class="carousel__eyebrow___VMI-N">
							Humans						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/shadows-into-light-book-review-child">
				How child soldiers heal after the trauma of war			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/elizabeth-quill" title="Posts by Elizabeth Quill">Elizabeth Quill</a></span><time class="carousel__date___6yarP entry-date published" datetime="2025-01-10T08:00:00-05:00">January 10, 2025</time>			</div>
			</div>
</li>
<li class="carousel__wrapper___wIECZ item-7 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/link-emotions-body-parts-3000-years" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="Slices of the same man's face are shown roughly 12 times, stretched out like a panoramic shot, each displaying a portion of a different facial expression" loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3147364" data-permalink="https://www.sciencenews.org/120924_jb_embodied-emotions_feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="120924_jb_embodied-emotions_feat" data-image-description="" data-image-caption="<p>A new study suggests that the anatomical connections we make to emotions have ancient roots. </p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/12/120924_jb_embodied-emotions_feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/anthropology" class="carousel__eyebrow___VMI-N">
							Anthropology						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/link-emotions-body-parts-3000-years">
				Humans have linked emotions to the same body parts for 3,000 years			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/jason-bittel" title="Posts by Jason Bittel">Jason Bittel</a></span><time class="carousel__date___6yarP entry-date published" datetime="2024-12-13T11:00:00-05:00">December 13, 2024</time>			</div>
			</div>
</li>
<li class="carousel__wrapper___wIECZ item-8 with-image has-eyebrow-flag swiper-slide" role="listitem">			<figure class="carousel__figure___kTYKK">
			<a class="carousel__thumbnail___qpV-2" href="https://www.sciencenews.org/article/magic-sound-auditory-visual-illusion" aria-hidden="true" tabindex="-1">
				<img width="330" height="186" src="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?fit=330%2C186&amp;ssl=1" class="attachment-thumbnail size-thumbnail" alt="Multicolored wavy lines" loading="lazy" decoding="async" srcset="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?w=1440&amp;ssl=1 1440w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?resize=680%2C383&amp;ssl=1 680w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?resize=800%2C450&amp;ssl=1 800w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?resize=330%2C186&amp;ssl=1 330w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?resize=1030%2C580&amp;ssl=1 1030w, https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?resize=1380%2C776&amp;ssl=1 1380w" sizes="auto, (max-width: 330px) 100vw, 330px" data-attachment-id="3146115" data-permalink="https://www.sciencenews.org/111324-sp-auditory-magic-feat" data-orig-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?fit=1440%2C810&amp;ssl=1" data-orig-size="1440,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="111324-sp-auditory-magic-feat" data-image-description="" data-image-caption="<p>Magic tricks rarely rely on sound alone, possibly because of differences in visual and auditory perception. A recent contest to create a sound-only illusion is part of an effort to explore that.</p>
" data-medium-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?fit=680%2C383&amp;ssl=1" data-large-file="https://i0.wp.com/www.sciencenews.org/wp-content/uploads/2024/11/111324-sp-auditory-magic-feat.jpg?fit=800%2C450&amp;ssl=1">			</a>
		</figure>
	
	<div class="carousel__content___Lm9o8">
								<a href="https://www.sciencenews.org/topic/psychology" class="carousel__eyebrow___VMI-N">
							Psychology						</a>
						
		<!-- The post title -->
		<h3 class="carousel__title___1uDeB">
			<a href="https://www.sciencenews.org/article/magic-sound-auditory-visual-illusion">
				Researchers seek, and find, a magical illusion for the ears			</a>
		</h3>

		
					<div class="carousel__meta___gWzdc">
				By <span class="carousel__byline___W1NyC author vcard"><a class="byline-link url fn n" href="https://www.sciencenews.org/author/sushmita-pathak" title="Posts by Sushmita Pathak">Sushmita Pathak</a></span><time class="carousel__date___6yarP entry-date published" datetime="2024-11-13T14:27:21-05:00">November 13, 2024</time>			</div>
			</div>
</li>		</ol>
	</div>
</div>
</section>
<section class="ad-block__mq-wrapper ad-block-leaderboard__wrapper___YcoEf ad-block-leaderboard__freestar___0untO">
	<div class="content">
		<!-- Tag ID: sciencenews-org_leaderboard_btf -->
<div align="center" data-freestar-ad="__300x250 __970x250" id="sciencenews-org_leaderboard_btf">
	<script data-cfasync="false" type="text/javascript">
		if (window.matchMedia("(min-width: 0px)").matches) {
			freestar.config.enabled_slots.push({ placementName: "sciencenews-org_leaderboard_btf", slotId: "sciencenews-org_leaderboard_btf" });
		} else {
			document.currentScript.closest('.ad-block__mq-wrapper').remove();
		}
	</script>
</div>
	</div>
</section>
	</main><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["testing-component"] = {
            featureLabel: "Testing component",
            outcomeId: "transformation/2",
            outcomeLabel: "Do Nothing"
          };
        </script><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["article"] = {
            featureLabel: "Article Rules",
            outcomeId: "transformation/9",
            outcomeLabel: "Do Nothing"
          };
        </script>
</div><!-- #page -->


<div class="site-footer__wrapper___-h1gI">
	<footer class="site-footer__container___2d5EZ">
		<div class="site-footer__content___KLJ8g">
			<div class="site-footer__branding___HC6bd">
									<a class="site-footer__logo___IY-GE" href="https://www.sciencenews.org/" rel="home">
						<h2 class="screen-reader-text">Science News</h2>
						
<svg focusable="false" aria-hidden="true" viewbox="0 0 330 50" xmlns="http://www.w3.org/2000/svg"><path d="m314.4 47.35c5.78 0 10.6-3.25 10.6-8.85 0-4.52-2.35-6.87-9.58-10.24-6.63-3.13-8.49-4.52-8.49-7.41 0-2.59 2.35-4.28 5.18-4.28 4.4 0 8.61 3.85 10.66 9.52h.72l-1.45-10.54h-.54c-.12 2.83-3.73.12-9.22.12-5.06 0-9.64 3.55-9.64 8.31 0 4.28 2.17 6.38 8.61 9.34 5.96 2.83 8.61 4.82 8.61 8.07s-2.71 5-5.36 5c-3.73 0-9.03-3.79-11.62-10.6h-.78l1.87 11.26h.48c.36-3.55 4.16.3 9.94.3m-37.69-25.54 2.11 5.96-5.24 13.19-7.05-19.15c-1.45-3.85-1.02-4.46 1.14-4.58v-.78h-11.44v.78c1.87.18 3.01 1.57 4.52 5.78l8.85 24.21c1.51-1.08 3.25-1.69 4.94-2.17-.48-2.17.24-4.64 2.05-9.03l2.71-6.81 6.32 18.01c1.45-.72 3.31-1.39 4.88-1.87-.54-2.17.18-4.58 1.87-8.97l5.36-13.67c1.57-3.98 3.25-5.3 5.3-5.48v-.78h-10.24v.78c3.13.12 4.76 1.81 3.37 5.66l-6.63 18.25-6.75-18.91c-1.26-3.61-.48-4.94 2.29-5v-.78h-11.62v.78c1.02.12 2.05 1.33 3.25 4.58m-39.93 5.72c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.56 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-23.38.25c1.02-.84 3.67-2.11 5.84-2.71-.96-1.87-1.39-3.98-1.33-6.93l.36-28.91c0-3.67 1.69-4.88 5.3-5.06v-.78h-13.13v.78c4.46.18 6.44 1.39 6.44 5l-.06 31.26-23.66-37.04h-11.68v.78c3.91.18 5.66 1.39 5.6 5l-.3 31.74c-.06 3.67-1.87 4.88-5.96 5.06v.78h13.67v-.78c-4.22-.18-6.08-1.39-6.14-5l-.24-32.83 25.3 39.63zm-52.4-20.06c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.55 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-27.72.01c5.84 0 10.72-3.61 12.65-9.4l-.54-.3c-1.99 4.16-5.9 5.3-8.79 5.3-6.5 0-11.26-5.6-11.26-14.82 0-6.87 3.49-11.44 8.55-11.44 4.04 0 5.66 2.53 5.66 4.58 0 1.69-.84 2.77-.84 4.28 0 1.93 1.26 3.07 3.01 3.07s3.25-1.51 3.25-4.28c0-4.16-4.04-8.67-10.72-8.67-8.37 0-14.58 7.17-14.58 16.14s5.54 15.54 13.61 15.54m-26.8-.79h13.19v-.78c-2.47-.18-3.73-1.14-3.73-3.98v-17.17c0-6.14-2.95-8.97-7.53-8.97s-8.73 3.07-11.26 8.19h-.3l.72-8.19h-.24l-9.82 2.71.12.78c3.07-.54 3.85.96 3.85 3.73v18.61c0 3.13-1.08 4.16-3.73 4.28v.78h13.61v-.78c-2.65-.18-3.91-1.14-3.91-3.98v-16.62c2.29-4.34 5.48-5.72 7.53-5.72 3.01 0 5 1.93 5 6.63v15.42c0 3.13-1.02 4.16-3.49 4.28v.78zm-39.57-19.03c0-6.44 3.25-10.78 7.41-10.78 3.85 0 6.32 3.49 6.32 7.77 0 2.17-.72 2.71-4.28 3.25l-9.4 1.63-.06-1.87zm8.55 19.82c5.72 0 10.3-3.79 12.17-9.58l-.36-.18c-1.69 3.43-5 5.42-8.73 5.42-6.93 0-10.72-5.96-11.5-12.83l20.12-2.65c-.24-8.07-5.36-11.87-11.81-11.87-8.13 0-14.03 6.69-14.03 15.66s6.14 16.02 14.15 16.02m-21.39-36.49c2.11 0 3.85-1.69 3.85-3.73s-1.75-3.85-3.85-3.85c-1.99 0-3.79 1.75-3.79 3.85s1.75 3.73 3.79 3.73m-6.32 35.71h13.25v-.78c-2.41-.18-3.55-1.14-3.55-3.98v-26.14h-.24l-9.64 2.71v.78c2.95-.3 3.91 1.02 3.91 3.91v18.43c0 3.13-1.08 4.16-3.73 4.28v.78zm-13.01.79c5.84 0 10.72-3.61 12.65-9.4l-.54-.3c-1.99 4.16-5.9 5.3-8.79 5.3-6.5 0-11.26-5.6-11.26-14.82 0-6.87 3.49-11.44 8.55-11.44 4.04 0 5.66 2.53 5.66 4.58 0 1.69-.84 2.77-.84 4.28 0 1.93 1.26 3.07 3.01 3.07s3.25-1.51 3.25-4.28c0-4.16-4.04-8.67-10.72-8.67-8.37 0-14.58 7.17-14.58 16.14s5.54 15.54 13.61 15.54m-30.84 0c7.83 0 14.09-4.82 14.09-12.41 0-6.44-3.19-9.52-12.41-13.73-8.55-3.98-11.87-6.63-11.87-10.96 0-3.98 3.19-6.87 7.89-6.87 5.42 0 11.87 4.46 14.15 13.73h.78l-1.14-14.21h-.72c-.06 1.51-.6 2.05-1.51 2.05-1.87 0-6.32-2.53-11.38-2.53-8.13 0-12.89 5.54-12.89 11.62s3.37 9.22 11.32 12.83c9.4 4.4 12.77 6.63 12.77 11.56s-4.16 7.95-8.85 7.95c-5.84 0-13.37-6.87-15.48-16.32h-.78l1.63 16.68h.72c.06-1.87.66-2.47 1.81-2.47 2.23 0 6.38 3.07 11.87 3.07" /><path d="m5 2.41h320v45.17h-320z" fill="none" /></svg>
					</a>

					<div class="site-footer__description___Si57o"><p>Science News was founded in 1921 as an independent, nonprofit source of accurate information on the latest news of science, medicine and technology. Today, our mission remains the same: to empower people to evaluate the news and the world around them. It is published by the Society for Science, a nonprofit 501(c)(3) membership organization dedicated to public engagement in scientific research and education (EIN 53-0196483).</p>
</div>

					<ul class="site-footer__properties___cMdbY" aria-label="Additional properties">
						<li class="site-footer__property___yTaDz">
															<a href="https://www.snexplores.org" class="sns-link">Science News Explores</a>
													</li>

						<li class="site-footer__property___yTaDz">
							<a href="https://www.sciencenews.org/learning/" class="snhs-link">Science News Learning</a>
						</li>
					</ul>
								</div>

			<div class="site-footer__info___oQYW1">
				<div class="site-footer__menus___gasYQ">
													<nav class="site-footer__nav___uCRAS" aria-labelledby="nav-heading-48">

								<h3 class="site-footer__heading___TjDMa" id="nav-heading-48">
						Subscriber Services					</h3>
					<ul class="site-footer__menu___GFF-A site-footer__first___f9yod">
				
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="/subscribe1?key=9MFSUB&amp;utm_source=sciencenews&amp;utm_medium=footer&amp;utm_campaign=sn-footer&amp;tfa_3134=sn-footer">
							Subscribe						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://sfsdata.com/SubscriberServices/AccountStart.html?PUB=SCN">
							Renew						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.sciencenews.org/give-a-gift?key=9MFGIFT&amp;utm_source=link&amp;utm_medium=footer&amp;utm_campaign=gift">
							Give a Gift Subscription						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://sfsdata.com/SubscriberServices/AccountStart.html?PUB=SCN">
							Customer Service						</a>
					</li>
				
													</ul>

											<ul class="site-footer__social___jrzu4" aria-label="Social links">
															<li class="site-footer__item___2y987">
									<a class="site-footer__link___xotbk site-footer__facebook___SToBh" href="https://facebook.com/sciencenews">
										<span class="screen-reader-text">Follow Science News on Facebook</span>
										<span class="site-footer__icon___zw3zB"></span>
									</a>
								</li>
							
															<li class="site-footer__item___2y987">
									<a class="site-footer__link___xotbk site-footer__twitter___D9xsC" href="https://twitter.com/sciencenews">
										<span class="screen-reader-text">Follow Science News on X</span>
										<span class="site-footer__icon___zw3zB"></span>
									</a>
								</li>
							
							<li class="site-footer__item___2y987">
								<a class="site-footer__link___xotbk site-footer__rss___j-1bD" href="https://www.sciencenews.org/feed/">
									<span class="screen-reader-text">Follow Science News via RSS</span>
									<span class="site-footer__icon___zw3zB"></span>
								</a>
							</li>

															<li class="site-footer__item___2y987">
									<a class="site-footer__link___xotbk site-footer__instagram___x-kDN" href="https://www.instagram.com/sciencenewsmagazine/">
										<span class="screen-reader-text">Follow Science News on Instagram</span>
										<span class="site-footer__icon___zw3zB"></span>
									</a>
								</li>
							
															<li class="site-footer__item___2y987">
									<a class="site-footer__link___xotbk site-footer__youtube___oglUP" href="https://www.youtube.com/channel/UCBX5er6E37_yWB3gCM32p3g">
										<span class="screen-reader-text">Follow Science News on YouTube</span>
										<span class="site-footer__icon___zw3zB"></span>
									</a>
								</li>
							
															<li class="site-footer__item___2y987">
									<a class="site-footer__link___xotbk site-footer__tiktok___oRYtm" href="https://www.tiktok.com/@sciencenewsofficial">
										<span class="screen-reader-text">Follow Science News on TikTok</span>
										<span class="site-footer__icon___zw3zB"></span>
									</a>
								</li>
													</ul>
								</nav>
				<nav class="site-footer__nav___uCRAS" aria-labelledby="nav-heading-49">

								<h3 class="site-footer__heading___TjDMa" id="nav-heading-49">
						More Information					</h3>
					<ul class="site-footer__menu___GFF-A">
				
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.sciencenews.org/about-science-news/frequently-asked-questions">
							FAQ						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.sciencenews.org/newsletters">
							Newsletters						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.sciencenews.org/permission-republish">
							Rights &amp; Permissions						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.sciencenews.org/advertise-science-news">
							Advertise						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.sciencenews.org/about-science-news/contact-us">
							Contact						</a>
					</li>
				
													</ul>

							</nav>
				<nav class="site-footer__nav___uCRAS" aria-labelledby="nav-heading-50">

								<h3 class="site-footer__heading___TjDMa" id="nav-heading-50">
						Society for Science					</h3>
					<ul class="site-footer__menu___GFF-A">
				
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.societyforscience.org/">
							About the Society						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.societyforscience.org/store/">
							Society Store						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.sciencenews.org/give">
							Donate						</a>
					</li>
				
								
									<li class="site-footer__menu-item___kNjbp">
						<a class="menu-link" href="https://www.societyforscience.org/jobs-and-internships">
							Careers						</a>
					</li>
				
													</ul>

							</nav>
											</div>
			</div>
		</div>

		<div class="site-footer__legal___kX-Or">
			<p class="copyright">
				© Society for Science &amp; the Public 2000–2025. All rights reserved.			</p>

			<address class="site-footer__address___4unOl">
									<span class="location">1776 Massachusetts Ave NW, Washington, DC 20036</span>
				
									<a class="site-footer__phone___J4dMi" href="tel:202.785.2255">202.785.2255</a>
							</address>

								<a class="site-footer__page___4E9r6" href="https://www.sciencenews.org/terms-of-service">Terms of Service</a>
										<a class="site-footer__page___4E9r6" href="https://www.sciencenews.org/privacy-policy">Privacy Policy</a>
					
					<!-- HTML for geo depending button -->
			<div>
				<button id="pmLink">Privacy Manager</button>
			</div>
			<!-- CSS for geo depending button -->
			<style>
				#pmLink {
					visibility: hidden;
					text-decoration: none;
					cursor: pointer;
					background: transparent;
					border: none;
					color: inherit;
					font-size: inherit;
					padding: 0;
				}

				#pmLink:hover {
					visibility: visible;
					text-decoration: underline;
				}
			</style>
				</div>
	</footer>
</div>
</div> <!--/ .site-wrapper -->


<div class="modal-access modal-access--modal" id="modal-access" hidden>
	<button type="button" class="modal-access__close"><span class="screen-reader-text">Close</span></button>

	<div class="modal-access__content">
		<h2 class="modal-access__heading">Log in</h2>

		<div class="modal-access__message">
			<p>Subscribers, enter your e-mail address for full access to the <em>Science News</em> archives and digital editions.</p>
<p>Not a subscriber?<br>
<a href="https://www.sciencenews.org/subscription?utm_source=sciencenews&amp;utm_medium=login&amp;utm_campaign=sn-login&amp;tfa_3134=sn-login">Become one now</a>.</p>
		</div>
	</div>

	<div class="modal-access__form-wrapper">
			<form role="form" class="login-form login-form--modal-access  __sn_ga-signup-form __sn_ga-signup-form--blog" method="post" action="/wp-json/sn/v1/restricted-content" novalidate data-component="form-assembly">
		<input type="hidden" id="nonce-51" name="nonce" value="4f0dac102c">
		<input type="hidden" id="redirect_url-52" name="redirect_url" value="https://www.sciencenews.org/blog/science-the-public/youve-probably-been-tricked-fake-news-and-dont-know-it">
		<input type="hidden" id="control-53" name="control" value="edd3e5273d19837dcc2428d9676cbce7">
		<input type="hidden" id="form_id-54" name="form_id" value="346">

		<label for="client_key" class="login-form__client-key" aria-hidden="true">Client key*</label>
		<input id="client_key" name="client_key" value="" class="login-form__client-key" aria-hidden="true">
		<label for="email" class="login-form__label">E-mail Address*</label>
		<input type="email" pattern=".+@.+\..+" required id="email" name="email" value="" aria-required="true" placeholder="E-mail" data-dataset-allow-free-responses="" class="validate-email required login-form__input">

		<button type="submit" data-label="Submit" class="primaryAction login-form__submit post email __sn_ga-signup-cta __sn_ga-signup-cta--blog" id="email346">Log In</button>
	</form>

	<div class="login-form__loading-overlay">
		<div class="login-form__loading-spinner"></div>
	</div>

	
		</div>

</div>
<div id="dialog-overlay" style="display:none;"></div>


<div class="modal-conversion modal-conversion--modal" id="modal-conversion" data-delay="5" data-component="conversion-modal" hidden>
	<div class="modal-conversion__container">
		<button type="button" class="modal-conversion__close" aria-label="Close">
			
<svg focusable="false" aria-hidden="true" viewbox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="m14 1.41-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z" /></svg>
		</button>

		<div class="modal-conversion__content">
							<div class="modal-conversion__content-target"></div><script type="text/javascript">
          if (!window.Zephr) window.Zephr = {};
          if (!window.Zephr.outcomes) window.Zephr.outcomes = {};
          window.Zephr.outcomes["popups"] = {
            featureLabel: "Popups",
            outcomeId: "transformation/1",
            outcomeLabel: "Do nothing"
          };
        </script>
						</div>
	</div>
</div>
		<script type="text/javascript" src="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/js/single.bundle.min.js?ver=d4819185d32990cec2b9121220231132" id="sciencenews-single-js-js"></script>
<script type="text/javascript" src="https://www.sciencenews.org/wp-content/themes/sciencenews/client/build/js/rich-text.bundle.min.js?ver=c1debe52234398664c1f121220231132" id="sciencenews-rich-text-js-js"></script>
<script type="text/javascript" id="sciencenews-legacy-slideshow-js-js-extra">
/* <![CDATA[ */
var sciencenewsLegacyAssetsURL = "https://www.sciencenews.org\/wp-content\/themes\/sciencenews\/client\/legacy";
var sciencenewsLegacySite = "sciencenews";
/* ]]> */
</script>
<script type="text/javascript" src="https://www.sciencenews.org/wp-content/themes/sciencenews/client/legacy/js/slideshow.js?ver=1.0.1" id="sciencenews-legacy-slideshow-js-js"></script>
<script type="text/javascript" src="https://stats.wp.com/e-202511.js" id="jetpack-stats-js" data-wp-strategy="defer"></script>
<script type="text/javascript" id="jetpack-stats-js-after">
/* <![CDATA[ */
_stq = window._stq || [];
_stq.push([ "view", JSON.parse("{\"v\":\"ext\",\"blog\":\"165798862\",\"post\":\"39834\",\"tz\":\"-4\",\"srv\":\"www.sciencenews.org\",\"j\":\"1:14.3\"}") ]);
_stq.push([ "clickTrackerInit", "165798862", "39834" ]);
/* ]]> */
</script>
<script type="text/javascript" id="sharing-js-js-extra">
/* <![CDATA[ */
var sharing_js_options = {"lang":"en","counts":"","is_stats_active":"1"};
/* ]]> */
</script>
<script type="text/javascript" src="https://www.sciencenews.org/wp-content/plugins/jetpack/_inc/build/sharedaddy/sharing.min.js?ver=14.3" id="sharing-js-js"></script>
<script type="text/javascript" id="sharing-js-js-after">
/* <![CDATA[ */
var windowOpen;
			( function () {
				function matches( el, sel ) {
					return !! (
						el.matches && el.matches( sel ) ||
						el.msMatchesSelector && el.msMatchesSelector( sel )
					);
				}

				document.body.addEventListener( 'click', function ( event ) {
					if ( ! event.target ) {
						return;
					}

					var el;
					if ( matches( event.target, 'a.share-facebook' ) ) {
						el = event.target;
					} else if ( event.target.parentNode && matches( event.target.parentNode, 'a.share-facebook' ) ) {
						el = event.target.parentNode;
					}

					if ( el ) {
						event.preventDefault();

						// If there's another sharing window open, close it.
						if ( typeof windowOpen !== 'undefined' ) {
							windowOpen.close();
						}
						windowOpen = window.open( el.getAttribute( 'href' ), 'wpcomfacebook', 'menubar=1,resizable=1,width=600,height=400' );
						return false;
					}
				} );
			} )();
var windowOpen;
			( function () {
				function matches( el, sel ) {
					return !! (
						el.matches && el.matches( sel ) ||
						el.msMatchesSelector && el.msMatchesSelector( sel )
					);
				}

				document.body.addEventListener( 'click', function ( event ) {
					if ( ! event.target ) {
						return;
					}

					var el;
					if ( matches( event.target, 'a.share-twitter' ) ) {
						el = event.target;
					} else if ( event.target.parentNode && matches( event.target.parentNode, 'a.share-twitter' ) ) {
						el = event.target.parentNode;
					}

					if ( el ) {
						event.preventDefault();

						// If there's another sharing window open, close it.
						if ( typeof windowOpen !== 'undefined' ) {
							windowOpen.close();
						}
						windowOpen = window.open( el.getAttribute( 'href' ), 'wpcomtwitter', 'menubar=1,resizable=1,width=600,height=350' );
						return false;
					}
				} );
			} )();
var windowOpen;
			( function () {
				function matches( el, sel ) {
					return !! (
						el.matches && el.matches( sel ) ||
						el.msMatchesSelector && el.msMatchesSelector( sel )
					);
				}

				document.body.addEventListener( 'click', function ( event ) {
					if ( ! event.target ) {
						return;
					}

					var el;
					if ( matches( event.target, 'a.share-pocket' ) ) {
						el = event.target;
					} else if ( event.target.parentNode && matches( event.target.parentNode, 'a.share-pocket' ) ) {
						el = event.target.parentNode;
					}

					if ( el ) {
						event.preventDefault();

						// If there's another sharing window open, close it.
						if ( typeof windowOpen !== 'undefined' ) {
							windowOpen.close();
						}
						windowOpen = window.open( el.getAttribute( 'href' ), 'wpcompocket', 'menubar=1,resizable=1,width=450,height=450' );
						return false;
					}
				} );
			} )();
/* ]]> */
</script>

<script type="text/javascript">
  window.Zephr = window.Zephr || {};
  window.Zephr.includeOutcomes = true;
  window.Zephr.outcomesAsEvents = true;
  window.Zephr.groupFields = false;
(function() {
    var xhr = new(XMLHttpRequest || ActiveXObject)('MSXML2.XMLHTTP.3.0');
    xhr.open('GET', '/blaize/datalayer', true);
    xhr.onreadystatechange = function() {
        if (xhr.readyState === 4) {
            var response;
            try {
                response = JSON.parse(xhr.response);
            } catch (e) {
                response = xhr.response;
            }
            if (xhr.status === 200) {
                for (var dataLayerFieldName in response) {
                    if (!(dataLayerFieldName in window)) window[dataLayerFieldName] = [];

                    var pageView = response[dataLayerFieldName];
                    var events = [];

                    if (window.Zephr && window.Zephr.includeOutcomes && window.Zephr.outcomes) {
                        pageView.zephrOutcomes = window.Zephr.outcomes;

                        if (window.Zephr.outcomesAsEvents) {
                            Object.keys(window.Zephr.outcomes || []).forEach(function(outcomeKey) {
                                var outcomeEvent = {
                                    event: "zephr-outcome-" + outcomeKey,
                                    featureId: outcomeKey,
                                    featureLabel: window.Zephr.outcomes[outcomeKey].featureLabel,
                                    outcomeId: window.Zephr.outcomes[outcomeKey].outcomeId,
                                    outcomeLabel: window.Zephr.outcomes[outcomeKey].outcomeLabel,
                                };
                                events.push(outcomeEvent);
                            });
                        }
                    }
                    if (window.Zephr && window.Zephr.accessDetails) {
                        Object.keys((window.Zephr.accessDetails.trials || {})).forEach(function(trialId){
                            var trial = window.Zephr.accessDetails.trials[trialId]
                            if(trial.reportInDataLayer){
                                var usedCredits = trial.totalCredits - trial.remainingCredits
                                if (window.Zephr.groupFields && !pageView.zephrTrials) pageView.zephrTrials = {};
                                var target = window.Zephr.groupFields ? pageView.zephrTrials : pageView
                                if (trial.dataLayerCreditsUsedKey) {
                                   target[trial.dataLayerCreditsUsedKey] = usedCredits;
                                }
                                if (trial.dataLayerCreditsRemainingKey) {
                                   target[trial.dataLayerCreditsRemainingKey] = trial.remainingCredits;
                                }
                            }
                        });
                        (window.Zephr.accessDetails.trialTrackingDetails || []).forEach(function(details) {
                            var type = details.entitlementType === 'credits' ? 'credits' : 'meters';
                            var trial = (window.Zephr.accessDetails[type] || {})[details.entitlementId];
                            if (!trial) return;
                            if (window.Zephr.groupFields && !pageView.zephrTrials) pageView.zephrTrials = {};
                            if (details.creditsRemainingKey) {
                                if (window.Zephr.groupFields) {
                                    pageView.zephrTrials[details.creditsRemainingKey] = trial.remainingCredits;
                                } else {
                                    pageView[details.creditsRemainingKey] = trial.remainingCredits;
                                }
                            }
                            if (details.creditsUsedKey) {
                                if (window.Zephr.groupFields) {
                                    pageView.zephrTrials[details.creditsUsedKey] = trial.totalCredits - trial.remainingCredits;
                                } else {
                                    pageView[details.creditsUsedKey] = trial.totalCredits - trial.remainingCredits;
                                }
                            }
                        });
                        try {
                          (Object.keys(window.Zephr.accessDetails.timeTrials || {})).forEach(function(timeTrialId) {
                               var timeTrial = window.Zephr.accessDetails.timeTrials[timeTrialId]
                               if(timeTrial.reportInDataLayer){
                                   if (window.Zephr.groupFields && !pageView.zephrTrials) pageView.zephrTrials = {};
                                   var target = window.Zephr.groupFields ? pageView.zephrTrials : pageView

                                   if (timeTrial.dataLayerTrialDurationKey) {
                                    target[timeTrial.dataLayerTrialDurationKey] = timeTrial.trialDuration;
                                   }
                                   if (timeTrial.dataLayerTrialDurationUnitsKey) {
                                    target[timeTrial.dataLayerTrialDurationUnitsKey] = timeTrial.trialDurationUnits;
                                   }
                                   if (timeTrial.dataLayerTrackerEntryTimeKey) {
                                    target[timeTrial.dataLayerTrackerEntryTimeKey] = timeTrial.entryTime;
                                   }
                                   if (timeTrial.dataLayerTrackerHitsKey) {
                                    target[timeTrial.dataLayerTrackerHitsKey] = timeTrial.trackerHits;
                                   }
                                   if (timeTrial.dataLayerTrialTimeRemainingKey) {
                                    target[timeTrial.dataLayerTrialTimeRemainingKey] = timeTrial.timeRemainingInTrial;
                                   }
                               }
                          });
                        } catch (err) {
                          console.error("Error aggregating Zephr time trials", err);
                        }
                    }
                    if (Object.keys(pageView).length) {
                        pageView.event = "zephr-pageview";
                        events.unshift(pageView);
                    }
                    if (!events.length) continue;

                    events.forEach(function(event) {
                        window[dataLayerFieldName].push(event);
                    });
                }
                var readyEvent = document.createEvent('Event');
                readyEvent.initEvent('zephr.dataLayerReady', true, true);
                document.dispatchEvent(readyEvent);
            }
        }
    }
    xhr.send({});
})();
</script>
<script type="text/javascript">
  if (!window.Zephr) window.Zephr = {};
  window.Zephr.accessDetails = {"isAuthenticated":false,"accessDecisions":{},"entitlements":{},"credits":{},"meters":{},"trials":{"BmQnqO":{"isUsedInDecision":false},"KeGhEx":{"isUsedInDecision":false},"EeTXS6":{"isUsedInDecision":false},"YgjfFT":{"isUsedInDecision":false},"gs7uvq":{"isUsedInDecision":false}},"timeTrials":{},"trialTrackingDetails":[],"testGroups":{"7542881f-ae17-49d4-bdb6-53110ee57549":"C","7d124eff-cd29-4bda-9fb2-04733766ba2d":"A","845c6816-9b4e-45de-8532-9d1a1b616aed":"A","a92c832a-9edd-4900-a748-3256c0fc4b66":"B"},"activeProducts":[]};
</script>
</body>
</html>
