const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./WebSystemOutageMessaging-DbgmkouI.mjs","./R3yV9RKm.js","./entry.Dr2vXc07.css","./WebSystemOutageMessaging.ByU8g0wO.css"])))=>i.map(i=>d[i]); import{_ as y,d as h,e as d,j as i,x as b,f as t,bK as k,U,g as S,bL as P,bc as N,T,br as m,at as q,h as v,r as E,k as O,F as x,z as D,t as F,ax as ,ドルa as j,Y as B,w as z,i as C,u as Q,cm as W,E as I,P as M,R as V,q as Y}from"#entry";import{_ as K,a as H}from"./Tabs-CIBolVsN.mjs";import{_ as J}from"./WebFavoriteContentToggle-Cq2tOdXW.mjs";import{_ as G}from"./WebImage-BrV8nG8o.mjs";import{_ as Z}from"./WebShareLinks-C5N1rLO-.mjs";import{_ as X}from"./WebPager-IBVEaT-v.mjs";import{_ as A}from"./WebSiteUserRegisteredSites-8K0XdmGx.mjs";import{_ as ee}from"./WebMembershipOverview-PClcRvKj.mjs";import"./WebShareLink-Du6TPPz5.mjs";import"./useShareLink-C1mdFT8N.mjs";import"./interval-BzLCLO6P.mjs";import"./Pager-CB4_LMaG.mjs";import"./WebMembershipFeatures-7ywdgNrD.mjs";const se={async setup(){const s=await m.getRequiredQuestions(),e=await m.getAdditionalQuestions(),{demographics:r,memberships:a,countryCode:o,region:n,regionCode:f,...p}=await m.getUserInfo(),c=await m.getDemographicQuestions(s.requiredDemographicFields),_=await m.getDemographicQuestions(e.additionalDemographicFields),u={};for(const g in c){const w=c[g];w.required=!0,u[g]=w}for(const g in _){const w=_[g];w.required=!1,u[g]=w}return{requiredQuestions:s,demographics:r,memberships:a,countryCode:o,region:n,regionCode:f,userInfo:p,requiredFields:c,additionalFields:_,demoFieldInfo:{rows:[{numberOfColumns:2,fields:u}]}}},data(){return{commonValues:{firstName:null,lastName:null,title:null,company:null,locale:{countryCode:null,region:null},city:null,postalCode:null,emailConsent:!1},requiredCommonFields:{},demoValues:{},errors:{},showErrors:!1,processing:!1,error:null,formKey:Math.random(),message:null}},computed:{commonFieldInfo(){return{rows:[{numberOfColumns:2,fields:{firstName:{type:"text_input",label:"First Name",required:this.requiredCommonFields.firstName,showErrors:this.showErrors},lastName:{type:"text_input",label:"Last Name",required:this.requiredCommonFields.lastName,showErrors:this.showErrors},company:{type:"text_input",label:"Company Name",required:this.requiredCommonFields.company,showErrors:this.showErrors},title:{type:"text_input",label:"Job Title",required:this.requiredCommonFields.title,showErrors:this.showErrors}}},{fields:{locale:{type:"locale",required:!0,showErrors:this.showErrors}}},{numberOfColumns:2,fields:{city:{type:"text_input",label:"City",required:this.requiredCommonFields.city,showErrors:this.showErrors},postalCode:{type:"text_input",label:"Postal/Zip code",required:this.requiredCommonFields.postalCode,showErrors:this.showErrors}}}]}}},async mounted(){this.mapRequiredFields(this.requiredQuestions.requiredCommonFields);const s={...this.requiredFields,...this.additionalFields},e=this.demographics?this.demographics.filter(a=>s["demo_"+a.questionId]):[];this.demoValues=m.mapDemoValues(e,{...this.requiredFields,...this.additionalFields});const r=this.userInfo.consent.GDPR===!0||this.userInfo.consent.CASL===!0;this.commonValues={...this.commonValues,...this.userInfo,locale:{countryCode:this.countryCode,region:this.regionCode??this.region,compliance:r}},this.formKey=Math.random()},methods:{submitForm(){this.showErrors=q(this.errors??{})>0,this.demoFieldInfoErrors()},async handleSubmit(){try{this.processing=!0;const s={...this.commonValues,customerDemographics:this.demoValues};if(this.showErrors)throw new Error("Please correct the issues with this form");const e=await m.updateUserProfile(s);if(e?.error){const r=e.message.includes("Manual Omeda Processing error")?"There were errors updating your account. If this error continues, please contact support.":e.message;throw console.error("Response error: ",e.message),new Error(r)}this.message="Profile updated!",setTimeout(()=>{location.reload()},5e3),this.error=null,this.processing=!1}catch(s){console.log("error",s),this.error=s,this.processing=!1}},updateCommon(s,e,r){this.commonValues[s]=e,this.errors[s]={errorObj:r}},updateDemo(s,e,r){this.demoValues[s]=e,this.errors[s]={errorObj:r}},mapRequiredFields(s){this.commonFieldInfo.rows.forEach(e=>{Object.keys(e.fields).forEach(a=>{const o=s.includes(a);this.requiredCommonFields[a]=o})})},demoFieldInfoErrors(){this.demoFieldInfo.rows.forEach(s=>{for(const e in s.fields)s.fields[e].showErrors=this.showErrors})}}},te={class:"update-profile"},oe={class:"submit"};function re(s,e,r,a,o,n){const f=P,p=N,c=k,_=T;return d(),h("div",te,[i(_,null,{default:b(()=>[e[2]||(e[2]=t("div",{class:"preface"},[t("p",null,"Please take a moment to personalize your account by updating the fields below.")],-1)),i(c,{error:o.error,message:o.message,processing:o.processing,padding:"20px","include-frame":!0},{default:b(()=>[t("form",{onSubmit:e[0]||(e[0]=U((...u)=>n.handleSubmit&&n.handleSubmit(...u),["prevent"]))},[(d(),S(f,{key:o.formKey,class:"common-fields","field-info":n.commonFieldInfo,"field-values":o.commonValues,onUpdate:n.updateCommon},null,8,["field-info","field-values","onUpdate"])),e[1]||(e[1]=t("div",{class:"divider"},null,-1)),i(f,{"field-info":a.demoFieldInfo,"field-values":o.demoValues,onUpdate:n.updateDemo},null,8,["field-info","field-values","onUpdate"]),t("div",oe,[i(p,{label:"Submit",type:"submit",disabled:o.processing,onOnClick:n.submitForm},null,8,["disabled","onOnClick"])])],32)]),_:1},8,["error","message","processing"])]),_:1})])}const ne=Object.assign(y(se,[["render",re],["__scopeId","data-v-adafb09d"]]),{__name:"WebSiteUserProfileForm"}),ie={data(){return{currentSort:"created",currentSortDir:"asc",currentPageFavorites:[],allFavorites:[],page:1,processing:!0,showSocialIcon:!1,getToggleIndex:null}},async mounted(){const e=(await m.getUserInfo())?.favoriteContent??[];if(e.length){const r=await m.getUserFavoriteStreamContent(e.map(a=>a.id));this.allFavorites=r.data.edges.map(a=>{const o=e.find(n=>n.id===a.node.id).created;return{id:a.node.id,name:a.node.name,type:a.contentType,path:a.node?.siteContext?.path??a.node?.alias??`/${a.node.objectID}`,teaser:a.node.teaser,created:$(o),primaryImage:a.node.primaryImage}}),this.currentPageFavorites=this.paginate(this.allFavorites,5,this.page)}this.processing=!1},methods:{sort(s){s===this.currentSort&&(this.currentSortDir=this.currentSortDir==="asc"?"desc":"asc"),this.currentSort=s,this.allFavorites.sort((e,r)=>this.currentSortDir==="asc"?e[this.currentSort].localeCompare(r[this.currentSort]):r[this.currentSort].localeCompare(e[this.currentSort])),this.page=1,this.getPage(1)},getPage(s){this.currentPageFavorites=this.paginate(this.allFavorites,5,s)},paginate(s,e,r){return s.slice((r-1)*e,r*e)},toggleSocialShare(s){this.getToggleIndex=s,this.showSocialIcon=!this.showSocialIcon}}},ae={class:"manage-favorites"},le={key:0},ce={class:"data-table"},de={class:"th-content"},ue={class:"th-content"},me={class:"th-content"},pe={key:0,class:"image"},he=["href"],_e={class:"date"},fe={class:"th-content"},ge={class:"share"},be={class:"popup"},we=["onClick"],ve={key:0,class:"pop-up-text"},ye={class:"pager"},Fe={key:1,class:"no-items"};function Se(s,e,r,a,o,n){const f=O,p=J,c=G,_=Z,u=X;return d(),h("div",ae,[o.allFavorites.length?(d(),h("div",le,[e[6]||(e[6]=t("div",{class:"preface"},[t("p",null,"Revisit your favorite content below, and share with others!")],-1)),t("table",ce,[t("thead",null,[t("tr",null,[t("th",{onClick:e[0]||(e[0]=l=>n.sort("name"))},[t("span",de,[e[3]||(e[3]=E(" Title ",-1)),i(f,{icon:o.currentSort==="name"?o.currentSortDir==="asc"?"mdi:chevron-down":"mdi:chevron-up":"mdi:unfold-more-horizontal"},null,8,["icon"])])]),t("th",{class:"date",onClick:e[1]||(e[1]=l=>n.sort("created"))},[t("span",ue,[e[4]||(e[4]=E(" Date ",-1)),i(f,{icon:o.currentSort==="created"?o.currentSortDir==="asc"?"mdi:chevron-down":"mdi:chevron-up":"mdi:unfold-more-horizontal"},null,8,["icon"])])])])]),t("tbody",null,[(d(!0),h(x,null,D(o.currentPageFavorites,(l,g)=>(d(),h("tr",{key:l},[t("td",null,[t("div",me,[t("div",null,[i(p,{"content-id":l.id},null,8,["content-id"])]),l.primaryImage?.src?(d(),h("div",pe,[i(c,{image:l.primaryImage.src,credit:l.primaryImage?l.primaryImage.credit:"","credit-position":"top","content-type":l.contentType},null,8,["image","credit","content-type"])])):v("",!0),t("div",null,[t("a",{href:l.path},[t("strong",null,F(l.name),1)],8,he),e[5]||(e[5]=t("br",null,null,-1)),E(" "+F(l.teaser),1)])])]),t("td",_e,[t("div",fe,F(l.created),1)]),t("td",ge,[t("div",be,[t("div",{class:"share-arrow",onClick:w=>n.toggleSocialShare(g)},[i(f,{icon:"mdi:share"})],8,we),g===o.getToggleIndex&&o.showSocialIcon===!0?(d(),h("div",ve,[i(_,{"content-id":l.id,title:l.title,path:l.path},null,8,["content-id","title","path"])])):v("",!0)])])]))),128))])]),t("div",ye,[o.allFavorites.length>0?(d(),S(u,{key:JSON.stringify(o.allFavorites),"active-page":o.page,"total-count":o.allFavorites.length,"items-per-page":5,onChangeValue:e[2]||(e[2]=l=>n.getPage(l))},null,8,["active-page","total-count"])):v("",!0)])])):o.processing?v("",!0):(d(),h("div",Fe,[...e[7]||(e[7]=[t("p",null," You have not selected any content favorites yet. To do so, click the star icon to the right of the title on any content page! ",-1)])]))])}const Ee=Object.assign(y(ie,[["render",Se],["__scopeId","data-v-44a21a56"]]),{__name:"WebSiteUserManageContentFavorites"}),Ce={class:"manage-newsletters"},Ie={key:0},xe={class:"templates"},ke={key:0,class:"template"},Ue={class:"template-content"},Pe={class:"toggle"},Ne={class:"overview"},qe={class:"name"},We=["innerHTML"],Te={key:1},Oe={__name:"WebSiteUserManageNewsletterSubscriptions",async setup(s){let e,r;const{$ss:a}=j(),o=B([]),n=([e,r]=z(()=>m.getUserInfo()),e=await e,r(),e);o.value=n?.newsletters??[];async function f(p){if(o.value.includes(p))confirm("Are you sure you wish to opt out from this newsletter?")&&((await m.unsubscribeToNewsletter(p,W.Account)).error?I.error("Newsletter opt out failed. Please try again or contact support for assistance."):(o.value.splice(o.value.indexOf(p),1),I.success("Newsletter opt out successful!")));else{const{query:c}=Q(),_=c?.pk??a.memberships.newsletterPromoCode,u=a.newsletters.enabledNewsletters.find(g=>g.omedaProductId===p);(await m.subscribeToNewsletter(p,u.title,W.Account,_)).error?I.error("Newsletter opt in failed. Please try again or contact support for assistance."):(o.value.push(p),I.success("Newsletter opt in successful!"))}}return(p,c)=>{const _=O;return d(),h("div",Ce,[C(a).newsletters?.enabledNewsletters?(d(),h("div",Ie,[c[0]||(c[0]=t("div",{class:"preface"},[t("p",null," Choose what you want to subscribe to by selecting the box next to the newsletter name. Active subscriptions are pre-checked. To pause your subscription, uncheck the box. ")],-1)),t("div",xe,[(d(!0),h(x,null,D(C(a).newsletters.enabledNewsletters,u=>(d(),h(x,{key:u.omedaProductId},[u.description?(d(),h("div",ke,[t("div",Ue,[t("div",Pe,[i(_,{icon:C(o).includes(u.omedaProductId)?"mdi:checkbox-outline":"mdi:checkbox-blank-outline",width:30,"icon-color":C(o).includes(u.omedaProductId)?"green":"black",onClick:l=>f(u.omedaProductId)},null,8,["icon","icon-color","onClick"])]),t("div",Ne,[t("div",qe,F(u.title),1),t("div",{class:"description",innerHTML:u.description},null,8,We)])])])):v("",!0)],64))),128))])])):(d(),h("div",Te," There are no newsletters currently configured. "))])}}},De=y(Oe,[["__scopeId","data-v-543ce589"]]),Me={data(){return{values:{password:"",newPassword:"",confirmPassword:""},userInfo:null,errors:{},showErrors:!1,processing:!1,error:null,message:null}},computed:{fieldInfo(){return{rows:[{fields:{password:{type:"password",label:"Password",placeholder:"Enter current password",required:!0,maxLength:32,disabled:this.processing,showErrors:this.showErrors,icon:!0},newPassword:{type:"password",label:"New Password",placeholder:"Enter new password",required:!0,maxLength:32,disabled:this.processing,showErrors:this.showErrors,icon:!0,confirmation:{required:!0,placeholder:"Confirm new password",label:"Confirm Password"}}}}]}},submitDisabled(){return!this.values.password||!this.values.newPassword}},async mounted(){this.userInfo=await m.getUserInfo()},methods:{submitForm(){this.showErrors=q(this.errors??{})>0},async handleSubmit(){try{this.processing=!0;const{password:s,newPassword:e}=this.values;if(this.showErrors)throw new Error("Please correct the issues with this form");const r=await m.updatePassword(s,e);if(r.error)throw new Error(r.message);this.message="Your password has been updated",this.processing=!1,window.location="/account"}catch(s){this.error=s,this.processing=!1}},update(s,e,r){this.values[s]=e,this.errors[s]={errorObj:r}}}},Ve={class:"update-password"},Ae={class:"preface"},Le={class:"update-password"},Re={class:"submit"};function $e(s,e,r,a,o,n){const f=A,p=P,c=N,_=k;return d(),h("div",Ve,[t("div",Ae,[e[1]||(e[1]=t("div",null,[t("p",null,"Changing your password will update your password across all Endeavor brand sites.")],-1)),i(f,{"registered-sites":o.userInfo?.registeredSites,class:"registered-sites"},null,8,["registered-sites"])]),t("div",Le,[i(_,{error:o.error,message:o.message,processing:o.processing,padding:"20px","include-frame":!0},{default:b(()=>[t("form",{onSubmit:e[0]||(e[0]=U((...u)=>n.handleSubmit&&n.handleSubmit(...u),["prevent"]))},[i(p,{"field-info":n.fieldInfo,"field-values":o.values,onUpdate:n.update},null,8,["field-info","field-values","onUpdate"]),t("div",Re,[i(c,{label:"Submit",type:"submit",disabled:n.submitDisabled||o.processing,onOnClick:n.submitForm},null,8,["disabled","onOnClick"])])],32)]),_:1},8,["error","message","processing"])])])}const je=Object.assign(y(Me,[["render",$e],["__scopeId","data-v-1978774b"]]),{__name:"WebSiteUserUpdatePasswordForm"}),Be=M(()=>V(()=>import("./WebSystemOutageMessaging-DbgmkouI.mjs"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(s=>s.default||s)),ze={data(){return{values:{username:m.getUserInfo().username,password:"",newUsername:""},errors:{},showErrors:!1,processing:!1,error:null,message:null}},computed:{fieldInfo(){return{rows:[{fields:{password:{type:"password",label:"Password",placeholder:"Enter current password",required:!0,disabled:this.processing,showErrors:this.showErrors,icon:!0},newUsername:{type:"email_input",label:"New Email",placeholder:"Enter new email",required:!0,disabled:this.processing,showErrors:this.showErrors,icon:!0}}}]}},submitDisabled(){return!this.values.password||!this.values.newUsername}},async mounted(){const s=await m.getUserInfo();this.values={...this.values,...s}},methods:{submitForm(){this.showErrors=q(this.errors??{})>0},async handleSubmit(){try{this.processing=!0;const{password:s,newUsername:e}=this.values,r=await m.requestUpdateUsername(s,e);if(r.error)throw new Error(r.message);this.message="You have been sent a link to confirm your new email. Please click the link to complete the process.",this.processing=!1}catch(s){this.error=s,this.processing=!1}},update(s,e,r){this.values[s]=e,this.errors[s]={errorObj:r}}}},Qe={key:1,class:"update-email"},Ye={class:"preface"},Ke={key:0},He={class:"current-email"},Je={class:"submit"};function Ge(s,e,r,a,o,n){const f=Be,p=A,c=P,_=N,u=k;return s.$ss.systemOutage?.disableOmeda?(d(),S(f,{key:0})):(d(),h("div",Qe,[t("div",Ye,[e[1]||(e[1]=t("div",null,[t("p",null,"Changing your email will update your login username across all Endeavor brand sites.")],-1)),i(p,{"registered-sites":o.values.registeredSites,class:"registered-sites"},null,8,["registered-sites"])]),t("div",null,[i(u,{error:o.error,processing:o.processing,message:o.message,padding:"20px","include-frame":!0},{default:b(()=>[o.message?v("",!0):(d(),h("div",Ke,[t("div",He," Current Email: "+F(o.values.username),1),t("form",{onSubmit:e[0]||(e[0]=U((...l)=>n.handleSubmit&&n.handleSubmit(...l),["prevent"]))},[i(c,{"field-info":n.fieldInfo,"field-values":o.values,onUpdate:n.update},null,8,["field-info","field-values","onUpdate"]),t("div",Je,[i(_,{label:"Submit",type:"submit",disabled:n.submitDisabled||o.processing,onOnClick:n.submitForm},null,8,["disabled","onOnClick"])])],32)]))]),_:1},8,["error","processing","message"])])]))}const Ze=Object.assign(y(ze,[["render",Ge],["__scopeId","data-v-7d33f9d9"]]),{__name:"WebSiteUserChangeEmailForm"}),Xe=M(()=>V(()=>import("./WebSystemOutageMessaging-DbgmkouI.mjs"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(s=>s.default||s)),es={data(){return{siteUser:{firstName:"",username:""},hideNewsletterTab:!1,hideEmailTab:!1,missingMemberships:[]}},async mounted(){if(!m.isLoggedIn())window.location="/account/login";else{this.siteUser=await m.getUserInfo();const s=await m.getAccountInfo(this.siteUser);this.missingMemberships=s.missingMemberships,this.hideEmailTab=s.hasPaid,this.hideNewsletterTab=!this.$ss.newsletters?.enabledNewsletters}}},ss={class:"content-title"};function ts(s,e,r,a,o,n){const f=Xe,p=ne,c=H,_=Ee,u=De,l=je,g=Ze,w=ee,L=K,R=T;return s.$ss.systemOutage?.disableOmeda?(d(),S(f,{key:0})):(d(),h("div",{key:1,class:"site-user-account",style:Y({fontFamily:s.$ss.general.primaryFontFamily})},[i(R,null,{default:b(()=>[e[5]||(e[5]=t("div",{class:"title-bar",style:{borderColor:"var(--color-primary-main)"}},[t("div",{class:"consent"},[E(" Your account is subject to Endeavor Business Media's "),t("a",{href:"https://www.endeavorbusinessmedia.com/endeavor-terms",target:"_blank",rel:"noopener"},"Terms of Service"),E(" and "),t("a",{href:"https://www.endeavorbusinessmedia.com/privacy-policy",target:"_blank",rel:"noopener"},"Privacy Policy")])],-1)),i(L,{class:"tabs",orientation:"vertical",color:"#f6f6f6",options:{useUrlFragment:!0}},{default:b(()=>[i(c,{name:"Update Profile",class:"tab",selected:""},{default:b(()=>[t("h2",ss,[t("em",null,"Welcome "+F(o.siteUser.firstName?o.siteUser.firstName:o.siteUser.username)+"!",1)]),i(p)]),_:1}),i(c,{name:"Manage Favorites",class:"tab"},{default:b(()=>[e[0]||(e[0]=t("h2",{class:"content-title"}," Manage Favorites ",-1)),i(_)]),_:1}),i(c,{name:"Manage Newsletters",class:"tab","is-hidden":o.hideNewsletterTab},{default:b(()=>[e[1]||(e[1]=t("h2",{class:"content-title"}," Manage Newsletters ",-1)),i(u)]),_:1},8,["is-hidden"]),i(c,{name:"Change Password",class:"tab"},{default:b(()=>[e[2]||(e[2]=t("h2",{class:"content-title"}," Change Password ",-1)),i(l)]),_:1}),i(c,{name:"Change Email",class:"tab","is-hidden":o.hideEmailTab},{default:b(()=>[e[3]||(e[3]=t("h2",{class:"content-title"}," Change Email ",-1)),i(g)]),_:1},8,["is-hidden"]),o.missingMemberships.length?(d(),S(c,{key:0,name:"Other Memberships",class:"tab"},{default:b(()=>[e[4]||(e[4]=t("h2",{class:"content-title"}," Other Memberships ",-1)),i(w,{memberships:o.missingMemberships,"include-choices":!0},null,8,["memberships"])]),_:1})):v("",!0)]),_:1})]),_:1})],4))}const os=Object.assign(y(es,[["render",ts],["__scopeId","data-v-3faf7b0f"]]),{__name:"WebSiteUserAccount"}),rs={};function ns(s,e){const r=os;return d(),S(r)}const ws=Object.assign(y(rs,[["render",ns]]),{__name:"SiteUserAccountBlock"});export{ws as default};

AltStyle によって変換されたページ (->オリジナル) /