1import{r as v,y as P,z as w,A as N}from"./index-ClmBgQw8.js";const $="ACCOUNT_WEBSITE",x="BUSINESS_PAGE",c="businessPages",I=e=>{const r=localStorage.getItem(c);if(!r)return null;const o=JSON.parse(r).find(n=>n.subdomain===e);return o?{businessPageSettings:o.data,rowVersion:o.rowVersion}:null},B=(e,r)=>{const a=localStorage.getItem(c)||"[]";let o=JSON.parse(a);if(!r){o=o.filter(n=>n.subdomain===e),localStorage.setItem(c,o);return}o.some(n=>n.subdomain===e)?o.forEach(n=>{n.subdomain===e&&(n.data=r.businessPage,n.rowVersion=r.rowVersion)}):o.push({subdomain:e,data:r.businessPage,rowVersion:r.rowVersion});try{localStorage.setItem(c,JSON.stringify(o))}catch(n){console.error(`There was an error while caching Public Access Info (${JSON.stringify(r).length} chars long):`,n.message)}},S=()=>{localStorage.removeItem(c)},F=()=>(v.useEffect(()=>{(async()=>{await P(),S(),w("Success!"),window.location.href=window.location.origin})()},[]),null),T=({templateAndColors:e,defaults:r})=>{var d,b,f,m;const a=document.createElement("link");if(a.rel="stylesheet",a.href=`/css/tenantWebsite/sharedStyle.css?v=${"1.0.136.05-release".replaceAll(".","_")}`,document.head.appendChild(a),e){const t=document.createElement("link");t.rel="stylesheet",t.href=`/css/tenantWebsite/${e.websiteTemplate}.css?v=${"1.0.136.05-release".replaceAll(".","_")}`,document.head.appendChild(t)}const o=N.find(t=>e.websiteTemplate===t.value),n=o.value==="personalPortfolio"?"personal-portfolio":o.value;e.colors.forEach(t=>{if(o){const s=o.colors.find(i=>t.colorOptionName===i.colorOptionName);s&&(s.colorOptionName==="Navbar Thickness"?document.body.style.setProperty(s.varName,`${t.value}px`):s.colorOptionName==="Hover Border Radius"||s.colorOptionName==="Hover Text Underline"?s.colorOptionName==="Hover Border Radius"&&t.value!==null?(document.body.style.setProperty(`--tenant-website-${n}-navbar-primary-hover-radius`,`${t.value}px`),document.body.style.setProperty(`--tenant-website-${n}-navbar-primary-hover-text-underline`,"none")):s.colorOptionName==="Hover Text Underline"&&t.value!==null&&(document.body.style.setProperty(`--tenant-website-${n}-navbar-primary-hover-text-underline`,`${t.value}`),document.body.style.setProperty(`--tenant-website-${n}-navbar-primary-hover-radius`,"0px"),document.body.style.setProperty(`--tenant-website-${n}-header-bg-color-hover`,"none"),document.body.style.setProperty(`--tenant-website-${n}-secondary-bg-color-hover`,"none")):document.body.style.setProperty(s.varName,t.color))}}),(d=e.buttons)==null||d.forEach(t=>{var s;if(o){const i=(s=o.buttons)==null?void 0:s.find(h=>t.colorOptionName===h.colorOptionName);i&&document.body.style.setProperty(i.varName,t.color)}}),(b=e==null?void 0:e.font)==null||b.forEach(t=>{if(o){const s=o.font.find(i=>t.fontOptionName===i.fontOptionName);s&&(s.fontOptionName==="Font Size"||s.fontOptionName==="Secondary Font Size"?document.body.style.setProperty(s.varName,`${t.value}px`):document.body.style.setProperty(s.varName,t.value))}});const u=e.autoAdjustHeaderFont,l=(f=e==null?void 0:e.font)==null?void 0:f.find(t=>t.fontOptionName==="Font Size").value,p=(parseFloat(l)*.9).toFixed(2);u===!0||u===void 0?document.body.style.setProperty(`--tenant-website-${n}-font-size-small`,`${p}px`):document.body.style.setProperty(`--tenant-website-${n}-font-size-small`,`${l}px`),e.pageLayout==="boxed"?(document.body.style.setProperty("--tenant-website-page-layout-width","1200px"),document.body.style.setProperty("--tenant-website-page-layout-margin","0 auto")):(document.body.style.setProperty("--tenant-website-page-layout-width","none"),document.body.style.setProperty("--tenant-website-page-layout-margin","none"));const y=e==null?void 0:e.websiteFontFamily;y&&document.body.style.setProperty("--tenant-website-font-family",y);const g=r.mobileHeaderBackgroundColor||((m=e.colors.find(t=>t.colorOptionName==="Header Background Color"))==null?void 0:m.color);document.body.style.setProperty("--tenant-website-mobile-header-background-color",g)};export{$ as A,x as B,F as R,I as g,T as l,B as s};
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.