PageSourceSearch

https://mytrove.co.nz/mobile-menu.js

js mytrove.co.nz collected 2026-10-06 16:48:29 UTC 9,269 bytes, 1 lines download raw bytes

1(function(){var E=1180;function j(){if(!document.getElementById("mm-style")){var e=document.createElement("style");e.id="mm-style",e.textContent="@media (max-width:"+E+"px){header nav.mm-desktop,header>div:last-child nav{display:none !important;}.mm-burger{display:inline-flex !important;}}@media (min-width:"+(E+1)+"px){.mm-burger{display:none !important;}.mm-drawer-root{display:none !important;}}.mm-drawer-root{position:fixed;inset:0;z-index:200;}.mm-overlay{position:absolute;inset:0;background:rgba(16,49,60,0.55);opacity:0;transition:opacity .25s ease;}.mm-panel{position:absolute;top:0;right:0;height:100%;width:min(86%,360px);background:#fff;box-shadow:-8px 0 40px rgba(16,49,60,0.25);transform:translateX(100%);transition:transform .28s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;}.mm-drawer-root.mm-open{}.mm-drawer-root.mm-open .mm-overlay{opacity:1;}.mm-drawer-root.mm-open .mm-panel{transform:translateX(0);}",document.head.appendChild(e)}}var q='<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',N='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',O='<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg>',U='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg>';function D(e){var n=e.getAttribute("href")||"",a=(e.textContent||"").trim().toLowerCase();return/notify\/deceased/.test(n)||a==="start now"}function G(){try{var e=decodeURIComponent(location.pathname);return e.substring(e.lastIndexOf("/")+1)}catch{return""}}function V(e){var n=(e||"").split("#")[0].split("?")[0];return decodeURIComponent(n.substring(n.lastIndexOf("/")+1))}function W(e){return(e||"").indexOf("#")!==-1}function X(e){if(e.__mm)return;var n=e.querySelector("nav");if(!n)return;for(var a=n.parentElement,C=document.body.querySelectorAll(".mm-burger, .mm-drawer-root"),A=0;A<C.length;A++){var p=C[A];try{p.parentNode&&p.parentNode.contains(p)&&p.parentNode.removeChild(p)}catch{}}e.__mm=!0,j(),n.classList.add("mm-desktop");var s=document.createElement("button");s.className="mm-burger",s.setAttribute("aria-label","Open menu"),s.style.cssText="position:fixed;top:0;left:0;display:none;align-items:center;justify-content:center;width:46px;height:46px;border:none;background:transparent;cursor:pointer;color:#1B4168;flex-shrink:0;padding:0;z-index:190;",s.innerHTML=q,document.body.appendChild(s);function m(){var t=a.getBoundingClientRect(),i=window.getComputedStyle(a),o=parseFloat(i.paddingRight)||16;s.style.top=Math.round(t.top+t.height/2-23)+"px",s.style.left=Math.round(t.right-46-Math.max(o-6,2))+"px"}if(m(),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),window.ResizeObserver)try{new ResizeObserver(m).observe(a)}catch{}var Q=setInterval(m,400),r=document.createElement("div");r.className="mm-drawer-root",r.style.display="none";var L=document.createElement("div");L.className="mm-overlay";var f=document.createElement("div");f.className="mm-panel";var g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #EEEEEE;flex-shrink:0;";var _=e.querySelector("img"),K=_?_.getAttribute("src"):"assets/mytrove-logo.png";g.innerHTML='<a href="/" style="display:flex;align-items:center;"><img src="'+K+'" alt="myTrove" style="height:34px;width:auto;display:block;"></a>';var u=document.createElement("button");u.setAttribute("aria-label","Close menu"),u.style.cssText="display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:none;background:transparent;cursor:pointer;color:#1B4168;padding:0;",u.innerHTML=N,g.appendChild(u),f.appendChild(g);var c=document.createElement("nav");c.style.cssText="display:flex;flex-direction:column;padding:10px 0;overflow-y:auto;flex:1;";var H=[].slice.call(n.querySelectorAll("a")),B=G(),S=null,T=B==="",x=document.createElement("a");x.href="/",x.textContent="Home",x.style.cssText="display:block;padding:15px 24px;font-size:17px;font-weight:"+(T?"700":"600")+";color:"+(T?"#23B2AD":"#1B4168")+";font-family:var(--font-sans,'Roboto',sans-serif);border-bottom:1px solid #F3F1F1;text-decoration:none;"+(T?"border-left:3px solid #23B2AD;padding-left:21px;background:rgba(35,178,173,0.06);":""),x.addEventListener("click",l),c.appendChild(x),H.forEach(function(t){if(!(t.closest&&t.closest("details.mt-signin"))){if(D(t)){S=t;return}var i=document.createElement("a");i.href=t.getAttribute("href"),i.textContent=(t.textContent||"").trim();var o=B&&V(t.getAttribute("href"))===B&&!W(t.getAttribute("href"));i.style.cssText="display:block;padding:15px 24px;font-size:17px;font-weight:"+(o?"700":"600")+";color:"+(o?"#23B2AD":"#1B4168")+";font-family:var(--font-sans,'Roboto',sans-serif);border-bottom:1px solid #F3F1F1;text-decoration:none;"+(o?"border-left:3px solid #23B2AD;padding-left:21px;background:rgba(35,178,173,0.06);":""),i.addEventListener("click",l),c.appendChild(i)}});var J=H.some(function(t){return/Contact Us/i.test(t.getAttribute("href")||"")});if(!J){var h=document.createElement("a");h.href="contact-us.html",h.textContent="Contact Us",h.style.cssText="display:block;padding:15px 24px;font-size:17px;font-weight:600;color:#1B4168;font-family:var(--font-sans,'Roboto',sans-serif);border-bottom:1px solid #F3F1F1;text-decoration:none;",h.addEventListener("click",l),c.appendChild(h)}var M=[].slice.call(e.querySelectorAll("details.mt-signin div a"));if(M.length){var b=document.createElement("div");b.style.cssText="border-bottom:1px solid #F3F1F1;";var d=document.createElement("button");
1d.type="button",d.setAttribute("aria-expanded","false"),d.style.cssText="width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 24px;background:transparent;border:none;cursor:pointer;font-size:17px;font-weight:600;color:#1B4168;font-family:var(--font-sans,'Roboto',sans-serif);text-align:left;";var I=document.createElement("span");I.textContent="Sign In";var w=document.createElement("span");w.style.cssText="display:inline-flex;align-items:center;transition:transform .22s ease;color:#1B4168;",w.innerHTML=U,d.appendChild(I),d.appendChild(w);var v=document.createElement("div");v.style.cssText="overflow:hidden;max-height:0;transition:max-height .28s ease;background:#FAFAFA;",M.forEach(function(t){var i=t.querySelector("span")?t.querySelector("span").textContent.trim():(t.textContent||"").trim(),o=document.createElement("a");o.href=t.getAttribute("href"),o.textContent=i,o.style.cssText="display:block;padding:13px 24px 13px 40px;font-size:15px;font-weight:500;color:#1B4168;text-decoration:none;font-family:var(--font-sans,'Roboto',sans-serif);border-top:1px solid #EEEEEE;",o.addEventListener("click",l),v.appendChild(o)});var y=!1;d.addEventListener("click",function(){y=!y,v.style.maxHeight=y?v.scrollHeight+"px":"0",w.style.transform=y?"rotate(180deg)":"none",d.setAttribute("aria-expanded",y?"true":"false")}),b.appendChild(d),b.appendChild(v),c.insertBefore(b,c.firstChild)}f.appendChild(c);var R=document.createElement("div");R.style.cssText="padding:16px 24px 22px;border-top:1px solid #EEEEEE;flex-shrink:0;";var F=S?S.getAttribute("href"):"https://app.mytrove.co.nz/notify/deceased";window.mtAppUrl&&(F=window.mtAppUrl(F)),R.innerHTML='<a href="'+F+`" style="display:flex;align-items:center;justify-content:center;gap:9px;min-height:52px;padding:12px 16px;background:#1B4168;color:#fff;border-radius:999px;font-size:13.5px;font-weight:600;letter-spacing:1.1px;text-transform:uppercase;text-decoration:none;font-family:var(--font-sans,'Roboto',sans-serif);line-height:1.3;text-align:center;">Start now `+O+"</a>",f.appendChild(R),r.appendChild(L),r.appendChild(f);try{document.body.appendChild(r)}catch{}function P(){r.style.display="block",r.offsetWidth,r.classList.add("mm-open"),document.body.style.overflow="hidden"}function l(){r.classList.remove("mm-open"),document.body.style.overflow="",setTimeout(function(){r.classList.contains("mm-open")||(r.style.display="none")},300)}s.addEventListener("click",P),u.addEventListener("click",l),L.addEventListener("click",l),window.addEventListener("keydown",function(t){t.key==="Escape"&&l()}),window.addEventListener("resize",function(){window.innerWidth>E&&l()})}function k(){try{for(var e=document.querySelectorAll("header"),n=0;n<e.length;n++)X(e[n])}catch{}}function z(){if(!window.__mmStarted){window.__mmStarted=!0,k();var e=new MutationObserver(function(){try{k()}catch{}});e.observe(document.body,{childList:!0,subtree:!0});var n=0,a=setInterval(function(){k(),++n>12&&clearInterval(a)},250)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",z):z()})();

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.