@pronto-tools-and-more/files 9.11.0 → 9.13.0
Sign up to get free protection for your applications and to get access to all the features.
- package/files/framework/src/default/storefront/buildInfo.json +4 -4
- package/files/framework/src/default/storefront/deep-link-landing/purple-deep-link-landing.js +1 -1
- package/files/framework/src/default/storefront/index.html +2 -2
- package/files/framework/src/default/storefront/modules/common.js +1 -1
- package/files/framework/src/default/storefront/modules/default-projects_storefront_src_app_component_content_content_module_ts.js +1 -1
- package/files/framework/src/default/storefront/modules/main.js +1 -1
- package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_catalog-content_content-body_content-body_module_ts.js +1 -1
- package/package.json +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"branch": "HEAD",
|
3
|
-
"commit": "
|
4
|
-
"commitDate": "
|
5
|
-
"buildDate": "
|
6
|
-
"packageVersion": "3.8.
|
3
|
+
"commit": "0bff57c",
|
4
|
+
"commitDate": "Tue Nov 05 2024 09:08:36 GMT+0000 (Coordinated Universal Time)",
|
5
|
+
"buildDate": "Tue Nov 05 2024 09:14:47 GMT+0000 (Coordinated Universal Time)",
|
6
|
+
"packageVersion": "3.8.1"
|
7
7
|
}
|
package/files/framework/src/default/storefront/deep-link-landing/purple-deep-link-landing.js
CHANGED
@@ -839,4 +839,4 @@ fragment EntitlementFields on EntitlementResult {
|
|
839
839
|
}
|
840
840
|
}
|
841
841
|
${iY}
|
842
|
-
`,(e=>e.appConfigurationForDomain),t,{domainName:e,preview:n})}static async getAppWebConfig(e,t,n,r){const i=function(e){return new Bq({uri:e+"/graphql",cache:new _Y,defaultOptions:{watchQuery:{fetchPolicy:"no-cache",errorPolicy:"ignore"},query:{fetchPolicy:"no-cache",errorPolicy:"all"}}})}(n),o=await i.query({query:e,variables:r});return i.stop(),EY.mapAppConfiguration(t(o.data))}static mapAppConfiguration(e){return e?{id:e.id,dynamicResources:{lastModified:e.dynamicResources?.lastModified},favicons:e.favicons.map((e=>EY.mapFavicons(e))),entitlementConfig:EY.mapEntitlementConfig(e.entitlementConfig)}:null}static mapFavicons(e){if(e)return{url:e.url,mimeType:e.mimeType}}static mapEntitlementConfig(e){switch(e?.__typename){case"EntitlementConfig":return{mode:nz.ENTITLEMENT_MODE.ENTITLEMENT};case"OAuthConfig":return{mode:nz.ENTITLEMENT_MODE.OAUTH,clientId:e.clientId,loginUrl:e.loginUrl,tokenUrl:e.tokenUrl,logoutUrl:e.logoutUrl};default:return{mode:nz.ENTITLEMENT_MODE.NONE}}}}class _Y extends mG{read=()=>null;write=()=>{};diff=()=>({});watch=()=>()=>{};reset=async()=>{};evict=()=>!1;restore=()=>this;extract=()=>({});removeOptimistic=()=>{};batch=()=>{};performTransaction=()=>{};recordOptimisticTransaction=()=>{};transformDocument=e=>e;transformForLink=e=>e;identify=()=>{};gc=()=>[];modify=()=>!1;readQuery=()=>null;readFragment=()=>null;writeQuery=()=>{};writeFragment=()=>{};updateQuery=()=>null;updateFragment=()=>null}var bY;!function(e){e.PURPLE_API_CACHE="PURPLE_API_CACHE",e.PURPLE_CONTENT_CACHE="PURPLE_CONTENT_CACHE",e.PURPLE_COLLECTION_CACHE="PURPLE_COLLECTION_CACHE",e.PURPLE_MENU_CACHE="PURPLE_MENU_CACHE",e.PURPLE_PUBLICATION_CACHE="PURPLE_PUBLICATION_CACHE",e.PURPLE_TAXONOMY_CACHE="PURPLE_TAXONOMY_CACHE",e.PURPLE_OPTIONAL_CACHE="PURPLE_OPTIONAL_CACHE",e.PURPLE_REDIRECT_CACHE="PURPLE_REDIRECT_CACHE",e.PURPLE_PATH_SEGMENT_CACHE="PURPLE_PATH_SEGMENT_CACHE",e.PURPLE_JSON_CACHE="PURPLE_JSON_CACHE"}(bY||(bY={}));var CY=n(5420),SY=function(e,t){return function(n,r){t(n,r,e)}};const IY={hasNextPage:!1,totalCount:0,cursor:"",nodes:[]},DY="PURPLE_CACHE_VERSION",TY="3.8.0";let wY=class{platformId;router;injector;purpleEnv;transferState;cacheService;DOWNLOAD_HANDLERS={};IMAGE_SRCS=[];bookmarksSubject=new Ie(null);bookmarks=this.bookmarksSubject.asObservable();initedSubject=new QA(1);inited$=this.initedSubject.asObservable();repeatablePublicationProductsSubject=new Ie(null);repeatablePublicationProducts=this.repeatablePublicationProductsSubject.asObservable();connectionStateSubject=new Ie(null);connectionState$=this.connectionStateSubject.asObservable();_downloadOptions={};get downloadOptions(){return this._downloadOptions}purpleConfig;purpleRef;issuePagerInfo;implUsedDirectly=!1;isContentLocked(e,t){return!1}constructor(e,t,n,r,i,o){this.platformId=e,this.router=t,this.injector=n,this.purpleEnv=r,this.transferState=i,this.cacheService=o}async init(e=!1,t,n,r,i,o,s,a,c,u,l){this.purpleConfig=o,t.loadConfig(s),this.cacheService.purpleService=this,e?this.initServerPlatform(s,o,a,c,u,r,i):this.initAppPlatform(),window.PurpleService=this,this.initPurpleExperience(l,n),this.subscribeToConfigLoaderService(t),await this.initCache(),this.cacheService.fillCachesFromTransferState(),this.initListeners();try{window.storefrontHooks.onPurpleServiceInit?.()}catch(e){console.error("Error in onPurpleServiceInit hook:",e)}this.initedSubject.next(!0),this.initedSubject.complete()}getPurpleConfig(){return this.purpleConfig}async updateRepeatablePublicationProducts(){let e;const t={publicationProductFilter:{AND:[{type:{value:zA.PublicationProductType.REPEATABLE_ISSUE_PURCHASE}},{hidden:{value:!1}}]},maxUnlockableContents:1};try{e=await this.getPublicationProducts(t)}catch(t){console.warn("Failed to load repeatable publication products",t),e=[]}return this.repeatablePublicationProductsSubject.next(e),e}async getRepeatablePublicationProductByPublicationId(e){return(await this.repeatablePublicationProducts.pipe(Me((e=>!!e)),Re(1)).toPromise()).find((t=>!!t.publications[e]))}nextInvalidation(){let e;const t=new Promise(((t,n)=>e=t));return window.addEventListener(oN,(()=>e())),t}async invalidate(){this.cacheService.bustApiCache(),await this.updateDownloadHandlerStates(),await this.updateRepeatablePublicationProducts(),window.dispatchEvent(new CustomEvent(oN,{})),this.onMaybeSubscriptionsChanged()}async onMaybeSubscriptionsChanged(){const e=await this.getState("storefront-purchased-subs").then((e=>e&&JSON.parse(e))),t=(await this.getSubscriptions({subscriptionFilter:{purchased:{value:!0}}})).nodes;WA(e,t)||(window.storefrontHooks?.subscriptionsChanged?.({subscriptions:t}),await this.setState("storefront-purchased-subs",JSON.stringify(t))),this.injector.get(oj).notifyAll()}addImageSrc(e){this.IMAGE_SRCS.indexOf(e)<0&&this.IMAGE_SRCS.push(e)}getAlternativeSrc(e){const t=e.split("?")[0];return this.IMAGE_SRCS.find((e=>e?.split("?")[0]===t))||t}filterCategoriesByParam(e){return Object.values(this.cacheService.PURPLE_TAXONOMY_CACHE).filter((t=>hN(e.categoryFilter,t)))}setConfigValue(e,t){this.purpleRef.setConfigValue(e,t)}setPageData(e,t){this.purpleRef.setPageData(e,t)}setIssuePagerInfo(e){this.purpleRef.setIssuePagerInfo(e)}isIssuePager(){return!!this.issuePagerInfo}setCurrentPagerIssueId(e){if(this.issuePagerInfo){const t=this.issuePagerInfo.issues.findIndex((t=>t.id===e));-1!==t&&(this.issuePagerInfo.currentIndex=t,this.issuePagerInfo.visibleIndex=t)}}async getDownloadHandler(e,t){const n=e.id,r=this.DOWNLOAD_HANDLERS[n]&&await this.DOWNLOAD_HANDLERS[n];if(r)return e.id!==r.content.id||WA(e,r.content)||await r.setContent(e),r;const i=await this.getPublication(e.publicationId);return this.DOWNLOAD_HANDLERS[n]=new Promise((n=>{const r=this.downloadOptions,o=new CY.V({content:e,publication:i,autoUpdate:Boolean(r.autoUpdateBehavior),addAppStateListeners:!0}),s={...o.state,error:null},a=new Ie(s);o.addDownloadStateListeners((e=>a.next(e))),o.updates$=a,t&&o.updates$.pipe(Me((e=>!(!e||!e.error)))).subscribe((e=>{const n=function(e,t){const n=[e];return t&&(n.push(t.name),n.push(t.id)),n}(e.error,o.content);t.alert({text:"ERROR_DOWNLOAD",args:n},"DIALOG_ERROR")})),n(o)})),this.DOWNLOAD_HANDLERS[n]}async destroyDownloadHandler(e){for(const t in this.DOWNLOAD_HANDLERS)if(await this.DOWNLOAD_HANDLERS[t]===e){e.updates$.observers.length||delete this.DOWNLOAD_HANDLERS[e.content.id];break}}async updateDownloadHandlers(){return Promise.all(Object.values(this.DOWNLOAD_HANDLERS).map((async e=>{const t=await e;if(t.downloadStarted&&t.autoUpdate)try{await t.update()}catch(e){console.warn("error updating download handler",e)}else t.updateState(!1,!0)})))}async updateDownloadHandlerStates(){return Promise.all(Object.values(this.DOWNLOAD_HANDLERS).map((e=>e.then((e=>e.updateState(!1,!0))))))}async loginAccount(e){return this.purpleRef.account?.login({token:e})}logoutAccount(){return this.purpleRef.account?.logout()}assignLocalPurchases(e){return this.purpleRef.account?.assignLocalPurchases({mode:e})}async getAccountUserData(){return this.purpleRef.account?.getUserData()}overrideAppPerformActionUrlApi(e){this.purpleRef.app.performActionUrl=async({actionUrl:t})=>{if("undefined"!=typeof WP&&WP.instance){const e=WP.instance.getCurrentPlayer();if(e.ctx.actionHandler.processAction({open:{URL:t}},null,e))return}e.openUrl(t)}}openActionUrl(e,t,n){const r="purple-action-url-frame";if(e.startsWith("purple://")&&this.purpleRef.app.performActionUrl&&!t)this.purpleRef.app.performActionUrl({actionUrl:e});else if(t){let t=document.getElementById(r);t||(t=document.createElement("iframe"),t.style.opacity="0",t.id=r,document.body.appendChild(t)),t.src=e}else n?window.open(e,n):window.location.href=e}async performAuthentication(e,t){return this.purpleRef.app.performAuthentication({url:e,callbackParamName:t||"callbackurl"})}addConnectionStateListener(e){this.purpleRef.app.addConnectionStateListener(e)}removeConnectionStateListener(e){this.purpleRef.app.removeConnectionStateListener(e)}addLifecycleListener(e){this.purpleRef.app.addLifecycleListener(e)}removeLifecycleListener(e){this.purpleRef.app.removeLifecycleListener(e)}async getDisplayMode(){return(await this.purpleRef.appBrowser.getDisplayConfig()).displayMode}async isTitleBarEnabled(){return(await this.purpleRef.appBrowser.getDisplayConfig()).titleBarEnabled}overrideBookmarkApis(e){this.purpleRef.bookmark.createBookmark=async t=>{const n={...t,id:nN(),contentType:zA.CatalogContentType.ISSUE,createdAt:(new Date).getTime(),contentId:t.issueId,issueId:t.issueId,issueType:void 0,sharingEnabled:t.sharingEnabled,customData:{...t.customData}},r=(await this.purpleRef.bookmark.getBookmarks()).bookmarks;return r.push(n),await this.setState(`bookmarks-${e.appId}`,JSON.stringify(r)),{bookmark:n}},this.purpleRef.bookmark.getBookmarks=async()=>({bookmarks:JSON.parse(await this.getState(`bookmarks-${e.appId}`))||[]}),this.purpleRef.bookmark.deleteBookmark=async({id:t})=>{const n=(await this.purpleRef.bookmark.getBookmarks()).bookmarks.filter((e=>e.id!==t));await this.setState(`bookmarks-${e.appId}`,JSON.stringify(n))}}async getBookmarks(){return this.bookmarks.pipe(Re(1)).toPromise()}async updateBookmarks(){const e=(await this.purpleRef.bookmark.getBookmarks()).bookmarks;return this.bookmarksSubject.next(e),e}async createBookmark(e){const t=await this.purpleRef.bookmark.createBookmark(e);return await this.updateBookmarks(),t}async deleteBookmark(e){await this.purpleRef.bookmark.deleteBookmark(e),await this.updateBookmarks()}async deleteBookmarks(e){for(const t of e)await this.purpleRef.bookmark.deleteBookmark({id:t});await this.updateBookmarks()}overrideCatalogApis(){this.purpleRef.catalog.getSubscriptions=async e=>IY,this.purpleRef.catalog.getPublicationProducts=async e=>IY}async getPublications(e,t=!1){return this.withApiCache("getPublications",this.purpleRef.catalog.getPublications,e,t).then((t=>(t.nodes.forEach((t=>{this.cacheService.PURPLE_PUBLICATION_CACHE[t.id]=this.cacheService.setOptionalCache(t,"getPublications",e)})),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_PUBLICATION_CACHE,bY.PURPLE_CONTENT_CACHE,bY.PURPLE_OPTIONAL_CACHE]),t)))}async getIssues(e,t=!1,n=!1){const r=AN(e);return n&&(r.fetchOptions={includeResources:!0}),this.withApiCache("getContents",this.purpleRef.catalog.getContents,r,t).then((e=>(e.nodes.forEach((e=>this.cacheService.PURPLE_CONTENT_CACHE[e.id]=this.cacheService.setOptionalCache(e))),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_CONTENT_CACHE,bY.PURPLE_OPTIONAL_CACHE]),e)))}async getLocalIssues(e,t=!1,n){const r=(await this.purpleRef.catalog.getLocalIssues()).issues.filter((e=>n?e.state.installState===n:e.state.installState!==zA.ContentInstallState.NOT_INSTALLED));let i=[];if(!r.length)return{issues:i};try{if(t){for(const e of r){let t={};try{t=await this.getIssueFromCache(e.id)}catch(e){}i.push({...PY,...e,...t})}e.issueFilter&&(i=i.filter((t=>pN(e.issueFilter,t))))}else{const t={...e,issueFilter:MY(r.map((e=>e.id)),e.issueFilter)};i=(await this.getIssues(t,!0)).nodes}}catch(t){const n=await Promise.all(r.map((async(e,t)=>{let n=PY;try{n={...n,...await this.getIssue(e.id).catch((()=>null))}}catch(e){console.error(e)}const r={...n,...e};return this.cacheService.PURPLE_CONTENT_CACHE[e.id]||(this.cacheService.PURPLE_CONTENT_CACHE[e.id]=r),r})));i=n.filter((t=>pN(e.issueFilter,t)))}return i=i.sort(EN(e.sort??[])),i.forEach((e=>{const t=r.find((t=>t.id===e.id&&t.version===e.version));t&&(e.state=t.state)})),{issues:i}}async getCatalogContents(e,t=!1,n=!1){return n&&(e.fetchOptions={...e.fetchOptions,includeResources:!0}),this.withApiCache("getContents",this.purpleRef.catalog.getContents||this.purpleRef.catalog.getIssues,e,t).then((t=>(t.nodes.forEach((t=>{this.cacheService.PURPLE_CONTENT_CACHE[t.id]=this.cacheService.setOptionalCache(t,"getContents",e)})),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_CONTENT_CACHE,bY.PURPLE_OPTIONAL_CACHE]),t)))}async completePost(e,t,n){const r=this.cacheService.PURPLE_OPTIONAL_CACHE[e.id];if(!e[n]&&!r?.[n]||r?.version!==e?.version)return await this.getCatalogContent(e.id,!1,t);let i={...e,[n]:r?.[n],...r?.downloadedBy?{downloadedBy:r.downloadedBy}:{}};return this.cacheService.PURPLE_CONTENT_CACHE[i.id]=this.cacheService.setOptionalCache(i,"getContents",{fetchOptions:t}),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_CONTENT_CACHE,bY.PURPLE_OPTIONAL_CACHE]),i}async getOptionalData(e,t,n,r){if((0,iN.mF)(e))return await this.completePost(e,t,n);if((0,iN.G4)(e)){const i=(0,iN.Ig)(e);return await this.completePost(i[r],t,n)}throw new Error(`No post but tried to load ${n}`)}async getCollections(e,t=!1){return this.withApiCache("getCollections",this.purpleRef.catalog.getCollections,e,t).then((t=>(t.nodes.forEach((t=>this.cacheService.PURPLE_COLLECTION_CACHE[t.id]=this.cacheService.setOptionalCache(t,"getCollections",e))),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_COLLECTION_CACHE,bY.PURPLE_OPTIONAL_CACHE]),t)))}async getCategories(e,t=!1){return this.withApiCache("getCategories",this.purpleRef.catalog.getCategories,e,t).then((e=>(e.nodes.forEach((e=>this.cacheService.PURPLE_TAXONOMY_CACHE[e.id]=e)),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_TAXONOMY_CACHE),e)))}async getTaxonomies(e,t=!1){return this.withApiCache("getTaxonomies",this.purpleRef.catalog.getTaxonomies,e,t).then((t=>(t.nodes.forEach((t=>{this.cacheService.PURPLE_TAXONOMY_CACHE[this.cacheService.getTaxonomyCacheKey(t)]=this.cacheService.setOptionalCache(t,"getTaxonomies",e)})),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_TAXONOMY_CACHE,bY.PURPLE_OPTIONAL_CACHE]),t)))}async getMenus(e,t=!1){return this.withApiCache("getMenus",this.purpleRef.catalog.getMenus,e,t).then((e=>(e.nodes.forEach((e=>{this.cacheService.PURPLE_MENU_CACHE[e.id]=e})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_MENU_CACHE),e)))}async getSubscriptions(e){return this.purpleRef.catalog.getSubscriptions(e)}async getCatalogAppSettings(e){return this.purpleRef.catalog.getAppSettings(e)}async search(e){return this.purpleRef.catalog.search(e).then((e=>(e.nodes.forEach((e=>{const t=(0,iN.tr)(e);this.cacheService.PURPLE_CONTENT_CACHE[t.id]=t})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_CONTENT_CACHE),e)))}async getIssueStates(e){return this.purpleRef.catalog.getIssueStates(e)}addInvalidationListener(e){this.isCatalogAPIAvailable()&&this.purpleRef.catalog.addInvalidationListener(e)}removeInvalidationListener(e){this.purpleRef.catalog.removeInvalidationListener(e)}addIssueStateListener=(e,t)=>this.purpleRef.catalog.addIssueStateListener(e,t);removeIssueStateListener=(e,t)=>this.purpleRef.catalog.removeIssueStateListener(e,t);async getPublicationProducts(e){return this.purpleRef.catalog.getPublicationProducts(e).then((e=>e.nodes))}async getCatalogMetadata(){return this.purpleRef.catalog.getMetadata()}async getProducts(e){return this.purpleRef.catalog.getProducts({productId:e})}async getRedirects(e){return this.withApiCache("getRedirects",this.purpleRef.catalog.getRedirects,e).then((e=>(e.nodes.forEach((e=>{this.cacheService.PURPLE_REDIRECT_CACHE[e.id]=e})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_REDIRECT_CACHE),e)))}async lookupPathSegments(e){return this.withApiCache("lookupPathSegments",this.purpleRef.catalog.lookupPathSegments,{pathSegments:e}).then((e=>(e.forEach((e=>{this.cacheService.PURPLE_PATH_SEGMENT_CACHE[e.identifier]=e})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_PATH_SEGMENT_CACHE),e)))}isCatalogAPIAvailable(){return!!this.purpleRef.catalog}overrideConsentApis(){const e=this.injector.get(xj);this.purpleRef.consent.getConsent=async t=>e.getConsent(t),this.purpleRef.consent.grantConsent=async t=>{e.grantConsent(t)},this.purpleRef.consent.showPrivacyManager=()=>e.showPrivacyManager()}overrideContentOpenApi(e,t){this.purpleRef.content.open=async n=>{let r=!1;const i={OR:n.issueIds.map((e=>({id:{value:e}})))},o=(await this.getIssues({issueFilter:i})).nodes||[];if(!o.length)throw{code:"NO_ISSUES_FOUND"};const s=new Map;if(n.issueIds.forEach((e=>{const t=o.filter((t=>t.id===e));if(t.length>0){const n=t[0];n.access==zA.Access.FREE||n.purchaseData.purchased||(r=!0),s.set(e,n)}})),0===s.size)throw{code:"PAYMENT_REQUIRED"};const a=[];s.forEach(((e,t)=>{const n={id:t,name:e.name,publication:e.publication};a.push(n)}));const c=Math.max(a.findIndex((e=>e.id===n.initialIssue?.id)),0);this.issuePagerInfo={visibleIndex:c,currentIndex:c,issues:a,displayConfig:n.config},this.setIssuePagerInfo(this.issuePagerInfo);const u=a[c].id,l=n.initialIssue?.initialPage,d={};l&&(l.id?d.actionUrl=`purple://kiosk/issue/current/page/${l.id}/open`:l.index?d.actionUrl=`purple://kiosk/issue/current/page/index/${l.index}/open`:l.alias&&(d.actionUrl=`purple://kiosk/issue/current/page/alias/${l.alias}/open`)),n.config?.titleBar||(d.titleBar="false"),r&&(d.customerPreview=r);let p=[e.brand,"presenter",u];e.useCustomerDomain&&(p=["presenter",u]),t.navigate(p,{queryParams:d,queryParamsHandling:"merge"})}}async openContent(e){return new Promise(((t,n)=>{this.purpleRef.content.open(e).then((e=>t(e)),(e=>n(e)))}))}overrideCloseViewJsApi(){this.purpleRef.closeView=()=>{PP.InternalBrowser.stop()}}closeView(){this.purpleRef.closeView()}async getEntitlementUserData(){return this.purpleRef.entitlement.getUserData()}async login(e,t,n){const r={};if(e&&(r.username=e,r.password=t),this.purpleEnv.isUniversal){let e=n?.redirectUrl||JSON.parse(sessionStorage.getItem(zA.LAST_VISITED_PATH)).lastVisitedPath;e||(e=this.injector.get(oj).getHomeUrl());const t={redirectUrl:e};r.state=t}return this.purpleRef.entitlement.login(r)}async logout(e){const t={};if(this.purpleEnv.isUniversal){let n=e?.redirectUrl;n||(n=this.injector.get(oj).getHomeUrl());const r={redirectUrl:n};t.state=r}return this.purpleRef.entitlement.logout(t)}async checkForOauthEntitlement(){return await this.purpleRef.entitlement.checkForOauthEntitlement()}async loginWithToken(e){await this.purpleRef.entitlement.verifyAccessToken({accessToken:e})}async getMetadata(e){return this.purpleRef.metadata.getMetadata({keys:Object.values(zA.METADATA_KEY)})}share=e=>this.purpleRef.share.share(e);overrideStateApi(){this.purpleRef.state.version={major:2,minor:0}}async getState(e){return(await this.purpleRef.state.getState({key:e})).value}async setState(e,t){await this.purpleRef.state.setState({key:e,value:t})}async purchase(e){return this.purpleRef.store.purchase(e)}async subscribe(e,t,n){let r;if(t){const e=(await this.getSubscriptions({})).nodes.find((e=>e.purchased));r=e&&{oldProductId:e.productId,prorationMode:t}}return this.purpleRef.store.subscribe({productId:e,replaceProductParams:r,offerId:n})}async restorePurchases(){return this.purpleRef.store.restorePurchases()}async getPrice(e){return this.purpleRef.store.getPrices({productIds:[e]}).then((e=>e.priceInfos[0]))}async addSubscriptionCode(e){return this.purpleRef.store.addSubscriptionCode({code:e})}async removeSubscriptionCode(e){return this.purpleRef.store.removeSubscriptionCode({code:e})}async getSubscriptionCodes(){return(await this.purpleRef.store.getSubscriptionCodes()).subscriptionCodes}async getPrices(e){return this.purpleRef.store.getPrices({productIds:e})}async overrideTrackingApis(e){this.overrideLegacyTrackingApis(this.purpleRef,e),this.purpleRef.tracking.setUserAttribute=async t=>{e.setUserAttribute(t)},this.purpleRef.tracking.debug=async t=>{e.toggleLogging(t.logging)}}overrideLegacyTrackingApis(e,t){e.tracking.trackView=async(e,n)=>{"string"==typeof e?e={key:e,optionalParams:n}:n=e.optionalParams,t.sendView(e.key,n)},e.tracking.trackAction=async(e,n)=>{"string"==typeof e?e={key:e,optionalParams:n}:n=e.optionalParams,t.sendEvent(e.key,n)},e.tracking.trackPurchase=async(e,n)=>{"string"==typeof e?e={key:e,optionalParams:n}:n=e.optionalParams,t.sendPurchase(e.key,n)}}async trackAction(e,t){const n={key:UY(e),optionalParams:jY(t||{})};return this.purpleRef.tracking.trackAction(n)}async trackView(e,t){const n={key:UY(e),optionalParams:jY(t||{})};return this.purpleRef.tracking.trackView(n)}async trackPurchase(e){return e.key=UY(e.key),e.optionalParams&&(e.optionalParams=jY(e.optionalParams)),this.purpleRef.tracking.trackPurchase(e)}async setUserAttribute(e){return e.key=UY(e.key),this.purpleRef.tracking.setUserAttribute(e)}async initCache(){const[e]=await Promise.all([this.getState(DY),this.updateBookmarks(),this.updateRepeatablePublicationProducts()]);TY===e?await this.cacheService.restoreCachesFromStorage():(console.debug(`Cache version: ${e}, Experience version: ${TY}: ignoring cache`),this.setState(DY,TY))}doCacheEviction(e,t){let n=0;const r=Date.now()-1e3*t*60*60;for(const[t,i]of Object.entries(e))i?.timestamp<r&&(delete e[t],n++);n>0&&console.debug(`Removed ${n} obsolete cache entries (age > ${t}h)`)}extractIdsFromApiResponse(e,t){if(!e)return[];switch(t){case"lookupPathSegments":return e.map((e=>e.identifier))||[];case"getTaxonomies":return e.nodes?.map((e=>this.cacheService.getTaxonomyCacheKey(e)))||[];default:return e.nodes?.map((e=>e.id))||[]}}removeDownloadedByIdFromFetchOptions(e){const t={...e?.fetchOptions},n=t?.downloadedById;n&&delete t.downloadedById;const r={...e};return Object.keys(t).length>0?r.fetchOptions=t:delete r.fetchOptions,{modifiedParams:r,downloadedById:n}}withApiCache(e,t,n,r=!1){let{modifiedParams:i,downloadedById:o}=this.removeDownloadedByIdFromFetchOptions(n);const s=`${e}:${JSON.stringify(i)}`;let a;if(this.implUsedDirectly&&(a=Zone.current.scheduleMacroTask(s,(()=>{}),{},(()=>{}),(()=>{}))),!r&&this.cacheService.PURPLE_API_CACHE[s]){a&&a.invoke();const t=this.cacheService.getResponseOrFalseFromCache(e,i);return t?Promise.resolve({...this.cacheService.PURPLE_API_CACHE[s],nodes:[t]}):Promise.resolve(this.cacheService.getApiCache(e,i))}return t(i).then((t=>{const n=Date.now(),r=this.extractIdsFromApiResponse(t,e);return this.cacheService.PURPLE_API_CACHE[s]={..."lookupPathSegments"!==e&&{...t},...o&&{downloadedById:o},timestamp:n,nodes:r},a?.invoke(),t})).catch((t=>{throw a?.invoke(),`Error [withApiCache] [${e}]: ${t}`}))}getPublicationsFromCache(e){return this.cacheService.getApiCache("getPublications",e)}getIssuesFromCache(e){const t=AN(e);return this.cacheService.getApiCache("getContents",t)}getCatalogContentsFromCache(e){return this.cacheService.getApiCache("getContents",e)}getCollectionsFromCache(e){return this.cacheService.getApiCache("getCollections",e)}getCategoriesFromCache(e){return this.cacheService.getApiCache("getCategories",e)}getTaxonomiesFromCache(e){return this.cacheService.getApiCache("getTaxonomies",e)}getCatalogMenusFromCache(e){return this.cacheService.getApiCache("getMenus",e)}async getIssue(e,t=!1,n){try{const n={first:1};return e&&(n.issueFilter={id:{value:e}}),(await this.getIssues(n,t)).nodes[0]}catch(t){if(this.cacheService.PURPLE_CONTENT_CACHE[e])return this.cacheService.PURPLE_OPTIONAL_CACHE[e]?{...this.cacheService.PURPLE_CONTENT_CACHE[e],...this.cacheService.PURPLE_OPTIONAL_CACHE[e]}:this.cacheService.PURPLE_CONTENT_CACHE[e];if(n){const t={...PY,...n};return this.cacheService.PURPLE_CONTENT_CACHE[e]=t,t}throw t}}getIssueFromCache(e){if(this.cacheService.PURPLE_CONTENT_CACHE[e])return this.cacheService.PURPLE_CONTENT_CACHE[e];{const t=this.getIssuesFromCache({first:1,issueFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getCatalogContent(e,t=!1,n){const r={first:1,fetchOptions:n,contentFilter:{id:{value:e}}};try{const e=(await this.getCatalogContents(r,t)).nodes[0];if(e)return e}catch(e){console.error(e)}try{const t=await this.getCatalogContentFromCache(e);if(t)return t}catch(e){console.error(e)}throw new Error("CatalogContent not found")}getCatalogContentFromCache(e){if(this.cacheService.PURPLE_CONTENT_CACHE[e])return this.cacheService.PURPLE_OPTIONAL_CACHE[e]?{...this.cacheService.PURPLE_CONTENT_CACHE[e],...this.cacheService.PURPLE_OPTIONAL_CACHE[e]}:this.cacheService.PURPLE_CONTENT_CACHE[e];{const t=this.getCatalogContentsFromCache({first:1,contentFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getCollection(e,t=!1,n){try{if(this.cacheService.PURPLE_COLLECTION_CACHE[e]&&!t)return this.cacheService.PURPLE_COLLECTION_CACHE[e];{const r={first:1};e&&(r.collectionFilter={id:{value:e}}),n&&(r.elementsParams=n);const i=(await this.getCollections(r,t)).nodes[0];if(!i)throw new Error(`Collection ${e} not found`);return i}}catch(t){if(this.cacheService.PURPLE_COLLECTION_CACHE[e])return this.cacheService.PURPLE_COLLECTION_CACHE[e];throw t}}getCollectionFromCache(e){if(this.cacheService.PURPLE_COLLECTION_CACHE[e])return this.cacheService.PURPLE_COLLECTION_CACHE[e];{const t=this.getCollectionsFromCache({first:1,collectionFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getMenu(e,t=!1,n){try{if(this.cacheService.PURPLE_MENU_CACHE[e]&&!t)return this.cacheService.PURPLE_MENU_CACHE[e];{const r={first:1,...n};e&&(r.contentFilter={id:{value:e}});const i=(await this.getMenus(r,t)).nodes[0];if(!i)throw new Error("CatalogMenu not found");return i}}catch(t){if(this.cacheService.PURPLE_MENU_CACHE[e])return this.cacheService.PURPLE_MENU_CACHE[e];throw t}}getCatalogMenuFromCache(e){if(this.cacheService.PURPLE_MENU_CACHE[e])return this.cacheService.PURPLE_MENU_CACHE[e];{const t=this.getCatalogMenusFromCache({first:1,issueFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getPublication(e,t=!1){if(this.cacheService.PURPLE_PUBLICATION_CACHE[e]&&!t)return this.cacheService.PURPLE_PUBLICATION_CACHE[e];{const n={first:1};return n.publicationFilter={id:{value:e}},(await this.getPublications(n,t)).nodes[0]}}getPublicationFromCache(e){if(this.cacheService.PURPLE_PUBLICATION_CACHE[e])return this.cacheService.PURPLE_PUBLICATION_CACHE[e];{const t=this.getPublicationsFromCache({first:1,publicationFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getCategory(e,t=!1){if(this.cacheService.PURPLE_TAXONOMY_CACHE[e])return this.cacheService.PURPLE_TAXONOMY_CACHE[e];{const n={first:1};return e&&(n.categoryFilter={id:{value:e}}),(await this.getCategories(n,t)).nodes[0]}}async getTaxonomy(e,t,n=!1,r){const i={id:{value:e}},o={first:1,fetchOptions:r,taxonomyFilter:t?{AND:[i,{type:{value:t}}]}:i};return(await this.getTaxonomies(o,n)).nodes[0]}initServerPlatform(e,t,n,r,i,o,s){s.loadConfig(),this.initPurpleRef(o,t),this.implUsedDirectly=!0,this.overrideJsApisForServer(e,t,n,r,i),window.purple=this.purpleRef}initPurpleRef(e,t){const n=Object.values(NN);this.purpleRef=new EY(t,((t,r)=>{this.updateEntitlementStorage(n,"entitlementUserData",r,t),this.updateSubscriptionCodeStorage(r,t),e.updateMetadata()}))}updateEntitlementStorage(e,t,n,r){if(e.includes(n)){const e=JSON.parse(localStorage.getItem(t))||{};e[n]=r[n],localStorage.setItem(t,JSON.stringify(e))}}updateSubscriptionCodeStorage(e,t){if("subscriptionCodes"===e){const e=t.subscriptionCodes||[];localStorage.setItem("subscriptionCodes",JSON.stringify(e))}}overrideJsApisForServer(e,t,n,r,i){this.overrideAppPerformActionUrlApi(r),this.overrideBookmarkApis(t),this.overrideCatalogApis(),this.overrideConsentApis(),this.overrideContentOpenApi(e,n),this.overrideTrackingApis(i),this.overrideCloseViewJsApi(),this.overrideStateApi()}initAppPlatform(){this.purpleRef=window.purple}initPurpleExperience(e,t){this.purpleRef.experience=new aj(this.injector),this.purpleRef.experience.global=t.getGlobalData(),this.purpleRef.experience.appWebConfig=e}subscribeToConfigLoaderService(e){e.getConfig().pipe(Fe()).subscribe((e=>{this._downloadOptions=e[rN.O.DOWNLOAD_OPTIONS]||{},window.isIssueLocked&&(this.isContentLocked=window.isIssueLocked)}))}initListeners(){this.addInvalidationListener((()=>this.invalidate()));let e=!0;this.addLifecycleListener((t=>{e||window.dispatchEvent(new CustomEvent("storefront-lifecycle",{detail:t})),e=!1})),this.addConnectionStateListener((e=>{this.connectionStateSubject.next(e)}))}};wY=function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([su({providedIn:"root"}),SY(0,Lr(bl)),SY(3,Lr($Y))],wY);class OY{static injector}var AY=n(8617);async function NY(e,t,n=(e=>Promise.resolve(!e.purchaseData.purchased)),r=null,i=!0,o){let s,a,c;if(o||(o=OY.injector.get(wY)),Array.isArray(e)?a=e.filter((e=>!!e)):s=e,a?c=a.map((e=>e.issue||e)):s?(r?(c=[s.content],c.length&&function(e,t,n){const r=e.getIssues(!0);return e.issue?.id!==t.id&&!r.find((e=>e.id===t.id))||!!r.find((e=>n[e.id]&&!WA(e,n[e.id])))}(s,t,r)&&(c=[s.content])):c=[s.content],c=c.filter((e=>e.type!==zA.IssueType.ISSUE))):c=[],c.length){const e=[];for(const t of c)await n(t,o)&&t.previewIssue?e.push(t.previewIssue.id):e.push(t.id);return e}return[await n(t,o)&&t.previewIssue?t.previewIssue.id:t.id]}function MY(e,t){let n;const r={OR:e.map((e=>({id:{value:e}})))};return n=t?{AND:[r,t]}:r,n}const PY={contentType:zA.CatalogContentType.ISSUE,id:null,name:null,index:null,description:null,version:null,state:null,type:null,publicationId:null,comingSoon:null,purchasable:void 0,purchased:void 0,access:zA.Access.PURCHASABLE,purchasedBy:null,properties:{},numberOfPages:null,contentLength:null,publicationDate:null,lastModified:null,thumbnails:{default:null},thumbnailsExtended:{},tags:[],categories:[],purchaseData:{purchased:void 0,purchasedBy:[]}};function RY(e,t,n){const r=e.version;switch(n){case zA.IntOperation.EQUAL:return r.major===t.major&&r.minor===t.minor;case zA.IntOperation.LESS_THAN:return r.major<t.major||r.major===t.major&&r.minor<t.minor;case zA.IntOperation.GREATER_THAN:return r.major>t.major||r.major===t.major&&r.minor>t.minor}}function xY(e,t,n,r=""){return(0,iN.xl)(e)?function(e,t,n,r=""){let i=e?{[r+"ISSUE_ID"]:e.id,[r+"ISSUE_NAME"]:e.name,[r+"ISSUE_TYPE"]:e.type,[r+"ISSUE_CATEGORIES"]:e.categories&&e.categories.join(","),[r+"ISSUE_TAGS"]:e.tags&&e.tags.join(","),[r+"ISSUE_PRODUCT_ID"]:e.productId,[r+"ISSUE_PURCHASABLE"]:"boolean"==typeof e.purchasable?e.purchasable.toString():e.purchasable,[r+"ISSUE_PURCHASED"]:"boolean"==typeof e.purchased?e.purchased.toString():e.purchased,...e.properties?Object.keys(e.properties).reduce(((t,n)=>({...t,[`${r}ISSUE_PROPERTY_${UY(n)}`]:e.properties[n]})),{}):{}}:{};return n&&(i={...i,[r+"ISSUE_PRICE"]:n.formattedPrice,[r+"ISSUE_PRICE_VALUE"]:n.price.toString(),[r+"ISSUE_PRICE_CURRENCY"]:n.currency}),t&&(i={...i,...LY(t,r),[r+"ISSUE_LATEST"]:t.currentIssueId===e.id?"true":"false"}),i}(e,t,n,r):{}}function kY(e,t){let n=e?{ISSUE_TYPE:e.type,ISSUE_CATEGORIES:e.categories&&e.categories.join(","),ISSUE_TAGS:e.tags&&e.tags.join(","),ISSUE_PRODUCT_ID:e.productId,ISSUE_PURCHASABLE:"boolean"==typeof e.purchasable?e.purchasable.toString():e.purchasable,ISSUE_PURCHASED:"boolean"==typeof e.purchased?e.purchased.toString():e.purchased}:{};return t&&(n={...n,...FY(t),ISSUE_LATEST:t.currentIssueId===e.id?"true":"false"}),n}function LY(e,t=""){return e?{[t+"PUBLICATION_ID"]:e.id,[t+"PUBLICATION_NAME"]:e.name,[t+"PUBLICATION_TYPE"]:e.type,...e.properties?Object.keys(e.properties).reduce(((n,r)=>({...n,[`${t}PUBLICATION_PROPERTY_${UY(r)}`]:e.properties[r]})),{}):{}}:{}}function FY(e){return e?{PUBLICATION_TYPE:e.type}:{}}function UY(e){return e.toUpperCase().replace(/-/g,"_")}function jY(e){return Object.keys(e).reduce(((t,n)=>((e[n]||"boolean"==typeof e[n])&&(t[UY(n)]=e[n]),t)),{})}function VY(e){return Object.values([AY.r.ISSUE_ARTICLE,AY.r.READ_MODE_ARTICLE]).includes(e)}zA.Access.PURCHASABLE;const $Y=new zn("PurpleEnvironment");new zn("PurpleEnvironmentBackend")},4620:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e={},t={}){Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:r(t[n])&&r(e[n])&&Object.keys(t[n]).length>0&&i(e[n],t[n])}))}n.d(t,{YE:()=>s,zk:()=>c});const o={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function s(){const e="undefined"!=typeof document?document:{};return i(e,o),e}const a={document:o,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function c(){const e="undefined"!=typeof window?window:{};return i(e,a),e}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";const e={oval:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff">\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(1 1)" stroke-width="2">\n <circle stroke-opacity=".5" cx="18" cy="18" r="18"/>\n <path d="M36 18c0-9.94-8.06-18-18-18">\n <animateTransform\n attributeName="transform"\n type="rotate"\n from="0 18 18"\n to="360 18 18"\n dur="1s"\n repeatCount="indefinite"/>\n </path>\n </g>\n </g>\n</svg>\n',puff:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#fff">\n <g fill="none" fill-rule="evenodd" stroke-width="2">\n <circle cx="22" cy="22" r="1">\n <animate attributeName="r"\n begin="0s" dur="1.8s"\n values="1; 20"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.165, 0.84, 0.44, 1"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="0s" dur="1.8s"\n values="1; 0"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.3, 0.61, 0.355, 1"\n repeatCount="indefinite" />\n </circle>\n <circle cx="22" cy="22" r="1">\n <animate attributeName="r"\n begin="-0.9s" dur="1.8s"\n values="1; 20"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.165, 0.84, 0.44, 1"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="-0.9s" dur="1.8s"\n values="1; 0"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.3, 0.61, 0.355, 1"\n repeatCount="indefinite" />\n </circle>\n </g>\n</svg>\n',rings:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" stroke="#fff">\n <g fill="none" fill-rule="evenodd" transform="translate(1 1)" stroke-width="2">\n <circle cx="22" cy="22" r="6" stroke-opacity="0">\n <animate attributeName="r"\n begin="1.5s" dur="3s"\n values="6;22"\n calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="1.5s" dur="3s"\n values="1;0" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-width"\n begin="1.5s" dur="3s"\n values="2;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="22" cy="22" r="6" stroke-opacity="0">\n <animate attributeName="r"\n begin="3s" dur="3s"\n values="6;22"\n calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="3s" dur="3s"\n values="1;0" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-width"\n begin="3s" dur="3s"\n values="2;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="22" cy="22" r="8">\n <animate attributeName="r"\n begin="0s" dur="1.5s"\n values="6;1;2;3;4;5;6"\n calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n </g>\n</svg>\n',spinningCircles:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 58 58" xmlns="http://www.w3.org/2000/svg">\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(2 1)" stroke="#FFF" stroke-width="1.5">\n <circle cx="42.601" cy="11.462" r="5" fill-opacity="1" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="1;0;0;0;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="49.063" cy="27.063" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;1;0;0;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="42.601" cy="42.663" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;1;0;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="27" cy="49.125" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;1;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="11.399" cy="42.663" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;1;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="4.938" cy="27.063" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;0;1;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="11.399" cy="11.462" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;0;0;1;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="27" cy="5" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;0;0;0;1" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n </g>\n </g>\n</svg>\n',tail:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">\n <defs>\n <linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="$id">\n <stop stop-color="#fff" stop-opacity="0" offset="0%"/>\n <stop stop-color="#fff" stop-opacity=".631" offset="63.146%"/>\n <stop stop-color="#fff" offset="100%"/>\n </linearGradient>\n </defs>\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(1 1)">\n <path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#$id)" stroke-width="2">\n <animateTransform\n attributeName="transform"\n type="rotate"\n from="0 18 18"\n to="360 18 18"\n dur="0.9s"\n repeatCount="indefinite"/>\n </path>\n <circle fill="#fff" cx="36" cy="18" r="1">\n <animateTransform\n attributeName="transform"\n type="rotate"\n from="0 18 18"\n to="360 18 18"\n dur="0.9s"\n repeatCount="indefinite"/>\n </circle>\n </g>\n </g>\n</svg>\n',dots:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="#fff">\n <circle cx="15" cy="15" r="15">\n <animate attributeName="r" from="15" to="15"\n begin="0s" dur="0.8s"\n values="15;9;15" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="fill-opacity" from="1" to="1"\n begin="0s" dur="0.8s"\n values="1;.5;1" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="60" cy="15" r="9" fill-opacity="0.3">\n <animate attributeName="r" from="9" to="9"\n begin="0s" dur="0.8s"\n values="9;15;9" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="fill-opacity" from="0.5" to="0.5"\n begin="0s" dur="0.8s"\n values=".5;1;.5" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="105" cy="15" r="15">\n <animate attributeName="r" from="15" to="15"\n begin="0s" dur="0.8s"\n values="15;9;15" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="fill-opacity" from="1" to="1"\n begin="0s" dur="0.8s"\n values="1;.5;1" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n</svg>\n',segments:'<?xml version="1.0" encoding="utf-8"?>\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2400 2400" xml:space="preserve" width="24" height="24">\n <g stroke-width="200" stroke-linecap="round" stroke="#000000" fill="none" id="spinner">\n <line x1="1200" y1="600" x2="1200" y2="100"/>\n <line opacity="0.5" x1="1200" y1="2300" x2="1200" y2="1800"/>\n <line opacity="0.917" x1="900" y1="680.4" x2="650" y2="247.4"/>\n <line opacity="0.417" x1="1750" y1="2152.6" x2="1500" y2="1719.6"/>\n <line opacity="0.833" x1="680.4" y1="900" x2="247.4" y2="650"/>\n <line opacity="0.333" x1="2152.6" y1="1750" x2="1719.6" y2="1500"/>\n <line opacity="0.75" x1="600" y1="1200" x2="100" y2="1200"/>\n <line opacity="0.25" x1="2300" y1="1200" x2="1800" y2="1200"/>\n <line opacity="0.667" x1="680.4" y1="1500" x2="247.4" y2="1750"/>\n <line opacity="0.167" x1="2152.6" y1="650" x2="1719.6" y2="900"/>\n <line opacity="0.583" x1="900" y1="1719.6" x2="650" y2="2152.6"/>\n <line opacity="0.083" x1="1750" y1="247.4" x2="1500" y2="680.4"/>\n <animateTransform attributeName="transform"\n attributeType="XML"\n type="rotate"\n keyTimes="0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667"\n values="0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199"\n dur="0.83333s"\n begin="0s"\n repeatCount="indefinite"\n calcMode="discrete" />\n </g>\n</svg>\n\n'};var t,n,r=__webpack_require__(4409);!function(e){e.NONE="none",e.HIDE="hide",e.SHRINK="shrink"}(t||(t={})),function(e){e.BACK="back",e.MENU="menu"}(n||(n={})),t.SHRINK,n.MENU;const i={CONTENT_TITLE:"%s",CONTENT_DESCRIPTION:"%s",CONTENT_PUBLICATION_TITLE:"%s",CONTENT_ACTION_PURCHASE:"Purchase for %s",CONTENT_ACTION_PURCHASE_LOADING:"Loading price...",CONTENT_ACTION_PURCHASE_UNAVAILABLE:"Price not available",CONTENT_ERROR:"Error loading content data",CONTENT_ERROR_BUTTON:"Try again",CONTENT_UPDATE_BADGE_MESSAGE:"Update available",CONTENT_DESCRIPTION_TOGGLE_COLLAPSE:"Show less",CONTENT_DESCRIPTION_TOGGLE_EXPAND:"Show more",CONTENT_ACTION_READ:"Read",CONTENT_ACTION_SUBSCRIBE:"Subscribe",CONTENT_ACTION_COUPON:"Coupon",CONTENT_ACTION_LOGIN:"Login",ISSUE_DESCRIPTION_TOGGLE_EXPAND:"Show more",ISSUE_DESCRIPTION_TOGGLE_COLLAPSE:"Show less",ISSUE_ACTION_READ:"Read",ISSUE_ACTION_PURCHASE:"Purchase for %s",ISSUE_ACTION_PURCHASE_LOADING:"Loading price...",ISSUE_ACTION_PURCHASE_UNAVAILABLE:"Price not available",ISSUE_ACTION_DOWNLOAD:"Download",ISSUE_ACTION_PREVIEW:"Preview",ISSUE_ACTION_SUBSCRIBE:"Subscribe",ISSUE_ACTION_DOWNLOADING:"Downloading...",ISSUE_ACTION_DELETE:"Delete",ISSUE_ACTION_LOGIN:"Login",ISSUE_ACTION_CANCEL:"Cancel",ISSUE_ACTION_COUPON:"Coupon",ISSUE_ERROR:"Error loading issue data",ISSUE_ERROR_BUTTON:"Try again",ISSUE_DOWNLOAD_CONFIRM_TITLE:"Download issue",ISSUE_DOWNLOAD_CONFIRM_MESSAGE:'Do you want to download "%(content.name)s"?',ISSUE_DOWNLOAD_CONFIRM_OK:"OK",ISSUE_DOWNLOAD_CONFIRM_CANCEL:"Cancel",ISSUE_TITLE:"%s",ISSUE_DESCRIPTION:"%s",ISSUE_PUBLICATION_TITLE:"%s",ISSUE_DELETE_TITLE:"Delete issue",ISSUE_DELETE_MESSAGE:'Do you really want to delete the issue %s"?',ISSUE_DELETE_CONFIRM:"Delete",ISSUE_DELETE_CANCEL:"Cancel",ISSUE_UPDATE_BADGE_MESSAGE:"Update available",ISSUE_UPDATE_TITLE:"Update available",ISSUE_UPDATE_MESSAGE:'A new version of this issue "%s" is available. Would you like to read the old version or the new one?',ISSUE_UPDATE_NEW_VERSION:"Read new version",ISSUE_UPDATE_OLD_VERSION:"Read old version",PUBLICATION_TITLE:"%s",PUBLICATION_DESCRIPTION:"%s",PUBLICATION_ISSUES_PER_YEAR:"<strong>%s issues</strong> published per year",PUBLICATION_CONTENTS_PER_YEAR:"<strong>%s contents</strong> published per year",PUBLICATION_SUBSCRIPTIONS_TITLE:"Store Subscriptions",PUBLICATION_SUBSCRIPTIONS_HEADER:"Introduction text regarding subscriptions",PUBLICATION_SUBSCRIPTIONS_FOOTER:"<strong>Terms of use</strong> Terms of use go here",PUBLICATION_SUBSCRIPTIONS_RESTORE_PURCHASES:"Restore Purchases",PUBLICATION_SUBSCRIPTIONS_MANAGE_SUBSCRIPTIONS:"Manage Subscriptions",DROPDOWN_ISSUE_STATE_RESET:"All Issues",DROPDOWN_ISSUE_STATE_PURCHASED:"My Issues",DROPDOWN_ISSUE_STATE_LOCAL:"My Downloads",DROPDOWN_CATEGORY_RESET:"All categories",TOGGLE_PUBLICATION_TYPE_KIOSK:"Issues",TOGGLE_PUBLICATION_TYPE_CHANNEL:"Articles",SEARCH_FIELD_PLACEHOLDER:"Search...",SEARCH_RESULT_TITLE:"Search results",SEARCH_RESULT_EMPTY_TITLE:"Search Results",SEARCH_RESULT_TOGGLE_EXPAND:"Show more",SEARCH_RESULT_TOGGLE_COLLAPSE:"Show less",SEARCH_RESULT_PAGE_HIT_EXCERPT:"%s",SEARCH_RESULT_PAGE_LABEL_MESSAGE:"Page %s",SEARCH_RESULT_NO_SEARCH:"Please enter a search phrase.",SEARCH_RESULT_NO_RESULT:'No content was found for your search phrase "%1$s". Please try again.',LOGIN_TITLE:"Login",LOGIN_TEASER:"Log in for more content.",LOGIN_TEASER_RELOGIN:"You have been logged out. Please log in again.",LOGIN_HELP:'Forgotten your password? <a href="https://sprylab.com" target="_blank">recover</a>',LOGIN_USERNAME_PLACEHOLDER:"Email",LOGIN_PASSWORD_PLACEHOLDER:"Password",LOGIN_SUBMIT_BUTTON:"Log in",LOGIN_LOGOUT_TITLE:"Logout",LOGIN_LOGOUT_TEASER:"You can log out here.",LOGIN_LOGOUT_HELP:"",LOGIN_LOGOUT_BUTTON:"Log out",LOGOUT_TITLE:"Logout",LOGOUT_MESSAGE:"Do you really want to logout?",LOGOUT_BUTTON_CONFIRM:"Logout",LOGOUT_BUTTON_CANCEL:"Cancel",COUPON_TITLE:"Coupon",COUPON_TEASER:"Here you can enter your coupon code.",COUPON_CODE_TITLE:"Please enter your coupon code",COUPON_CODE_PLACEHOLDER:"coupon code",COUPON_SUBMIT_BUTTON:"Activate",COUPON_ACTIVATED_TITLE:"Your activated coupon codes",COUPON_DEACTIVATE_BUTTON:"Delete",COUPON_VALID_TITLE:"Add coupon",COUPON_VALID_MESSAGE:"The code you entered is valid.",COUPON_VALID_BUTTON_OK:"OK",COUPON_VALID_BUTTON_CANCEL:"Cancel",COUPON_DEACTIVATE_TITLE:"Deactivate coupon code",COUPON_DEACTIVATE_MESSAGE:'Do you really want to deactivate the code %s"?',COUPON_DEACTIVATE_BUTTON_CONFIRM:"OK",COUPON_DEACTIVATE_BUTTON_CANCEL:"Cancel",DIALOG_TITLE:"Dialog",DIALOG_ERROR:"Error",ERROR_SUBSCRIPTION:"The subscription could not be purchased. Please try again later.",ERROR_PURCHASE:"The purchase could not be completed. %s",ERROR_PUBLICATION_COMPLETION:"Product data could not be loaded. %s",ERROR_SEARCH:"The search could not be performed. Please try again later",ERROR_LOGIN:"The login could not be performed. %s",ERROR_COUPON_INVALID:"The code you entered is not valid.",ERROR_COUPON_INVALID_BUTTON:"OK",ERROR_COUPON_EXISTS:"This code is already added.",ERROR_COUPON_EXISTS_BUTTON:"OK",ERROR_COUPON_OFFLINE:"No internet connection! This code could not be added.",ERROR_COUPON_OFFLINE_BUTTON:"OK",ERROR_COUPON_DEACTIVATE:"This code could not be deactivated.",ERROR_COUPON_DEACTIVATE_BUTTON:"OK",ERROR_COUPON_DEACTIVATE_OFFLINE:"No internet connection! This code could not be deactivated.",ERROR_COUPON_DEACTIVATE_OFFLINE_BUTTON:"OK",ERROR_COUPON_DEACTIVATE_UNKNOWN:"Code is unknown! This code could not be deactivated.",ERROR_COUPON_DEACTIVATE_UNKNOWN_BUTTON:"OK",ERROR_DOWNLOAD:"Download failed for %2$s. %1$s",ERROR_PREVIEW_OPEN:"Error opening preview. %s",ERROR_CONTENT_OPEN:"Error opening content. %s",ACCESS_DENIED:"Access denied.",ALREADY_LOGGED_IN:"You are already logged in.",USER_DEACTIVATED:"Your account is deactivated.",INSTALLATION_LIMIT_EXCEEDED:"The limit of simultaneously logged in devices has been reached.",ALREADY_OWNED:"You already own this product.",CANCELLED:"Process was cancelled by user.",CONFIGURATION_ERROR:"Error in remote system.",ISSUE_NOT_FOUND:"The requested content could not be found.",INSUFFICIENT_SPACE:"The storage on your device is not sufficient.",INVALID_CREDENTIALS:"Please check your username and password.",NETWORK:"Please check your internet connection.",NO_ISSUES_FOUND:"The requested content could not be found.",NOT_FOUND:"The requested content could not be found.",NOT_LOGGED_IN:"You are not logged in.",PAYMENT_REQUIRED:"Access denied.",RESOURCE_NOT_FOUND:"The requested resource could not be found.",UNKNOWN:"An unknown error occurred.",UNKNOWN_OFFER:"The requested offer could not be found.",UNKNOWN_PRODUCT:"The requested product could not be found.",UNKNOWN_VENDOR:"Vendor is unknown.",VALIDATION_FAILED:"The purchase could not be validated.",PULL_TO_REFRESH_PULL:"Pull to refresh",PULL_TO_REFRESH_RELEASE:"Release to refresh",LIST_NO_RESULTS:"There is no content matching the filter criteria.",LIST_ERROR:"Error loading data. %s",LIST_ERROR_BUTTON:"Reload",LIST_ACTION_SELECT_ALL:"Select all",LIST_ACTION_UNSELECT_ALL:"Un-select all",LIST_ACTION_CONFIRM:"Confirm",LIST_ACTION_RESET:"Reset",LIST_ACTION_NEXT:"Next Page Set",LIST_ENTRY_TOGGLE_EXPAND:"Show %u more",LIST_ENTRIES_TOGGLE_EXPAND:"Show %u more",LIST_ENTRY_TOGGLE_COLLAPSE:"Show %u less",LIST_ENTRIES_TOGGLE_COLLAPSE:"Show %u less",LIST_GROUPED_ENTRY_TOGGLE_EXPAND:"Show %u more",LIST_GROUPED_ENTRIES_TOGGLE_EXPAND:"Show %u more",LIST_GROUPED_ENTRY_TOGGLE_COLLAPSE:"Show %u less",LIST_GROUPED_ENTRIES_TOGGLE_COLLAPSE:"Show %u less",BOOKMARK_TITLE:"%s",MENU_ITEM:"%s",BOOKMARK_CREATION_DATE_MESSAGE:"Added on %s",BOOKMARK_PAGE_LABEL_MESSAGE:"Page %s",BOOKMARK_NO_RESULTS:"There are no bookmarks.",BOOKMARK_ERROR:"Error loading bookmarks",BOOKMARK_ERROR_BUTTON:"Reload",BOOKMARK_DELETE_TITLE:"Delete bookmark",BOOKMARK_DELETE_MESSAGE:"Are you sure you want to delete this bookmark?",BOOKMARK_DELETE_MESSAGE_WITH_TITLE:'Are you sure you want to delete the bookmark for "%s"?',BOOKMARK_DELETE_All_TITLE:"Delete bookmarks",BOOKMARK_DELETE_ALL_MESSAGE:"Are you sure you want to delete all bookmarks?",BOOKMARK_DELETE_ALL_OF_ISSUE_MESSAGE:'Are you sure you want to delete all bookmarks for the issue "%s"?',BOOKMARK_DELETE_CONFIRM:"Delete",BOOKMARK_DELETE_CANCEL:"Cancel",ERROR_DELETE_BOOKMARK:"This bookmark could not deleted. %s",ERROR_DELETE_BOOKMARK_WITH_TITLE:'The bookmark for "%2$s" could not deleted. %1$s',ERROR_DELETE_ALL_BOOKMARKS:"Not all bookmarks could be deleted. %s",ERROR_ADD_BOOKMARK:"Bookmark could not be created. %1$s",ERROR_SHARE:"Content could not be shared.",PUBLICATION_COMPLETION_TITLE:"Complete your collection",PUBLICATION_COMPLETION_PROMOTION_TEXT:"Get all %1$s back issues and save over %2$s<br>Was %3$s Now %4$s",PUBLICATION_COMPLETION_ACTION_PURCHASE:"Purchase for %s",SUBSCRIPTION_TITLE:"%s",SUBSCRIPTION_ISSUES_PROMOTION:"%1$s issues for %2$s.",SUBSCRIPTION_ISSUES_ADDITIONAL_PROMOTION:"%1$s issues for the price of %2$s.<br>Was %3$s Now %4$s.",SUBSCRIPTION_ACTION_PURCHASE:"Purchase for %s",SUBSCRIPTION_ACTION_PURCHASE_UNAVAILABLE:"Price not available",SUBSCRIPTION_PRICE:"%s",SUBSCRIPTION_PRICE_FINAL:"Then %1$s / %2$s %3$s",SUBSCRIPTION_PRICE_INTRODUCTORY:"Try %1$s x %2$s %3$s for %4$s",SUBSCRIPTION_PRICE_TRIAL:"Free for %1$s %2$s",SUBSCRIPTION_PRICE_DISCOUNT:"Try %1$s x %2$s %3$s for %4$s",SUBSCRIPTION_DESCRIPTION:"%s",MONTH:"Month",MONTHS:"Months",YEAR:"Year",YEARS:"Years",WEEK:"Week",WEEKS:"Weeks",DAY:"Day",DAYS:"Days",RESTORE_PURCHASES:"Restore purchases",RESTORE_PURCHASES_CONFIRM:"Do you want to restore your purchases?",RESTORE_PURCHASES_SUCCEEDED:"Purchases restored successfully",RESTORE_PURCHASES_FAILED:"Restoring purchased failed",VIEW_ERROR:"Error loading data. %s",VIEW_ERROR_BUTTON:"Reload",ERROR_PRODUCT:"Product data could not be loaded. %s",ERROR_DEEP_LINK_LANDING:"Shared issue could not be opened. %s",APP_MENU_XML_ERROR_MESSAGE:"An Error occured loading app_menu.xml: %s (message: %s)",APP_MENU_XML_ERROR_TITLE:"Error loading app menu",APP_MENU_XML_ERROR_CONFIRM:"Ok",TOC_TITLE:"TABLE OF CONTENTS",DOWNLOAD_PDF_SINGLE_LEFT:"Download left page",DOWNLOAD_PDF_SINGLE_RIGHT:"Download right page",DOWNLOAD_PDF_SINGLE:"Download single page",DOWNLOAD_PDF_FULL:"Download full PDF"};r.O.URL,r.O.VIEW,r.O.MESSAGE,r.O.APP_BAR,r.O.VIEW,r.O.MESSAGE,r.O.APP_BAR,t.NONE,t.NONE,n.BACK,r.O.NAVIGATION,r.O.DOWNLOAD_OPTIONS;var o=__webpack_require__(1606);const s="tail",a=["DIALOG_ERROR","ERROR_DEEP_LINK_LANDING",...Object.keys(o.ERROR_CODE)].reduce(((e,t)=>({...e,[t]:i[t]})),{});var c=__webpack_require__(4664),u=__webpack_require__(5420),l=__webpack_require__(4620);const d=(0,l.YE)(),p=(0,l.zk)(),h={message:"",actions:[],tag:"div",container:d.body,messages:{DIALOG_MESSAGE_OK:"OK",DIALOG_MESSAGE_CONFIRM:"Confirm",DIALOG_MESSAGE_CANCEL:"Cancel"}};class f{config;element;keydownListener=e=>{if(e.stopPropagation(),e.preventDefault(),13===e.which){const e=this.config.actions[this.config.actions.length-1];e&&(e.callback(),this.destroy())}};constructor(e){this.config={...h,...e,messages:{...h.messages,...(e||{}).messages}},this.element=d.createElement(this.config.tag)}render(){p.addEventListener("keypress",this.keydownListener,{once:!0}),this.element.classList.add("purple-dialog");const e=/apple/i.test(navigator.vendor);this.element.classList.add(e?"ios":"android"),this.element.addEventListener("touchstart",(e=>e.preventDefault()));const t=d.createElement("section");if(this.config.title){const e=d.createElement("h1");e.innerHTML=this.config.title,t.appendChild(e)}const n=d.createElement("p");n.innerHTML=this.config.message,t.appendChild(n);const r=d.createElement("div");this.config.actions.forEach((e=>{const t=d.createElement("button");e.type&&t.classList.add(e.type),t.innerText=this.config.messages[e.message]||e.message,t.addEventListener("touchstart",(e=>e.stopPropagation()),{passive:!0}),t.addEventListener("click",(()=>{e.callback(),this.destroy()})),r.append(t)})),t.appendChild(r),this.element.appendChild(t),this.config.container.appendChild(this.element)}destroy(){this.element.remove()}}const g=(0,l.zk)(),m={show:(e,t,n,r)=>new Promise((i=>{for(const e of t){const t=e.callback;e.callback=()=>{t(),i()}}new f({message:e,actions:t,title:n,...r}).render()})),confirm:(e,t,n)=>new Promise(((r,i)=>{new f({message:e,actions:[{message:"DIALOG_MESSAGE_CANCEL",type:"cancel",callback:i},{message:"DIALOG_MESSAGE_CONFIRM",type:"confirm",callback:r}],title:t,...n}).render()})),alert:(e,t,n)=>new Promise((r=>{new f({message:e,actions:[{message:"DIALOG_MESSAGE_OK",callback:r}],title:t,...n}).render()}))};g.PurpleDialog=m;var v=__webpack_require__(9471),y=__webpack_require__(2591),E=__webpack_require__.n(y),_=__webpack_require__(1740),b=__webpack_require__.n(_),C=__webpack_require__(8128),S=__webpack_require__.n(C),I=__webpack_require__(855),D=__webpack_require__.n(I),T=__webpack_require__(3051),w=__webpack_require__.n(T),O=__webpack_require__(3656),A=__webpack_require__.n(O),N=__webpack_require__(5125),M={};M.styleTagTransform=A(),M.setAttributes=D(),M.insert=S().bind(null,"head"),M.domAPI=b(),M.insertStyleElement=w(),E()(N.A,M),N.A&&N.A.locals&&N.A.locals;var P,R=__webpack_require__(6948),x={};x.styleTagTransform=A(),x.setAttributes=D(),x.insert=S().bind(null,"head"),x.domAPI=b(),x.insertStyleElement=w(),E()(R.A,x),R.A&&R.A.locals&&R.A.locals,function(e){e.SHARING="SHARING",e.PUSH="PUSH"}(P||(P={}));const k={openContent:{mode:o.DisplayMode.MODAL,titleBar:!1},openContentFallback:{type:"navigate",url:"resource://dynamic/storefront/index.html#/home(modal:popup/issueDetails/SLIDE_IN)?issue=%(issue.id)s"},mode:P.SHARING},L=l.window.purple;class F{spinner;htmlAboveSpinner;htmlBelowSpinner;messages;issue;config;addLoadingContents(){this.spinner=l.document.createElement("svg"),this.spinner.innerHTML=e[s],this.spinner.classList.add("storefront-spinner"),this.spinner.setAttribute("type",s),this.htmlAboveSpinner=l.document.createElement("div"),this.htmlAboveSpinner.classList.add("custom-html","above","uninitialized"),this.htmlBelowSpinner=l.document.createElement("div"),this.htmlBelowSpinner.classList.add("custom-html","below","uninitialized"),l.document.body.appendChild(this.htmlAboveSpinner),l.document.body.appendChild(this.spinner),l.document.body.appendChild(this.htmlBelowSpinner)}addCustomHTMLContents(){this.config.customHTML?.aboveSpinner&&(this.htmlAboveSpinner.innerHTML=this.config.customHTML.aboveSpinner,this.htmlAboveSpinner.classList.remove("uninitialized")),this.config.customHTML?.belowSpinner&&(this.htmlBelowSpinner.innerHTML=this.config.customHTML.belowSpinner,this.htmlBelowSpinner.classList.remove("uninitialized"))}async initMessages(){const e=await(0,c.hI)("resource://dynamic/storefront/assets/messages.json").catch((e=>({})));this.messages={...a,...e}}async navigateOrActionUrl(e){return async function(e,t,n){if(e.startsWith("purple://")&&window.purple.app.performActionUrl)return window.purple.app.performActionUrl({actionUrl:e});window.location.href=e}(e=(0,v.vsprintf)(e,{issue:this.issue}))}async initConfig(){const e=await(0,c.hI)("resource://dynamic/storefront/deep-link-landing/config.json").catch((e=>({})));this.config={...k,...e}}async initIssue({issueId:e,externalIssueId:t}){let n;e?n={id:{value:e}}:t&&(n={externalIssueId:{value:t}}),this.issue=(await L.catalog.getIssues({issueFilter:n})).nodes[0]}getIssueId(){return new URL(l.window.location.href).searchParams.get("issue")}getExternalIssueId(){return new URL(l.window.location.href).searchParams.get("external-issue-id")}hasAccess(e){return e.access===o.Access.FREE||e.access===o.Access.PURCHASABLE&&e.purchaseData.purchased}async openIssue(){return new u.V({content:this.issue}).openIssue({initialIssueId:this.issue.id,openIssueConfig:this.config.openContent})}async setSharedIssueState(){return L.state.setState({key:"SHARED_ISSUE",value:this.issue.id})}addVisibilityListener(){l.document.addEventListener("visibilitychange",(e=>{"visible"===l.document.visibilityState&&L.app.performActionUrl({actionUrl:"purple://app/home/open"})}))}async handleError(e){return this.spinner.classList.add("hidden"),e?.code||(e={...e,code:o.ERROR_CODE.UNKNOWN}),await m.alert((0,v.vsprintf)(this.messages.ERROR_DEEP_LINK_LANDING,[e.code]),this.messages.DIALOG_ERROR),L.app.performActionUrl({actionUrl:"purple://app/home/open"})}getMode(){let e=new URL(l.window.location.href).searchParams.get("mode");if(e&&![P.PUSH,P.SHARING].includes(e))throw console.error("only allowed mode params: SHARING or PUSH"),{code:o.ERROR_CODE.ERROR_ILLEGAL_ARGUMENTS};return e||(e=this.config.mode),e}async handleOpenContentFallback(){switch(this.config.openContentFallback.type){case"navigate":await this.navigateOrActionUrl(this.config.openContentFallback.url);break;case"preview":this.issue.previewIssue?await this.openIssue():await this.navigateOrActionUrl(this.config.openContentFallback.fallback.url);break;default:console.error("unknown fallback type "+this.config.openContentFallback)}}async run(){this.addLoadingContents();const e=this.getIssueId(),t=this.getExternalIssueId();try{if(!e&&!t)throw{code:o.ERROR_CODE.ISSUE_NOT_FOUND};await Promise.all([this.initMessages(),this.initConfig(),this.initIssue({issueId:e,externalIssueId:t})]),this.addCustomHTMLContents();const n=this.getMode();switch(this.addVisibilityListener(),n){case P.SHARING:this.setSharedIssueState(),await this.openIssue();break;case P.PUSH:this.hasAccess(this.issue)?await this.openIssue():this.handleOpenContentFallback();break;default:console.error("unhandled mode "+n)}}catch(e){this.handleError(e)}}}document.addEventListener("DOMContentLoaded",(()=>(new F).run()))})()})();
|
842
|
+
`,(e=>e.appConfigurationForDomain),t,{domainName:e,preview:n})}static async getAppWebConfig(e,t,n,r){const i=function(e){return new Bq({uri:e+"/graphql",cache:new _Y,defaultOptions:{watchQuery:{fetchPolicy:"no-cache",errorPolicy:"ignore"},query:{fetchPolicy:"no-cache",errorPolicy:"all"}}})}(n),o=await i.query({query:e,variables:r});return i.stop(),EY.mapAppConfiguration(t(o.data))}static mapAppConfiguration(e){return e?{id:e.id,dynamicResources:{lastModified:e.dynamicResources?.lastModified},favicons:e.favicons.map((e=>EY.mapFavicons(e))),entitlementConfig:EY.mapEntitlementConfig(e.entitlementConfig)}:null}static mapFavicons(e){if(e)return{url:e.url,mimeType:e.mimeType}}static mapEntitlementConfig(e){switch(e?.__typename){case"EntitlementConfig":return{mode:nz.ENTITLEMENT_MODE.ENTITLEMENT};case"OAuthConfig":return{mode:nz.ENTITLEMENT_MODE.OAUTH,clientId:e.clientId,loginUrl:e.loginUrl,tokenUrl:e.tokenUrl,logoutUrl:e.logoutUrl};default:return{mode:nz.ENTITLEMENT_MODE.NONE}}}}class _Y extends mG{read=()=>null;write=()=>{};diff=()=>({});watch=()=>()=>{};reset=async()=>{};evict=()=>!1;restore=()=>this;extract=()=>({});removeOptimistic=()=>{};batch=()=>{};performTransaction=()=>{};recordOptimisticTransaction=()=>{};transformDocument=e=>e;transformForLink=e=>e;identify=()=>{};gc=()=>[];modify=()=>!1;readQuery=()=>null;readFragment=()=>null;writeQuery=()=>{};writeFragment=()=>{};updateQuery=()=>null;updateFragment=()=>null}var bY;!function(e){e.PURPLE_API_CACHE="PURPLE_API_CACHE",e.PURPLE_CONTENT_CACHE="PURPLE_CONTENT_CACHE",e.PURPLE_COLLECTION_CACHE="PURPLE_COLLECTION_CACHE",e.PURPLE_MENU_CACHE="PURPLE_MENU_CACHE",e.PURPLE_PUBLICATION_CACHE="PURPLE_PUBLICATION_CACHE",e.PURPLE_TAXONOMY_CACHE="PURPLE_TAXONOMY_CACHE",e.PURPLE_OPTIONAL_CACHE="PURPLE_OPTIONAL_CACHE",e.PURPLE_REDIRECT_CACHE="PURPLE_REDIRECT_CACHE",e.PURPLE_PATH_SEGMENT_CACHE="PURPLE_PATH_SEGMENT_CACHE",e.PURPLE_JSON_CACHE="PURPLE_JSON_CACHE"}(bY||(bY={}));var CY=n(5420),SY=function(e,t){return function(n,r){t(n,r,e)}};const IY={hasNextPage:!1,totalCount:0,cursor:"",nodes:[]},DY="PURPLE_CACHE_VERSION",TY="3.8.1";let wY=class{platformId;router;injector;purpleEnv;transferState;cacheService;DOWNLOAD_HANDLERS={};IMAGE_SRCS=[];bookmarksSubject=new Ie(null);bookmarks=this.bookmarksSubject.asObservable();initedSubject=new QA(1);inited$=this.initedSubject.asObservable();repeatablePublicationProductsSubject=new Ie(null);repeatablePublicationProducts=this.repeatablePublicationProductsSubject.asObservable();connectionStateSubject=new Ie(null);connectionState$=this.connectionStateSubject.asObservable();_downloadOptions={};get downloadOptions(){return this._downloadOptions}purpleConfig;purpleRef;issuePagerInfo;implUsedDirectly=!1;isContentLocked(e,t){return!1}constructor(e,t,n,r,i,o){this.platformId=e,this.router=t,this.injector=n,this.purpleEnv=r,this.transferState=i,this.cacheService=o}async init(e=!1,t,n,r,i,o,s,a,c,u,l){this.purpleConfig=o,t.loadConfig(s),this.cacheService.purpleService=this,e?this.initServerPlatform(s,o,a,c,u,r,i):this.initAppPlatform(),window.PurpleService=this,this.initPurpleExperience(l,n),this.subscribeToConfigLoaderService(t),await this.initCache(),this.cacheService.fillCachesFromTransferState(),this.initListeners();try{window.storefrontHooks.onPurpleServiceInit?.()}catch(e){console.error("Error in onPurpleServiceInit hook:",e)}this.initedSubject.next(!0),this.initedSubject.complete()}getPurpleConfig(){return this.purpleConfig}async updateRepeatablePublicationProducts(){let e;const t={publicationProductFilter:{AND:[{type:{value:zA.PublicationProductType.REPEATABLE_ISSUE_PURCHASE}},{hidden:{value:!1}}]},maxUnlockableContents:1};try{e=await this.getPublicationProducts(t)}catch(t){console.warn("Failed to load repeatable publication products",t),e=[]}return this.repeatablePublicationProductsSubject.next(e),e}async getRepeatablePublicationProductByPublicationId(e){return(await this.repeatablePublicationProducts.pipe(Me((e=>!!e)),Re(1)).toPromise()).find((t=>!!t.publications[e]))}nextInvalidation(){let e;const t=new Promise(((t,n)=>e=t));return window.addEventListener(oN,(()=>e())),t}async invalidate(){this.cacheService.bustApiCache(),await this.updateDownloadHandlerStates(),await this.updateRepeatablePublicationProducts(),window.dispatchEvent(new CustomEvent(oN,{})),this.onMaybeSubscriptionsChanged()}async onMaybeSubscriptionsChanged(){const e=await this.getState("storefront-purchased-subs").then((e=>e&&JSON.parse(e))),t=(await this.getSubscriptions({subscriptionFilter:{purchased:{value:!0}}})).nodes;WA(e,t)||(window.storefrontHooks?.subscriptionsChanged?.({subscriptions:t}),await this.setState("storefront-purchased-subs",JSON.stringify(t))),this.injector.get(oj).notifyAll()}addImageSrc(e){this.IMAGE_SRCS.indexOf(e)<0&&this.IMAGE_SRCS.push(e)}getAlternativeSrc(e){const t=e.split("?")[0];return this.IMAGE_SRCS.find((e=>e?.split("?")[0]===t))||t}filterCategoriesByParam(e){return Object.values(this.cacheService.PURPLE_TAXONOMY_CACHE).filter((t=>hN(e.categoryFilter,t)))}setConfigValue(e,t){this.purpleRef.setConfigValue(e,t)}setPageData(e,t){this.purpleRef.setPageData(e,t)}setIssuePagerInfo(e){this.purpleRef.setIssuePagerInfo(e)}isIssuePager(){return!!this.issuePagerInfo}setCurrentPagerIssueId(e){if(this.issuePagerInfo){const t=this.issuePagerInfo.issues.findIndex((t=>t.id===e));-1!==t&&(this.issuePagerInfo.currentIndex=t,this.issuePagerInfo.visibleIndex=t)}}async getDownloadHandler(e,t){const n=e.id,r=this.DOWNLOAD_HANDLERS[n]&&await this.DOWNLOAD_HANDLERS[n];if(r)return e.id!==r.content.id||WA(e,r.content)||await r.setContent(e),r;const i=await this.getPublication(e.publicationId);return this.DOWNLOAD_HANDLERS[n]=new Promise((n=>{const r=this.downloadOptions,o=new CY.V({content:e,publication:i,autoUpdate:Boolean(r.autoUpdateBehavior),addAppStateListeners:!0}),s={...o.state,error:null},a=new Ie(s);o.addDownloadStateListeners((e=>a.next(e))),o.updates$=a,t&&o.updates$.pipe(Me((e=>!(!e||!e.error)))).subscribe((e=>{const n=function(e,t){const n=[e];return t&&(n.push(t.name),n.push(t.id)),n}(e.error,o.content);t.alert({text:"ERROR_DOWNLOAD",args:n},"DIALOG_ERROR")})),n(o)})),this.DOWNLOAD_HANDLERS[n]}async destroyDownloadHandler(e){for(const t in this.DOWNLOAD_HANDLERS)if(await this.DOWNLOAD_HANDLERS[t]===e){e.updates$.observers.length||delete this.DOWNLOAD_HANDLERS[e.content.id];break}}async updateDownloadHandlers(){return Promise.all(Object.values(this.DOWNLOAD_HANDLERS).map((async e=>{const t=await e;if(t.downloadStarted&&t.autoUpdate)try{await t.update()}catch(e){console.warn("error updating download handler",e)}else t.updateState(!1,!0)})))}async updateDownloadHandlerStates(){return Promise.all(Object.values(this.DOWNLOAD_HANDLERS).map((e=>e.then((e=>e.updateState(!1,!0))))))}async loginAccount(e){return this.purpleRef.account?.login({token:e})}logoutAccount(){return this.purpleRef.account?.logout()}assignLocalPurchases(e){return this.purpleRef.account?.assignLocalPurchases({mode:e})}async getAccountUserData(){return this.purpleRef.account?.getUserData()}overrideAppPerformActionUrlApi(e){this.purpleRef.app.performActionUrl=async({actionUrl:t})=>{if("undefined"!=typeof WP&&WP.instance){const e=WP.instance.getCurrentPlayer();if(e.ctx.actionHandler.processAction({open:{URL:t}},null,e))return}e.openUrl(t)}}openActionUrl(e,t,n){const r="purple-action-url-frame";if(e.startsWith("purple://")&&this.purpleRef.app.performActionUrl&&!t)this.purpleRef.app.performActionUrl({actionUrl:e});else if(t){let t=document.getElementById(r);t||(t=document.createElement("iframe"),t.style.opacity="0",t.id=r,document.body.appendChild(t)),t.src=e}else n?window.open(e,n):window.location.href=e}async performAuthentication(e,t){return this.purpleRef.app.performAuthentication({url:e,callbackParamName:t||"callbackurl"})}addConnectionStateListener(e){this.purpleRef.app.addConnectionStateListener(e)}removeConnectionStateListener(e){this.purpleRef.app.removeConnectionStateListener(e)}addLifecycleListener(e){this.purpleRef.app.addLifecycleListener(e)}removeLifecycleListener(e){this.purpleRef.app.removeLifecycleListener(e)}async getDisplayMode(){return(await this.purpleRef.appBrowser.getDisplayConfig()).displayMode}async isTitleBarEnabled(){return(await this.purpleRef.appBrowser.getDisplayConfig()).titleBarEnabled}overrideBookmarkApis(e){this.purpleRef.bookmark.createBookmark=async t=>{const n={...t,id:nN(),contentType:zA.CatalogContentType.ISSUE,createdAt:(new Date).getTime(),contentId:t.issueId,issueId:t.issueId,issueType:void 0,sharingEnabled:t.sharingEnabled,customData:{...t.customData}},r=(await this.purpleRef.bookmark.getBookmarks()).bookmarks;return r.push(n),await this.setState(`bookmarks-${e.appId}`,JSON.stringify(r)),{bookmark:n}},this.purpleRef.bookmark.getBookmarks=async()=>({bookmarks:JSON.parse(await this.getState(`bookmarks-${e.appId}`))||[]}),this.purpleRef.bookmark.deleteBookmark=async({id:t})=>{const n=(await this.purpleRef.bookmark.getBookmarks()).bookmarks.filter((e=>e.id!==t));await this.setState(`bookmarks-${e.appId}`,JSON.stringify(n))}}async getBookmarks(){return this.bookmarks.pipe(Re(1)).toPromise()}async updateBookmarks(){const e=(await this.purpleRef.bookmark.getBookmarks()).bookmarks;return this.bookmarksSubject.next(e),e}async createBookmark(e){const t=await this.purpleRef.bookmark.createBookmark(e);return await this.updateBookmarks(),t}async deleteBookmark(e){await this.purpleRef.bookmark.deleteBookmark(e),await this.updateBookmarks()}async deleteBookmarks(e){for(const t of e)await this.purpleRef.bookmark.deleteBookmark({id:t});await this.updateBookmarks()}overrideCatalogApis(){this.purpleRef.catalog.getSubscriptions=async e=>IY,this.purpleRef.catalog.getPublicationProducts=async e=>IY}async getPublications(e,t=!1){return this.withApiCache("getPublications",this.purpleRef.catalog.getPublications,e,t,(t=>{t.forEach((t=>{this.cacheService.PURPLE_PUBLICATION_CACHE[t.id]=this.cacheService.setOptionalCache(t,"getPublications",e)})),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_PUBLICATION_CACHE,bY.PURPLE_CONTENT_CACHE,bY.PURPLE_OPTIONAL_CACHE])}))}async getIssues(e,t=!1,n=!1){const r=AN(e);return n&&(r.fetchOptions={includeResources:!0}),this.withApiCache("getContents",this.purpleRef.catalog.getContents,r,t,(e=>{e.forEach((e=>this.cacheService.PURPLE_CONTENT_CACHE[e.id]=this.cacheService.setOptionalCache(e))),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_CONTENT_CACHE,bY.PURPLE_OPTIONAL_CACHE])}))}async getLocalIssues(e,t=!1,n){const r=(await this.purpleRef.catalog.getLocalIssues()).issues.filter((e=>n?e.state.installState===n:e.state.installState!==zA.ContentInstallState.NOT_INSTALLED));let i=[];if(!r.length)return{issues:i};try{if(t){for(const e of r){let t={};try{t=await this.getIssueFromCache(e.id)}catch(e){}i.push({...PY,...e,...t})}e.issueFilter&&(i=i.filter((t=>pN(e.issueFilter,t))))}else{const t={...e,issueFilter:MY(r.map((e=>e.id)),e.issueFilter)};i=(await this.getIssues(t,!0)).nodes}}catch(t){const n=await Promise.all(r.map((async(e,t)=>{let n=PY;try{n={...n,...await this.getIssue(e.id).catch((()=>null))}}catch(e){console.error(e)}const r={...n,...e};return this.cacheService.PURPLE_CONTENT_CACHE[e.id]||(this.cacheService.PURPLE_CONTENT_CACHE[e.id]=r),r})));i=n.filter((t=>pN(e.issueFilter,t)))}return i=i.sort(EN(e.sort??[])),i.forEach((e=>{const t=r.find((t=>t.id===e.id&&t.version===e.version));t&&(e.state=t.state)})),{issues:i}}async getCatalogContents(e,t=!1){return this.withApiCache("getContents",this.purpleRef.catalog.getContents||this.purpleRef.catalog.getIssues,e,t,(t=>{t.forEach((t=>{this.cacheService.PURPLE_CONTENT_CACHE[t.id]=this.cacheService.setOptionalCache(t,"getContents",e)})),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_CONTENT_CACHE,bY.PURPLE_OPTIONAL_CACHE])}))}async completePost(e,t){const n={includeResources:"resources",includeBlocks:"content",includeHtml:"contentHtml",includeBundledContent:"contents",seoMetadata:"seoMetadata"},r=this.cacheService.PURPLE_OPTIONAL_CACHE[e.id];if(Object.entries(n).some((([n,i])=>t[n]&&!e[i]&&!r?.[i]))||r?.version!==e?.version)return await this.getCatalogContent(e.id,!0,t);let i={...e,...r.downloadedBy?{downloadedBy:r.downloadedBy}:{}};for(let[e,t]of Object.entries(n))e&&(i[t]=r[t]);return i}async getOptionalData(e,t,n){if((0,iN.mF)(e))return await this.completePost(e,t);if((0,iN.G4)(e)){const r=(0,iN.Ig)(e);return await this.completePost(r[n],t)}throw new Error(`Invalid content type for getOptionalData: ${e.contentType}`)}async getCollections(e,t=!1){return this.withApiCache("getCollections",this.purpleRef.catalog.getCollections,e,t,(t=>{t.forEach((t=>this.cacheService.PURPLE_COLLECTION_CACHE[t.id]=this.cacheService.setOptionalCache(t,"getCollections",e))),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_COLLECTION_CACHE,bY.PURPLE_OPTIONAL_CACHE])}))}async getCategories(e,t=!1){return this.withApiCache("getCategories",this.purpleRef.catalog.getCategories,e,t,(e=>{e.forEach((e=>this.cacheService.PURPLE_TAXONOMY_CACHE[e.id]=e)),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_TAXONOMY_CACHE)}))}async getTaxonomies(e,t=!1){return this.withApiCache("getTaxonomies",this.purpleRef.catalog.getTaxonomies,e,t,(t=>{t.forEach((t=>{this.cacheService.PURPLE_TAXONOMY_CACHE[this.cacheService.getTaxonomyCacheKey(t)]=this.cacheService.setOptionalCache(t,"getTaxonomies",e)})),this.cacheService.updateTransferStateAndStorage([bY.PURPLE_TAXONOMY_CACHE,bY.PURPLE_OPTIONAL_CACHE])}))}async getMenus(e,t=!1){return this.withApiCache("getMenus",this.purpleRef.catalog.getMenus,e,t,(e=>{e.forEach((e=>{this.cacheService.PURPLE_MENU_CACHE[e.id]=e})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_MENU_CACHE)}))}async getSubscriptions(e){return this.purpleRef.catalog.getSubscriptions(e)}async getCatalogAppSettings(e){return this.purpleRef.catalog.getAppSettings(e)}async search(e){return this.purpleRef.catalog.search(e).then((e=>(e.nodes.forEach((e=>{const t=(0,iN.tr)(e);this.cacheService.PURPLE_CONTENT_CACHE[t.id]=t})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_CONTENT_CACHE),e)))}async getIssueStates(e){return this.purpleRef.catalog.getIssueStates(e)}addInvalidationListener(e){this.isCatalogAPIAvailable()&&this.purpleRef.catalog.addInvalidationListener(e)}removeInvalidationListener(e){this.purpleRef.catalog.removeInvalidationListener(e)}addIssueStateListener=(e,t)=>this.purpleRef.catalog.addIssueStateListener(e,t);removeIssueStateListener=(e,t)=>this.purpleRef.catalog.removeIssueStateListener(e,t);async getPublicationProducts(e){return this.purpleRef.catalog.getPublicationProducts(e).then((e=>e.nodes))}async getCatalogMetadata(){return this.purpleRef.catalog.getMetadata()}async getProducts(e){return this.purpleRef.catalog.getProducts({productId:e})}async getRedirects(e){return this.withApiCache("getRedirects",this.purpleRef.catalog.getRedirects,e,!1,(e=>{e.forEach((e=>{this.cacheService.PURPLE_REDIRECT_CACHE[e.id]=e})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_REDIRECT_CACHE)}))}async lookupPathSegments(e){return this.withApiCache("lookupPathSegments",this.purpleRef.catalog.lookupPathSegments,{pathSegments:e},!1,(e=>{e.forEach((e=>{this.cacheService.PURPLE_PATH_SEGMENT_CACHE[e.identifier]=e})),this.cacheService.updateTransferStateAndStorage(bY.PURPLE_PATH_SEGMENT_CACHE)}))}isCatalogAPIAvailable(){return!!this.purpleRef.catalog}overrideConsentApis(){const e=this.injector.get(xj);this.purpleRef.consent.getConsent=async t=>e.getConsent(t),this.purpleRef.consent.grantConsent=async t=>{e.grantConsent(t)},this.purpleRef.consent.showPrivacyManager=()=>e.showPrivacyManager()}overrideContentOpenApi(e,t){this.purpleRef.content.open=async n=>{let r=!1;const i={OR:n.issueIds.map((e=>({id:{value:e}})))},o=(await this.getIssues({issueFilter:i})).nodes||[];if(!o.length)throw{code:"NO_ISSUES_FOUND"};const s=new Map;if(n.issueIds.forEach((e=>{const t=o.filter((t=>t.id===e));if(t.length>0){const n=t[0];n.access==zA.Access.FREE||n.purchaseData.purchased||(r=!0),s.set(e,n)}})),0===s.size)throw{code:"PAYMENT_REQUIRED"};const a=[];s.forEach(((e,t)=>{const n={id:t,name:e.name,publication:e.publication};a.push(n)}));const c=Math.max(a.findIndex((e=>e.id===n.initialIssue?.id)),0);this.issuePagerInfo={visibleIndex:c,currentIndex:c,issues:a,displayConfig:n.config},this.setIssuePagerInfo(this.issuePagerInfo);const u=a[c].id,l=n.initialIssue?.initialPage,d={};l&&(l.id?d.actionUrl=`purple://kiosk/issue/current/page/${l.id}/open`:l.index?d.actionUrl=`purple://kiosk/issue/current/page/index/${l.index}/open`:l.alias&&(d.actionUrl=`purple://kiosk/issue/current/page/alias/${l.alias}/open`)),n.config?.titleBar||(d.titleBar="false"),r&&(d.customerPreview=r);let p=[e.brand,"presenter",u];e.useCustomerDomain&&(p=["presenter",u]),t.navigate(p,{queryParams:d,queryParamsHandling:"merge"})}}async openContent(e){return new Promise(((t,n)=>{this.purpleRef.content.open(e).then((e=>t(e)),(e=>n(e)))}))}overrideCloseViewJsApi(){this.purpleRef.closeView=()=>{PP.InternalBrowser.stop()}}closeView(){this.purpleRef.closeView()}async getEntitlementUserData(){return this.purpleRef.entitlement.getUserData()}async login(e,t,n){const r={};if(e&&(r.username=e,r.password=t),this.purpleEnv.isUniversal){let e=n?.redirectUrl||JSON.parse(sessionStorage.getItem(zA.LAST_VISITED_PATH)).lastVisitedPath;e||(e=this.injector.get(oj).getHomeUrl());const t={redirectUrl:e};r.state=t}return this.purpleRef.entitlement.login(r)}async logout(e){const t={};if(this.purpleEnv.isUniversal){let n=e?.redirectUrl;n||(n=this.injector.get(oj).getHomeUrl());const r={redirectUrl:n};t.state=r}return this.purpleRef.entitlement.logout(t)}async checkForOauthEntitlement(){return await this.purpleRef.entitlement.checkForOauthEntitlement()}async loginWithToken(e){await this.purpleRef.entitlement.verifyAccessToken({accessToken:e})}async getMetadata(e){return this.purpleRef.metadata.getMetadata({keys:Object.values(zA.METADATA_KEY)})}share=e=>this.purpleRef.share.share(e);overrideStateApi(){this.purpleRef.state.version={major:2,minor:0}}async getState(e){return(await this.purpleRef.state.getState({key:e})).value}async setState(e,t){await this.purpleRef.state.setState({key:e,value:t})}async purchase(e){return this.purpleRef.store.purchase(e)}async subscribe(e,t,n){let r;if(t){const e=(await this.getSubscriptions({})).nodes.find((e=>e.purchased));r=e&&{oldProductId:e.productId,prorationMode:t}}return this.purpleRef.store.subscribe({productId:e,replaceProductParams:r,offerId:n})}async restorePurchases(){return this.purpleRef.store.restorePurchases()}async getPrice(e){return this.purpleRef.store.getPrices({productIds:[e]}).then((e=>e.priceInfos[0]))}async addSubscriptionCode(e){return this.purpleRef.store.addSubscriptionCode({code:e})}async removeSubscriptionCode(e){return this.purpleRef.store.removeSubscriptionCode({code:e})}async getSubscriptionCodes(){return(await this.purpleRef.store.getSubscriptionCodes()).subscriptionCodes}async getPrices(e){return this.purpleRef.store.getPrices({productIds:e})}async overrideTrackingApis(e){this.overrideLegacyTrackingApis(this.purpleRef,e),this.purpleRef.tracking.setUserAttribute=async t=>{e.setUserAttribute(t)},this.purpleRef.tracking.debug=async t=>{e.toggleLogging(t.logging)}}overrideLegacyTrackingApis(e,t){e.tracking.trackView=async(e,n)=>{"string"==typeof e?e={key:e,optionalParams:n}:n=e.optionalParams,t.sendView(e.key,n)},e.tracking.trackAction=async(e,n)=>{"string"==typeof e?e={key:e,optionalParams:n}:n=e.optionalParams,t.sendEvent(e.key,n)},e.tracking.trackPurchase=async(e,n)=>{"string"==typeof e?e={key:e,optionalParams:n}:n=e.optionalParams,t.sendPurchase(e.key,n)}}async trackAction(e,t){const n={key:UY(e),optionalParams:jY(t||{})};return this.purpleRef.tracking.trackAction(n)}async trackView(e,t){const n={key:UY(e),optionalParams:jY(t||{})};return this.purpleRef.tracking.trackView(n)}async trackPurchase(e){return e.key=UY(e.key),e.optionalParams&&(e.optionalParams=jY(e.optionalParams)),this.purpleRef.tracking.trackPurchase(e)}async setUserAttribute(e){return e.key=UY(e.key),this.purpleRef.tracking.setUserAttribute(e)}async initCache(){const[e]=await Promise.all([this.getState(DY),this.updateBookmarks(),this.updateRepeatablePublicationProducts()]);TY===e?await this.cacheService.restoreCachesFromStorage():(console.debug(`Cache version: ${e}, Experience version: ${TY}: ignoring cache`),this.setState(DY,TY))}extractIdsFromApiResponse(e,t){if(!e)return[];switch(t){case"lookupPathSegments":return e.map((e=>e.identifier))||[];case"getTaxonomies":return e.nodes?.map((e=>this.cacheService.getTaxonomyCacheKey(e)))||[];default:return e.nodes?.map((e=>e.id))||[]}}removeDownloadedByIdFromFetchOptions(e){const t={...e?.fetchOptions},n=t?.downloadedById;n&&delete t.downloadedById;const r={...e};return Object.keys(t).length>0?r.fetchOptions=t:delete r.fetchOptions,{modifiedParams:r,downloadedById:n}}async withApiCache(e,t,n,r=!1,i){let{modifiedParams:o,downloadedById:s}=this.removeDownloadedByIdFromFetchOptions(n);const a=`${e}:${JSON.stringify(o)}`;let c;if(this.implUsedDirectly&&(c=Zone.current.scheduleMacroTask(a,(()=>{}),{},(()=>{}),(()=>{}))),!r&&this.cacheService.PURPLE_API_CACHE[a]){c&&c.invoke();const t=this.cacheService.getResponseOrFalseFromCache(e,o);return t?Promise.resolve({...this.cacheService.PURPLE_API_CACHE[a],nodes:[t]}):Promise.resolve(this.cacheService.getApiCache(e,o))}return t(o).then((t=>{const n=Date.now(),r=this.extractIdsFromApiResponse(t,e);if(this.cacheService.PURPLE_API_CACHE[a]={..."lookupPathSegments"!==e&&{...t},...s&&{downloadedById:s},timestamp:n,nodes:r},c?.invoke(),i){const n="lookupPathSegments"!==e?t.nodes:t;i(n)}return t})).catch((t=>{throw c?.invoke(),`Error [withApiCache] [${e}]: ${t}`}))}getPublicationsFromCache(e){return this.cacheService.getApiCache("getPublications",e)}getIssuesFromCache(e){const t=AN(e);return this.cacheService.getApiCache("getContents",t)}getCatalogContentsFromCache(e){return this.cacheService.getApiCache("getContents",e)}getCollectionsFromCache(e){return this.cacheService.getApiCache("getCollections",e)}getCategoriesFromCache(e){return this.cacheService.getApiCache("getCategories",e)}getTaxonomiesFromCache(e){return this.cacheService.getApiCache("getTaxonomies",e)}getCatalogMenusFromCache(e){return this.cacheService.getApiCache("getMenus",e)}async getIssue(e,t=!1,n){try{const n={first:1};return e&&(n.issueFilter={id:{value:e}}),(await this.getIssues(n,t)).nodes[0]}catch(t){if(this.cacheService.PURPLE_CONTENT_CACHE[e])return this.cacheService.PURPLE_OPTIONAL_CACHE[e]?{...this.cacheService.PURPLE_CONTENT_CACHE[e],...this.cacheService.PURPLE_OPTIONAL_CACHE[e]}:this.cacheService.PURPLE_CONTENT_CACHE[e];if(n){const t={...PY,...n};return this.cacheService.PURPLE_CONTENT_CACHE[e]=t,t}throw t}}getIssueFromCache(e){if(this.cacheService.PURPLE_CONTENT_CACHE[e])return this.cacheService.PURPLE_CONTENT_CACHE[e];{const t=this.getIssuesFromCache({first:1,issueFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getCatalogContent(e,t=!1,n){const r={first:1,fetchOptions:n,contentFilter:{id:{value:e}}};try{const e=(await this.getCatalogContents(r,t)).nodes[0];if(e)return e}catch(e){console.error(e)}throw new Error("CatalogContent not found")}async getCollection(e,t=!1,n){try{if(this.cacheService.PURPLE_COLLECTION_CACHE[e]&&!t)return this.cacheService.PURPLE_COLLECTION_CACHE[e];{const r={first:1};e&&(r.collectionFilter={id:{value:e}}),n&&(r.elementsParams=n);const i=(await this.getCollections(r,t)).nodes[0];if(!i)throw new Error(`Collection ${e} not found`);return i}}catch(t){if(this.cacheService.PURPLE_COLLECTION_CACHE[e])return this.cacheService.PURPLE_COLLECTION_CACHE[e];throw t}}getCollectionFromCache(e){if(this.cacheService.PURPLE_COLLECTION_CACHE[e])return this.cacheService.PURPLE_COLLECTION_CACHE[e];{const t=this.getCollectionsFromCache({first:1,collectionFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getMenu(e,t=!1,n){try{if(this.cacheService.PURPLE_MENU_CACHE[e]&&!t)return this.cacheService.PURPLE_MENU_CACHE[e];{const r={first:1,...n};e&&(r.contentFilter={id:{value:e}});const i=(await this.getMenus(r,t)).nodes[0];if(!i)throw new Error("CatalogMenu not found");return i}}catch(t){if(this.cacheService.PURPLE_MENU_CACHE[e])return this.cacheService.PURPLE_MENU_CACHE[e];throw t}}getCatalogMenuFromCache(e){if(this.cacheService.PURPLE_MENU_CACHE[e])return this.cacheService.PURPLE_MENU_CACHE[e];{const t=this.getCatalogMenusFromCache({first:1,issueFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getPublication(e,t=!1){if(this.cacheService.PURPLE_PUBLICATION_CACHE[e]&&!t)return this.cacheService.PURPLE_PUBLICATION_CACHE[e];{const n={first:1};return n.publicationFilter={id:{value:e}},(await this.getPublications(n,t)).nodes[0]}}getPublicationFromCache(e){if(this.cacheService.PURPLE_PUBLICATION_CACHE[e])return this.cacheService.PURPLE_PUBLICATION_CACHE[e];{const t=this.getPublicationsFromCache({first:1,publicationFilter:{id:{value:e}}});return{...t.then((e=>e.nodes[0])),timestamp:t.timestamp}}}async getCategory(e,t=!1){if(this.cacheService.PURPLE_TAXONOMY_CACHE[e])return this.cacheService.PURPLE_TAXONOMY_CACHE[e];{const n={first:1};return e&&(n.categoryFilter={id:{value:e}}),(await this.getCategories(n,t)).nodes[0]}}async getTaxonomy(e,t,n=!1,r){const i={id:{value:e}},o={first:1,fetchOptions:r,taxonomyFilter:t?{AND:[i,{type:{value:t}}]}:i};return(await this.getTaxonomies(o,n)).nodes[0]}initServerPlatform(e,t,n,r,i,o,s){s.loadConfig(),this.initPurpleRef(o,t),this.implUsedDirectly=!0,this.overrideJsApisForServer(e,t,n,r,i),window.purple=this.purpleRef}initPurpleRef(e,t){const n=Object.values(NN);this.purpleRef=new EY(t,((t,r)=>{this.updateEntitlementStorage(n,"entitlementUserData",r,t),this.updateSubscriptionCodeStorage(r,t),e.updateMetadata()}))}updateEntitlementStorage(e,t,n,r){if(e.includes(n)){const e=JSON.parse(localStorage.getItem(t))||{};e[n]=r[n],localStorage.setItem(t,JSON.stringify(e))}}updateSubscriptionCodeStorage(e,t){if("subscriptionCodes"===e){const e=t.subscriptionCodes||[];localStorage.setItem("subscriptionCodes",JSON.stringify(e))}}overrideJsApisForServer(e,t,n,r,i){this.overrideAppPerformActionUrlApi(r),this.overrideBookmarkApis(t),this.overrideCatalogApis(),this.overrideConsentApis(),this.overrideContentOpenApi(e,n),this.overrideTrackingApis(i),this.overrideCloseViewJsApi(),this.overrideStateApi()}initAppPlatform(){this.purpleRef=window.purple}initPurpleExperience(e,t){this.purpleRef.experience=new aj(this.injector),this.purpleRef.experience.global=t.getGlobalData(),this.purpleRef.experience.appWebConfig=e}subscribeToConfigLoaderService(e){e.getConfig().pipe(Fe()).subscribe((e=>{this._downloadOptions=e[rN.O.DOWNLOAD_OPTIONS]||{},window.isIssueLocked&&(this.isContentLocked=window.isIssueLocked)}))}initListeners(){this.addInvalidationListener((()=>this.invalidate()));let e=!0;this.addLifecycleListener((t=>{e||window.dispatchEvent(new CustomEvent("storefront-lifecycle",{detail:t})),e=!1})),this.addConnectionStateListener((e=>{this.connectionStateSubject.next(e)}))}};wY=function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([su({providedIn:"root"}),SY(0,Lr(bl)),SY(3,Lr($Y))],wY);class OY{static injector}var AY=n(8617);async function NY(e,t,n=(e=>Promise.resolve(!e.purchaseData.purchased)),r=null,i=!0,o){let s,a,c;if(o||(o=OY.injector.get(wY)),Array.isArray(e)?a=e.filter((e=>!!e)):s=e,a?c=a.map((e=>e.issue||e)):s?(r?(c=[s.content],c.length&&function(e,t,n){const r=e.getIssues(!0);return e.issue?.id!==t.id&&!r.find((e=>e.id===t.id))||!!r.find((e=>n[e.id]&&!WA(e,n[e.id])))}(s,t,r)&&(c=[s.content])):c=[s.content],c=c.filter((e=>e.type!==zA.IssueType.ISSUE))):c=[],c.length){const e=[];for(const t of c)await n(t,o)&&t.previewIssue?e.push(t.previewIssue.id):e.push(t.id);return e}return[await n(t,o)&&t.previewIssue?t.previewIssue.id:t.id]}function MY(e,t){let n;const r={OR:e.map((e=>({id:{value:e}})))};return n=t?{AND:[r,t]}:r,n}const PY={contentType:zA.CatalogContentType.ISSUE,id:null,name:null,index:null,description:null,version:null,state:null,type:null,publicationId:null,comingSoon:null,purchasable:void 0,purchased:void 0,access:zA.Access.PURCHASABLE,purchasedBy:null,properties:{},numberOfPages:null,contentLength:null,publicationDate:null,lastModified:null,thumbnails:{default:null},thumbnailsExtended:{},tags:[],categories:[],purchaseData:{purchased:void 0,purchasedBy:[]}};function RY(e,t,n){const r=e.version;switch(n){case zA.IntOperation.EQUAL:return r.major===t.major&&r.minor===t.minor;case zA.IntOperation.LESS_THAN:return r.major<t.major||r.major===t.major&&r.minor<t.minor;case zA.IntOperation.GREATER_THAN:return r.major>t.major||r.major===t.major&&r.minor>t.minor}}function xY(e,t,n,r=""){return(0,iN.xl)(e)?function(e,t,n,r=""){let i=e?{[r+"ISSUE_ID"]:e.id,[r+"ISSUE_NAME"]:e.name,[r+"ISSUE_TYPE"]:e.type,[r+"ISSUE_CATEGORIES"]:e.categories&&e.categories.join(","),[r+"ISSUE_TAGS"]:e.tags&&e.tags.join(","),[r+"ISSUE_PRODUCT_ID"]:e.productId,[r+"ISSUE_PURCHASABLE"]:"boolean"==typeof e.purchasable?e.purchasable.toString():e.purchasable,[r+"ISSUE_PURCHASED"]:"boolean"==typeof e.purchased?e.purchased.toString():e.purchased,...e.properties?Object.keys(e.properties).reduce(((t,n)=>({...t,[`${r}ISSUE_PROPERTY_${UY(n)}`]:e.properties[n]})),{}):{}}:{};return n&&(i={...i,[r+"ISSUE_PRICE"]:n.formattedPrice,[r+"ISSUE_PRICE_VALUE"]:n.price.toString(),[r+"ISSUE_PRICE_CURRENCY"]:n.currency}),t&&(i={...i,...LY(t,r),[r+"ISSUE_LATEST"]:t.currentIssueId===e.id?"true":"false"}),i}(e,t,n,r):{}}function kY(e,t){let n=e?{ISSUE_TYPE:e.type,ISSUE_CATEGORIES:e.categories&&e.categories.join(","),ISSUE_TAGS:e.tags&&e.tags.join(","),ISSUE_PRODUCT_ID:e.productId,ISSUE_PURCHASABLE:"boolean"==typeof e.purchasable?e.purchasable.toString():e.purchasable,ISSUE_PURCHASED:"boolean"==typeof e.purchased?e.purchased.toString():e.purchased}:{};return t&&(n={...n,...FY(t),ISSUE_LATEST:t.currentIssueId===e.id?"true":"false"}),n}function LY(e,t=""){return e?{[t+"PUBLICATION_ID"]:e.id,[t+"PUBLICATION_NAME"]:e.name,[t+"PUBLICATION_TYPE"]:e.type,...e.properties?Object.keys(e.properties).reduce(((n,r)=>({...n,[`${t}PUBLICATION_PROPERTY_${UY(r)}`]:e.properties[r]})),{}):{}}:{}}function FY(e){return e?{PUBLICATION_TYPE:e.type}:{}}function UY(e){return e.toUpperCase().replace(/-/g,"_")}function jY(e){return Object.keys(e).reduce(((t,n)=>((e[n]||"boolean"==typeof e[n])&&(t[UY(n)]=e[n]),t)),{})}function VY(e){return Object.values([AY.r.ISSUE_ARTICLE,AY.r.READ_MODE_ARTICLE]).includes(e)}zA.Access.PURCHASABLE;const $Y=new zn("PurpleEnvironment");new zn("PurpleEnvironmentBackend")},4620:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e={},t={}){Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:r(t[n])&&r(e[n])&&Object.keys(t[n]).length>0&&i(e[n],t[n])}))}n.d(t,{YE:()=>s,zk:()=>c});const o={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function s(){const e="undefined"!=typeof document?document:{};return i(e,o),e}const a={document:o,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function c(){const e="undefined"!=typeof window?window:{};return i(e,a),e}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";const e={oval:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff">\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(1 1)" stroke-width="2">\n <circle stroke-opacity=".5" cx="18" cy="18" r="18"/>\n <path d="M36 18c0-9.94-8.06-18-18-18">\n <animateTransform\n attributeName="transform"\n type="rotate"\n from="0 18 18"\n to="360 18 18"\n dur="1s"\n repeatCount="indefinite"/>\n </path>\n </g>\n </g>\n</svg>\n',puff:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#fff">\n <g fill="none" fill-rule="evenodd" stroke-width="2">\n <circle cx="22" cy="22" r="1">\n <animate attributeName="r"\n begin="0s" dur="1.8s"\n values="1; 20"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.165, 0.84, 0.44, 1"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="0s" dur="1.8s"\n values="1; 0"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.3, 0.61, 0.355, 1"\n repeatCount="indefinite" />\n </circle>\n <circle cx="22" cy="22" r="1">\n <animate attributeName="r"\n begin="-0.9s" dur="1.8s"\n values="1; 20"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.165, 0.84, 0.44, 1"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="-0.9s" dur="1.8s"\n values="1; 0"\n calcMode="spline"\n keyTimes="0; 1"\n keySplines="0.3, 0.61, 0.355, 1"\n repeatCount="indefinite" />\n </circle>\n </g>\n</svg>\n',rings:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" stroke="#fff">\n <g fill="none" fill-rule="evenodd" transform="translate(1 1)" stroke-width="2">\n <circle cx="22" cy="22" r="6" stroke-opacity="0">\n <animate attributeName="r"\n begin="1.5s" dur="3s"\n values="6;22"\n calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="1.5s" dur="3s"\n values="1;0" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-width"\n begin="1.5s" dur="3s"\n values="2;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="22" cy="22" r="6" stroke-opacity="0">\n <animate attributeName="r"\n begin="3s" dur="3s"\n values="6;22"\n calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-opacity"\n begin="3s" dur="3s"\n values="1;0" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="stroke-width"\n begin="3s" dur="3s"\n values="2;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="22" cy="22" r="8">\n <animate attributeName="r"\n begin="0s" dur="1.5s"\n values="6;1;2;3;4;5;6"\n calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n </g>\n</svg>\n',spinningCircles:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 58 58" xmlns="http://www.w3.org/2000/svg">\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(2 1)" stroke="#FFF" stroke-width="1.5">\n <circle cx="42.601" cy="11.462" r="5" fill-opacity="1" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="1;0;0;0;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="49.063" cy="27.063" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;1;0;0;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="42.601" cy="42.663" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;1;0;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="27" cy="49.125" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;1;0;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="11.399" cy="42.663" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;1;0;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="4.938" cy="27.063" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;0;1;0;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="11.399" cy="11.462" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;0;0;1;0" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="27" cy="5" r="5" fill-opacity="0" fill="#fff">\n <animate attributeName="fill-opacity"\n begin="0s" dur="1.3s"\n values="0;0;0;0;0;0;0;1" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n </g>\n </g>\n</svg>\n',tail:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">\n <defs>\n <linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="$id">\n <stop stop-color="#fff" stop-opacity="0" offset="0%"/>\n <stop stop-color="#fff" stop-opacity=".631" offset="63.146%"/>\n <stop stop-color="#fff" offset="100%"/>\n </linearGradient>\n </defs>\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(1 1)">\n <path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#$id)" stroke-width="2">\n <animateTransform\n attributeName="transform"\n type="rotate"\n from="0 18 18"\n to="360 18 18"\n dur="0.9s"\n repeatCount="indefinite"/>\n </path>\n <circle fill="#fff" cx="36" cy="18" r="1">\n <animateTransform\n attributeName="transform"\n type="rotate"\n from="0 18 18"\n to="360 18 18"\n dur="0.9s"\n repeatCount="indefinite"/>\n </circle>\n </g>\n </g>\n</svg>\n',dots:'\x3c!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --\x3e\n<svg width="100%" height="100%" viewBox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="#fff">\n <circle cx="15" cy="15" r="15">\n <animate attributeName="r" from="15" to="15"\n begin="0s" dur="0.8s"\n values="15;9;15" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="fill-opacity" from="1" to="1"\n begin="0s" dur="0.8s"\n values="1;.5;1" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="60" cy="15" r="9" fill-opacity="0.3">\n <animate attributeName="r" from="9" to="9"\n begin="0s" dur="0.8s"\n values="9;15;9" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="fill-opacity" from="0.5" to="0.5"\n begin="0s" dur="0.8s"\n values=".5;1;.5" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n <circle cx="105" cy="15" r="15">\n <animate attributeName="r" from="15" to="15"\n begin="0s" dur="0.8s"\n values="15;9;15" calcMode="linear"\n repeatCount="indefinite" />\n <animate attributeName="fill-opacity" from="1" to="1"\n begin="0s" dur="0.8s"\n values="1;.5;1" calcMode="linear"\n repeatCount="indefinite" />\n </circle>\n</svg>\n',segments:'<?xml version="1.0" encoding="utf-8"?>\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2400 2400" xml:space="preserve" width="24" height="24">\n <g stroke-width="200" stroke-linecap="round" stroke="#000000" fill="none" id="spinner">\n <line x1="1200" y1="600" x2="1200" y2="100"/>\n <line opacity="0.5" x1="1200" y1="2300" x2="1200" y2="1800"/>\n <line opacity="0.917" x1="900" y1="680.4" x2="650" y2="247.4"/>\n <line opacity="0.417" x1="1750" y1="2152.6" x2="1500" y2="1719.6"/>\n <line opacity="0.833" x1="680.4" y1="900" x2="247.4" y2="650"/>\n <line opacity="0.333" x1="2152.6" y1="1750" x2="1719.6" y2="1500"/>\n <line opacity="0.75" x1="600" y1="1200" x2="100" y2="1200"/>\n <line opacity="0.25" x1="2300" y1="1200" x2="1800" y2="1200"/>\n <line opacity="0.667" x1="680.4" y1="1500" x2="247.4" y2="1750"/>\n <line opacity="0.167" x1="2152.6" y1="650" x2="1719.6" y2="900"/>\n <line opacity="0.583" x1="900" y1="1719.6" x2="650" y2="2152.6"/>\n <line opacity="0.083" x1="1750" y1="247.4" x2="1500" y2="680.4"/>\n <animateTransform attributeName="transform"\n attributeType="XML"\n type="rotate"\n keyTimes="0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667"\n values="0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199"\n dur="0.83333s"\n begin="0s"\n repeatCount="indefinite"\n calcMode="discrete" />\n </g>\n</svg>\n\n'};var t,n,r=__webpack_require__(4409);!function(e){e.NONE="none",e.HIDE="hide",e.SHRINK="shrink"}(t||(t={})),function(e){e.BACK="back",e.MENU="menu"}(n||(n={})),t.SHRINK,n.MENU;const i={CONTENT_TITLE:"%s",CONTENT_DESCRIPTION:"%s",CONTENT_PUBLICATION_TITLE:"%s",CONTENT_ACTION_PURCHASE:"Purchase for %s",CONTENT_ACTION_PURCHASE_LOADING:"Loading price...",CONTENT_ACTION_PURCHASE_UNAVAILABLE:"Price not available",CONTENT_ERROR:"Error loading content data",CONTENT_ERROR_BUTTON:"Try again",CONTENT_UPDATE_BADGE_MESSAGE:"Update available",CONTENT_DESCRIPTION_TOGGLE_COLLAPSE:"Show less",CONTENT_DESCRIPTION_TOGGLE_EXPAND:"Show more",CONTENT_ACTION_READ:"Read",CONTENT_ACTION_SUBSCRIBE:"Subscribe",CONTENT_ACTION_COUPON:"Coupon",CONTENT_ACTION_LOGIN:"Login",ISSUE_DESCRIPTION_TOGGLE_EXPAND:"Show more",ISSUE_DESCRIPTION_TOGGLE_COLLAPSE:"Show less",ISSUE_ACTION_READ:"Read",ISSUE_ACTION_PURCHASE:"Purchase for %s",ISSUE_ACTION_PURCHASE_LOADING:"Loading price...",ISSUE_ACTION_PURCHASE_UNAVAILABLE:"Price not available",ISSUE_ACTION_DOWNLOAD:"Download",ISSUE_ACTION_PREVIEW:"Preview",ISSUE_ACTION_SUBSCRIBE:"Subscribe",ISSUE_ACTION_DOWNLOADING:"Downloading...",ISSUE_ACTION_DELETE:"Delete",ISSUE_ACTION_LOGIN:"Login",ISSUE_ACTION_CANCEL:"Cancel",ISSUE_ACTION_COUPON:"Coupon",ISSUE_ERROR:"Error loading issue data",ISSUE_ERROR_BUTTON:"Try again",ISSUE_DOWNLOAD_CONFIRM_TITLE:"Download issue",ISSUE_DOWNLOAD_CONFIRM_MESSAGE:'Do you want to download "%(content.name)s"?',ISSUE_DOWNLOAD_CONFIRM_OK:"OK",ISSUE_DOWNLOAD_CONFIRM_CANCEL:"Cancel",ISSUE_TITLE:"%s",ISSUE_DESCRIPTION:"%s",ISSUE_PUBLICATION_TITLE:"%s",ISSUE_DELETE_TITLE:"Delete issue",ISSUE_DELETE_MESSAGE:'Do you really want to delete the issue %s"?',ISSUE_DELETE_CONFIRM:"Delete",ISSUE_DELETE_CANCEL:"Cancel",ISSUE_UPDATE_BADGE_MESSAGE:"Update available",ISSUE_UPDATE_TITLE:"Update available",ISSUE_UPDATE_MESSAGE:'A new version of this issue "%s" is available. Would you like to read the old version or the new one?',ISSUE_UPDATE_NEW_VERSION:"Read new version",ISSUE_UPDATE_OLD_VERSION:"Read old version",PUBLICATION_TITLE:"%s",PUBLICATION_DESCRIPTION:"%s",PUBLICATION_ISSUES_PER_YEAR:"<strong>%s issues</strong> published per year",PUBLICATION_CONTENTS_PER_YEAR:"<strong>%s contents</strong> published per year",PUBLICATION_SUBSCRIPTIONS_TITLE:"Store Subscriptions",PUBLICATION_SUBSCRIPTIONS_HEADER:"Introduction text regarding subscriptions",PUBLICATION_SUBSCRIPTIONS_FOOTER:"<strong>Terms of use</strong> Terms of use go here",PUBLICATION_SUBSCRIPTIONS_RESTORE_PURCHASES:"Restore Purchases",PUBLICATION_SUBSCRIPTIONS_MANAGE_SUBSCRIPTIONS:"Manage Subscriptions",DROPDOWN_ISSUE_STATE_RESET:"All Issues",DROPDOWN_ISSUE_STATE_PURCHASED:"My Issues",DROPDOWN_ISSUE_STATE_LOCAL:"My Downloads",DROPDOWN_CATEGORY_RESET:"All categories",TOGGLE_PUBLICATION_TYPE_KIOSK:"Issues",TOGGLE_PUBLICATION_TYPE_CHANNEL:"Articles",SEARCH_FIELD_PLACEHOLDER:"Search...",SEARCH_RESULT_TITLE:"Search results",SEARCH_RESULT_EMPTY_TITLE:"Search Results",SEARCH_RESULT_TOGGLE_EXPAND:"Show more",SEARCH_RESULT_TOGGLE_COLLAPSE:"Show less",SEARCH_RESULT_PAGE_HIT_EXCERPT:"%s",SEARCH_RESULT_PAGE_LABEL_MESSAGE:"Page %s",SEARCH_RESULT_NO_SEARCH:"Please enter a search phrase.",SEARCH_RESULT_NO_RESULT:'No content was found for your search phrase "%1$s". Please try again.',LOGIN_TITLE:"Login",LOGIN_TEASER:"Log in for more content.",LOGIN_TEASER_RELOGIN:"You have been logged out. Please log in again.",LOGIN_HELP:'Forgotten your password? <a href="https://sprylab.com" target="_blank">recover</a>',LOGIN_USERNAME_PLACEHOLDER:"Email",LOGIN_PASSWORD_PLACEHOLDER:"Password",LOGIN_SUBMIT_BUTTON:"Log in",LOGIN_LOGOUT_TITLE:"Logout",LOGIN_LOGOUT_TEASER:"You can log out here.",LOGIN_LOGOUT_HELP:"",LOGIN_LOGOUT_BUTTON:"Log out",LOGOUT_TITLE:"Logout",LOGOUT_MESSAGE:"Do you really want to logout?",LOGOUT_BUTTON_CONFIRM:"Logout",LOGOUT_BUTTON_CANCEL:"Cancel",COUPON_TITLE:"Coupon",COUPON_TEASER:"Here you can enter your coupon code.",COUPON_CODE_TITLE:"Please enter your coupon code",COUPON_CODE_PLACEHOLDER:"coupon code",COUPON_SUBMIT_BUTTON:"Activate",COUPON_ACTIVATED_TITLE:"Your activated coupon codes",COUPON_DEACTIVATE_BUTTON:"Delete",COUPON_VALID_TITLE:"Add coupon",COUPON_VALID_MESSAGE:"The code you entered is valid.",COUPON_VALID_BUTTON_OK:"OK",COUPON_VALID_BUTTON_CANCEL:"Cancel",COUPON_DEACTIVATE_TITLE:"Deactivate coupon code",COUPON_DEACTIVATE_MESSAGE:'Do you really want to deactivate the code %s"?',COUPON_DEACTIVATE_BUTTON_CONFIRM:"OK",COUPON_DEACTIVATE_BUTTON_CANCEL:"Cancel",DIALOG_TITLE:"Dialog",DIALOG_ERROR:"Error",ERROR_SUBSCRIPTION:"The subscription could not be purchased. Please try again later.",ERROR_PURCHASE:"The purchase could not be completed. %s",ERROR_PUBLICATION_COMPLETION:"Product data could not be loaded. %s",ERROR_SEARCH:"The search could not be performed. Please try again later",ERROR_LOGIN:"The login could not be performed. %s",ERROR_COUPON_INVALID:"The code you entered is not valid.",ERROR_COUPON_INVALID_BUTTON:"OK",ERROR_COUPON_EXISTS:"This code is already added.",ERROR_COUPON_EXISTS_BUTTON:"OK",ERROR_COUPON_OFFLINE:"No internet connection! This code could not be added.",ERROR_COUPON_OFFLINE_BUTTON:"OK",ERROR_COUPON_DEACTIVATE:"This code could not be deactivated.",ERROR_COUPON_DEACTIVATE_BUTTON:"OK",ERROR_COUPON_DEACTIVATE_OFFLINE:"No internet connection! This code could not be deactivated.",ERROR_COUPON_DEACTIVATE_OFFLINE_BUTTON:"OK",ERROR_COUPON_DEACTIVATE_UNKNOWN:"Code is unknown! This code could not be deactivated.",ERROR_COUPON_DEACTIVATE_UNKNOWN_BUTTON:"OK",ERROR_DOWNLOAD:"Download failed for %2$s. %1$s",ERROR_PREVIEW_OPEN:"Error opening preview. %s",ERROR_CONTENT_OPEN:"Error opening content. %s",ACCESS_DENIED:"Access denied.",ALREADY_LOGGED_IN:"You are already logged in.",USER_DEACTIVATED:"Your account is deactivated.",INSTALLATION_LIMIT_EXCEEDED:"The limit of simultaneously logged in devices has been reached.",ALREADY_OWNED:"You already own this product.",CANCELLED:"Process was cancelled by user.",CONFIGURATION_ERROR:"Error in remote system.",ISSUE_NOT_FOUND:"The requested content could not be found.",INSUFFICIENT_SPACE:"The storage on your device is not sufficient.",INVALID_CREDENTIALS:"Please check your username and password.",NETWORK:"Please check your internet connection.",NO_ISSUES_FOUND:"The requested content could not be found.",NOT_FOUND:"The requested content could not be found.",NOT_LOGGED_IN:"You are not logged in.",PAYMENT_REQUIRED:"Access denied.",RESOURCE_NOT_FOUND:"The requested resource could not be found.",UNKNOWN:"An unknown error occurred.",UNKNOWN_OFFER:"The requested offer could not be found.",UNKNOWN_PRODUCT:"The requested product could not be found.",UNKNOWN_VENDOR:"Vendor is unknown.",VALIDATION_FAILED:"The purchase could not be validated.",PULL_TO_REFRESH_PULL:"Pull to refresh",PULL_TO_REFRESH_RELEASE:"Release to refresh",LIST_NO_RESULTS:"There is no content matching the filter criteria.",LIST_ERROR:"Error loading data. %s",LIST_ERROR_BUTTON:"Reload",LIST_ACTION_SELECT_ALL:"Select all",LIST_ACTION_UNSELECT_ALL:"Un-select all",LIST_ACTION_CONFIRM:"Confirm",LIST_ACTION_RESET:"Reset",LIST_ACTION_NEXT:"Next Page Set",LIST_ENTRY_TOGGLE_EXPAND:"Show %u more",LIST_ENTRIES_TOGGLE_EXPAND:"Show %u more",LIST_ENTRY_TOGGLE_COLLAPSE:"Show %u less",LIST_ENTRIES_TOGGLE_COLLAPSE:"Show %u less",LIST_GROUPED_ENTRY_TOGGLE_EXPAND:"Show %u more",LIST_GROUPED_ENTRIES_TOGGLE_EXPAND:"Show %u more",LIST_GROUPED_ENTRY_TOGGLE_COLLAPSE:"Show %u less",LIST_GROUPED_ENTRIES_TOGGLE_COLLAPSE:"Show %u less",BOOKMARK_TITLE:"%s",MENU_ITEM:"%s",BOOKMARK_CREATION_DATE_MESSAGE:"Added on %s",BOOKMARK_PAGE_LABEL_MESSAGE:"Page %s",BOOKMARK_NO_RESULTS:"There are no bookmarks.",BOOKMARK_ERROR:"Error loading bookmarks",BOOKMARK_ERROR_BUTTON:"Reload",BOOKMARK_DELETE_TITLE:"Delete bookmark",BOOKMARK_DELETE_MESSAGE:"Are you sure you want to delete this bookmark?",BOOKMARK_DELETE_MESSAGE_WITH_TITLE:'Are you sure you want to delete the bookmark for "%s"?',BOOKMARK_DELETE_All_TITLE:"Delete bookmarks",BOOKMARK_DELETE_ALL_MESSAGE:"Are you sure you want to delete all bookmarks?",BOOKMARK_DELETE_ALL_OF_ISSUE_MESSAGE:'Are you sure you want to delete all bookmarks for the issue "%s"?',BOOKMARK_DELETE_CONFIRM:"Delete",BOOKMARK_DELETE_CANCEL:"Cancel",ERROR_DELETE_BOOKMARK:"This bookmark could not deleted. %s",ERROR_DELETE_BOOKMARK_WITH_TITLE:'The bookmark for "%2$s" could not deleted. %1$s',ERROR_DELETE_ALL_BOOKMARKS:"Not all bookmarks could be deleted. %s",ERROR_ADD_BOOKMARK:"Bookmark could not be created. %1$s",ERROR_SHARE:"Content could not be shared.",PUBLICATION_COMPLETION_TITLE:"Complete your collection",PUBLICATION_COMPLETION_PROMOTION_TEXT:"Get all %1$s back issues and save over %2$s<br>Was %3$s Now %4$s",PUBLICATION_COMPLETION_ACTION_PURCHASE:"Purchase for %s",SUBSCRIPTION_TITLE:"%s",SUBSCRIPTION_ISSUES_PROMOTION:"%1$s issues for %2$s.",SUBSCRIPTION_ISSUES_ADDITIONAL_PROMOTION:"%1$s issues for the price of %2$s.<br>Was %3$s Now %4$s.",SUBSCRIPTION_ACTION_PURCHASE:"Purchase for %s",SUBSCRIPTION_ACTION_PURCHASE_UNAVAILABLE:"Price not available",SUBSCRIPTION_PRICE:"%s",SUBSCRIPTION_PRICE_FINAL:"Then %1$s / %2$s %3$s",SUBSCRIPTION_PRICE_INTRODUCTORY:"Try %1$s x %2$s %3$s for %4$s",SUBSCRIPTION_PRICE_TRIAL:"Free for %1$s %2$s",SUBSCRIPTION_PRICE_DISCOUNT:"Try %1$s x %2$s %3$s for %4$s",SUBSCRIPTION_DESCRIPTION:"%s",MONTH:"Month",MONTHS:"Months",YEAR:"Year",YEARS:"Years",WEEK:"Week",WEEKS:"Weeks",DAY:"Day",DAYS:"Days",RESTORE_PURCHASES:"Restore purchases",RESTORE_PURCHASES_CONFIRM:"Do you want to restore your purchases?",RESTORE_PURCHASES_SUCCEEDED:"Purchases restored successfully",RESTORE_PURCHASES_FAILED:"Restoring purchased failed",VIEW_ERROR:"Error loading data. %s",VIEW_ERROR_BUTTON:"Reload",ERROR_PRODUCT:"Product data could not be loaded. %s",ERROR_DEEP_LINK_LANDING:"Shared issue could not be opened. %s",APP_MENU_XML_ERROR_MESSAGE:"An Error occured loading app_menu.xml: %s (message: %s)",APP_MENU_XML_ERROR_TITLE:"Error loading app menu",APP_MENU_XML_ERROR_CONFIRM:"Ok",TOC_TITLE:"TABLE OF CONTENTS",DOWNLOAD_PDF_SINGLE_LEFT:"Download left page",DOWNLOAD_PDF_SINGLE_RIGHT:"Download right page",DOWNLOAD_PDF_SINGLE:"Download single page",DOWNLOAD_PDF_FULL:"Download full PDF"};r.O.URL,r.O.VIEW,r.O.MESSAGE,r.O.APP_BAR,r.O.VIEW,r.O.MESSAGE,r.O.APP_BAR,t.NONE,t.NONE,n.BACK,r.O.NAVIGATION,r.O.DOWNLOAD_OPTIONS;var o=__webpack_require__(1606);const s="tail",a=["DIALOG_ERROR","ERROR_DEEP_LINK_LANDING",...Object.keys(o.ERROR_CODE)].reduce(((e,t)=>({...e,[t]:i[t]})),{});var c=__webpack_require__(4664),u=__webpack_require__(5420),l=__webpack_require__(4620);const d=(0,l.YE)(),p=(0,l.zk)(),h={message:"",actions:[],tag:"div",container:d.body,messages:{DIALOG_MESSAGE_OK:"OK",DIALOG_MESSAGE_CONFIRM:"Confirm",DIALOG_MESSAGE_CANCEL:"Cancel"}};class f{config;element;keydownListener=e=>{if(e.stopPropagation(),e.preventDefault(),13===e.which){const e=this.config.actions[this.config.actions.length-1];e&&(e.callback(),this.destroy())}};constructor(e){this.config={...h,...e,messages:{...h.messages,...(e||{}).messages}},this.element=d.createElement(this.config.tag)}render(){p.addEventListener("keypress",this.keydownListener,{once:!0}),this.element.classList.add("purple-dialog");const e=/apple/i.test(navigator.vendor);this.element.classList.add(e?"ios":"android"),this.element.addEventListener("touchstart",(e=>e.preventDefault()));const t=d.createElement("section");if(this.config.title){const e=d.createElement("h1");e.innerHTML=this.config.title,t.appendChild(e)}const n=d.createElement("p");n.innerHTML=this.config.message,t.appendChild(n);const r=d.createElement("div");this.config.actions.forEach((e=>{const t=d.createElement("button");e.type&&t.classList.add(e.type),t.innerText=this.config.messages[e.message]||e.message,t.addEventListener("touchstart",(e=>e.stopPropagation()),{passive:!0}),t.addEventListener("click",(()=>{e.callback(),this.destroy()})),r.append(t)})),t.appendChild(r),this.element.appendChild(t),this.config.container.appendChild(this.element)}destroy(){this.element.remove()}}const g=(0,l.zk)(),m={show:(e,t,n,r)=>new Promise((i=>{for(const e of t){const t=e.callback;e.callback=()=>{t(),i()}}new f({message:e,actions:t,title:n,...r}).render()})),confirm:(e,t,n)=>new Promise(((r,i)=>{new f({message:e,actions:[{message:"DIALOG_MESSAGE_CANCEL",type:"cancel",callback:i},{message:"DIALOG_MESSAGE_CONFIRM",type:"confirm",callback:r}],title:t,...n}).render()})),alert:(e,t,n)=>new Promise((r=>{new f({message:e,actions:[{message:"DIALOG_MESSAGE_OK",callback:r}],title:t,...n}).render()}))};g.PurpleDialog=m;var v=__webpack_require__(9471),y=__webpack_require__(2591),E=__webpack_require__.n(y),_=__webpack_require__(1740),b=__webpack_require__.n(_),C=__webpack_require__(8128),S=__webpack_require__.n(C),I=__webpack_require__(855),D=__webpack_require__.n(I),T=__webpack_require__(3051),w=__webpack_require__.n(T),O=__webpack_require__(3656),A=__webpack_require__.n(O),N=__webpack_require__(5125),M={};M.styleTagTransform=A(),M.setAttributes=D(),M.insert=S().bind(null,"head"),M.domAPI=b(),M.insertStyleElement=w(),E()(N.A,M),N.A&&N.A.locals&&N.A.locals;var P,R=__webpack_require__(6948),x={};x.styleTagTransform=A(),x.setAttributes=D(),x.insert=S().bind(null,"head"),x.domAPI=b(),x.insertStyleElement=w(),E()(R.A,x),R.A&&R.A.locals&&R.A.locals,function(e){e.SHARING="SHARING",e.PUSH="PUSH"}(P||(P={}));const k={openContent:{mode:o.DisplayMode.MODAL,titleBar:!1},openContentFallback:{type:"navigate",url:"resource://dynamic/storefront/index.html#/home(modal:popup/issueDetails/SLIDE_IN)?issue=%(issue.id)s"},mode:P.SHARING},L=l.window.purple;class F{spinner;htmlAboveSpinner;htmlBelowSpinner;messages;issue;config;addLoadingContents(){this.spinner=l.document.createElement("svg"),this.spinner.innerHTML=e[s],this.spinner.classList.add("storefront-spinner"),this.spinner.setAttribute("type",s),this.htmlAboveSpinner=l.document.createElement("div"),this.htmlAboveSpinner.classList.add("custom-html","above","uninitialized"),this.htmlBelowSpinner=l.document.createElement("div"),this.htmlBelowSpinner.classList.add("custom-html","below","uninitialized"),l.document.body.appendChild(this.htmlAboveSpinner),l.document.body.appendChild(this.spinner),l.document.body.appendChild(this.htmlBelowSpinner)}addCustomHTMLContents(){this.config.customHTML?.aboveSpinner&&(this.htmlAboveSpinner.innerHTML=this.config.customHTML.aboveSpinner,this.htmlAboveSpinner.classList.remove("uninitialized")),this.config.customHTML?.belowSpinner&&(this.htmlBelowSpinner.innerHTML=this.config.customHTML.belowSpinner,this.htmlBelowSpinner.classList.remove("uninitialized"))}async initMessages(){const e=await(0,c.hI)("resource://dynamic/storefront/assets/messages.json").catch((e=>({})));this.messages={...a,...e}}async navigateOrActionUrl(e){return async function(e,t,n){if(e.startsWith("purple://")&&window.purple.app.performActionUrl)return window.purple.app.performActionUrl({actionUrl:e});window.location.href=e}(e=(0,v.vsprintf)(e,{issue:this.issue}))}async initConfig(){const e=await(0,c.hI)("resource://dynamic/storefront/deep-link-landing/config.json").catch((e=>({})));this.config={...k,...e}}async initIssue({issueId:e,externalIssueId:t}){let n;e?n={id:{value:e}}:t&&(n={externalIssueId:{value:t}}),this.issue=(await L.catalog.getIssues({issueFilter:n})).nodes[0]}getIssueId(){return new URL(l.window.location.href).searchParams.get("issue")}getExternalIssueId(){return new URL(l.window.location.href).searchParams.get("external-issue-id")}hasAccess(e){return e.access===o.Access.FREE||e.access===o.Access.PURCHASABLE&&e.purchaseData.purchased}async openIssue(){return new u.V({content:this.issue}).openIssue({initialIssueId:this.issue.id,openIssueConfig:this.config.openContent})}async setSharedIssueState(){return L.state.setState({key:"SHARED_ISSUE",value:this.issue.id})}addVisibilityListener(){l.document.addEventListener("visibilitychange",(e=>{"visible"===l.document.visibilityState&&L.app.performActionUrl({actionUrl:"purple://app/home/open"})}))}async handleError(e){return this.spinner.classList.add("hidden"),e?.code||(e={...e,code:o.ERROR_CODE.UNKNOWN}),await m.alert((0,v.vsprintf)(this.messages.ERROR_DEEP_LINK_LANDING,[e.code]),this.messages.DIALOG_ERROR),L.app.performActionUrl({actionUrl:"purple://app/home/open"})}getMode(){let e=new URL(l.window.location.href).searchParams.get("mode");if(e&&![P.PUSH,P.SHARING].includes(e))throw console.error("only allowed mode params: SHARING or PUSH"),{code:o.ERROR_CODE.ERROR_ILLEGAL_ARGUMENTS};return e||(e=this.config.mode),e}async handleOpenContentFallback(){switch(this.config.openContentFallback.type){case"navigate":await this.navigateOrActionUrl(this.config.openContentFallback.url);break;case"preview":this.issue.previewIssue?await this.openIssue():await this.navigateOrActionUrl(this.config.openContentFallback.fallback.url);break;default:console.error("unknown fallback type "+this.config.openContentFallback)}}async run(){this.addLoadingContents();const e=this.getIssueId(),t=this.getExternalIssueId();try{if(!e&&!t)throw{code:o.ERROR_CODE.ISSUE_NOT_FOUND};await Promise.all([this.initMessages(),this.initConfig(),this.initIssue({issueId:e,externalIssueId:t})]),this.addCustomHTMLContents();const n=this.getMode();switch(this.addVisibilityListener(),n){case P.SHARING:this.setSharedIssueState(),await this.openIssue();break;case P.PUSH:this.hasAccess(this.issue)?await this.openIssue():this.handleOpenContentFallback();break;default:console.error("unhandled mode "+n)}}catch(e){this.handleError(e)}}}document.addEventListener("DOMContentLoaded",(()=>(new F).run()))})()})();
|
@@ -4,8 +4,8 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<title></title>
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
7
|
-
<meta name="storefront-commit" content="
|
8
|
-
<meta name="storefront-version" content="3.8.
|
7
|
+
<meta name="storefront-commit" content="0bff57c">
|
8
|
+
<meta name="storefront-version" content="3.8.1">
|
9
9
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
10
10
|
<link rel="stylesheet" href="assets/fonts.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="assets/fonts.css"></noscript>
|
11
11
|
<script type="text/javascript">
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["common"],{3472:(U,O,t)=>{t.d(O,{M:()=>y});var p=t(9758),o=t(8179),c=t(362),a=t(4452),v=t(3713),C=t(3953);let y=(()=>{var T;class m extends v.r{getDataFromContext(D=this.context){return this.getSelectionScope()===p.x.USER_ATTRIBUTE?D.userAttributes[this.getParam()]:D[this.getParam()]}hasContextChanged(D){let l=super.hasContextChanged(D);if(!l&&this.isSelectionEnabled()){const i=this.getDataFromContext(),E=this.getDataFromContext(D);l=!c(i,E)}return l}ngOnDestroy(){super.ngOnDestroy(),this.dataSource&&this.contextService.unregisterDataSource(this.dataSource)}stripChildConfigs(D){return D.content&&(D.content={}),D}getEntryConfig(D){return D&&D.ad||{...this.baseConfig.content}}getEntryContext(D){var l;let i=(0,o.uQ)(null!==(l=this.getConfig().dataSource.entryId)&&void 0!==l?l:this.getDataType(),this.context,this.contextService.$functions,this.globalService.getGlobalData());return{...this.baseContext,[i]:D}}getConfig(){return this.config||this.baseConfig}isSelectionEnabled(){return!1}getDataType(){return this.getConfig().dataSource.type}getGroupDataType(D){return D.dataSource.type}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),...(0,a.Kj)(this.baseConfig)].filter(D=>!!D)}}return(T=m).\u0275fac=(()=>{let M;return function(l){return(M||(M=C.xGo(T)))(l||T)}})(),T.\u0275dir=C.FsC({type:T,features:[C.Vt3]}),m})()},1803:(U,O,t)=>{t.d(O,{TS:()=>p,We:()=>c});var p=function(r){return r.VERTICAL="vertical",r.HORIZONTAL="horizontal",r.GRID="grid",r.GROUP="group",r.TABS="tabs",r}(p||{}),c=function(r){return r.BLANK="_blank",r.SELF="_self",r}(c||{})},3303:(U,O,t)=>{t.d(O,{y:()=>r});var p=t(177),o=t(9149),c=t(3953);let r=(()=>{var a;class v{}return(a=v).\u0275fac=function(y){return new(y||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({imports:[p.MD,o.ContentTitleModule]}),v})()},5848:(U,O,t)=>{t.d(O,{Q:()=>T});var p=t(467),o=t(177),c=t(1210),r=t(5706),a=t(3953),v=t(9516),C=t(5102),y=t(1652);let T=(()=>{var m;class M extends c.${get contextKey(){var l,i,E;return null!==(l=null!==(i=null===(E=this.config)||void 0===E?void 0:E.contextKey)&&void 0!==i?i:this.defaultConfig.contextKey)&&void 0!==l?l:"content"}constructor(l,i,E,u,g,h){super(i,l,E,u,h),this.elementRef=l,this.injector=i,this.contextService=E,this.document=u,this.purpleService=g,this.globalService=h}getOptionalData(l,i,E){var u=this;return(0,p.A)(function*(){const g=yield u.purpleService.getOptionalData(u.catalogContent,l,i,E);return(0,r.mF)(u.catalogContent)?(u.catalogContent=g,u.catalogContent[i]):(0,r.G4)(u.catalogContent)?(u.bundleContent=(0,r.Ig)(u.catalogContent),u.bundleContent[E]=g,u.bundleContent[E][i]):void 0})()}hasContentChanged(l,i){return(null==l?void 0:l.id)!==(null==i?void 0:i.id)||this.hasVersionChanged(l,i)}hasVersionChanged(l,i){return(null==l?void 0:l.version)!==(null==i?void 0:i.version)}onConfigChanges(){var l;let i=null===(l=this.context)||void 0===l?void 0:l[this.contextKey];Array.isArray(i)&&(i=i[0]);const E=this.hasContentChanged(this.catalogContent,i)&&!!i;return E&&(this.catalogContent=i),E}isGhost(){var l;return!this.config||!(null!==(l=this.context)&&void 0!==l&&l[this.contextKey])}ngOnDestroy(){super.ngOnDestroy()}getContextKey(){return this.contextKey}}return(m=M).\u0275fac=function(l){return new(l||m)(a.rXU(a.aKT),a.rXU(a.zZn),a.rXU(v.V),a.rXU(o.qQ),a.rXU(C.Wj),a.rXU(y.d))},m.\u0275dir=a.FsC({type:m,features:[a.Vt3]}),M})()},9149:(U,O,t)=>{t.r(O),t.d(O,{ContentTitleModule:()=>i,component:()=>E});var p=t(177);const o={titleMessage:"%s"};var c=t(5848),r=t(3953),a=t(9516),v=t(5102),C=t(1652),y=t(8909);const T=u=>[u];function m(u,g){1&u&&(r.qex(0),r.j41(1,"h1"),r.EFF(2,"..."),r.k0s(),r.bVm())}function M(u,g){if(1&u&&r.nrm(0,"h1",2),2&u){const h=r.XpG();r.Y8G("storefrontTranslate",h.config.titleMessage)("storefrontTranslateArgs",r.eq3(2,T,null==h.catalogContent?null:h.catalogContent.name))}}let D=(()=>{var u;class g extends c.Q{constructor(e,n,f,d,s,_){super(e,f,n,d,s,_),this.elementRef=e,this.contextService=n,this.injector=f,this.document=d,this.purpleService=s,this.globalService=_,this.type="content-title",this.defaultConfig=o}}return(u=g).\u0275fac=function(e){return new(e||u)(r.rXU(r.aKT),r.rXU(a.V),r.rXU(r.zZn),r.rXU(p.qQ),r.rXU(v.Wj),r.rXU(C.d))},u.\u0275cmp=r.VBU({type:u,selectors:[["storefront-content-title"]],features:[r.Vt3],decls:2,vars:2,consts:[[4,"ngIf"],[3,"storefrontTranslate","storefrontTranslateArgs",4,"ngIf"],[3,"storefrontTranslate","storefrontTranslateArgs"]],template:function(e,n){1&e&&r.DNE(0,m,3,0,"ng-container",0)(1,M,1,4,"h1",1),2&e&&(r.Y8G("ngIf",n.ghost),r.R7$(),r.Y8G("ngIf",!n.ghost))},dependencies:[p.bT,y.M],styles:["storefront-content-title>h1{margin-top:var(--contentHeaderMarginTop);margin-bottom:var(--contentHeaderMarginBottom);padding-top:var(--contentHeaderPaddingVert);padding-bottom:var(--contentHeaderPaddingVert);font-size:1.5rem}\n"],encapsulation:2}),g})();var l=t(6483);let i=(()=>{var u;class g{}return(u=g).\u0275fac=function(e){return new(e||u)},u.\u0275mod=r.$C({type:u}),u.\u0275inj=r.G2t({imports:[p.MD,l.h]}),g})();const E=D},2285:(U,O,t)=>{t.d(O,{b:()=>E});var p=t(467),o=t(177),c=t(3953),r=t(1210),a=t(8251),v=t(610),C=t(1803);const y={tag:"div",content:"",attributes:{}};var T=t(8179),m=t(9516),M=t(8448),D=t(8004),l=t(1652),i=t(5820);let E=(()=>{var u;class g extends r.${constructor(e,n,f,d,s,_,P,S,A,B,L,I){super(d,e,n,S,L),this.elementRef=e,this.contextService=n,this.renderer=f,this.injector=d,this.translate=s,this.eventActionService=_,this.store=P,this.document=S,this.platformId=A,this.changeDetectorRef=B,this.globalService=L,this.anchorService=I,this.anchorFeatureEnabled=!1,this.anchorPath=null,this.defaultConfig={...y}}ngOnInit(){var e=()=>super.ngOnInit,n=this;return(0,p.A)(function*(){n.anchorFeatureEnabled=n.anchorService.isAnchorFeatureEnabled(),e().call(n),n.elementRef.nativeElement.innerHTML="";const f=n.renderer.createElement(n.baseConfig.tag);n.renderer.appendChild(n.elementRef.nativeElement,f)})()}onConfigChanges(){var e=this;return(0,p.A)(function*(){var n,f;const d=e.renderer.createElement(e.config.tag),s={...e.config.attributes};null!==(n=e.config.attributes)&&void 0!==n&&n.src&&(s.src=e.contextService.toResourceUrl(e.config.attributes.src)),null!==(f=e.config.attributes)&&void 0!==f&&f.href&&(s.href=e.contextService.toResourceUrl(e.config.attributes.href)),"iframe"===e.config.tag&&d.addEventListener("load",P=>{d&&d.contentDocument?(d.contentDocument.scrollingElement.scrollHeight>d.contentWindow.innerHeight&&(d.style.height=d.contentDocument.scrollingElement.scrollHeight+"px"),d.contentDocument.scrollingElement.scrollWidth>d.contentWindow.innerWidth&&(d.style.width=d.contentDocument.scrollingElement.scrollWidth+"px")):window.addEventListener("message",S=>{S.origin===new URL(null==s?void 0:s.src).origin&&(S.data.height&&(d.style.height=S.data.height+"px"),S.data.width&&(d.style.width=S.data.width+"px"))})}),Object.keys(s).forEach(P=>d.setAttribute(P,e.config.attributes[P])),e.translatedContent=yield e.translate.translate({text:e.config.content,args:e.config.variables||[]}),d.innerHTML=(0,T.uQ)(e.translatedContent,e.context,e.contextService.$functions,e.globalService.getGlobalData()),e.elementRef.nativeElement.innerHTML="";let _=d;e.anchorFeatureEnabled&&(_=e.handleAnchorTags(d)),_.addEventListener("click",P=>e.onClick(P)),e.renderer.appendChild(e.elementRef.nativeElement,_),e.changeDetectorRef.markForCheck()})()}ngOnDestroy(){super.ngOnDestroy()}onClick(e){this.config.tap&&((this.anchorFeatureEnabled||"touchstart"===e.type)&&e.preventDefault(),this.trackOnClick(),this.eventActionService.processEventAction(this.config.tap,this));const n=this.getAnchorElementFromEvent(e);null!=n&&n.href&&(n.target===C.We.BLANK?"external"===n.getAttribute("data-target")?this.trackLinkOpenExternal(n):this.trackLinkOpenAppBrowser(n):this.trackLinkOpenInline(n))}getConfigEscapeProperties(){return["condition"]}isGhost(){return!1}hasContextChanged(e){return super.hasContextChanged(e)||this.translatedContent&&this.translatedContent.indexOf(T.mF)>-1}getAnchorElementFromEvent(e){var n,f;return"a"===(null===(n=e.target)||void 0===n?void 0:n.tagName.toLowerCase())?e.target:"a"===(null===(f=e.target)||void 0===f||null===(f=f.parentElement)||void 0===f?void 0:f.tagName.toLowerCase())?e.target.parentElement:null}handleAnchorTags(e){if(this.anchorPath=this.anchorService.getAnchorPathForEventAction(this.config.tap,this.context),this.anchorPath){const n=this.renderer.createElement("a");return n.style.height="inherit",n.style.width="inherit",n.setAttribute("href",this.anchorPath),n.appendChild(e),n}return e}trackOnClick(){const e="".concat(this.getTrackingBaseKey(),"_CLICKED");this.dispatchTrackingAction(e,{})}trackLinkOpenExternal(e){const n="".concat(this.getTrackingBaseKey(),"_LINK_OPEN_EXTERNAL");this.dispatchTrackingAction(n,{TARGET_URL:e.href,LINK_TEXT:e.innerText})}trackLinkOpenAppBrowser(e){const n="".concat(this.getTrackingBaseKey(),"_LINK_OPEN_APP_BROWSER");this.dispatchTrackingAction(n,{TARGET_URL:e.href,LINK_TEXT:e.innerText})}trackLinkOpenInline(e){this.store.dispatch((0,v.k4)({url:window.location.href,key:"".concat(this.getTrackingBaseKey(),"_LINK_OPEN_INLINE"),params:{TARGET_URL:e.href,LINK_TEXT:e.innerText}}))}dispatchTrackingAction(e,n){this.store.dispatch((0,v.k4)({url:window.location.href,key:e,params:n}))}}return(u=g).type="html",u.\u0275fac=function(e){return new(e||u)(c.rXU(c.aKT),c.rXU(m.V),c.rXU(c.sFG),c.rXU(c.zZn),c.rXU(M.D),c.rXU(D.G),c.rXU(a.B),c.rXU(o.qQ),c.rXU(c.Agw),c.rXU(c.gRc),c.rXU(l.d),c.rXU(i.X))},u.\u0275cmp=c.VBU({type:u,selectors:[["storefront-html"]],features:[c.Jv_([a.B]),c.Vt3],decls:0,vars:0,template:function(e,n){},styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-html{position:relative;display:flex}storefront-html.ghost>*{background-image:linear-gradient(90deg,var(--ghostColor) 0px,rgb(236,236,236) 40px,var(--ghostColor) 80px);background-size:80vw;animation:ghost-lines 2s infinite linear;background-color:var(--ghostColor);border-radius:var(--borderRadius);width:90%;height:1.2em}\n'],encapsulation:2,changeDetection:0}),g})()},9207:(U,O,t)=>{t.r(O),t.d(O,{HTMLModule:()=>r,component:()=>a});var p=t(177),o=t(2285),c=t(3953);let r=(()=>{var v;class C{}return(v=C).\u0275fac=function(T){return new(T||v)},v.\u0275mod=c.$C({type:v}),v.\u0275inj=c.G2t({imports:[p.MD]}),C})();const a=o.b},6218:(U,O,t)=>{t.r(O),t.d(O,{SectionModule:()=>h,component:()=>e});var p=t(177),o=t(3953);const c={content:null};var r=t(1210),a=t(8179),v=t(7879),C=t(1184),y=t(9516),T=t(1652),m=t(4748),M=t(3648);const D=["viewTemplate"],l=["viewChildren"];function i(n,f){if(1&n&&o.nrm(0,"storefront-element",3,0),2&n){const d=f.$implicit,s=o.XpG(2);o.Y8G("baseContext",s.baseContext)("baseConfig",d)("lazy",s.isLazy)}}function E(n,f){if(1&n&&(o.qex(0),o.DNE(1,i,2,3,"storefront-element",2),o.bVm()),2&n){const d=o.XpG();o.R7$(),o.Y8G("ngForOf",d.children)("ngForTrackBy",d.trackByChildren)}}let u=(()=>{var n;class f extends r.${constructor(s,_,P,S,A,B,L,I,R){super(_,s,P,A,B),this.elementRef=s,this.injector=_,this.contextService=P,this.changeDetectorRef=S,this.document=A,this.globalService=B,this.ssrService=L,this.platformId=I,this.purpleEnv=R,this.defaultConfig={...c},this.changeDetectorRef=S}ngOnInit(){this.baseContext.isGhost||super.ngOnInit()}onConfigChanges(){if(this.isLazy=!(!window.isUniversal||!this.ssrService.currentPrebootStatus),this.baseConfig.content){this.children=[];for(let s=0;s<this.baseConfig.content.length;s++)(this.purpleEnv.isUniversal||(0,a.Ol)(this.config.content[s]))&&this.children.push(this.baseConfig.content[s]);this.changeDetectorRef.detectChanges(),this.childComponents.forEach((s,_)=>{!this.purpleEnv.isUniversal||(0,a.Ol)(this.config.content[_])?s.lazyLoad():this.purpleEnv.isUniversal&&(0,p.UE)(this.platformId)&&(null==s||s.loadAndClear())}),this.changeDetectorRef.markForCheck()}}stripChildConfigs(s){return s.content&&Array.isArray(s.content)&&(s.content=s.content.map(({_uuid:_,condition:P})=>({_uuid:_,condition:P}))),s}rebuildContextKeys(){super.rebuildContextKeys(),this.baseConfig.content.forEach(s=>{"condition"in s&&(0,C.Fl)(s.condition,this.contextKeys)})}trackByChildren(s,_){if("string"==typeof _||"number"==typeof _)return _;const P=_.id||_._uuid;if(!P)throw console.error(_),"Element should have _uuid from config loader!";return P}}return(n=f).type="section",n.\u0275fac=function(s){return new(s||n)(o.rXU(o.aKT),o.rXU(o.zZn),o.rXU(y.V),o.rXU(o.gRc),o.rXU(p.qQ),o.rXU(T.d),o.rXU(m.i),o.rXU(o.Agw),o.rXU(v.r6))},n.\u0275cmp=o.VBU({type:n,selectors:[["storefront-section"]],viewQuery:function(s,_){if(1&s&&(o.GBs(D,7,o.c1b),o.GBs(l,5)),2&s){let P;o.mGM(P=o.lsd())&&(_.viewTemplate=P.first),o.mGM(P=o.lsd())&&(_.childComponents=P)}},features:[o.Vt3],decls:1,vars:1,consts:[["viewChildren",""],[4,"ngIf"],[3,"baseContext","baseConfig","lazy",4,"ngFor","ngForOf","ngForTrackBy"],[3,"baseContext","baseConfig","lazy"]],template:function(s,_){1&s&&o.DNE(0,E,2,2,"ng-container",1),2&s&&o.Y8G("ngIf",_.children)},dependencies:[p.Sq,p.bT,M._],styles:["storefront-section{display:flex;justify-content:space-between;padding:var(--sectionPadding);flex-direction:column}\n"],encapsulation:2,changeDetection:0}),f})();var g=t(6895);let h=(()=>{var n;class f{}return(n=f).\u0275fac=function(s){return new(s||n)},n.\u0275mod=o.$C({type:n}),n.\u0275inj=o.G2t({imports:[p.MD,g.r]}),f})();const e=u},1802:(U,O,t)=>{t.d(O,{c:()=>m});var p=t(1210),o=t(9758),c=t(8075),r=t(177),a=t(3953),v=t(9516),C=t(4559),y=t(1652),T=t(8909);let m=(()=>{var M;class D extends p.${constructor(i,E,u,g,h,e){super(u,i,E,h,e),this.elementRef=i,this.contextService=E,this.injector=u,this.router=g,this.document=h,this.globalService=e,this.type="switch",this.defaultConfig={}}ngOnInit(){this.config={...this.baseConfig},this.checked=this.config.initialValue,super.ngOnInit(),this.contextService.viewContext$.subscribe(i=>{const E=this.config.paramScope===o.x.USER_ATTRIBUTE?i.userAttributes[this.config.param]:i[this.config.param];E&&(this.checked="true"===E)})}isChecked(){return this.checked}toggle(){this.setChecked(!this.checked)}setChecked(i){this.config.paramScope===o.x.USER_ATTRIBUTE?this.contextService.setUserAttribute(this.config.param,"".concat(i)):(0,c.CV)(this.router,{[this.config.param]:i})}}return(M=D).\u0275fac=function(i){return new(i||M)(a.rXU(a.aKT),a.rXU(v.V),a.rXU(a.zZn),a.rXU(C.Ix),a.rXU(r.qQ),a.rXU(y.d))},M.\u0275cmp=a.VBU({type:M,selectors:[["storefront-switch"]],hostVars:2,hostBindings:function(i,E){2&i&&a.AVh("checked",E.checked)},features:[a.Vt3],decls:4,vars:2,consts:[[1,"label",3,"storefrontTranslate"],[1,"switch"],["type","checkbox",3,"change","checked"]],template:function(i,E){1&i&&(a.nrm(0,"label",0),a.j41(1,"label",1)(2,"input",2),a.bIt("change",function(){return E.toggle()}),a.k0s(),a.nrm(3,"span"),a.k0s()),2&i&&(a.Y8G("storefrontTranslate",E.config.label),a.R7$(2),a.Y8G("checked",E.isChecked()))},dependencies:[T.M],styles:['storefront-switch{align-items:center;display:flex}storefront-switch .label{margin:0 var(--gutter)}storefront-switch .switch{text-align:left;width:calc(var(--switchWidth) - 2 * var(--switchBorderWidth));height:calc(var(--switchWidth) / 2);border-radius:var(--switchBorderRadius);background-color:var(--switchActiveColor);display:inline-block;position:relative;cursor:pointer}storefront-switch .switch>span{display:block;width:100%;height:100%;border-radius:var(--switchBorderRadius)}storefront-switch .switch>span:before,storefront-switch .switch>span:after{content:"";cursor:pointer;position:absolute}storefront-switch .switch>span:before{width:100%;height:100%;box-sizing:border-box;background-color:var(--switchBackgroundColor);border-radius:var(--switchBorderRadius);transition:opacity .2s ease-out .1s,transform .2s ease-out .1s;transform:scale(1);opacity:1}storefront-switch .switch>span:after{top:var(--switchBorderWidth);z-index:3;transition:transform .4s cubic-bezier(.44,-.12,.07,1.15);width:calc(var(--switchWidth) / 2 - 2 * var(--switchBorderWidth));height:calc(var(--switchWidth) / 2 - 2 * var(--switchBorderWidth));background-color:var(--switchHandleColor);border-radius:100%;box-shadow:0 2px 5px #0000004d;left:var(--switchBorderWidth)}storefront-switch .switch>input[type=checkbox]{opacity:0;position:absolute}storefront-switch .switch>input[type=checkbox]:checked~span:before{transform:scale(0);opacity:.7}storefront-switch .switch>input[type=checkbox]:checked~span:after{transform:translate(100%)}\n'],encapsulation:2}),D})()},9645:(U,O,t)=>{t.r(O),t.d(O,{SwitchModule:()=>a,component:()=>v});var p=t(177),o=t(1802),c=t(6483),r=t(3953);let a=(()=>{var C;class y{}return(C=y).\u0275fac=function(m){return new(m||C)},C.\u0275mod=r.$C({type:C}),C.\u0275inj=r.G2t({imports:[p.MD,c.h]}),y})();const v=o.c},2364:(U,O,t)=>{t.d(O,{S:()=>a});var p=t(4412),o=t(3953),c=t(1626),r=t(9118);let a=(()=>{var v;class C{constructor(T,m){this.http=T,this.kioskConfigService=m,this.initialization=new p.t(null),this.data=[{identifier:"phone",minScreenWidth:null},{identifier:"tablet_small",minScreenWidth:533},{identifier:"tablet_large",minScreenWidth:720}]}init(){}getDeviceClass(){const m=this.data.reduce((M,D)=>window.innerWidth>=D.minScreenWidth?D:M,null);return m&&m.identifier}}return(v=C).\u0275fac=function(T){return new(T||v)(o.KVO(c.Qq),o.KVO(r.x))},v.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"}),C})()},354:(U,O,t)=>{t.d(O,{s:()=>l});var p=t(467),o=t(5102),c=t(1413),r=t(5964),a=t(6697),v=t(3953),C=t(496),y=t(1626),T=t(9118),m=t(3072),M=t(2364),D=t(9516);let l=(()=>{var i;class E{constructor(g,h,e,n,f,d,s){this.publicationService=g,this.http=h,this.purpleService=e,this.kioskConfigService=n,this.sessionService=f,this.deviceClassService=d,this.contextService=s,this.data=[],this.initPdf=new c.B,this.presenterLoaded=new c.B,this.subscriptions=[]}init(g){var h=this;return(0,p.A)(function*(){h.kioskConfigData=yield h.kioskConfigService.getConfig().toPromise(),h.content=yield h.publicationService.selectByContentCriteria(g);let e=yield h.getLink(h.content,"pdf_single_page_download");yield h.getSinglePageDownloadLinkFromJSON(e);let n=yield h.getLink(h.content,"pdf_download");h.initPdf.next(n)})()}getLink(g,h){var e=this;return(0,p.A)(function*(){const n=yield(0,o.GA)(g,e.purpleService);if(g&&g.properties&&!n){let f=Object.keys(g.properties);for(let d=0;d<f.length;d++)if(f[d]===h)return e.getAttachmentLink(g,g.properties[f[d]]);return null}})()}getSinglePageDownloadLinkFromJSON(g){var h=this;return(0,p.A)(function*(){try{const e=h.presenterLoaded.pipe((0,r.p)(n=>n),(0,a.s)(1)).subscribe(function(){var n=(0,p.A)(function*(f){if(f){const A=yield h.http.get(g).toPromise();var d=WP.instance.getPurpleData().getPages();if(A){var s=0;h.data=[];for(const B of d){for(var _=parseInt(B.pageCount),P=[],S=0;S<_;S++)P.push(yield h.getAttachmentLink(h.content,A[s],s+1)),s++;h.data.push(P)}}}});return function(f){return n.apply(this,arguments)}}());h.subscriptions.push(e)}catch(e){console.error("Error fetching data from JSON link:",e)}})()}getAttachmentLink(g,h,e){var n=this;return(0,p.A)(function*(){const f=new URL(window.location.href).origin,d=n.contextService.getIsCustomerDomainUsed()?f:n.purpleService.getPurpleConfig().contentUrl,s=JSON.parse(localStorage.getItem("AppWebConfiguration")).id;let _="".concat(d,"/resources/web/attachment/").concat(s,"/").concat(g.id,"/").concat(h);_+="?preview=".concat(n.kioskConfigData.kioskConfig.preview),_+="&deviceId=".concat(localStorage.getItem("deviceId")),_+="&deviceClass=".concat(n.deviceClassService.getDeviceClass());const P=yield n.sessionService.getReceiptData(g);if(P){const{receipt:A,providerType:B}=P;_+="&receipt=".concat(window.encodeURIComponent(A)),_+="&providerType=".concat(B)}const S=n.sanitize(n.getFileName(g,h,e));return _+="&targetFilename=".concat(window.encodeURIComponent(S)),_})()}getSingleDownloadLink(){return this.data&&WP.instance&&WP.instance.getScroller()&&this.data[WP.instance.getScroller().getIndex()]}getDownloadLink(){var g=this;return(0,p.A)(function*(){return yield g.getLink(g.content,"pdf_download")})()}getFileName(g,h,e){const f=this.kioskConfigData.kioskConfig.downloadFileName,d=h.substr(h.lastIndexOf(".")),s=e?" - "+e:"";switch(f){case"publication_issue":return this.publicationService.currentPublication.name+" - "+g.name+s+d;case"issue":return g.name+s+d;default:return h}}sanitize(g){return g.replace(/,/g,"").replace(/\xe4/g,"ae").replace(/\xc4/g,"Ae").replace(/\xf6/g,"oe").replace(/\xd6/g,"Oe").replace(/\xfc/g,"ue").replace(/\xdc/g,"Ue")}ngOnDestroy(){this.subscriptions.forEach(g=>g.unsubscribe())}}return(i=E).\u0275fac=function(g){return new(g||i)(v.KVO(C.m),v.KVO(y.Qq),v.KVO(o.Wj),v.KVO(T.x),v.KVO(m.Q),v.KVO(M.S),v.KVO(D.V))},i.\u0275prov=v.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),E})()},3072:(U,O,t)=>{t.d(O,{Q:()=>v});var p=t(467),o=t(4404),r=t(3953),a=t(5102);let v=(()=>{var C;class y{constructor(m){this.purpleService=m}getReceiptData(m){var M=this;return(0,p.A)(function*(){return m.purchaseData.purchasedBy.includes(o.PurchaseOption.ENTITLEMENT)?{receipt:yield M.getAccessToken(),providerType:"entitlement"}:m.purchaseData.purchasedBy.includes(o.PurchaseOption.SUBSCRIPTION_CODE)?{receipt:(yield M.getSubscriptionCodes()).join(","),providerType:"subscriptionCode"}:null})()}getAccessToken(){var m=this;return(0,p.A)(function*(){const M=yield m.purpleService.purpleRef.entitlement.getUserData();return null==M?void 0:M.accessToken})()}getSubscriptionCodes(){var m=this;return(0,p.A)(function*(){return(yield m.purpleService.purpleRef.store.getSubscriptionCodes()).subscriptionCodes})()}}return(C=y).\u0275fac=function(m){return new(m||C)(r.KVO(a.Wj))},C.\u0275prov=r.jDH({token:C,factory:C.\u0275fac,providedIn:"root"}),y})()},7967:(U,O,t)=>{function p(o,c){return"object"!=typeof o?1===c?o:o+"S":1===c?o.singular:o.plural}t.d(O,{t:()=>p})}}]);
|
1
|
+
"use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["common"],{3472:(U,O,t)=>{t.d(O,{M:()=>y});var p=t(9758),o=t(8179),c=t(362),a=t(4452),v=t(3713),m=t(3953);let y=(()=>{var T;class E extends v.r{getDataFromContext(D=this.context){return this.getSelectionScope()===p.x.USER_ATTRIBUTE?D.userAttributes[this.getParam()]:D[this.getParam()]}hasContextChanged(D){let l=super.hasContextChanged(D);if(!l&&this.isSelectionEnabled()){const i=this.getDataFromContext(),g=this.getDataFromContext(D);l=!c(i,g)}return l}ngOnDestroy(){super.ngOnDestroy(),this.dataSource&&this.contextService.unregisterDataSource(this.dataSource)}stripChildConfigs(D){return D.content&&(D.content={}),D}getEntryConfig(D){return D&&D.ad||{...this.baseConfig.content}}getEntryContext(D){var l;let i=(0,o.uQ)(null!==(l=this.getConfig().dataSource.entryId)&&void 0!==l?l:this.getDataType(),this.context,this.contextService.$functions,this.globalService.getGlobalData());return{...this.baseContext,[i]:D}}getConfig(){return this.config||this.baseConfig}isSelectionEnabled(){return!1}getDataType(){return this.getConfig().dataSource.type}getGroupDataType(D){return D.dataSource.type}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),...(0,a.Kj)(this.baseConfig)].filter(D=>!!D)}}return(T=E).\u0275fac=(()=>{let M;return function(l){return(M||(M=m.xGo(T)))(l||T)}})(),T.\u0275dir=m.FsC({type:T,features:[m.Vt3]}),E})()},1803:(U,O,t)=>{t.d(O,{TS:()=>p,We:()=>c});var p=function(r){return r.VERTICAL="vertical",r.HORIZONTAL="horizontal",r.GRID="grid",r.GROUP="group",r.TABS="tabs",r}(p||{}),c=function(r){return r.BLANK="_blank",r.SELF="_self",r}(c||{})},3303:(U,O,t)=>{t.d(O,{y:()=>r});var p=t(177),o=t(9149),c=t(3953);let r=(()=>{var a;class v{}return(a=v).\u0275fac=function(y){return new(y||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({imports:[p.MD,o.ContentTitleModule]}),v})()},5848:(U,O,t)=>{t.d(O,{Q:()=>T});var p=t(467),o=t(177),c=t(1210),r=t(5706),a=t(3953),v=t(9516),m=t(5102),y=t(1652);let T=(()=>{var E;class M extends c.${get contextKey(){var l,i,g;return null!==(l=null!==(i=null===(g=this.config)||void 0===g?void 0:g.contextKey)&&void 0!==i?i:this.defaultConfig.contextKey)&&void 0!==l?l:"content"}constructor(l,i,g,_,u,h){super(i,l,g,_,h),this.elementRef=l,this.injector=i,this.contextService=g,this.document=_,this.purpleService=u,this.globalService=h}updatePostWithOptionalData(l,i){var g=this;return(0,p.A)(function*(){const _=yield g.purpleService.getOptionalData(g.catalogContent,l,i);return(0,r.mF)(g.catalogContent)?(g.catalogContent=_,g.catalogContent):(0,r.G4)(g.catalogContent)?(g.bundleContent=(0,r.Ig)(g.catalogContent),g.bundleContent[i]=_,g.bundleContent[i]):void 0})()}hasContentChanged(l,i){return(null==l?void 0:l.id)!==(null==i?void 0:i.id)||this.hasVersionChanged(l,i)}hasVersionChanged(l,i){return(null==l?void 0:l.version)!==(null==i?void 0:i.version)}onConfigChanges(){var l;let i=null===(l=this.context)||void 0===l?void 0:l[this.contextKey];Array.isArray(i)&&(i=i[0]);const g=this.hasContentChanged(this.catalogContent,i)&&!!i;return g&&(this.catalogContent=i),g}isGhost(){var l;return!this.config||!(null!==(l=this.context)&&void 0!==l&&l[this.contextKey])}ngOnDestroy(){super.ngOnDestroy()}getContextKey(){return this.contextKey}}return(E=M).\u0275fac=function(l){return new(l||E)(a.rXU(a.aKT),a.rXU(a.zZn),a.rXU(v.V),a.rXU(o.qQ),a.rXU(m.Wj),a.rXU(y.d))},E.\u0275dir=a.FsC({type:E,features:[a.Vt3]}),M})()},9149:(U,O,t)=>{t.r(O),t.d(O,{ContentTitleModule:()=>i,component:()=>g});var p=t(177);const o={titleMessage:"%s"};var c=t(5848),r=t(3953),a=t(9516),v=t(5102),m=t(1652),y=t(8909);const T=_=>[_];function E(_,u){1&_&&(r.qex(0),r.j41(1,"h1"),r.EFF(2,"..."),r.k0s(),r.bVm())}function M(_,u){if(1&_&&r.nrm(0,"h1",2),2&_){const h=r.XpG();r.Y8G("storefrontTranslate",h.config.titleMessage)("storefrontTranslateArgs",r.eq3(2,T,null==h.catalogContent?null:h.catalogContent.name))}}let D=(()=>{var _;class u extends c.Q{constructor(e,n,f,d,s,C){super(e,f,n,d,s,C),this.elementRef=e,this.contextService=n,this.injector=f,this.document=d,this.purpleService=s,this.globalService=C,this.type="content-title",this.defaultConfig=o}}return(_=u).\u0275fac=function(e){return new(e||_)(r.rXU(r.aKT),r.rXU(a.V),r.rXU(r.zZn),r.rXU(p.qQ),r.rXU(v.Wj),r.rXU(m.d))},_.\u0275cmp=r.VBU({type:_,selectors:[["storefront-content-title"]],features:[r.Vt3],decls:2,vars:2,consts:[[4,"ngIf"],[3,"storefrontTranslate","storefrontTranslateArgs",4,"ngIf"],[3,"storefrontTranslate","storefrontTranslateArgs"]],template:function(e,n){1&e&&r.DNE(0,E,3,0,"ng-container",0)(1,M,1,4,"h1",1),2&e&&(r.Y8G("ngIf",n.ghost),r.R7$(),r.Y8G("ngIf",!n.ghost))},dependencies:[p.bT,y.M],styles:["storefront-content-title>h1{margin-top:var(--contentHeaderMarginTop);margin-bottom:var(--contentHeaderMarginBottom);padding-top:var(--contentHeaderPaddingVert);padding-bottom:var(--contentHeaderPaddingVert);font-size:1.5rem}\n"],encapsulation:2}),u})();var l=t(6483);let i=(()=>{var _;class u{}return(_=u).\u0275fac=function(e){return new(e||_)},_.\u0275mod=r.$C({type:_}),_.\u0275inj=r.G2t({imports:[p.MD,l.h]}),u})();const g=D},2285:(U,O,t)=>{t.d(O,{b:()=>g});var p=t(467),o=t(177),c=t(3953),r=t(1210),a=t(8251),v=t(610),m=t(1803);const y={tag:"div",content:"",attributes:{}};var T=t(8179),E=t(9516),M=t(8448),D=t(8004),l=t(1652),i=t(5820);let g=(()=>{var _;class u extends r.${constructor(e,n,f,d,s,C,P,S,A,B,L,I){super(d,e,n,S,L),this.elementRef=e,this.contextService=n,this.renderer=f,this.injector=d,this.translate=s,this.eventActionService=C,this.store=P,this.document=S,this.platformId=A,this.changeDetectorRef=B,this.globalService=L,this.anchorService=I,this.anchorFeatureEnabled=!1,this.anchorPath=null,this.defaultConfig={...y}}ngOnInit(){var e=()=>super.ngOnInit,n=this;return(0,p.A)(function*(){n.anchorFeatureEnabled=n.anchorService.isAnchorFeatureEnabled(),e().call(n),n.elementRef.nativeElement.innerHTML="";const f=n.renderer.createElement(n.baseConfig.tag);n.renderer.appendChild(n.elementRef.nativeElement,f)})()}onConfigChanges(){var e=this;return(0,p.A)(function*(){var n,f;const d=e.renderer.createElement(e.config.tag),s={...e.config.attributes};null!==(n=e.config.attributes)&&void 0!==n&&n.src&&(s.src=e.contextService.toResourceUrl(e.config.attributes.src)),null!==(f=e.config.attributes)&&void 0!==f&&f.href&&(s.href=e.contextService.toResourceUrl(e.config.attributes.href)),"iframe"===e.config.tag&&d.addEventListener("load",P=>{d&&d.contentDocument?(d.contentDocument.scrollingElement.scrollHeight>d.contentWindow.innerHeight&&(d.style.height=d.contentDocument.scrollingElement.scrollHeight+"px"),d.contentDocument.scrollingElement.scrollWidth>d.contentWindow.innerWidth&&(d.style.width=d.contentDocument.scrollingElement.scrollWidth+"px")):window.addEventListener("message",S=>{S.origin===new URL(null==s?void 0:s.src).origin&&(S.data.height&&(d.style.height=S.data.height+"px"),S.data.width&&(d.style.width=S.data.width+"px"))})}),Object.keys(s).forEach(P=>d.setAttribute(P,e.config.attributes[P])),e.translatedContent=yield e.translate.translate({text:e.config.content,args:e.config.variables||[]}),d.innerHTML=(0,T.uQ)(e.translatedContent,e.context,e.contextService.$functions,e.globalService.getGlobalData()),e.elementRef.nativeElement.innerHTML="";let C=d;e.anchorFeatureEnabled&&(C=e.handleAnchorTags(d)),C.addEventListener("click",P=>e.onClick(P)),e.renderer.appendChild(e.elementRef.nativeElement,C),e.changeDetectorRef.markForCheck()})()}ngOnDestroy(){super.ngOnDestroy()}onClick(e){this.config.tap&&((this.anchorFeatureEnabled||"touchstart"===e.type)&&e.preventDefault(),this.trackOnClick(),this.eventActionService.processEventAction(this.config.tap,this));const n=this.getAnchorElementFromEvent(e);null!=n&&n.href&&(n.target===m.We.BLANK?"external"===n.getAttribute("data-target")?this.trackLinkOpenExternal(n):this.trackLinkOpenAppBrowser(n):this.trackLinkOpenInline(n))}getConfigEscapeProperties(){return["condition"]}isGhost(){return!1}hasContextChanged(e){return super.hasContextChanged(e)||this.translatedContent&&this.translatedContent.indexOf(T.mF)>-1}getAnchorElementFromEvent(e){var n,f;return"a"===(null===(n=e.target)||void 0===n?void 0:n.tagName.toLowerCase())?e.target:"a"===(null===(f=e.target)||void 0===f||null===(f=f.parentElement)||void 0===f?void 0:f.tagName.toLowerCase())?e.target.parentElement:null}handleAnchorTags(e){if(this.anchorPath=this.anchorService.getAnchorPathForEventAction(this.config.tap,this.context),this.anchorPath){const n=this.renderer.createElement("a");return n.style.height="inherit",n.style.width="inherit",n.setAttribute("href",this.anchorPath),n.appendChild(e),n}return e}trackOnClick(){const e="".concat(this.getTrackingBaseKey(),"_CLICKED");this.dispatchTrackingAction(e,{})}trackLinkOpenExternal(e){const n="".concat(this.getTrackingBaseKey(),"_LINK_OPEN_EXTERNAL");this.dispatchTrackingAction(n,{TARGET_URL:e.href,LINK_TEXT:e.innerText})}trackLinkOpenAppBrowser(e){const n="".concat(this.getTrackingBaseKey(),"_LINK_OPEN_APP_BROWSER");this.dispatchTrackingAction(n,{TARGET_URL:e.href,LINK_TEXT:e.innerText})}trackLinkOpenInline(e){this.store.dispatch((0,v.k4)({url:window.location.href,key:"".concat(this.getTrackingBaseKey(),"_LINK_OPEN_INLINE"),params:{TARGET_URL:e.href,LINK_TEXT:e.innerText}}))}dispatchTrackingAction(e,n){this.store.dispatch((0,v.k4)({url:window.location.href,key:e,params:n}))}}return(_=u).type="html",_.\u0275fac=function(e){return new(e||_)(c.rXU(c.aKT),c.rXU(E.V),c.rXU(c.sFG),c.rXU(c.zZn),c.rXU(M.D),c.rXU(D.G),c.rXU(a.B),c.rXU(o.qQ),c.rXU(c.Agw),c.rXU(c.gRc),c.rXU(l.d),c.rXU(i.X))},_.\u0275cmp=c.VBU({type:_,selectors:[["storefront-html"]],features:[c.Jv_([a.B]),c.Vt3],decls:0,vars:0,template:function(e,n){},styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-html{position:relative;display:flex}storefront-html.ghost>*{background-image:linear-gradient(90deg,var(--ghostColor) 0px,rgb(236,236,236) 40px,var(--ghostColor) 80px);background-size:80vw;animation:ghost-lines 2s infinite linear;background-color:var(--ghostColor);border-radius:var(--borderRadius);width:90%;height:1.2em}\n'],encapsulation:2,changeDetection:0}),u})()},9207:(U,O,t)=>{t.r(O),t.d(O,{HTMLModule:()=>r,component:()=>a});var p=t(177),o=t(2285),c=t(3953);let r=(()=>{var v;class m{}return(v=m).\u0275fac=function(T){return new(T||v)},v.\u0275mod=c.$C({type:v}),v.\u0275inj=c.G2t({imports:[p.MD]}),m})();const a=o.b},6218:(U,O,t)=>{t.r(O),t.d(O,{SectionModule:()=>h,component:()=>e});var p=t(177),o=t(3953);const c={content:null};var r=t(1210),a=t(8179),v=t(7879),m=t(1184),y=t(9516),T=t(1652),E=t(4748),M=t(3648);const D=["viewTemplate"],l=["viewChildren"];function i(n,f){if(1&n&&o.nrm(0,"storefront-element",3,0),2&n){const d=f.$implicit,s=o.XpG(2);o.Y8G("baseContext",s.baseContext)("baseConfig",d)("lazy",s.isLazy)}}function g(n,f){if(1&n&&(o.qex(0),o.DNE(1,i,2,3,"storefront-element",2),o.bVm()),2&n){const d=o.XpG();o.R7$(),o.Y8G("ngForOf",d.children)("ngForTrackBy",d.trackByChildren)}}let _=(()=>{var n;class f extends r.${constructor(s,C,P,S,A,B,L,I,R){super(C,s,P,A,B),this.elementRef=s,this.injector=C,this.contextService=P,this.changeDetectorRef=S,this.document=A,this.globalService=B,this.ssrService=L,this.platformId=I,this.purpleEnv=R,this.defaultConfig={...c},this.changeDetectorRef=S}ngOnInit(){this.baseContext.isGhost||super.ngOnInit()}onConfigChanges(){if(this.isLazy=!(!window.isUniversal||!this.ssrService.currentPrebootStatus),this.baseConfig.content){this.children=[];for(let s=0;s<this.baseConfig.content.length;s++)(this.purpleEnv.isUniversal||(0,a.Ol)(this.config.content[s]))&&this.children.push(this.baseConfig.content[s]);this.changeDetectorRef.detectChanges(),this.childComponents.forEach((s,C)=>{!this.purpleEnv.isUniversal||(0,a.Ol)(this.config.content[C])?s.lazyLoad():this.purpleEnv.isUniversal&&(0,p.UE)(this.platformId)&&(null==s||s.loadAndClear())}),this.changeDetectorRef.markForCheck()}}stripChildConfigs(s){return s.content&&Array.isArray(s.content)&&(s.content=s.content.map(({_uuid:C,condition:P})=>({_uuid:C,condition:P}))),s}rebuildContextKeys(){super.rebuildContextKeys(),this.baseConfig.content.forEach(s=>{"condition"in s&&(0,m.Fl)(s.condition,this.contextKeys)})}trackByChildren(s,C){if("string"==typeof C||"number"==typeof C)return C;const P=C.id||C._uuid;if(!P)throw console.error(C),"Element should have _uuid from config loader!";return P}}return(n=f).type="section",n.\u0275fac=function(s){return new(s||n)(o.rXU(o.aKT),o.rXU(o.zZn),o.rXU(y.V),o.rXU(o.gRc),o.rXU(p.qQ),o.rXU(T.d),o.rXU(E.i),o.rXU(o.Agw),o.rXU(v.r6))},n.\u0275cmp=o.VBU({type:n,selectors:[["storefront-section"]],viewQuery:function(s,C){if(1&s&&(o.GBs(D,7,o.c1b),o.GBs(l,5)),2&s){let P;o.mGM(P=o.lsd())&&(C.viewTemplate=P.first),o.mGM(P=o.lsd())&&(C.childComponents=P)}},features:[o.Vt3],decls:1,vars:1,consts:[["viewChildren",""],[4,"ngIf"],[3,"baseContext","baseConfig","lazy",4,"ngFor","ngForOf","ngForTrackBy"],[3,"baseContext","baseConfig","lazy"]],template:function(s,C){1&s&&o.DNE(0,g,2,2,"ng-container",1),2&s&&o.Y8G("ngIf",C.children)},dependencies:[p.Sq,p.bT,M._],styles:["storefront-section{display:flex;justify-content:space-between;padding:var(--sectionPadding);flex-direction:column}\n"],encapsulation:2,changeDetection:0}),f})();var u=t(6895);let h=(()=>{var n;class f{}return(n=f).\u0275fac=function(s){return new(s||n)},n.\u0275mod=o.$C({type:n}),n.\u0275inj=o.G2t({imports:[p.MD,u.r]}),f})();const e=_},1802:(U,O,t)=>{t.d(O,{c:()=>E});var p=t(1210),o=t(9758),c=t(8075),r=t(177),a=t(3953),v=t(9516),m=t(4559),y=t(1652),T=t(8909);let E=(()=>{var M;class D extends p.${constructor(i,g,_,u,h,e){super(_,i,g,h,e),this.elementRef=i,this.contextService=g,this.injector=_,this.router=u,this.document=h,this.globalService=e,this.type="switch",this.defaultConfig={}}ngOnInit(){this.config={...this.baseConfig},this.checked=this.config.initialValue,super.ngOnInit(),this.contextService.viewContext$.subscribe(i=>{const g=this.config.paramScope===o.x.USER_ATTRIBUTE?i.userAttributes[this.config.param]:i[this.config.param];g&&(this.checked="true"===g)})}isChecked(){return this.checked}toggle(){this.setChecked(!this.checked)}setChecked(i){this.config.paramScope===o.x.USER_ATTRIBUTE?this.contextService.setUserAttribute(this.config.param,"".concat(i)):(0,c.CV)(this.router,{[this.config.param]:i})}}return(M=D).\u0275fac=function(i){return new(i||M)(a.rXU(a.aKT),a.rXU(v.V),a.rXU(a.zZn),a.rXU(m.Ix),a.rXU(r.qQ),a.rXU(y.d))},M.\u0275cmp=a.VBU({type:M,selectors:[["storefront-switch"]],hostVars:2,hostBindings:function(i,g){2&i&&a.AVh("checked",g.checked)},features:[a.Vt3],decls:4,vars:2,consts:[[1,"label",3,"storefrontTranslate"],[1,"switch"],["type","checkbox",3,"change","checked"]],template:function(i,g){1&i&&(a.nrm(0,"label",0),a.j41(1,"label",1)(2,"input",2),a.bIt("change",function(){return g.toggle()}),a.k0s(),a.nrm(3,"span"),a.k0s()),2&i&&(a.Y8G("storefrontTranslate",g.config.label),a.R7$(2),a.Y8G("checked",g.isChecked()))},dependencies:[T.M],styles:['storefront-switch{align-items:center;display:flex}storefront-switch .label{margin:0 var(--gutter)}storefront-switch .switch{text-align:left;width:calc(var(--switchWidth) - 2 * var(--switchBorderWidth));height:calc(var(--switchWidth) / 2);border-radius:var(--switchBorderRadius);background-color:var(--switchActiveColor);display:inline-block;position:relative;cursor:pointer}storefront-switch .switch>span{display:block;width:100%;height:100%;border-radius:var(--switchBorderRadius)}storefront-switch .switch>span:before,storefront-switch .switch>span:after{content:"";cursor:pointer;position:absolute}storefront-switch .switch>span:before{width:100%;height:100%;box-sizing:border-box;background-color:var(--switchBackgroundColor);border-radius:var(--switchBorderRadius);transition:opacity .2s ease-out .1s,transform .2s ease-out .1s;transform:scale(1);opacity:1}storefront-switch .switch>span:after{top:var(--switchBorderWidth);z-index:3;transition:transform .4s cubic-bezier(.44,-.12,.07,1.15);width:calc(var(--switchWidth) / 2 - 2 * var(--switchBorderWidth));height:calc(var(--switchWidth) / 2 - 2 * var(--switchBorderWidth));background-color:var(--switchHandleColor);border-radius:100%;box-shadow:0 2px 5px #0000004d;left:var(--switchBorderWidth)}storefront-switch .switch>input[type=checkbox]{opacity:0;position:absolute}storefront-switch .switch>input[type=checkbox]:checked~span:before{transform:scale(0);opacity:.7}storefront-switch .switch>input[type=checkbox]:checked~span:after{transform:translate(100%)}\n'],encapsulation:2}),D})()},9645:(U,O,t)=>{t.r(O),t.d(O,{SwitchModule:()=>a,component:()=>v});var p=t(177),o=t(1802),c=t(6483),r=t(3953);let a=(()=>{var m;class y{}return(m=y).\u0275fac=function(E){return new(E||m)},m.\u0275mod=r.$C({type:m}),m.\u0275inj=r.G2t({imports:[p.MD,c.h]}),y})();const v=o.c},2364:(U,O,t)=>{t.d(O,{S:()=>a});var p=t(4412),o=t(3953),c=t(1626),r=t(9118);let a=(()=>{var v;class m{constructor(T,E){this.http=T,this.kioskConfigService=E,this.initialization=new p.t(null),this.data=[{identifier:"phone",minScreenWidth:null},{identifier:"tablet_small",minScreenWidth:533},{identifier:"tablet_large",minScreenWidth:720}]}init(){}getDeviceClass(){const E=this.data.reduce((M,D)=>window.innerWidth>=D.minScreenWidth?D:M,null);return E&&E.identifier}}return(v=m).\u0275fac=function(T){return new(T||v)(o.KVO(c.Qq),o.KVO(r.x))},v.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"}),m})()},354:(U,O,t)=>{t.d(O,{s:()=>l});var p=t(467),o=t(5102),c=t(1413),r=t(5964),a=t(6697),v=t(3953),m=t(496),y=t(1626),T=t(9118),E=t(3072),M=t(2364),D=t(9516);let l=(()=>{var i;class g{constructor(u,h,e,n,f,d,s){this.publicationService=u,this.http=h,this.purpleService=e,this.kioskConfigService=n,this.sessionService=f,this.deviceClassService=d,this.contextService=s,this.data=[],this.initPdf=new c.B,this.presenterLoaded=new c.B,this.subscriptions=[]}init(u){var h=this;return(0,p.A)(function*(){h.kioskConfigData=yield h.kioskConfigService.getConfig().toPromise(),h.content=yield h.publicationService.selectByContentCriteria(u);let e=yield h.getLink(h.content,"pdf_single_page_download");yield h.getSinglePageDownloadLinkFromJSON(e);let n=yield h.getLink(h.content,"pdf_download");h.initPdf.next(n)})()}getLink(u,h){var e=this;return(0,p.A)(function*(){const n=yield(0,o.GA)(u,e.purpleService);if(u&&u.properties&&!n){let f=Object.keys(u.properties);for(let d=0;d<f.length;d++)if(f[d]===h)return e.getAttachmentLink(u,u.properties[f[d]]);return null}})()}getSinglePageDownloadLinkFromJSON(u){var h=this;return(0,p.A)(function*(){try{const e=h.presenterLoaded.pipe((0,r.p)(n=>n),(0,a.s)(1)).subscribe(function(){var n=(0,p.A)(function*(f){if(f){const A=yield h.http.get(u).toPromise();var d=WP.instance.getPurpleData().getPages();if(A){var s=0;h.data=[];for(const B of d){for(var C=parseInt(B.pageCount),P=[],S=0;S<C;S++)P.push(yield h.getAttachmentLink(h.content,A[s],s+1)),s++;h.data.push(P)}}}});return function(f){return n.apply(this,arguments)}}());h.subscriptions.push(e)}catch(e){console.error("Error fetching data from JSON link:",e)}})()}getAttachmentLink(u,h,e){var n=this;return(0,p.A)(function*(){const f=new URL(window.location.href).origin,d=n.contextService.getIsCustomerDomainUsed()?f:n.purpleService.getPurpleConfig().contentUrl,s=JSON.parse(localStorage.getItem("AppWebConfiguration")).id;let C="".concat(d,"/resources/web/attachment/").concat(s,"/").concat(u.id,"/").concat(h);C+="?preview=".concat(n.kioskConfigData.kioskConfig.preview),C+="&deviceId=".concat(localStorage.getItem("deviceId")),C+="&deviceClass=".concat(n.deviceClassService.getDeviceClass());const P=yield n.sessionService.getReceiptData(u);if(P){const{receipt:A,providerType:B}=P;C+="&receipt=".concat(window.encodeURIComponent(A)),C+="&providerType=".concat(B)}const S=n.sanitize(n.getFileName(u,h,e));return C+="&targetFilename=".concat(window.encodeURIComponent(S)),C})()}getSingleDownloadLink(){return this.data&&WP.instance&&WP.instance.getScroller()&&this.data[WP.instance.getScroller().getIndex()]}getDownloadLink(){var u=this;return(0,p.A)(function*(){return yield u.getLink(u.content,"pdf_download")})()}getFileName(u,h,e){const f=this.kioskConfigData.kioskConfig.downloadFileName,d=h.substr(h.lastIndexOf(".")),s=e?" - "+e:"";switch(f){case"publication_issue":return this.publicationService.currentPublication.name+" - "+u.name+s+d;case"issue":return u.name+s+d;default:return h}}sanitize(u){return u.replace(/,/g,"").replace(/\xe4/g,"ae").replace(/\xc4/g,"Ae").replace(/\xf6/g,"oe").replace(/\xd6/g,"Oe").replace(/\xfc/g,"ue").replace(/\xdc/g,"Ue")}ngOnDestroy(){this.subscriptions.forEach(u=>u.unsubscribe())}}return(i=g).\u0275fac=function(u){return new(u||i)(v.KVO(m.m),v.KVO(y.Qq),v.KVO(o.Wj),v.KVO(T.x),v.KVO(E.Q),v.KVO(M.S),v.KVO(D.V))},i.\u0275prov=v.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),g})()},3072:(U,O,t)=>{t.d(O,{Q:()=>v});var p=t(467),o=t(4404),r=t(3953),a=t(5102);let v=(()=>{var m;class y{constructor(E){this.purpleService=E}getReceiptData(E){var M=this;return(0,p.A)(function*(){return E.purchaseData.purchasedBy.includes(o.PurchaseOption.ENTITLEMENT)?{receipt:yield M.getAccessToken(),providerType:"entitlement"}:E.purchaseData.purchasedBy.includes(o.PurchaseOption.SUBSCRIPTION_CODE)?{receipt:(yield M.getSubscriptionCodes()).join(","),providerType:"subscriptionCode"}:null})()}getAccessToken(){var E=this;return(0,p.A)(function*(){const M=yield E.purpleService.purpleRef.entitlement.getUserData();return null==M?void 0:M.accessToken})()}getSubscriptionCodes(){var E=this;return(0,p.A)(function*(){return(yield E.purpleService.purpleRef.store.getSubscriptionCodes()).subscriptionCodes})()}}return(m=y).\u0275fac=function(E){return new(E||m)(r.KVO(a.Wj))},m.\u0275prov=r.jDH({token:m,factory:m.\u0275fac,providedIn:"root"}),y})()},7967:(U,O,t)=>{function p(o,c){return"object"!=typeof o?1===c?o:o+"S":1===c?o.singular:o.plural}t.d(O,{t:()=>p})}}]);
|