PageSourceSearch

https://hellenicnews.com/wp-content/cache/min/1/swg/js/v1/swg-basic.js?ver=1789631678

js hellenicnews.com collected 2026-10-02 06:17:11 UTC 281,856 bytes, 1 lines download raw bytes

1(()=>{var _a,_b,__freeze=Object.freeze,__defProp=Object.defineProperty,__template=(t,s)=>__freeze(__defProp(t,"raw",{value:__freeze(s||t.slice())}));!function(){"use strict";function t(t,s){for(var i=0;i<s.length;i++){const e=s[i];if("string"!=typeof e&&!Array.isArray(e))for(const s in e)if("default"!==s&&!(s in t)){const i=Object.getOwnPropertyDescriptor(e,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>e[s]})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const s="https://news.google.com",i="1.0.163",e="https://news.google.com/swg/js/v1";var n=(t=>(t.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY="enable-pub-id-suffix-for-storage-key",t.ENABLE_GIS_INTEROP="enable-gis-interop",t))(n||{}),r=(t=>(t.BACKGROUND_CLICK_BEHAVIOR_EXPERIMENT="background_click_behavior_experiment",t.ALWAYS_SHOW_BLOCKING_CONTRIBUTION_EXPERIMENT="bcontrib_experiment",t.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT="multi_instance_monetary_cta_experiment",t))(r||{}),o=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.IMPRESSION_PAYWALL=1]="IMPRESSION_PAYWALL",t[t.IMPRESSION_AD=2]="IMPRESSION_AD",t[t.IMPRESSION_OFFERS=3]="IMPRESSION_OFFERS",t[t.IMPRESSION_SUBSCRIBE_BUTTON=4]="IMPRESSION_SUBSCRIBE_BUTTON",t[t.IMPRESSION_SMARTBOX=5]="IMPRESSION_SMARTBOX",t[t.IMPRESSION_SWG_BUTTON=6]="IMPRESSION_SWG_BUTTON",t[t.IMPRESSION_CLICK_TO_SHOW_OFFERS=7]="IMPRESSION_CLICK_TO_SHOW_OFFERS",t[t.IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED=8]="IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED",t[t.IMPRESSION_SUBSCRIPTION_COMPLETE=9]="IMPRESSION_SUBSCRIPTION_COMPLETE",t[t.IMPRESSION_ACCOUNT_CHANGED=10]="IMPRESSION_ACCOUNT_CHANGED",t[t.IMPRESSION_PAGE_LOAD=11]="IMPRESSION_PAGE_LOAD",t[t.IMPRESSION_LINK=12]="IMPRESSION_LINK",t[t.IMPRESSION_SAVE_SUBSCR_TO_GOOGLE=13]="IMPRESSION_SAVE_SUBSCR_TO_GOOGLE",t[t.IMPRESSION_GOOGLE_UPDATED=14]="IMPRESSION_GOOGLE_UPDATED",t[t.IMPRESSION_SHOW_OFFERS_SMARTBOX=15]="IMPRESSION_SHOW_OFFERS_SMARTBOX",t[t.IMPRESSION_SHOW_OFFERS_SWG_BUTTON=16]="IMPRESSION_SHOW_OFFERS_SWG_BUTTON",t[t.IMPRESSION_SELECT_OFFER_SMARTBOX=17]="IMPRESSION_SELECT_OFFER_SMARTBOX",t[t.IMPRESSION_SELECT_OFFER_SWG_BUTTON=18]="IMPRESSION_SELECT_OFFER_SWG_BUTTON",t[t.IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON=19]="IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON",t[t.IMPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON=20]="IMPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON",t[t.IMPRESSION_METER_TOAST=21]="IMPRESSION_METER_TOAST",t[t.IMPRESSION_REGWALL=22]="IMPRESSION_REGWALL",t[t.IMPRESSION_SHOWCASE_REGWALL=23]="IMPRESSION_SHOWCASE_REGWALL",t[t.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT=24]="IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT",t[t.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT=25]="IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT",t[t.IMPRESSION_CONTRIBUTION_OFFERS=26]="IMPRESSION_CONTRIBUTION_OFFERS",t[t.IMPRESSION_TWG_COUNTER=27]="IMPRESSION_TWG_COUNTER",t[t.IMPRESSION_TWG_SITE_SUPPORTER_WALL=28]="IMPRESSION_TWG_SITE_SUPPORTER_WALL",t[t.IMPRESSION_TWG_PUBLICATION=29]="IMPRESSION_TWG_PUBLICATION",t[t.IMPRESSION_TWG_STATIC_BUTTON=30]="IMPRESSION_TWG_STATIC_BUTTON",t[t.IMPRESSION_TWG_DYNAMIC_BUTTON=31]="IMPRESSION_TWG_DYNAMIC_BUTTON",t[t.IMPRESSION_TWG_STICKER_SELECTION_SCREEN=32]="IMPRESSION_TWG_STICKER_SELECTION_SCREEN",t[t.IMPRESSION_TWG_PUBLICATION_NOT_SET_UP=33]="IMPRESSION_TWG_PUBLICATION_NOT_SET_UP",t[t.IMPRESSION_REGWALL_OPT_IN=34]="IMPRESSION_REGWALL_OPT_IN",t[t.IMPRESSION_NEWSLETTER_OPT_IN=35]="IMPRESSION_NEWSLETTER_OPT_IN",t[t.IMPRESSION_SUBSCRIPTION_OFFERS_ERROR=36]="IMPRESSION_SUBSCRIPTION_OFFERS_ERROR",t[t.IMPRESSION_CONTRIBUTION_OFFERS_ERROR=37]="IMPRESSION_CONTRIBUTION_OFFERS_ERROR",t[t.IMPRESSION_TWG_SHORTENED_STICKER_FLOW=38]="IMPRESSION_TWG_SHORTENED_STICKER_FLOW",t[t.IMPRESSION_SUBSCRIPTION_LINKING_LOADING=39]="IMPRESSION_SUBSCRIPTION_LINKING_LOADING",t[t.IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE=40]="IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE",t[t.IMPRESSION_SUBSCRIPTION_LINKING_ERROR=41]="IMPRESSION_SUBSCRIPTION_LINKING_ERROR",t[t.IMPRESSION_SURVEY=42]="IMPRESSION_SURVEY",t[t.IMPRESSION_REGWALL_ERROR=43]="IMPRESSION_REGWALL_ERROR",t[t.IMPRESSION_NEWSLETTER_ERROR=44]="IMPRESSION_NEWSLETTER_ERROR",t[t.IMPRESSION_SURVEY_ERROR=45]="IMPRESSION_SURVEY_ERROR",t[t.IMPRESSION_METER_TOAST_ERROR=46]="IMPRESSION_METER_TOAST_ERROR",t[t.IMPRESSION_MINI_PROMPT=47]="IMPRESSION_MINI_PROMPT",t[t.IMPRESSION_MINI_PROMPT_ERROR=48]="IMPRESSION_MINI_PROMPT_ERROR",t[t.IMPRESSION_REWARDED_AD=49]="IMPRESSION_REWARDED_AD",t[t.IMPRESSION_BYOP_NEWSLETTER_OPT_IN=50]="IMPRESSION_BYOP_NEWSLETTER_OPT_IN",t[t.IMPRESSION_REWARDED_AD_ERROR=51]="IMPRESSION_REWARDED_AD_ERROR",t[t.IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS=52]="IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS",t[t.IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS=53]="IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS",t[t.IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS_ERROR=54]="IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS_ERROR",t[t.IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS_ERROR=55]="IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS_ERROR",t[t.IMPRESSION_BYO_CTA=56]="IMPRESSION_BYO_CTA",t[t.IMPRESSION_BYO_CTA_ERROR=57]="IMPRESSION_BYO_CTA_ERROR",t[t.IMPRESSION_CONTRIBUTION_OFFERS_PURCHASE_UNAVAILABLE=58]="IMPRESSION_CONTRIBUTION_OFFERS_PURCHASE_UNAVAILABLE",t[t.IMPRESSION_BYOE_POP_UP_OPT_IN=59]="IMPRESSION_BYOE_POP_UP_OPT_IN",t[t.IMPRESSION_BYOE_POP_UP_OPT_IN_ERROR=60]="IMPRESSION_BYOE_POP_UP_OPT_IN_ERROR",t[t.IMPRESSION_ADD_PREFERRED_SOURCES_BUTTON=61]="IMPRESSION_ADD_PREFERRED_SOURCES_BUTTON",t[t.IMPRESSION_ADD_PREFERRED_SOURCES_CONFIRMATION=62]="IMPRESSION_ADD_PREFERRED_SOURCES_CONFIRMATION",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN=63]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON=64]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_E
1RROR=65]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ERROR",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_INELIGIBLE=66]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_INELIGIBLE",t[t.IMPRESSION_OFFERS_PLAN_CHANGE=67]="IMPRESSION_OFFERS_PLAN_CHANGE",t[t.ACTION_SUBSCRIBE=1e3]="ACTION_SUBSCRIBE",t[t.ACTION_PAYMENT_COMPLETE=1001]="ACTION_PAYMENT_COMPLETE",t[t.ACTION_ACCOUNT_CREATED=1002]="ACTION_ACCOUNT_CREATED",t[t.ACTION_ACCOUNT_ACKNOWLEDGED=1003]="ACTION_ACCOUNT_ACKNOWLEDGED",t[t.ACTION_SUBSCRIPTIONS_LANDING_PAGE=1004]="ACTION_SUBSCRIPTIONS_LANDING_PAGE",t[t.ACTION_PAYMENT_FLOW_STARTED=1005]="ACTION_PAYMENT_FLOW_STARTED",t[t.ACTION_PAY_PAYMENT_FLOW_STARTED=1090]="ACTION_PAY_PAYMENT_FLOW_STARTED",t[t.ACTION_PLAY_PAYMENT_FLOW_STARTED=1091]="ACTION_PLAY_PAYMENT_FLOW_STARTED",t[t.ACTION_OFFER_SELECTED=1006]="ACTION_OFFER_SELECTED",t[t.ACTION_SWG_BUTTON_CLICK=1007]="ACTION_SWG_BUTTON_CLICK",t[t.ACTION_VIEW_OFFERS=1008]="ACTION_VIEW_OFFERS",t[t.ACTION_ALREADY_SUBSCRIBED=1009]="ACTION_ALREADY_SUBSCRIBED",t[t.ACTION_NEW_DEFERRED_ACCOUNT=1010]="ACTION_NEW_DEFERRED_ACCOUNT",t[t.ACTION_LINK_CONTINUE=1011]="ACTION_LINK_CONTINUE",t[t.ACTION_LINK_CANCEL=1012]="ACTION_LINK_CANCEL",t[t.ACTION_GOOGLE_UPDATED_CLOSE=1013]="ACTION_GOOGLE_UPDATED_CLOSE",t[t.ACTION_USER_CANCELED_PAYFLOW=1014]="ACTION_USER_CANCELED_PAYFLOW",t[t.ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE=1015]="ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE",t[t.ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL=1016]="ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL",t[t.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK=1017]="ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK",t[t.ACTION_SWG_BUTTON_SELECT_OFFER_CLICK=1018]="ACTION_SWG_BUTTON_SELECT_OFFER_CLICK",t[t.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK=1019]="ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK",t[t.ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK=1020]="ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK",t[t.ACTION_USER_CONSENT_DEFERRED_ACCOUNT=1021]="ACTION_USER_CONSENT_DEFERRED_ACCOUNT",t[t.ACTION_USER_DENY_DEFERRED_ACCOUNT=1022]="ACTION_USER_DENY_DEFERRED_ACCOUNT",t[t.ACTION_DEFERRED_ACCOUNT_REDIRECT=1023]="ACTION_DEFERRED_ACCOUNT_REDIRECT",t[t.ACTION_GET_ENTITLEMENTS=1024]="ACTION_GET_ENTITLEMENTS",t[t.ACTION_METER_TOAST_SUBSCRIBE_CLICK=1025]="ACTION_METER_TOAST_SUBSCRIBE_CLICK",t[t.ACTION_METER_TOAST_EXPANDED=1026]="ACTION_METER_TOAST_EXPANDED",t[t.ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION=1027]="ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION",t[t.ACTION_METER_TOAST_CLOSED_BY_SWIPE_DOWN=1028]="ACTION_METER_TOAST_CLOSED_BY_SWIPE_DOWN",t[t.ACTION_METER_TOAST_CLOSED_BY_X_CLICKED=1029]="ACTION_METER_TOAST_CLOSED_BY_X_CLICKED",t[t.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK=1030]="ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK",t[t.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK=1031]="ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK",t[t.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE=1032]="ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE",t[t.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE=1033]="ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE",t[t.ACTION_CONTRIBUTION_OFFER_SELECTED=1034]="ACTION_CONTRIBUTION_OFFER_SELECTED",t[t.ACTION_SHOWCASE_REGWALL_GSI_CLICK=1035]="ACTION_SHOWCASE_REGWALL_GSI_CLICK",t[t.ACTION_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK=1036]="ACTION_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK",t[t.ACTION_SUBSCRIPTION_OFFERS_CLOSED=1037]="ACTION_SUBSCRIPTION_OFFERS_CLOSED",t[t.ACTION_CONTRIBUTION_OFFERS_CLOSED=1038]="ACTION_CONTRIBUTION_OFFERS_CLOSED",t[t.ACTION_TWG_STATIC_CTA_CLICK=1039]="ACTION_TWG_STATIC_CTA_CLICK",t[t.ACTION_TWG_DYNAMIC_CTA_CLICK=1040]="ACTION_TWG_DYNAMIC_CTA_CLICK",t[t.ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK=1041]="ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_TWG_DIALOG_SUPPORTER_WALL_CTA_CLICK=1042]="ACTION_TWG_DIALOG_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_TWG_COUNTER_CLICK=1043]="ACTION_TWG_COUNTER_CLICK",t[t.ACTION_TWG_SITE_SUPPORTER_WALL_ALL_THANKS_CLICK=1044]="ACTION_TWG_SITE_SUPPORTER_WALL_ALL_THANKS_CLICK",t[t.ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLOSE_CLICK=1045]="ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLOSE_CLICK",t[t.ACTION_TWG_PAID_STICKER_SELECTION_CLICK=1046]="ACTION_TWG_PAID_STICKER_SELECTION_CLICK",t[t.ACTION_TWG_FREE_STICKER_SELECTION_CLICK=1047]="ACTION_TWG_FREE_STICKER_SELECTION_CLICK",t[t.ACTION_TWG_MINI_SUPPORTER_WALL_CLICK=1048]="ACTION_TWG_MINI_SUPPORTER_WALL_CLICK",t[t.ACTION_TWG_CREATOR_BENEFIT_CLICK=1049]="ACTION_TWG_CREATOR_BENEFIT_CLICK",t[t.ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK=1050]="ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK",t[t.ACTION_TWG_PAID_TRANSACTION_START_NEXT_BUTTON_CLICK=1051]="ACTION_TWG_PAID_TRANSACTION_START_NEXT_BUTTON_CLICK",t[t.ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK=1052]="ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK",t[t.ACTION_TWG_ARTICLE_LEVEL_SUPPORTER_WALL_CTA_CLICK=1053]="ACTION_TWG_ARTICLE_LEVEL_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_REGWALL_OPT_IN_BUTTON_CLICK=1054]="ACTION_REGWALL_OPT_IN_BUTTON_CLICK",t[t.ACTION_REGWALL_ALREADY_OPTED_IN_CLICK=1055]="ACTION_REGWALL_ALREADY_OPTED_IN_CLICK",t[t.ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK=1056]="ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK",t[t.ACTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK=1057]="A
1CTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK",t[t.ACTION_REGWALL_OPT_IN_CLOSE=1058]="ACTION_REGWALL_OPT_IN_CLOSE",t[t.ACTION_NEWSLETTER_OPT_IN_CLOSE=1059]="ACTION_NEWSLETTER_OPT_IN_CLOSE",t[t.ACTION_SHOWCASE_REGWALL_SIWG_CLICK=1060]="ACTION_SHOWCASE_REGWALL_SIWG_CLICK",t[t.ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK=1061]="ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK",t[t.ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK=1062]="ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK",t[t.ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK=1063]="ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK",t[t.ACTION_SUBSCRIPTION_OFFERS_RETRY=1064]="ACTION_SUBSCRIPTION_OFFERS_RETRY",t[t.ACTION_CONTRIBUTION_OFFERS_RETRY=1065]="ACTION_CONTRIBUTION_OFFERS_RETRY",t[t.ACTION_TWG_SHORTENED_STICKER_FLOW_STICKER_SELECTION_CLICK=1066]="ACTION_TWG_SHORTENED_STICKER_FLOW_STICKER_SELECTION_CLICK",t[t.ACTION_INITIATE_UPDATED_SUBSCRIPTION_LINKING=1067]="ACTION_INITIATE_UPDATED_SUBSCRIPTION_LINKING",t[t.ACTION_SURVEY_SUBMIT_CLICK=1068]="ACTION_SURVEY_SUBMIT_CLICK",t[t.ACTION_SURVEY_CLOSED=1069]="ACTION_SURVEY_CLOSED",t[t.ACTION_SURVEY_DATA_TRANSFER=1070]="ACTION_SURVEY_DATA_TRANSFER",t[t.ACTION_REGWALL_PAGE_REFRESH=1071]="ACTION_REGWALL_PAGE_REFRESH",t[t.ACTION_NEWSLETTER_PAGE_REFRESH=1072]="ACTION_NEWSLETTER_PAGE_REFRESH",t[t.ACTION_SURVEY_PAGE_REFRESH=1073]="ACTION_SURVEY_PAGE_REFRESH",t[t.ACTION_METER_TOAST_PAGE_REFRESH=1074]="ACTION_METER_TOAST_PAGE_REFRESH",t[t.ACTION_MINI_PROMPT_INTERACTION=1075]="ACTION_MINI_PROMPT_INTERACTION",t[t.ACTION_SURVEY_PREVIOUS_BUTTON_CLICK=1076]="ACTION_SURVEY_PREVIOUS_BUTTON_CLICK",t[t.ACTION_SURVEY_NEXT_BUTTON_CLICK=1077]="ACTION_SURVEY_NEXT_BUTTON_CLICK",t[t.ACTION_REWARDED_AD_VIEW=1078]="ACTION_REWARDED_AD_VIEW",t[t.ACTION_REWARDED_AD_CLOSE=1079]="ACTION_REWARDED_AD_CLOSE",t[t.ACTION_REWARDED_AD_CLOSE_AD=1080]="ACTION_REWARDED_AD_CLOSE_AD",t[t.ACTION_REWARDED_AD_SIGN_IN=1081]="ACTION_REWARDED_AD_SIGN_IN",t[t.ACTION_REWARDED_AD_SUPPORT=1082]="ACTION_REWARDED_AD_SUPPORT",t[t.ACTION_BACK_TO_HOMEPAGE=1083]="ACTION_BACK_TO_HOMEPAGE",t[t.ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE=1084]="ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE",t[t.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT=1085]="ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT",t[t.ACTION_SUBSCRIPTION_LINKING_CLOSE=1086]="ACTION_SUBSCRIPTION_LINKING_CLOSE",t[t.ACTION_BYO_CTA_CLOSE=1087]="ACTION_BYO_CTA_CLOSE",t[t.ACTION_BYO_CTA_BUTTON_CLICK=1088]="ACTION_BYO_CTA_BUTTON_CLICK",t[t.ACTION_BYO_CTA_PAGE_REFRESH=1089]="ACTION_BYO_CTA_PAGE_REFRESH",t[t.ACTION_BYOE_POP_UP_OPT_IN=1092]="ACTION_BYOE_POP_UP_OPT_IN",t[t.ACTION_ADD_PREFERRED_SOURCES_BUTTON_CLICK=1093]="ACTION_ADD_PREFERRED_SOURCES_BUTTON_CLICK",t[t.ACTION_MANAGE_PREFERRED_SOURCES=1094]="ACTION_MANAGE_PREFERRED_SOURCES",t[t.EVENT_PAYMENT_FAILED=2e3]="EVENT_PAYMENT_FAILED",t[t.EVENT_REGWALL_OPT_IN_FAILED=2001]="EVENT_REGWALL_OPT_IN_FAILED",t[t.EVENT_NEWSLETTER_OPT_IN_FAILED=2002]="EVENT_NEWSLETTER_OPT_IN_FAILED",t[t.EVENT_REGWALL_ALREADY_OPT_IN=2003]="EVENT_REGWALL_ALREADY_OPT_IN",t[t.EVENT_NEWSLETTER_ALREADY_OPT_IN=2004]="EVENT_NEWSLETTER_ALREADY_OPT_IN",t[t.EVENT_SUBSCRIPTION_LINKING_FAILED=2005]="EVENT_SUBSCRIPTION_LINKING_FAILED",t[t.EVENT_SURVEY_ALREADY_SUBMITTED=2006]="EVENT_SURVEY_ALREADY_SUBMITTED",t[t.EVENT_SURVEY_COMPLETION_RECORD_FAILED=2007]="EVENT_SURVEY_COMPLETION_RECORD_FAILED",t[t.EVENT_SURVEY_DATA_TRANSFER_FAILED=2008]="EVENT_SURVEY_DATA_TRANSFER_FAILED",t[t.EVENT_BYO_CTA_COMPLETION_RECORD_FAILED=2009]="EVENT_BYO_CTA_COMPLETION_RECORD_FAILED",t[t.EVENT_ADD_PREFERRED_SOURCE_FAILURE=2010]="EVENT_ADD_PREFERRED_SOURCE_FAILURE",t[t.EVENT_CUSTOM=3e3]="EVENT_CUSTOM",t[t.EVENT_CONFIRM_TX_ID=3001]="EVENT_CONFIRM_TX_ID",t[t.EVENT_CHANGED_TX_ID=3002]="EVENT_CHANGED_TX_ID",t[t.EVENT_GPAY_NO_TX_ID=3003]="EVENT_GPAY_NO_TX_ID",t[t.EVENT_GPAY_CANNOT_CONFIRM_TX_ID=3004]="EVENT_GPAY_CANNOT_CONFIRM_TX_ID",t[t.EVENT_GOOGLE_UPDATED=3005]="EVENT_GOOGLE_UPDATED",t[t.EVENT_NEW_TX_ID=3006]="EVENT_NEW_TX_ID",t[t.EVENT_UNLOCKED_BY_SUBSCRIPTION=3007]="EVENT_UNLOCKED_BY_SUBSCRIPTION",t[t.EVENT_UNLOCKED_BY_METER=3008]="EVENT_UNLOCKED_BY_METER",t[t.EVENT_NO_ENTITLEMENTS=3009]="EVENT_NO_ENTITLEMENTS",t[t.EVENT_HAS_METERING_ENTITLEMENTS=3010]="EVENT_HAS_METERING_ENTITLEMENTS",t[t.EVENT_OFFERED_MET
1ER=3011]="EVENT_OFFERED_METER",t[t.EVENT_UNLOCKED_FREE_PAGE=3012]="EVENT_UNLOCKED_FREE_PAGE",t[t.EVENT_INELIGIBLE_PAYWALL=3013]="EVENT_INELIGIBLE_PAYWALL",t[t.EVENT_UNLOCKED_FOR_CRAWLER=3014]="EVENT_UNLOCKED_FOR_CRAWLER",t[t.EVENT_TWG_COUNTER_VIEW=3015]="EVENT_TWG_COUNTER_VIEW",t[t.EVENT_TWG_SITE_SUPPORTER_WALL_VIEW=3016]="EVENT_TWG_SITE_SUPPORTER_WALL_VIEW",t[t.EVENT_TWG_STATIC_BUTTON_VIEW=3017]="EVENT_TWG_STATIC_BUTTON_VIEW",t[t.EVENT_TWG_DYNAMIC_BUTTON_VIEW=3018]="EVENT_TWG_DYNAMIC_BUTTON_VIEW",t[t.EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVATE=3019]="EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVATE",t[t.EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE=3020]="EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE",t[t.EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PUBLIC=3021]="EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PUBLIC",t[t.EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC=3022]="EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC",t[t.EVENT_REGWALL_OPTED_IN=3023]="EVENT_REGWALL_OPTED_IN",t[t.EVENT_NEWSLETTER_OPTED_IN=3024]="EVENT_NEWSLETTER_OPTED_IN",t[t.EVENT_SHOWCASE_METERING_INIT=3025]="EVENT_SHOWCASE_METERING_INIT",t[t.EVENT_DISABLE_MINIPROMPT_DESKTOP=3026]="EVENT_DISABLE_MINIPROMPT_DESKTOP",t[t.EVENT_SUBSCRIPTION_LINKING_SUCCESS=3027]="EVENT_SUBSCRIPTION_LINKING_SUCCESS",t[t.EVENT_SURVEY_SUBMITTED=3028]="EVENT_SURVEY_SUBMITTED",t[t.EVENT_LINK_ACCOUNT_SUCCESS=3029]="EVENT_LINK_ACCOUNT_SUCCESS",t[t.EVENT_SAVE_SUBSCRIPTION_SUCCESS=3030]="EVENT_SAVE_SUBSCRIPTION_SUCCESS",t[t.EVENT_SURVEY_DATA_TRANSFER_COMPLETE=3031]="EVENT_SURVEY_DATA_TRANSFER_COMPLETE",t[t.EVENT_RUNTIME_IS_READY=3032]="EVENT_RUNTIME_IS_READY",t[t.EVENT_START_API=3033]="EVENT_START_API",t[t.EVENT_SHOW_OFFERS_API=3034]="EVENT_SHOW_OFFERS_API",t[t.EVENT_SHOW_CONTRIBUTION_OPTIONS_API=3035]="EVENT_SHOW_CONTRIBUTION_OPTIONS_API",t[t.EVENT_REWARDED_AD_FLOW_INIT=3048]="EVENT_REWARDED_AD_FLOW_INIT",t[t.EVENT_REWARDED_AD_READY=3036]="EVENT_REWARDED_AD_READY",t[t.EVENT_REWARDED_AD_GPT_MISSING_ERROR=3037]="EVENT_REWARDED_AD_GPT_MISSING_ERROR",t[t.EVENT_REWARDED_AD_ADSENSE_MISSING_ERROR=3059]="EVENT_REWARDED_AD_ADSENSE_MISSING_ERROR",t[t.EVENT_REWARDED_AD_CONFIG_ERROR=3038]="EVENT_REWARDED_AD_CONFIG_ERROR",t[t.EVENT_REWARDED_AD_PAGE_ERROR=3039]="EVENT_REWARDED_AD_PAGE_ERROR",t[t.EVENT_REWARDED_AD_GPT_ERROR=3040]="EVENT_REWARDED_AD_GPT_ERROR",t[t.EVENT_REWARDED_AD_GRANTED=3041]="EVENT_REWARDED_AD_GRANTED",t[t.EVENT_REWARDED_AD_NOT_FILLED=3049]="EVENT_REWARDED_AD_NOT_FILLED",t[t.EVENT_REWARDED_AD_GPT_FILTERED=3060]="EVENT_REWARDED_AD_GPT_FILTERED",t[t.EVENT_REWARDED_AD_ADSENSE_FILTERED=3061]="EVENT_REWARDED_AD_ADSENSE_FILTERED",t[t.EVENT_GLOBAL_FREQUENCY_CAP_MET=3042]="EVENT_GLOBAL_FREQUENCY_CAP_MET",t[t.EVENT_PROMPT_FREQUENCY_CAP_MET=3043]="EVENT_PROMPT_FREQUENCY_CAP_MET",t[t.EVENT_ACTION_IMPRESSIONS_STORAGE_KEY_NOT_FOUND_ERROR=3044]="EVENT_ACTION_IMPRESSIONS_STORAGE_KEY_NOT_FOUND_ERROR",t[t.EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR=3052]="EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR",t[t.EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR=3045]="EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR",t[t.EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND=3053]="EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND",t[t.EVENT_FREQUENCY_CAP_LOCAL_STORAGE_CONFIG_ID_KEY_NOT_FOUND=3057]="EVENT_FREQUENCY_CAP_LOCAL_STORAGE_CONFIG_ID_KEY_NOT_FOUND",t[t.EVENT_BYOP_NEWSLETTER_OPT_IN_CONFIG_ERROR=3046]="EVENT_BYOP_NEWSLETTER_OPT_IN_CONFIG_ERROR",t[t.EVENT_BYOP_NEWSLETTER_OPT_IN_CODE_SNIPPET_ERROR=3047]="EVENT_BYOP_NEWSLETTER_OPT_IN_CODE_SNIPPET_ERROR",t[t.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE=3050]="EVENT_SUBSCRIPTION_PAYMENT_COMPLETE",t[t.EVENT_CONTRIBUTION_PAYMENT_COMPLETE=3051]="EVENT_CONTRIBUTION_PAYMENT_COMPLETE",t[t.EVENT_PAY_PAYMENT_COMPLETE=3058]="EVENT_PAY_PAYMENT_COMPLETE",t[t.EVENT_HOSTED_PAGE_SUBSCRIPTION_PAYMENT_COMPLETE=3054]="EVENT_HOSTED_PAGE_SUBSCRIPTION_PAYMENT_COMPLETE",t[t.EVENT_HOSTED_PAGE_CONTRIBUTION_PAYMENT_COMPLETE=3055]="EVENT_HOSTED_PAGE_CONTRIBUTION_PAYMENT_COMPLETE",t[t.EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR=3056]="EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR",t[t.EVENT_BYOE_POP_UP_EMAIL_VALIDATION_ERROR=3062]="EVENT_BYOE_POP_UP_EMAIL_VALIDATION_ERROR",t[t.EVENT_BYOE_POP_UP_NAME_VALIDATION_ERROR=3063]="EVENT_BYOE_POP_UP_NAME_VALIDATION_ERROR",t[t.EVENT_TIME_BOUND_PASS_PAYMENT_COMPLETE=3064]="EVENT_TIME_BOUND_PASS_PAYMENT_COMPLETE",t[t.EVENT_GIS_INTEROP_YIELD=3065]="EVENT_GIS_INTEROP_YIELD",t[t.EVENT_GIS_INTEROP_PING_RECEIVED=3066]="EVENT_GIS_INTEROP_PING_RECEIVED",t[t.EVENT_GIS_INTEROP_WAITING_FOR_PING_ERROR=3067]="EVENT_GIS_INTEROP_WAITING_FOR_PING_ERROR",t[t.EVENT_GIS_INTEROP_LOADING_IFRAME_ERROR=3068]="EVENT_GIS_INTEROP_LOADING_IFRAME_ERROR",t[t.EVENT_GIS_INTEROP_HANDSHAKE_ESTABLISHED=3069]="EVENT_GIS_INTEROP_HANDSHAKE_ESTABLISHED",t[t.EVENT_GIS_INTEROP_OPERATION_ERROR=3070]="EVENT_GIS_INTEROP_OPERATION_ERROR",t[t.EVENT_GIS_INTEROP_TOKEN_UPDATE_START=3071]="EVENT_GIS_INTEROP_TOKEN_UPDATE_START",t[t.EVENT_GIS_INTEROP_TOKEN_UPDATE_ERROR=3072]="EVENT_GIS_INTEROP_TOKEN_UPDATE_ERROR",t[t.EVENT_GIS_INTEROP_TOKEN_UPDATED=3073]="EVENT_GIS_INTEROP_TOKEN_UPDATED",t[t.EVENT_GIS_LOGIN_ERROR=3074]="EVENT_GIS_LOGIN_ERROR",t[t.EVENT_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON_CLICK=3075]="EVENT_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON_CLICK",t[t.EVENT_ADD_PREFERRED_SOURCE_SUCCESS=3076]="EVENT_ADD_PREFERRED_SOURCE_SUCCESS",t[t.EVENT_PREFERRED_SOURCE_ALREADY_ADDED=3077]="EVENT_PREFERRED_SOURCE_ALREADY_ADDED",t[t.EVENT_SUBSCRIPTION_PLAN_CHANGE_COMPLETE=3078]="EVENT_SUBSCRIPTION_PLAN_CHANGE_COMPLETE",t[t.EVENT_SUBSCRIPTION_STATE=4e3]="EVENT_SUBSCRIPTION_STATE",t[t.FREE_ACCESS_EVENT_LANDING=5e3]="FREE_ACCESS_EVENT_LANDING",t[t.FREE_ACCESS_EVENT_FREE_ACCESS_PROGRAM=5001]="FREE_ACCESS_EVENT_FREE_ACCESS_PROGRAM",t[t.FREE_ACCESS_EVENT_REGWALL_IMPRESSION=5002]="FREE_ACCESS_EVENT_REGWALL_IMPRESSION",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM=5003]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_NEW_REGISTRATION=5004]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_NEW_REGISTRATION",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_SIGN_IN=5005]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_SIGN_IN",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_ALREADY_SIGNED_IN=5006]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_ALREADY_SIGNED_IN",t[t.FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_PRE_SIGN_IN=5007]="FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_PRE_SIGN_IN",t[t.FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_POST_SIGN_IN=5008]="FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_POST_SIGN_IN",t))(o||{}),h=(t=>(t[t.CTA_MODE_UNSPECIFIED=0]="CTA_MODE_UNSPECIFIED",t[t.CTA_MODE_POPUP=1]="CTA_MODE_POPUP",t[t.CTA_MODE_INLINE=2]="CTA_MODE_INLINE",t))(h||{}),a=(t=>(t[t.UNKNOWN_ENTITLEMENT_RESULT=0]="UNKNOWN_ENTITLEMENT_RESULT",t[t.UNLOCKED_SUBSCRIBER=1001]="UNLOCKED_SUBSCRIBER",t[t.UNLOCKED_FREE=1002]="UNLOCKED_FREE",t[t.UNLOCKED_METER=1003]="UNLOCKED_METER",t[t.LOCKED_REGWALL=2001]="LOCKED_REGWALL",t[t.LOCKED_PAYWALL=2002]="LOCKED_PAYWALL",t[t.INELIGIBLE_PAYWALL=2003]="INELIGIBLE_PAYWALL",t))(a||{}),l=(t=>(t[t.UNKNOWN_ENTITLEMENT_SOURCE=0]="UNKNOWN_ENTITLEMENT_SOURCE",t[t.GOOGLE_SUBSCRIBER_ENTITLEMENT=1001]="GOOGLE_SUBSCRIBER_ENTITLEMENT",t[t.GOOGLE_SHOWCASE_METERING_SERVICE=2001]="GOOGLE_SHOWCASE_METERING_SERVICE",t[t.SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE=2002]="SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE",t[t.PUBLISHER_ENTITLEMENT=3001]="P
1UBLISHER_ENTITLEMENT",t))(l||{}),u=(t=>(t[t.UNKNOWN_CLIENT=0]="UNKNOWN_CLIENT",t[t.SWG_CLIENT=1]="SWG_CLIENT",t[t.AMP_CLIENT=2]="AMP_CLIENT",t[t.PROPENSITY_CLIENT=3]="PROPENSITY_CLIENT",t[t.SWG_SERVER=4]="SWG_SERVER",t[t.PUBLISHER_CLIENT=5]="PUBLISHER_CLIENT",t[t.SHOWCASE_CLIENT=6]="SHOWCASE_CLIENT",t))(u||{}),c=(t=>(t[t.GIS_MODE_UNSPECIFIED=0]="GIS_MODE_UNSPECIFIED",t[t.GIS_MODE_DISABLED=1]="GIS_MODE_DISABLED",t[t.GIS_MODE_NORMAL=2]="GIS_MODE_NORMAL",t[t.GIS_MODE_OVERLAY=3]="GIS_MODE_OVERLAY",t))(c||{});class d{constructor(t=[],s=!0){const i=s?1:0;this.t=null==t[i]?null:t[i]}getComplete(){return this.t}setComplete(t){this.t=t}toArray(t=!0){const s=[this.t];return t&&s.unshift(this.label()),s}label(){return"AccountCreationRequest"}}class g{constructor(t=[],s=!0){const i=s?1:0;this.o=null==t[i]?null:t[i],this.h=null==t[1+i]?null:t[1+i]}getSubscriberOrMember(){return this.o}setSubscriberOrMember(t){this.o=t}getLinkRequested(){return this.h}setLinkRequested(t){this.h=t}toArray(t=!0){const s=[this.o,this.h];return t&&s.unshift(this.label()),s}label(){return"AlreadySubscribedResponse"}}class p{constructor(t=[],s=!0){const i=s?1:0;this.l=null==t[i]?null:t[i],this.u=null==t[1+i]?null:t[1+i],this.p=null==t[2+i]?null:t[2+i],this._=null==t[3+i]?null:t[3+i],this.m=null==t[4+i]?null:t[4+i],this.I=null==t[5+i]?null:t[5+i],this.T=null==t[6+i]?null:t[6+i],this.R=null==t[7+i]?null:t[7+i],this.S=t[8+i]||[],this.A=null==t[9+i]?null:t[9+i],this.C=null==t[10+i]?null:t[10+i],this.O=null==t[11+i]?null:new j(t[11+i],s),this.N=null==t[12+i]?null:t[12+i],this.v=null==t[13+i]?null:t[13+i],this.P=null==t[14+i]?null:new j(t[14+i],s),this.L=null==t[15+i]?null:new I(t[15+i],s),this.G=null==t[16+i]?null:new j(t[16+i],s),this.M=null==t[17+i]?null:t[17+i],this.k=null==t[18+i]?null:t[18+i]}getEmbedderOrigin(){return this.l}setEmbedderOrigin(t){this.l=t}getTransactionId(){return this.u}setTransactionId(t){this.u=t}getReferringOrigin(){return this.p}setReferringOrigin(t){this.p=t}getUtmSource(){return this._}setUtmSource(t){this._=t}getUtmCampaign(){return this.m}setUtmCampaign(t){this.m=t}getUtmMedium(){return this.I}setUtmMedium(t){this.I=t}getSku(){return this.T}setSku(t){this.T=t}getReadyToPay(){return this.R}setReadyToPay(t){this.R=t}getLabelList(){return this.S}setLabelList(t){this.S=t}getClientVersion(){return this.A}setClientVersion(t){this.A=t}getUrl(){return this.C}setUrl(t){this.C=t}getClientTimestamp(){return this.O}setClientTimestamp(t){this.O=t}getReaderSurfaceType(){return this.N}setReaderSurfaceType(t){this.N=t}getIntegrationVersion(){return this.v}setIntegrationVersion(t){this.v=t}getPageLoadBeginTimestamp(){return this.P}setPageLoadBeginTimestamp(t){this.P=t}getLoadEventStartDelay(){return this.L}setLoadEventStartDelay(t){this.L=t}getRuntimeCreationTimestamp(){return this.G}setRuntimeCreationTimestamp(t){this.G=t}getIsLockedContent(){return this.M}setIsLockedContent(t){this.M=t}getUrlFromMarkup(){return this.k}setUrlFromMarkup(t){this.k=t}toArray(t=!0){const s=[this.l,this.u,this.p,this._,this.m,this.I,this.T,this.R,this.S,this.A,this.C,this.O?this.O.toArray(t):[],this.N,this.v,this.P?this.P.toArray(t):[],this.L?this.L.toArray(t):[],this.G?this.G.toArray(t):[],this.M,this.k];return t&&s.unshift(this.label()),s}label(){return"AnalyticsContext"}}class E{constructor(t=[],s=!0){const i=s?1:0;this.D=null==t[i]?null:t[i],this.U=null==t[1+i]?null:t[1+i],this.F=null==t[2+i]?null:t[2+i]}getEventOriginator(){return this.D}setEventOriginator(t){this.D=t}getIsFromUserAction(){return this.U}setIsFromUserAction(t){this.U=t}getConfigurationId(){return this.F}setConfigurationId(t){this.F=t}toArray(t=!0){const s=[this.D,this.U,this.F];return t&&s.unshift(this.label()),s}label(){return"AnalyticsEventMeta"}}class _{constructor(t=[],s=!0){const i=s?1:0;this.B=null==t[i]?null:new p(t[i],s),this.V=null==t[1+i]?null:t[1+i],this.W=null==t[2+i]?null:new E(t[2+i],s),this.j=null==t[3+i]?null:new A(t[3+i],s)}getContext(){return this.B}setContext(t){this.B=t}getEvent(){return this.V}setEvent(t){this.V=t}getMeta(){return this.W}setMeta(t){this.W=t}getParams(){return this.j}setParams(t){this.j=t}toArray(t=!0){const s=[this.B?this.B.toArray(t):[],this.V,this.W?this.W.toArray(t):[],this.j?this.j.toArray(t):[]];return t&&s.unshift(this.label()),s}label(){return"AnalyticsRequest"}}class m{constructor(t=[],s=!0){const i=s?1:0;this.V=null==t[i]?null:t[i]}getEvent(){return this.V}setEvent(t){this.V=t}toArray(t=!0){const s=[this.V];return t&&s.unshift(this.label()),s}label(){return"AudienceActivityClientLogsRequest"}}class f{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"CloseWindowRequest"}}class w{constructor(t=[],s=!0){const i=s?1:0;this.K=null==t[i]?null:t[i],this.q=null==t[1+i]?null:t[1+i],this.H=null==t[2+i]?null:t[2+i],this.J=null==t[3+i]?null:t[3+i],this.X=null==t[4+i]?null:t[4+i],this.$=null==t[5+i]?null:t[5+i],this.Z=null==t[6+i]?null:t[6+i],this.tt
1=null==t[7+i]?null:t[7+i]}getSwgUserToken(){return this.K}setSwgUserToken(t){this.K=t}getActionCompleted(){return this.q}setActionCompleted(t){this.q=t}getUserEmail(){return this.H}setUserEmail(t){this.H=t}getAlreadyCompleted(){return this.J}setAlreadyCompleted(t){this.J=t}getDisplayName(){return this.X}setDisplayName(t){this.X=t}getGivenName(){return this.$}setGivenName(t){this.$=t}getFamilyName(){return this.Z}setFamilyName(t){this.Z=t}getTermsAndConditionsConsent(){return this.tt}setTermsAndConditionsConsent(t){this.tt=t}toArray(t=!0){const s=[this.K,this.q,this.H,this.J,this.X,this.$,this.Z,this.tt];return t&&s.unshift(this.label()),s}label(){return"CompleteAudienceActionResponse"}}let I=class{constructor(t=[],s=!0){const i=s?1:0;this.seconds_=null==t[i]?null:t[i],this.nanos_=null==t[1+i]?null:t[1+i]}getSeconds(){return this.seconds_}setSeconds(t){this.seconds_=t}getNanos(){return this.nanos_}setNanos(t){this.nanos_=t}toArray(t=!0){const s=[this.seconds_,this.nanos_];return t&&s.unshift(this.label()),s}label(){return"Duration"}};class b{constructor(t=[],s=!0){const i=s?1:0;this.st=null==t[i]?null:t[i],this.nt=null==t[1+i]?null:t[1+i],this.rt=null==t[2+i]?null:t[2+i],this.ot=null==t[3+i]?null:t[3+i],this.ht=null==t[4+i]?null:t[4+i]}getId(){return this.st}setId(t){this.st=t}getLeft(){return this.nt}setLeft(t){this.nt=t}getTop(){return this.rt}setTop(t){this.rt=t}getWidth(){return this.ot}setWidth(t){this.ot=t}getHeight(){return this.ht}setHeight(t){this.ht=t}toArray(t=!0){const s=[this.st,this.nt,this.rt,this.ot,this.ht];return t&&s.unshift(this.label()),s}label(){return"ElementCoordinates"}}class T{constructor(t=[],s=!0){const i=s?1:0;this.ut=null==t[i]?null:t[i],this.ct=null==t[1+i]?null:t[1+i]}getJwt(){return this.ut}setJwt(t){this.ut=t}getSource(){return this.ct}setSource(t){this.ct=t}toArray(t=!0){const s=[this.ut,this.ct];return t&&s.unshift(this.label()),s}label(){return"EntitlementJwt"}}class R{constructor(t=[],s=!0){const i=s?1:0;this.dt=null==t[i]?null:new T(t[i],s),this.gt=null==t[1+i]?null:new j(t[1+i],s),this.Et=null==t[2+i]?null:t[2+i],this._t=null==t[3+i]?null:t[3+i],this.ft=null==t[4+i]?null:t[4+i],this.wt=null==t[5+i]?null:t[5+i],this.It=null==t[6+i]?null:new j(t[6+i],s)}getUsedEntitlement(){return this.dt}setUsedEntitlement(t){this.dt=t}getClientEventTime(){return this.gt}setClientEventTime(t){this.gt=t}getEntitlementSource(){return this.Et}setEntitlementSource(t){this.Et=t}getEntitlementResult(){return this._t}setEntitlementResult(t){this._t=t}getToken(){return this.ft}setToken(t){this.ft=t}getIsUserRegistered(){return this.wt}setIsUserRegistered(t){this.wt=t}getSubscriptionTimestamp(){return this.It}setSubscriptionTimestamp(t){this.It=t}toArray(t=!0){const s=[this.dt?this.dt.toArray(t):[],this.gt?this.gt.toArray(t):[],this.Et,this._t,this.ft,this.wt,this.It?this.It.toArray(t):[]];return t&&s.unshift(this.label()),s}label(){return"EntitlementsRequest"}}class S{constructor(t=[],s=!0){const i=s?1:0;this.ut=null==t[i]?null:t[i],this.K=null==t[1+i]?null:t[1+i]}getJwt(){return this.ut}setJwt(t){this.ut=t}getSwgUserToken(){return this.K}setSwgUserToken(t){this.K=t}toArray(t=!0){const s=[this.ut,this.K];return t&&s.unshift(this.label()),s}label(){return"EntitlementsResponse"}}class A{constructor(t=[],s=!0){const i=s?1:0;this.bt=null==t[i]?null:t[i],this.Tt=null==t[1+i]?null:t[1+i],this.Rt=null==t[2+i]?null:t[2+i],this.T=null==t[3+i]?null:t[3+i],this.St=null==t[4+i]?null:t[4+i],this.wt=null==t[5+i]?null:t[5+i],this.At=null==t[6+i]?null:t[6+i],this.It=null==t[7+i]?null:new j(t[7+i],s),this.Ct=null==t[8+i]?null:t[8+i],this.Ot=null==t[9+i]?null:t[9+i],this.Nt=null==t[10+i]?null:t[10+i],this.yt=null==t[11+i]?null:t[11+i],this.vt=null==t[12+i]?null:t[12+i],this.Pt=null==t[13+i]?null:t[13+i],this.Lt=null==t[14+i]?null:t[14+i],this.Gt=null==t[15+i]?null:t[15+i],this.Mt=null==t[16+i]?null:t[16+i]}getSmartboxMessage(){return this.bt}setSmartboxMessage(t){this.bt=t}getGpayTransactionId(){return this.Tt}setGpayTransactionId(t){this.Tt=t}getHadLogged(){return this.Rt}setHadLogged(t){this.Rt=t}getSku(){return this.T}setSku(t){this.T=t}getOldTransactionId(){return this.St}setOldTransactionId(t){this.St=t}getIsUserRegistered(){return this.wt}setIsUserRegistered(t){this.wt=t}getSubscriptionFlow(){return this.At}setSubscriptionFlow(t){this.At=t}getSubscriptionTimestamp(){return this.It}setSubscriptionTimestamp(t){this.It=t}getCampaignId(){return this.Ct}setCampaignId(t){this.Ct=t}getLinkedPublicationsCount(){return this.Ot}setLinkedPublicationsCount(t){this.Ot=t}getCtaMode(){return this.Nt}setCtaMode(t){this.Nt=t}getOptInType(){return this.yt}setOptInType(t){this.yt=t}getEmailValidationStatus(){return this.vt}setEmailValidationStatus(t){this.vt=t}getGisMode(){return this.Pt}setGisMode(t){this.Pt=t}getAddPreferredSourceStatus(){return this.Lt}setAddPreferredSourceStatus(t){this.Lt=t}getCanonicalUrl(){return this.Gt}
1setCanonicalUrl(t){this.Gt=t}getUvSiteChunk(){return this.Mt}setUvSiteChunk(t){this.Mt=t}toArray(t=!0){const s=[this.bt,this.Tt,this.Rt,this.T,this.St,this.wt,this.At,this.It?this.It.toArray(t):[],this.Ct,this.Ot,this.Nt,this.yt,this.vt,this.Pt,this.Lt,this.Gt,this.Mt];return t&&s.unshift(this.label()),s}label(){return"EventParams"}}class C{constructor(t=[],s=!0){const i=s?1:0;this.t=null==t[i]?null:t[i],this.kt=null==t[1+i]?null:t[1+i]}getComplete(){return this.t}setComplete(t){this.t=t}getError(){return this.kt}setError(t){this.kt=t}toArray(t=!0){const s=[this.t,this.kt];return t&&s.unshift(this.label()),s}label(){return"FinishedLoggingResponse"}}class O{constructor(t=[],s=!0){const i=s?1:0;this.K=null==t[i]?null:t[i]}getSwgUserToken(){return this.K}setSwgUserToken(t){this.K=t}toArray(t=!0){const s=[this.K];return t&&s.unshift(this.label()),s}label(){return"GisSignIn"}}class N{constructor(t=[],s=!0){const i=s?1:0;this.Dt=null==t[i]?null:t[i],this.ft=null==t[1+i]?null:t[1+i]}getAuthCode(){return this.Dt}setAuthCode(t){this.Dt=t}getToken(){return this.ft}setToken(t){this.ft=t}toArray(t=!0){const s=[this.Dt,this.ft];return t&&s.unshift(this.label()),s}label(){return"LinkSaveTokenRequest"}}class y{constructor(t=[],s=!0){const i=s?1:0;this.Ut=null==t[i]?null:t[i]}getRequested(){return this.Ut}setRequested(t){this.Ut=t}toArray(t=!0){const s=[this.Ut];return t&&s.unshift(this.label()),s}label(){return"LinkingInfoResponse"}}class v{constructor(t=[],s=!0){const i=s?1:0;this.xt=(t[i]||[]).map(t=>new b(t,s))}getLoginButtonCoordinatesList(){return this.xt}setLoginButtonCoordinatesList(t){this.xt=t}toArray(t=!0){const s=[this.xt?this.xt.map(s=>s.toArray(t)):[]];return t&&s.unshift(this.label()),s}label(){return"LoginButtonCoordinates"}}class P{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"RewardedAdAlternateActionRequest"}}class L{constructor(t=[],s=!0){const i=s?1:0;this.Ft=null==t[i]?null:t[i]}getAdUnit(){return this.Ft}setAdUnit(t){this.Ft=t}toArray(t=!0){const s=[this.Ft];return t&&s.unshift(this.label()),s}label(){return"RewardedAdLoadAdRequest"}}class G{constructor(t=[],s=!0){const i=s?1:0;this.Bt=null==t[i]?null:t[i]}getSuccess(){return this.Bt}setSuccess(t){this.Bt=t}toArray(t=!0){const s=[this.Bt];return t&&s.unshift(this.label()),s}label(){return"RewardedAdLoadAdResponse"}}class M{constructor(t=[],s=!0){const i=s?1:0;this.Ft=null==t[i]?null:t[i]}getAdUnit(){return this.Ft}setAdUnit(t){this.Ft=t}toArray(t=!0){const s=[this.Ft];return t&&s.unshift(this.label()),s}label(){return"RewardedAdViewAdRequest"}}class k{constructor(t=[],s=!0){const i=s?1:0;this.T=null==t[i]?null:t[i],this.Vt=null==t[1+i]?null:t[1+i],this.Wt=null==t[2+i]?null:t[2+i],this.zt=null==t[3+i]?null:t[3+i],this.jt=null==t[4+i]?null:t[4+i],this.Yt=null==t[5+i]?null:t[5+i],this.Kt=null==t[6+i]?null:t[6+i],this.qt=null==t[7+i]?null:t[7+i]}getSku(){return this.T}setSku(t){this.T=t}getOldSku(){return this.Vt}setOldSku(t){this.Vt=t}getOneTime(){return this.Wt}setOneTime(t){this.Wt=t}getPlayOffer(){return this.zt}setPlayOffer(t){this.zt=t}getOldPlayOffer(){return this.jt}setOldPlayOffer(t){this.jt=t}getCustomMessage(){return this.Yt}setCustomMessage(t){this.Yt=t}getAnonymous(){return this.Kt}setAnonymous(t){this.Kt=t}getSharingPolicyEnabled(){return this.qt}setSharingPolicyEnabled(t){this.qt=t}toArray(t=!0){const s=[this.T,this.Vt,this.Wt,this.zt,this.jt,this.Yt,this.Kt,this.qt];return t&&s.unshift(this.label()),s}label(){return"SkuSelectedResponse"}}class D{constructor(t=[],s=!0){const i=s?1:0;this.Ht=null==t[i]?null:t[i]}getIsClicked(){return this.Ht}setIsClicked(t){this.Ht=t}toArray(t=!0){const s=[this.Ht];return t&&s.unshift(this.label()),s}label(){return"SmartBoxMessage"}}let U=class{constructor(t=[],s=!0){const i=s?1:0;this.Jt=null==t[i]?null:t[i]}getSubscribe(){return this.Jt}setSubscribe(t){this.Jt=t}toArray(t=!0){const s=[this.Jt];return t&&s.unshift(this.label()),s}label(){return"SubscribeResponse"}};class x{constructor(t=[],s=!0){const i=s?1:0;this.Xt=null==t[i]?null:t[i],this.Bt=null==t[1+i]?null:t[1+i],this.$t=(t[2+i]||[]).map(t=>new F(t,s))}getPublisherProvidedId(){return this.Xt}setPublisherProvidedId(t){this.Xt=t}getSuccess(){return this.Bt}setSuccess(t){this.Bt=t}getLinkResultsList(){return this.$t}
1setLinkResultsList(t){this.$t=t}toArray(t=!0){const s=[this.Xt,this.Bt,this.$t?this.$t.map(s=>s.toArray(t)):[]];return t&&s.unshift(this.label()),s}label(){return"SubscriptionLinkingCompleteResponse"}}class F{constructor(t=[],s=!0){const i=s?1:0;this.Bt=null==t[i]?null:t[i],this.Qt=null==t[1+i]?null:t[1+i],this.Xt=null==t[2+i]?null:t[2+i]}getSuccess(){return this.Bt}setSuccess(t){this.Bt=t}getSwgPublicationId(){return this.Qt}setSwgPublicationId(t){this.Qt=t}getPublisherProvidedId(){return this.Xt}setPublisherProvidedId(t){this.Xt=t}toArray(t=!0){const s=[this.Bt,this.Qt,this.Xt];return t&&s.unshift(this.label()),s}label(){return"SubscriptionLinkingLinkResult"}}class B{constructor(t=[],s=!0){const i=s?1:0;this.Zt=null==t[i]?null:t[i],this.ts=null==t[1+i]?null:t[1+i],this.ss=null==t[2+i]?null:t[2+i],this.ns=null==t[3+i]?null:t[3+i]}getAnswerId(){return this.Zt}setAnswerId(t){this.Zt=t}getAnswerText(){return this.ts}setAnswerText(t){this.ts=t}getAnswerCategory(){return this.ss}setAnswerCategory(t){this.ss=t}getPpsValue(){return this.ns}setPpsValue(t){this.ns=t}toArray(t=!0){const s=[this.Zt,this.ts,this.ss,this.ns];return t&&s.unshift(this.label()),s}label(){return"SurveyAnswer"}}class V{constructor(t=[],s=!0){const i=s?1:0;this.rs=(t[i]||[]).map(t=>new z(t,s)),this.hs=null==t[1+i]?null:t[1+i]}getSurveyQuestionsList(){return this.rs}setSurveyQuestionsList(t){this.rs=t}getStorePpsInLocalStorage(){return this.hs}setStorePpsInLocalStorage(t){this.hs=t}toArray(t=!0){const s=[this.rs?this.rs.map(s=>s.toArray(t)):[],this.hs];return t&&s.unshift(this.label()),s}label(){return"SurveyDataTransferRequest"}}class W{constructor(t=[],s=!0){const i=s?1:0;this.Bt=null==t[i]?null:t[i]}getSuccess(){return this.Bt}setSuccess(t){this.Bt=t}toArray(t=!0){const s=[this.Bt];return t&&s.unshift(this.label()),s}label(){return"SurveyDataTransferResponse"}}class z{constructor(t=[],s=!0){const i=s?1:0;this.ls=null==t[i]?null:t[i],this.us=null==t[1+i]?null:t[1+i],this.ds=null==t[2+i]?null:t[2+i],this.gs=(t[3+i]||[]).map(t=>new B(t,s))}getQuestionId(){return this.ls}setQuestionId(t){this.ls=t}getQuestionText(){return this.us}setQuestionText(t){this.us=t}getQuestionCategory(){return this.ds}setQuestionCategory(t){this.ds=t}getSurveyAnswersList(){return this.gs}setSurveyAnswersList(t){this.gs=t}toArray(t=!0){const s=[this.ls,this.us,this.ds,this.gs?this.gs.map(s=>s.toArray(t)):[]];return t&&s.unshift(this.label()),s}label(){return"SurveyQuestion"}}class j{constructor(t=[],s=!0){const i=s?1:0;this.seconds_=null==t[i]?null:t[i],this.nanos_=null==t[1+i]?null:t[1+i]}getSeconds(){return this.seconds_}setSeconds(t){this.seconds_=t}getNanos(){return this.nanos_}setNanos(t){this.nanos_=t}toArray(t=!0){const s=[this.seconds_,this.nanos_];return t&&s.unshift(this.label()),s}label(){return"Timestamp"}}class Y{constructor(t=[],s=!0){const i=s?1:0;this.ps=null==t[i]?null:t[i]}getClose(){return this.ps}setClose(t){this.ps=t}toArray(t=!0){const s=[this.ps];return t&&s.unshift(this.label()),s}label(){return"ToastCloseRequest"}}class K{constructor(t=[],s=!0){const i=s?1:0;this.Es=null==t[i]?null:t[i]}getNative(){return this.Es}setNative(t){this.Es=t}toArray(t=!0){const s=[this.Es];return t&&s.unshift(this.label()),s}label(){return"ViewSubscriptionsResponse"}}const q={AccountCreationRequest:d,ActionRequest:class{constructor(t=[],s=!0){const i=s?1:0;this._s=null==t[i]?null:t[i]}getAction(){return this._s}setAction(t){this._s=t}toArray(t=!0){const s=[this._s];return t&&s.unshift(this.label()),s}label(){return"ActionRequest"}},AddPreferredSourceRequest:class{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"AddPreferredSourceRequest"}},AddPreferredSourceResponse:class{constructor(t=[],s=!0){const i=s?1:0;this.fs=null==t[i]?null:t[i],this.ws=null==t[1+i]?null:t[1+i]}getStatus(){return this.fs}setStatus(t){this.fs=t}getSiteName(){return this.ws}setSiteName(t){this.ws=t}toArray(t=!0){const s=[this.fs,this.ws];return t&&s.unshift(this.label()),s}label(){return"AddPreferredSourceResponse"}},AlreadySubscribedResponse:g,AnalyticsContext:p,AnalyticsEventMeta:E,AnalyticsRequest:_,AudienceActivityClientLogsRequest:m,CloseWindowRequest:f,CompleteAudienceActionResponse:w,Duration:I,ElementCoordinates:b,EntitlementJwt:T,EntitlementsRequest:R,EntitlementsResponse:S,EventParam
1s:A,FinishedLoggingResponse:C,GisSignIn:O,LinkSaveTokenRequest:N,LinkingInfoResponse:y,LoginButtonCoordinates:v,OpenDialogRequest:class{constructor(t=[],s=!0){const i=s?1:0;this.Is=null==t[i]?null:t[i]}getUrlPath(){return this.Is}setUrlPath(t){this.Is=t}toArray(t=!0){const s=[this.Is];return t&&s.unshift(this.label()),s}label(){return"OpenDialogRequest"}},RewardedAdAlternateActionRequest:P,RewardedAdLoadAdRequest:L,RewardedAdLoadAdResponse:G,RewardedAdViewAdRequest:M,SkuSelectedResponse:k,SmartBoxMessage:D,StartGisSignIn:class{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"StartGisSignIn"}},SubscribeResponse:U,SubscriptionLinkingCompleteResponse:x,SubscriptionLinkingLinkResult:F,SubscriptionLinkingResponse:class{constructor(t=[],s=!0){const i=s?1:0;this.Xt=null==t[i]?null:t[i]}getPublisherProvidedId(){return this.Xt}setPublisherProvidedId(t){this.Xt=t}toArray(t=!0){const s=[this.Xt];return t&&s.unshift(this.label()),s}label(){return"SubscriptionLinkingResponse"}},SurveyAnswer:B,SurveyDataTransferRequest:V,SurveyDataTransferResponse:W,SurveyQuestion:z,Timestamp:j,ToastCloseRequest:Y,UpdateAddPreferredSourceButtonRequest:class{constructor(t=[],s=!0){const i=s?1:0;this.fs=null==t[i]?null:t[i]}getStatus(){return this.fs}setStatus(t){this.fs=t}toArray(t=!0){const s=[this.fs];return t&&s.unshift(this.label()),s}label(){return"UpdateAddPreferredSourceButtonRequest"}},ViewSubscriptionsResponse:K};function H(t){const s=t?t[0]:null;if(s){const i=q[s];if(i)return new i(t)}throw new Error("Deserialization failed for ".concat(t))}function J(t){return t.prototype.label()}const X=1,$="USER_TOKEN",Q="READ_TIME",Z="ents",tt="isreadytopay",st="subscribe.google.com:rk",it="toast",et="hasgisconnection",nt="readervisitlogged",rt={PPS_TAXONOMIES:"ppstaxonomies"},ot="reader_visit";var ht=(t=>(t.TYPE_REGISTRATION_WALL="TYPE_REGISTRATION_WALL",t.TYPE_NEWSLETTER_SIGNUP="TYPE_NEWSLETTER_SIGNUP",t.TYPE_REWARDED_SURVEY="TYPE_REWARDED_SURVEY",t.TYPE_REWARDED_AD="TYPE_REWARDED_AD",t.TYPE_CONTRIBUTION="TYPE_CONTRIBUTION",t.TYPE_SUBSCRIPTION="TYPE_SUBSCRIPTION",t.TYPE_BYO_CTA="TYPE_BYO_CTA",t))(ht||{});function at(...t){/swg.debug=1/.test(self.location.hash)&&(t.unshift("[Subscriptions]"),lt(...t))}function lt(...t){console.log(...t)}function ut(...t){console.warn(...t)}function ct(t,s="Assertion failed",...i){if(t)return;const e=s.split("%s");let n=e.shift();for(const r of i){const t=e.shift();n+=dt(r)+t}throw new Error(n)}function dt(t){const s=t;return 1==(null==s?void 0:s.nodeType)?s.tagName.toLowerCase()+(s.id?"#"+s.id:""):String(t)}const gt=self.document.createElement("a"),pt={};function Et(t){const s=pt[t];if(s)return s;const i=function(t,s){t.href=s;const i={href:t.href,protocol:t.protocol,host:t.host,hostname:t.hostname,port:"0"==t.port?"":t.port,pathname:t.pathname,search:t.search,hash:t.hash,origin:t.protocol+"//"+t.host};return t.origin&&"null"!==t.origin?i.origin=t.origin:"data:"!==i.protocol&&i.host||(i.origin=i.href),i}(gt,t);return pt[t]=i}function _t(t){return t?(/^[?#]/.test(t)?t.slice(1):t).split("&").reduce((t,s)=>{const i=s.split("=");try{const s=decodeURIComponent(i[0]||""),e=decodeURIComponent(i[1]||"");s&&(t[s]=e)}catch{ut("SwG could not parse a URL query param: ".concat(i[0]))}return t},{}):{}}function mt(t,s,i){const e=t.indexOf("?"),n=t.indexOf("#");let r="";return-1!=n&&(r=t.substring(n),t=t.substring(0,n)),-1==e?t+="?":e<t.length-1&&(t+="&"),(t+=encodeURIComponent(s)+"="+encodeURIComponent(i))+r}function ft(t){return JSON.stringify(t.toArray(!1))}function wt(t){const s=t.getRootNode().querySelector("link[rel='canonical']");return null==s?void 0:s.href}function It(t){const s=t.getRootNode();return wt(t)||s.location.origin+s.location.pathname}const bt=Et(self.window.location.href);Et(self.document.referrer);const Tt={[ht.TYPE_SUBSCRIPTION]:"/subscriptionoffersiframe",[ht.TYPE_CONTRIBUTION]:"/contributionoffersiframe",[ht.TYPE_REGISTRATION_WALL]:"/regwalliframe",[ht.TYPE_NEWSLETTER_SIGNUP]:"/newsletteriframe",[ht.TYPE_REWARDED_SURVEY]:"/surveyiframe",[ht.TYPE_BYO_CTA]:"/byoctaiframe",[ht.TYPE_REWARDED_AD]:"/rewardedadiframe"};function Rt(t,s){const i=s.win().location.search;return new URLSearchParams(i).get(t)}const St={zero:"0",nocache:"1",hr1:"3600000",hr12:"43200000"},At={frontEnd:"https://news.google.com",payEnv:"PRODUCTION",playEnv:"PROD",feCache:"nocache"},Ct={default:{frontEnd:s,payEnv:"PRODUCTION",playEnv:"PROD",feCache:"nocache"},prod:At,paytest:{...At,payEnv:"TEST"},autopush:{frontEnd:"https://subscribe-autopush.sandbox.google.com",payEnv:"PRODUCTION",playEnv:"AUTOPUSH",feCache:"nocache"},qual:{frontEnd:"https://subscribe-qual.sandbox.google.com",payEnv:"SANDBOX",playEnv:"STAGING",feCache:"nocache"}};function Ot(){const t=_t(self.location.hash)["swg.mode"];return t&&Ct[t]?Ct[t]:Ct.default}function Nt(){return Et(Ot().frontEnd).origin}function yt(t){const s=_t(self.location.hash)["swg.experiments"];return void 0!==s&&(t=mt(t,"e",s)),"".concat(Ot().frontEnd,"/swg/_/api/v1")+t}function vt(t){return"https://pubads.g.doubleclick.net"+t}function Pt(t,s={},i=""){const e=i?"swg/".concat(i):"swg";t=function(t){return mt(t,"_",function(t){const s=Number(St[t]||1);if(0===s)return"_";const i=Date.now();return String(s<=1?i:Math.floor(i/s))}(Ot().feCache))}("".concat(Ot().frontEnd,"/").concat(e,"/ui/v1").concat(t));const n=_t(self.location.hash),r=n["swg.boqjsmode"];void 0!==r&&(t=mt(t,"jsmode",r));const o=n["swg.experiments"];void 0!==o&&(t=mt(t,"e",o));for(const h in s)t=mt(t,h,s[h]);return t}function Lt(t){return Object.assign(t,{_client:"SwG ".concat(i)})}const Gt=new Set([o.ACTION_BYO_CTA_BUTTON_CLICK,o.ACTION_BYO_CTA_CLOSE,o.ACTION_CONTRIBUTION_OFFER_SELECTED,o.ACTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK,o.ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK,o.ACTION_PAYMENT_COMPLETE,o.ACTION_PAYMENT_FLOW_STARTED,o.ACTION_REGWALL_ALREADY_OPTED_IN_CLICK,o.ACTION_REGWALL_OPT_IN_BUTTON_CLICK,o.ACTION_SURVEY_CLOSED,o.ACTION_SURVEY_NEXT_BUTTON_CLICK,o.ACTION_SURVEY_PREVIOUS_BUTTON_CLICK,o.ACTION_SURVEY_SUBMIT_CLICK,o.EVENT_NEWSLETTER_OPTED_IN,o.EVENT_REGWALL_OPTED_IN,o.EVENT_SURVEY_SUBMITTED,o.IMPRESSION_BYO_CTA,o.IMPRESSION_CONTRIBUTION_OFFERS,o.IMPRESSION_NEWSLETTER_OPT_IN,o.IMPRESSION_OFFERS,o.IMPRESSION_PAGE_LOAD,o.IMPRESSION_PAYWALL,o.IMPRESSION_REGWALL_OPT_IN,o.IMPRESSION_SURVEY]);class Mt{constructor(t,s){this.bs=t,this.Ts=s,this.Rs=this.bs.eventManager(),this.Ss=this.bs.storage()}start(){this.Rs.registerEventListener(this.As.bind(this))}async As(t){if(!t.eventType||!Gt.has(t.eventType))return;const s=await this.Ss.get($,!0);if(!s)return;const i=encodeURIComponent(this.bs.pageConfig().getPublicationId()),e=this.Cs(t);let n="/publication/".concat(i,"/audienceactivity");n=mt(n,"sut",s),this.Ts.sendBeacon(yt(n),e)}Cs(t){const s=new m;return s.setEvent(t.eventType),s}}var kt=(t=>(t.UNSPECIFIED="UNSPECIFIED",t.DISMISSIBLE="DISMISSIBLE",t.BLOCKING="BLOCKING",t))(kt||{}),Dt=(t=>(t.UNSPECIFIED="UNSPECIFIED",t.FINITE="FINITE",t.INFINITE="INFINITE",t))(Dt||{});function Ut(t){return!!(null==t?void 0:t.seconds)||!!(null==t?void 0:t.nanos)}function xt(t,s,i){var e,n;return(null==(e=i.promptFrequencyCap)?void 0:e.duration)||(t.logSwgEvent(o.EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND),null==(n=s.anyPromptFrequencyCap)?void 0:n.frequencyCapDuration)}function Ft(t,s){if(0===s.length)return!1;const i=Math.max(...s),e=1e3*(t.seconds||0)+(n=t.nanos||0,Math.floor(n/Math.pow(10,6)));var n;return Date.now()-i<e}function Bt(t,s){const i=s.configId?t[s.configId]:t[s.type];return s.closability===kt.BLOCKING?(null==i?void 0:i.completions)||[]:[...(null==i?void 0:i.dismissals)||[],...(null==i?void 0:i.completions)||[]]}const Vt={ar:"المساهمة من خلال Google",bg:"Принос чрез Google",bn:"Google-এর মাধ্যমে নিজের অবদান রাখুন",cs:"Přispět s Googlem",da:"Bidrag via Google",de:"Unterstützen mit Google",el:"Συνεισφέρετε μέσω Google",en:"Contribute with Google",es:"Contribuye con Google","es-419":"Contribuir con Google",et:"Panustage Google'i abil",fil:"Mag-contribute gamit ang Google",fr:"Contribuer avec Google","fr-ca":"Contribuer avec Google",gu:"Google વડે કન્ટ્રિબ્યૂટ કરો",hi:"Google खाते की मदद से योगदान करें",hr:"Podržite putem Googlea",hu:"Hozzájárulás a Google-lal",id:"Beri kontribusi dengan Google",it:"Contribuisci con Google",iw:"לתרומה באמצעות Google",ja:"Google で寄付",kn:"Google ಮೂಲಕ ಕೊಡುಗೆ ನೀಡಿ",ko:"Google을 통한 후원",lt:"Skirkite paramą su „Google“",lv:"Dāvināt, izmantojot Google",ml:"Google-ലൂടെ സംഭാവന ചെയ്യുക",mr:"Google वरून योगदान द्या",ms:"Sumbangkan dengan Google",nl:"Bijdragen met Google",no:"Bidra med Google",pa:"Contribute with Google",pl:"Wesprzyj z Google","pt-br":"Contribua usando o Google","pt-pt":"Contribuir com o Google",ro:"Contribuiți cu Google",ru:"Поддержать через Google",sk:"Prispieť s Googlom",sl:"Prispevajte z Googlom",sv:"Bidra med Google",ta:"Contribute with Google",te:"Google ద్వారా డొనేట్ చేయండి",th:"สนับสนุนผ่าน Google",tr:"Google ile Katkıda Bulun",uk:"Зробити внесок через Google",ur:"Google کے ساتھ تعاون کریں",vi:"Đóng góp bằng Google","zh-cn":"通过 Google 捐赠","zh-hk":"透過 Google 捐助","zh-tw":"透過 Google 捐款"},Wt={ar:"الاشتراك من خلال Google",bg:"Абонамент към Google",bn:"Google দিয়ে সাবস্ক্রাইব করুন",cs:"Předplatné s Googlem",da:"Abonner via Google",de:"Abonnieren mit Google",el:"Εγγραφείτε με την Google",en:"Subscribe with Google",es:"Suscríbete con Google","es-419":"Suscríbete con Google",et:"Tellige Google'iga",fil:"Mag-subscribe gamit ang Google",fr:"S'abonner avec Google","fr-ca":"S'abonner avec Google",gu:"Google વડે સબ્સ્ક્રાઇબ કરો",hi:"Google खाते की मदद से सदस्यता लें",hr:"Pretplatite se putem Googlea",hu:"Előfizetés a Google-lal",id:"Berlangganan dengan Google",it:"Abbonati con Google",iw:"הרשמה באמצעות Google",ja:"Google で購読",kn:"Subscribe with Google",ko:"Google을 통해 구독하기",lt:"Prenumeruoti su „Google“",lv:"Abonēt, izmantojot Google",ml:"Subscribe with Google",mr:"Google वरून सदस्य व्हा",ms:"Langgan dengan Google",nl:"Abonneren via Google",no:"Abonner med Google",pa:"Subscribe with Google",pl:"Subskrybuj z Google","pt-br":"Assine com o Google","pt-pt":"Subscrever com o Google",ro:"Abonați-vă cu Google",ru:"Подписка через Google",sk:"Predplatné s Googlom",sl:"Naročnine z Googlom",sv:"Subscribe with Google",ta:"Subscribe with Google",te:"Google ఖాతాతో సబ్‌స్క్రయిబ్ చేయండి",th:"สมัครผ่าน Google",tr:"Google ile Abone Ol",uk:"Передплата через Google",ur:"Google کے ساتھ سبسکرائب کریں",vi:"Đăng ký bằng Google","zh-cn":"通过 Google 订阅","zh-hk":"透過 Google 訂閱","zh-tw":"透過 Google 訂閱"},zt={ar:"تم إنشاء حساب باستخدام {EMAIL}.",bg:"Създаване на профил чрез {EMAIL}",bn:"{EMAIL}-এর সাহায্যে একটি অ্যাকাউন্ট তৈরি করা হয়েছে",cs:"Vytvořen účet pomocí e-mailu {EMAIL}",da:"Opret en konto med {EMAIL}",de:"Konto bei {EMAIL}
1 wurde erstellt",el:"Δημιουργήθηκε ένας λογαριασμός με τη διεύθυνση {EMAIL}",en:"Created an account with {EMAIL}",es:"Has creado una cuenta con {EMAIL}","es-419":"Se creó una cuenta con {EMAIL}",et:"Lõite konto e-posti aadressiga {EMAIL}",fil:"Gumawa ng account gamit ang {EMAIL}",fr:"A créé un compte avec {EMAIL}","fr-ca":"Un compte a été créé avec l'adresse {EMAIL}",gu:"{EMAIL} વડે એકાઉન્ટ બનાવ્યું",hi:"{EMAIL} का इस्तेमाल करके, एक खाता बनाया गया",hr:"Izrađen je račun s e-adresom {EMAIL}",hu:"Fiók létrehozva a következővel: {EMAIL}",id:"Membuat akun dengan {EMAIL}",it:"È stato creato un account con l'indirizzo {EMAIL}",iw:"יצרת חשבון באמצעות {EMAIL}",ja:"{EMAIL} でアカウントを作成しました",kn:"{EMAIL} ಮೂಲಕ ಒಂದು ಖಾತೆಯನ್ನು ರಚಿಸಲಾಗಿದೆ",ko:"{EMAIL}(으)로 계정을 만들었습니다.",lt:"Sukurta paskyra pas „{EMAIL}“",lv:"Ir izveidots konts ar e-pastu {EMAIL}",ml:"{EMAIL} ഉപയോഗിച്ച് അക്കൗണ്ട് സൃഷ്ടിച്ചു",mr:"{EMAIL} वापरून खाते तयार केले",ms:"Membuat akaun dengan {EMAIL}",nl:"Account gemaakt met {EMAIL}",no:"Du har opprettet en konto med {EMAIL}",pa:"{EMAIL} ਨਾਲ ਖਾਤਾ ਬਣਾਇਆ ਗਿਆ",pl:"Utworzono konto za pomocą adresu {EMAIL}","pt-br":"Conta criada com o e-mail {EMAIL}","pt-pt":"Criou uma conta com {EMAIL}",ro:"A fost creat un cont cu {EMAIL}",ru:"Вы зарегистрировали аккаунт на адрес {EMAIL}.",sk:"Vytvorený účet pomocou e‑mailu {EMAIL}",sl:"Z e-poštnim naslovom {EMAIL} je bil ustvarjen račun.",sv:"Du skapade ett konto med {EMAIL}",ta:"{EMAIL} மூலம் கணக்கு உருவாக்கப்பட்டது",te:"{EMAIL}తో ఖాతాను క్రియేట్ చేయండి",th:"สร้างบัญชีด้วย {EMAIL}",tr:"{EMAIL} ile bir hesap oluşturun",uk:"Обліковий запис створено за допомогою електронної адреси {EMAIL}",ur:"{EMAIL} سے اکاؤنٹ بنایا گیا",vi:"Đã tạo một tài khoản bằng {EMAIL}","zh-cn":"已使用 {EMAIL} 创建账号","zh-hk":"已使用 {EMAIL} 建立帳戶","zh-tw":"已使用 {EMAIL} 建立帳戶"},jt={ar:"اشتركت بنجاح باستخدام {EMAIL}",bg:"Регистрирахте се с(ъс) {EMAIL}",bn:"{EMAIL} দিয়ে সাইন-আপ করা হয়েছে",cs:"Zaregistrováno pomocí účtu {EMAIL}",da:"Tilmeldt med {EMAIL}",de:"Angemeldet mit {EMAIL}",el:"Εγγραφήκατε με τη διεύθυνση {EMAIL}",en:"Signed up with {EMAIL}",es:"Te has registrado con {EMAIL}
1","es-419":"Te registraste con {EMAIL}",et:"Registreerusite e-posti aadressiga {EMAIL}.",fil:"Nag-sign up gamit ang {EMAIL}",fr:"Inscrit avec {EMAIL}","fr-ca":"Inscrit avec {EMAIL}",gu:"{EMAIL} વડે સાઇન અપ કર્યું",hi:"{EMAIL} से साइन अप किया गया",hr:"Registrirani ste putem e-adrese {EMAIL}",hu:"Sikeresen regisztrált a(z) {EMAIL} címmel",id:"Mendaftar dengan {EMAIL}",it:"Registrazione eseguita con {EMAIL}",iw:"נרשמת באמצעות {EMAIL}",ja:"{EMAIL} で登録しました",kn:"{EMAIL} ಮೂಲಕ ಸೈನ್ ಅಪ್ ಮಾಡಲಾಗಿದೆ",ko:"{EMAIL} 주소로 가입함",lt:"Užsiregistruota naudojant {EMAIL}",lv:"Jūs reģistrējāties, izmantojot kontu {EMAIL}.",ml:"{EMAIL} ഉപയോഗിച്ച് സൈൻ അപ്പ് ചെയ്തു",mr:"{EMAIL} वापरून साइन अप केले आहे",ms:"Mendaftar dengan {EMAIL}",nl:"Aangemeld met {EMAIL}",no:"Registrert med {EMAIL}",pa:"{EMAIL} ਨਾਲ ਸਾਈਨ-ਅੱਪ ਕੀਤਾ ਗਿਆ",pl:"Zarejestrowano za pomocą adresu {EMAIL}","pt-br":"Deu certo! Seu e-mail {EMAIL} está inscrito","pt-pt":"Inscrição feita com {EMAIL}",ro:"V-ați înscris cu {EMAIL}",ru:"Новости будут приходить на адрес {EMAIL}.",sk:"Zaregistrovali ste sa pomocou účtu {EMAIL}",sl:"Registrirano z e-poštnim naslovom {EMAIL}",sv:"Registrerade sig med {EMAIL}",ta:"{EMAIL} மூலம் பதிவுசெய்துள்ளீர்கள்",te:"{EMAIL}‌ను ఉపయోగించి సైన్ అప్ చేశారు",th:"ลงชื่อสมัครใช้ด้วย {EMAIL}",tr:"{EMAIL} ile kaydolundu",uk:"Ви підписалися на новини, використовуючи адресу {EMAIL}",ur:"‫{EMAIL} کے ساتھ سائن اپ کیا",vi:"Đã đăng ký bằng tài khoản {EMAIL}","zh-cn":"已使用 {EMAIL} 订阅","zh-hk":"已透過 {EMAIL} 註冊","zh-tw":"已使用 {EMAIL} 訂閱"},Yt={ar:"تعذَّرت عملية التسجيل. يُرجى إعادة المحاولة.",bg:"Регистрацията не бе успешна. Опитайте да се регистрирате отново.",bn:"রেজিস্ট্রেশন করা যায়নি। আবার রেজিস্টার করার চেষ্টা করুন।",cs:"Registrace se nezdařila. Zkuste se zaregistrovat znovu.",da:"Tilmeldingen mislykkedes. Prøv at tilmelde dig igen.",de:"Registrierung fehlgeschlagen. Versuche es n
1och einmal.",el:"H εγγραφή απέτυχε. Δοκιμάστε να εγγραφείτε ξανά.",en:"Registration failed. Try registering again.",es:"Registro fallido. Prueba a registrarte de nuevo.","es-419":"No se pudo completar el registro. Vuelve a intentarlo.",et:"Registreerimine nurjus. Proovige uuesti registreerida.",fil:"Hindi nairehistro. Subukang irehistro ulit.",fr:"Échec de l'enregistrement. Réessayez.","fr-ca":"Échec de l'inscription. Essayez de vous inscrire à nouveau.",gu:"રજિસ્ટ્રેશન કરવામાં નિષ્ફળ થયા. ફરી રજિસ્ટર કરવાનો પ્રયાસ કરો.",hi:"रजिस्ट्रेशन नहीं हो सका. फिर से रजिस्टर करने की कोशिश करें.",hr:"Registracija nije uspjela. Pokušajte se registrirati ponovo.",hu:"Sikertelen regisztráció. Próbáljon meg újra regisztrálni.",id:"Pendaftaran gagal. Coba daftar lagi.",it:"Registrazione non riuscita. Prova a registrarti di nuovo.",iw:"הרישום נכשל. כדאי לנסות שוב.",ja:"登録できませんでした。もう一度お試しください。",kn:"ನೋಂದಣಿ ವಿಫಲವಾಗಿದೆ. ಪುನಃ ನೋಂದಾಯಿಸಲು ಪ್ರಯತ್ನಿಸಿ.",ko:"등록에 실패했습니다. 다시 등록해 보세요.",lt:"Registracija nesėkminga. Bandykite registruotis dar kartą.",lv:"Reģistrēšanās neizdevās. Mēģiniet reģistrēties vēlreiz.",ml:"രജിസ്റ്റർ ചെയ്യാനായില്ല. വീണ്ടും രജിസ്റ്റർ ചെയ്യാൻ ശ്രമിക്കുക.",mr:"नोंदणी करता आली नाही. पुन्हा नोंदणी करून पहा.",ms:"Pendaftaran gagal. Cuba daftar lagi.",nl:"Registratie mislukt. Probeer opnieuw te registreren.",no:"Registreringen mislyktes. Prøv å registrere deg på nytt.",pa:"ਰਜਿਸਟਰੇਸ਼ਨ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ। ਰਜਿਟਰ ਕਰਨ ਦੀ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।",pl:"Rejestracja się nie udała. Spróbuj jeszcze raz się zarejestrować.","pt-br":"Não foi possível fazer o registro. Tente de novo.","pt-pt":"Falha no registo. Tente registar-se novamente.",ro:"Nu s-a realizat înregistrarea. Încercați să vă înregistrați din nou.",ru:"Не удалось пройти регистрацию. Повторите попытку.",sk:"Registrácia sa nepodarila. Skúste sa zaregistrovať znova.",sl:"Registracija ni uspela. Poskusite se znova registrirati.",sv:"Registreringen misslyckades. Försök att registrera dig igen.",ta:"பதிவுசெய்ய முடியவில்லை. மீண்டும் முயலவும்.",te:"రిజిస్ట్రేషన్ విఫలమైంది. రిజిస్ట్రేషన్‌ను మళ్లీ ట్రై చేయండి.",th:"ลงทะเบียนไม่สำเร็จ ลองลงทะเบียนอีกครั้ง",tr:"Kayıt işlemi başarısız oldu. Tekrar kayıt yaptırmayı deneyin.",uk:"Не вдалося зареєструватися. Повторіть спробу.",ur:"رجسٹریشن ناکام ہو گئی۔ دوبارہ رجسٹر کرنے کی کوشش کریں۔",vi:"Không đăng ký được. Hãy thử đăng ký lại.","zh-cn":"注册失败,请尝试重新注册。","zh-hk":"註冊失敗。請嘗試重新註冊。","zh-tw":"註冊失敗,請再試一次。"},Kt={ar:"تعذَّرت عملية الاشتراك. يُرجى إعادة المحاولة.",bg:"Регистрацията не бе успешна. Опитайте да се регистрирате отново.",bn:"সাইন-আপ করা যায়নি। আবার সাইন-আপ করার চেষ্টা করুন।",cs:"Registrace se nezdařila. Zkuste se zaregistrovat znovu.",da:"Tilmeldingen mislykkedes. Prøv at tilmelde dig igen.",de:"Anmeldung fehlgeschlagen. Versuche es n
1och einmal.",el:"Η εγγραφή απέτυχε. Δοκιμάστε να εγγραφείτε ξανά.",en:"Sign-up failed. Try signing up again.",es:"Suscripción fallida. Prueba a suscribirte de nuevo.","es-419":"Se produjo un error durante el registro. Vuelve a intentarlo.",et:"Registreerumine nurjus. Proovige uuesti registreeruda.",fil:"Hindi nakapag-sign up. Subukang mag-sign up ulit.",fr:"Échec de l'inscription. Réessayez.","fr-ca":"Échec de l'inscription. Essayez de vous inscrire à nouveau.",gu:"સાઇન અપ કરવામાં નિષ્ફળ થયા. ફરી સાઇન અપ કરવાનો પ્રયાસ કરો.",hi:"साइन अप नहीं किया जा सका. फिर से साइन अप करने की कोशिश करें.",hr:"Registracija nije uspjela. Pokušajte se registrirati ponovo.",hu:"A regisztráció nem sikerült. Próbáljon meg újra regisztrálni.",id:"Pendaftaran gagal. Coba daftar lagi.",it:"Iscrizione non riuscita. Prova a iscriverti di nuovo.",iw:"ההרשמה נכשלה. כדאי לנסות שוב.",ja:"登録できませんでした。もう一度お試しください。",kn:"ಸೈನ್ ಅಪ್ ವಿಫಲವಾಗಿದೆ. ಪುನಃ ಸೈನ್ ಅಪ್ ಮಾಡಲು ಪ್ರಯತ್ನಿಸಿ.",ko:"가입에 실패했습니다. 다시 가입해 보세요.",lt:"Nepavyko prisiregistruoti. Bandykite prisiregistruoti dar kartą.",lv:"Reģistrācija neizdevās. Mēģiniet reģistrēties vēlreiz.",ml:"സൈൻ അപ്പ് ചെയ്യാനായില്ല. വീണ്ടും സൈൻ അപ്പ് ചെയ്യാൻ ശ്രമിക്കുക.",mr:"साइनअप करता आले नाही. पुन्हा साइन अप करून पहा.",ms:"Daftar gagal. Cuba daftar lagi.",nl:"Aanmelding mislukt. Probeer opnieuw aan te melden.",no:"Registreringen mislyktes. Prøv å registrere deg på nytt.",pa:"ਸਾਈਨ-ਅੱਪ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ। ਸਾਈਨ-ਅੱਪ ਕਰਨ ਦੀ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।",pl:"Rejestracja się nie udała. Spróbuj jeszcze raz się zarejestrować.","pt-br":"Não foi possível se inscrever. Tente de novo.","pt-pt":"Falha na inscrição. Tente inscrever-se novamente.",ro:"Nu s-a realizat înscrierea. Încercați să vă înscrieți din nou.",ru:"Не удалось зарегистрироваться. Повторите попытку.",sk:"Registrácia sa nepodarila. Skúste sa zaregistrovať znova.",sl:"Prijava ni uspela. Poskusite se znova prijaviti.",sv:"Registreringen misslyckades. Försök att registrera dig igen.",ta:"பதிவுசெய்ய முடியவில்லை. மீண்டும் முயலவும்.",te:"సైన్ అప్ విఫలమైంది. మళ్లీ సైన్ అప్ చేసి ట్రై చేయండి.",th:"ลงชื่อสมัครรับไม่สำเร็จ ลองลงชื่อสมัครรับอีกครั้ง",tr:"Kaydolma işlemi başarısız oldu. Tekrar kaydolmayı deneyin.",uk:"Не вдалося підписатися. Повторіть спробу.",ur:"سائن اپ ناکام ہو گیا۔ دوبارہ سائن اپ کرنے کی کوشش کریں۔",vi:"Không đăng ký nhận bản tin được. Hãy thử đăng ký lại.","zh-cn":"注册失败,请尝试重新注册。","zh-hk":"申請失敗。請嘗試重新申請。","zh-tw":"訂閱失敗,請再試一次。"},qt={ar:"لم يتم العثور على أي اشتراك.",bg:"Няма намерено членство",bn:"কোনও মেম্বারশিপ খুঁজে পাওয়া যায়নি",cs:"Nebylo nalezeno žádné členství",da:"Der blev ikke fundet noget medlemskab",de:"Keine Mitgliedschaftsdaten gefunden",el:"Δεν βρέθηκε συνδρομή",en:"No membership found",es:"No se han encontrado suscripciones","es-419":"No se encontró ninguna membresía",et:"Liikmesust ei leitud",fil:"Walang nakitang membership",fr:"Aucun abonnement trouvé","fr-ca":"Aucun abonnement trouvé",gu:"કોઈ મેમ્બરશિપ મળી નથી",hi:"पैसे चुकाकर ली जाने वाली कोई सदस्यता नहीं मिली",hr:"Nije pronađena nijedna pretplata",hu:"Nem található tagság",id:"Langganan tidak ditemukan",it:"Nessun abbonamento trovato",iw:"לא נמצא מינוי",ja:"メンバーシップが見つかりません",kn:"ಯಾವುದೇ ಸದಸ್ಯತ್ವವು ಕಂಡುಬಂದಿಲ್ಲ",ko:"멤버십 정보를 찾을 수 없습니다.",lt:"Narystės nerasta",lv:"Netika atrasts neviens abonements.",ml:"അംഗത്വമൊന്നും കണ്ടെത്തിയില്ല",mr:"कोणतेही सदस्यत्व आढळले नाही",ms:"Tiada keahlian ditemukan",nl:"Geen lidmaatschap gevonden",no:"Fant ingen abonnementer",pa:"ਕੋਈ ਮੈਂਬਰਸ਼ਿਪ ਨਹੀਂ ਮਿਲੀ",pl:"Nie znaleziono subskrypcji","pt-br":"Nenhuma assinatura foi encontrada","pt-pt":"Nenhuma subscrição encontrada",ro:"Niciun abonament găsit",ru:"Подписка не найдена.",sk:"Nenašlo sa žiadne členstvo",sl:"Ni naročnin",sv:"Inget medlemskap hittades",ta:"மெம்ப
1ர்ஷிப் இல்லை",te:"మెంబర్‌షిప్ కనుగొనబడలేదు",th:"ไม่พบการเป็นสมาชิก",tr:"Üyelik bulunamadı",uk:"Немає підписок",ur:"کوئی رکنیت نہیں ملی",vi:"Không tìm thấy gói thành viên nào","zh-cn":"未找到会员资料","zh-hk":"找不到會籍","zh-tw":"找不到會員資料"},Ht={ar:'عبارة الحث على اتخاذ إجراء في ميزة "اشترِك مع Google"',bg:"Подканваща фраза за „Абонамент към Google“",bn:"Subscribe with Google CTA",cs:"Výzva k akci Předplatného s Googlem",da:"CTA for Abonner med Google",de:"„Abonnieren mit Google“-CTA",el:"CTA για τη λειτουργία Εγγραφείτε με την Google",en:"Subscribe with Google CTA",es:"CTA de Suscríbete con Google","es-419":"CTA de Suscríbete con Google",et:"CTA Tellige Google'iga",fil:"CTA ng Mag-subscribe gamit ang Google",fr:"CTA S'abonner avec Google","fr-ca":"Appel à l'action S'abonner avec Google",gu:"Subscribe with Google CTA",hi:"Subscribe with Google का सीटीए",hr:"CTA za Pretplatu putem Googlea",hu:"Előfizetés a Google-lal CTA",id:"CTA Berlangganan dengan Google",it:"CTA Abbonati con Google",iw:"‫CTA של Subscribe with Google",ja:"「Google で購読」の CTA",kn:"Subscribe with Google CTA",ko:"Google을 통한 구독 CTA",lt:"Prenumeruoti su „Google“ raginimas veikti",lv:"Abonēšana, izmantojot Google NLP",ml:"Subscribe with Google CTA",mr:"Subscribe with Google CTA",ms:"
1CTA Langgan dengan Google",nl:"CTA voor Abonneren via Google",no:"Handlingsfremmende oppfordring for Abonner med Google",pa:"Subscribe with Google CTA",pl:"Wezwanie do działania Subskrybuj z Google","pt-br":"CTA do Assine com o Google","pt-pt":"AAA Subscreva com o Google",ro:"Îndemnul Abonați-vă cu Google",ru:'Призыв к действию в сервисе "Подписка через Google"',sk:"Výzva na akciu Predplatného s Googlom",sl:"Poziv k dejanju za Naročnine z Googlom",sv:"Uppmaning för Subscribe with Google",ta:"Subscribe with Google CTA",te:"Subscribe with Google CTA",th:'CTA "สมัครผ่าน Google"',tr:"Google ile Abone Ol CTA Mesajı",uk:'Заклик до дії "Передплата через Google"',ur:"‫Google کے ساتھ سبسکرائب کریں کا CTA",vi:"CTA cho dịch vụ Đăng ký bằng Google","zh-cn":"“通过 Google 订阅”CTA","zh-hk":"「透過 Google 訂閱」呼籲字句 (CTA)","zh-tw":"「透過 Google 訂閱」行動號召"},Jt={ar:'زر "اشترِك مع Google"',bg:"Бутон „Абонамент към Google“",bn:"Subscribe with Google-এর বোতাম",cs:"Tlačítko Předplatného s Googlem",da:"Knap til Abonner med Google",de:"„Abonnieren mit Google“-Button",el:"Κουμπί για τη λειτουργία Εγγραφείτε με την Google",en:"Subscribe with Google Button",es:"Botón Suscríbete con Google","es-419":"Botón de Suscríbete con Google",et:"Nupp Tellige Google'iga",fil:"Button na Mag-subscribe gamit ang Google",fr:"Bouton S'abonner avec Google","fr-ca":"Bouton S'abonner avec Google",gu:"Subscribe with Google બટન",hi:"Subscribe with Google बटन",hr:"Gumb Pretplata putem Googlea",hu:"Előfizetés a Google-lal gomb",id:"Tombol Berlangganan dengan Google",it:"Pulsante Abbonati con Google",iw:"כפתור של Subscribe with Google",ja:"「Google で購読」のボタン",kn:"Subscribe with Google ಬಟನ್",ko:"Google을 통한 구독 버튼",lt:"Prenumeruoti su „Google“ mygtukas",lv:"Poga “Abonēšana, izmantojot Google”",ml:"Subscribe with Google ബട്ടൺ",mr:"Subscribe with Google बटण",ms:"Butang Langgan dengan Google",nl:"Abonneren via Google-knop",no:"Abonner med Google-knapp",pa:"Subscribe with Google ਬਟਨ",pl:"Przycisk Subskrybuj z Google","pt-br":"Botão do Assine com o Google","pt-pt":"Botão Subscreva com o Google",ro:"Butonul Abonați-vă cu Google",ru:'Кнопка сервиса "Подписка через Google"',sk:"Tlačidlo Predplatného s Googlom",sl:"Gumb za Naročnine z Googlom",sv:"Knapp för Subscribe with Google",ta:"Subscribe with Google பட்டன்",te:"Subscribe with Google బటన్",th:'ปุ่ม "สมัครผ่าน Google"',tr:"Google ile Abone Ol Düğmesi",uk:'Кнопка "Передплата через Google"',ur:"‫Google کے ساتھ سبسکرائب کریں کا بٹن",vi:"Nút Đăng ký bằng Google","zh-cn":"“通过 Google 订阅”按钮","zh-hk":"「透過 Google 訂閱」按鈕","zh-tw":"「透過 Google 訂閱」按鈕"},Xt={ar:'إشعار "اشترِك مع Google"',bg:"Известие за „Абонамент към Google“",bn:"Subscribe with Google-এর বিজ্ঞপ্তি",cs:"Oznámení Předplatného s Googlem",da:"Notifikation om Abonner med Google",de:"„Abonnieren mit Google“-Benachrichtigung",el:"Ειδοποίηση από τη λειτουργία Εγγραφείτε με την Google",en:"Subscribe with Google Notification",es:"Notificación de Suscríbete con Google","es-419":"Notificación de Suscríbete con Google",et:"Märguanne Tellige Google'iga",fil:"Notification ng Mag-subscribe gamit ang Google",fr:"Notification S'abonner avec Google","fr-ca":"Notification S'abonner avec Google",gu:"Subscribe with Google નોટિફિકેશન",hi:"Subscribe with Google की सूचना",hr:"Obavijest o Pretplati putem Googlea",hu:"Előfizetés a Google-lal értesítés",id:"Notifikasi Berlangganan dengan Google",it:"Notifica Abbonati con Google",iw:"התראה לגבי Subscribe with Google",ja:"「Google で購読」の通知",kn:"Subscribe with Google ನೋಟಿಫಿಕೇಶನ್",ko:"Google을 통한 구독 알림",lt:"„Prenumeruoti su „Google“ pranešimas",lv:"Paziņojums par funkciju “Abonēšana, izmantojot Google”",ml:"Subscribe with Google അറിയിപ്പ്",mr:"Subscribe with Google नोटिफिकेशन",ms:"Pemberitahuan Langgan dengan Google",nl:"Melding voor Abonneren via Google",no:"Abonner med Google-varsel",pa:"Subscribe with Google ਸੂਚਨਾ",pl:"Powiadomienie Subskrybuj z Google","pt-br":"Notificação do Assine com o Google","pt-pt":"Notificação da funcionalidade Subscreva com o Google",ro:"Notificarea Abonați-vă cu Google",ru:'Уведомление сервиса "Подписка через Google"',sk:"Upozornenie Predplatného s Googlom",sl:"Obvestilo o Naročninah z Googlom",sv:"Avisering om Subscribe with Google",ta:"Subscribe with Google அறிவிப்ப
1ு",te:"Subscribe with Google నోటిఫికేషన్",th:'การแจ้งเตือน "สมัครผ่าน Google"',tr:"Google ile Abone Ol Bildirimi",uk:'Сповіщення "Передплата через Google"',ur:"‫Google کے ساتھ سبسکرائب کریں کی اطلاع",vi:"Thông báo về dịch vụ Đăng ký bằng Google","zh-cn":"“通过 Google 订阅”通知","zh-hk":"「透過 Google 訂閱」通知","zh-tw":"「透過 Google 訂閱」通知"},$t={ar:"سبق أن اشتركت في النشرة الإخبارية.",bg:"Регистрирали сте се преди.",bn:"আপনি আগেই সাইন-আপ করেছেন।",cs:"Už jste se zaregistrovali dříve.",da:"Du har tilmeldt dig før.",de:"Du hast dich bereits angemeldet.",el:"Έχετε εγγραφεί στο παρελθόν.",en:"You have signed up before.",es:"Ya te has registrado.","es-419":"Ya te registraste antes.",et:"Olete varem juba registreerunud.",fil:"Nag-sign up ka na dati.",fr:"Vous vous êtes déjà inscrit.","fr-ca":"Vous vous êtes inscrit auparavant.",gu:"તમે પહેલેથી જ સાઇન અપ કર્યું છે.",hi:"आपने न्यूज़लेटर के लिए पहले ही साइन अप कर लिया है.",hr:"Već ste se registrirali.",hu:"Ön korábban már regisztrált.",id:"Anda telah mendaftar sebelumnya.",it:"Hai già effettuato l'iscrizione.",iw:"כבר נרשמת.",ja:"すでに登録しています。",kn:"ನೀವು ಮೊದಲು ಸೈನ್ ಅಪ್ ಮಾಡಿದ್ದೀರಿ.",ko:"이전에 가입한 사용자입니다.",lt:"Jau esate prisiregistravę.",lv:"Jūs jau iepriekš reģistrējāties.",ml:"നിങ്ങൾ മുമ്പ് സെെൻ അപ്പ് ചെയ്‌തിട്ടുണ്ട്.",mr:"तुम्ही यापूर्वी साइन अप केले आहे.",ms:"Anda sudah mendaftar sebelum ini.",nl:"Je hebt je al eerder aangemeld.",no:"Du er allerede registrert.",pa:"ਤੁਸੀਂ ਪਹਿਲਾਂ ਹੀ ਸਾਈਨ-ਅੱਪ ਕਰ ਚੁੱਕੇ ਹੈ।",pl:"Już wcześniej się zarejestrowałeś(-aś).","pt-br":"Você já se inscreveu.","pt-pt":"Já se inscreveu anteriormente.",ro:"V-ați mai înscris în trecut.",ru:"Вы уже зарегистрированы.",sk:"Už ste sa zaregistrovali.",sl:"Ste se že registrirali.",sv:"Du har redan registrerat dig.",ta:"ஏற்கெனவே பதிவு செய்துள்ளீர்கள்.",te:"మీరు ఇంతకు ముందే సైన్ అప్ చేశారు.",th:"คุณสมัครรับมาก่อนแล้ว",tr:"Daha önce kaydolmuştunuz.",uk:"Ви вже зареєструвалися.",ur:"آپ پہلے سائن اپ کر چکے ہیں۔",vi:"Bạn đã đăng ký trước đó.","zh-cn":"您之前已订阅。","zh-hk":"你之前已註冊。","zh-tw":"你先前已訂閱。"};class Qt{constructor(){}resized(){}}async function Zt(t,s,i,e){const n=await t.acceptResult();if(n.origin!=s||i&&!n.originVerified||e&&!n.secureChannel)throw new Error("channel mismatch");return n.data}function ts(t,s,i,e){const n=t.createElement(s);return function(t,s={}){for(const[i,e]of Object.entries(s))t.setAttribute(i,e)}(n,i),e&&(n.textContent=e),n}function ss(t,s){var i;const e=ts(t.getWin().document,"style",{type:"text/css"});return e.textContent=s,null==(i=t.getHead())||i.appendChild(e),e}function is(t){let s=t;do{if(s.nextSibling)return!0}while(s=s.parentNode);return!1}function es(t){return"AbortError"===(null==t?void 0:t.name)}function ns(t){const s=new Error("AbortError: "+t);return s.name="AbortError",s}class rs{static throwAsync(t){setTimeout(()=>{throw t})}}function os(t,s){const i=t.en;if(!s)return i;let e="string"==typeof s?s:(n=s).lang?n.lang:(null==(o=null==(r=null==n?void 0:n.ownerDocument)?void 0:r.documentElement)?void 0:o.lang)?n.ownerDocument.documentElement.lang:"en";var n,r,o;e=e.toLowerCase(),e=e.replace(/_/g,"-");const h=e.split("-");for(;h.length;){const s=h.join("-");if(s in t)return t[s];h.pop()}return i}const hs={"align-content":"normal",animation:"none","align-items":"normal","align-self":"auto","alignment-baseline":"auto","backface-visibility":"hidden","background-clip":"border-box","background-image":"none","baseline-shift":"0","block-size":"auto",border:"none","border-collapse":"separate",bottom:"0","box-sizing":"border-box","break-after":"auto","break-before":"auto","break-inside":"auto","buffered-rendering":"auto","caption-side":"top","caret-color":"rgb(51, 51, 51)",clear:"none",color:"rgb(51, 51, 51)","color-rendering":"auto","column-count":"auto","column-fill":"balance","column-gap":"normal","column-rule-color":"rgb(51, 51, 51)","column-rule-style":"none","column-rule-width":"0","column-span":"none","column-width":"auto",contain:"none","counter-increment":"none","counter-reset":"none",cursor:"auto",direction:"inherit",display:"block","empty-cells":"show",filter:"none",flex:"none","flex-flow":"row nowrap",float:"none","flood-color":"rgb(0, 0, 0)","flood-opacity":"1",font:"none","font-size":"medium","font-family":"",height:"auto",hyphens:"manual","image-rendering":"auto","inline-size":"",isolation:"auto","justify-content":"normal","justify-items":"normal","justify-self":"auto","letter-spacing":"normal","lighting-color":"rgb(255, 255, 255)","line-break":"auto","line-height":"normal","margin-bottom":"0",mask:"none","max-block-size":"none","max-height":"none","max-inline-size":"none","max-width":"none","min-block-size":"none","min-height":"0","min-inline-size":"0","min-width":"0","mix-blend-mode":"normal","object-fit":"fill","offset-distance":"none","offset-path":"none","offset-rotate":"auto 0deg",opacity:"1",order:"0",orphans:"2",outline:"none","overflow-anchor":"auto","overflow-wrap":"normal",overflow:"visible",padding:"0",page:"",perspective:"none","pointer-events":"auto",position:"static",quotes:"",resize:"none",right:"0","scroll-behavior":"auto","tab-size":"8","table-layout":"auto","text-align":"start","text-align-last":"auto","text-anchor":"start","text-combine-upright":"none","text-decoration":"none","text-indent":"0","text-orientation":"mixed","text-overflow":"clip","text-rendering":"auto","text-shadow":"none","text-size-adjust":"auto","text-transform":"none","text-underline-position":"auto",top:"auto","touch-action":"auto",transform:"none",transition:"none 0s ease 0s","unicode
1-bidi":"normal","user-select":"auto","vector-effect":"none","vertical-align":"baseline",visibility:"visible","white-space":"normal",widows:"2","word-break":"normal","word-spacing":"0","word-wrap":"normal","writing-mode":"horizontal-tb",zoom:"1","z-index":"auto"};function as(t,s){for(const[i,e]of Object.entries(s))t.style.setProperty(i,e.toString(),"important")}function ls(t,s,i){t.style.setProperty(s,i)}class us extends Qt{constructor(t,s,i,e,n,r=!1,o=!1,h=!0){super(),this.Os=t,this.Ns=s,this.ys=i,this.vs=e,this.titleLang=n,this.Ps=r,this.Ls=o,this.Gs=h,this.Ms=null,this.ks=[],this.Ds=this.Os.document;const a={frameborder:"0",scrolling:"no",title:os(Ht,n)};this.Us=ts(this.Ds,"iframe",a),this.xs=new Promise(t=>{this.Fs=t})}getElement(){return this.Us}async init(t){const s=await this.Ns.openIframe(this.Us,this.ys,this.vs);return this.Bs(s,t)}shouldFadeBody(){return this.Ps}hasLoadingIndicator(){return this.Ls}Bs(t,s){return this.Ms=t,this.Fs(t),s?this.Ms.onResizeRequest(t=>{s.resizeView(this,t)}):t.onResizeRequest(t=>{as(this.Us,{height:"".concat(t,"px")})}),this.Ms.whenReady()}Vs(){return this.xs}async on(t,s){(await this.Vs()).on(t,s)}async execute(t){(await this.Vs()).execute(t)}async acceptResult(){return(await this.Vs()).acceptResult()}async acceptResultAndVerify(t,s,i){return Zt(await this.Vs(),t,s,i)}async whenComplete(){await this.acceptResult()}async onCancel(t){try{await this.acceptResult()}catch(s){throw es(s)&&t(),s}}resized(){this.Ms&&this.Ms.resized(),this.ks.forEach(t=>t())}onResize(t){this.ks.push(t)}shouldAnimateFade(){return this.Gs}}var cs=(t=>(t.NONE="none",t.CONTRIBUTION="contribution",t.CONTRIBUTION_LARGE="contribution_large",t.SUBSCRIPTION="subscription",t.SUBSCRIPTION_LARGE="subscription_large",t))(cs||{}),ds=(t=>(t.OPEN="OPEN",t.CLOSED="CLOSED",t))(ds||{});class gs{constructor(t,s,i){var e,n;this.deps=t,this.activityIframeView=s,this.configurationId=i,this.overlays=new Map,this.positions=new Map,this.rafId=null,this.resizeHandler=this.scheduleUpdate.bind(this),this.doc=t.doc(),this.eventManager=t.eventManager(),this.activityIframeView.on(v,this.handleLoginButtonCoordinates.bind(this)),this.doc.getWin().addEventListener("resize",this.resizeHandler),this.activityIframeView.onResize(this.resizeHandler),null==(n=null==(e=this.deps.gisInteropManager())?void 0:e.setCompleteLoginCallback)||n.call(e,this.completeLogin.bind(this))}dispose(){var t,s;for(const i of this.overlays.values())i.remove();this.overlays.clear(),this.rafId&&this.doc.getWin().cancelAnimationFrame(this.rafId),this.doc.getWin().removeEventListener("resize",this.resizeHandler),null==(s=null==(t=this.deps.gisInteropManager())?void 0:t.setCompleteLoginCallback)||s.call(t,null)}updateOverlays(){this.positions.forEach((t,s)=>{const i=this.activityIframeView.getElement().getBoundingClientRect(),e=i.height,n=i.width,r=this.doc.getWin().innerWidth,o=this.doc.getWin().innerHeight,h=(r-n)/2+t.left,a=o-(e-t.top);as(this.overlays.get(s),{left:"".concat(h,"px"),top:"".concat(a,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px")})})}scheduleUpdate(){this.rafId&&(this.doc.getWin().cancelAnimationFrame(this.rafId),this.rafId=null),this.rafId=this.doc.getWin().requestAnimationFrame(()=>{this.rafId=null,this.updateOverlays()})}handleLoginButtonCoordinates(t){var s;null==(s=t.getLoginButtonCoordinatesList())||s.forEach(t=>{const s=this.validatedPosition(t);s&&(this.positions.has(s.id)||this.createOverlay(s.id),this.positions.set(s.id,s))}),this.scheduleUpdate()}validatedPosition(t){const s=t.getId(),i=t.getLeft(),e=t.getTop(),n=t.getWidth(),r=t.getHeight();return null===s||null===i||null===e||null===n||null===r?null:{id:s,left:i,top:e,width:n,height:r}}createOverlay(t){var s;const i=ts(this.doc.getRootNode(),"div",{});return as(i,{position:"absolute",opacity:"0","background-color":"transparent","z-index":"2147483647","pointer-events":"auto",cursor:"pointer"}),this.renderButton(i),this.overlays.set(t,i),null==(s=this.doc.getBody())||s.appendChild(i),i}renderButton(t){var s,i,e;null==(e=null==(i=null==(s=this.doc.getWin().google)?void 0:s.accounts)?void 0:i.id)||e.renderButton(t,{type:"standard",theme:"outline",text:"continue_with",logo_alignment:"left",width:190,click_listener:this.overlayClick.bind(this)})}overlayClick(){var t,s;const i=new A;i.setGisMode(c.GIS_MODE_OVERLAY),this.eventManager.logSwgEvent(o.ACTION_REGWALL_OPT_IN_BUTTON_CLICK,!0,i,void 0,this.configurationId),null==(s=null==(t=this.deps.gisInteropM
1anager())?void 0:t.setRegwallClickPending)||s.call(t,!0)}async completeLogin(t){try{const s=new O;return s.setSwgUserToken(t),await this.activityIframeView.execute(s),!0}catch{return this.eventManager.logSwgEvent(o.EVENT_GIS_LOGIN_ERROR,!1,null,void 0,this.configurationId),!1}}}const ps=/^(\)\]\}'\n)/;class Es{constructor(t){this.Os=t}async fetchCredentialedJson(t){const s=await this.fetch(t,{method:"GET",headers:{Accept:"text/plain, application/json"},credentials:"include"}),i=(await s.text()).replace(ps,"");return JSON.parse(i)}async sendPost(t,s){const i={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},credentials:"include",body:"f.req="+ft(s)},e=await this.fetch(t,i);if(!e)return{};const n=await e.text();try{const t=n.replace(ps,"");return JSON.parse(t)}catch(r){return rs.throwAsync(r),{}}}async fetch(t,s){try{return await this.Os.fetch(t,s)}catch(i){const s=Et(t).origin;throw new Error("XHR Failed fetching (".concat(s,"/...): (Note: a CORS error above may indicate that this publisher or domain is not configured in Publisher Center. The CORS error happens because 4xx responses do not set CORS headers.)\n\n")+i)}}sendBeacon(t,s){const i=new Blob(["f.req="+ft(s)],{type:"application/x-www-form-urlencoded;charset=UTF-8"});navigator.sendBeacon(t,i)}}var _s=(t=>(t.GisModeDisabled="GIS_MODE_DISABLED",t.GisModeOverlay="GIS_MODE_OVERLAY",t))(_s||{});async function ms(t,s,i){const e=t.gisInteropManager(),n=null==e?void 0:e.isRegwallClickPending(),r=t.dialogManager().getDialog(),o=null==r?void 0:r.getLoadingView(),h=null==r?void 0:r.getContainer();n&&o&&h&&(o.show(),as(h,{display:"none"}));let a=!1;try{const r=await async function(t,s){const i=new Es(t.win()),e=t.pageConfig().getPublicationId(),n=await t.storage().get($,!0),r=Et(t.win().location.href).origin;let o=yt("/publication/".concat(encodeURIComponent(e),"/mixrrmgistokens"));n&&(o=mt(o,"sut",n)),o=mt(o,"id_token",s.idToken),o=mt(o,"gis_client_id",s.gisClientId),o=mt(o,"rrm_origin",r),s.gisOrigin&&(o=mt(o,"gis_origin",s.gisOrigin));const h=await i.sendPost(o,{toArray:()=>[],label:()=>"MixRrmGisTokens"});return(null==h?void 0:h.swgUserToken)&&await t.entitlementsManager().updateEntitlements(h.swgUserToken),h}(t,{idToken:s.credential,gisClientId:i.gisClientId}),o=null==r?void 0:r.swgUserToken;return n&&(e.setRegwallClickPending(!1),o)&&await e.triggerCompleteLogin(o)?(a=!0,{fromRrm:!0}):{fromRrm:!1}}finally{!a&&n&&o&&h&&(o.hide(),as(h,{display:"block"}))}}var fs=(t=>(t.EVENT_SHOWCASE_METER_OFFERED="EVENT_SHOWCASE_METER_OFFERED",t.EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION="EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION",t.EVENT_SHOWCASE_UNLOCKED_BY_METER="EVENT_SHOWCASE_UNLOCKED_BY_METER",t.EVENT_SHOWCASE_UNLOCKED_FREE_PAGE="EVENT_SHOWCASE_UNLOCKED_FREE_PAGE",t.EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL="EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL",t.EVENT_SHOWCASE_INELIGIBLE_PAYWALL="EVENT_SHOWCASE_INELIGIBLE_PAYWALL",t.EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL="EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL",t))(fs||{}),ws=(t=>(t.SHOW_OFFERS="showOffers",t.SHOW_SUBSCRIBE_OPTION="showSubscribeOption",t.SHOW_ABBRV_OFFER="showAbbrvOffer",t.SHOW_CONTRIBUTION_OPTIONS="showContributionOptions",t.SUBSCRIBE="subscribe",t.CONTRIBUTE="contribute",t.COMPLETE_DEFERRED_ACCOUNT_CREATION="completeDeferredAccountCreation",t.LINK_ACCOUNT="linkAccount",t.SHOW_LOGIN_PROMPT="showLoginPrompt",t.SHOW_LOGIN_NOTIFICATION="showLoginNotification",t.SHOW_METER_TOAST="showMeterToast",t.TIME_BOUND_PASS="timeBoundPass",t))(ws||{}),Is=(t=>(t[t.DEFAULT=0]="DEFAULT",t[t.IMPRESSIONS=1]="IMPRESSIONS",t))(Is||{}),bs=(t=>(t.AUTO="auto",t.REDIRECT="redirect",t))(bs||{}),Ts=(t=>(t.SUBSCRIPTION="SUBSCRIPTION",t.UI_CONTRIBUTION="UI_CONTRIBUTION",t.TIME_BOUND_PASS="TIME_BOUND_PASS",t))(Ts||{}),Rs=(t=>(t.LIGHT="light",t.DARK="dark",t))(Rs||{}),Ss=(t=>(t.PREFERENCE_UNSPECIFIED="PREFERENCE_UNSPECIFIED",t.PREFERENCE_GOOGLE_PROVIDED_PROMPT="PREFERENCE_GOOGLE_PROVIDED_PROMPT",t.PREFERENCE_PUBLISHER_PROVIDED_PROMPT="PREFERENCE_PUBLISHER_PROVIDED_PROMPT",t.PREFERENCE_ADSENSE_REWARDED_AD="PREFERENCE_ADSENSE_REWARDED_AD",t))(Ss||{});async function As(t,s,i,e){const n=t.ownerDocument.defaultView,r=t.style.transition||"";await new Promise(r=>{n.setTimeout(()=>{n.setTimeout(r,i);const o="".concat(i,"ms ").concat(e);as(t,Object.assign({transition:"transform ".concat(o,", opacity ").concat(o)},s))})}),as(t,{transition:r})}const Cs={height:"0"};class Os{constructor(t,s,i={},e="swg-toast"){this.ys=s,this.vs=i,this.Ws=e,this.zs=null,this.js=!1,this.Ds=t.doc(),this.Ns=t.activities();const n=t.clientConfigManager().getLanguage(),r=os(Xt,n),o={frameborder:"0",scrolling:"no",class:this.Ws,title:r};this.Us=ts(this.Ds.getWin().document,"iframe",o),as(this.Us,Cs)}Ys(){var t;return Boolean(null==(t=this.Ws)?void 0:t.split(" ").includes("publisher-toast"))}Ks(){return this.Ys()&&this.Ds.getWin().matchMedia("(min-width: 641px) and (min-height: 641px)").matches}qs(){return this.js?"translateX(calc(100% + 30px))":"translateY(100%)"}Hs(){return this.js?"translateX(0)":"translateY(0)"}getElement(){return this.Us}open(){var t;return null==(t=this.Ds.getBody())||t.appendChild(this.Us),this.Js()}async Js(){const t=await this.Ns.openIframe(this.Us,this.ys,this.vs);let s=!1;t.onResizeRequest(i=>{s=!0,as(this.Us,{height:"".concat(i,"px")}),t.resized()}),await t.whenReady(),s||function(t){for(const s of.height)ls(t,s,"")}(this.Us),this.js=this.Ks(),this.zs=this.Xs({callback:()=>(as(this.Us,{transform:this.qs(),opacity:"1",visibility:"visible"}),As(this.Us,{transform:this.Hs(),opacity:"1",visibility:"visible"},400,"ease-out"))}),this.Ds.getWin().setTimeout(()=>{this.close()},8e3)}async Xs({callback:t}){await this.zs;try{await t()}catch{}}close(){return this.zs=this.Xs({callback:()=>(this.Ds.getWin().setTimeout(()=>{var t;null==(t=this.Ds.getBody())||t.removeChild(this.Us)},500),As(this.Us,{transform:this.qs(),opacity:"1",visibility:"visible"},400,"ease-out"))}),this.zs}}var Ns=(t=>(t.UNKNOWN="unknown",t.NON_SUBSCRIBER="non_subscriber",t.SUBSCRIBER="subscriber",t.PAST_SUBSCRIBER="past_subscriber",t))(Ns||{}),ys=(t=>(t.IMPRESSION_PAYWALL="paywall",t.IMPRESSION_AD="ad_shown",t.IMPRESSION_OFFERS="offers_shown",t.ACTION_SUBSCRIPTIONS_LANDING_PAGE="subscriptions_landing_page",t.ACTION_OFFER_SELECTED="offer_selected",t.ACTION_PAYMENT_FLOW_STARTED="payment_flow_start",t.ACTION_PAYMENT_COMPLETED="payment_complete",t.EVENT_CUSTOM="custom",t))(ys||{});const vs={[ys.IMPRESSION_PAYWALL]:o.IMPRESSION_PAYWALL,[ys.IMPRESSION_AD]:o.IMPRESSION_AD,[ys.IMPRESSION_OFFERS]:o.IMPRESSION_OFFERS,[ys.ACTION_SUBSCRIPTIONS_LANDING_PAGE]:o.ACTION_SUBSCRIPTIONS_LANDING_PAGE,[ys.ACTION_OFFER_SELECTED]:o.ACTION_OFFER_SELECTED,[ys.ACTION_PAYMENT_FLOW_STARTED]:o.ACTION_PAYMENT_FLOW_STARTED,[ys.ACTION_PAYMENT_COMPLETED]:o.ACTION_PAYMENT_COMPLETE,[ys.EVENT_CUSTOM]:o.EVENT_CUSTOM},Ps={[o.UNKNOWN]:null,[o.IMPRESSION_PAYWALL]:ys.IMPRESSION_PAYWALL,[o.IMPRESSION_AD]:ys.IMPRESSION_AD,[o.IMPRESSION_OFFERS]:ys.IMPRESSION_OFFERS,[o.IMPRESSION_SUBSCRIBE_BUTTON]:null,[o.IMPRESSION_SMARTBOX]:null,[o.ACTION_SUBSCRIBE]:null,[o.ACTION_PAYMENT_COMPLETE]:ys.ACTION_PAYMENT_COMPLETED,[o.ACTION_ACCOUNT_CREATED]:null,[o.ACTION_ACCOUNT_ACKNOWLEDGED]:null,[o.ACTION_SUBSCRIPTIONS_LANDING_PAGE]:ys.ACTION_SUBSCRIPTIONS_LANDING_PAGE,[o.ACTION_PAYMENT_FLOW_STARTED]:ys.ACTION_PAYMENT_FLOW_STARTED,[o.ACTION_OFFER_SELECTED]:ys.ACTION_OFFER_SELECTED,[o.EVENT_PAYMENT_FAILED]:null,[o.EVENT_CUSTOM]:ys.EVENT_CUSTOM},Ls={[fs.EVENT_SHOWCASE_METER_OFFERED]:[o.EVENT_HAS_METERING_ENTITLEMENTS,o.EVENT_OFFERED_MET
1ER],[fs.EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION]:[o.EVENT_UNLOCKED_BY_SUBSCRIPTION],[fs.EVENT_SHOWCASE_UNLOCKED_BY_METER]:[o.EVENT_HAS_METERING_ENTITLEMENTS,o.EVENT_UNLOCKED_BY_METER],[fs.EVENT_SHOWCASE_UNLOCKED_FREE_PAGE]:[o.EVENT_UNLOCKED_FREE_PAGE],[fs.EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL]:[o.EVENT_NO_ENTITLEMENTS,o.IMPRESSION_REGWALL,o.IMPRESSION_SHOWCASE_REGWALL],[fs.EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL]:[o.EVENT_NO_ENTITLEMENTS,o.IMPRESSION_PAYWALL],[fs.EVENT_SHOWCASE_INELIGIBLE_PAYWALL]:[o.EVENT_INELIGIBLE_PAYWALL,o.EVENT_NO_ENTITLEMENTS]},Gs={[o.IMPRESSION_REGWALL]:a.LOCKED_REGWALL,[o.EVENT_UNLOCKED_BY_METER]:a.UNLOCKED_METER,[o.EVENT_UNLOCKED_BY_SUBSCRIPTION]:a.UNLOCKED_SUBSCRIBER,[o.EVENT_UNLOCKED_FREE_PAGE]:a.UNLOCKED_FREE,[o.IMPRESSION_PAYWALL]:a.LOCKED_PAYWALL,[o.EVENT_INELIGIBLE_PAYWALL]:a.INELIGIBLE_PAYWALL};function Ms(t,s,i,e){return{eventCategory:t,eventAction:s,eventLabel:i,nonInteraction:e}}const ks={[o.IMPRESSION_OFFERS]:Ms("NTG paywall","paywall modal impression","",!0),[o.IMPRESSION_CONTRIBUTION_OFFERS]:Ms("NTG membership","offer impressions","",!0),[o.ACTION_OFFER_SELECTED]:Ms("NTG paywall","click","",!1),[o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK]:Ms("NTG subscription","marketing modal click","",!1),[o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT]:Ms("NTG subscription","marketing modal impression","",!0),[o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK]:Ms("NTG membership","marketing modal click","",!1),[o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT]:Ms("NTG membership","membership modal impression","",!0),[o.IMPRESSION_NEWSLETTER_OPT_IN]:Ms("NTG newsletter","newsletter modal impression","",!0),[o.EVENT_NEWSLETTER_OPTED_IN]:Ms("NTG newsletter","newsletter signup","success",!1),[o.IMPRESSION_BYOP_NEWSLETTER_OPT_IN]:Ms("NTG newsletter","newsletter modal impression","",!0),[o.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT]:Ms("NTG newsletter","newsletter signup","success",!1),[o.IMPRESSION_REGWALL_OPT_IN]:Ms("NTG account","registration modal impression","",!0),[o.EVENT_REGWALL_OPTED_IN]:Ms("NTG account","registration","success",!1),[o.ACTION_SURVEY_DATA_TRANSFER]:Ms("","survey submission","",!1),[o.IMPRESSION_BYO_CTA]:Ms("","custom cta modal impression","",!0),[o.ACTION_BYO_CTA_BUTTON_CLICK]:Ms("","custom cta click","",!1)},Ds={[o.ACTION_PAYMENT_COMPLETE]:Ms("NTG subscription","submit","success",!1)},Us={[o.ACTION_PAYMENT_COMPLETE]:Ms("NTG membership","submit","success",!1)};function xs(t){return vs[t]}function Fs(t){return"[object Object]"===Object.prototype.toString.call(t)}function Bs(t,s){return Object.values(t).includes(s)}function Vs(t){return"function"==typeof t}function Ws(t){return"boolean"==typeof t}const zs={0:"unknown",1:"pop up",2:"inline"};class js{constructor(t){this.bs=t,this.Rs=t.eventManager()}start(){this.Rs.registerEventListener(this.As.bind(this))}As(t,s){var i,e,n,r,o,h;const a=js.isGaEligible(this.bs),l=js.isGtagEligible(this.bs),u=js.isGtmEligible(this.bs);if(!(a||l||u))return;const{ga:c,gtag:d,dataLayer:g}=this.bs.win(),p=(null==(i=t.additionalParameters)?void 0:i.subscriptionFlow)||(null==(n=null==(e=t.additionalParameters)?void 0:e.getSubscriptionFlow)?void 0:n.call(e))||"";let E=function(t,s){if(!t)return;let i;
1return s===ws.SUBSCRIBE?i=Ds[t]:s===ws.CONTRIBUTE&&(i=Us[t]),i||ks[t]}(t.eventType,p);if(!E)return;const _=(null==s?void 0:s.googleAnalyticsParameters)||{},m=(null==(o=null==(r=t.additionalParameters)?void 0:r.getCtaMode)?void 0:o.call(r))||(null==(h=t.additionalParameters)?void 0:h.ctaMode)||null;if(null!=m&&(_.cta_mode=zs[m]),E={...E,eventCategory:_.event_category||E.eventCategory,eventLabel:_.event_label||E.eventLabel},a&&c("send","event",E),l){const t={event_category:E.eventCategory,event_label:E.eventLabel,non_interaction:E.nonInteraction,..._};d("event",E.eventAction,t)}u&&g.push({event:E.eventAction,event_category:E.eventCategory,event_label:E.eventLabel,non_interaction:E.nonInteraction,configurationId:t.configurationId||"",..._})}static isGaEligible(t){return Vs(t.win().ga)}static isGtagEligible(t){return Vs(t.win().gtag)}static isGtmEligible(t){var s;return Vs(null==(s=t.win().dataLayer)?void 0:s.push)}}async function Ys(t,s,i,e,n,r){const h=await async function(t,s,i,e,n){const r=function(t,s,i){var e;return!!(js.isGaEligible(s)||js.isGtagEligible(s)||js.isGtmEligible(s))&&(null==(e=t.getSurveyQuestionsList())||e.map(t=>{var e;const n={eventType:o.ACTION_SURVEY_DATA_TRANSFER,eventOriginator:u.SWG_CLIENT,isFromUserAction:!0,additionalParameters:{ctaMode:i}};null==(e=t.getSurveyAnswersList())||e.map(i=>{const e={googleAnalyticsParameters:{survey_question:t.getQuestionText()||"",survey_question_category:t.getQuestionCategory()||"",survey_answer:i.getAnswerText()||"",survey_answer_category:i.getAnswerCategory()||"",content_id:t.getQuestionCategory()||"",content_group:t.getQuestionText()||"",content_type:i.getAnswerText()||"",event_category:t.getQuestionCategory()||"",event_label:i.getAnswerText()||""}};s.eventManager().logEvent(n,e)})}),!0)}(t,i,e),h=await async function(t,s,i){if(!i)return!1;try{const e={...Ks(t),...qs(t)};return await i({configurationId:s,data:e})}catch(e){return ut("[swg.js] Exception in publisher provided logging callback: ".concat(e)),!1}}(t,s,n);return h||r}(t,e,s,n,r);h?s.eventManager().logSwgEvent(o.EVENT_SURVEY_DATA_TRANSFER_COMPLETE,!0,Hs(n)):s.eventManager().logSwgEvent(o.EVENT_SURVEY_DATA_TRANSFER_FAILED,!1,Hs(n));const a=new W;t.getStorePpsInLocalStorage()&&await async function(t,s){var i,e;const n=rt.PPS_TAXONOMIES,r=t.getSurveyQuestionsList().flatMap(t=>t.getSurveyAnswersList()).map(t=>null==t?void 0:t.getPpsValue()).filter(t=>null!==t),o=await s.storage().get(n,!0);let h=[];try{const t=null==(e=null==(i=JSON.parse(o))?void 0:i[1])?void 0:e.values;h=Array.isArray(t)?t:[]}catch{}const a=Array.from(new Set(r.concat(h))),l={[X]:{values:a}};await Promise.resolve(s.storage().set(n,JSON.stringify(l),!0))}(t,s),a.setSuccess(h),i.execute(a)}function Ks(t){var s;return{he:t.getStorePpsInLocalStorage(),ae:(null==(s=t.getSurveyQuestionsList())?void 0:s.map(t=>{var s;return{le:t.getQuestionId(),ue:t.getQuestionText(),ce:t.getQuestionCategory(),ge:(null==(s=t.getSurveyAnswersList())?void 0:s.map(t=>({ie:t.getAnswerId(),ne:t.getAnswerText(),re:t.getAnswerCategory(),oe:t.getPpsValue()})))||[]}}))||[]}}function qs(t){var s;return{answers:(null==(s=t.getSurveyQuestionsList())?void 0:s.map(t=>{var s;return{questionText:t.getQuestionText(),questionCategory:t.getQuestionCategory(),surveyAnswers:(null==(s=t.getSurveyAnswersList())?void 0:s.map(t=>({answerText:t.getAnswerText(),answerCategory:t.getAnswerCategory()})))||[]}}))||[]}}function Hs(t){const s=new A;return s.setCtaMode(t),s}function Js(t){const s=new Uint8Array(t.length);for(let i=0;i<t.length;i++){const e=t.charCodeAt(i);ct(e<=255,"Characters must be in range [0,255]"),s[i]=e}return s}function Xs(t){const s=new Array(t.length);for(let i=0;i<t.length;i++)s[i]=String.fromCharCode(t[i]);return s.join("")}function $s(t){if("undefined"!=typeof TextDecoder)return new TextDecoder("utf-8").decode(t);const s=Xs(new Uint8Array(t));return decodeURIComponent(escape(s))}function Qs(t){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(t):Js(unescape(encodeURIComponent(t)))}function Zs(t){return Js(atob(t.replaceAll("-","+").replaceAll("_","/")))}function ti(t){const s=Xs(t);return btoa(s).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function si(t,s){try{return JSON.parse(t)}catch(i){return void(s&&s(i))}}function ii(t,s){const i=si(t);return null==i?void 0:i[s]}class ei{constructor(){}decode(t){return this.$s(t).payload}$s(t){function s(){throw new Error('Invalid token: "'.concat(t,'"'))}const i=t.split(".");3!=i.length&&s();const e=Zs(i[0]),n=Zs(i[1]);return{header:si($s(e),s),payload:si($s(n),s),verifiable:"".concat(i[0],".").concat(i[1]),sig:i[2]}}}class ni{constructor(t,s,i,e,n,r,o=null,h=null,a=null,l=null){this.raw=t,this.purchaseData=s,this.userData=i,this.entitlements=e,this.productType=n,this.Qs=r,this.oldSku=o,this.swgUserToken=h,this.paymentRecurrence=a,this.requestMetadata=l}clone(){return new ni(this.raw,this.purchaseData,this.userData,this.entitlements,this.productType,this.Qs,this.oldSku,this.swgUserToken)}json(){return{purchaseData:this.purchaseData.json(),userData:this.userData?this.userData.json():null,entitlements:this.entitlements?this.entitlements.json():null,oldSku:this.oldSku,productType:this.productType,swgUserToken:this.swgUserToken}}complete(){return this.Qs()}}class ri{constructor(t,s){this.raw=t,this.signature=s,this.data=t}clone(){return new ri(this.raw,this.signature)}json(){return{data:this.raw,signature:this.signature}}}class oi{constructor(t,s){this.idToken=t,this.data=s,this.id=s.sub,this.email=s.email,this.emailVerified=s.email_verified,this.name=s.name,this.givenName=s.given_name,this.familyName=s.family_name,this.pictureUrl=s.picture}clone(){return new oi(this.idToken,this.data)}json(){return{id:this.id,email:this.email,emailVerified:this.emailVerified,name:this.name,givenName:this.givenName,fam
1ilyName:this.familyName,pictureUrl:this.pictureUrl}}}const hi={IMMEDIATE_WITH_TIME_PRORATION:1};function ai(t,s,i=null){const e=new A;return e.setSku(t),null!=i&&e.setSubscriptionFlow(i),e.setCtaMode(s?h.CTA_MODE_INLINE:h.CTA_MODE_POPUP),e}class li{constructor(t,s,i=Ts.SUBSCRIPTION,e=!1,n=""){this.bs=t,this.Zs=s,this.ti=i,this.si=e,this.ii=n,this.ei=t.payClient(),this.ni=t.pageConfig(),this.ri=t.analytics(),this.Rs=t.eventManager(),this.oi=t.clientConfigManager()}async start(){const t=await this.oi.getClientConfig();ci.isInlineCta=this.si,ci.inlineConfigId=this.ii,this.ai(t.useUpdatedOfferFlows,t.paySwgVersion)}ai(t,s){const i={skuId:this.Zs.skuId,publicationId:this.ni.getPublicationId()};if(s&&(i.swgVersion=s),this.Zs.oldSku){i.oldSku=this.Zs.oldSku;const t=this.Zs.replaceSkuProrationMode;i.replaceSkuProrationMode=t?hi[t]:hi.IMMEDIATE_WITH_TIME_PRORATION,this.ri.setSku(i.oldSku)}this.Zs.oneTime&&(i.paymentRecurrence=2),this.Zs.metadata&&(i.metadata=this.Zs.metadata);let e=ws.SUBSCRIBE;this.ti==Ts.UI_CONTRIBUTION?e=ws.CONTRIBUTE:this.ti==Ts.TIME_BOUND_PASS&&(e=ws.TIME_BOUND_PASS),this.bs.callbacks().triggerFlowStarted(e,this.Zs),this.Rs.logSwgEvent(o.ACTION_PAYMENT_FLOW_STARTED,!0,ai(i.skuId,this.si)),this.Rs.logSwgEvent(t?o.ACTION_PAY_PAYMENT_FLOW_STARTED:o.ACTION_PLAY_PAYMENT_FLOW_STARTED,!0,ai("",this.si)),ci.waitingForPayClient=!0,this.ei.start({apiVersion:1,allowedPaymentMethods:["CARD"],environment:Ot().payEnv,playEnvironment:Ot().playEnv,swg:i,i:{startTimeMs:Date.now(),productType:this.ti}},{forceRedirect:this.bs.config().windowOpenMode==bs.REDIRECT,forceDisableNative:"2"==s})}}const ui=class t{constructor(t){this.bs=t,this.li=null,this.ui=null,this.T=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.Rs=t.eventManager(),this.oi=t.clientConfigManager()}static configurePending(s){const i=s.eventManager();s.payClient().onResponse(async e=>{s.entitlementsManager().blockNextNotification();const n=new t(s),r=async function(t,s,i){const e=!ci.waitingForPayClient;ci.waitingForPayClient=!1;const n=await s;let r,h=o.UNKNOWN;if("object"==typeof n&&n.googleTransactionId){const s=t.analytics().getTransactionId(),i=n.googleTransactionId;e?(t.analytics().setTransactionId(i),h=o.EVENT_GPAY_CANNOT_CONFIRM_TX_ID):s===i?h=o.EVENT_CONFIRM_TX_ID:(r=new A,r.setGpayTransactionId(i),h=o.EVENT_CHANGED_TX_ID)}else r=new A,r.setHadLogged(!e),h=o.EVENT_GPAY_NO_TX_ID;return t.eventManager().logSwgEvent(h,!0,r),function(t,s,i){var e;let n=null,r=null,o=Ts.SUBSCRIPTION,h=null,a=null,l=null;if(s)if("string"==typeof s)r=s;else{const t=s;if(t.swgCallbackData?n=t.swgCallbackData:t.integratorClientCallbackData&&(r=t.integratorClientCallbackData),s.paymentRequest){const t=s.paymentRequest.swg||{};h=t.oldSku,a=t.paymentRecurrence,l=t.metadata,o=(null==(e=s.paymentRequest.i)?void 0:e.productType)||Ts.SUBSCRIPTION}else s.productType&&(o=s.productType)}if(r&&!n&&(r=atob(r),r)&&(n=JSON.parse(r).swgCallbackData),!n)throw new Error("unexpected payment response");return r=JSON.stringify(n),new ni(r,function(t){const s=t.purchaseData,i=t.purchaseDataSignature;return new ri(s,i)}(n),function(t){const s=t.idToken;if(!s)return null;const i=(new ei).decode(s);return new oi(s,i)}(n),function(t,s){return s.signedEntitlements?t.entitlementsManager().parseEntitlements(s):null}(t,n),o,i,h,n.swgUserToken,a,l)}(t,n,i)}(s,e,n.complete.bind(n));s.callbacks().triggerPaymentResponse(r);try{const e=await r,h=di(e.purchaseData);if(s.analytics().setSku(h||""),i.logSwgEvent(o.ACTION_PAYMENT_COMPLETE,!0,ai(h||"",t.isInlineCta,e.productType==Ts.UI_CONTRIBUTION?ws.CONTRIBUTE:e.productType==Ts.TIME_BOUND_PASS?ws.TIME_BOUND_PASS:ws.SUBSCRIBE)),(await s.clientConfigManager().getClientConfig()).useUpdatedOfferFlows&&i.logSwgEvent(o.EVENT_PAY_PAYMENT_COMPLETE,!0,ai("",t.isInlineCta)),e.productType==Ts.UI_CONTRIBUTION)i.logSwgEvent(o.EVENT_CONTRIBUTION_PAYMENT_COMPLETE,!0,ai(h||"",t.isInlineCta,ws.CONTRIBUTE));else if(e.productType==Ts.SUBSCRIPTION){const s=e.oldSku,n=s&&s.length>0?o.EVENT_SUBSCRIPTION_PLAN_CHANGE_COMPLETE:o.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE;i.logSwgEvent(n,!0,ai(h||"",t.isInlineCta,ws.SUBSCRIBE))}else e.productType==Ts.TIME_BOUND_PASS&&i.logSwgEvent(o.EVENT_TIME_BOUND_PASS_PAYMENT_COMPLETE,!0,ai(h||"",t.isInlineCta,ws.TIME_BOUND_PASS));n.start(e)}catch(h){const i=h;if(!es(i))throw s.eventManager().logSwgEvent(o.EVENT_PAYMENT_FAILED,!1,ai("",t.isInlineCta)),s.jserror().error("Pay failed",i),i;{const e=i.productType;let n=ws.SUBSCRIBE;e==Ts.UI_CONTRIBUTION?n=ws.CONTRIBUTE:e==Ts.TIME_BOUND_PASS&&(n=ws.TIME_BOUND_PASS),s.callbacks().triggerFlowCanceled(n),s.eventManager().logSwgEvent(o.ACTION_USER_CANCELED_PAYFLOW,!0,ai("",t.isInlineCta))}}})}async start(s){var i;this.T=di(s.purchaseData),this.Rs.logSwgEvent(o.IMPRESSION_ACCOUNT_CHANGED,!0,ai(this.T||"",t.isInlineCta)),this.bs.entitlementsManager().reset(!0);const e={publicationId:this.bs.pageConfig().getPublicationId(),productType:s.productType,isSubscriptionUpdate:!!s.oldSku,isOneTime:!!s.paymentRecurrence};s.userData&&s.entitlements?(e.idToken=s.userData.idToken,this.bs.entitlementsManager().pushNextEntitlements(s.entitlements.raw),s.swgUserToken&&this.bs.storage().set($,s.swgUserToken,!0)):e.loginHint=null==(i=s.userData)?void 0:i.email;const n={};this.oi.shouldForceLangInIframes()&&(n.hl=this.oi.getLanguage()),t.isInlineCta&&(n.ctaMode="CTA_MODE_INLINE");const r=Pt("/payconfirmiframe",n),h=await this.oi.getClientConfig();if(e.useUpdatedConfirmUi=h.useUpdatedOfferFlows,e.skipAccountCreationScreen=h.skipAccountCreationScreen,this.li=new us(this.Os,this.Ns,r,Lt(e),this.oi.getLanguage(),!0),this.li.on(S,this.di.bind(this)),t.isInlineCta){const s=this.gi(t.inlineConfigId);if(!s)return;s.firstChild&&s.removeChild(s.firstChild),as(this.li.getElement(),{width:"100%"}),s.appendChild(this.li.getElement()),this.ui=this.li.init()}else this.li.acceptResult().then(()=>{this.ci.completeView(this.li)}),this.ui=this.ci.openView(this.li);this.ui.then(()=>{this.bs.callbacks().triggerPayConfirmOpened(this.li)})}di(t){const s=t.getJwt();s&&this.bs.entitlementsManager().pushNextEntitlements(s)}gi(t){var s;if(!t)return null;const i=Array.from(this.Os.document.querySelectorAll("div[rrm-inline-cta]"));if(0===i.length)return null;for(const e of i)if(t===(null==(s=e.getAttribute("rrm-inline-cta"))?void 0:s.trim().replace(/['"“”‘’]/g,"")))return e;return null}async complete(){this.Rs.logSwgEvent(o.ACTION_ACCOUNT_CREATED,!0,ai(this.T||"",t.isInlineCta));const s=Date.now().toString();this.bs.storage().set(Q,s,!1),this.bs.entitlementsManager().unblockNextNotification();const i=await this.oi.getClientConfig();if(await this.ui,!i.skipAccountCreationScreen){const t=new d;t.setComplete(!0),this.li.execute(t)}try{await this.li.acceptResult()}catch{}i.skipAccountCreationScreen||this.Rs.logSwgEvent(o.ACTION_ACCOUNT_ACKNOWLEDGED,!0,ai(this.T||"",t.isInlineCta)),this.bs.entitlementsManager().setToastShown(!0)}};ui.waitingForPayClient=!1,ui.isInlineCta=!1,ui.inlineConfigId="";let ci=ui;function di(t){return ii(t.raw,"productId")||null}let gi=null;function pi(t){if(!gi){gi={};let i="enable-pub-id-suffix-for-storage-key";try{const s=_t(t.location.hash)["swg.experiments"];s&&(i+=","+s)}catch(s){rs.throwAsync(s)}for(let e of i.split(","))if(e=e.trim(),e)try{Ei(t,gi,e)}catch(s){rs.throwAsync(s)}}return gi}function Ei(t,s,i){let e,n,r=!1;const o=i.indexOf(":");if(-1==o?(e=i,n=100,r=!1):(e=i.substring(0,o).trim(),"c"==(i=i.substring(o+1)).substring(i.length-1)&&(r=!0,i=i.substring(0,i.length-1)),n=parseInt(i,10)),isNaN(n))throw new Error("invalid fraction");let h;if(n>99)h=!0;else if(n<1)h=!1;else if(t.sessionStorage){r=r&&n<=20;try{const s="subscribe.google.com:e:"+e+":"+n+(r?"c":"");let i="e"==(a=t.sessionStorage.getItem(s))?"e":"c"==a?"c":null;!i&&100*Math.random()<=n*(r?2:1)&&(i=!r||Math.random()<=.5?"e":"c",t.sessionStorage.setItem(s,i)),h=!!i,"c"==i&&(e="c-"+e)}catch(l){h=!1,rs.throwAsync(l)}}else h=!1;var a;s[e]=h}function _i(t,s){return pi(t)[s]||!1}function mi(t,s,i){pi(t)[s]=i}function fi(t){const s=pi(t),i=[];for(const e in s)s[e]&&i.push(e);return i}const wi="subscribe.google.com";class Ii{constructor(t,s){this.Os=t,this.ni=s,this.pi={}}async get(t,s=!1){const i=this.Ei(t),e=this._i(t),n=await this.mi(e,s);return null!==n?n:this.mi(i,s)}mi(t,s){return this.pi[t]||(this.pi[t]=new Promise(i=>{const e=s?this.Os.localStorage:this.Os.sessionStorage;if(e)try{i(e.getItem(t))}catch{i(null)}else i(null)})),this.pi[t]}async set(t,s,i=!1){const e=this.Ei(t),r=this._i(t);return null!==await this.mi(r,i)||_i(this.Os,n.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY)?(await this.fi(e,i),this.wi(r,s,i)):this.wi(e,s,i)}wi(t,s,i){return this.pi[t]=Promise.resolve(s),new Promise(e=>{const n=i?this.Os.localStorage:this.Os.sessionStorage;if(n)try{n.setItem(t,s)}catch{}e()})}async remove(t,s=!1){const i=this.Ei(t),e=this._i(t);return null!==await this.mi(e,s)||_i(this.Os,n.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY)?this.fi(e,s):this.fi(i,s)}fi(t,s){return delete this.pi[t],new Promise(i=>{const e=s?this.Os.localStorage:this.Os.sessionStorage;if(e)try{e.removeItem(t)}catch{}i()})}Ei(t){return wi+":"+t}_i(t){if(Object.values(rt).includes(t))return this.Ei(t);const s=this.ni.getPublicationId();return wi+":"+t+":"+s}}function bi(t){const s=Date.now()-12096e5;let i=0;for(;i<t.length&&!(t[i]>=s);i++);return t.slice(i)}const Ti="CTA_MODE_INLINE";function Ri(t,s,i){let e;switch(t){case"TYPE_REGISTRATION_WALL":e={flavor:"basic"};break;case"TYPE_NEWSLETTER_SIGNUP":e={flavor:"custom",customText:os($t,s)};break;default:return}new Os(i,Pt("/toastiframe",e)).open()}function Si(t,s,i,e="",n=!1,r){var o;if(!t.useUpdatedOfferFlows)return Pt("/contributionsiframe");const h={publicationId:i.getPublicationId()};return s.shouldForceLangInIframes()&&(h.hl=s.getLanguage()),(null==(o=t.uiPredicates)?void 0:o.purchaseUnavailableRegion)&&(h.purchaseUnavailableRegion="true"),n&&(h.ctaMode=Ti),e&&(h.configurationId=e),r&&(h.origin=r),Pt("/contributionoffersiframe",h)}function Ai(t,s,i=!1,e=""){const n=s.getSku(),r=s.getOneTime();if(n){const s={skuId:n};r&&(s.oneTime=r),i?t.analytics().addLabels([Ti]):t.analytics().removeLabels([Ti]),new li(t,s,Ts.UI_CONTRIBUTION,i,e).start()}}function Ci(t,s,i,e,n="",r=!1,o){var h;if(!t.useUpdatedOfferFlows){const t=_t(e)["swg.newoffercard"];return Pt("/offersiframe",t?{useNewOfferCard:t}:{})}const a={publicationId:i.getPublicationId()};return s.shouldForceLangInIframes()&&(a.hl=s.getLanguage()),(null==(h=t.uiPredicates)?void 0:h.purchaseUnavailableRegion)&&(a.purchaseUnavailableRegion="true"),r&&(a.ctaMode=Ti),n&&(a.configurationId=n),o&&(a.origin=o),Pt("/subscriptionoffersiframe",a)}function Oi(t,s,i=!1,e=""){const n=s.getSku();if(n){const r={skuId:n},a=s.getOneTime();a&&(r.oneTime=a);const l=s.getOldSku();l&&(r.oldSku=l,t.analytics().setSku(l)),i?t.analytics().addLabels([Ti]):t.analytics().removeLabels([Ti]),t.eventManager().logSwgEvent(o.ACTION_OFFER_SELECTED,!0,function(t,s){const i=new A;return i.setSku(t),i.setCtaMode(s?h.CTA_MODE_INLINE:h.CTA_MODE_POPUP),i}(n,i)),new li(t,r,Ts.SUBSCRIPTION,i,e).start()}}function Ni(t,s){s.getNative()&&t.callbacks().triggerSubscribeRequest()}async function yi(t){const s=t.storage(),i=await s.get("tsp",!0);if(!i)return{};let e;try{e=JSON.parse(i)}catch{return t.eventManager().logSwgEvent(o.EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR),{}}return function(t){return t instanceof Object&&!(t instanceof Array)&&Object.values(Object.values(t).map(t=>3===Object.keys(t).length&&t.impressions.every(t=>!isNaN(t))&&t.dismissals.every(t=>!isNaN(t))&&t.completions.every(t=>!isNaN(t)))).every(Boolean)}(e)?Object.entries(e).reduce((t,[s,i])=>({...t,[s]:{impressions:bi(i.impressions),dismissals:bi(i.dismissals),completions:bi(i.completions)}}),{}):(t.eventManager().logSwgEvent(o.EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR),{})}function vi(t,s,i){var e;if(t.type===ht.TYPE_REWARDED_SURVEY)return!!(js.isGaEligible(s)||js.isGtagEligible(s)||js.isGtmEligible(s))&&!((null==(e=i[t.configurationId]||i[ht.TYPE_REWARDED_SURVEY])?void 0:e.completions)||[]).length;if(t.type===ht.TYPE_REWARDED_AD)if(t.preference===Ss.PREFERENCE_ADSENSE_REWARDED_AD){const t=s.win().adsbygoogle;if(!(null==t?void 0:t.loaded))return s.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_ADSENSE_FILTERED),!1}else{const t=s.win().googletag;if(!(null==t?void 0:t.getVersion()))return s.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GPT_FILTERED),!1}return!0}const Pi=[ht.TYPE_BYO_CTA,ht.TYPE_REGISTRATION_WALL,ht.TYPE_NEWSLETTER_SIGNUP,ht.TYPE_REWARDED_AD,ht.TYPE_REWARDED_SURVEY],Li={[cs.SUBSCRIPTION]:Ts.SUBSCRIPTION,[cs.SUBSCRIPTION_LARGE]:Ts.SUBSCRIPTION,[cs.CONTRIBUTION]:Ts.UI_CONTRIBUTION,[cs.CONTRIBUTION_LARGE]:Ts.UI_CONTRIBUTION},Gi=Ts.SUBSCRIPTION,Mi=/{EMAIL}/g;class ki{constructor(t,s){var i,e,n;this.bs=t,this.j=s,this.ti=s.autoPromptType?Li[s.autoPromptType]:Gi,this.ci=t.dialogManager(),this.Ii=t.entitlementsManager(),this.oi=t.clientConfigManager(),this.fetcher=new Es(t.win()),this.rewardedSlotReadyHandler=this.rewardedSlotReady.bind(this),this.rewardedSlotClosedHandler=this.rewardedSlotClosed.bind(this),this.rewardedSlotGrantedHandler=this.rewardedSlotGranted.bind(this),this.slotRenderEndedHandler=this.slotRenderEnded.bind(this);const r=function(t,s,i){const e=t===ht.TYPE_REGISTRATION_WALL,n=!!i||!!(null==s?void 0:s.isConnectionExpected());return e&&n?"GIS_MODE_OVERLAY":"GIS_MODE_DISABLED"}
1(this.j.action,this.bs.gisInteropManager(),null==(n=null==(e=(i=this.bs).config)?void 0:e.call(i))?void 0:n.gisInterop),o={origin:Et(t.win().location.href).origin,configurationId:this.j.configurationId||"",isClosable:(!!s.isClosable).toString(),calledManually:s.calledManually.toString(),previewEnabled:(!!s.shouldRenderPreview).toString(),gisMode:r};this.oi.shouldForceLangInIframes()&&(o.hl=this.oi.getLanguage()),this.j.onAlternateAction&&(o.onaa="true"),this.j.onSignIn&&(o.onsi="true"),this.li=new us(t.win(),t.activities(),Pt(Tt[s.action],o),Lt({supportsEventManager:!0,productType:this.ti,windowHeight:t.win().innerHeight}),this.oi.getLanguage(),!0),s.shouldRenderPreview&&s.action!==ht.TYPE_BYO_CTA&&as(this.li.getElement(),{"pointer-events":"none"}),r!==_s.GisModeDisabled&&(this.gisLoginFlow=new gs(this.bs,this.li,this.j.configurationId))}start(){return this.li.on(w,t=>this.bi(t)),this.li.on(V,t=>Ys(t,this.bs,this.li,this.j.configurationId,h.CTA_MODE_POPUP,this.j.onResult)),this.li.on(g,this.Ti.bind(this)),this.li.on(L,this.handleRewardedAdLoadAdRequest.bind(this)),this.li.on(M,this.handleRewardedAdViewAdRequest.bind(this)),this.li.on(P,this.handleRewardedAdAlternateActionRequest.bind(this)),this.li.onCancel(()=>{var t,s,i;null==(s=(t=this.j).onCancel)||s.call(t),this.cleanUpGoogletag(),null==(i=this.disposeAd)||i.call(this)}),this.ci.openView(this.li,!1,{shouldDisableBodyScrolling:!0,closeOnBackgroundClick:!!this.j.isClosable})}async bi(t){var s,i,e;const{onResult:n,configurationId:r}=this.j;this.ci.completeView(this.li),null==(s=this.gisLoginFlow)||s.dispose();const o=t.getSwgUserToken();await this.Ii.updateEntitlements(o),null==(i=this.bs.gisInteropManager())||i.redirectOk(),this.isOptIn(this.j.action)&&n&&n({configurationId:r,data:{email:t.getUserEmail(),displayName:t.getDisplayName(),givenName:t.getGivenName(),familyName:t.getFamilyName(),termsAndConditionsConsent:t.getTermsAndConditionsConsent()}}),this.j.suppressToast||(t.getActionCompleted()?this.Ri(null!=(e=t.getUserEmail())?e:""):t.getAlreadyCompleted()?Ri(this.j.action,this.oi.getLanguage(),this.bs):this.Si())}Ri(t){const s=this.oi.getLanguage();let i="";switch(this.j.action){case ht.TYPE_REGISTRATION_WALL:i=os(zt,s).replace(Mi,t);break;case ht.TYPE_NEWSLETTER_SIGNUP:i=os(jt,s).replace(Mi,t);break;default:return}new Os(this.bs,Pt("/toastiframe",{flavor:"custom",customText:i})).open()}isOptIn(t){return t===ht.TYPE_NEWSLETTER_SIGNUP||t===ht.TYPE_REGISTRATION_WALL}Si(){const t=this.oi.getLanguage();let s="";switch(this.j.action){case ht.TYPE_REGISTRATION_WALL:s=os(Yt,t);break;case ht.TYPE_NEWSLETTER_SIGNUP:s=os(Kt,t);break;default:return}new Os(this.bs,Pt("/toastiframe",{flavor:"custom",customText:s})).open()}Ti(t){this.j.onSignIn?this.j.onSignIn():t.getSubscriberOrMember()&&this.bs.callbacks().triggerLoginRequest({linkRequested:!1})}handleRewardedAdLoadAdRequest(t){if(this.j.preference===Ss.PREFERENCE_ADSENSE_REWARDED_AD){const t=this.bs.win().adsbygoogle;if(!t)return this.bs.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_ADSENSE_MISSING_ERROR),void this.sendRewardedAdLoadAdResponse(!1);null==t||t.push({params:{google_adtest:Rt("google_adtest",this.bs),google_tag_origin:"rrm",google_reactive_ad_format:11,google_wrap_fullscreen_ad:!0,google_video_play_muted:!1,google_acr:this.showASRewardedAd.bind(this)}})}else{const s=this.bs.win().googletag;if(!s)return this.bs.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GPT_MISSING_ERROR),void this.sendRewardedAdLoadAdResponse(!1);s.cmd.push(()=>this.setUpRewardedAd(t.getAdUnit()))}this.rewardedAdTimeout=setTimeout(this.handleRewardedAdLoadAdRequestTimeout.bind(this),5e3)}handleRewardedAdLoadAdRequestTimeout(){this.bs.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GPT_ERROR),this.sendRewardedAdLoadAdResponse(!1)}showASRewardedAd(t){clearTimeout(this.rewardedAdTimeout),(null==t?void 0:t.show)||(this.bs.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_NOT_FILLED),this.sendRewardedAdLoadAdResponse(!1)),this.showRewardedAd=()=>t.show(this.handleASRewardedAdResult.bind(this)),this.disposeAd=null==t?void 0:t.disposeAd,this.sendRewardedAdLoadAdResponse(!0)}async handleASRewardedAdResult(t){var s,i;"viewed"===t.status?await this.rewardedAdGrant(null==(s=null==t?void 0:t.reward)?void 0:s.amount,null==(i=null==t?void 0:t.reward)?void 0:i.type):this.rewardedSlotClosed()}setUpRewardedAd(t){const s=this.bs.win().googletag;if(this.rewardedAdSlot=s.defineOutOfPageSlot(t,s.enums.OutOfPageFormat.REWARDED),!this.rewardedAdSlot)return this.bs.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_PAGE_ERROR),void this.sendRewardedAdLoadAdResponse(!1);const i=s.pubads();this.rewardedAdSlot.addService(i),i.addEventListener("rewardedSlotReady",this.rewardedSlotReadyHandler),i.addEventListener("rewardedSlotClosed",this.rewardedSlotClosedHandler),i.addEventListener("rewardedSlotGranted",this.rewardedSlotGrantedHandler),i.addEventListener("slotRenderEnded",this.slotRenderEndedHandler),s.enableServices(),s.display(this.rewardedAdSlot),i.refresh([this.rewardedAdSlot])}rewardedSlotReady(t){clearTimeout(this.rewardedAdTimeout),this.showRewardedAd=t.makeRewardedVisible,this.sendRewardedAdLoadAdResponse(!0)}rewardedSlotClosed(){var t,s;this.cleanUpGoogletag(),this.bs.eventManager().logSwgEvent(o.ACTION_REWARDED_AD_CLOSE_AD,!0),this.j.onAlternateAction&&this.j.onAlternateAction(),this.ci.completeView(this.li),null==(s=(t=this.j).onResult)||s.call(t,{configurationId:this.j.configurationId,data:{rendered:!0,rewardGranted:!1}})}async rewardedSlotGranted(t){var s,i;this.cleanUpGoogletag(),await this.rewardedAdGrant(null==(s=null==t?void 0:t.payload)?void 0:s.amount,null==(i=null==t?void 0:t.payload)?void 0:i.type)}async rewardedAdGrant(t,s){var i,e;this.bs.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GRANTED),null==(e=(i=this.j).onResult)||e.call(i,{configurationId:this.j.configurationId,data:{rendered:!0,rewardGranted:!0,reward:t,type:s}}),this.ci.completeView(this.li),await this.completeAudienceAction()}slotRenderEnded(t){t.slot===this.rewardedAdSlot&&t.isEmpty&&(clearTimeout(this.rewardedAdTimeout),this.bs.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_NOT_FILLED),this.sendRewardedAdLoadAdResponse(!1))}sendRewardedAdLoadAdResponse(t){var s,i;const e=new G;e.setSuccess(t),this.li.execute(e),t||null==(i=(s=this.j).onResult)||i.call(s,{configurationId:this.j.configurationId,data:{rendered:!1,rewardGranted:!1}})}handleRewardedAdViewAdRequest(){var t;null==(t=this.showRewardedAd)||t.call(this)}handleRewardedAdAlternateActionRequest(){this.j.onAlternateAction&&this.j.onAlternateAction()}cleanUpGoogletag(){var t,s,i,e,n,r;const o=this.bs.win().googletag;this.rewardedAdSlot&&(null==(t=null==o?void 0:o.destroySlots)||t.call(o,[this.rewardedAdSlot]));const h=null==(s=null==o?void 0:o.pubads)?void 0:s.call(o);null==(i=null==h?void 0:h.removeEventListener)||i.call(h,"rewardedSlotReady",this.rewardedSlotReadyHandler),null==(e=null==h?void 0:h.removeEventListener)||e.call(h,"rewardedSlotClosed",this.rewardedSlotClosedHandler),null==(n=null==h?void 0:h.removeEventListener)||n.call(h,"rewardedSlotGranted",this.rewardedSlotGrantedHandler),null==(r=null==h?void 0:h.removeEventListener)||r.call(h,"slotRenderEnded",this.slotRenderEndedHandler)}async completeAudienceAction(){const t=[["sut",await this.bs.storage().get($,!0)],["configurationId",this.j.configurationId],["audienceActionType",this.j.action]],s=this.bs.pageConfig().getPublicationId(),i="/publication/".concat(encodeURIComponent(s),"/completeaudienceaction"),e=t.reduce((t,[s,i])=>mt(t,s,i),yt(i)),n={toArray:()=>[],label:String},r=await this.fetcher.sendPost(e,n);r.updated&&await this.Ii.updateEntitlements(r.swgUserToken)}showNoEntitlementFoundToast(){this.li.execute(new S)}}class Di{constructor(t){this.Ds=t.doc(),this.oi=t.clientConfigManager(),ct(this.oi,"MiniPromptApi requires an instance of ClientConfigManager."),this.Rs=t.eventManager()}init(){const t=this.Ds.getHead();if(!t)return void ut("Unable to retrieve the head node of the current document, which is needed by MiniPromptApi.");const s="".concat(e,"/swg-mini-prompt.css");t.querySelector('link[href="'.concat(s,'"]'))||t.appendChild(ts(this.Ds.getWin().document,"link",{rel:"stylesheet",type:"text/css",href:s}))}create(t){if(t.autoPromptType!==cs.CONTRIBUTION&&t.autoPromptType!==cs.SUBSCRIPTION)return;const s=this.oi.getTheme(),i=this.oi.getLanguage();let e="";t.autoPromptType===cs.CONTRIBUTION?e=os(Vt,i):t.autoPromptType===cs.SUBSCRIPTION&&(e=os(Wt,i));const n=ts(this.Ds.getWin().document,"div",{role:"dialog",lang:i});n.classList.add("swg-mini-prompt-".concat(s));const r=ts(this.Ds.getWin().document,"div",{role:"button"});r.classList.add("swg-mini-prompt-title-container"),r.innerHTML='\n<div class="swg-mini-prompt-icon-$theme$"></div>\n<h1 class="swg-mini-prompt-title-text-$theme$">$textContent$</h1>\n'.replace(/\$theme\$/g,s).replace("$textContent$",e);const o=ts(this.Ds.getWin().document,"div",{});o.classList.add("swg-mini-prompt-close-button-container"),o.innerHTML='\n<div class="swg-mini-prompt-close-icon-$theme$"></div>\n'.replace("$theme$",s),n.appendChild(r),n.appendChild(o),this.Ds.getWin().document.body.appendChild(n),r.addEventListener("click",()=>{this.Ai(t.autoPromptType),"function"==typeof t.clickCallback&&t.clickCallback(),ls(n,"visibility","hidden")}),o.addEventListener("click",()=>{ls(n,"visibility","hidden"),this.Ci(t.autoPromptType)}),this.Oi(t.autoPromptType)}Oi(t){let s;t===cs.CONTRIBUTION?s=o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT:t===cs.SUBSCRIPTION&&(s=o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT),s&&this.Rs.logSwgEvent(s,!1)}Ai(t){let s;t===cs.CONTRIBUTION?s=o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK:t===cs.SUBSCRIPTION&&(s=o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK),s&&this.Rs.logSwgEvent(s,!0)}Ci(t){let s;t===cs.CONTRIBUTION?s=o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE:t===cs.SUBSCRIPTION&&(s=o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE),s&&this.Rs.logSwgEvent(s,!0)}}const Ui=[o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT,o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT,o.IMPRESSION_OFFERS,o.IMPRESSION_CONTRIBUTION_OFFERS],xi=new Map([[o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE,ht.TYPE_CONTRIBUTION],[o.ACTION_CONTRIBUTION_OFFERS_CLOSED,ht.TYPE_CONTRIBUTION],[o.ACTION_NEWSLETTER_OPT_IN_CLOSE,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_REGWALL_OPT_IN_CLOSE,ht.TYPE_REGISTRATION_WALL],[o.ACTION_SURVEY_CLOSED,ht.TYPE_REWARDED_SURVEY],[o.ACTION_REWARDED_AD_CLOSE,ht.TYPE_REWARDED_AD],[o.ACTION_BYO_CTA_CLOSE,ht.TYPE_BYO_CTA],[o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE,ht.TYPE_SUBSCRIPTION],[o.ACTION_SUBSCRIPTION_OFFERS_CLOSED,ht.TYPE_SUBSCRIPTION]]),Fi=new Map([[o.EVENT_CONTRIBUTION_PAYMENT_COMPLETE,ht.TYPE_CONTRIBUTION],[o.ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_REGWALL_OPT_IN_BUTTON_CLICK,ht.TYPE_REGISTRATION_WALL],[o.ACTION_SURVEY_SUBMIT_CLICK,ht.TYPE_REWARDED_SURVEY],[o.ACTION_REWARDED_AD_VIEW,ht.TYPE_REWARDED_AD],[o.ACTION_BYO_CTA_BUTTON_CLICK,ht.TYPE_BYO_CTA],[o.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE,ht.TYPE_SUBSCRIPTION]]),Bi=new Map([[o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT,ht.TYPE_CONTRIBUTION],[o.IMPRESSION_CONTRIBUTION_OFFERS,ht.TYPE_CONTRIBUTION],[o.IMPRESSION_NEWSLETTER_OPT_IN,ht.TYPE_NEWSLETTER_SIGNUP],[o.IMPRESSION_BYOP_NEWSLETTER_OPT_IN,ht.TYPE_NEWSLETTER_SIGNUP],[o.IMPRESSION_REGWALL_OPT_IN,ht.TYPE_REGISTRATION_WALL],[o.IMPRESSION_SURVEY,ht.TYPE_REWARDED_SURVEY],[o.IMPRESSION_REWARDED_AD,ht.TYPE_REWARDED_AD],[o.IMPRESSION_BYO_CTA,ht.TYPE_BYO_CTA],[o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT,ht.TYPE_SUBSCRIPTION],[o.IMPRESSION_OFFERS,ht.TYPE_SUBSCRIPTION]]),Vi=[o.EVENT_PAYMENT_FAILED],Wi=[o.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK,o.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK],zi=new Set([o.EVENT_NO_ENTITLEMENTS,o.EVENT_HAS_METERING_ENTITLEMENTS,o.EVENT_OFFERED_MET
1ER,o.EVENT_UNLOCKED_BY_METER,o.EVENT_UNLOCKED_FREE_PAGE]);class ji{constructor(t,s){this.bs=t,this.Ni=s,this.yi=!1,this.Pi=!1,this.Li=!1,this.Gi=null,this.Mi=!1,this.alwaysShowBlockingContributionExperiment=!1,this.multiInstanceMonetaryCtaExperiment=!1,this.Ds=t.doc(),this.ni=t.pageConfig(),this.Ii=t.entitlementsManager(),this.oi=t.clientConfigManager(),ct(this.oi,"AutoPromptManager requires an instance of ClientConfigManager."),this.Ss=t.storage(),t.eventManager().registerEventListener(this.As.bind(this)),this.ki=new Di(t),this.ki.init(),this.Rs=t.eventManager()}async showAutoPrompt(t){if(this.Pi=!1,t.autoPromptType===cs.NONE)return;if(this.Di=t.contentType,t.alwaysShow)return this.Ui=!0,this.xi=this.Fi(t.autoPromptType),this.Bi=this.Di!=ds.CLOSED,this.Vi=this.Bi,void this.Wi()();const[s,i,e]=await Promise.all([this.oi.getClientConfig(),this.Ii.getEntitlements(),this.Ii.getArticle()]);this.zi(e),this.Mi=!!(null==e?void 0:e.previewEnabled),this.Mi?await this.ji(e,t):await this.Yi(s,i,e,t)}zi(t){t&&(this.alwaysShowBlockingContributionExperiment=this.Ki(t,r.ALWAYS_SHOW_BLOCKING_CONTRIBUTION_EXPERIMENT),this.multiInstanceMonetaryCtaExperiment=this.Ki(t,r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT))}async ji(t,s){var i,e;const n=null==(i=t.audienceActions)?void 0:i.actions;if(!n||0===n.length)return;this.xi=this.qi(null==(e=t.audienceActions)?void 0:e.actions,s.autoPromptType),this.Bi=this.Di!=ds.CLOSED,this.Vi=this.Bi;const r=n[0];this.Hi(r)()}async Yi(t,s,i,e){var n,r,o,h,a,l,u,c,d,g;if(this.Ui=!1,!i)return void this.Ji();if(!(null==(n=t.uiPredicates)?void 0:n.canDisplayAutoPrompt))return void this.Ji();if(s.enablesThis())return void this.Ji();let p;if(this.xi=this.qi(null==(r=i.audienceActions)?void 0:r.actions,e.autoPromptType),i.actionOrchestration){const s=await this.Xi(t,i);if(s&&(this.Bi=this.isOrchestrationClosable(s),p=null==(h=null==(o=i.audienceActions)?void 0:o.actions)?void 0:h.find(t=>t.configurationId===s.configId)),this.$i()||this.Qi()){this.Vi=this.Bi;const t=null==(l=null==(a=i.actionOrchestration.interventionFunnel)?void 0:a.interventions)?void 0:l.find(t=>t.type===ht.TYPE_SUBSCRIPTION||t.type===ht.TYPE_CONTRIBUTION);t&&(this.Vi=this.isOrchestrationClosable(t))}}else if(this.Di===ds.CLOSED){const t=null==(c=null==(u=i.audienceActions)?void 0:u.actions)?void 0:c.find(t=>t.type===ht.TYPE_SUBSCRIPTION);t&&(this.Bi=!1,this.Vi=!1,p={type:t.type,configurationId:t.configurationId})}this.Li=!1,this.ii=null==p?void 0:p.configurationId;const E=p?this.Hi(p):void 0;if(!E)return void this.Ji();const _=this.Bi?1e3*((null==(g=null==(d=null==t?void 0:t.autoPromptConfig)?void 0:d.clientDisplayTrigger)?void 0:g.displayDelaySeconds)||0):0;_>0?this.bs.win().setTimeout(E,_):E()}isOrchestrationClosable(t){switch(null==t?void 0:t.closability){case kt.BLOCKING:return!1;case kt.DISMISSIBLE:return!0;default:return this.Di!=ds.CLOSED}}Qi(){return this.xi===cs.SUBSCRIPTION||this.xi===cs.SUBSCRIPTION_LARGE}$i(){return this.xi===cs.CONTRIBUTION||this.xi===cs.CONTRIBUTION_LARGE}Zi(t){return t===ht.TYPE_SUBSCRIPTION||t===ht.TYPE_CONTRIBUTION}qi(t=[],s){const i=t.find(t=>t.type===ht.TYPE_CONTRIBUTION||t.type===ht.TYPE_SUBSCRIPTION);if(!i)return;const e=i.type===ht.TYPE_CONTRIBUTION?s===cs.CONTRIBUTION?cs.CONTRIBUTION:cs.CONTRIBUTION_LARGE:s===cs.SUBSCRIPTION?cs.SUBSCRIPTION:cs.SUBSCRIPTION_LARGE;return this.Fi(e)}async Xi(t,s){var i,e,n,r,h;const a=null==(i=s.audienceActions)?void 0:i.actions;let l=null==(n=null==(e=s.actionOrchestration)?void 0:e.interventionFunnel)?void 0:n.interventions;if(!(null==a?void 0:a.length)||!(null==l?void 0:l.length))return;const u=await yi(this.bs),c=new Set(a.filter(t=>vi(t,this.bs,u)).map(t=>t.configurationId));if(0===c.size)return;const d=new Map(s.audienceActions.actions.filter(t=>!!t.numberOfCompletions).map(t=>[t.configurationId,t.numberOfCompletions]));return l=l.filter(s=>this.se(s,c,d,t)),0!==l.length?this.Di===ds.CLOSED?l[0]:function(t,s,i,e,n){if(!function(t){var s,i;return Ut(null==(s=null==t?void 0:t.globalFrequencyCap)?void 0:s.frequencyCapDuration)||Ut(null==(i=null==t?void 0:t.anyPromptFrequencyCap)?void 0:i.frequencyCapDuration)}(n))return t.logSwgEvent(o.EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR),s[0];let r;for(const a of s){const s=xt(t,n,a);if(!Ut(s)||!Ft(s,Bt(i,a))){r=a;break}t.logSwgEvent(o.EVENT_PROMPT_FREQUENCY_CAP_MET)}if(!r)return;const h=function(t,s){var i;return(null==(i=s.globalFrequencyCap)?void 0:i.duration)||t.globalFrequencyCap.frequencyCapDuration}(n,e);if(!Ut(h)||!Ft(h,Array.prototype.concat.apply([],Object.entries(i).filter(([t])=>t!==ot).map(([t,s])=>t===r.configId||t===r.type?s.completions:s.impressions))))return r;t.logSwgEvent(o.EVENT_GLOBAL_FREQUENCY_CAP_MET)}(this.Rs,l,u,null==(r=s.actionOrchestration)?void 0:r.interventionFunnel,null==(h=t.autoPromptConfig)?void 0:h.frequencyCapConfig):void 0}ee(t=!0,s){const i={isClosable:!!this.Vi,shouldAnimateFade:t};return this.multiInstanceMonetaryCtaExperiment&&s&&(i.configurationId=s),this.Qi()?()=>{this.Ni.showOffers(i)}:this.$i()?()=>{this.Ni.showContributionOptions(i)}:void 0}pe(t,s,i){return()=>{const e=new ki(this.bs,{action:t,configurationId:s,preference:i,autoPromptType:this.xi,isClosable:this.Bi,calledManually:!1,shouldRenderPreview:!!this.Mi,onAlternateAction:this.ee(!1,s)});this.setLastAudienceActionFlow(e),e.start()}}setLastAudienceActionFlow(t){this.Gi=t}getLastAudienceActionFlow(){return this.Gi}Wi(){const t=this.ee(!0,this.ii);return()=>{this.xi===cs.SUBSCRIPTION||this.xi===cs.CONTRIBUTION?this.ki.create({autoPromptType:this.xi,clickCallback:t}):this.xi!==cs.SUBSCRIPTION_LARGE&&this.xi!==cs.CONTRIBUTION_LARGE||
1!t||t()}}Fi(t){if(this.Ee()>480){if(t===cs.SUBSCRIPTION)return this._e(t),cs.SUBSCRIPTION_LARGE;if(t===cs.CONTRIBUTION)return this._e(t),cs.CONTRIBUTION_LARGE}return t}_e(t){this.Rs.logEvent({eventType:o.EVENT_DISABLE_MINIPROMPT_DESKTOP,eventOriginator:u.SWG_CLIENT,isFromUserAction:!1,additionalParameters:{publicationid:this.ni.getPublicationId(),promptType:t}})}async As(t){t.eventType&&(Wi.find(s=>s===t.eventType)&&(this.Li=!0),await this.me(t.eventType))}async me(t){if(zi.has(t)){if(this.Pi)return;return this.Pi=!0,void(await this.storeReaderVisit())}if(this.Di!==ds.CLOSED&&(Bi.has(t)||xi.has(t)||Fi.has(t)||Vi.find(s=>s===t))){if(!this.Li&&Ui.includes(t)){if(this.yi)return;this.yi=!0}this.storeEvent(t)}}async setTimestamps(t){const s=JSON.stringify(t);this.Ss.set("tsp",s,!0)}async storeReaderVisit(){if(await this.Ss.get(nt,!1))return;const t=await yi(this.bs),s=t[ot]||{impressions:[],dismissals:[],completions:[]};s.impressions.push(Date.now()),t[ot]=s,await this.setTimestamps(t),await this.Ss.set(nt,"1",!1)}async storeImpression(t){const s=await yi(this.bs),i=s[t]||{impressions:[],dismissals:[],completions:[]};if(i.impressions.push(Date.now()),s[t]=i,!this.fe()&&this.ii){const t=s[this.ii]||{impressions:[],dismissals:[],completions:[]};t.impressions.push(Date.now()),s[this.ii]=t}this.setTimestamps(s)}async storeDismissal(t){const s=await yi(this.bs),i=s[t]||{impressions:[],dismissals:[],completions:[]};if(i.dismissals.push(Date.now()),s[t]=i,!this.fe()&&this.ii){const t=s[this.ii]||{impressions:[],dismissals:[],completions:[]};t.dismissals.push(Date.now()),s[this.ii]=t}this.setTimestamps(s)}async storeCompletion(t){const s=await yi(this.bs),i=s[t]||{impressions:[],dismissals:[],completions:[]};if(i.completions.push(Date.now()),s[t]=i,!this.fe()&&this.ii){const t=s[this.ii]||{impressions:[],dismissals:[],completions:[]};t.completions.push(Date.now()),s[this.ii]=t}this.setTimestamps(s)}async storeEvent(t){let s;Bi.has(t)?this.Li||(s=Bi.get(t),this.storeImpression(s)):xi.has(t)?(s=xi.get(t),this.storeDismissal(s)):Fi.has(t)?(s=Fi.get(t),this.storeCompletion(s)):Vi.includes(t)&&(this.$i()&&this.storeCompletion(ht.TYPE_CONTRIBUTION),this.Qi()&&this.storeCompletion(ht.TYPE_SUBSCRIPTION))}Ee(){return this.Ds.getWin().innerWidth}fe(){return this.Ui||this.Mi}se(t,s,i,e){var n;const{repeatability:r,closability:h,configId:a}=t;if(!s.has(a))return!1;if((null==r?void 0:r.type)!==Dt.INFINITE){const t=Dt.FINITE===(null==r?void 0:r.type)&&r.count||1;let s;if(i.has(a)?s=i.get(a):(Dt.FINITE===(null==r?void 0:r.type)&&this.Rs.logSwgEvent(o.EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR),s=0),s>=t)return!1}const l=!!(null==(n=null==e?void 0:e.uiPredicates)?void 0:n.purchaseUnavailableRegion)&&this.Zi(t.type),u=h===kt.DISMISSIBLE,c=this.Di===ds.CLOSED;return!(this.alwaysShowBlockingContributionExperiment?u:u||!c)||!l}Hi(t){return s=t.type,Pi.includes(s)&&t.configurationId?this.pe(t.type,t.configurationId,t.preference):this.Wi();var s}Ki(t,s){return this.Ii.parseArticleExperimentConfigFlags(t).includes(s)}Ji(){var t;null==(t=this.bs.gisInteropManager())||t.yield()}}var Yi=(t=>(t.LIGHT="light",t.DARK="dark",t))(Yi||{});class Ki{constructor(t,s,i,e){this.bs=t,this.we=s,this.Ie=i,this.be=e,this.ys=Pt("/smartboxiframe"),this.Ns=t.activities();const n=this.bs.clientConfigManager().getLanguage(),r={frameborder:"0",scrolling:"no",title:os(Jt,n)};this.Us=ts(t.win().document,"iframe",r);const o={publicationId:this.bs.pageConfig().getPublicationId(),theme:this.Ie&&this.Ie.theme||"light",lang:this.Ie&&this.Ie.lang||"en"},h=this.Ie&&this.Ie.messageTextColor;h&&(o.messageTextColor=h),this.vs=Lt(o)}Te(t){var s;t&&t.getIsClicked()&&(null==(s=this.be)||s.call(this))}start(){as(this.Us,{opacity:"1",position:"absolute",top:"0",bottom:"0",left:"0",height:"100%",right:"0",width:"100%"}),this.we.appendChild(this.Us);const t=this.Ns.addDefaultArguments(this.vs);return this.Ns.openIframe(this.Us,this.ys,t).then(t=>{t.on(D,this.Te.bind(this))}),this.Us}}var qi=(t=>(t.SUBSCRIPTION="subscription",t.CONTRIBUTION="contribution",t))(qi||{});const Hi='<div class="swg-button-v2-icon-$theme$"></div>$textContent$';class Ji{constructor(t,s){this.Ds=t,this.Re=s}
1init(){const t=this.Ds.getHead();if(!t)return;const s="".concat(e,"/swg-button.css");t.querySelector('link[href="'.concat(s,'"]'))||t.appendChild(ts(this.Ds.getWin().document,"link",{rel:"stylesheet",type:"text/css",href:s}))}create(t,s){const i=ts(this.Ds.getWin().document,"button",{});return this.attach(i,t,s)}attach(t,s,i){const e=this.Se(t,o.ACTION_SWG_BUTTON_CLICK,s,i).options,n=e.theme;return t.classList.add("swg-button-".concat(n)),t.setAttribute("role","button"),e.lang&&t.setAttribute("lang",e.lang),t.setAttribute("title",os(Wt,t)),this.Ae(o.IMPRESSION_SWG_BUTTON),t}attachSubscribeButton(t,s,i){const e=this.Se(t,o.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK,s,i).options,n=e.theme;return t.classList.add("swg-button-v2-".concat(n)),t.setAttribute("role","button"),e.lang&&t.setAttribute("lang",e.lang),e.enable||t.setAttribute("disabled","disabled"),t.innerHTML=Hi.replace("$theme$",n).replace("$textContent$",os(Wt,t)),this.Ae(o.IMPRESSION_SHOW_OFFERS_SWG_BUTTON),t}attachContributeButton(t,s,i){const e=this.Se(t,o.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK,s,i).options,n=e.theme;return t.classList.add("swg-button-v2-".concat(n)),t.setAttribute("role","button"),e.lang&&t.setAttribute("lang",e.lang),e.enable||t.setAttribute("disabled","disabled"),t.innerHTML=Hi.replace("$theme$",n).replace("$textContent$",os(Vt,t)),this.Ae(o.IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON),t}attachButtonsWithAttribute(t,s,i,e){for(const n of s){const s=Array.from(this.Ds.getRootNode().querySelectorAll("[".concat(t,'="').concat(n,'"]')));for(const t of s)"subscription"===n?this.attachSubscribeButton(t,i,e[n]):"contribution"===n&&this.attachContributeButton(t,i,e[n])}}async Ae(t,s){(await this.Re).eventManager().logSwgEvent(t,s)}Ce(t){const s=t&&"function"!=typeof t?t:{theme:Yi.LIGHT},i=s.theme;return i!==Yi.LIGHT&&i!==Yi.DARK&&(s.theme=Yi.LIGHT),s}Oe(t,s){return("function"==typeof t?t:null)||s}Se(t,s,i,e){const n=this.Ce(i),r=this.Oe(i,e),o=t=>{this.Ae(s,!0),"function"==typeof r&&r(t)};return t.addEventListener("click",o),{options:n,clickFun:o}}attachSmartButton(t,s,i,e){const n=this.Se(s,o.ACTION_SWG_BUTTON_CLICK,i,e);return s.classList.add("swg-smart-button"),new Ki(t,s,n.options,n.clickFun).start()}}const Xi=!0;class $i{constructor(t,s){var i;this.bs=t,this.li=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.Rs=t.eventManager(),this.oi=t.clientConfigManager(),this.Gs=void 0===(null==s?void 0:s.shouldAnimateFade)||(null==s?void 0:s.shouldAnimateFade),this.Bi=null!=(i=null==s?void 0:s.isClosable)&&i;const e=t.activities().addDefaultArguments({showNative:t.callbacks().hasSubscribeRequestCallback(),productType:Ts.SUBSCRIPTION,list:(null==s?void 0:s.list)||"default",skus:(null==s?void 0:s.skus)||null,isClosable:this.Bi});if(void 0!==(null==s?void 0:s.configurationId)&&(e.configurationId=s.configurationId),null==s?void 0:s.oldSku){e.oldSku=s.oldSku,ct(e.skus,"Need a sku list if old sku is provided!");let t=e.skus;const i=e.oldSku;t=t.filter(t=>t!==i),ct(t.length>0,"Sku list only contained offer user already has"),e.skus=t}if(e.skus&&1===e.skus.length){const t=e.skus[0],s=e.oldSku;if(s){const i=new k;return i.setSku(t),i.setOldSku(s),void Oi(this.bs,i)}}this.Ne=e.skus||["*"],this.ye=this.oi.getClientConfig(),this.ve=this.Pe(e)}async Pe(t){const s=await this.ye,i=(await this.bs.entitlementsManager().getExperimentConfigFlags()).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT);return new us(this.Os,this.Ns,Ci(s,this.oi,this.bs.pageConfig(),this.Os.location.hash,t.configurationId,!1,i?Et(this.Os.location.href).origin:void 0),t,this.oi.getLanguage(),!0,!1,this.Gs)}Ti(t){t.getSubscriberOrMember()&&(this.Rs.logSwgEvent(o.ACTION_ALREADY_SUBSCRIBED,!0),this.bs.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()}))}async start(){if(this.li=await this.ve,!this.li)return;this.bs.callbacks().triggerFlowStarted(ws.SHOW_OFFERS,{skus:this.Ne,source:"SwG"}),this.li.onCancel(()=>{this.bs.callbacks().triggerFlowCanceled(ws.SHOW_OFFERS)}),this.li.on(k,t=>Oi(this.bs,t)),this.li.on(g,this.Ti.bind(this)),this.li.on(K,t=>Ni(this.bs,t));const t=await this.ye;return this.ci.openView(this.li,!1,this.Le(t,this.oi.shouldAllowScroll()))}Le(t,s){return t.useUpdatedOfferFlows?{desktopConfig:{isCenterPositioned:!0,supportsWideScreen:!0}
1,shouldDisableBodyScrolling:!s,closeOnBackgroundClick:this.Bi}:{}}showNoEntitlementFoundToast(){this.li&&this.li.execute(new S)}}class Qi{constructor(t,s){this.bs=t,this.Ie=s,this.Ns=t.activities(),this.ci=t.dialogManager(),this.Rs=t.eventManager(),this.li=new us(t.win(),this.Ns,Pt("/optionsiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),list:(null==s?void 0:s.list)||"default",skus:(null==s?void 0:s.skus)||null,isClosable:!0}),this.bs.clientConfigManager().getLanguage(),!1)}start(){return this.bs.callbacks().triggerFlowStarted(ws.SHOW_SUBSCRIBE_OPTION),this.li.onCancel(()=>{this.bs.callbacks().triggerFlowCanceled(ws.SHOW_SUBSCRIBE_OPTION)}),this.li.on(U,this.Ge.bind(this)),this.li.acceptResult().then(t=>{const s=t.data,i=new U;s.subscribe&&i.setSubscribe(!0),this.Ge(i)},t=>{throw this.ci.completeView(this.li),t}),this.Rs.logSwgEvent(o.IMPRESSION_CLICK_TO_SHOW_OFFERS),this.ci.openView(this.li)}Ge(t){if(t.getSubscribe()){const t=this.Ie||{};null==t.isClosable&&(t.isClosable=Xi),this.Rs.logSwgEvent(o.ACTION_VIEW_OFFERS,!0),new $i(this.bs,t).start()}}}class Zi{constructor(t,s={}){this.bs=t,this.Ie=s,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.Rs=t.eventManager(),this.li=new us(this.Os,this.Ns,Pt("/abbrvofferiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),showNative:t.callbacks().hasSubscribeRequestCallback(),list:s.list||"default",skus:s.skus||null,isClosable:!0}),this.bs.clientConfigManager().getLanguage(),!1)}Ti(t){t.getSubscriberOrMember()&&(this.Rs.logSwgEvent(o.ACTION_ALREADY_SUBSCRIBED,!0),this.bs.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()}))}start(){return this.bs.callbacks().triggerFlowStarted(ws.SHOW_ABBRV_OFFER),this.li.onCancel(()=>{this.bs.callbacks().triggerFlowCanceled(ws.SHOW_ABBRV_OFFER)}),this.li.on(g,this.Ti.bind(this)),this.li.acceptResult().then(t=>{const s=t.data;return s.viewOffers?(null==this.Ie.isClosable&&(this.Ie.isClosable=Xi),this.Rs.logSwgEvent(o.ACTION_VIEW_OFFERS,!0),void new $i(this.bs,this.Ie).start()):s.native?(this.bs.callbacks().triggerSubscribeRequest(),void this.ci.completeView(this.li)):void 0}),this.Rs.logSwgEvent(o.IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED),this.ci.openView(this.li)}}function te(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function se(t){if(t.__esModule)return t;var s=t.default;if("function"==typeof s){var i=function t(){return this instanceof t?Reflect.construct(s,arguments,this.constructor):s.apply(this,arguments)};i.prototype=s.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var e=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,e.get?e:{enumerable:!0,get:function(){return t[s]}})}),i}const ie={IFRAME:"iframe",POPUP:"popup",REDIRECT:"redirect"},ee={OK:"ok",CANCELED:"canceled",FAILED:"failed"};class ne{constructor(t,s,i,e,n,r){this.code=t,this.data=t==ee.OK?s:null,this.mode=i,this.origin=e,this.originVerified=n,this.secureChannel=r,this.ok=t==ee.OK,this.error=t==ee.FAILED?new Error(String(s)||""):null}}const re="AbortError";let oe;function he(t){return function(t){if(t.origin)return t.origin;const s=t.protocol;let i=t.host;return"https:"==s&&i.indexOf(":443")==i.length-4?i=i.replace(":443",""):"http:"==s&&i.indexOf(":80")==i.length-3&&(i=i.replace(":80","")),s+"//"+i}(function(t){return oe||(oe=document.createElement("a")),oe.href=t,oe}(t))}function ae(t,s){const i="AbortError"+(s?": "+s:"");let e=null;if("function"==typeof t.DOMException){const s=t.DOMException;try{e=new s(i,re)}catch(n){}}return e||(e=new Error(i),e.name=re,e.code=20),e}function le(t,s,i){if(s.ok)i(s);else{const e=s.error||ae(t);e.activityResult=s,i(Promise.reject(e))}}function ue(t){const s=t.navigator;return/Trident|MSIE|IEMobile/i.test(s&&s.userAgent)}function ce(t){const s=t.navigator;return/Edge/i.test(s&&s.userAgent)}const de="__ACTIVITIES__";class ge{constructor(t,s,i,e){this.Os=t,this.Me=s,this.ke=i,this.De=e,this.Ue=null,this.xe=!1,this.Ms=null,this.Fe=null,this.Be=null,this.Ve=null,this.We=this.ze.bind(this)}connect(t){if(this.Fe)throw new Error("already connected");this.Fe=t,this.Os.addEventListener("message",this.We)}disconnect(){if(this.Fe&&(this.Fe=null,this.Ms&&(pe(this.Ms),this.Ms=null),this.Os.removeEventListener("message",this.We),this.Ve)){for(const t in this.Ve){const s=this.Ve[t];s.port1&&pe(s.port1),s.port2&&pe(s.port2)}this.Ve=null}}isConnected(){return null!=this.ke}getTarget(){const t=this.je();if(!t)throw new Error("not connected");return t}je(){return this.Fe&&!this.Ue&&("function"==typeof this.Me?this.Ue=this.Me():this.Ue=this.Me),this.Ue}getTargetOrigin(){if(null==this.ke)throw new Error("not connected");return this.ke}sendConnectCommand(){const t=ue(this.Os)||ce(this.Os);this.sendCommand("connect",{acceptsChannel:t})}sendStartCommand(t){let s=null;this.xe&&"function"==typeof this.Os.MessageChannel&&(s=new this.Os.MessageChannel),s?(this.sendCommand("start",t,[s.port2]),this.Ye(s.port1)):this.sendCommand("start",t)}sendCommand(t,s,i){const e={sentinel:de,cmd:t,payload:s||null};if(this.Ms)this.Ms.postMessage(e,i||void 0);else{const s=this.getTarget(),n="connect"==t?null!=this.ke?this.ke:"*":this.getTargetOrigin();s.postMessage(e,n,i||void 0)}}customMessage(t){this.sendCommand("msg",t)}onCustomMessage(t){this.Be=t}startChannel(t){const s=t||"",i=this.Ke(s);if(!i.port1){const t=new this.Os.MessageChannel;i.port1=t.port1,i.port2=t.port2,i.resolver(i.port1)}return i.port2&&(this.sendCommand("cnset",{name:s},[i.port2]),i.port2=null),i.promise}
1askChannel(t){const s=t||"",i=this.Ke(s);return i.port1||this.sendCommand("cnget",{name:s}),i.promise}qe(t,s){const i=this.Ke(t);i.port1=s,i.resolver(s)}Ke(t){this.Ve||(this.Ve={});let s=this.Ve[t];if(!s){let i;const e=new Promise(t=>{i=t});s={port1:null,port2:null,resolver:i,promise:e},this.Ve[t]=s}return s}Ye(t){this.Ms&&pe(this.Ms),this.Ms=t,this.Ms.onmessage=t=>{const s=t.data,i=s&&s.cmd,e=s&&s.payload||null;i&&this.He(i,e,t)}}ze(t){if(this.De&&this.je()!=t.source)return;const s=t.data;if(!s||s.sentinel!=de)return;const i=s.cmd;if(this.Ms&&"connect"!=i&&"start"!=i)return;const e=t.origin,n=s.payload||null;null==this.ke&&"start"==i&&(this.ke=e),null==this.ke&&t.source&&this.je()==t.source&&(this.ke=e),e==this.ke&&this.He(i,n,t)}He(t,s,i){if("connect"==t)this.Ms&&(pe(this.Ms),this.Ms=null),this.xe=s&&s.acceptsChannel||!1,this.Fe(t,s);else if("start"==t){const e=i.ports&&i.ports[0];e&&this.Ye(e),this.Fe(t,s)}else if("msg"==t)null!=this.Be&&null!=s&&this.Be(s);else if("cnget"==t){const t=s.name;this.startChannel(t)}else if("cnset"==t){const t=s.name,e=i.ports[0];this.qe(t,e)}else this.Fe(t,s)}}function pe(t){try{t.close()}catch(s){}}let Ee=class{constructor(t,s,i){this.Us=t,this.C=s,this.vs=i||null,this.Os=this.Us.ownerDocument.defaultView,this.ke=he(s),this.Je=!1,this.Xe=null,this.$e=new Promise(t=>{this.Xe=t}),this.Qe=null,this.ui=new Promise(t=>{this.Qe=t}),this.Ze=null,this.sn=new Promise(t=>{this.Ze=t}),this.nn=null,this.rn=null,this.hn=new ge(this.Os,()=>this.Us.contentWindow,this.ke,!0)}getMode(){return ie.IFRAME}connect(){if(!function(t){if("isConnected"in t)return t.isConnected;const s=t.ownerDocument&&t.ownerDocument.documentElement;return s&&s.contains(t)||!1}(this.Us))throw new Error("iframe must be in DOM");return this.hn.connect(this.He.bind(this)),this.Us.src=this.C,this.$e}disconnect(){this.Je=!1,this.hn.disconnect()}acceptResult(){return this.sn}getTargetWin(){return this.Us.contentWindow||null}message(t){this.hn.customMessage(t)}onMessage(t){this.hn.onCustomMessage(t)}
1messageChannel(t){return this.hn.askChannel(t)}whenReady(){return this.ui}onResizeRequest(t){this.nn=t,Promise.resolve().then(()=>{null!=this.rn&&t(this.rn)})}resized(){if(!this.Je)return;const t=this.Us.offsetHeight;this.hn.sendCommand("resized",{height:t})}He(t,s){if("connect"==t)this.Je=!0,this.hn.sendStartCommand(this.vs),this.Xe();else if("result"==t){if(this.Ze){const t=s.code,i=t==ee.FAILED?new Error(s.data||""):s.data,e=new ne(t,i,ie.IFRAME,this.hn.getTargetOrigin(),!0,!0);le(this.Os,e,this.Ze),this.Ze=null,this.hn.sendCommand("close"),this.disconnect()}}else"ready"==t?this.Qe&&(this.Qe(),this.Qe=null):"resize"==t&&(this.rn=s.height,this.nn&&this.nn(this.rn))}};class _e{constructor(t,s,i,e,n,r){if(!e||"_blank"!=e&&"_top"!=e&&"_"==e[0])throw new Error('The only allowed targets are "_blank", "_top" and name targets');this.Os=t,this.an=s,this.C=i,this.ln=e,this.vs=n||null,this.Ie=r||{},this.Xe=null,this.$e=new Promise(t=>{this.Xe=t}),this.Ze=null,this.sn=new Promise(t=>{this.Ze=t}),this.un=null,this.cn=null,this.hn=null}getMode(){return"_top"==this.ln?ie.REDIRECT:ie.POPUP}open(){return this.dn()}whenConnected(){return this.$e}disconnect(){if(this.cn&&(this.Os.clearInterval(this.cn),this.cn=null),this.hn&&(this.hn.disconnect(),this.hn=null),this.un){try{this.un.close()}catch(t){}this.un=null}this.Ze=null}getTargetWin(){return this.un}acceptResult(){return this.sn}message(t){this.hn.customMessage(t)}onMessage(t){this.hn.onCustomMessage(t)}
1messageChannel(t){return this.hn.askChannel(t)}dn(){const t=this.gn();let s,i=this.C;if(!this.Ie.skipRequestInUrl){const t=this.Ie.returnUrl||function(t){const s=t.indexOf("#");return-1==s?t:t.substring(0,s)}(this.Os.location.href);i=function(t,s,i){return t+(-1==t.indexOf("#")?"#":"&")+encodeURIComponent("__WA__")+"="+encodeURIComponent(i)}(i,0,function(t){const s={requestId:t.requestId,returnUrl:t.returnUrl,args:t.args};return void 0!==t.origin&&(s.origin=t.origin),void 0!==t.originVerified&&(s.originVerified=t.originVerified),JSON.stringify(s)}({requestId:this.an,returnUrl:t,args:this.vs}))}let e=this.ln;"_top"!=e&&ue(this.Os)&&(e="_top");try{s=this.Os.open(i,e,t)}catch(n){}if(!s&&"_top"!=e&&!this.Ie.disableRedirectFallback){e="_top";try{s=this.Os.open(i,e)}catch(n){}}return s?(this.un=s,"_top"!=e&&this.En()):this._n(new Error("failed to open window")),this.sn.catch(()=>{})}gn(){const t=this.Os.screen,s=t.availWidth||t.width,i=t.availHeight||t.height,e=this.mn(),n=ce(this.Os),r=e&&this.Os.outerWidth>this.Os.innerWidth?Math.min(100,this.Os.outerWidth-this.Os.innerWidth):n?100:0,o=e&&this.Os.outerHeight>this.Os.innerHeight?Math.min(100,this.Os.outerHeight-this.Os.innerHeight):n?100:0,h=Math.max(s-r,.5*s),a=Math.max(i-o,.5*i);let l=Math.floor(Math.min(600,.9*h)),u=Math.floor(Math.min(600,.9*a));this.Ie.width&&(l=Math.min(this.Ie.width,h)),this.Ie.height&&(u=Math.min(this.Ie.height,a));const c=Math.floor((t.width-l)/2),d=Math.floor((t.height-u)/2),g={height:u,width:l,resizable:"yes",scrollbars:"yes"};n||(g.left=c,g.top=d);let p="";for(const E in g)p&&(p+=","),p+="".concat(E,"=").concat(g[E]);return p}mn(){return this.Os==this.Os.top}En(){this.cn=this.Os.setInterval(()=>{this.fn(!0)},500),this.hn=new ge(this.Os,this.un,null,!0),this.hn.connect(this.He.bind(this))}fn(t){this.un&&!this.un.closed||(this.cn&&(this.Os.clearInterval(this.cn),this.cn=null),this.Os.setTimeout(()=>{try{this.wn(ee.CANCELED,null)}catch(t){this._n(t)}},t?3e3:0))}_n(t){this.Ze&&this.Ze(Promise.reject(t)),this.disconnect()}wn(t,s){if(this.Ze){const i=this.hn.isConnected(),e=new ne(t,s,ie.POPUP,i?this.hn.getTargetOrigin():he(this.C),i,i);le(this.Os,e,this.Ze),this.Ze=null}this.hn&&this.hn.sendCommand("close"),this.disconnect()}He(t,s){if("connect"==t)this.hn.sendStartCommand(this.vs),this.Xe();else if("result"==t){const t=s.code,i=t==ee.FAILED?new Error(s.data||""):s.data;this.wn(t,i)}else"check"==t&&this.Os.setTimeout(()=>this.fn(),200)}}class me{constructor(t,s,i,e,n){this.Os=t,this.In=s,this.Tn=i,this.ke=e,this.Rn=n}getMode(){return ie.REDIRECT}acceptResult(){const t=new ne(this.In,this.Tn,ie.REDIRECT,this.ke,this.Rn,!1);return new Promise(s=>{le(this.Os,t,s)})}}var fe={ActivityPorts:class{constructor(t){this.version="1.24",this.Os=t,this.Sn=t.location.hash,this.An={},this.Cn={},this.On=null,this.Nn=new Promise(t=>{this.On=t})}openIframe(t,s,i){const e=new Ee(t,s,i);return e.connect().then(()=>e)}open(t,s,i,e,n){return{targetWin:this.yn(t,s,i,e,n).getTargetWin()}}openWithMessaging(t,s,i,e,n){const r=this.yn(t,s,i,e,n);return r.whenConnected().then(()=>r)}onResult(t,s){let i=this.An[t];i||(i=[],this.An[t]=i),i.push(s);const e=this.vn(t);e&&this.Pn(e,s)}onRedirectError(t){this.Nn.then(t)}yn(t,s,i,e,n){const r=new _e(this.Os,t,s,i,e,n);return r.open().then(()=>{this.Ln(t,r)}),r}vn(t){let s=this.Cn[t];if(!s&&this.Sn){try{s=function(t,s,i){const e="__WA_RES__",n=(r=e,(o=s,o?(/^[?#]/.test(o)?o.slice(1):o).split("&").reduce((t,s)=>{const i=s.split("="),e=decodeURIComponent(i[0]||""),n=decodeURIComponent(i[1]||"");return e&&(t[e]=n),t},{}):{})[r]);var r,o;if(!n)return null;const h=JSON.parse(n);if(!h||h.requestId!=i)return null;const a=function(t,s){if(!t)return t;const i=encodeURIComponent(s)+"=";let e=-1;do{if(e=t.indexOf(i,e),-1!=e){const s=e>0?t.substring(e-1,e):"";if(""==s||"?"==s||"#"==s||"&"==s){let s=t.indexOf("&",e+1);-1==s&&(s=t.length),t=t.substring(0,e)+t.substring(s+1)}else e++}}while(-1!=e&&e<t.length);return t}(t.location.hash,e)||"";if(a!=t.location.hash&&t.history&&t.history.replaceState)try{t.history.replaceState(t.history.state,"",a)}catch(g){}const l=h.code,u=h.data,c=h.origin,d=t.document.referrer&&he(t.document.referrer);return new me(t,l,u,c,c==d)}(this.Os,this.Sn,t)}catch(i){!function(t){setTimeout(()=>{throw t})}(i),this.On(i)}s&&(this.Cn[t]=s)}return s}Pn(t,s){Promise.resolve().then(()=>{s(t)})}Ln(t,s){const i=this.An[t];
1i&&i.forEach(t=>{this.Pn(s,t)}),this.Cn[t]=s}},ActivityIframePort:Ee,ActivityMessagingPort:class{getTargetWin(){}message(t){}onMessage(t){}messageChannel(t){}},ActivityMode:ie,ActivityOpenOptions:void 0,ActivityPort:class{getMode(){}acceptResult(){}},ActivityRequest:void 0,ActivityResult:ne,ActivityResultCode:ee,ActivityWindowPort:_e,createAbortError:ae,isAbortError:function(t){return!(!t||"object"!=typeof t)&&t.name===re}};const we=t({__proto__:null,default:te(fe)},[fe]);class Ie{constructor(t){this.Ms=t}acceptResult(){return this.Ms.acceptResult()}}let be=class{constructor(t,s,i,e){this.bs=i,this.Gn=new fe.ActivityIframePort(t,s,e),this.Mn={}}whenReady(){return this.Gn.whenReady()}async connect(){await this.Gn.connect(),this.Gn.onMessage(t=>{const s=null==t?void 0:t.RESPONSE;if(!s)return;const i=this.Mn[s[0]];i&&i(H(s))}),this.bs&&this.bs.eventManager()&&this.on(_,t=>{var s,i;this.bs.eventManager().logEvent({eventType:t.getEvent(),eventOriginator:u.SWG_SERVER,isFromUserAction:null==(s=t.getMeta())?void 0:s.getIsFromUserAction(),additionalParameters:t.getParams(),configurationId:null==(i=t.getMeta())?void 0:i.getConfigurationId()})})}disconnect(){this.Gn.disconnect()}getMode(){return this.Gn.getMode()}acceptResult(){return this.Gn.acceptResult()}onResizeRequest(t){return this.Gn.onResizeRequest(t)}execute(t){this.Gn.message({REQUEST:t.toArray()})}on(t,s){let i=null;try{i=J(t)}catch{i=null}if(!i)throw new Error("Invalid data type");if(this.Mn[i])throw new Error("Invalid type or duplicate callback for "+i);this.Mn[i]=s}resized(){this.Gn.resized()}};class Te{constructor(t,s){this.bs=s,this.Dn=t,this.Mn={},this.Dn.onMessage(t=>{const s=null==t?void 0:t.RESPONSE;if(!s)return;const i=this.Mn[s[0]];i&&i(H(s))}),this.bs&&this.bs.eventManager()&&this.on(_,t=>{var s,i;this.bs.eventManager().logEvent({eventType:t.getEvent(),eventOriginator:u.SWG_SERVER,isFromUserAction:null==(s=t.getMeta())?void 0:s.getIsFromUserAction(),additionalParameters:t.getParams(),configurationId:null==(i=t.getMeta())?void 0:i.getConfigurationId()})})}acceptResult(){return this.Dn.acceptResult()}execute(t){this.Dn.message({REQUEST:t.toArray()})}on(t,s){let i=null;try{i=J(t)}catch{i=null}if(!i)throw new Error("Invalid data type");if(this.Mn[i])throw new Error("Invalid type or duplicate callback for "+i);this.Mn[i]=s}}let Re=class{constructor(t){this.bs=t,this.Ns=new fe.ActivityPorts(t.win())}addDefaultArguments(t){var s;const e=this.bs,n=e.pageConfig(),r=e.analytics().getContext(),o=Boolean(null==(s=e.isPublisher)?void 0:s.call(e)),h={analyticsContext:r.toArray(),publicationId:n.getPublicationId(),productId:n.getProductId(),_client:"SwG ".concat(i),supportsEventManager:!0};return o&&(h.isPublisherRuntime=!0),Object.assign(h,t||{})}async Un(t,s,i){const e=new be(t,s,this.bs,i);return await e.connect(),e}async openIframe(t,s,i,e=!1){e&&(i=this.addDefaultArguments(i));const n=await this.bs.storage().get($,!0),r=new URL(s).searchParams;n&&!r.has("sut")&&(s=mt(s,"sut",n));const o=this.bs.pageConfig().getPublicationId();return o&&!r.has("publicationId")&&(s=mt(s,"publicationId",o)),this.Un(t,s,i)}async openPopupWithMessaging(t,s,i,e,n,r=!1){r&&(e=this.addDefaultArguments(e));const o=await this.Ns.openWithMessaging(t,s,i,e,n);return new Te(o,this.bs)}open(t,s,i,e,n,r=!1){return r&&(e=this.addDefaultArguments(e)),this.Ns.open(t,s,i,e,n)}onResult(t,s){this.Ns.onResult(t,t=>{s(new Ie(t))})}onRedirectError(t){this.Ns.onRedirectError(t)}getOriginalWebActivityPorts(){return this.Ns}};var Se=(t=>(t[t.PROCESS_EVENT=0]="PROCESS_EVENT",t[t.CANCEL_EVENT=1]="CANCEL_EVENT",t))(Se||{});function Ae(t,s){return"Event has an invalid "+t+"("+s+")"}class Ce{constructor(t){this.xn=t,this.Fn=[],this.Bn=[],this.lastAction=null}static isPublisherEvent(t){return t.eventOriginator===u.PROPENSITY_CLIENT||t.eventOriginator===u.PUBLISHER_CLIENT}registerEventListener(t){if(!Vs(t))throw new Error("Event manager listeners must be a function");this.Fn.push(t)}registerEventFilterer(t){if(!Vs(t))throw new Error("Event manager filterers must be a function");this.Bn.push(t)}logEvent(t,s,i){!function(t){if(!Fs(t))throw new Error("Event must be a valid object");
1if(!Bs(o,t.eventType))throw new Error(Ae("eventType",t.eventType));if(!Bs(u,t.eventOriginator))throw new Error(Ae("eventOriginator",t.eventOriginator));if(!Fs(t.additionalParameters)&&null!=t.additionalParameters)throw new Error(Ae("additionalParameters",t.additionalParameters));if(null!=t.isFromUserAction&&!Ws(t.isFromUserAction))throw new Error(Ae("isFromUserAction",t.isFromUserAction))}(t),t.timestamp=null!=i?i:Date.now(),this.lastAction=this.ze(t,s)}async ze(t,s){await this.xn;for(const e of this.Bn)try{if(e(t)===Se.CANCEL_EVENT)return}catch(i){lt(i)}for(const e of this.Fn)try{e(t,s)}catch(i){lt(i)}}logSwgEvent(t,s=!1,i=null,e,n=null){this.logEvent({eventType:t,eventOriginator:u.SWG_CLIENT,isFromUserAction:s,additionalParameters:i,configurationId:n},void 0,e)}getReadyPromise(){return this.xn}}const Oe="0123456789ABCDEF";function Ne(t){return Oe[3&t|8]}function ye(t,s){return(s+t).slice(-s.length)}function ve(t){return new j([Math.floor(t/1e3),t%1e3*1e6],!1)}const Pe={opacity:"0",position:"absolute",top:"-10px",left:"-10px",height:"1px",width:"1px"},Le="AnalyticsService timed out waiting for a response";function Ge(t){const s=new C;return s.setComplete(!1),s.setError(t),s}class Me{constructor(t){var s;this.bs=t,this.B=new p,this.Vn=!1,this.Wn=!1,this.zn=null,this.jn=[],this.xs=null,this.Yn=null,this.Kn=!1,this.qn=null,this.Hn=0,this.lastAction=null,this.G=ve(t.creationTimestamp()),this.Ds=t.doc(),this.Ns=t.activities(),this.Us=ts(this.Ds.getWin().document,"iframe",{title:"Subscribe with Google Service"}),as(this.Us,Pe),null==(s=this.Ds.getBody())||s.appendChild(this.getElement()),this.Jn(),this.Rs=t.eventManager(),this.Rs.registerEventListener(this.As.bind(this))}setReadyForLogging(){this.Kn=!0;for(const t of this.jn)this.As(t)}setTransactionId(t){const s=this.B.getTransactionId();if(this.B.setTransactionId(t),null!=s&&s!=t){const t=o.EVENT_NEW_TX_ID,i=new A;i.setOldTransactionId(s),this.Rs.logSwgEvent(t,!0,i)}}getTransactionId(){return this.B.getTransactionId()}getSku(){return this.B.getSku()}setSku(t){this.B.setSku(t)}setUrl(t){this.B.setUrl(t)}addLabels(t){if(t&&t.length>0){const s=[].concat(this.B.getLabelList());for(const i of t)-1==s.indexOf(i)&&s.push(i);this.B.setLabelList(s)}}removeLabels(t){if(t&&t.length>0){const s=[].concat(this.B.getLabelList());for(const i of t){const t=s.indexOf(i);t>-1&&s.splice(t,1)}this.B.setLabelList(s)}}getElement(){return this.Us}Xn(){return this.Ds.getWin().location.search}$n(){return this.Ds.getWin().document.referrer}Qn(){const t=this.Zn();if(t&&t.length){const s=t[0],i=s.loadEventStart-s.unloadEventEnd;if(i>0)return i}return 0}Zn(){return performance.getEntriesByType("navigation")}Jn(){const t=this.B;t.setTransactionId(function(){let t=function(){const t=Date.now().toString(16);return t.substring(t.length-8).toUpperCase()}()+"-",s=0;const i=function(){const t=new Uint8Array(23);self.crypto.getRandomValues(t);for(let s=t.length-1;s>-1;s--)t[s]=t[s]%16;return t}();for(let e=9;e<36;e++)switch(e){case 13:case 18:case 23:t+="-";break;case 14:t+="4";break;case 19:t+=Ne(i[s++]);break;default:t+=Oe[i[s++]]}return t}()+".swg"),t.setReferringOrigin(Et(this.$n()).origin),t.setClientVersion("SwG ".concat(i)),t.setUrl(It(this.Ds)),t.setIsLockedContent(this.bs.pageConfig().isLocked()),t.setUrlFromMarkup(wt(this.Ds)||"");const s=_t(this.Xn()),e=s.utm_campaign,n=s.utm_medium,r=s.utm_source;e&&t.setUtmCampaign(e),n&&t.setUtmMedium(n),r&&t.setUtmSource(r)}start(){return this.xs||(this.addLabels(fi(this.Ds.getWin())),this.xs=this.preparePort()),this.xs}async preparePort(){let t;try{t=await this.Ns.openIframe(this.Us,Pt("/serviceiframe"),null,!0)}catch(s){return this.Wn=!0,this.ir(Ge("Could not connect ["+s+"]")),null}return t.on(C,this.ir.bind(this)),await t.whenReady(),this.addLabels(fi(this.Ds.getWin())),t}setReadyToPay(t){this.B.setReadyToPay(t)}close(){var t;null==(t=this.Ds.getBody())||t.removeChild(this.getElement())}getContext(){return this.B}Cs(t){const s=new E;s.setEventOriginator(t.eventOriginator),s.setIsFromUserAction(!!t.isFromUserAction),t.configurationId&&s.setConfigurationId(t.configurationId),this.B.setClientTimestamp(ve(t.timestamp));const i=this.Qn();var e;i>0&&this.B.setLoadEventStartDelay((e=i,new I([Math.floor(e/1e3),e%1e3*1e6],!1))),this.B.setRuntimeCreationTimestamp(this.G);const n=new _;return n.setEvent(t.eventType),n.setContext(this.B),n.setMeta(s),t.additionalParameters instanceof A&&n.setParams(t.additionalParameters),n}er(){return!0===this.bs.config().enableSwgAnalytics}As(t){t.eventType!==o.EVENT_SUBSCRIPTION_STATE&&t.eventOriginator!==u.SHOWCASE_CLIENT&&(Ce.isPublisherEvent(t)&&!this.er()||(this.Kn?(this.Hn++,this.lastAction=this.nr(t)):this.jn.push(t)))}async nr(t){const s=await this.start(),i=this.Cs(t);null==s||s.execute(i)}ir(t){const s=(null==t?void 0:t.getComplete())||!1,i=(null==t?void 0:t.getError())||"Unknown logging Error",e=i===Le;s||lt("Error when logging: "+i),this.Hn--,e||(this.Vn=!0),null!==this.zn&&(0===this.Hn||this.Wn||e)&&(null!==this.qn&&(clearTimeout(this.qn),this.qn=null),this.zn(s),this.Yn=null,this.zn=null)}getLoggingPromise(){return 0===this.Hn||this.Wn?Promise.resolve(!0):(null===this.Yn&&(this.Yn=new Promise(t=>{this.zn=t}),this.qn=self.setTimeout(()=>{this.qn=null,this.ir(Ge(Le))},this.Vn?200:500)),this.Yn)}}class ke{constructor(){this.rr={},this.Cn={},this.lr=null}setOnEntitlementsResponse(t){this.cr(1,t)}triggerEntitlementsResponse(t){return this.dr(1,t.then(t=>t.clone()))}hasEntitlementsResponsePending(){return!!this.Cn[1]}setOnLoginRequest(t){this.cr(4,t)}triggerLoginRequest(t){return this.dr(4,t)}setOnLinkProgress(t){this.cr(5,t)}triggerLinkProgress(){return this.dr(5,!0)}resetLinkProgress(){this.gr(5)}setOnLinkComplete(t){this.cr(6,t)}triggerLinkComplete(){return this.dr(6,!0)}hasLinkCompletePending(){return!!this.Cn[6]}setOnPayConfirmOpened(t){this.cr(9,t)}triggerPayConfirmOpened(t){return this.dr(9,t)}setOnSubscribeRequest(t){this.cr(2,t)}triggerSubscribeRequest(){return this.dr(2,!0)}hasSubscribeRequestCallback(){return!!this.rr[2]}setOnOffersFlowRequest(t){this.cr(10,t)}triggerOffersFlowRequest(){return this.dr(10,!0)}hasOffersFlowRequestCallback(){return!!this.rr[10]}setOnSubscribeResponse(t){ut("[swg.js:setOnSubscribeResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'"),this.cr(3,t)}setOnContributionResponse(t){ut("[swg.js:setOnContributionResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'"),this.cr(3,t)}setOnPaymentResponse(t){this.cr(3,t)}triggerPaymentResponse(t){return this.lr=t.then(t=>{this.dr(3,Promise.resolve(t.clone()))},t=>{if(!es(t))throw t}),!!this.rr[3]}hasPaymentResponsePending(){return!!this.Cn[3]}setOnFlowStarted(t){this.cr(7,t)}triggerFlowStarted(t,s={}){return this.dr(7,{flow:t,data:s})}setOnFlowCanceled(t){this.cr(8,t)}triggerFlowCanceled(t,s={}){return this.dr(8,{flow:t,data:s})}cr(t,s){this.rr[t]&&ut("[swg.js]: You have registered multiple callbacks for the same response."),this.rr[t]=s,t in this.Cn&&this.pr(t,s,this.Cn[t])}dr(t,s){this.Cn[t]=s;const i=this.rr[t];return i&&this.pr(t,i,s),!!i}gr(t){t in this.Cn&&delete this.Cn[t]}async pr(t,s,i){await 0,s(i),this.gr(t)}}class De{constructor(t,s){this.displayName=t,this.avatarUrl=s}}
1class Ue{constructor({displayDelaySeconds:t,numImpressionsBetweenPrompts:s,dismissalBackOffSeconds:i,maxDismissalsPerWeek:e,maxDismissalsResultingHideSeconds:n,impressionBackOffSeconds:r,maxImpressions:o,maxImpressionsResultingHideSeconds:h,globalFrequencyCapDurationSeconds:a,globalFrequencyCapDurationNano:l,anyPromptFrequencyCapDurationSeconds:u,anyPromptFrequencyCapDurationNano:c}){this.clientDisplayTrigger=new xe(t,s),this.explicitDismissalConfig=new Fe(i,e,n),this.impressionConfig=new Be(r,o,h),this.frequencyCapConfig=new Ve(new We(new je(a,l)),new ze(new je(u,c)))}}class xe{constructor(t,s){this.displayDelaySeconds=t,this.numImpressionsBetweenPrompts=s}}class Fe{constructor(t,s,i){this.backOffSeconds=t,this.maxDismissalsPerWeek=s,this.maxDismissalsResultingHideSeconds=i}}class Be{constructor(t,s,i){this.backOffSeconds=t,this.maxImpressions=s,this.maxImpressionsResultingHideSeconds=i}}class Ve{constructor(t,s){this.globalFrequencyCap=t,this.anyPromptFrequencyCap=s}}class We{constructor(t){this.frequencyCapDuration=t}}class ze{constructor(t){this.frequencyCapDuration=t}}class je{constructor(t,s){this.seconds=t,this.nanos=s}}class Ye{constructor({attributionParams:t,autoPromptConfig:s,paySwgVersion:i,uiPredicates:e,useUpdatedOfferFlows:n,skipAccountCreationScreen:r}){this.autoPromptConfig=s,this.paySwgVersion=i,this.useUpdatedOfferFlows=n||!1,this.skipAccountCreationScreen=r||!1,this.uiPredicates=e,this.attributionParams=t}}class Ke{constructor(t,s,i){this.canDisplayAutoPrompt=t,this.canDisplayButton=s,this.purchaseUnavailableRegion=i}}class qe{constructor(t,s,i,e={}){this.bs=t,this.Er=s,this.Ts=i,this._r=e,this.wr=null}fetchClientConfig(t){if(!this.Er)throw new Error("fetchClientConfig requires publicationId");return this.wr||(t=t||Promise.resolve(),this.wr=t.then(()=>this.Ir())),this.wr}getClientConfig(){return this.wr||this.br()}async br(){return new Ye({paySwgVersion:this.bs.config().paySwgVersion,skipAccountCreationScreen:this._r.skipAccountCreationScreen,useUpdatedOfferFlows:!!this.bs.config().paySwgVersion||void 0})}async getAutoPromptConfig(){this.wr||this.fetchClientConfig();const t=await this.wr;return null==t?void 0:t.autoPromptConfig}getLanguage(){return this._r.lang||"en"}getTheme(){const t=self.matchMedia("(prefers-color-scheme: dark)").matches?Rs.DARK:Rs.LIGHT;return this._r.theme||t}shouldAllowScroll(){return!!this._r.allowScroll}shouldForceLangInIframes(){return!!this._r.forceLangInIframes&&!!this._r.lang}async shouldEnableButton(){var t;if(this._r.disableButton)return Promise.resolve(!1);this.wr||this.fetchClientConfig();const s=await this.wr;return null==(t=null==s?void 0:s.uiPredicates)?void 0:t.canDisplayButton}async Ir(){const t=await this.bs.entitlementsManager().getArticle();if(t)return this.Tr(t.clientConfig);const s=yt("/publication/"+encodeURIComponent(this.Er)+"/clientconfiguration"),i=await this.Ts.fetchCredentialedJson(s);return this.Tr(i)}Tr(t){var s,i,e,n,r,o,h,a,l,u,c,d,g,p,E,_,m,f,w;const I=t.autoPromptConfig;let b;I&&(b=new Ue({displayDelaySeconds:null==(s=I.clientDisplayTrigger)?void 0:s.displayDelaySeconds,dismissalBackOffSeconds:null==(i=I.explicitDismissalConfig)?void 0:i.backOffSeconds,maxDismissalsPerWeek:null==(e=I.explicitDismissalConfig)?void 0:e.maxDismissalsPerWeek,maxDismissalsResultingHideSeconds:null==(n=I.explicitDismissalConfig)?void 0:n.maxDismissalsResultingHideSeconds,impressionBackOffSeconds:null==(r=I.impressionConfig)?void 0:r.backOffSeconds,maxImpressions:null==(o=I.impressionConfig)?void 0:o.maxImpressions,maxImpressionsResultingHideSeconds:null==(h=I.impressionConfig)?void 0:h.maxImpressionsResultingHideSeconds,globalFrequencyCapDurationSeconds:null==(u=null==(l=null==(a=I.frequencyCapConfig)?void 0:a.globalFrequencyCap)?void 0:l.frequencyCapDuration)?void 0:u.seconds,globalFrequencyCapDurationNano:null==(g=null==(d=null==(c=I.frequencyCapConfig)?void 0:c.globalFrequencyCap)?void 0:d.frequencyCapDuration)?void 0:g.nano,anyPromptFrequencyCapDurationSeconds:null==(_=null==(E=null==(p=I.frequencyCapConfig)?void 0:p.anyPromptFrequencyCap)?void 0:E.frequencyCapDuration)?void 0:_.seconds,anyPromptFrequencyCapDurationNano:null==(w=null==(f=null==(m=I.frequencyCapConfig)?void 0:m.anyPromptFrequencyCap)?void 0:f.frequencyCapDuration)?void 0:w.nano}));const T=t.uiPredicates;let R;T&&(R=new Ke(T.canDisplayAutoPrompt,T.canDisplayButton,T.purchaseUnavailableRegion));const S=t.attributionParams;let A;S&&(A=new De(S.displayName,S.avatarUrl));const C=this.bs.config().paySwgVersion||t.paySwgVersion,O=!!this.bs.config().paySwgVersion||t.useUpdatedOfferFlows;
1return new Ye({autoPromptConfig:b,paySwgVersion:C,useUpdatedOfferFlows:O,skipAccountCreationScreen:this._r.skipAccountCreationScreen,uiPredicates:R,attributionParams:A})}}class He{constructor(t,s){var i,e,n,r;this.bs=t,this.Ie=s,this.Os=t.win(),this.oi=t.clientConfigManager(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.Bi=null==(e=null==(i=this.Ie)?void 0:i.isClosable)||e,this.ve=this.Rr(),this.Gs=void 0===(null==(n=this.Ie)?void 0:n.shouldAnimateFade)||(null==(r=this.Ie)?void 0:r.shouldAnimateFade)}async Rr(){var t,s,i;const e=await this.oi.getClientConfig(),n=(await this.bs.entitlementsManager().getExperimentConfigFlags()).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT);return new us(this.Os,this.Ns,Si(e,this.oi,this.bs.pageConfig(),null==(t=this.Ie)?void 0:t.configurationId,!1,n?Et(this.Os.location.href).origin:void 0),Lt({productId:this.bs.pageConfig().getProductId(),publicationId:this.bs.pageConfig().getPublicationId(),productType:Ts.UI_CONTRIBUTION,list:(null==(s=this.Ie)?void 0:s.list)||"default",skus:(null==(i=this.Ie)?void 0:i.skus)||null,isClosable:this.Bi,supportsEventManager:!0}),this.oi.getLanguage(),!0,!1,this.Gs)}Ti(t){t.getSubscriberOrMember()&&this.bs.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()})}async start(){const t=await this.ve;this.bs.callbacks().triggerFlowStarted(ws.SHOW_CONTRIBUTION_OPTIONS),t.onCancel(()=>{this.bs.callbacks().triggerFlowCanceled(ws.SHOW_CONTRIBUTION_OPTIONS)}),t.on(g,this.Ti.bind(this)),t.on(k,t=>Ai(this.bs,t));const s=await this.oi.getClientConfig();return this.ci.openView(t,!1,this.Le(s,this.oi.shouldAllowScroll()))}Le(t,s){return t.useUpdatedOfferFlows&&!s?{shouldDisableBodyScrolling:!0,closeOnBackgroundClick:this.Bi}:{}}async showNoEntitlementFoundToast(){(await this.ve).execute(new S)}}const Je=String.raw,Xe=Je(_a||(_a=__template(["\n  body {\n    padding: 0;\n    margin: 0;\n  }\n\n  swg-container,\n  swg-loading,\n  swg-loading-animate,\n  swg-loading-image {\n    display: block;\n  }\n\n  swg-loading-container {\n    width: 100% !important;\n    display: flex !important;\n    align-items: center !important;\n    justify-content: center !important;\n    min-height: 148px !important;\n    height: 100% !important;\n    bottom: 0 !important;\n    margin-top: 5px !important;\n    z-index: 2147483647 !important;\n  }\n\n  /**\n  * Since the desktop view has the parent iframe (.swg-dialog) transparent,\n  * this style adds the background with borders to the loading indicator.\n  */\n  @media (min-width: 630px), (min-height: 630px) {\n    swg-loading-container {\n      width: 560px !important;\n      margin-left: auto !important;\n      margin-right: auto !important;\n      border-top-left-radius: 8px !important;\n      border-top-right-radius: 8px !important;\n      background-color: rgba(255, 255, 255, 1) !important;\n      box-shadow:\n        rgba(60, 64, 67, 0.3) 0 1px 1px,\n        rgba(60, 64, 67, 0.15) 0 1px 4px 1px !important;\n    }\n\n    swg-loading-container.centered-on-desktop {\n      height: 120px !important;\n      min-height: 120px !important;\n      border-radius: 8px !important;\n    }\n  }\n\n  swg-loading {\n    z-index: 2147483647 !important;\n    width: 36px;\n    height: 36px;\n    overflow: hidden;\n    animation: mspin-rotate 1568.63ms infinite linear;\n  }\n\n  swg-loading-animate {\n    animation: mspin-revrot 5332ms infinite steps(4);\n  }\n\n  swg-loading-image {\n    background-image: url('","/loader.svg');\n    background-size: 100%;\n    width: 11664px;\n    height: 36px;\n    animation: swg-loading-film 5332ms infinite steps(324);\n  }\n\n  @keyframes swg-loading-film {\n    from {\n      transform: translateX(0);\n    }\n    to {\n      transform: translateX(-11664px);\n    }\n  }\n\n  @keyframes mspin-rotate {\n    from {\n      transform: rotate(0deg);\n    }\n    to {\n      transform: rotate(360deg);\n    }\n  }\n\n  @keyframes mspin-revrot {\n    from {\n      transform: rotate(0deg);\n    }\n    to {\n      transform: rotate(-360deg);\n    }\n  }\n"])),e),$e=Je(_b||(_b=__template(["\n  /** Common styles across all window sizes. */\n  .swg-dialog,\n  .swg-toast,\n  .publisher-toast {\n    box-sizing: border-box;\n  }\n\n  .swg-toast {\n    background-color: rgba(255, 255, 255, 1) !important;\n    max-height: 46px !important;\n  }\n\n  .publisher-toast {\n    background-color: transparent !important;\n    max-width: 360px !important;\n  }\n\n  .swg-toast,\n  .publisher-toast {\n    position: fixed !important;\n    bottom: 0 !important;\n    z-index: 2147483647 !important;\n    border: none !important;\n  }\n\n  /**\n  * Wide desktop screen support, when width is >= 871px and height is >= 641px.\n  */\n  @media (min-width: 871px) and (min-height: 641px) {\n    .swg-dialog.swg-wide-dialog {\n      left: -435px !important;\n    }\n\n    .swg-dialog.swg-wide-dialog,\n    .swg-toast,\n    .publisher-toast {\n      width: 870px !important;\n    }\n  }\n\n  /** Tablet/Medium screen support, when width OR height is <= 640px. */\n  @media (max-width: 640px), (max-height: 640px) {\n    .swg-dialog,\n    .swg-toast {\n      width: 480px !important;\n      left: -240px !important;
1\n      margin-inline-start: calc(100vw - 100vw / 2) !important;\n      border-top-left-radius: 8px !important;\n      border-top-right-radius: 8px !important;\n      box-shadow:\n        rgba(60, 64, 67, 0.3) 0 1px 1px,\n        rgba(60, 64, 67, 0.15) 0 1px 4px 1px !important;\n    }\n\n    .publisher-toast {\n      width: 480px !important;\n      left: -240px !important;\n      margin-inline-start: calc(100vw - 100vw / 2) !important;\n    }\n\n    [dir='rtl'] .swg-dialog,\n    [dir='rtl'] .swg-toast,\n    [dir='rtl'] .publisher-toast {\n      margin-inline-start: calc(100vw - 100vw / 2 - 240px) !important;\n    }\n  }\n\n  /** Desktop/Large screen support, when width AND height are >= 641px. */\n  @media (min-width: 641px) and (min-height: 641px) {\n    .swg-dialog,\n    .swg-toast,\n    .publisher-toast {\n      width: 630px !important;\n    }\n\n    .swg-dialog {\n      left: -315px !important;\n      margin-inline-start: calc(100vw - 100vw / 2) !important;\n      background-color: transparent !important;\n      border: none !important;\n    }\n\n    [dir='rtl'] .swg-dialog {\n      margin-inline-start: calc(100vw - 100vw / 2 - 315px) !important;\n    }\n\n    .swg-toast {\n      border-radius: 4px !important;\n      bottom: 8px !important;\n      box-shadow:\n        0 3px 1px -2px rgb(0 0 0 / 20%),\n        0 2px 2px 0 rgb(0 0 0 / 14%),\n        0 1px 5px 0 rgb(0 0 0 / 12%) !important;\n      left: 8px !important;\n    }\n\n    .publisher-toast {\n      bottom: 8px !important;\n      right: 30px !important;\n    }\n  }\n\n  /** Phone/Small screen support, when width is <= 480px. */\n  @media (max-width: 480px) {\n    .swg-dialog,\n    .swg-toast,\n    .publisher-toast {\n      width: 100% !important;\n      max-width: 100% !important;\n      left: 0 !important;\n      right: 0 !important;\n      margin-inline-start: 0 !important;\n    }\n  }\n\n  /**\n  * Class applied to content page to disable scrolling.\n  */\n  html.swg-disable-scroll,\n  html.swg-disable-scroll * {\n    overflow: hidden !important;\n  }\n"])));class Qe{constructor(t,s,i,e){this.entitlements=t,this.userData=s,this.purchaseDataList=i,this.Qs=e,this.purchaseData=i[0]}clone(){return new Qe(this.entitlements,this.userData,this.purchaseDataList,this.Qs)}json(){return{entitlements:this.entitlements.json(),userData:this.userData.json(),purchaseDataList:this.purchaseDataList.map(t=>t.json()),purchaseData:this.purchaseData.json()}}complete(){return this.Qs()}}class Ze{constructor(t,s){this.bs=t,this.li=null,this.openPromise=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.Ie=Object.assign({entitlements:null,consent:!0},s||{})}async start(){const t=this.Ie.entitlements;if(!t||!t.getEntitlementForSource("google"))throw new Error('No entitlements with "google" source');this.bs.callbacks().triggerFlowStarted(ws.COMPLETE_DEFERRED_ACCOUNT_CREATION),this.li=new us(this.Os,this.Ns,Pt("/recoveriframe"),Lt({publicationId:this.bs.pageConfig().getPublicationId(),productId:this.bs.pageConfig().getProductId(),entitlements:t.raw||null,consent:this.Ie.consent}),this.bs.clientConfigManager().getLanguage(),!0),this.openPromise=this.ci.openView(this.li);try{const t=await this.li.acceptResult();return this.Sr(t.data)}catch(s){throw es(s)?this.bs.callbacks().triggerFlowCanceled(ws.COMPLETE_DEFERRED_ACCOUNT_CREATION):this.ci.completeView(this.li),s}}Sr(t){this.bs.entitlementsManager().blockNextNotification();const s=t.entitlements,i=t.idToken,e=t.productType,n=this.bs.entitlementsManager().parseEntitlements({signedEntitlements:s}),r=new oi(i,(new ei).decode(i)),h=t.purchaseDataList?t.purchaseDataList.map(t=>new ri(t.data,t.signature)):[new ri(t.purchaseData.data,t.purchaseData.signature)],a=new ci(this.bs),l=a.complete.bind(a),u=new Qe(n,r,h,l);this.bs.eventManager().logSwgEvent(o.ACTION_NEW_DEFERRED_ACCOUNT,!0);const c=Promise.resolve.bind(Promise);return a.start(new ni("",h[0],r,n,e,c)),u}}function tn(t){const s=function(t){return t.readyState}(t);return"loading"!==s&&"uninitialized"!==s}class sn{constructor(t){const s="document"in t;this.Os=s?t:t.defaultView,this.Ds=s?t.document:t}getWin(){return this.Os}getRootNode(){return this.Ds}getRootElement(){return this.Ds.documentElement}getHead(){return this.Ds.head}getBody(){return this.Ds.body}isReady(){return tn(this.Ds)}async whenReady(){var t;await(t=this.Ds,new Promise(s=>{!function(t,s){!function(t,s,i){if(s(t))return void i(t);let e=!1;const n=()=>{s(t)&&!e&&(i(t),e=!0,t.removeEventListener("readystatechange",n))};t.addEventListener("readystatechange",n)}(t,tn,s)}(t,s)}))}}function en(t){return"nodeType"in t||"document"in t?new sn(t):t}const nn={frameborder:"0",scrolling:"no",src:"about:blank"};class rn{constructor(t,s){const i=Object.assign({},nn,s);this.Us=ts(t,"iframe",i),as(this.Us,hs),this.Ar=new Promise(t=>{this.Us.onload=()=>{t()}})}whenReady(){return this.Ar}getElement(){return this.Us}getDocument(){var t;const s=this.getElement().contentDocument||(null==(t=this.getElement().contentWindow)?void 0:t.document);if(!s)throw new Error("not loaded");return s}getBody(){return this.getDocument().body}isConnected(){return this.getElement().isConnected}}let on=class{constructor(t,s){this.Ds=t,this.Cr=this.Ds.getWin().document.createElement("swg-popup-background"),this.Cr.setAttribute("role","button"),as(this.Cr,{"z-index":s.toString(),display:"none",position:"fixed",top:"0",right:"0",bottom:"0",left:"0","background-color":"rgba(32, 33, 36, .6)"})}getElement(){return this.Cr}isAttached(){return!!this.Cr.parentNode}attach(){var t;null==(t=this.Ds.getBody())||t.appendChild(this.Cr)}destroy(){var t;null==(t=this.Ds.getBody())||t.removeChild(this.Cr)}show(t){if(as(this.Cr,{display:"block",opacity:t?"0":"1"}),t)return As(this.Cr,{opacity:"1"},300,"ease-out")}async hide(t=!0){t&&await As(this.Cr,{opacity:"0"},300,"ease-out"),as(this.Cr,{display:"none"})}};class hn{constructor(t,s={}){if(this.Ds=t,this.Or=ts(this.Ds,"swg-loading-container",{}),s.additionalClasses)for(const i of s.additionalClasses)this.Or.classList.add(i);this.Nr=ts(this.Ds,"swg-loading",{}),this.Or.appendChild(this.Nr),this.Or.style.setProperty("display","none","important"),this.yr()}getElement(){return this.Or}show(){this.Or.style.removeProperty("display")}hide(){this.Or.style.setProperty("display","none","important")}yr(){const t=this.Nr,s=ts(this.Ds,"swg-loading-animate",{});t.appendChild(s);const i=ts(this.Ds,"swg-loading-image",{});s.appendChild(i)}}const an=2147483647,ln={"min-height":"50px",border:"none",display:"block",position:"fixed","z-index":an,"box-sizing":"border-box"},un={position:"absolute",top:"0",left:"0",right:"0",bottom:"0",opacity:"0",height:"0","max-height":"100%","max-width":"100%","min-height":"100%","min-width":"100%",width:"0"};class cn{constructor(t,s,i={},e={},n={},r=!1){this.Ds=t;const o=n.desktopConfig||{},h=!!o.supportsWideScreen,a="swg-dialog ".concat(h?"swg-wide-dialog":""),l=n.iframeCssClassOverride||a,u=os(Ht,s);this.Us=new rn(t.getWin().document,{class:l,title:u}
1),this.vr=new on(t,an-1),this.Pr=n.closeOnBackgroundClick,this.Lr=r;const c=Object.assign({},ln,i);as(this.Us.getElement(),c),function(t,s){for(const[i,e]of Object.entries(s))ls(t,i,e)}(this.Us.getElement(),e),this.Gr=null,this.Mr=null,this.kr=null,this.zs=null,this.Dr=0,this.Ur=!1,this.Fr=null,this.Br=void 0!==n.maxAllowedHeightRatio?n.maxAllowedHeightRatio:.9,this.Vr=!!o.isCenterPositioned,this.Wr=!!n.shouldDisableBodyScrolling,this.zr=this.Ds.getWin().matchMedia("(min-width: 641px)"),this.jr=null}async open(t=!1){var s;this.Lr&&void 0!==this.Pr&&this.vr.getElement().addEventListener("click",this.Yr.bind(this));const i=this.Us;if(i.isConnected())throw new Error("already opened");return null==(s=this.Ds.getBody())||s.appendChild(i.getElement()),this.vr.attach(),t?(as(i.getElement(),{visibility:"hidden",opacity:"0"}),this.Ur=t):this.Kr(),await i.whenReady(),this.qr(),this}qr(){const t=this.Us.getBody(),s=this.Us.getDocument();ss(en(s),Xe);const i=[];this.isPositionCenterOnDesktop()&&i.push("centered-on-desktop"),this.Gr=new hn(s,{additionalClasses:i}),t.appendChild(this.Gr.getElement()),this.Mr=ts(s,"swg-container",{}),t.appendChild(this.Mr),this.Hr(),this.Vr&&(this.jr=()=>{this.Hr()},this.zr.addListener(this.jr))}async close(t=!0){var s;let i;if(t){const t=this.Jr()?{opacity:"0"}:{transform:"translateY(100%)"};i=this.Xs(()=>(this.vr.hide(!0),As(this.getElement(),t,300,"ease-out")))}else i=Promise.resolve();this.Ds.getRootElement().classList.remove("swg-disable-scroll"),await i;const e=this.Us.getElement();null==(s=e.parentNode)||s.removeChild(e),this.Xr(),this.vr.destroy(),this.jr&&this.zr.removeListener(this.jr)}getContainer(){if(!this.Mr)throw new Error("not opened yet");return this.Mr}getIframe(){return this.Us}getElement(){return this.Us.getElement()}getLoadingView(){return this.Gr}getMaxAllowedHeightRatio(){return this.Br}isPositionCenterOnDesktop(){return this.Vr}$r(){var t;this.kr&&this.kr.hasLoadingIndicator()?this.Fr=this.kr:(this.getContainer().textContent="",null==(t=this.Gr)||t.show())}Qr(){var t,s;this.Fr?((s=this.Fr.getElement()).parentElement&&s.parentElement.removeChild(s),this.Fr=null):null==(t=this.Gr)||t.hide()}getCurrentView(){return this.kr}async openView(t){var s;as(t.getElement(),un),this.$r(),this.kr=t,this.getContainer().appendChild(t.getElement()),this.Wr&&(null==(s=this.Ds.getRootElement())||s.classList.add("swg-disable-scroll")),t.shouldFadeBody()&&!this.Ur&&this.vr.show(t.shouldAnimateFade()),await t.init(this),as(t.getElement(),{opacity:"1"}),this.Ur&&(t.shouldFadeBody()&&this.vr.show(t.shouldAnimateFade()),this.Kr()),this.Qr()}Kr(){this.Xs(async()=>{as(this.getElement(),{transform:"translateY(100%)",opacity:"1",visibility:"visible"}),this.Jr()&&await As(this.getElement(),{transform:this.Zr(),opacity:"1",visibility:"visible"},300,"ease-out"),this.getElement().focus()}),this.Ur=!1}Yr(t){if(t.stopPropagation(),this.Pr){const t=this.kr;t.execute&&t.execute(new f)}return!1}async resizeView(t,s,i=!0){if(this.kr!=t)return null;const e=this.so(s),n=++this.Dr,r=()=>n!==this.Dr;let o;if(i){const t=this.getElement().offsetHeight;o=e>=t?this.Xs(()=>{if(r())return Promise.resolve();const s={height:"".concat(e,"px")};return this.Jr()||(s.transform="translateY(".concat(e-t,"px)")),as(this.getElement(),s),new Promise(t=>{requestAnimationFrame(async()=>{await As(this.getElement(),{transform:this.Zr()},300,"ease-out"),t()})})}):this.Xs(async()=>{const s=r()?Promise.resolve():As(this.getElement(),{transform:this.Jr()?this.Zr():"translateY(".concat(t-e,"px)")},300,"ease-out");await s,r()||as(this.getElement(),{height:"".concat(e,"px"),transform:this.Zr()})})}else as(this.getElement(),{height:"".concat(e,"px")}),o=Promise.resolve();await o,r()||(this.io(s),t.resized())}async Xs(t){await this.zs;try{await t()}catch{}this.zs=null}so(t){return Math.min(t,this.Ds.getWin().innerHeight*this.Br)}io(t){if(this.Jr())return void this.Xr();const s=t+20;as(this.Ds.getRootElement(),{"padding-bottom":"".concat(s,"px")})}Xr(){this.Ds.getRootElement().style.removeProperty("padding-bottom")}Hr(){as(this.getElement(),this.eo())}Jr(){return this.Vr&&this.zr.matches}eo(){return this.Jr()?{top:"50%",bottom:"0",transform:this.Zr()}:{top:"auto",bottom:"0",transform:this.Zr()}}Zr(){return this.Jr()?"translateY(-50%)":"translateY(0px)"}}class dn{constructor(t,s){this.doc=t,this.clientConfigManager=s,this.Lr=!1,this.oo=null,this.ho=null,this.ao=new on(t,2147483647),this.lo=null,this.ao.getElement().addEventListener("click",()=>{if(this.lo)try{this.lo.focus()}catch{}})}
1setEnableBackgroundClickExperiment(t){this.Lr=t}openDialog(t=!1,s={}){return this.ho||(this.oo=new cn(this.doc,this.clientConfigManager.getLanguage(),{},{},s,this.Lr),this.ho=this.oo.open(t)),this.ho}async openView(t,s=!1,i={}){return this.handleCancellations(t),(await this.openDialog(s,i)).openView(t)}async handleCancellations(t){try{await t.whenComplete()}catch(s){throw es(s)&&this.completeView(t),s}}completeView(t){setTimeout(()=>{this.oo&&this.oo.getCurrentView()===t&&this.ps()},100)}completeAll(){this.oo&&this.ps(),this.ao.isAttached()&&this.ao.destroy()}getDialog(){return this.oo}ps(){var t;null==(t=this.oo)||t.close(),this.oo=null,this.ho=null}popupOpened(t){this.lo=t||null,this.ao.isAttached()||this.ao.attach(),this.ao.show(!0)}popupClosed(){this.lo=null;try{this.ao.hide()}catch{}}}class gn{constructor(t,s){this.intervention=t,this.bs=s,this.type=t.type,this.configurationId=t.configurationId}async show(t){if(this.intervention.type===ht.TYPE_NEWSLETTER_SIGNUP||this.intervention.type===ht.TYPE_REWARDED_SURVEY||this.intervention.type===ht.TYPE_BYO_CTA||this.intervention.type===ht.TYPE_REWARDED_AD||this.intervention.type===ht.TYPE_REGISTRATION_WALL)return new ki(this.bs,{action:this.intervention.type,configurationId:this.intervention.configurationId,onResult:t.onResult,isClosable:t.isClosable,calledManually:!0,suppressToast:t.suppressToast,onAlternateAction:t.onAlternateAction,onSignIn:t.onSignIn,preference:this.intervention.preference}).start();throw Error("Can't show ".concat(this.type))}}const pn="google:metering";class En{constructor(t,s,i,e,n,r,o=!1,h=null){this.service=t,this.raw=s,this.entitlements=i,this.uo=e,this.co=n,this.do=r,this.decryptedDocumentKey=h,this.isReadyToPay=!!o}clone(){return new En(this.service,this.raw,this.entitlements.map(t=>t.clone()),this.uo,this.co,this.do,this.isReadyToPay,this.decryptedDocumentKey)}json(){return{service:this.service,entitlements:this.entitlements.map(t=>t.json()),isReadyToPay:this.isReadyToPay}}enablesThisWithCacheableEntitlements(){return!!this.getEntitlementForThis()&&!this.enablesThisWithGoogleMetering()&&!this.enablesThisWithGoogleDevMode()}enablesThisWithGoogleMetering(){const t=this.getEntitlementForThis();return!!t&&t.source===pn}enablesThisWithGoogleDevMode(){const t=this.getEntitlementForThis();if(!t)return!1;const s="google"===t.source&&-1!==t.subscriptionToken.indexOf("GOOGLE_DEV_MODE_ORDER"),i="GOOGLE_DEV_MODE_TOKEN"===t.subscriptionToken;return s||i}enablesThis(t){return this.enables(this.uo,t)}enablesAny(t){for(let s=0;s<this.entitlements.length;s++)if(this.entitlements[s].products.length>0&&(!t||t==this.entitlements[s].source))return!0;return!1}enables(t,s){return!!t&&!!this.getEntitlementFor(t,s)}getEntitlementForThis(t){return this.getEntitlementFor(this.uo,t)}getEntitlementFor(t,s){if(!t)return ut("SwG needs this article to define a product ID (e.g. example.com:premium). Articles can define a product ID using JSON+LD. SwG can check entitlements after this article defines a product ID."),null;const i=this.entitlements.filter(i=>i.enables(t)&&(!s||s===i.source)),e=i.find(({source:t})=>t!==pn),n=i.find(({source:t})=>t===pn);return e||n||null}getEntitlementForSource(t){if(this.entitlements.length>0)for(let s=0;s<this.entitlements.length;s++)if(this.entitlements[s].subscriptionToken&&t==this.entitlements[s].source)return this.entitlements[s];return null}ack(){this.co(this)}consume(t){this.do(this,t)}}class _n{constructor(t,s,i,e,n,r){this.source=t,this.products=s,this.subscriptionToken=i,this.subscriptionTokenContents=e,this.subscriptionTimestamp=n,this.readerId=r}clone(){return new _n(this.source,this.products.slice(0),this.subscriptionToken,this.subscriptionTokenContents,this.subscriptionTimestamp,this.readerId)}json(){return{source:this.source,products:this.products,subscriptionToken:this.subscriptionToken,readerId:this.readerId}}enables(t){if(!t)return!1;const s=t.indexOf(":");if(-1!=s){const i=t.substring(0,s+1);if(i+"*"==t&&this.products.filter(t=>t.substring(0,s+1)==i).length>=1)return at("enabled with wildcard productId"),!0;if(this.products.includes(i+"*"))return at("enabled with wildcard entitlement"),!0}return this.products.includes(t)}static parseFromJson(t,s){t||(t={});const i=t.source||"",e=t.products||[],n=t.subscriptionToken||"",r=t.readerId;let o;try{o=n?s.decode(n):null}catch{o=null}const h=t.subscriptionTimestamp;let a;try{const t=h.seconds_,s=h.nanos_;a=new j([t,s],!1)}catch{a=null}return new _n(i,e,n,o,a,r)}static parseListFromJson(t,s){return(Array.isArray(t)?t:[t]).map(t=>_n.parseFromJson(t,s))}getSku(){if("google"!==this.source)return null;const t=ii(this.subscriptionToken,"productId")||null;return t||ut("Unable to retrieve SKU from SwG subscription token"),t}}var mn=(t=>(t[t.LICENSED_BY_GOOGLE=1]="LICENSED_BY_GOOGLE",t[t.METERED_BY_GOOGLE=2]="METERED_BY_GOOGLE",t))(mn||{});const fn="rgba(60, 64, 67, 0.3) 0px -2px 5px, rgba(60, 64, 67, 0.15) 0px -5px 5px",wn="anonymous_user",In={[mn.LICENSED_BY_GOOGLE]:"/metertoastiframe",[mn.METERED_BY_GOOGLE]:"/meteriframe"};class bn{constructor(t,{meterClientType:s=mn.LICENSED_BY_GOOGLE,meterClientUserAttribute:i=wn}={}){this.bs=t,this.po=null,this.Eo=!1,this._o=null,this.mo=()=>{},this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.fo=s,this.wo=i,this.oi=t.clientConfigManager();const e={isClosable:!0,hasSubscriptionCallback:t.callbacks().hasSubscribeRequestCallback()};this.fo===mn.METERED_BY_GOOGLE&&(e.meterType=this.wo===wn?"UNKNOWN":"KNOWN");const n=this.Ns.addDefaultArguments(e),r=In[this.fo],o={origin:Et(this.Os.location.href).origin},h=this.oi.getLanguage();this.oi.shouldForceLangInIframes()&&(o.hl=h),this.li=new us(this.Os,this.Ns,Pt(r,o),n,h,!1)}async start(){this.mo=()=>{const t=new Y;t.setClose(!0),this.li.execute(t),this.removeCloseEventListener(),this.bs.eventManager().logSwgEvent(o.ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION,!0),this.po&&!this.Eo&&(this.Eo=!0,this.po())},this.bs.callbacks().triggerFlowStarted(ws.SHOW_METER_TOAST),this.li.on(K,this.Io.bind(this)),this.li.on(g,this.Ti.bind(this)),this.bs.callbacks().hasSubscribeRequestCallback()||this.bs.callbacks().hasOffersFlowRequestCallback()||ut("[swg.js]: `setOnNativeSubscribeRequest` has not been set before starting the metering flow, so users will not be able to subscribe from the metering dialog directly. Please call `setOnNativeSubscribeRequest` with a subscription flow callback before starting metering."),this.ci.handleCancellations(this.li).catch(t=>{if(this.po&&!this.Eo&&(this.Eo=!0,this.po()),!es(t))throw console.error("[swg.js]: Error occurred during meter toast handling: "+t),t});const t=await this.ci.openDialog();if(this.bo(),this.To(),await t.openView(this.li),this.Os.addEventListener("click",this.mo),this.Os.addEventListener("touchstart",this.mo),this.Os.addEventListener("mousedown",this.mo),this.Ro())ls(this.Os.document.body,"overflow","hidden");else{let t,s;this._o=()=>{t=t||this.Os.pageYOffset,this.Os.clearTimeout(s),s=this.Os.setTimeout(()=>{Math.abs(this.Os.pageYOffset-t)>100&&this.mo()},100)},this.Os.addEventListener("scroll",this._o)}this.bs.eventManager().logSwgEvent(o.IMPRESSION_METER_TOAST),this.bs.eventManager().logSwgEvent(o.EVENT_OFFERED_MET
1ER)}setOnConsumeCallback(t){this.po=t}removeCloseEventListener(){this.Os.removeEventListener("click",this.mo),this.Os.removeEventListener("touchstart",this.mo),this.Os.removeEventListener("mousedown",this.mo),this.Ro()?ls(this.Os.document.body,"overflow","visible"):this._o&&this.Os.removeEventListener("scroll",this._o)}bo(){const t=this.Os.matchMedia("(max-width: 640px), (max-height: 640px)"),s=this.ci.getDialog().getElement();t.matches&&as(s,{"box-shadow":fn}),t.addListener(t=>{t.matches?as(s,{"box-shadow":fn}):as(s,{"box-shadow":""})})}To(){this.Os.matchMedia("(min-width: 640px) and (min-height: 640px)").matches&&as(this.ci.getDialog().getLoadingView().getElement(),{width:"420px",margin:"auto"})}Io(t){this.removeCloseEventListener(),this.Eo=!0,t.getNative()?this.bs.callbacks().triggerSubscribeRequest():this.bs.callbacks().triggerOffersFlowRequest()}Ro(){return!!this.Os.navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i)}Ti(t){t.getSubscriberOrMember()&&this.bs.callbacks().triggerLoginRequest({linkRequested:!1})}showNoEntitlementFoundToast(){this.li&&this.li.execute(new S)}}function Tn(t,s=!1){const i=_t(t);return!(!(i.gaa_at&&i.gaa_n&&i.gaa_sig&&i.gaa_ts)||!s&&"na"===i.gaa_at||parseInt(i.gaa_ts,16)<Date.now()/1e3)}const Rn=new Set([ht.TYPE_NEWSLETTER_SIGNUP,ht.TYPE_REWARDED_SURVEY,ht.TYPE_REWARDED_AD,ht.TYPE_BYO_CTA,ht.TYPE_REGISTRATION_WALL]);class Sn{constructor(t,s,i,e,n){this.Os=t,this.ni=s,this.Ts=i,this.bs=e,this.So=n,this.Ao=null,this.Co=!1,this.Oo=!1,this.No=!1,this.yo=null,this.vo=null,this.Po=0,this.wr=null,this.entitlementsPostPromise=null,this.Er=this.ni.getPublicationId(),this.Lo=new ei,this.Ss=e.storage(),this.ri=e.analytics(),this.Go=e.config(),this.bs.eventManager().registerEventListener(this.Mo.bind(this))}reset(t=!1){this.wr=null,this.Po=Math.max(this.Po,t?3:0),t&&(this.Ss.remove(Z),this.Ss.remove(tt))}async updateEntitlements(t){this.clear(),t&&await this.Ss.set($,t,!0);const s=Date.now().toString();return await this.Ss.set(Q,s,!1),await this.getEntitlements()}clear(){this.wr=null,this.Po=0,this.unblockNextNotification(),this.Ss.remove(Z),this.Ss.remove(it),this.Ss.remove(tt)}async getEntitlements(t){"string"==typeof t&&(Date.now()>1600289016959&&ut("[swg.js:getEntitlements]: If present, the first param of getEntitlements() should be an object of type GetEntitlementsParamsExternalDef."),t={encryption:{encryptedDocumentKey:t}}),this.wr||(this.wr=this.Do(t));const s=await this.wr;return null!=s.isReadyToPay&&this.ri.setReadyToPay(s.isReadyToPay),s}pushNextEntitlements(t,s){const i=this.Uo(t,!0,s);return!(!i||!i.enablesThis()||(this.Ss.set(Z,t),0))}xo(){return _t(this.Os.location.search).gaa_n}Fo(t){var s;if(!t||t.source!==pn)return;let i,e;if((null==(s=t.subscriptionTokenContents)?void 0:s.metering.clientType)===mn.METERED_BY_GOOGLE)e=l.SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE;else{if(!Tn(this.Os.location.search))return;e=l.GOOGLE_SHOWCASE_METERING_SERVICE,i=this.xo()}this.bs.eventManager().logSwgEvent(o.EVENT_UNLOCKED_BY_METER,!1);const n=new T;n.setSource(t.source),n.setJwt(t.subscriptionToken),this.entitlementsPostPromise=this.Bo(n,a.UNLOCKED_METER,e,i)}Mo(t){var s,i,e,n;if(!Tn(this.Os.location.search,!0))return;const r=function(t){return Gs[t]}(t.eventType);if(!r)return;let o=null;switch(t.eventOriginator){case u.SHOWCASE_CLIENT:o=l.PUBLISHER_ENTITLEMENT;break;case u.SWG_CLIENT:if(r==a.UNLOCKED_METER)return;o=l.GOOGLE_SUBSCRIBER_ENTITLEMENT;break;default:return}const h=this.xo(),c=null==(i=null==(s=null==t?void 0:t.additionalParameters)?void 0:s.getIsUserRegistered)?void 0:i.call(s),d=null==(n=null==(e=null==t?void 0:t.additionalParameters)?void 0:e.getSubscriptionTimestamp)?void 0:n.call(e);this.entitlementsPostPromise=this.Bo(new T,r,o,h,c,d)}async Bo(t,s,i,e="",n=null,r=null){const o=new R;o.setUsedEntitlement(t),o.setClientEventTime(ve(Date.now())),o.setEntitlementResult(s),o.setEntitlementSource(i),o.setToken(e),"boolean"==typeof n&&o.setIsUserRegistered(n),r&&o.setSubscriptionTimestamp(r);let h="/publication/".concat(encodeURIComponent(this.Er),"/article");if(h=An(this.Os.location,h),!this.vo){const t={metering:{resource:{hashedCanonicalUrl:await this.Vo()}}};this.vo=ti(Qs(JSON.stringify(t)))}const a=await this.Ss.get($,!0);a&&(h=mt(h,"sut",a)),h=mt(h,"encodedEntitlementsParams",this.vo),await this.Ts.sendPost(yt(h),o)}async Vo(){return async function(t){var s;const i=null==(s=self.crypto)?void 0:s.subtle;if(!i){const t="Swgjs only works on secure (HTTPS or localhost) pages.";return ut(t),Promise.reject(t)}return function(t){const s=[],i=new DataView(t);for(let e=0;e<i.byteLength;e+=4){const t=i.getUint32(e).toString(16);s.push(ye(t,"00000000"))}return s.join("")}(await i.digest("SHA-512",Qs(t)))}(It(this.bs.doc()))}async Do(t){const s=await this.Wo(t);return this.zo(s),s}async Wo(t){const s=await this.Ss.get(Z),i=await this.Ss.get(tt),e=!(!t||!t.encryption);if(s&&!e){const t=this.Uo(s,!0,function(t){switch(t){case"true":return!0;case"false":return!1;default:return}}(i));if(t&&t.enablesThis())return this.Po=0,t}const n=await this.jo(t);return n&&n.enablesThisWithCacheableEntitlements()&&n.raw&&this.Ss.set(Z,n.raw),n}async getArticle(){return this.wr?(await this.wr,this.Ao):null}async getExperimentConfigFlags(){const t=await this.getArticle();return this.parseArticleExperimentConfigFlags(t)}parseArticleExperimentConfigFlags(t){if(t){const s=t.experimentConfig;if(null!=s){const t=s.experimentFlags;if(null!=t)return t}}return[]}jo(t){let s=this.Po;this.Po=0;const i=async()=>{s--;const e=await this.Ir(t);
1return e.enablesThis()||s<=0?e:new Promise(t=>{this.Os.setTimeout(()=>{t(i())},550)})};return i()}setToastShown(t){this.Ss.set(it,t?"1":"0")}blockNextNotification(){this.Co=!0}blockNextToast(){this.Oo=!0}unblockNextNotification(){this.Co=!1}enableMeteredByGoogle(){this.No=!0}getLastMeterToast(){return this.yo}parseEntitlements(t){const s=t.isReadyToPay;null==s?this.Ss.remove(tt):this.Ss.set(tt,String(s));const i=t.signedEntitlements,e=t.decryptedDocumentKey,n=t.swgUserToken;if(n&&this.Yo(n),i){const t=this.Uo(i,!1,s,e);if(t)return t}else{const i=t.entitlements;if(i)return this.Ko("",i,s,e)}return this.Ko("",[],s)}Yo(t){t&&this.Ss.set($,t,!0)}Uo(t,s,i,e){try{const n=this.Lo.decode(t);if(s){const t=Date.now(),s=n.exp;if(1e3*parseFloat(s)<t)return null}const r=n.entitlements;return r&&this.Ko(t,r,i,e)||null}catch(n){this.Os.setTimeout(()=>{throw n})}return null}Ko(t,s,i,e){return new En("subscribe.google.com",t,_n.parseListFromJson(s,this.Lo),this.ni.getProductId(),this.qo.bind(this),this.Ho.bind(this),i,e)}zo(t){const s=this.Co;this.Co=!1;const i=this.Oo;if(this.Oo=!1,s)return;this.bs.callbacks().triggerEntitlementsResponse(Promise.resolve(t)),this.So&&t.enablesThisWithGoogleMetering()&&t.consume();const e=t.getEntitlementForThis();e?i||this.Jo(e):this.bs.eventManager().logSwgEvent(o.EVENT_NO_ENTITLEMENTS,!1)}async Jo(t){if(t.source===pn)return this.bs.eventManager().logSwgEvent(o.EVENT_HAS_METERING_ENTITLEMENTS,!1),Promise.resolve();const s=new A;s.setIsUserRegistered(!0),t.subscriptionTimestamp&&s.setSubscriptionTimestamp(t.subscriptionTimestamp);const i="privileged"===t.source?o.EVENT_UNLOCKED_FOR_CRAWLER:o.EVENT_UNLOCKED_BY_SUBSCRIPTION;if(this.bs.eventManager().logSwgEvent(i,!1,s),"1"===await this.Ss.get(it))return;const e=t.source||pn;return new Os(this.bs,Pt("/toastiframe"),Lt({publicationId:this.Er,source:e})).open()}qo(t){t.getEntitlementForThis()&&this.setToastShown(!0)}Ho(t,s){var i;if(t.enablesThisWithGoogleMetering()){const e=t.getEntitlementForThis(),n=()=>{s&&s(),this.Fo(e)},r=e.subscriptionTokenContents;if(!r)return n();if(!0===(null==(i=r.metering)?void 0:i.showToast)){const t=new bn(this.bs,{meterClientType:r.metering.clientType,meterClientUserAttribute:r.metering.clientUserAttribute});return t.setOnConsumeCallback(n),this.yo=t,t.start()}return n()}}async Ir(t){var s;const i=await this.Ss.get($,!0),e=await this.Ss.get(Q,!1);let n="/publication/".concat(encodeURIComponent(this.Er),"/article");if(n=An(this.Os.location,n),n=function(t,s){const i=_t(t.hash).rrmPromptRequested;return void 0===i?s:mt(s,"previewConfigId",i)}(this.Os.location,n),n=function(t,s){const i=_t(t.hash).rrmPreviewKey;return void 0===i?s:mt(s,"previewKey",i)}(this.Os.location,n),n=function(t,s){if(!t.referrer)return s;const i=Et(t.referrer).hostname.replace(/^www\./,"");return i&&"localhost"!==i?mt(s,"pageReferrer",i):s}(this.Os.document,n),(null==t?void 0:t.encryption)&&(n=mt(n,"crypt",t.encryption.encryptedDocumentKey)),i&&(n=mt(n,"sut",i)),this.Go.publisherProvidedId?n=mt(n,"ppid",this.Go.publisherProvidedId):(null==t?void 0:t.publisherProvidedId)&&"string"==typeof t.publisherProvidedId&&t.publisherProvidedId.length>0&&(n=mt(n,"ppid",t.publisherProvidedId)),e){const t=parseInt(e,10);if(t){const s=Math.floor((Date.now()-t)/1e3);s>=0&&(n=mt(n,"interaction_age",s.toString()))}}n=mt(n,"locked",String(this.ni.isLocked())),n=mt(n,"contentType",this.ni.isLocked()?ds.CLOSED.toString():ds.OPEN.toString());const r=await this.Vo();let h=this.No?{metering:{clientTypes:[mn.METERED_BY_GOOGLE],owner:this.Er,resource:{hashedCanonicalUrl:r}}}:void 0;if(this.Er&&(null==(s=null==t?void 0:t.metering)?void 0:s.state)&&Tn(this.Os.location.search)){const s=t.metering.state.id;if("string"==typeof s&&s.length>0){let i=function({attributes:t,category:s}){if(!t)return;const i=Object.keys(t);for(const e of i){const i="".concat(s,"_").concat(e),n=Number(t[e].timestamp),r=n>Date.now()/1e3*2;n&&!r||ut('SwG Entitlements: Please specify a Unix timestamp, in seconds, for the "'.concat(e,'" ').concat(s," attribute. The timestamp you passed (").concat(t[e].timestamp,") looks invali
1d.")),h.metering.state.attributes.push({name:i,timestamp:n})}};h={metering:{clientTypes:[mn.LICENSED_BY_GOOGLE],owner:this.Er,resource:{hashedCanonicalUrl:r},state:{id:s,attributes:[]},token:this.xo()}},i({attributes:t.metering.state.standardAttributes,category:"standard"}),i({attributes:t.metering.state.customAttributes,category:"custom"})}else ut("SwG Entitlements: Please specify a metering state ID string, ideally a hash to avoid PII.")}h&&(this.vo=ti(Qs(JSON.stringify(h))),n=mt(n,"encodedEntitlementsParams",this.vo)),n=mt(n,"visitFrequency",function(t,s=Date.now()){const i=t[ot],e=(null==i?void 0:i.impressions)||[],n=s-6048e5,r=e.filter(t=>t>=n).length+1;return r>=4?"VISIT_FREQUENCY_FREQUENT":r>=2?"VISIT_FREQUENCY_CASUAL":"VISIT_FREQUENCY_NEW"}(await yi(this.bs))),n=yt(n),this.bs.eventManager().logSwgEvent(o.ACTION_GET_ENTITLEMENTS,!1);const a=await this.Ts.fetchCredentialedJson(n);this.Ao=a;const l=this.Ao.entitlements||{},u=a.errorMessages;if(Number(null==u?void 0:u.length)>0)for(const o of u)ut("SwG Entitlements: "+o);return this.parseEntitlements(l)}async getAvailableInterventions(){var t,s;const i=await this.getArticle();return i?(null==(s=null==(t=i.audienceActions)?void 0:t.actions)?void 0:s.filter(t=>Rn.has(t.type)).map(t=>new gn(t,this.bs)))||[]:(ut("[swg.js:getAvailableInterventions] Article is null."),null)}}function An(t,s){const i=_t(t.hash)["swg.deventitlement"];return void 0===i?s:mt(s,"devEnt",i)}class Cn{constructor(){}getSearch(){return self.window.location.search}}const On=class t{constructor(t=new Cn){this.locationProvider=t}shouldAllowFreeAccess(){const s=t.GOOGLE_REFERERS_PREFIX_LIST.some(t=>self.document.referrer.toLowerCase().startsWith(t)),i=this.getQueryParamsAsMap(),e=i.has(t.HOLDBACK_QUERY_PARAM)&&i.get(t.HOLDBACK_QUERY_PARAM)===t.HOLDBACK_ENABLED_VALUE;return s&&!e}getQueryParamsAsMap(){const t=new URLSearchParams(this.locationProvider.getSearch()),s=new Map;for(const[i,e]of t.entries())s.set(i.toLowerCase(),e.toLowerCase());return s}};On.GOOGLE_REFERERS_PREFIX_LIST=["https://www.google.","android-app://com.google.android.googlequicksearchbox","android-app://com.google.android.googlequicksearchbox/https/www.google.com","ios-app://com.google.app.ios"],On.HOLDBACK_QUERY_PARAM="eafs_enabled",On.HOLDBACK_ENABLED_VALUE="false";let Nn=On;var yn=(t=>(t[t.WAITING_FOR_PING=1]="WAITING_FOR_PING",t[t.LOADING_COMMUNICATION_IFRAME=2]="LOADING_COMMUNICATION_IFRAME",t[t.COMMUNICATION_IFRAME_ESTABLISHED=3]="COMMUNICATION_IFRAME_ESTABLISHED",t[t.TOKEN_UPDATE_IN_PROGRESS=4]="TOKEN_UPDATE_IN_PROGRESS",t[t.YIELDED=5]="YIELDED",t))(yn||{});function vn(t,s){return t.data.type===s}function Pn(t){return"string"==typeof t.data.sessionId&&t.data.sessionId.length>0}class Ln{constructor(t,s,i,e,n){this.doc=t,this.storage=s,this.entitlementsManager=i,this.pageConfig=e,this.eventManager=n,this.state=1,this.gisSource=null,this.iframeLoaded=!1,this.gisReady=!1,this.signInInProgress=!1,this.hasSessionConnection=!1,this.regwallClickPending=!1,this.completeLoginCallback=null,this.messageHandlerBound=this.messageHandler.bind(this),this.doc.getWin().addEventListener("message",this.messageHandlerBound),this.communicationIframeEstablishedPromise=new Promise(t=>{this.communicationIframeEstablishedPromiseResolve=t});const{promise:r,resolve:o}=Promise.withResolvers();this.updatedTokenPromise=r,this.updatedTokenPromiseResolve=o,this.storage.get(et,!1).then(t=>{"true"===t&&(this.hasSessionConnection=!0)})}getState(){return this.state}isConnectionExpected(){return 1!==this.state||this.hasSessionConnection}setRegwallClickPending(t){this.regwallClickPending=t}isRegwallClickPending(){return this.regwallClickPending}setCompleteLoginCallback(t){this.completeLoginCallback=t}async triggerCompleteLogin(t){return!!this.completeLoginCallback&&await this.completeLoginCallback(t)}async yield(){5!==this.state&&(await this.communicationIframeEstablishedPromise,this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_YIELD),this.state=5,this.sendIframe({type:"RRM_GIS_YIELD"}))}redirectOk(){this.state=3,this.signInInProgress=!1,this.sendIframe({type:"RRM_GIS_REDIRECT_OK"})}messageHandler(t){1===this.state?this.handleWaitingForPingState(t):2===this.state?this.handleLoadingCommunicationIframeState(t):3===this.state||5===this.state?this.handleCommunicationIframeEstablishedState(t):4===this.state&&this.handleTokenUpdateInProgressState(t)}handleWaitingForPingState(t){var s;if(vn(t,"RRM_GIS_ERROR"))return void this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_WAITING_FOR_PING_ERROR);
1if(!vn(t,"RRM_GIS_PING")||!Pn(t))return;this.state=2,this.sessionId=t.data.sessionId,this.gisSource=t.source,this.gisOrigin=t.origin,this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_PING_RECEIVED),this.hasSessionConnection=!0,this.storage.set(et,"true",!1),this.sendGis({type:"RRM_GIS_ACK"});const i=(e=Pt("/rrmgisinterop"),n={sessionId:this.sessionId,role:"RRM"},Object.entries(n).reduce((t,[s,i])=>mt(t,s,i),e));var e,n;this.communicationIframe=ts(this.doc.getRootNode(),"iframe",{src:i,tabindex:"-1","aria-hidden":"true"}),as(this.communicationIframe,{width:"0",height:"0",border:"none",position:"absolute",visibility:"hidden"}),null==(s=this.doc.getBody())||s.appendChild(this.communicationIframe)}handleLoadingCommunicationIframeState(t){vn(t,"RRM_GIS_ERROR")?this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_LOADING_IFRAME_ERROR):this.invalidSessionId(t)||(vn(t,"RRM_GIS_IFRAME_LOADED_RRM")?(this.sendGis({type:"RRM_GIS_READY_RRM"}),this.iframeLoaded=!0):vn(t,"RRM_GIS_READY_GIS")&&(this.gisReady=!0),this.iframeLoaded&&this.gisReady&&(this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_HANDSHAKE_ESTABLISHED),this.state=3,this.communicationIframeEstablishedPromiseResolve()))}async handleCommunicationIframeEstablishedState(t){if(vn(t,"RRM_GIS_ERROR"))this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_OPERATION_ERROR);else if(!this.invalidSessionId(t)&&this.fromIframe(t)&&vn(t,"RRM_GIS_TOKEN_UPDATE_START")){this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_TOKEN_UPDATE_START),this.state=4;const t=await this.storage.get($,!0);this.sendIframe({type:"RRM_GIS_SWG_USER_TOKEN",swgUserToken:t,publicationId:this.pageConfig.getPublicationId(),gisOrigin:this.gisOrigin})}}async handleTokenUpdateInProgressState(t){var s;vn(t,"RRM_GIS_ERROR")?this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_TOKEN_UPDATE_ERROR):!this.invalidSessionId(t)&&this.fromIframe(t)&&vn(t,"RRM_GIS_TOKEN_UPDATED")&&"string"==typeof(s=t).data.swgUserToken&&s.data.swgUserToken.length>0&&(this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_TOKEN_UPDATED),this.updatedTokenPromiseResolve(t.data.swgUserToken),this.signInInProgress||(await this.entitlementsManager.updateEntitlements(t.data.swgUserToken),this.state=3,this.sendIframe({type:"RRM_GIS_REDIRECT_OK"})))}sendGis(t){var s;null==(s=this.gisSource)||s.postMessage({...t,sessionId:this.sessionId},{targetOrigin:this.gisOrigin})}sendIframe(t){var s,i;null==(i=null==(s=this.communicationIframe)?void 0:s.contentWindow)||i.postMessage({...t,sessionId:this.sessionId},{targetOrigin:Nt()})}fromIframe(t){var s;return t.source===(null==(s=this.communicationIframe)?void 0:s.contentWindow)}invalidSessionId(t){return!Pn(t)||t.data.sessionId!==this.sessionId}async signIn(){return await this.communicationIframeEstablishedPromise,this.signInInProgress=!0,this.doc.getWin().google.accounts.id.signIn(),this.updatedTokenPromise}}class Gn{constructor(t){this.Ds=t}async error(...t){await 0;const i=function(t){let s=null,i="";for(const e of t)e instanceof Error&&!s?s=Mn(e):(i&&(i+=" "),i+=e);return s?i&&(s.message=i+": "+s.message):s=new Error(i),s}(t);i.reported||(this.Ds.getWin().document.createElement("img").src="".concat(s,"/swg/_/SubscribewithgoogleClientUi/jserror?error=")+encodeURIComponent(String(i))+"&script="+encodeURIComponent("".concat(s,"/swg/js/v1/swg.js"))+"&line="+(i.lineNumber||1)+"&trace="+encodeURIComponent(i.stack||""),i.reported=!0)}}function Mn(t){const s=Object.getOwnPropertyDescriptor(t,"message");if(s&&s.writable)return t;const{lineNumber:i,message:e,reported:n,stack:r}=t,o=new Error(e);return o.lineNumber=i,o.stack=r,o.reported=n,o}const kn="swg-link";class Dn{constructor(t){this.bs=t,this.Ns=t.activities(),this.ni=t.pageConfig(),this.ci=t.dialogManager()}start(t={}){this.bs.callbacks().triggerFlowStarted(ws.LINK_ACCOUNT);const s=this.bs.config().windowOpenMode==bs.REDIRECT,i=t.ampReaderId?Lt({publicationId:this.ni.getPublicationId(),ampReaderId:t.ampReaderId}):Lt({publicationId:this.ni.getPublicationId()}),e=this.Ns.open(kn,Pt("/linkbackstart"),s?"_top":"_blank",i,{});return this.bs.eventManager().logSwgEvent(o.IMPRESSION_LINK),this.ci.popupOpened(e&&e.targetWin),Promise.resolve()}}class Un{constructor(t,s){this.bs=t,this.Xo=s,this.li=null,this.$o=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.Ii=t.entitlementsManager(),this.rr=t.callbacks(),this.Xo||(this.Xo={}),this.Qo=new Promise(t=>{this.$o=t})}static configurePending(t){t.activities().onResult(kn,async function(s){t.entitlementsManager().blockNextNotification(),t.callbacks().triggerLinkProgress(),t.dialogManager().popupClosed();try{const i=await Zt(s,Nt(),!1,!1);t.eventManager().logSwgEvent(o.ACTION_LINK_CONTINUE,!0),t.eventManager().logSwgEvent(o.EVENT_LINK_ACCOUNT_SUCCESS),new Un(t,i).start()}catch(i){t.entitlementsManager().unblockNextNotification(),es(i)?(t.eventManager().logSwgEvent(o.ACTION_LINK_CANCEL,!0),t.callbacks().triggerFlowCanceled(ws.LINK_ACCOUNT)):t.eventManager().logSwgEvent(o.ACTION_LINK_CONTINUE,!0)}})}
1async start(){if(this.Xo.saveAndRefresh)return this.t(this.Xo,!!this.Xo.linked),Promise.resolve();const t=this.Xo.index||"0";return this.li=new us(this.Os,this.Ns,Pt("/linkconfirmiframe",{},"u/"+t),Lt({productId:this.bs.pageConfig().getProductId(),publicationId:this.bs.pageConfig().getPublicationId()}),this.bs.clientConfigManager().getLanguage(),!0),this.Zo(),this.bs.eventManager().logSwgEvent(o.EVENT_GOOGLE_UPDATED,!0),this.bs.eventManager().logSwgEvent(o.IMPRESSION_GOOGLE_UPDATED,!0),this.ci.openView(this.li)}async Zo(){try{const t=await this.li.acceptResultAndVerify(Nt(),!0,!0);this.t(t,!!t.success)}catch(t){this.Os.setTimeout(()=>{throw t})}this.ci.completeView(this.li)}t(t,s){this.bs.eventManager().logSwgEvent(o.ACTION_GOOGLE_UPDATED_CLOSE,!0);const i=t.swgUserToken;i&&this.bs.storage().set($,i,!0),this.rr.triggerLinkComplete(),this.rr.resetLinkProgress(),this.Ii.setToastShown(!0),this.Ii.unblockNextNotification(),this.Ii.reset(s),this.$o()}whenComplete(){return this.Qo}}class xn{constructor(t,s){this.bs=t,this.be=s,this.sh=null,this.li=null,this.openPromise=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager()}getRequestPromise(){return this.sh}t(){this.ci.completeView(this.li)}async ih(t){if(this.t(),!t.linked)throw ns("not linked");this.ci.popupClosed(),this.bs.callbacks().triggerFlowStarted(ws.LINK_ACCOUNT),this.bs.eventManager().logSwgEvent(o.EVENT_SAVE_SUBSCRIPTION_SUCCESS);const s=new Un(this.bs,t);return await s.start(),this.bs.callbacks().triggerLinkProgress(),await s.whenComplete(),!0}async eh(t){if(t&&t.getRequested())try{const t=await this.be(),s=new N;if(null==t?void 0:t.token){if(t.authCode)throw new Error("Both authCode and token are available");s.setToken(t.token)}else{if(!(null==t?void 0:t.authCode))throw new Error("Neither token or authCode is available");s.setAuthCode(t.authCode)}return this.li.execute(s),t}catch(s){throw this.t(),s}}async start(){const t=this.Ns.addDefaultArguments({isClosable:!0});this.li=new us(this.Os,this.Ns,Pt("/linksaveiframe"),t,this.bs.clientConfigManager().getLanguage(),!1,!0),this.li.on(y,t=>{this.sh=this.eh(t)}),this.openPromise=this.ci.openView(this.li,!0),this.bs.eventManager().logSwgEvent(o.IMPRESSION_SAVE_SUBSCR_TO_GOOGLE);try{const t=await this.li.acceptResultAndVerify(Nt(),!0,!0);return await this.ih(t)}catch(s){if(this.t(),es(s))return this.bs.eventManager().logSwgEvent(o.ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL,!0),this.bs.callbacks().triggerFlowCanceled(ws.LINK_ACCOUNT),!1;throw s}}}class Fn{constructor(t){this.Rs=t.eventManager()}sendSubscriptionState(t,s){if(!Bs(Ns,t))throw new Error("Invalid subscription state provided");if((Ns.SUBSCRIBER==t||Ns.PAST_SUBSCRIBER==t)&&!s)throw new Error("Entitlements must be provided for users with active or expired subscriptions");if(s&&!Fs(s))throw new Error("Entitlements must be an Object");let i=null;s&&(i=JSON.stringify(s)),this.Rs.logEvent({eventType:o.EVENT_SUBSCRIPTION_STATE,eventOriginator:u.PUBLISHER_CLIENT,isFromUserAction:null,additionalParameters:{state:t,productsOrSkus:i}})}sendEvent(t){let s=null;if(!Bs(ys,t.name)||!xs(t.name))throw new Error("Invalid user event provided("+t.name+")");if(t.data){if(!Fs(t.data))throw new Error("Event data must be an Object("+t.data+")");s=Object.assign({},s,t.data)}if(Ws(t.active))s||(s={}),Object.assign(s,{is_active:t.active});else if(null!=t.active)throw new Error("Event active must be a boolean");this.Rs.logEvent({eventType:xs(t.name),eventOriginator:u.PUBLISHER_CLIENT,isFromUserAction:t.active,additionalParameters:s})}}class Bn{constructor(t){this.bs=t,this.openViewPromise=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.li=new us(this.Os,this.Ns,Pt("/loginiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),userConsent:!1}),this.bs.clientConfigManager().getLanguage(),!0)}async start(){this.bs.callbacks().triggerFlowStarted(ws.SHOW_LOGIN_NOTIFICATION),this.openViewPromise=this.ci.openView(this.li);try{await this.li.acceptResult()}catch(t){throw this.ci.completeView(this.li),t}this.ci.completeView(this.li)}}class Vn{constructor(t){this.bs=t,this.openViewPromise=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.li=new us(this.Os,this.Ns,Pt("/loginiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),userConsent:!0}),this.bs.clientConfigManager().getLanguage(),!0)}async start(){this.bs.callbacks().triggerFlowStarted(ws.SHOW_LOGIN_PROMPT),this.openViewPromise=this.ci.openView(this.li);try{await this.li.acceptResult()}catch(t){throw es(t)?this.bs.callbacks().triggerFlowCanceled(ws.SHOW_LOGIN_PROMPT):this.ci.completeView(this.li),t}this.ci.completeView(this.li)}}
1class Wn{constructor(t,s){this.Go=t,this.Ts=s}getOffers(t=this.Go.getProductId()){if(!t)throw new Error("getOffers requires productId in config or arguments");return this.Ir(t)}async Ir(t){const s=yt("/publication/"+encodeURIComponent(this.Go.getPublicationId())+"/offers?label="+encodeURIComponent(t));return(await this.Ts.fetchCredentialedJson(s)).offers||[]}}class zn{constructor(t,s){let i,e,n;const r=t.indexOf(":");-1!=r?(e=t,i=e.substring(0,r),n=e.substring(r+1)):(i=t,e=null,n=null),this.Er=i,this.nh=e,this.S=n,this.rh=s}getPublicationId(){return this.Er}getProductId(){return this.nh}getLabel(){return this.S}isLocked(){return this.rh}}const jn="__SWG-SEEN__",Yn=["CreativeWork","Article","NewsArticle","Blog","Comment","Course","HowTo","Message","Review","WebPage"],Kn=new RegExp(Yn.join("|"));class qn{constructor(t){this.oh=null,this.hh=null,this.Ds=en(t),this.ah=new Promise((t,s)=>{this.oh=t,this.hh=s}),this.uh=new Jn(this.Ds),this.dh=new Xn(this.Ds),this.gh=new $n(this.Ds)}resolveConfig(){return Promise.resolve().then(this.check.bind(this)),this.Ds.whenReady().then(this.check.bind(this)),this.ah}check(){if(!this.oh||!this.hh)return null;const t=this.uh.check()||this.dh.check()||this.gh.check();return t?(this.oh(t),this.oh=null,this.hh=null):this.Ds.isReady()&&(this.hh("No config could be discovered in the page"),this.oh=null,this.hh=null),at(t),t}}class Hn{checkValue(t,s){return!("string"!=typeof t&&!Array.isArray(t))&&this.ph(this.Eh(t),s)}checkSpaceDelimitedList(t,s){const i=t.split(/\s+/);return this.ph(i,s)}ph(t,s){for(let i of t)if(i=i.replace(/^http:\/\/schema.org\//i,""),s.includes(i))return!0;return!1}Eh(t){return Array.isArray(t)?t:[t]}}class Jn{constructor(t){this.Ds=t}check(){if(!this.Ds.getBody())return null;const t=Qn(this.Ds.getRootNode(),"subscriptions-product-id");if(!t)return null;const s=Qn(this.Ds.getRootNode(),"subscriptions-accessible-for-free"),i=!(!s||"false"!==s.toLowerCase());return new zn(t,i)}}class Xn{constructor(t){this.Ds=t,this._h=new Hn}check(){if(!this.Ds.getBody())return null;const t=this.Ds.isReady(),s=Array.from(this.Ds.getRootNode().querySelectorAll('script[type="application/ld+json"]'));for(let i=0;i<s.length;i++){const e=s[i];if(e[jn]||!e.textContent||!t&&!is(e))continue;if(e[jn]=!0,!Kn.test(e.textContent))continue;const n=this.mh(e);if(n)return n}return null}mh(t){let s=si(t.textContent);if(!s)return null;Array.isArray(s)||(s=[s]);let i=s;for(let e=0;e<i.length;e++){const t=i[e];if(t["@graph"]&&Array.isArray(t["@graph"])&&(i=i.concat(t["@graph"])),!this._h.checkValue(t["@type"],Yn))continue;let s=null;const n=this.fh(t,"isPartOf");if(n)for(let i=0;i<n.length&&(s=this.wh(n[i]),!s);i++);if(!s)continue;const r=this.Ih(this.bh(t,"isAccessibleForFree"),!0);return new zn(s,!r)}return null}Ih(t,s){if("boolean"==typeof t)return t;if("string"==typeof t){const s=t.toLowerCase();if("false"===s)return!1;if("true"===s)return!0}return s}wh(t){return this._h.checkValue(t["@type"],["Product"])?this.bh(t,"productID"):null}fh(t,s){const i=t[s];return null==i||""===i?null:Array.isArray(i)?i:[i]}bh(t,s){const i=this.fh(t,s),e=i&&i[0];return null==e||""===e?null:e}}class $n{constructor(t){this.Ds=t,this.Th=null,this.nh=null,this._h=new Hn}Rh(t){const s=t.querySelectorAll("[itemprop='isAccessibleForFree']");for(let i=0;s[i];i++){const t=s[i],e=t.getAttribute("content")||t.textContent;if(e&&this.Sh(t,"alreadySeenForAccessInfo")){let t=null;return"true"===e.toLowerCase()?t=!0:"false"===e.toLowerCase()&&(t=!1),t}}return null}Sh(t,s){for(let i=t;i&&!i[s];i=i.parentNode)if(i[s]=!0,i.hasAttribute&&i.hasAttribute("itemscope")&&i.hasAttribute("itemtype")){const t=i.getAttribute("itemtype");return this._h.checkSpaceDelimitedList(t,Yn)}return!1}wh(t){const s=t.querySelectorAll('[itemprop="productID"]');for(let i=0;s[i];i++){const t=s[i],e=t.getAttribute("content")||t.textContent,n=t.closest("[itemtype][itemscope]");if(!(n.getAttribute("itemtype").indexOf("http://schema.org/Product")<=-1)&&this.Sh(n.parentElement,"alreadySeenForProductInfo"))return e}return null}Ah(){let t=null;return null!=this.Th?t=!this.Th:this.Ds.isReady()&&(t=!1),null!=this.nh&&null!=t?new zn(this.nh,t):null}mh(){const t=Array.prototype.slice.call(this.Ds.getRootNode().querySelectorAll("[itemscope][itemtype]")).filter(t=>this._h.checkSpaceDelimitedList(t.getAttribute("itemtype"),Yn));for(const s of t){null==this.Th&&(this.Th=this.Rh(s)),this.nh||(this.nh=this.wh(s));const t=this.Ah();if(t)return t}return null}check(){return this.Ds.getBody()?this.mh():null}}function Qn(t,s){const i=t.querySelector('meta[name="'.concat(s,'"]'));return i?i.getAttribute("content"):null}const Zn=se(we),tr=2147483647,sr={Environment:{LOCAL:"LOCAL",PREPROD:"PREPROD",PRODUCTION:"PRODUCTION",SANDBOX:"SANDBOX",TEST:"TEST",TIN:"TIN"}
1,PaymentMethod:{CARD:"CARD",TOKENIZED_CARD:"TOKENIZED_CARD",UPI:"UPI"},AuthMethod:{CRYPTOGRAM_3DS:"CRYPTOGRAM_3DS",PAN_ONLY:"PAN_ONLY"},ResponseStatus:{CANCELED:"CANCELED",DEVELOPER_ERROR:"DEVELOPER_ERROR"},TotalPriceStatus:{ESTIMATED:"ESTIMATED",FINAL:"FINAL",NOT_CURRENTLY_KNOWN:"NOT_CURRENTLY_KNOWN"},ButtonType:{SHORT:"short",LONG:"long"},ButtonColor:{DEFAULT:"default",BLACK:"black",WHITE:"white"},Id:{POPUP_WINDOW_CONTAINER:"popup-window-container"},STORAGE_KEY_PREFIX:"google.payments.api.storage"};sr.IS_READY_TO_PAY_RESULT_KEY=sr.STORAGE_KEY_PREFIX+".isreadytopay.result",sr.UPI_CAN_MAKE_PAYMENT_CACHE_KEY=sr.STORAGE_KEY_PREFIX+".upi.canMakePaymentCache",sr.CLASS_PREFIX="google-payments-",sr.IFRAME_ACTIVE_CONTAINER_CLASS="".concat(sr.CLASS_PREFIX,"activeContainer"),sr.IFRAME_CONTAINER_CLASS="".concat(sr.CLASS_PREFIX,"dialogContainer"),sr.IFRAME_STYLE_CENTER_CLASS="".concat(sr.CLASS_PREFIX,"dialogCenter"),sr.IFRAME_STYLE_CLASS="".concat(sr.CLASS_PREFIX,"dialog"),sr.IFRAME_STYLE="\n.".concat(sr.IFRAME_STYLE_CLASS," {\n    animation: none 0s ease 0s 1 normal none running;\n    background: none 0 0 / auto repeat scroll padding-box border-box #fff;\n    background-blend-mode: normal;\n    border: 0 none #333;\n    border-radius: 8px 8px 0 0;\n    border-collapse: separate;\n    bottom: 0;\n    box-shadow: #808080 0 3px 0 0, #808080 0 0 22px;\n    box-sizing: border-box;\n    letter-spacing: normal;\n    max-height: 100%;\n    overflow: visible;\n    position: fixed;\n    width: 100%;\n    z-index: ").concat(tr,";\n    -webkit-appearance: none;\n    left: 0;\n}\n@media (min-width: 480px) {\n  .").concat(sr.IFRAME_STYLE_CLASS," {\n    width: 480px !important;\n    left: -240px !important;\n    margin-left: calc(100vw - 100vw / 2) !important;\n  }\n}\n.").concat(sr.IFRAME_CONTAINER_CLASS," {\n  background-color: rgba(0,0,0,0.26);\n  bottom: 0;\n  height: 100%;\n  left: 0;\n  position: absolute;\n  right: 0;\n}\n.iframeContainer {\n  -webkit-overflow-scrolling: touch;\n}\n"),sr.IFRAME_STYLE_CENTER="\n.".concat(sr.IFRAME_STYLE_CENTER_CLASS," {\n  animation: none 0s ease 0s 1 normal none running;\n  background-blend-mode: normal;\n  background: none 0 0 / auto repeat scroll padding-box border-box #fff;\n  border-collapse: separate;\n  border-radius: 8px;\n  border: 0px none #333;\n  bottom: auto;\n  box-shadow: #808080 0 0 22px;\n  box-sizing: border-box;\n  left: -240px;\n  letter-spacing: normal;\n  margin-left: calc(100vw - 100vw / 2) !important;\n  max-height: 90%;\n  overflow: visible;\n  position: absolute;\n  top: 100%;\n  transform: scale(0.8);\n  width: 480px;\n  z-index: ").concat(tr,";\n  -webkit-appearance: none;\n}\n@media (min-height: 667px) {\n  .").concat(sr.IFRAME_STYLE_CENTER_CLASS," {\n    max-height: 600px;\n  }\n}\n.").concat(sr.IFRAME_ACTIVE_CONTAINER_CLASS," {\n  top: 50%;\n  transform: scale(1.0) translateY(-50%);\n}\n"),sr.GPAY_BUTTON_WITH_CARD_INFO_IMAGE="background-image: url(https://pay.google.com/gp/p/generate_gpay_btn_img);",sr.BUTTON_LOCALE_TO_MIN_WIDTH={en:152,bg:163,cs:192,de:183,es:183,fr:183,hr:157,id:186,ja:148,ko:137,ms:186,nl:167,pl:182,pt:193,ru:206,sk:157,sl:211,sr:146,tr:161,uk:207,zh:156},sr.GPAY_GRAYPANE="gpay-graypane",sr.GPAY_BUTTON_CLASS="gpay-button",sr.BUTTON_STYLE="\n.".concat(sr.GPAY_BUTTON_CLASS," {\n  background-origin: content-box;\n  background-position: center center;\n  background-repeat: no-repeat;\n  background-size: contain;\n  border: 0px;\n  border-radius: 4px;\n  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 1px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;\n  cursor: pointer;\n  height: 40px;\n  min-height: 40px;\n  padding: 11px 24px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black {\n  background-color: #000;\n  box-shadow: none;\n  padding: 12px 24px 10px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white {\n  background-color: #fff;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".short {\n  min-width: 90px;\n  width: 160px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black.short {\n  background-image: url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg);\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.short {\n  background-image: url(https://www.gstatic.
1com/instantbuy/svg/light_gpay.svg);\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black.active {\n  background-color: #5f6368;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black.hover {\n  background-color: #3c4043;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.active {\n  background-color: #fff;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.focus {\n  box-shadow: #e8e8e8 0 1px 1px 0, #e8e8e8 0 1px 3px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.hover {\n  background-color: #f8f8f8;\n}\n"),sr.GPAY_BUTTON_WITH_OFFER_ICON_ADDITIONAL_STYLE="position: relative;",sr.GPAY_OFFER_ICON_CLASS="gpay-offer-icon",sr.GPAY_OFFER_ICON_SVG='<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="gpay-offer-icon"><defs><path d="M19.41,9.58 L10.41,0.58 C10.05,0.22 9.55,0 9,0 L2,0 C0.9,0 0,0.9 0,2 L0,9 C0,9.55 0.22,10.05 0.59,10.42 L9.59,19.42 C9.95,19.78 10.45,20 11,20 C11.55,20 12.05,19.78 12.41,19.41 L19.41,12.41 C19.78,12.05 20,11.55 20,11 C20,10.45 19.77,9.94 19.41,9.58 Z" id="path-1"></path></defs><g id="buttons_10.05" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Artboard" transform="translate(-40.000000, -43.000000)"><g id="Group-3" transform="translate(40.000000, 43.000000)"><g id="Group-2-Copy-2"><g id="Group-Copy"><g id="ic_loyalty_24px"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="gpay-Shape" fill="#FF6100" fill-rule="nonzero" xlink:href="#path-1"></use><path d="M3.5,5 C2.67,5 2,4.33 2,3.5 C2,2.67 2.67,2 3.5,2 C4.33,2 5,2.67 5,3.5 C5,4.33 4.33,5 3.5,5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-2)"></path></g></g></g><g id="Group-13-Copy-7" transform="translate(6.000000, 6.000000)" fill="#FFFFFF" fill-rule="nonzero"><g id="Group-13-Copy-2"><path d="M2.15217391,4.55172414 C0.963561082,4.55172414 1.99840144e-14,3.53278598 1.99840144e-14,2.27586207 C1.99840144e-14,1.01893816 0.963561082,6.30606678e-14 2.15217391,6.30606678e-14 C3.34078674,6.30606678e-14 4.30434783,1.01893816 4.30434783,2.27586207 C4.30434783,3.53278598 3.34078674,4.55172414 2.15217391,4.55172414 Z M2.15217391,3.31034483 C2.69245247,3.31034483 3.13043478,2.84719112 3.13043478,2.27586207 C3.13043478,1.70453302 2.69245247,1.24137931 2.15217391,1.24137931 C1.61189535,1.24137931 1.17391304,1.70453302 1.17391304,2.27586207 C1.17391304,2.84719112 1.61189535,3.31034483 2.15217391,3.31034483 Z" id="Combined-Shape"></path><path d="M6.84782609,9 C5.65921326,9 4.69565217,7.98106184 4.69565217,6.72413793 C4.69565217,5.46721402 5.65921326,4.44827586 6.84782609,4.44827586 C8.03643892,4.44827586 9,5.46721402 9,6.72413793 C9,7.98106184 8.03643892,9 6.84782609,9 Z M6.84782609,7.75862069 C7.38810465,7.75862069 7.82608696,7.29546698 7.82608696,6.72413793 C7.82608696,6.15280888 7.38810465,5.68965517 6.84782609,5.68965517 C6.30754753,5.68965517 5.86956522,6.15280888 5.86956522,6.72413793 C5.86956522,7.29546698 6.30754753,7.75862069 6.84782609,7.75862069 Z" id="Combined-Shape"></path><polygon id="Rectangle" transform="translate(4.497720, 4.541938) rotate(34.000000) translate(-4.497720, -4.541938) " points="3.77901778 -0.202295978 4.9740273 -0.171019161 5.21642263 9.28617278 4.02141311 9.25489596"></polygon></g></g></g></g></g></svg>',sr.GPAY_OFFER_ICON_STYLE="\n.".concat(sr.GPAY_OFFER_ICON_CLASS," {\n  position: absolute;\n  right: -5px;\n  top: -5px;\n}\n\n#ic_loyalty_24px use.hover {\n  fill: #FC853B;\n}\n"),sr.GPAY_OFFER_DESCRIPTION_CLASS="gpay-offer-description",sr.GPAY_OFFER_DESCRIPTION_STYLE="\n@import url(//fonts.googleapis.com/css?family=Google+Sans:500);\n.".concat(sr.GPAY_OFFER_DESCRIPTION_CLASS," {\n  text-align: center;\n  font: 10px 'Google Sans';\n  margin-top: 2px;\n  margin-bottom: 0px;\n}\n\n.").concat(sr.GPAY_OFFER_DESCRIPTION_CLASS,".gpay-btn-clicked {\n  color: #3C4043;\n}\n\n.").concat(sr.GPAY_OFFER_DESCRIPTION_CLASS,".short {\n  min-width: 90px;\n  width: 160px;\n}\n\n.").concat(sr.GPAY_OFFER_DESCRIPTION_CLASS,".long {\n  min-width: 152px;\n  width: 240px;\n}\n"),sr.GPAY_BUTTON_CARD_INFO_CLASS="gpay-card-info-btn",sr.GPAY_BUTTON_CARD_INFO_BUTTON_STYLE="\n  .".concat(sr.GPAY_BUTTON_CARD_INFO_CLASS," {\n    background-origin: content-box;\n    background-position: center center;\n    background-repeat: no-repeat;\n    background-size: contain;\n    border: 0px;\n    border-radius: 4px;\n    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 1px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;\n    cursor: pointer;\n    height: 40px;\n    min-height: 40px;\n    padding: 11px 24px;\n    background-color: #000;\n    box-shadow: none;\n    padding: 9px 24px 10px;\n    min-width: 190px;\n    width: 240px;\n  }\n\n  .").concat(sr.GPAY_BUTTON_CARD_INFO_CLASS,".active {\n    background-color: #5f6368;\n  }\n\n  .").concat(sr.GPAY_BUTTON_CARD_INFO_CLASS,".hover {\n    background-color: #3c4043;\n  }\n  "),sr.TRUSTED_DOMAIN=".google.com";class ir{constructor(t){this.Ch=t}postMessage(t,s){this.Ch.postMessage(t,s)}}let er=null,nr=null,rr=null,or=null,hr=Date.now(),ar=null,lr=!1,ur=[];class cr{static load(){if(er)return;const t=window.gpayInitParams||{};rr=t.environment||sr.Environment.PRODUCTION,er=document.createElement("iframe"),er.src=cr.Oh(window.location.origin,t.merchantInfo&&t.merchantInfo.merchantId),cr.postMessage({eventType:15,clientLatencyStartMs:Date.now()}),er.height="0",er.width="0",er.style.display="none",er.style.visibility="hidden",er.onload=function(){cr.postMessage({eventType:17,clientLatencyStartMs:Date.now()}),cr.iframeLoaded()},document.body?cr.Nh():document.addEventListener("DOMContentLoaded",()=>cr.Nh())}static Nh(){document.body.appendChild(er),nr=new ir(er.contentWindow)}static sendAndWaitForResponse(t,s,i,e){cr.yh(function t(s){s.data[i]&&(e(s),cr.Ph(t))});const n=Object.assign({eventType:s},t);cr.postMessage(n)}static yh(t){window.addEventListener("message",t)}static Ph(t){window.removeEventListener("message",t)}static postMessage(t){if(!lr)return void ur.push(t);const s=Object.assign({buyFlowActivityMode:ar,googleTransactionId:or,originTimeMs:hr},t);nr.postMessage(s,cr.Lh())}static setBuyFlowActivityMode(t){ar=t}static setGoogleTransactionId(t){or=t}static setOriginTimeMs(t){hr=t}static setPostMessageService(t){nr=t}static reset(){er=null,ur.length=0,lr=!1,ar=null}static setIframeLoaded(t){lr=t}static iframeLoaded(){lr=!0,ur.forEach(function(t){cr.postMessage(t)}),ur.length=0}static getBuffer(){return ur}static injectIframeForTesting(){cr.reset(),er=document.createElement("p"),cr.iframeLoaded()}static Lh(){let t="https://pay";return rr==sr.Environment.SANDBOX?t+=".sandbox":rr==sr.Environment.PREPROD&&(t+="-preprod.sandbox"),t+".google.com"}static Oh(t,s){return"https://pay".concat(rr==sr.Environment.PREPROD?"-preprod.sandbox":rr==sr.Environment.SANDBOX?".sandbox":"",".google.com/gp/p/ui/payframe?origin=").concat(t,"&mid=%{merchantId}")}}class dr{constructor(t){this.Gh=t,this.be=null}onResult(t){this.be=t}isReadyToPay(t){const s=this.Mh(t);return new Promise((i,e)=>{s.canMakePayment().then(s=>{window.sessionStorage.setItem(sr.IS_READY_TO_PAY_RESULT_KEY,s.toString());const e={result:s};t.apiVersion>=2&&t.existingPaymentMethodRequired&&(e.paymentMethodPresent=s),i(e)}).catch(function(t){window.sessionStorage.getItem(sr.IS_READY_TO_PAY_RESULT_KEY)?i({result:"true"==window.sessionStorage.getItem(sr.IS_READY_TO_PAY_RESULT_KEY)}):i({result:!1})})})}prefetchPaymentData(t){this.Mh(t,this.Gh,t.transactionInfo.currencyCode,t.transactionInfo.totalPrice)}loadPaymentData(t){this.kh(t)}Mh(t,s,i,e){let n={};return t&&(n=JSON.parse(JSON.stringify(t))),n.apiVersion||(n.apiVersion=1),n.swg&&(n.allowedPaymentMethods=[sr.PaymentMethod.CARD]),s&&s==sr.Environment.TEST&&(n.environment=s),new PaymentRequest([{supportedMethods:["https://google.com/pay"],data:n}],{total:{label:"Estimated Total Price",amount:{currency:i||"USD",value:e||"0"}}})}kh(t){const s=t.transactionInfo&&t.transactionInfo.currencyCode||void 0,i=t.transactionInfo&&t.transactionInfo.totalPrice||void 0,e=this.Mh(t,this.Gh,s,i);this.be(e.show().then(t=>
1(t.complete("success"),t.details)).catch(function(t){throw t.statusCode=sr.ResponseStatus.CANCELED,t}))}}class gr{constructor(t){this.Ds=t,this.Dh=t.createElement(sr.GPAY_GRAYPANE),pr(this.Dh,{"z-index":2147483647,display:"none",position:"fixed",top:0,right:0,bottom:0,left:0,"background-color":"rgba(32, 33, 36, .6)"}),this.Uh=null,this.Dh.addEventListener("click",()=>{if(this.Uh)try{this.Uh.focus()}catch(t){}})}show(t){return this.Uh=t||null,this.Ds.body.appendChild(this.Dh),pr(this.Dh,{display:"block",opacity:0}),Er(this.Dh,{opacity:1},300,"ease-out")}hide(){if(this.Uh=null,this.Dh.parentElement)return Er(this.Dh,{opacity:0},300,"ease-out").then(()=>{pr(this.Dh,{display:"none"}),this.Ds.body.removeChild(this.Dh)})}}function pr(t,s){for(const i in s)t.style.setProperty(i,s[i].toString(),"important")}function Er(t,s,i,e){const n=t.ownerDocument.defaultView,r=t.style.transition||"";return new Promise(r=>{n.setTimeout(()=>{n.setTimeout(r,i);const o="".concat(i,"ms ").concat(e);pr(t,Object.assign({transition:"transform ".concat(o,", opacity ").concat(o)},s))})}).then(()=>{pr(t,Object.assign({transition:r},s))})}function _r(){if(-1!=window.navigator.userAgent.indexOf("OPR/"))return!1;const t=window.navigator.userAgent.match(/Android/i),s=window.navigator.userAgent.match(/Chrome\/([0-9]+)\./i);return null!=t&&"PaymentRequest"in window&&"Google Inc."==window.navigator.vendor&&null!=s&&Number(s[1])>=59}function mr(t){if(t.apiVersion>=2){const s=Sr(t);if(s&&1==s.length&&s[0]==sr.AuthMethod.CRYPTOGRAM_3DS)return!0}return 1==t.allowedPaymentMethods.length&&t.allowedPaymentMethods[0]==sr.PaymentMethod.TOKENIZED_CARD}function fr(t,s){if(t.apiVersion>=2){const i=Sr(t);return!(!i||!i.includes(s))}return!1}function wr(){return window.location.hostname.endsWith(sr.TRUSTED_DOMAIN)||void 0===window.isSecureContext||window.isSecureContext?null:"Google Pay APIs should be called in secure context!"}function Ir(t){return Object.values(sr.PaymentMethod).includes(t)}function br(t){return Object.values(sr.AuthMethod).includes(t)}function Tr(t){if(!t)return"paymentDataRequest must be set!";if(t.swg)return(s=t.swg)?s.skuId&&s.publicationId?null:"Both skuId and publicationId must be provided":"Swg parameters must be provided";var s;if(!t.transactionInfo)return"transactionInfo must be set!";if(!t.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set!";if(!t.transactionInfo.totalPriceStatus||!Object.values(sr.TotalPriceStatus).includes(t.transactionInfo.totalPriceStatus))return"totalPriceStatus in transactionInfo must be set to one of NOT_CURRENTLY_KNOWN, ESTIMATED or FINAL!";if("NOT_CURRENTLY_KNOWN"!==t.transactionInfo.totalPriceStatus&&!t.transactionInfo.totalPrice)return"totalPrice in transactionInfo must be set when totalPriceStatus is ESTIMATED or FINAL!";const i=Rr(t);if(i){if(!i.parameters)return"parameters must be set in allowedPaymentMethod!";var e=i.parameters;if(!e.payeeVpa)return"payeeVpa in allowedPaymentMethod parameters must be set!";if(!e.payeeName)return"payeeName in allowedPaymentMethod parameters must be set!";if(!e.referenceUrl)return"referenceUrl in allowedPaymentMethod parameters must be set!";if(!e.mcc)return"mcc in allowedPaymentMethod parameters must be set!";if(!e.transactionReferenceId)return"transactionReferenceId in allowedPaymentMethod parameters must be set!";if("INR"!==t.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set to INR!";if("FINAL"!==t.transactionInfo.totalPriceStatus)return"totalPriceStatus in transactionInfo must be set to FINAL!";if(!t.transactionInfo.transactionNote)return"transactionNote in transactionInfo must be set!"}return null}function Rr(t){return!_r()||t.apiVersion<2||!t.allowedPaymentMethods?null:Ar(t,sr.PaymentMethod.UPI)}function Sr(t){if(t.allowedPaymentMethods){const s=Ar(t,sr.PaymentMethod.CARD);if(s&&s.parameters)return s.parameters.allowedAuthMethods}return null}function Ar(t,s){for(var i=0;i<t.allowedPaymentMethods.length;i++){const e=t.allowedPaymentMethods[i];if(e.type==s)return e}return null}const{ActivityPort:Cr,ActivityPorts:Or,ActivityIframePort:Nr}=Zn,yr="GPAY",vr="height ".concat(250,"ms"),Pr="Safari";class Lr{constructor(t,s,i,e,n){this.Gh=t,this.activities=e||new Or(window),this.vr=new gr(window.document),this.be=null,this.xh=null,this.Fh=!1,this.Ms=null,this.Bh=null,this.Vh=s,this.Wh=n||null,this.jh=null}onResult(t){this.be||(this.be=t,this.activities.onResult(yr,this.Yh.bind(this)))}Yh(t){this.vr.hide(),this.be(t.acceptResult().then(t=>{if(t.origin!=this.Kh())throw new Error("channel mismatch");const s=t.data;if(s.redirectEncryptedCallbackData)return cr.setBuyFlowActivityMode(3),this.qh(s.redirectEncryptedCallbackData).then(t=>{const i=Object.assign({},s);return delete i.redirectEncryptedCallbackData,Object.assign(i,t)});if(!t.originVerified||!t.secureChannel)throw new Error("channel mismatch");return s},t=>{const s=t.message;let i=t.message;try{i=JSON.parse(s.substring(7))}catch(e){}return i.statusCode&&-1==["DEVELOPER_ERROR","MERCHANT_ACCOUNT_ERROR"].indexOf(i.statusCode)&&(i={statusCode:"CANCELED"}),"AbortError"==i&&(i={statusCode:"CANCELED"}),Promise.reject(i)}))}qh(t){return new Promise((s,i)=>{const e=this.Hh(),n=new XMLHttpRequest;
1n.open("POST",e,!0),"withCredentials"in n&&(n.withCredentials=!0),n.onreadystatechange=()=>{if(!(n.readyState<2)){if(n.status<100||n.status>599)return n.onreadystatechange=null,void i(new Error("Unknown HTTP status ".concat(n.status)));if(4==n.readyState)try{s(JSON.parse(n.responseText))}catch(t){i(t)}}},n.onerror=()=>{i(new Error("Network failure"))},n.onabort=()=>{i(new Error("Request aborted"))},n.send(t)})}isReadyToPay(t){return new Promise((s,i)=>{if(mr(t))return void s({result:!1});const e=window.navigator.userAgent;if(e.indexOf("GSA/")>0&&e.indexOf(Pr)>0)return void s({result:!1});if(e.indexOf("FxiOS")>0)return void s({result:!1});const n=e.indexOf("Chrome")>0||e.indexOf("Firefox")>0||e.indexOf(Pr)>0;n&&t.apiVersion>=2&&t.existingPaymentMethodRequired?(t.environment=this.Gh,cr.sendAndWaitForResponse(t,6,"isReadyToPayResponse",i=>{const e={result:n};t.existingPaymentMethodRequired&&(e.paymentMethodPresent="READY_TO_PAY"==i.data.isReadyToPayResponse),s(e)})):s({result:n})})}prefetchPaymentData(t){}loadPaymentData(t){t.swg||t.apiVersion||(t.apiVersion=1),t.environment=this.Gh,cr.setBuyFlowActivityMode(t.forceRedirect?3:2);const s=this.activities.open(yr,this.Jh(this.Xh(t)),this.$h(t),t,{width:600,height:600});this.vr.show(s&&s.targetWin)}$h(t){return t.forceRedirect?"_top":"gp-js-popup"}Kh(){if(this.Gh==sr.Environment.LOCAL)return"";let t;return t=this.Gh==sr.Environment.PREPROD?"pay-preprod.sandbox":this.Gh==sr.Environment.SANDBOX?"pay.sandbox":"pay","https://"+t+".google.com"}Qh(){return this.Kh()+"/gp/p"}Hh(){let t=this.Qh()+"/apis/buyflow/process";return this.Wh&&(t+="?rk="+encodeURIComponent(this.Wh)),t}Xh(t){const s=t.swg;if(s)return s.swgVersion}Jh(t){if(this.Gh==sr.Environment.TIN)return"/ui/pay";let s=this.Qh()+"/ui/pay?swg=true";return t&&(s=s+"&swgVersion="+t),s}getIframeUrl(t,s,i){let e="https://pay.google.com/gp/p/ui/pay?origin=".concat(s,"&swg=true");return t!=sr.Environment.SANDBOX&&t!=sr.Environment.PREPROD||(e="https://pay'+  (environment == Constants.Environment.PREPROD ? '-preprod' : '')+  '.sandbox.google.com/gp/p/ui/pay?origin=".concat(s,"&swg=true")),i&&(e=e+"&swgVersion="+i),e}Zh(t,s){this.sa(s,"all 250ms ease 0s"),s.height="0px",setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},250)}ia(t){const s=function(t){const s=document.createElement("div");s.classList.add(sr.IFRAME_CONTAINER_CLASS);const i=document.createElement("div");i.classList.add("iframeContainer");const e=document.createElement("iframe");return e.classList.add(t),e.setAttribute("frameborder","0"),e.setAttribute("scrolling","no"),i.appendChild(e),s.appendChild(i),document.body.appendChild(s),{container:s,iframe:e}}(this.ea(t)?sr.IFRAME_STYLE_CENTER_CLASS:sr.IFRAME_STYLE_CLASS),i=s.iframe,e=s.container;return e.addEventListener("click",this.na.bind(this,s)),e.style.display="none",i.style.display="none",i.height="0px",this.sa(i,"all 250ms ease 0s"),this.Fh=!1,s}ra(t){this.oa(t)}na(t){t.container.parentNode&&history.back()}oa(t){t.container.parentNode&&(this.Bh(Promise.reject({errorCode:"CANCELED"})),this.Zh(t.container,t.iframe),this.Ms&&this.Ms.disconnect())}ea(t){return null}
1ha(t,s,i){t.style.display="block",s.style.display="block",setTimeout(()=>{s.height="280px",this.ea(i)&&s.classList.add(sr.IFRAME_ACTIVE_CONTAINER_CLASS),setTimeout(()=>{this.Fh=!0,this.jh&&(this.sa(s,this.jh.transition),s.height=this.jh.height,this.jh=null)},250)},1)}sa(t,s){t.style.setProperty("transition",s),t.style.setProperty("-webkit-transition",s)}aa(t,s,i){let e;i.swg||i.apiVersion||(i.apiVersion=1),i.environment=this.Gh;const n=this.getIframeUrl(this.Gh,window.location.origin,this.Xh(i));return this.activities.openIframe(s,n,i).then(t=>(this.Ms=t,t.onMessage(t=>{"resize"===t.type&&this.Fh?(e||(e=Date.now()),Date.now()<e+250?this.sa(s,t.transition+", "+vr):this.sa(s,t.transition),s.height=t.height):this.jh={height:t.height,transition:t.transition}}),t.acceptResult())).then(i=>(this.Zh(t,s),history.back(),i.data),i=>(this.Zh(t,s),history.back(),Promise.reject(i)))}}class Gr{constructor(){}isUpiRequest(t){return!!Rr(t)}isReadyToPay(t){if(Rr(t))return t.existingPaymentMethodRequired?Promise.resolve({result:!0,paymentMethodPresent:!0}):Promise.resolve({result:!0});throw new Error("No Upi payment method found in handler")}loadPaymentData(t,s,i){const e=s.parameters,n=t.transactionInfo,r=[{supportedMethods:["https://tez.google.com/pay"],data:{pa:e.payeeVpa,pn:e.payeeName,tr:e.transactionReferenceId,url:e.referenceUrl,mc:e.mcc,tn:n.transactionNote}}];e.transactionId&&(r[0].data.tid=e.transactionId);const o={total:{label:"Total",amount:{currency:n.currencyCode,value:n.totalPrice}},displayItems:[{label:"Original Amount",amount:{currency:n.currencyCode,value:n.totalPrice}}]};let h=new PaymentRequest(r,o);i(this.la(h).then(t=>t?this.ua(h):this.ca()).then(i=>this.Ea(i,t,s)).catch(t=>(t.statusCode=sr.ResponseStatus.CANCELED,Promise.reject(t))))}ua(t){return t.show().then(t=>(t.complete("success"),t.details))}la(t){const s=window.sessionStorage.getItem(sr.UPI_CAN_MAKE_PAYMENT_CACHE_KEY);return s?Promise.resolve("true"===s):t.canMakePayment?t.canMakePayment().then(t=>(t&&window.sessionStorage.setItem(sr.UPI_CAN_MAKE_PAYMENT_CACHE_KEY,t.toString()),t)):Promise.resolve(!0)}ca(){return window.location.replace("https://play.google.com/store/apps/details?id=com.google.android.apps.nbu.paisa.user"),Promise.reject({errorMessage:"Cannot redirect to Tez page in Google Play."})}Ea(t,s,i){const e=JSON.parse(t.tezResponse);if("FAILURE"===e.Status){let t;switch(e.responseCode){case"ZM":t={errorCode:3,errorMessage:"Payment failure due to invalid MPIN."};break;case"Z9":t={errorCode:3,errorMessage:"Payment failure due to insufficient funds."};break;case"91":t={errorCode:1,errorMessage:"Payment failure due to transaction timeout or connection issue."};break;default:t={errorMessage:"Payment cancelled."}}return Promise.reject(t)}const n={paymentMethodType:"UPI",payeeVpa:i.parameters.payeeVpa,status:e.Status,transactionReferenceId:i.parameters.transactionReferenceId,transactionId:i.parameters.transactionId?i.parameters.transactionId:e.txnId,transactionInfo:s.transactionInfo};let r={apiVersion:s.apiVersion,apiVersionMinor:s.apiVersionMinor,paymentMethodData:{type:i.type,tokenizationData:{type:"DIRECT",token:{protocolVersion:"ECv1",signature:"",signedMessage:n}}}};return Promise.resolve(r)}}class Mr{}var kr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Mr.uuid=function(t,s){var i,e,n=kr,r=[];if(s=s||n.length,t)for(i=0;i<t;i++)r[i]=n[0|Math.random()*s];else for(r[8]=r[13]=r[18]=r[23]="-",r[14]="4",i=0;i<36;i++)r[i]||(e=0|16*Math.random(),r[i]=n[19==i?3&e|8:e]);return r.join("")},Mr.uuidFast=function(){for(var t,s=kr,i=new Array(36),e=0,n=0;n<36;n++)8==n||13==n||18==n||23==n?i[n]="-":14==n?i[n]="4":(e<=2&&(e=33554432+16777216*Math.random()|0),t=15&e,e>>=4,i[n]=s[19==n?3&t|8:t]);return i.join("")},Mr.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var s=16*Math.random()|0;return("x"==t?s:3&s|8).toString(16)})};const{ActivityPorts:Dr}=Zn,Ur=["actions.google.com","amp-actions.sandbox.google.com","amp-actions-staging.sandbox.google.com","amp-actions-autopush.sandbox.google.com","payments.developers.google.com","payments.google.com"];class xr{constructor(t,s,i,e){var n;this._a=s,function(t){if(t.environment&&!Object.values(sr.Environment).includes(t.environment))throw new Error("Parameter environment in PaymentOptions can optionally be set to PRODUCTION, otherwise it defaults to TEST. "+t.environment)}(t),this.ma=null,this.Gh=t.environment||sr.Environment.TEST,xr.Vh||(xr.Vh=this.fa()&&t.i&&t.i.googleTransactionId?t.i.googleTransactionId:(n=this.Gh,Mr.uuidFast()+"."+n)),this.wa=t,this.Ia=new Lr(this.Gh,xr.Vh,i,e,t.i&&t.i.redirectKey),this.ba=5;const r=_r();this.Ta=r&&!i?new dr(this.Gh):this.Ia,this.Ra=new Gr,this.Ia.onResult(this.Sa.bind(this)),this.Ta.onResult(this.Sa.bind(this)),cr.load(),r&&cr.setBuyFlowActivityMode(4),
1cr.setGoogleTransactionId(xr.Vh),cr.postMessage({eventType:9,clientLatencyStartMs:Date.now()}),window.addEventListener("message",t=>this.Aa(t))}isReadyToPay(t){t&&(t=Object.assign({},this.wa,t));const s=Date.now(),i=wr()||function(t){if(!t)return"isReadyToPayRequest must be set!";if(t.apiVersion>=2){if(!("apiVersionMinor"in t))return"apiVersionMinor must be set!";if(!t.allowedPaymentMethods||!Array.isArray(t.allowedPaymentMethods)||0==t.allowedPaymentMethods.length)return"for v2 allowedPaymentMethods must be set to an array containing a list of accepted payment methods";for(var s=0;s<t.allowedPaymentMethods.length;s++){let n=t.allowedPaymentMethods[s];if(n.type==sr.PaymentMethod.CARD){if(!n.parameters)return"Field parameters must be setup in each allowedPaymentMethod";var i=n.parameters.allowedCardNetworks;if(!i||!Array.isArray(i)||0==i.length)return"allowedCardNetworks must be setup in parameters for type CARD";var e=n.parameters.allowedAuthMethods;if(!e||!Array.isArray(e)||0==e.length||!e.every(br))return"allowedAuthMethods must be setup in parameters for type 'CARD'  and must contain 'CRYPTOGRAM_3DS' and/or 'PAN_ONLY'"}}return null}return t.allowedPaymentMethods&&Array.isArray(t.allowedPaymentMethods)&&0!=t.allowedPaymentMethods.length&&t.allowedPaymentMethods.every(Ir)?null:"allowedPaymentMethods must be set to an array containing 'CARD' and/or 'TOKENIZED_CARD'!"}(t);if(i)return new Promise((t,s)=>{xr.Ca("isReadyToPay",i),cr.postMessage({eventType:0,error:2}),s({statusCode:sr.ResponseStatus.DEVELOPER_ERROR,statusMessage:i})});const e=this.Oa(t);return e.then(t=>(cr.postMessage({eventType:0,clientLatencyStartMs:s,isReadyToPayApiResponse:t}),t)),e}Oa(t){if(this.Ra.isUpiRequest(t))return this.Ra.isReadyToPay(t);if(_r()&&!Fr(t)){if(t.apiVersion>=2)return this.Na(t);{const s=this.Ia.isReadyToPay(t),i=this.Ta.isReadyToPay(t);return mr(t)?i:i.then(()=>s)}}return this.Ia.isReadyToPay(t)}Na(t){let s=Promise.resolve({result:!1});t.existingPaymentMethodRequired&&(s=Promise.resolve({result:!1,paymentMethodPresent:!1}));let i=s;if(fr(t,sr.AuthMethod.CRYPTOGRAM_3DS)){const s=JSON.parse(JSON.stringify(t));for(let t=0;t<s.allowedPaymentMethods.length;t++)s.allowedPaymentMethods[t].type==sr.PaymentMethod.CARD&&(s.allowedPaymentMethods[t].parameters.allowedAuthMethods=[sr.AuthMethod.CRYPTOGRAM_3DS]);i=this.Ta.isReadyToPay(s)}let e=s;return fr(t,sr.AuthMethod.PAN_ONLY)&&(e=this.Ia.isReadyToPay(t)),i.then(t=>1==(t&&t.result)?t:e)}prefetchPaymentData(t){const s=wr()||Tr(t);s?xr.Ca("prefetchPaymentData",s):(this.ya(t),_r()&&!Fr(t)?this.Ta.prefetchPaymentData(t):this.Ia.prefetchPaymentData(t))}loadPaymentData(t){cr.postMessage({eventType:5});const s=wr()||Tr(t);if(this.ba=t&&t.swg?6:5,s)return void this._a(new Promise((t,i)=>{cr.postMessage({eventType:1,error:2,buyFlowMode:this.ba}),xr.Ca("loadPaymentData",s),i({statusCode:sr.ResponseStatus.DEVELOPER_ERROR,statusMessage:s})}));const i=Rr(t);i?this.Ra.loadPaymentData(t,i,this.Sa.bind(this)):(this.ma=Date.now(),this.ya(t),Fr(t)?this.Ia.loadPaymentData(t):this.Ta.loadPaymentData(t))}static Ca(t,s){console.error("DEVELOPER_ERROR in "+t+" : "+s)}createButton(t={}){const s=Date.now();return cr.postMessage({eventType:2,clientLatencyStartMs:s}),null}Aa(t){this.fa()&&"logPaymentData"===t.data.name&&cr.postMessage(t.data.data)}fa(){return-1!=Ur.indexOf(window.location.hostname)}Sa(t){t.then(t=>{cr.postMessage({eventType:1,clientLatencyStartMs:this.ma,buyFlowMode:this.ba})}).catch(t=>{t.errorCode?cr.postMessage({eventType:1,error:t.errorCode,buyFlowMode:this.ba}):cr.postMessage({eventType:1,error:6,buyFlowMode:this.ba})}),this._a(t)}ya(t){const s={startTimeMs:Date.now(),googleTransactionId:xr.Vh};return t.i=t.i?Object.assign(s,t.i):s,t}}function Fr(t){return!0===(t.i&&t.i.disableNative)}class Br{constructor(t){this.Ds=t}preconnect(t){this.va(t,"preconnect")}prefetch(t){this.va(t,"preconnect prefetch")}va(t,s){const i=ts(this.Ds,"link",{rel:s,href:t});this.Ds.head.appendChild(i)}}class Vr{constructor(t){this.Pa=null,this.Xo=null,this.La=null,this.Ga=null,this.Os=t.win(),this.Ns=t.activities(),this.Ma=t.analytics(),this.ka=new Wr(this.Os),this.Da=new Br(this.Os.document),this.Ua()&&(this.prec
1onnect(this.Da),this.xa()),this.ka.prepare(),this.Rs=t.eventManager()}Fa(t,s,i){return xr.Vh=s,new xr(t,i,!1,this.Ns.getOriginalWebActivityPorts())}preconnect(t){t.prefetch("https://payments.google.com/payments/v4/js/integrator.js?ss=md"),t.prefetch("https://clients2.google.com/gr/gr_full_2.0.8.js")}xa(){this.Pa=this.Fa({environment:Ot().payEnv,i:{redirectKey:this.ka.restoreKey()}},this.Ma.getTransactionId(),this.Ba.bind(this))}Ua(){const t=this.Os.location.hash,s=/redirectEncryptedCallbackData/.test(t),i=/swgRequest/.test(t);return s&&i}getType(){return"PAYJS"}start(t,s={}){let i;this.Ga=t,this.Pa||(this.preconnect(this.Da),this.xa()),s.forceRedirect&&(t.forceRedirect=!0),zr(t,"disableNative",!0),zr(t,"disableNgbf",!0);const e=new Promise(t=>{i=t});return this.ka.useVerifier(async e=>{e&&zr(t,"redirectVerifier",e),s.forceRedirect&&(await this.Rs.getReadyPromise(),await this.Ma.getLoggingPromise()),this.Pa.loadPaymentData(t),i(!0)}),e}async onResponse(t){this.La=t,this.Xo&&(await 0,t(this.Va(this.Xo,this.Ga)))}Ba(t){this.Xo=t,this.La&&this.La(this.Va(this.Xo,this.Ga))}async Va(t,s){try{const i=await t;return s&&(i.paymentRequest=s),i}catch(i){const t=i;if("object"==typeof t&&"CANCELED"===t.statusCode){const t=ns("Cancelled");throw t.productType=s?s.i.productType:null,t}throw t}}}class Wr{constructor(t){this.Os=t,this.Wa=null,this.za=null}prepare(){return this.Ya(()=>{})}useVerifier(t){this.Ya(s=>{if(s)try{this.Os.localStorage.setItem(st,s.key)}catch{s=null}t(s&&s.verifier||null)})}restoreKey(){try{return this.Os.localStorage&&this.Os.localStorage.getItem(st)||null}catch{return null}}async Ya(t){this.Wa||(this.Ka()?(this.Wa=this.qa(),this.za=await this.Wa):(this.Wa=Promise.resolve(null),this.za=null)),t(this.za)}Ka(){let t;try{t=!!this.Os.localStorage}catch{return!1}const s=this.Os.crypto;return!!(t&&s&&s.subtle&&s.subtle.digest)}async qa(){const t=this.Os.crypto;try{const s=new Uint8Array(16);t.getRandomValues(s);const i=btoa(Xs(s)),e=await t.subtle.digest({name:"SHA-384"},Js(i));return{key:i,verifier:btoa(Xs(new Uint8Array(e)))}}catch{return null}}}function zr(t,s,i){t.i=Object.assign(t.i||{},{[s]:i})}var jr=(t=>(t.GENERAL="general",t.PAYWALL="paywall",t))(jr||{});class Yr{constructor(t,s,i){this.Os=t,this.bs=s,this.Ts=i,this.Ha=null,this.Ja=1,this.Er=this.bs.pageConfig().getPublicationId(),this.bs.eventManager().registerEventListener(this.As.bind(this))}Xa(){return this.Os.document.cookie}$a(){if(!this.Ha){const t=this.Xa().match("(^|;)\\s*__gads\\s*=\\s*([^;]+)");this.Ha=t&&encodeURIComponent(t.pop())}return this.Ha}Qa(t){t=mt(t,"u_tz","240"),t=mt(t,"v",String(this.Ja));const s=this.$a();return s&&(t=mt(t,"cookie",s)),mt(t,"cdm",this.Os.location.hostname)}sendSubscriptionState(t,s){let i=vt("/subopt/data");return i=mt(i,"states",this.Er+":"+t),s&&(i=mt(i,"extrainfo",s)),this.Ts.fetch(this.Qa(i),{method:"GET",credentials:"include"})}Za(t,s){let i=vt("/subopt/data");return i=mt(i,"events",this.Er+":"+t),s&&(i=mt(i,"extrainfo",s)),this.Ts.fetch(this.Qa(i),{method:"GET",credentials:"include"})}As(t){if(t.eventOriginator===u.SHOWCASE_CLIENT)return;if(!this.bs.config().enablePropensity&&t.eventOriginator!==u.PROPENSITY_CLIENT)return;let s=t.additionalParameters;if(t.eventType===o.EVENT_SUBSCRIPTION_STATE)return void this.sendSubscriptionState(s.state,s.productsOrSkus);const i=(e=t.eventType)&&Ps[e]||null;var e;null!=i&&(s instanceof A&&(s=void 0),Ws(t.isFromUserAction)&&(Fs(s)||(s={}),s.is_active=t.isFromUserAction),this.Za(i,JSON.stringify(s)))}tl(t){if(!t.header)return{header:{ok:!1},body:{error:"No valid response"}};if(t.header.ok){let s=null;const i=t.scores,e=[];for(let t=0;t<i.length;t++){const n=i[t];let r;if(n.score){const t={value:n.score,bucketed:2==n.score_type};r={product:n.product,score:t}}else r={product:n.product,error:n.error_message};e.push(r),s={header:{ok:!0},body:{scores:e}}}return s}return{header:{ok:!1},body:{error:t.error}}}async getPropensity(t,s){const i=vt("/subopt/pts?products=")+this.Er+"&type="+s+"&ref="+t,e=await this.Ts.fetch(this.Qa(i),{method:"GET",credentials:"include"}),n=await e.json();return this.tl(n)}}class Kr{constructor(t,s,i){this.Os=t,this.il=new Yr(t,s,i),this.Rs=s.eventManager()}sendSubscriptionState(t,s){if(!Object.values(Ns).includes(t))throw new Error("Invalid subscription state provided");
1if((Ns.SUBSCRIBER==t||Ns.PAST_SUBSCRIBER==t)&&!s)throw new Error("Entitlements must be provided for users with active or expired subscriptions");if(s&&!Fs(s))throw new Error("Entitlements must be an Object");let i=null;s&&(i=JSON.stringify(s)),this.il.sendSubscriptionState(t,i)}getPropensity(t){if(t&&!Object.values(jr).includes(t))throw new Error("Invalid propensity type requested");return t||(t=jr.GENERAL),this.il.getPropensity(this.Os.document.referrer,t)}sendEvent(t){const s=xs(t.name);let i=null;if(!Bs(ys,t.name)||!s)throw new Error("Invalid user event provided("+t.name+")");if(t.data){if(!Fs(t.data))throw new Error("Event data must be an Object("+t.data+")");i={},Object.assign(i,t.data)}if(Ws(t.active))i||(i={}),Object.assign(i,{is_active:t.active});else if(null!=t.active)throw new Error("Event active must be a boolean");this.Rs.logEvent({eventType:s,eventOriginator:u.PROPENSITY_CLIENT,isFromUserAction:t.active,additionalParameters:i})}}class qr{constructor(t){this.bs=t,this.rl=()=>{},this.Ns=t.activities(),this.Os=t.win(),this.ni=t.pageConfig(),this.ci=t.dialogManager()}getRenderPromise(){return this.ol}async startMultipleLinks(t){const{linkTo:s}=t;if(!s||0===s.length)throw new Error("Missing required field: linkTo");const i=this.ni.getPublicationId(),e=s.map(t=>encodeURIComponent("".concat(t.publicationId,",").concat(t.publisherProvidedId))).join("&linkTo="),n=Lt({publicationId:i}),r=Pt("/linksaveiframe",{subscriptionLinking:"true"})+"&linkTo=".concat(e),h=new us(this.Os,this.Ns,r,n,this.bs.clientConfigManager().getLanguage(),!1);h.onCancel(()=>this.onCancel(s)),h.on(x,this.onResponse.bind(this));const a=new Promise(t=>this.rl=t);try{this.bs.eventManager().logSwgEvent(o.IMPRESSION_SUBSCRIPTION_LINKING_LOADING);const t={desktopConfig:{isCenterPositioned:!1}};return this.ol=this.ci.openView(h,!1,t),await this.ol,this.bs.eventManager().logSwgEvent(o.IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE),a}catch(l){throw this.bs.eventManager().logSwgEvent(o.IMPRESSION_SUBSCRIPTION_LINKING_ERROR),l}}onResponse(t){const s=t.getSuccess()?o.EVENT_SUBSCRIPTION_LINKING_SUCCESS:o.EVENT_SUBSCRIPTION_LINKING_FAILED;this.bs.eventManager().logSwgEvent(s);const i=t.getLinkResultsList()||[];this.rl({anyFailure:!t.getSuccess(),anySuccess:i.filter(t=>t.getSuccess()).length>0,links:i.map(t=>({publicationId:t.getSwgPublicationId(),publisherProvidedId:t.getPublisherProvidedId(),success:!!t.getSuccess()}))})}onCancel(t){const s=o.ACTION_SUBSCRIPTION_LINKING_CLOSE;this.bs.eventManager().logSwgEvent(s,!0),this.rl({anyFailure:!0,anySuccess:!1,links:t.map(t=>({publicationId:t.publicationId,publisherProvidedId:t.publisherProvidedId,success:!1}))})}async start(t){const{publisherProvidedId:s}=t;if(!s)throw new Error("Missing required field: publisherProvidedId");const i={linkTo:[{publicationId:this.ni.getPublicationId(),publisherProvidedId:s}]};return this.startMultipleLinks(i).then(t=>({publisherProvidedId:s,success:!t.anyFailure}))}}class Hr{constructor(t,s){this.al=s,this.openViewPromise=null,this.Os=t.win(),this.Ns=t.activities(),this.ci=t.dialogManager(),this.al||(this.al=Promise.reject("No account promise provided")),this.li=new us(this.Os,this.Ns,Pt("/waitforsubscriptionlookupiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId()}),t.clientConfigManager().getLanguage(),!0,!0)}async start(){this.openViewPromise=this.ci.openView(this.li);try{const t=await this.al;return this.ci.completeView(this.li),t}catch(t){throw this.ci.completeView(this.li),t}}}class Jr{constructor(t,s,i,r,h,a=0){var l;this.ll=a,this.ul=null,this.cl=null,i=i||{},this.dl=!!i.isPublisher,i.configPromise||(i.configPromise=Promise.resolve()),this.Rs=new Ce(i.configPromise),this.Ds=en(t),this.Os=this.Ds.getWin(),this.Go={windowOpenMode:"auto",analyticsMode:0,enableSwgAnalytics:!1,enablePropensity:!1},r&&this.gl(r),this.ni=s,this.El=this.Ds.whenReady(),this._l=new Gn(this.Ds),this.Ts=i.fetcher||new Es(this.Os),this.Ss=new Ii(this.Os,this.ni),this.rr=new ke,i.enableGoogleAnalytics&&(this.fl=new js(this),this.fl.start()),this.Ns=new Re(this),this.ri=new Me(this),this.ei=new Vr(this),this.wl=new Fn(this),this.Ii=new Sn(this.Os,this.ni,this.Ts,this,i.enableDefaultMeteringHandler||!1),this.oi=new qe(this,s.getPublicationId(),this.Ts,h),this.ci=new dn(this.Ds,this.oi),this.Il=new Kr(this.Os,this,this.Ts),this.Rs.logSwgEvent(o.IMPRESSION_PAGE_LOAD,!1),this.bl=new Wn(this.ni,this.Ts),this.Tl=new Ji(this.Ds,Promise.resolve(this));const u=new Br(this.Os.document);u.prefetch("".concat(e,"/loader.svg")),u.preconnect("https://www.gstatic.
1com/"),u.preconnect("https://www.google.com/"),Un.configurePending(this),ci.configurePending(this),ss(this.Ds,$e),this.Ns.onRedirectError(t=>{this.ri.addLabels(["redirect"]),this.Rs.logSwgEvent(o.EVENT_PAYMENT_FAILED,!1),this._l.error("Redirect error",t)}),this.Rl=this.Go.gisInterop||_i(this.Os,n.ENABLE_GIS_INTEROP)?new Ln(this.Ds,this.Ss,this.Ii,this.ni,this.Rs):void 0,(null==i?void 0:i.isBasic)||null==(l=this.Rl)||l.yield()}creationTimestamp(){return this.ll}gisInteropManager(){return this.Rl}doc(){return this.Ds}win(){return this.Os}pageConfig(){return this.ni}jserror(){return this._l}activities(){return this.Ns}payClient(){return this.ei}dialogManager(){return this.ci}entitlementsManager(){return this.Ii}callbacks(){return this.rr}storage(){return this.Ss}clientConfigManager(){return this.oi}analytics(){return this.ri}isPublisher(){return this.dl}init(){}configure(t){this.gl(t)}gl(t){let s="";for(const i in t){const e=t[i];switch(i){case"windowOpenMode":e!=bs.AUTO&&e!=bs.REDIRECT&&(s="Unknown windowOpenMode: "+e);break;case"experiments":for(const t of e)mi(this.Os,t,!0);this.analytics()&&this.analytics().addLabels(e);break;case"analyticsMode":e!=Is.DEFAULT&&e!=Is.IMPRESSIONS&&(s="Unknown analytics mode: "+e);break;case"enableSwgAnalytics":Ws(e)||(s="enableSwgAnalytics must be a boolean, type: "+typeof e);break;case"enablePropensity":Ws(e)||(s="enablePropensity must be a boolean, type: "+typeof e);break;case"skipAccountCreationScreen":Ws(e)||(s="skipAccountCreationScreen must be a boolean, type: "+typeof e);break;case"publisherProvidedId":null==e||"string"==typeof e&&""!=e||(s="publisherProvidedId must be a string, value: "+e);break;case"paySwgVersion":if("string"!=typeof e){s="paySwgVersion must be a string, type: "+typeof e;break}break;case"gisInterop":void 0===e||Ws(e)||(s="gisInterop must be a boolean, type: "+typeof e);break;default:s="Unknown config property: "+i}}ct(!s,s||void 0),Object.assign(this.Go,t)}config(){return this.Go}reset(){this.Ii.reset(),this.closeDialog()}clear(){this.Ii.clear(),this.closeDialog()}closeDialog(){this.ci.completeAll()}start(){if(!this.ni.getProductId()||!this.ni.isLocked())return Promise.resolve();this.getEntitlements()}async getEntitlements(t){(null==t?void 0:t.publisherProvidedId)&&(t.publisherProvidedId=this.Xt);const s=this.Ii.getEntitlements(t);this.clientConfigManager().fetchClientConfig(s);const i=await s;if(this.ri.setReadyForLogging(),this.ri.start(),i)try{const t=i.entitlements.map(t=>t.getSku()||"unknown subscriptionToken");t.length>0&&this.ri.setSku(t.join(","))}catch{}const e=await this.Ii.getExperimentConfigFlags().then(t=>t.includes(r.BACKGROUND_CLICK_BEHAVIOR_EXPERIMENT));return this.ci.setEnableBackgroundClickExperiment(e),i.clone()}setOnEntitlementsResponse(t){this.rr.setOnEntitlementsResponse(t)}getOffers(t){return this.bl.getOffers(t&&t.productId)}async showOffers(t){return await this.El,ct(!t||!t.oldSku,"The showOffers() method cannot be used to update a subscription. Use the showUpdateOffers() method instead."),this.ul=new $i(this,t),this.ul.start()}async showUpdateOffers(t){return await this.El,ct(!!t&&!!t.oldSku,"The showUpdateOffers() method cannot be used for new subscribers. Use the showOffers() method instead."),new $i(this,t).start()}async showSubscribeOption(t){return await this.El,new Qi(this,t).start()}async showAbbrvOffer(t){return await this.El,new Zi(this,t).start()}async showContributionOptions(t){return await this.El,this.cl=new He(this,t),this.cl.start()}getLastContributionsFlow(){return this.cl}async waitForSubscriptionLookup(t){return await this.El,new Hr(this,t).start()}setOnLoginRequest(t){this.rr.setOnLoginRequest(t)}triggerLoginRequest(t){this.rr.triggerLoginRequest(t)}setOnLinkComplete(t){this.rr.setOnLinkComplete(t)}async linkAccount(t){return await this.El,new Dn(this).start(t)}async saveSubscription(t){return await this.El,await new xn(this,t).start()}async showLoginPrompt(){return await this.El,new Vn(this).start()}async showLoginNotification(){return await this.El,new Bn(this).start()}setOnNativeSubscribeRequest(t){this.rr.setOnSubscribeRequest(t)}setOnSubscribeResponse(t){this.rr.setOnSubscribeResponse(t)}setOnPaymentResponse(t){this.rr.setOnPaymentResponse(t)}async subscribe(t){return ct("string"==typeof t,"The subscribe() method can only take a sku as its parameter; for subscription updates please use the updateSubscription() method"),await this.El,new li(this,{skuId:t}).start()}async conferTimeBoundPass(t){return await this.El,new li(this,{skuId:t,oneTime:!0},Ts.TIME_BOUND_PASS).start()}async updateSubscription(t){return ct(null==t?void 0:t.oldSku,"The updateSubscription() method should be used for subscription updates; for new subscriptions please use the subscribe() method"),await this.El,new li(this,t).start()}setOnContributionResponse(t){this.rr.setOnContributionResponse(t)}async contribute(t){const s="string"==typeof t?{skuId:t}:t;return await this.El,new li(this,s,Ts.UI_CONTRIBUTION).start()}async completeDeferredAccountCreation(t=null){return await this.El,new Ze(this,t).start()}setOnFlowStarted(t){this.rr.setOnFlowStarted(t)}setOnFlowCanceled(t){this.rr.setOnFlowCanceled(t)}createButton(t,s){return this.Tl.create(t,s)}attachButton(t,s,i){this.Tl.attach(t,s,i)}attachSmartButton(t,s,i){this.Tl.attachSmartButton(this,t,s,i)}getPropensityModule(){return Promise.resolve(this.Il)}eventManager(){return this.Rs}getLastOffersFlow(){return this.ul}getEventManager(){return Promise.resolve(this.Rs)}getLogger(){return Promise.resolve(this.wl)}setShowcaseEntitlement(t){if(!t||!function(t=bt){return"https"===t.protocol||"https:"===t.protocol}(this.win().location)||!Tn(this.win().location.search,!0))return Promise.resolve();const s=(i=t.entitlement,Ls[i]||[]);var i;const e=new A;
1e.setIsUserRegistered(t.isUserRegistered),t.subscriptionTimestamp&&e.setSubscriptionTimestamp(ve(function(t){let s;return s=t>=1e14||t<=-1e14?Math.floor(t/1e3):t>=1e11||t<=-3e10?t:Math.floor(1e3*t),s}(t.subscriptionTimestamp)));for(let n=0;n<s.length;n++)this.eventManager().logEvent({eventType:s[n],eventOriginator:u.SHOWCASE_CLIENT,isFromUserAction:!1,additionalParameters:e});return Promise.resolve()}consumeShowcaseEntitlementJwt(t,s){this.entitlementsManager().parseEntitlements({signedEntitlements:t}).consume(s)}showBestAudienceAction(){ut("Not implemented yet")}setPublisherProvidedId(t){this.Xt=t}async linkSubscription(t){return await this.El,new qr(this).start(t)}async processGisCredential(t,s){return t.credential?ms(this,t,s):{fromRrm:!1}}async linkSubscriptions(t){return await this.El,new qr(this).startMultipleLinks(t)}async getAvailableInterventions(){return await this.getEntitlements(),this.entitlementsManager().getAvailableInterventions()}async getFreeAccess(){return new Nn}}const Xr=Ts.UI_CONTRIBUTION;class $r{constructor(t){this.bs=t,this.Ds=t.doc(),this.Os=t.win(),this.Ns=t.activities(),this.Ii=t.entitlementsManager(),this.oi=t.clientConfigManager(),this.Ss=t.storage(),ct(this.oi,"InlineCta requires an instance of ClientConfigManager.")}Sl(t,s){const i={origin:Et(this.Os.location.href).origin,configurationId:s,isClosable:"true",calledManually:"false",previewEnabled:"false",publicationId:this.bs.pageConfig().getPublicationId(),ctaMode:"CTA_MODE_INLINE"};return this.oi.shouldForceLangInIframes()&&(i.hl=this.oi.getLanguage()),Pt(t,i)}bi(t,s,i){this.Ii.clear();const e=t.getSwgUserToken();e&&this.Ss.set($,e,!0),t.getAlreadyCompleted()&&(this.Al(i),Ri(s,this.oi.getLanguage(),this.bs));const n=Date.now().toString();this.Ss.set(Q,n,!1),this.Ii.getEntitlements()}Al(t){t.firstChild&&t.removeChild(t.firstChild)}async Cl(t,s,i,e){var n;const o=(e?this.Ii.parseArticleExperimentConfigFlags(e):[]).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT),a=null==(n=t.getAttribute("rrm-inline-cta"))?void 0:n.trim().replace(/['"“”‘’]/g,"");if(!a)return void ut("No Inline CTA Config Id");const l=s.find(t=>t.configurationId===a);if(!l)return void ut("No Inline CTA Matching Action");if(l.type===ht.TYPE_REWARDED_AD||l.type===ht.TYPE_BYO_CTA)return;const u=await yi(this.bs);if(!vi(l,this.bs,u))return;const c=Tt[l.type],d=l.type===ht.TYPE_SUBSCRIPTION?Ci(i,this.oi,this.bs.pageConfig(),this.Os.location.hash,o?a:"",!0,o?Et(this.Os.location.href).origin:void 0):l.type===ht.TYPE_CONTRIBUTION?Si(i,this.oi,this.bs.pageConfig(),o?a:"",!0,o?Et(this.Os.location.href).origin:void 0):this.Sl(c,a),g=l.type===ht.TYPE_SUBSCRIPTION?this.Ns.addDefaultArguments({showNative:this.bs.callbacks().hasSubscribeRequestCallback(),productType:Ts.SUBSCRIPTION,list:"default",skus:null,isClosable:!1,supportsEventManager:!0}):l.type===ht.TYPE_CONTRIBUTION?Lt({productId:this.bs.pageConfig().getProductId(),publicationId:this.bs.pageConfig().getPublicationId(),productType:Ts.UI_CONTRIBUTION,list:"default",skus:null,isClosable:!1,supportsEventManager:!0}):Lt({supportsEventManager:!0,productType:Xr}),p=new us(this.Os,this.Ns,d,g,this.oi.getLanguage());as(p.getElement(),{width:"100%"}),l.type===ht.TYPE_SUBSCRIPTION?(this.bs.callbacks().triggerFlowStarted(ws.SHOW_OFFERS,{skus:["*"],source:"SwG"}),p.onCancel(()=>{this.bs.callbacks().triggerFlowCanceled(ws.SHOW_OFFERS)}),p.on(k,t=>Oi(this.bs,t,!0,a)),p.on(K,t=>Ni(this.bs,t))):l.type===ht.TYPE_CONTRIBUTION?(this.bs.callbacks().triggerFlowStarted(ws.SHOW_CONTRIBUTION_OPTIONS),p.onCancel(()=>{this.bs.callbacks().triggerFlowCanceled(ws.SHOW_CONTRIBUTION_OPTIONS)}),p.on(k,t=>Ai(this.bs,t,!0,a))):(p.on(w,s=>this.bi(s,l.type,t)),p.on(V,t=>Ys(t,this.bs,p,a,h.CTA_MODE_INLINE))),t.appendChild(p.getElement()),await p.init()}async attachInlineCtasWithAttribute(){var t,s,i;const e=Array.from(this.Ds.getWin().document.querySelectorAll("div[rrm-inline-cta]"));if(0===e.length)return;const[n,r,o]=await Promise.all([this.oi.getClientConfig(),this.Ii.getEntitlements(),this.Ii.getArticle()]);if(!(null==(t=n.uiPredicates)?void 0:t.canDisplayAutoPrompt)||!o||r.enablesThis())return void ut("Inline CTA Client Config: "+!(null==(s=n.uiPredicates)?void 0:s.canDisplayAutoPrompt)+"Article: "+!o+"Entitlements: "+!!r.enablesThis());const h=null==(i=o.audienceActions)?void 0:i.actions;if(h&&0!==h.length)for(const a of e)await this.Cl(a,h,n,o);else ut("No Inline CTA Actions")}}class Qr{constructor(t){this.Ol=null,this.Nl=null,this.Ds=en(t),this.yl=new Promise(t=>{this.Nl=t})}writeConfigWhenReady(t){return this.Ol=t,this.Ds.whenReady().then(()=>{this.vl()}),this.yl}vl(){var t,s,i,e,n,r,o,h,a;if(!this.Nl)return;const l={productID:null==(t=this.Ol)?void 0:t.isPartOfProductId,"@type":null==(s=this.Ol)?void 0:s.isPartOfType},u={"@context":"http://schema.org","@type":null==(i=this.Ol)?void 0:i.type,isAccessibleForFree:null==(e=this.Ol)?void 0:e.isAccessibleForFree,isPartOf:l},c=this.Ds.getRootNode().querySelectorAll('script[type="application/ld+json"]');for(let g=0;g<c.length;g++){const t=c[g];if(t.textContent){const s=si(t.textContent);if(!s)continue;let i;return i=Array.isArray(s)?s[0]:s,i["@type"]=this.Pl(i["@type"],null==(n=this.Ol)?void 0:n.type),i.isAccessibleForFree=i.isAccessibleForFree||(null==(r=this.Ol)?void 0:r.isAccessibleForFree),i.isPartOf?(i.isPartOf["@type"]=this.Pl(i.isPartOf["@type"],null==(o=this.Ol)?void 0:o.isPartOfType),i.isPartOf.productID=i.isPartOf.productID||(null==(h=this.Ol)?void 0:h.isPartOfProductId)):i.isPartOf=l,t.textContent=JSON.stringify(s),this.Nl(),void(this.Nl=null)}}const d=ts(this.Ds.getWin().document,"script",{type:"application/ld+json"},JSON.stringify(u));null==(a=this.Ds.getHead())||a.appendChild(d),this.Nl(),this.Nl=null}Pl(t,s){if(!t&&!s)return[];if(!t)return s;if(!s)return t;
1const i=this.Eh(t),e=this.Eh(s),n=i.concat(e.filter(t=>i.indexOf(t)<0));return 1==n.length?n.pop():n}Eh(t){return Array.isArray(t)?t:[t]}}const Zr="SWG_BASIC",to="CHECK_ENTITLEMENTS";class so{constructor(t){this.Ll=!1,this.Gl=null,this.Ml=null,this.kl=null,this.So=!0,this.Dl=!1,this.Go={},this.ll=Date.now(),this.Ds=en(t),this.Ul=new Promise(t=>{this.Gl=t})}xl(t){return this.Go.publisherProvidedId=this.Xt,this.Go.gisInterop=this.gisInterop,this.Ll||!t||this.Ml?t&&this.kl&&this.kl.check():(this.Ll=!0,this.kl=new qn(this.Ds),this.kl.resolveConfig().then(t=>{this.kl=null;const s=new io(this.Ds,t,{configPromise:this.Ul.then(),enableDefaultMeteringHandler:this.So,isBasic:!0},this.Go,this._r,this.ll);this.Fl=s,this.Gl(s),this.Gl=null},t=>{this.Gl(Promise.reject(t)),this.Gl=null})),this.Ul}async Bl(t){this.Ml=new Qr(this.Ds),await this.Ml.writeConfigWhenReady(t),this.Ml=null,this.xl(!0)}init({type:t,isAccessibleForFree:s,isPartOfType:i,isPartOfProductId:e,clientOptions:n,autoPromptType:r,alwaysShow:o=!1,disableDefaultMeteringHandler:h=!1,publisherProvidedId:a,gisInterop:l}){this.So=!h,this.Xt=a,this.gisInterop=l;const u=this.Vl(e);this.Bl({type:t,isAccessibleForFree:null!=s?s:u,isPartOfType:i,isPartOfProductId:e});const c=this.Ds.getRootElement().lang;this._r=Object.assign({lang:c},n,{forceLangInIframes:!!c||!!(null==n?void 0:n.lang)});let d=s;u&&(null!=d||(d=!0)),this.setupAndShowAutoPrompt({autoPromptType:r,alwaysShow:o,isClosable:d,contentType:this.Wl(null!=s?s:u)}),this.Dl||this.setOnLoginRequest(),this.processEntitlements()}async setOnEntitlementsResponse(t){(await this.xl(!1)).setOnEntitlementsResponse(t)}async setOnPaymentResponse(t){(await this.xl(!1)).setOnPaymentResponse(t)}async setOnLoginRequest(t){t&&(this.Dl=!0),(await this.xl(!1)).setOnLoginRequest(t)}async setupAndShowAutoPrompt(t){(await this.xl(!1)).setupAndShowAutoPrompt(t)}async dismissSwgUI(){(await this.xl(!1)).dismissSwgUI()}async processGisCredential(t,s){return(await this.xl(!1)).processGisCredential(t,s)}getDiagnostics(){return this.Fl?this.Fl.getDiagnostics():{isGisReady:!1}}async setupButtons(){const t=await this.xl(!1);await t.setupButtons()}async setupInlineCta(){(await this.xl(!1)).setupInlineCta()}async processEntitlements(){(await this.xl(!1)).processEntitlements()}Vl(t){return t.endsWith(":openaccess")}Wl(t){return t?ds.OPEN:ds.CLOSED}}class io{constructor(t,s,i={},e,n,r=0){this.ll=r,this.Ds=en(t),this.Os=this.Ds.getWin(),i.configPromise||(i.configPromise=Promise.resolve()),i.fetcher=i.fetcher||new Es(this.Os),i.enableGoogleAnalytics=!0,this.Ts=i.fetcher,this.zl=new Jr(t,s,i,e,n,r),this.entitlementsManager().blockNextToast(),s.isLocked()&&this.entitlementsManager().enableMeteredByGoogle(),this.jl(()=>{this.dismissSwgUI(),this.zl.showOffers({isClosable:!0})}),this.zl.start(),this.zl.clientConfigManager().fetchClientConfig(this.zl.getEntitlements()),this.Yl=new Mt(this,this.Ts),this.Yl.start(),this.Kl=new ji(this,this.zl),this.ql=new $r(this),this.Tl=new Ji(this.Ds,Promise.resolve(this.zl)),this.Tl.init()}configuredClassicRuntime(){return this.zl}creationTimestamp(){return this.ll}gisInteropManager(){return this.zl.gisInteropManager()}doc(){return this.Ds}win(){return this.Os}config(){return this.zl.config()}pageConfig(){return this.zl.pageConfig()}activities(){return this.zl.activities()}payClient(){return this.zl.payClient()}dialogManager(){return this.zl.dialogManager()}entitlementsManager(){return this.zl.entitlementsManager()}callbacks(){return this.zl.callbacks()}storage(){return this.zl.storage()}analytics(){return this.zl.analytics()}jserror(){return this.zl.jserror()}eventManager(){return this.zl.eventManager()}clientConfigManager(){return this.zl.clientConfigManager()}init(){}setOnEntitlementsResponse(t){this.zl.setOnEntitlementsResponse(t)}setOnPaymentResponse(t){this.zl.setOnPaymentResponse(t)}setOnLoginRequest(t){t?this.zl.setOnLoginRequest(t):this.Hl()}Hl(){this.zl.setOnLoginRequest(()=>{const t=this.pageConfig().getPublicationId(),s=Lt({publicationId:t});this.activities().open(to,Pt("/checkentitlements",{publicationId:t}),"_blank",s,{width:600,height:600})})}processEntitlements(){this.activities().onResult(to,this.entitlementsResponseHandler.bind(this))}async entitlementsResponseHandler(t){const s=await Zt(t,Nt(),!0,!1),i=s.jwt;if(i){this.zl.closeDialog(),this.entitlementsManager().pushNextEntitlements(i);const t=s.usertoken;t&&this.storage().set($,t,!0),new Os(this,Pt("/toastiframe",{flavor:"basic"})).open()}else{const t=this.zl.getLastOffersFlow();if(t)return void t.showNoEntitlementFoundToast();const s=this.zl.getLastContributionsFlow();if(s)return void s.showNoEntitlementFoundToast();const i=this.entitlementsManager().getLastMeterToast();if(i)return void i.showNoEntitlementFoundToast();const e=this.Kl.getLastAudienceActionFlow();if(e)return void e.showNoEntitlementFoundToast();const n=this.clientConfigManager().getLanguage(),r=os(qt,n);new Os(this,Pt("/toastiframe",{flavor:"custom",customText:r})).open()}}setupAndShowAutoPrompt(t){return this.Kl.showAutoPrompt(t)}dismissSwgUI(){this.dialogManager().completeAll()}async processGisCredential(t,s){return t.credential?ms(this,t,s):{fromRrm:!1}}
1getDiagnostics(){const t=this.gisInteropManager();return{isGisReady:!!t&&t.getState()!==yn.WAITING_FOR_PING}}async setupButtons(){var t,s,i,e,n,o;const h=await this.clientConfigManager().shouldEnableButton(),a=await this.entitlementsManager().getArticle(),l=this.pageConfig().isLocked(),u=(await this.entitlementsManager().getExperimentConfigFlags()).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT);let c,d;if(u&&a){const r=null==(s=null==(t=a.actionOrchestration)?void 0:t.interventionFunnel)?void 0:s.interventions,h=null==(i=a.audienceActions)?void 0:i.actions;if(d=null==(e=null==r?void 0:r.find(t=>t.type===ht.TYPE_CONTRIBUTION))?void 0:e.configId,l)c=null==(n=null==r?void 0:r.find(t=>t.type===ht.TYPE_SUBSCRIPTION))?void 0:n.configId;else{const t=null==h?void 0:h.filter(t=>t.type===ht.TYPE_SUBSCRIPTION);if(1===(null==t?void 0:t.length))c=t[0].configurationId;else{const s=r?r.filter(t=>t.type===ht.TYPE_SUBSCRIPTION).map(t=>t.configId):[];c=null==(o=null==t?void 0:t.find(t=>t.configurationId&&!s.includes(t.configurationId)))?void 0:o.configurationId}}}this.Tl.attachButtonsWithAttribute("swg-standard-button",[qi.SUBSCRIPTION,qi.CONTRIBUTION],{theme:this.clientConfigManager().getTheme(),lang:this.clientConfigManager().getLanguage(),enable:!!h},{[qi.SUBSCRIPTION]:()=>{const t={isClosable:!0};u&&c&&(t.configurationId=c),this.zl.showOffers(t)},[qi.CONTRIBUTION]:()=>{const t={isClosable:!0};u&&d&&(t.configurationId=d),this.zl.showContributionOptions(t)}})}async setupInlineCta(){this.win().setTimeout(()=>{this.ql.attachInlineCtasWithAttribute()},2e3)}jl(t){this.callbacks().setOnOffersFlowRequest(t)}}lt("BasicSubscriptions Runtime: ".concat(i)),function(t){if(t[Zr]&&!Array.isArray(t[Zr]))return;const s=new so(t),i=function(t){return{init:t.init.bind(t),setOnEntitlementsResponse:t.setOnEntitlementsResponse.bind(t),setOnPaymentResponse:t.setOnPaymentResponse.bind(t),setOnLoginRequest:t.setOnLoginRequest.bind(t),setupAndShowAutoPrompt:t.setupAndShowAutoPrompt.bind(t),dismissSwgUI:t.dismissSwgUI.bind(t),processGisCredential:t.processGisCredential.bind(t),getDiagnostics:t.getDiagnostics.bind(t)}}(s);async function e(t){t&&(await 0,t(i))}const n=[].concat(t[Zr]);for(const r of n)e(r);t[Zr]={push:e,getDiagnostics:()=>i.getDiagnostics()},s.setupButtons(),s.setupInlineCta()}(self)}()})()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.