stage '+(n+1)+" of "+p+'
'+t(e.tag)+'
'+s+'
'+t(String(n.name).replace(/\./g,""))+'. — '+t(n.role)+"
"}function L(e){u=e,g(e),y(e),l.offsetWidth,l.classList.add("show")}function w(e){clearTimeout(p),clearTimeout(v),g(e);const t=[...l.querySelectorAll(".bio-quote span")];if(t.length&&l.classList.contains("show")){t.forEach((e,n)=>{e.style.transitionDelay=.0125*(t.length-1-n)+"s",e.style.transitionDuration=".22s",e.style.transitionTimingFunction="cubic-bezier(.33,0,.2,1)"}),l.classList.remove("show");const n=12.5*(t.length-1)+220+200;v=setTimeout(()=>{L(e),b(e)},n)}else L(e),b(e)}function b(e){clearTimeout(p),m||(p=setTimeout(()=>w((e+1)%a().team.length),1e4))}(a().team||[]).forEach((e,n)=>{const s=document.createElement("div");s.className="team-card",s.style.transitionDelay=.15*n+"s",o(s,()=>setTimeout(()=>s.style.transitionDelay="",900)),s.innerHTML=''+t(String(e.name).replace(/\./g,""))+'.
'+t(e.role)+'
“'+t(e.quote)+'”
— '+t(e.role)+"
“'+t(e.quote)+'”
'+t(e.name)+" — "+t(e.role)+"
",s=Math.max(s,n.offsetHeight)}),n.remove(),l.style.minHeight=s+"px"};requestAnimationFrame(M);let E=null;addEventListener("resize",()=>{clearTimeout(E),E=setTimeout(M,150)}),o(d,()=>{d.classList.add("in"),h||(h=!0,w(0))},.3),new IntersectionObserver(e=>{e[0].isIntersecting?h&&u>=0&&(clearTimeout(p),p=setTimeout(()=>w((u+1)%a().team.length),1e4)):clearTimeout(p)},{threshold:.05}).observe(d)}(),A(),H(),function(){const n=a().creed,s=e("#creedSec");if(!n||!n.body||!n.body.length)return void(s.style.display="none");s.style.display="",e("#creedBody").innerHTML=n.body.map(e=>""+t(e)+"
").join(""),o(e("#creedHead"),()=>e("#creedHead").classList.add("in"),.6),document.querySelectorAll("#creedBody p").forEach((e,t)=>o(e,()=>setTimeout(()=>e.classList.add("in"),90*t),.3));const i=e(".creed-title",s);if(i&&(i.addEventListener("mouseenter",()=>s.classList.add("lit")),i.addEventListener("mouseleave",()=>s.classList.remove("lit"))),matchMedia("(pointer: coarse)").matches){let t=null;e("#creedHead").addEventListener("touchstart",()=>{s.classList.remove("press"),s.offsetWidth,s.classList.add("press"),clearTimeout(t),t=setTimeout(()=>s.classList.remove("press"),2300)},{passive:!0})}}(),function(){const n=a().begin||{},s=a().footer||{},i=n.email||s.email||"paul@manicsky.com",r=s.phone||"(480) 201-9085",l=e=>String(e).split(/(?=[@ ])/).map(e=>""+t(e)+"").join("");e("#brMail").innerHTML=l(i),e("#brPhone").innerHTML=l(r);const c=(t,n)=>{const s=e(t),o=e(n),a=[...o.querySelectorAll("span")];let i=!1;const r=()=>{a.forEach((e,t)=>e.style.transitionDelay=.05*t+"s"),o.classList.add("on")},l=()=>{a.forEach((e,t)=>e.style.transitionDelay=.05*(a.length-1-t)+"s"),o.classList.remove("on")};return s.addEventListener("mouseenter",()=>{i||r()}),s.addEventListener("mouseleave",()=>{i||l()}),s.addEventListener("click",()=>{s._press?s._press():(i=!i,i?r():l()),s.classList.remove("pop"),s.offsetWidth,s.classList.add("pop")}),{show:()=>{i=!0,r()},hide:()=>{i=!1,l()}}},d=c("#bwMail","#brMail"),u=c("#bwPhone","#brPhone");e("#beginBtn").onclick=()=>{e("#brMail").classList.contains("on")?(d.hide(),u.hide()):(d.show(),u.show())},["mouseenter","focus","click"].forEach(t=>e("#beginBtn").addEventListener(t,()=>e("#beginWays").classList.add("in")));const p=()=>{e("#beginWays").classList.add("in"),setTimeout(()=>{d.show(),u.show()},520)};window.MSBEGINSHOW=p,o(e("#beginSec"),p,.3),matchMedia("(pointer: coarse)").matches&&(e("#bwMail")._press=()=>{R(i),j("email copied.","mailto:"+i,"open mail")},e("#bwPhone")._press=()=>{R(r),j("number copied.","tel:"+r.replace(/[^+0-9]/g,""),"call")})}(),function(){const t=e("#rail");t.innerHTML="";const n=[];let s=-1;function o(e){n.forEach(([,t],n)=>t.classList.toggle("on",n===e))}function a(){if(s>=0)return void o(s);const e=scrollY+innerHeight/2;let t=0,a=1e9;n.forEach(([n],s)=>{if(!n)return;const o=n.getBoundingClientRect(),i=o.top+scrollY+o.height/2,r=Math.abs(i-e);r=document.body.scrollHeight-4&&(t=n.length-1),o(t)}[[null,"home"],["#journeySec","process"],["#teamSec","us"],["#groupHost","portfolio"],["#gallerySec","stills"],["#creedSec","creed"],["#beginSec","begin"]].forEach(([a,i])=>{const r=a?e(a):null;if(a&&!r)return;const l=document.createElement("button");l.type="button",l.innerHTML=''+i+".";const c=n.length,d=e=>{e.preventDefault(),s=c,o(c);let t=0;r&&(t=r.getBoundingClientRect().top+scrollY-Math.round(innerHeight/8),t=Math.max(0,Math.min(t,document.body.scrollHeight-innerHeight))),"begin"===i&&(t=document.body.scrollHeight),_(t)};l.addEventListener("pointerdown",d),l.addEventListener("click",d),t.appendChild(l),n.push([r,l])}),["wheel","touchstart","keydown"].forEach(e=>addEventListener(e,e=>{(!e||"ArrowUp"!==e.key&&"ArrowDown"!==e.key)&&s>=0&&(s=-1,a())},{passive:!0}));const i=e(".frame");let r=null;const l=n=>{if(n&&(t.style.transition="opacity 0.5s cubic-bezier(0.33, 0, 0.2, 1)",clearTimeout(r),r=setTimeout(()=>{t.style.transition="none"},560)),e("#pipBack").classList.contains("open")||e("#csBack").classList.contains("open"))return t.style.opacity="0",void(t.style.pointerEvents="none");const s=document.querySelector("#groupHost.perfopen .stage.open");if(s){const e=s.getBoundingClientRect();if(e.bottom>.25*innerHeight&&e.top<.75*innerHeight)return t.style.opacity="0",void(t.style.pointerEvents="none")}let o=1;if(i){const e=innerHeight/2-(t.offsetHeight||156)/2-8-i.getBoundingClientRect().bottom;o=Math.max(0,Math.min(1,e/150))}o=Math.min(o,Math.max(0,Math.min(1,(scrollY-24)/150))),t.style.opacity=o.toFixed(3),t.style.pointerEvents=o>.05?"auto":"none"};addEventListener("keydown",t=>{if("ArrowUp"!==t.key&&"ArrowDown"!==t.key)return;if(t.repeat)return;if(e("#pipBack").classList.contains("open")||e("#csBack").classList.contains("open")||document.querySelector("#groupHost.perfopen"))return;const s=n.findIndex(([,e])=>e.classList.contains("on"));if(s<0)return;t.preventDefault();const o=Math.max(0,Math.min(n.length-1,s+("ArrowDown"===t.key?1:-1)));o!==s&&n[o][1].dispatchEvent(new Event("pointerdown"))}),addEventListener("scroll",()=>l(!1),{passive:!0}),addEventListener("resize",()=>l(!1)),window.MSRAIL=()=>l(!0),l(!1),addEventListener("scroll",a,{passive:!0}),a()}()},heroGo:E}}();