@pronto-tools-and-more/files 15.37.0 → 15.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "branch": "HEAD",
3
- "commit": "ae2ea9a",
4
- "commitDate": "Mon Mar 17 2025 08:06:10 GMT+0000 (Coordinated Universal Time)",
5
- "buildDate": "Mon Mar 17 2025 08:15:37 GMT+0000 (Coordinated Universal Time)",
6
- "packageVersion": "3.8.10"
3
+ "commit": "c84b61d",
4
+ "commitDate": "Mon May 05 2025 10:35:30 GMT+0000 (Coordinated Universal Time)",
5
+ "buildDate": "Mon May 05 2025 10:38:05 GMT+0000 (Coordinated Universal Time)",
6
+ "packageVersion": "3.8.12"
7
7
  }
@@ -712,6 +712,7 @@ ${YQ}
712
712
  logoutUrl
713
713
  }
714
714
  }
715
+ contentLastModified
715
716
  }
716
717
  `;class lY{version=new jQ(2,0);getState(e,t){let n;n="string"==typeof e?e:e.key;let r=localStorage.getItem("storefront-"+n);if(void 0===r&&(r=null),!t)return Promise.resolve({key:n,value:r});t(n,r)}setState(e,t){let n,r;return"string"==typeof e?(n=e,r=t):(n=e.key,r=e.value),null==r?localStorage.removeItem("storefront-"+n):localStorage.setItem("storefront-"+n,r),Promise.resolve()}}class dY{constructor(e,t,n,r,i){this.setConfigValue=e,this.getConfig=t,this.client=n,this.appInfo=r,this.deviceInfo=i}version=new jQ(2,4);get config(){return this.getConfig()}sanitizeCode(e){return e.substring(0,255).trim().toUpperCase()}async addSubscriptionCode(e){const t=this.sanitizeCode(e.code);if(this.config.subscriptionCodes.includes(t))throw{code:"DUPLICATE_CODE",message:`Code is already added: ${e.code}`};try{if(!((await this.client.mutate({mutation:ez`
717
718
  mutation CheckSubscriptionCodes(
@@ -839,4 +840,4 @@ fragment EntitlementFields on EntitlementResult {
839
840
  }
840
841
  }
841
842
  ${uY}
842
- `,(e=>e.appConfigurationForDomain),t,{domainName:e,preview:n})}static async getAppWebConfig(e,t,n,r){const i=function(e){return new Wq({uri:e+"/graphql",cache:new DY,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(),IY.mapAppConfiguration(t(o.data))}static mapAppConfiguration(e){return e?{id:e.id,dynamicResources:{lastModified:e.dynamicResources?.lastModified},favicons:e.favicons.map((e=>IY.mapFavicons(e))),entitlementConfig:IY.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:az.ENTITLEMENT_MODE.ENTITLEMENT};case"OAuthConfig":return{mode:az.ENTITLEMENT_MODE.OAUTH,clientId:e.clientId,loginUrl:e.loginUrl,tokenUrl:e.tokenUrl,logoutUrl:e.logoutUrl};default:return{mode:az.ENTITLEMENT_MODE.NONE}}}}class DY extends bG{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 TY;!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"}(TY||(TY={}));var wY=n(5420),OY=function(e,t){return function(n,r){t(n,r,e)}};const AY={hasNextPage:!1,totalCount:0,cursor:"",nodes:[]},NY="PURPLE_CACHE_VERSION",MY="3.8.10";let PY=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(),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,r)=>{const o=this.downloadOptions,s=new wY.V({content:e,publication:i,autoUpdate:Boolean(o.autoUpdateBehavior),addAppStateListeners:!0});s.initPromise.then((()=>{const e={...s.state,error:null},r=new Ie(e);s.addDownloadStateListeners((e=>r.next(e))),s.updates$=r,t&&s.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,s.content);t.alert({text:"ERROR_DOWNLOAD",args:n},"DIALOG_ERROR")})),n(s)})).catch((e=>{r(e)}))})),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=>AY,this.purpleRef.catalog.getPublicationProducts=async e=>AY}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([TY.PURPLE_PUBLICATION_CACHE,TY.PURPLE_CONTENT_CACHE,TY.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([TY.PURPLE_CONTENT_CACHE,TY.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({...FY,...e,...t})}e.issueFilter&&(i=i.filter((t=>pN(e.issueFilter,t))))}else{const t={...e,issueFilter:LY(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=FY;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([TY.PURPLE_CONTENT_CACHE,TY.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([TY.PURPLE_COLLECTION_CACHE,TY.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(TY.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([TY.PURPLE_TAXONOMY_CACHE,TY.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(TY.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(TY.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(TY.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(TY.PURPLE_PATH_SEGMENT_CACHE)}))}isCatalogAPIAvailable(){return!!this.purpleRef.catalog}overrideConsentApis(){const e=this.injector.get(jj);this.purpleRef.consent.getConsent=async t=>(await e.init$,e.getConsent(t)),this.purpleRef.consent.grantConsent=async t=>{await e.init$,e.grantConsent(t)},this.purpleRef.consent.showPrivacyManager=async()=>(await e.init$,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:HY(e),optionalParams:GY(t||{})};return this.purpleRef.tracking.trackAction(n)}async trackView(e,t){const n={key:HY(e),optionalParams:GY(t||{})};return this.purpleRef.tracking.trackView(n)}async trackPurchase(e){return e.key=HY(e.key),e.optionalParams&&(e.optionalParams=GY(e.optionalParams)),this.purpleRef.tracking.trackPurchase(e)}async setUserAttribute(e){return e.key=HY(e.key),this.purpleRef.tracking.setUserAttribute(e)}async initCache(){const[e]=await Promise.all([this.getState(NY),this.updateBookmarks(),this.updateRepeatablePublicationProducts()]);MY===e?await this.cacheService.restoreCachesFromStorage():(console.debug(`Cache version: ${e}, Experience version: ${MY}: ignoring cache`),this.setState(NY,MY))}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={...FY,...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 IY(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)}))}};PY=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"}),OY(0,Lr(bl)),OY(3,Lr(zY))],PY);class RY{static injector}var xY=n(8617);async function kY(e,t,n=(e=>Promise.resolve(!e.purchaseData.purchased)),r=null,i=!0,o){let s,a,c;if(o||(o=RY.injector.get(PY)),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 LY(e,t){let n;const r={OR:e.map((e=>({id:{value:e}})))};return n=t?{AND:[r,t]}:r,n}const FY={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 UY(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 jY(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_${HY(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,...$Y(t,r),[r+"ISSUE_LATEST"]:t.currentIssueId===e.id?"true":"false"}),i}(e,t,n,r):{}}function VY(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,...BY(t),ISSUE_LATEST:t.currentIssueId===e.id?"true":"false"}),n}function $Y(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_${HY(r)}`]:e.properties[r]})),{}):{}}:{}}function BY(e){return e?{PUBLICATION_TYPE:e.type}:{}}function HY(e){return e.toUpperCase().replace(/-/g,"_")}function GY(e){return Object.keys(e).reduce(((t,n)=>((e[n]||"boolean"==typeof e[n])&&(t[HY(n)]=e[n]),t)),{})}function qY(e){return Object.values([xY.r.ISSUE_ARTICLE,xY.r.READ_MODE_ARTICLE]).includes(e)}zA.Access.PURCHASABLE;const zY=new zn("PurpleEnvironment"),WY=(new zn("Location"),new zn("PurpleEnvironmentBackend"),new zn("APP_DATA_BACKEND"),new zn("APP_DATA"))},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__.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()))})()})();
843
+ `,(e=>e.appConfigurationForDomain),t,{domainName:e,preview:n})}static async getAppWebConfig(e,t,n,r){const i=function(e){return new Wq({uri:e+"/graphql",cache:new DY,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(),IY.mapAppConfiguration(t(o.data))}static mapAppConfiguration(e){return e?{id:e.id,dynamicResources:{lastModified:e.dynamicResources?.lastModified},favicons:e.favicons.map((e=>IY.mapFavicons(e))),entitlementConfig:IY.mapEntitlementConfig(e.entitlementConfig),contentLastModified:e.contentLastModified}:null}static mapFavicons(e){if(e)return{url:e.url,mimeType:e.mimeType}}static mapEntitlementConfig(e){switch(e?.__typename){case"EntitlementConfig":return{mode:az.ENTITLEMENT_MODE.ENTITLEMENT};case"OAuthConfig":return{mode:az.ENTITLEMENT_MODE.OAUTH,clientId:e.clientId,loginUrl:e.loginUrl,tokenUrl:e.tokenUrl,logoutUrl:e.logoutUrl};default:return{mode:az.ENTITLEMENT_MODE.NONE}}}}class DY extends bG{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 TY;!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"}(TY||(TY={}));var wY=n(5420),OY=function(e,t){return function(n,r){t(n,r,e)}};const AY={hasNextPage:!1,totalCount:0,cursor:"",nodes:[]},NY="PURPLE_CACHE_VERSION",MY="3.8.12";let PY=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(),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,r)=>{const o=this.downloadOptions,s=new wY.V({content:e,publication:i,autoUpdate:Boolean(o.autoUpdateBehavior),addAppStateListeners:!0});s.initPromise.then((()=>{const e={...s.state,error:null},r=new Ie(e);s.addDownloadStateListeners((e=>r.next(e))),s.updates$=r,t&&s.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,s.content);t.alert({text:"ERROR_DOWNLOAD",args:n},"DIALOG_ERROR")})),n(s)})).catch((e=>{r(e)}))})),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=>AY,this.purpleRef.catalog.getPublicationProducts=async e=>AY}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([TY.PURPLE_PUBLICATION_CACHE,TY.PURPLE_CONTENT_CACHE,TY.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([TY.PURPLE_CONTENT_CACHE,TY.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({...FY,...e,...t})}e.issueFilter&&(i=i.filter((t=>pN(e.issueFilter,t))))}else{const t={...e,issueFilter:LY(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=FY;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([TY.PURPLE_CONTENT_CACHE,TY.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([TY.PURPLE_COLLECTION_CACHE,TY.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(TY.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([TY.PURPLE_TAXONOMY_CACHE,TY.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(TY.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(TY.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(TY.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(TY.PURPLE_PATH_SEGMENT_CACHE)}))}isCatalogAPIAvailable(){return!!this.purpleRef.catalog}overrideConsentApis(){const e=this.injector.get(jj);this.purpleRef.consent.getConsent=async t=>(await e.init$,e.getConsent(t)),this.purpleRef.consent.grantConsent=async t=>{await e.init$,e.grantConsent(t)},this.purpleRef.consent.showPrivacyManager=async()=>(await e.init$,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:HY(e),optionalParams:GY(t||{})};return this.purpleRef.tracking.trackAction(n)}async trackView(e,t){const n={key:HY(e),optionalParams:GY(t||{})};return this.purpleRef.tracking.trackView(n)}async trackPurchase(e){return e.key=HY(e.key),e.optionalParams&&(e.optionalParams=GY(e.optionalParams)),this.purpleRef.tracking.trackPurchase(e)}async setUserAttribute(e){return e.key=HY(e.key),this.purpleRef.tracking.setUserAttribute(e)}async initCache(){const[e]=await Promise.all([this.getState(NY),this.updateBookmarks(),this.updateRepeatablePublicationProducts()]);MY===e?await this.cacheService.restoreCachesFromStorage():(console.debug(`Cache version: ${e}, Experience version: ${MY}: ignoring cache`),this.setState(NY,MY))}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={...FY,...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 IY(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)}))}};PY=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"}),OY(0,Lr(bl)),OY(3,Lr(zY))],PY);class RY{static injector}var xY=n(8617);async function kY(e,t,n=(e=>Promise.resolve(!e.purchaseData.purchased)),r=null,i=!0,o){let s,a,c;if(o||(o=RY.injector.get(PY)),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 LY(e,t){let n;const r={OR:e.map((e=>({id:{value:e}})))};return n=t?{AND:[r,t]}:r,n}const FY={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 UY(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 jY(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_${HY(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,...$Y(t,r),[r+"ISSUE_LATEST"]:t.currentIssueId===e.id?"true":"false"}),i}(e,t,n,r):{}}function VY(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,...BY(t),ISSUE_LATEST:t.currentIssueId===e.id?"true":"false"}),n}function $Y(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_${HY(r)}`]:e.properties[r]})),{}):{}}:{}}function BY(e){return e?{PUBLICATION_TYPE:e.type}:{}}function HY(e){return e.toUpperCase().replace(/-/g,"_")}function GY(e){return Object.keys(e).reduce(((t,n)=>((e[n]||"boolean"==typeof e[n])&&(t[HY(n)]=e[n]),t)),{})}function qY(e){return Object.values([xY.r.ISSUE_ARTICLE,xY.r.READ_MODE_ARTICLE]).includes(e)}zA.Access.PURCHASABLE;const zY=new zn("PurpleEnvironment"),WY=(new zn("Location"),new zn("PurpleEnvironmentBackend"),new zn("APP_DATA_BACKEND"),new zn("APP_DATA"))},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__.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="ae2ea9a">
8
- <meta name="storefront-version" content="3.8.10">
7
+ <meta name="storefront-commit" content="c84b61d">
8
+ <meta name="storefront-version" content="3.8.12">
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">