PageSourceSearch

https://singingnewstv.com/js/gift-redeem.d82b40a5.js

js singingnewstv.com collected 2026-10-02 00:33:13 UTC 8,130 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkweb_tv_vue"]=self["webpackChunkweb_tv_vue"]||[]).push([[674],{75541:function(e,s,t){t.r(s),t.d(s,{default:function(){return u}});t(44114);var i=function(){var e=this,s=e._self._c;return s("div",{staticClass:"md-layout md-alignment-center-center",attrs:{id:"gift-redeem-view"}},[e.loading?s("div",{staticClass:"spinner"},[s("h2",[e._v("Checking Gift Code...")]),e.loading?s("div",{staticClass:"spinner md-layout md-alignment-center-center"},[s("md-progress-spinner",{attrs:{"md-mode":"indeterminate"}})],1):e._e()]):e.showGiftAlreadyRedeemed?s("div",{attrs:{id:"already-redeemed"}},[s("md-empty-state",{attrs:{"md-icon":"error","md-label":"Gift Code Already Redeemed","md-description":"This gift has already been redeemed by someone."}},[s("md-button",{staticClass:"md-primary md-raised",on:{click:function(s){return e.$router.push("/")}}},[e._v("Continue")])],1)],1):e.showDone?s("div",{attrs:{id:"redeem-done"}},[s("md-empty-state",{attrs:{"md-icon":"subscriptions","md-label":"Congatulations!","md-description":e.settings.subscribeOptions?.thankYouMessage??"You are now subscribed!"}},[s("md-button",{staticClass:"md-primary md-raised",on:{click:function(s){return e.$router.push("/")}}},[e._v("Start Watching")])],1)],1):e.authed?s("div",{attrs:{id:"redeem-authed"}},[s("div",{staticClass:"error"},[e._v(e._s(e.errorMessage))]),s("md-empty-state",{attrs:{"md-icon":"redeem","md-label":"Redeem Your Gift","md-description":"Click the button below to redeem your gift."}},[s("div",{staticClass:"submit-container"},[s("div",{staticClass:"spinner md-layout md-alignment-center-center"},[s("md-progress-spinner",{directives:[{name:"show",rawName:"v-show",value:e.sending,expression:"sending"}],attrs:{"md-mode":"indeterminate"}})],1),s("md-button",{directives:[{name:"show",rawName:"v-show",value:!e.sending,expression:"!sending"}],staticClass:"md-primary md-raised",attrs:{disabled:e.sending},on:{click:function(s){return e.redeem()}}},[e._v(" Redeem ")])],1)])],1):s("div",{attrs:{id:"gift-redeem-container"}},[s("md-steppers",{attrs:{id:"redeem-steps","md-active-step":e.activeStep,"md-linear":"","md-vertical":e.isMobile},on:{"update:mdActiveStep":function(s){e.activeStep=s},"update:md-active-step":function(s){e.activeStep=s}}},[s("md-step",{attrs:{id:"email","md-label":"Enter Your Email","md-done":e.done.email,"md-error":e.emailExists?"Email Already in Use":void 0},on:{"update:mdDone":function(s){return e.$set(e.done,"email",s)},"update:md-done":function(s){return e.$set(e.done,"email",s)}}},[s("ValidationObserver",{ref:"signupEmail",scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",{staticClass:"step-container md-layout md-alignment-center-center"},[s("form",{staticClass:"signup-step-form",on:{submit:function(s){return s.preventDefault(),t.handleSubmit(e.onSubmitEmail)}}},[s("ValidationProvider",{staticClass:"md-layout-item md-size-100",attrs:{mode:"aggressive",debounce:500,name:"email",rules:"required|email"},scopedSlots:e._u([{key:"default",fn:function({errors:t}){return[s("md-field",{class:{"md-invalid":t.length||e.emailExists}},[s("label",[e._v("Email")]),s("md-input",{attrs:{name:"email",type:"email",required:""},model:{value:e.email,callback:function(s){e.email=s},expression:"email"}}),s("span",{staticClass:"md-helper-text"},[e._v("You'll be using this email to log in")]),s("span",{staticClass:"md-error"},[e._v(e._s(t[0]||(e.emailExists?"Email Already in Use":void 0)))])],1)]}}],null,!0)}),s("div",{staticClass:"submit-container"},[s("div",{staticClass:"spinner md-layout md-alignment-center-center"},[s("md-progress-spinner",{directives:[{name:"show",rawName:"v-show",value:e.sending,expression:"sending"}],attrs:{"md-mode":"indeterminate"}})],1),s("md-button",{directives:[{name:"show",rawName:"v-show",value:!e.sending,expression:"!sending"}],staticClass:"submit-button md-raised md-primary",attrs:{disabled:e.sending||t.invalid||e.authed,type:"submit"}},[e._v("Continue ")])],1),e.showLoginLink?s("div",{staticClass:"already-have-an-account-link"},[e._v(" Already have an account?"),s("br"),e.authed?e._e():s("router-link",{staticClass:"md-button md-primary md-theme-default",attrs:{to:"/login"}}
1,[e._v("Login")])],1):e._e()],1)])]}}])})],1),s("md-step",{attrs:{id:"password","md-label":"Create a Password","md-done":e.done.password,"md-error":e.errorMessage},on:{"update:mdDone":function(s){return e.$set(e.done,"password",s)},"update:md-done":function(s){return e.$set(e.done,"password",s)}}},[s("ValidationObserver",{ref:"signupPassword",scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",{staticClass:"step-container md-layout md-alignment-center-center"},[s("form",{staticClass:"signup-step-form",on:{submit:function(s){return s.preventDefault(),t.handleSubmit(e.onSubmitPassword)}}},[s("ValidationProvider",{staticClass:"md-layout-item md-size-100",attrs:{mode:"aggressive",debounce:500,name:"Password",rules:"required|min:8|password"},scopedSlots:e._u([{key:"default",fn:function({errors:t,touched:i}){return[s("md-field",{class:{"md-invalid":t.length&&i}},[s("label",[e._v("Password")]),s("md-input",{attrs:{name:"password",type:"password",required:""},model:{value:e.password,callback:function(s){e.password=s},expression:"password"}}),s("span",{staticClass:"md-error"},[e._v(e._s(t[0]))])],1)]}}],null,!0)}),s("PasswordRater",{staticClass:"password-rater",attrs:{password:e.password,"user-inputs":e.userInputs}}),s("div",{staticClass:"submit-container"},[s("div",{staticClass:"spinner md-layout md-alignment-center-center"},[s("md-progress-spinner",{directives:[{name:"show",rawName:"v-show",value:e.sending,expression:"sending"}],attrs:{"md-mode":"indeterminate"}})],1),s("md-button",{directives:[{name:"show",rawName:"v-show",value:!e.sending,expression:"!sending"}],staticClass:"submit-button md-raised md-primary",attrs:{disabled:e.sending||t.invalid||e.authed,type:"submit"}},[e._v("Continue ")])],1)],1)])]}}])})],1)],1)],1)])},a=[],n=t(15261);const d=()=>t.e(263).then(t.bind(t,43623));var r={name:"RedeemGiftSubscription",components:{ValidationProvider:n.LW,ValidationObserver:n.Ce,PasswordRater:d},props:{code:{type:String,default:""}},data:()=>({settings:{},loading:!0,authed:!1,activeStep:"email",sending:!1,emailExists:!1,showLoginLink:!1,showGiftAlreadyRedeemed:!1,showDone:!1,errorMessage:void 0,email:"",password:"",done:{email:!1,password:!1}}),computed:{isMobile:function(){return"xs"===this.$mq||"sm"===this.$mq},userInputs:function(){return[this.email]}},watch:{code:async function(){this.showDone=!1,this.done={email:!1,password:!1},this.email="",this.password="",this.showGiftAlreadyRedeemed=!1,this.errorMessage=void 0,this.showLoginLink=!1,this.sending=!1,this.emailExists=!1,this.activeStep="email",await this.checkGiftCode()}},async created(){this.authed=this.$gideo.authed,this.settings=await this.$appSettings;const e=()=>{this.authed=this.$gideo.authed};this.$gideo.bus.$on("logged-in",e),this.$gideo.bus.$on("logged-out",e),await this.checkGiftCode()},methods:{async redeem(){this.sending=!0;try{await this.$gideo.redeemGift(this.code),this.showDone=!0}catch(e){this.errorMessage=e.userMessage||"There was an unknown issue while trying to redeem your gift"}this.sending=!1},async checkGiftCode(){this.loading=!0;const e=await this.$gideo.checkGiftExists(this.code);e||(this.showGiftAlreadyRedeemed=!0),this.loading=!1},async onSubmitEmail(){this.sending=!0,this.emailExists=!1;try{await this.$gideo.checkSignupFields(this.email),this.emailExists=!1,this.done.email=!0,this.activeStep="password"}catch(e){409===e.response?.status?(this.emailExists=!0,this.showLoginLink=!0):this.emailErrorText=e.userMessage||"There was an unknown issue while trying to create your account"}this.sending=!1},async onSubmitPassword(){this.sending=!0;try{await this.$gideo.redeemGift(this.code,{email:this.email,password:this.password}),this.done.password=!0,this.showDone=!0}catch(e){this.errorMessage=e.message||"There was an unknown issue while trying to redeem your gift"}this.sending=!1}}},o=r,m=t(81656),l=(0,m.A)(o,i,a,!1,null,"946277d8",null),u=l.exports}}]);
2//# sourceMappingURL=gift-redeem.d82b40a5.js.map

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.