1const createNavigationRail=e=>{if(!isNullOrEmpty(e)||device.desktop()&&e.parent){const t=generateUniqueId();let a="",n=null;if(isDesktopDevice()){a=getDesktopNavigationRailHtml(t),appendToParent(e.parent,a),createPanelStructure(document.getElementById(`railMainSection${t}`),e);const n=document.querySelector(".nav-rail__subsection");n.addEventListener("animationend",(()=>{n.classList.contains("show-rail")})),document.body.classList.add("overflow-h")}else a=getMobileNavigationDrawerHtml(t,e.drawerLogoClick),document.body.insertAdjacentHTML("beforeend",a),createPanelStructure(document.getElementById(`railMainSection${t}`),e),isNullOrEmpty(e.postBtn)||e.postBtn?createPostButton($("#drawerPostButton")):($("#drawerPostButton").remove(),$(".subsection-container").css({maxHeight:"calc(100% - 56px)",paddingBottom:device.mobile()?"40px":"48px"})),n=initializeMobileDrawer(t),setupDrawerListeners(n);return device.desktop()&&$("#mdc-header-section-left .nav-menu").parent().addClass("bg-anti-flash-white"),$("#divLoader").remove(),setTimeout((()=>{$("#navigation-left-menu").css("width","unset").removeClass("mdc-hide")}),1e3),{navigationRail:()=>toggleNavigationRail(n)}}},getDesktopNavigationRailHtml=e=>`\n <aside id="navRail${e}" class="nav-rail">\n <div>\n <div class="flex flex-direction-row">\n <div id="railMainSection${e}" class="nav-rail__main-section bg-anti-flash-white" style="padding-top:20px;"></div>\n <div class="nav-rail__subsection show-rail bg-ultra-light-gray"></div>\n </div>\n </div>\n </aside>`,getMobileNavigationDrawerHtml=(e,t)=>
1`\n <div>\n <aside id="drawerNav${e}" class="mdc-drawer mdc-drawer--modal ht-per-100 bg-ultra-light-gray">\n <div class="mdc-drawer__content">\n <nav class="ht-per-100" id="drawerNavList${e}">\n <div class="flex flex-direction-column seller-nav-pad" style="min-height: 100%; height: 100%;" id="homeSection${e}">\n <div class="mdc-typography--border-bottom justify-content-start ht-56 display-flex-center">\n ${!isNullOrEmpty(t)&&t&&`<a href="${GetRootURL()}">`}\n <img class="drawer-logo" title="Trepup" src="${cdnOneFilePath}images/trepup-logo-new.svg" alt="Trepup">\n ${!isNullOrEmpty(t)&&t&&"</a>"}\n </div>\n <div class="subsection-container flex-grow overflow-h">\n <div class="flex flex-direction-column">\n <div id="railMainSection${e}"></div>\n </div>\n </div>\n <div id="drawerPostButton" class="${device.desktop()?"top-bottom-pad":"pad-16"}"></div>\n </div>\n </nav>\n </div>\n </aside>\n <div class="mdc-drawer-scrim"></div>\n </div>`,appendToParent=(e,t)=>{if(e instanceof HTMLElement)e.insertAdjacentHTML("beforeend",t);else if("string"==typeof e){const a=document.querySelector(e);a&&a.insertAdjacentHTML("beforeend",t)}},initializeMobileDrawer=e=>mdc.drawer.MDCDrawer.attachTo(document.getElementById(`drawerNav${e}`)),setupDrawerListeners=e=>{e&&(e.listen("MDCDrawer:opened",(()=>{lockDrawer()})),e.listen("MDCDrawer:closed",(()=>{unlockDrawer()})))},setupDropdownListeners=e=>{const t=e.currentTarget.getAttribute("data-index-parent");if(t&&!$(e.target).hasClass("panel-sub")){const a=document.querySelector(`#nav-rail__subsection--mobile${t} .subsection-holder-mobile`),n=a.classList.contains("subsection--open");document.querySelectorAll(".subsection--open").forEach((e=>{e.classList.add("subsection--closed"),e.classList.remove("subsection--open")})),document.querySelectorAll(".subsection-dd-element").forEach(((e,t)=>{const a=document.querySelector(`[data-index-parent="${t}"]`);a&&(a.classList.contains("bg-bright-sky-blue")||(e.classList.remove("icon-modern-gray"),e.classList.add("icon-spanish-gray")))})),document.querySelectorAll(".subsection-icons").forEach(((e,t)=>{const a=document.querySelector(`[data-index-parent="${t}"]`);a&&(a.classList.contains("bg-bright-sky-blue")||(e.classList.remove("material-symbols-rounded-filled","icon-modern-gray"),e.classList.add("icon-spanish-gray")))})),document.querySelectorAll(".subsection-titles").forEach(((e,t)=>{const a=document.querySelector(`[data-index-parent="${t}"]`);a&&(a.classList.contains("bg-bright-sky-blue")||(e.classList.remove("text-primary"),e.classList.add("text-secondary")))})),document.querySelectorAll(".subsection-dd-open").forEach(((e,t)=>{const a=document.querySelector(`[data-index-parent="${t}"]`);a&&(a.classList.contains("bg-bright-sky-blue")||(e.classList.add("subsection-dd--closed"),e.classList.remove("subsection-dd-open"),e.setAttribute("aria-expanded","false")))}));const s=a.querySelector(".nav-rail__subpanel-sections");let i=0;i=s.querySelector("ul")?s.querySelector("ul").children.length:s.children.length,document.documentElement.style.setProperty("--subsectionheight",`${s.querySelector("ul")?s.querySelector("ul").offsetHeight:i*(device.mobile()?56:64)}px`);const o=e.currentTarget;n?(o.classList.add("subsection-dd-close"),o.classList.remove("icon-modern-gray","subsection-dd-open"),o.setAttribute("aria-expanded","false"),o.querySelector(".subsection-icons")&&(o.querySelector(".subsection-icons").classList.remove("material-symbols-rounded-filled","icon-modern-gray"),o.querySelector(".subsection-icons").classList.add("icon-spanish-gray")),o.querySelector(".subsection-titles").classList.remove("text-primary"),o.querySelector(".subsection-titles").classList.add("text-secondary"),o.querySelector(".subsection-dd-element").classList.remove("icon-modern-gray"),o.querySelector(".subsection-dd-element").classList.add("icon-spanish-gray"),a.classList.add("subsection--closed"),a.classList.remove("subsection--open")):(o.classList.add("subsection-dd-open"),o.classList.remove("subsection-dd-close"),o.setAttribute("aria-expanded","true"),o.querySelector(".subsection-icons")&&(o.querySelector(".subsection-icons").classList.remove("icon-spanish-gray"),o.querySelector(".subsection-icons").classList.add("material-symbols-rounded-filled","icon-modern-gray")),o.querySelector(".subsection-titles").classList.remove("text-secondary"),o.querySelector(".subsection-titles").classList.add("text-primary"),o.querySelector(".subsection-dd-element").classList.add("icon-modern-gray"),o.querySelector(".subsection-dd-element").classList.remove("icon-spanish-gray"),a.classList.add("subsection--open"),a.classList.remove("subsection--closed"))}},lockDrawer=()=>{setMaxZId(".mdc-drawer-scrim"),setMaxZId(".mdc-drawer"),document.body.classList.add("mdc-dialog-scroll-lock","overflow-h"),preventScroll()},unlockDrawer=()=>{document.body.classList.remove("overflow-h","mdc-dialog-scroll-lock"),removeScrollPrevention(),updateMenuTitle(!1)},preventScroll=()=>{document.body.addEventListener("scroll",preventDefault,{passive:!1}),document.body.addEventListener("wheel",preventDefault,{passive:!1})},removeScrollPrevention=()=>{document.body.removeEventListener("scroll",preventDefault),document.body.removeEventListener("wheel",preventDefault)},preventDefault=e=>{e.preventDefault()},updateMenuTitle=e=>{const t=document.querySelector(".nav-menu__icon")?.parentElement;t&&t.setAttribute("title",e?"Hide main menu":"Show main menu")},toggleNavigationRail=e=>{isDesktopDevice()?toggleDesktopRail():e&&(e.open=!e.open)},toggleDesktopRail=()=>{const e=document.querySelector(".nav-rail__subsection"),t=document.querySelector(".nav-menu__icon")?.parentElement;e&&t&&(e.classList.contains("hide-rail")?(e.classList.replace("hide-rail","show-rail"),t.setAttribute("title","Hide main menu"),t.classList.replace("hide-rail","show-rail")):(e.classList.replace("show-rail","hide-rail"),t.setAttribute("title","Show main menu"),t.classList.replace("show-rail","hide-rail")))},isDesktopDevice=()=>device.desktop(),generateUniqueId=()=>UniqueID(),isNullOrEmpty=e=>
1null==e||""===e,createPostButton=e=>{CreateButton({seotitle:"Create post",parent:e,title:"Create post",type:"contained",size:"fill",callback:()=>window.location.href=`${GetRootURL()}admin/store/${extractCodesFromSSIN(document.getElementById("hfSSIN").value)}/posts/new-post`})},createPanelStructure=(e,t)=>{t.panelData=isNullOrEmpty(t.panelData)?[]:t.panelData,t.panelData.forEach(((t,a)=>{const n=t.isSelected||t.subsection&&t.subsection.some((e=>e.isSelected));isDesktopDevice()?(createDesktopPanelSection(e,t,a,n),n&&createPanelSubsection(".nav-rail__subsection",t)):createMobilePanelSection(e,t,a,n)})),setPanelClickListeners(t)},createDesktopPanelSection=(e,t,a,n)=>{const s=`\n <div data-index-parent="${a}" class="rail-panel__parent">\n <div data-href="${t.href}" class="flex-direction-column rail-panel ${n?"rail-panel--selected":""} cur-pot">\n <div id="icon-container-${a}" data-index="${a}" class="rail-icon__container box-32 bor-rad-50 display-flex-justify-center ${n?"rail-panel--selected":""}">\n <span class="material-symbols-rounded size-24 ${n?"material-symbols-rounded-filled":""}">\n ${t.leadIcon}\n </span>\n </div>\n <span class="panel-title mar-t-4">${t.title}</span>\n </div>\n </div>`;e.insertAdjacentHTML("beforeend",`<div class="rail__container mar-b-12">${s}</div>`),CreateRipple({elementID:`#icon-container-${a}`})},createMobilePanelSection=(e,t,a,n)=>{let s=null;localStorage.getItem("storeProfileDetails")&&(s=JSON.parse(localStorage.getItem("storeProfileDetails")).storeDetails);const i=`\n <div data-index-parent="${a}" class="rail-panel__parent ${device.desktop()?"mar-b-10":""} mdc-typography--border-radius ${device.desktop()||!n||t.subsection?"":"bg-bright-sky-blue"} ${n?"subsection-dd-open":"subsection-dd-close"}" id="subsection-dd-${a}" aria-expanded="${n?"true":"false"}" aria-controls="subsection-dd-1">\n <div data-href="${t.href}" class="flex-direction-row left-right-pad mdc-typography--border-radius rail-panel--mobile cur-pot align-items-center" id="rail-panel--mobile-${a}"}>\n <div class="rail-panel__section--mobile display-flex flex-direction-row align-items-center w-per-100">\n <div data-index="${a}" class="rail-icon__container box-24 display-flex-justify-center">\n ${"status"===t.type?`<div class="box-12 bor-rad-50 ${s&&s.connectivitystatus?"bg-vibrant-green":"bg-scarlet-red"}"></div>`:"svg"===t.type?`<img class="box-24" src="${t.leadIcon}"/>`:`<span class="subsection-icons material-symbols-rounded size-24 ${n?"icon-modern-gray material-symbols-rounded-filled":"icon-spanish-gray"}">\n ${t.leadIcon}\n </span>`}\n </div>\n <span class="subsection-titles ${n?"text-primary":"text-secondary"} mdc-typography--body1--medium mar-l-8 flex-grow" style="line-height: unset;">\n ${"status"===t.type?s&&s.connectivitystatus?"Active":"Unavailable":t.title}\n </span>\n </div>\n ${t.subsection?`\n <div data-index="${a}" class="box-48 display-flex-justify-center">\n <span class="material-symbols-rounded subsection-dd-element size-24 ${n?"icon-modern-gray":"icon-spanish-gray"}">keyboard_arrow_down</span>\n </div>`:"Inbox"===t.title?'\n <div class="box-48 pad-l-16 pad-r-16 display-flex-justify-center cur-pot-none"><div class="seller-notification-container display-flex-justify-center mdc-typography--body2 text-true-white"></div>':""}</div>\n </div>\n <div id="nav-rail__subsection--mobile${a}" class="display-flex flex-direction-column"></div>\n </div>\n ${t.border?`<div class="ht-1 w-per-100 bg-light-gray ${t.extraSpace||t.noBorderSpace?"":"mar-b-8"}"></div>`:""}`;e.insertAdjacentHTML("beforeend",`<div class="rail__container ${t.extraBottomSpace?"mar-b-16":"mar-b-8"} ${t.extraSpace?"mar-t-16":""}">${i}</div>`),isNullOrEmpty(t.clickable)||t.clickable?CreateRipple({elementID:`#rail-panel--mobile-${a}`}):$(`#rail-panel--mobile-${a}`).addClass("bg-anti-flash-white"),t.subsection&&(document.getElementById(`subsection-dd-${a}
1`).addEventListener("click",setupDropdownListeners),createPanelSubsectionMobile(`#nav-rail__subsection--mobile${a}`,t,n))},setPanelClickListeners=e=>{isDesktopDevice()?(document.querySelectorAll(".rail-panel").forEach((e=>{e.addEventListener("click",(()=>{e.dataset.href&&(window.location.href=e.dataset.href)}))})),document.querySelectorAll(".rail-panel__parent").forEach((t=>{t.addEventListener("mouseenter",(t=>{$($(t.currentTarget).find(".rail-panel")).hasClass("rail-panel--selected")||handlePanelHover(t,e)})),t.addEventListener("mouseleave",(e=>{removeHoveredPanel(e)}))}))):document.querySelectorAll(".rail-panel__section--mobile").forEach((e=>{e.parentNode.addEventListener("click",(()=>{"undefined"!==e.parentNode.dataset.href&&(window.location.href=e.parentNode.dataset.href)}))}))},handlePanelHover=(e,t)=>{const a=e.target.dataset.index||e.target.querySelector(".rail-icon__container").dataset.index,n=document.querySelector(`[data-index-parent="${a}"]`);if(n&&!n.querySelector(".nav-rail--hovered")){createHoveredPanel(t.panelData[parseInt(a)],n);const s=e.target.getBoundingClientRect().top;document.querySelector(".nav-rail--hovered-pointer").style.top=`${s+12}px`,document.querySelector(".nav-rail--hovered-pointer-border").style.top=`${s+11}px`,calculateHoverdPosition(s)}},calculateHoverdPosition=e=>{const t=e,a=window.innerHeight-e,n=document.getElementsByClassName("nav-rail--hovered")[0].getBoundingClientRect().height,s=n/2;e>s+$("header").height()&&a>s?(document.getElementsByClassName("nav-rail--hovered")[0].style.top=t-s+3+"px",document.getElementsByClassName("nav-rail--hovered")[0].style.bottom="unset"):e<s+$("header").height()?(document.getElementsByClassName("nav-rail--hovered")[0].style.top=$("header").height(),document.getElementsByClassName("nav-rail--hovered")[0].style.bottom="unset"):a<s?(document.getElementsByClassName("nav-rail--hovered")[0].style.top="unset",document.getElementsByClassName("nav-rail--hovered")[0].style.bottom="16px"):(document.getElementsByClassName("nav-rail--hovered")[0].style.top=t-s+"px",document.getElementsByClassName("nav-rail--hovered")[0].style.bottom="unset"),document.getElementsByClassName("nav-rail__subpanel")[0].style.height=`${n}px`},createHoveredPanel=(e,t)=>{t.insertAdjacentHTML("beforeend",'\n <div class="nav-rail--hovered mdc-typography--border mdc-typography--border-radius bg-true-white">\n <div class="nav-rail--hovered-pointer"></div>\n <div class="nav-rail--hovered-pointer-border"></div>\n </div>'),createPanelSubsection(".nav-rail--hovered",e,"hovered"),setMaxZId(".navigation-left-menu"),setMaxZId(".nav-rail--hovered")},removeHoveredPanel=e=>{const t=e.currentTarget.querySelector(".nav-rail--hovered");t&&t.remove()},updateConnectivityStatusStore=(e,t)=>{CallAjaxRequest("PUT","user/updateuserconnectivitystatus",{ucnum:e,entityType:2,connectivityStatus:t},(e=>{if(IsNullOrEmpty(e)||IsNullOrEmpty(e.code)||200!=e.code)return void ShowSnackbar({title:snackbarErrorMessage});let a=JSON.parse(localStorage.getItem("storeProfileDetails"));if(a){a.storeDetails.connectivitystatus=t,localStorage.setItem("storeProfileDetails",JSON.stringify(a)),t?(document.querySelectorAll(".subsection-titles")[0].textContent="Active",document.querySelectorAll(".rail-icon__container")[0].querySelectorAll("div")[0].classList.add("bg-vibrant-green"),document.querySelectorAll(".rail-icon__container")[0].querySelectorAll("div")[0].classList.remove("bg-scarlet-red")):(document.querySelectorAll(".subsection-titles")[0].textContent="Unavailable",document.querySelectorAll(".rail-icon__container")[0].querySelectorAll("div")[0].classList.add("bg-scarlet-red"),document.querySelectorAll(".rail-icon__container")[0].querySelectorAll("div")[0].classList.remove("bg-vibrant-green"));const e=document.getElementById("chatIF");e&&e.contentWindow.postMessage({type:"updateEntityStatus",status:t,entityCodeNum:a.storeDetails.nstoreID,entityType:2},chatIframePath);try{for(let e=0;e<openChats.length;e++){document.getElementById(openChats[e]).contentWindow.postMessage({type:"changeConnectivityStatus",status:t},chatIframePath)}updateChatConnectivityStatus("senderProfileDetails",t)}catch(e){}
1createStatusSubsectionMobile("#nav-rail__subpanel-status",!0)}}),(e=>{ShowSnackbar({title:snackbarErrorMessage,marBottom:device.desktop()?"16px":"64px"})}),GetRootURL()+"api?m=1",!1)},createStatusSubsectionMobile=(e,t)=>{$(e).empty();const a=JSON.parse(localStorage.getItem("storeProfileDetails")).storeDetails,n=[{primaryText:"Active",secondaryText:"Available for chat",customattr:[{key:"title",value:"Active"}],leadingIcon:{iconType:"html",html:'<div class="box-12 bor-rad-50 bg-vibrant-green"></div>'}},{primaryText:"Unavailable",secondaryText:"Mute chat notifications",customattr:[{key:"title",value:"Unavailable"}],leadingIcon:{iconType:"html",html:'<div class="box-12 bor-rad-50 bg-scarlet-red"></div>'}}];a.connectivitystatus?(n[0].trailingIcon={iconType:"font",iconClass:"check",iconFontSize:"24px",iconFontColor:"var(--color-modern-gray)"},n[1].trailingIcon={iconType:"font",iconClass:"",iconFontSize:"24px",iconFontColor:"var(--color-modern-gray)"}):(n[0].trailingIcon={iconType:"font",iconClass:"",iconFontSize:"24px",iconFontColor:"var(--color-modern-gray)"},n[1].trailingIcon={iconType:"font",iconClass:"check",iconFontSize:"24px",iconFontColor:"var(--color-modern-gray)"});const s=CreateList({parent:e,type:"two-line",data:n,callback:e=>{updateConnectivityStatusStore(a.storeID,0===e)}});a.connectivitystatus?($($(s.element).find("li")[0]).find(".mdc-list-item__primary-text").addClass("text-primary"),$($(s.element).find("li")[1]).find(".mdc-list-item__primary-text").addClass("text-secondary"),$($(s.element).find("li")[0]).find(".mdc-list-item__secondary-text").addClass("text-secondary")):($($(s.element).find("li")[1]).find(".mdc-list-item__primary-text").addClass("text-primary"),$($(s.element).find("li")[0]).find(".mdc-list-item__primary-text").addClass("text-secondary"),$($(s.element).find("li")[1]).find(".mdc-list-item__secondary-text").addClass("text-secondary")),$(s.element).find(".mdc-list-item__primary-text").addClass("ft-wt-500"),$($(s.element).find(".mdc-list-item__graphic")).addClass("box-24"),$($(s.element).find(".mdc-list-item__text")).addClass("mar-r-16"),$(s.element).addClass("subsection-status-list"),$($(s.element).find("li")).addClass("subsection-status-list-item"),t&&(document.documentElement.style.setProperty("--subsectionheight",`${document.getElementById("nav-rail__subpanel-status").querySelector("ul").offsetHeight}px`),document.getElementById("nav-rail__subpanel-status").closest(".subsection-holder-mobile").classList.remove("subsection-dd-open"),document.getElementById("nav-rail__subpanel-status").closest(".subsection-holder-mobile").classList.add("subsection-dd-open"))},createPanelSubsection=(e,t,a="default")=>{const n=document.querySelector(e);if(!n||isNullOrEmpty(t))return;const s=t.subsection.map((e=>`\n <div class="cur-pot mar-t-8">\n ${e.href?`<a href="${e.href}">`:""}\n <div id="panel${generateUniqueId()}" class="${e.isSelected?"rail-panel--selected":""} ht-48 display-flex-justify-center flex-direction-row justify-content-start pad-l-16 pad-r-16 rail-subpanel mdc-typography--border-radius">\n <span class="material-symbols-rounded size-24 ${e.isSelected?"material-symbols-rounded-filled":""}">${e.leadIcon}</span>\n <span class="subpanel-title mar-l-8 ${e.isSelected?"mdc-typography--body1--medium":"mdc-typography--body1"}">${e.title}</span>\n </div>\n ${e.href?"</a>":""}\n </div>`)).join(""),i=`\n <div class="nav-rail__subpanel flex-direction-column flex" style="padding: 16px;">\n <div>\n <span class="text-primary mdc-typography--body1--medium ht-48 display-flex-center" style="margin: 0 16px 16px 16px; justify-content: flex-start;">${t.innerTitle}</span>\n <div className="ht-1 bg-light-gray"></div>\n </div>\n <div class="mar-t-8 nav-rail__subpanel-sections ${"hovered"===a?"nav-rail__subpanel-sections--hovered":""}">\n ${s}\n </div>\n ${"hovered"!==a?'<div class="nav__create-post mar-t-16"></div>':""}\n </div>`;n.insertAdjacentHTML("beforeend",i),$(".rail-subpanel").map(((e,t)=>{CreateRipple({elementID:`#${$(t).attr("id")}`})})),"hovered"!==a&&isDesktopDevice()&&createPostButton($(".nav__create-post"))},createPanelSubsectionMobile=(e,t,a)=>{const n=document.querySelector(e);
1if(!n||isNullOrEmpty(t))return;const s=t.subsection.map(((e,t)=>`\n <div class="cur-pot mar-t-8">\n ${e.href?`<a href="${e.href}">`:""}\n <div id="mobpanel${generateUniqueId()}" class="${e.isSelected?"bg-bright-sky-blue":""} panel-sub left-right-pad display-flex-justify-center flex-direction-row justify-content-start mdc-typography--border-radius">\n <span class="subsection-inner-titles mdc-typography--body1 ${e.isSelected?"text-primary ft-wt-500":"text-secondary"}">${e.title}</span>\n </div>\n ${e.href?"</a>":""}\n </div>`)).join(""),i=`\n <div class="subsection-holder-mobile flex-direction-column flex ${a?"subsection--open":"subsection--closed"}">\n <div id="nav-rail__subpanel-${t.type}" class="nav-rail__subpanel-sections">${"status"!==t.type?s:""}</div>\n </div>`;n.insertAdjacentHTML("beforeend",i),$(".panel-sub").map(((e,t)=>{CreateRipple({elementID:`#${$(t).attr("id")}`})})),"status"===t.type&&createStatusSubsectionMobile(`#nav-rail__subpanel-${t.type}`)},setMaxZId=e=>{const t=document.querySelectorAll("*"),a=document.querySelectorAll(e);let n=0;t.forEach((e=>{const t=parseInt(window.getComputedStyle(e).zIndex)||0;n=Math.max(n,t)})),a.forEach((e=>e.style.zIndex=n+1))};
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.