1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3854],{8130:(e,t,i)=>{i(7265);var s=i(1532),n=i(8803);rx.componentLoader.register({contentSwitch:class{constructor(e,t){this.el=e,this.options=t,this.init()}init(){this.options.wcmModeEdit||this[this.options.type]()}printResource(e){this.el.innerHTML=atob(this.options.resourceMap[e]),rx.script.handleScriptsAsync(this.el)}checkAndCall(e){e&&e()}checkedRegistered(e,t){window.authSettings&&this.options.properties.claimValue?(s.authController.initialize(window.authSettings),s.authController.getClaim(this.options.properties.claimName).then(i=>{i&&("string"==typeof i&&i===this.options.properties.claimValue||Array.isArray(i)&&i.includes(this.options.properties.claimValue))?this.checkAndCall(e):this.checkAndCall(t)}).catch(()=>{this.checkAndCall(t)})):this.checkAndCall(t)}checkedLogged(e,t){window.authSettings?(s.authController.initialize(window.authSettings),s.authController.getToken().then(t=>{this.checkAndCall(e.bind(this,t))}).catch(()=>{this.checkAndCall(t)})):this.checkAndCall(t)}isMobileView(){return window.innerWidth<768}isMobileActive(){if(!this.options.scheduledSwitch)return!0;const e=Date.now();return this.options.startDate<e&&(0===this.options.endDate||e<this.options.endDate)}evaluateMobileView(){this.isMobileView()&&this.isMobileActive()?this.el.querySelector("#mobile-content").classList.remove("hidden"):this.el.querySelector("#default-content").classList.remove("hidden")}registerSwitch(){this.checkedRegistered(this.printResource.bind(this,"registered"),this.printResource.bind(this,"anonymous"))}headerRegisterSwitch(){this.checkedRegistered(()=>this.el.classList.add("hide"))}loggedSwitch(){this.checkedLogged(this.printResource.bind(this,"authenticated"),this.printResource.bind(this,"anonymous"))}subscribedSwitch(){this.checkedLogged(e=>{fetch(this.options.properties.snippetUrl,{credentials:"same-origin",headers:new Headers({Authorization:"bearer "+e})}).then(e=>{if(e.ok)return e.text();throw new Error("invalid status")}).then(e=>{this.el.innerHTML=e,rx.script.handleScriptsAsync(this.el)}).catch(()=>{this.printResource("notSubscribed")})},()=>{this.printResource("notAuthenticated");const e=this.el.querySelector(".btn-primary");e&&e.addEventListener("click",()=>{(0,n.cJ)(this.options.template)})})}mobileSwitch(){this.evaluateMobileView()}}})}},e=>{e.O(0,[7926],()=>{return t=8130,e(e.s=t);var t});e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.