1import{r as e,t}from"./standalone-app-Bj-IdwrG.js";import{E as n,_ as r,x as i}from"./institution-DyFDvNu6.js";import{t as a}from"./page-B8YwBOEr.js";import{t as o}from"./phone-CyPjF9av.js";import{_r as s,o as c,vr as l}from"./main-5Sl8yySz.js";import"./jha-progress-CjUOO3no.js";import"./jha-card-DC-UH8vN.js";import"./jha-card-header-D2XWRnD9.js";import{i as u}from"./banno-styles-B3iGgKv1.js";import"./jha-list-UCQUTbOQ.js";import"./bannoweb-page-container-G_uPsQAr.js";import{t as d}from"./observable-models-lit-Conecq5s.js";import{t as f}from"./color-scheme-images-xlieek3s.js";import"./bannoweb-conversations-institution-message-1LMK9hTa.js";var p=48,m;window.BannowebSupportInstitutionContactCardElement=class extends r{static get is(){return`bannoweb-support-institution-contact-card`}static get properties(){return{institution:{type:Object}}}constructor(){super(),this.institution=c.store.institution,this.onResize_=this.onResize.bind(this)}get iframe(){return this.shadowRoot.querySelector(`iframe`)}connectedCallback(){super.connectedCallback(),window.addEventListener(`resize`,this.onResize_)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(`resize`,this.onResize_)}firstUpdated(){this.writeFrameContents_(this.institution.contactHtml)}writeFrameContents_(t){try{this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(t),this.iframe.contentWindow.document.close()}catch(t){e.console.error(t)}finally{window.requestAnimationFrame(()=>{this.resizeIframe()})}}resizeIframe(){let e=this.iframe.contentWindow.document.querySelector(`body`);e.style.padding=`0`,this.iframe.height=e.scrollHeight+p,(e.querySelectorAll(`img`)||[]).forEach(t=>{t.onload=()=>this.iframe.height=e.scrollHeight+p})}onResize(e){clearTimeout(m),m=setTimeout(()=>{this.resizeIframe()},100)}static get styles(){return[n`:host{display:block}iframe{width:100%;min-height:100px}body{background:red;padding:0}`]}render(){return i`<iframe title="${`Institution support message`}" scrolling="no" frameborder="0" sandbox="allow-same-origin allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox"></iframe>`}},customElements.define(window.BannowebSupportInstitutionContactCardElement.is,window.BannowebSupportInstitutionContactCardElement),window.BannowebSupportInstitutionContactCardElement;var h={HEADER:`Support`,CONTACT_CARD_HEADER:`Contact information`,CALL_HEADER:`Call us`,CALL_TEXT:`We're here to help. Give support a call at `,EMAIL_HEADER:`Send an email`,EMAIL_TEXT:`No time to talk now? No problem, send us an email and we will get back to you shortly.`,CONVERSATION_HEADER:`Need help?`,CONVERSATION_TEXT:`Start a conversation and we'll get back to you as soon as we can.`},g=l(f(d(r)),`fadeinup`);window.BannowebSupportPageElement=class extends g{static get is(){return`bannoweb-support-page`}static get properties(){return{institutionMessage:{type:Object},institutionMessageError:{type:Boolean},institution:{type:Object},conversationsController:{type:Object}}}constructor(){super(),t(()=>import(`./jha-icon-phone-Sp_w6FSU.js`),[]),t(()=>import(`./jha-icon-mail-Bod8ToAY.js`),[]),t(()=>import(`./jha-icon-support-BrSS4Z_G.js`),[]),this.institutionMessage=null,this.institutionMessageError=!1,this.institution=c.store.institution,this.conversationsController=c.conversationsController}connectedCallback(){super.connectedCallback(),this.institution.abilities.conversations&&this.loadInstitutionMessage()}async loadInstitutionMessage(){this.institutionMessageError=!1;try{this.institutionMessage=await this.conversationsController.getInstitutionMessage()}catch(t){e.console.log(t),this.institutionMessageError=!0}}async routeEnter(e,t,n,r){return a.setTitleAndTrack(`Support`,s.getRouteUrlWithoutParams(r),n),super.routeEnter(e,t,n,r)}static get styles(){return[u,n`:host{background-size:100%;flex:1 0 auto;display:block;position:relative}.conversations-card{text-align:center;padding-bottom:32px}bannoweb-conversations-institution-message{padding:2px 12px 32px;display:block}jha-list-item{font-size:16px}.sub-title{color:var(--body-text-secondary-color);margin-top:8px;font-size:14px}jha-list-item a{color:var(--body-text-primary-color);text-decoration:none;display:flex}jha-list-item>a>
1.icon{fill:var(--body-text-theme-color);flex-shrink:0;margin-right:20px}jha-list-item>a>div{flex:auto}.progress-container{justify-content:center;align-items:center;height:200px;display:flex}.institution-card{box-sizing:border-box;padding:var(--jha-list-item-vertical-spacing) var(--jha-list-item-horizontal-spacing);text-align:center}img{margin:0 auto}.warning{--jha-button-line-height:15px;text-align:center;margin-bottom:24px;padding:24px 16px 0;font-size:16px}.warning p{margin:16px 0 8px}.warning .sub-title{margin-top:0}jha-icon-support{fill:var(--body-text-theme-color);width:42px;height:42px;margin:0 auto;display:block}.columns{margin:42px 0;display:flex}.columns>div:first-child{flex:7 1 0;margin-right:16px}.columns>div{flex:5 0 0}@media (width<=1200px){.columns>div:first-child,.columns>div{flex:50%}}@media (width<=1024px){.columns{margin-top:18px}}@media (width<=768px){.columns{flex-direction:column;max-width:512px;margin:18px auto}.columns.reverse{flex-direction:column-reverse}.columns>div:first-child{margin:0}}`]}renderConversationsMessage(){return this.institutionMessageError?i`<div class="warning"> <jha-icon-support></jha-icon-support> <p>${h.CONVERSATION_HEADER}</p> <p class="sub-title">${h.CONVERSATION_TEXT}</p> </div>`:this.institutionMessage?i`<bannoweb-conversations-institution-message .institutionMessage="${this.institutionMessage}"></bannoweb-conversations-institution-message>`:i`<div class="progress-container"> <jha-progress></jha-progress> </div>`}renderConversationsCard(){return this.institution.abilities.conversations?i`<jha-card class="conversations-card"> ${this.renderConversationsMessage()} <jha-link-button href="/messages/new?support">${`Send us a message`}</jha-link-button> </jha-card>`:``}renderInstitutionSupportCard(){return this.institution.contactHtml?i`<jha-card class="institution-card"> <img src="${this.logoImage}" alt="${this.institution.name}" height="80"> <bannoweb-support-institution-contact-card .institution="${this.institution}"></bannoweb-support-institution-contact-card> </jha-card>`:``}render(){return i`<bannoweb-page-container heading="${h.HEADER}"> <div class="columns ${this.institution.abilities.conversations?`reverse`:``}"> <div> <jha-card> <jha-card-header> <h1>${h.CONTACT_CARD_HEADER}</h1> </jha-card-header> <jha-list> <jha-list-item inset=""> <a href="tel:${o.toE164(this.institution.phoneNumber)}"> <jha-icon-phone class="icon"></jha-icon-phone> <div> ${`Call us`} <div class="sub-title"> ${h.CALL_TEXT} ${o.formatPhone(this.institution.phoneNumber)}. </div> </div> </a> </jha-list-item> ${this.institution.abilities.conversations?``:i`<jha-list-item inset=""> <a href="mailto:${this.institution.contactEmail}"> <jha-icon-mail class="icon"></jha-icon-mail> <div> ${h.EMAIL_HEADER} <div class="sub-title">${h.EMAIL_TEXT}</div> </div> </a> </jha-list-item>`} </jha-list> </jha-card> ${this.institution.abilities.conversations?this.renderInstitutionSupportCard():``} </div> <div> ${this.renderConversationsCard()} ${this.institution.abilities.conversations?``:this.renderInstitutionSupportCard()} </div> </div> </bannoweb-page-container>`}},customElements.define(window.BannowebSupportPageElement.is,window.BannowebSupportPageElement);var _=window.BannowebSupportPageElement;export{_ as default};
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.