(()=>{varWo=Object.create;varfe=Object.defineProperty,Bo=Object.defineProperties,Vo=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,zo=Object.getOwnPropertyNames,yn=Object.getOwnPropertySymbols,Uo=Object.getPrototypeOf,bn=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable;varTn=(i,t,e)=>tini?fe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t)=>{for(vareint||(t={}))bn.call(t,e)&&Tn(i,e,t[e]);if(yn)for(vareofyn(t))Yo.call(t,e)&&Tn(i,e,t[e]);returni},We=(i,t)=>Bo(i,Fo(t)),An=i=>fe(i,"__esModule",{value:!0});varq=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Ko=(i,t)=>{An(i);for(vareint)fe(i,e,{get:t[e],enumerable:!0})},qo=(i,t,e)=>{if(t&&typeoft=="object"||typeoft=="function")for(letnofzo(t))!bn.call(i,n)&&n!=="default"&&fe(i,n,{get:()=>t[n],enumerable:!(e=Vo(t,n))||e.enumerable});returni},Oi=i=>qo(An(fe(i!=null?Wo(Uo(i)):{},"default",i&&i.__esModule&&"default"ini?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);varwi=(i,t,e)=>newPromise((n,r)=>{vars=u=>{try{a(e.next(u))}catch(h){r(h)}},o=u=>{try{a(e.throw(u))}catch(h){r(h)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);a((e=e.apply(i,t)).next())});varln=q((ro,fi)=>{(function(i,t){typeofdefine=="function"&&define.amd?define(t):typeoffi=="object"&&fi.exports?fi.exports=t():i.EvEmitter=t()})(typeofwindow!="undefined"?window:ro,function(){"use strict";functioni(){}vart=i.prototype;returnt.on=function(e,n){if(!(!e||!n)){varr=this._events=this._events||{},s=r[e]=r[e]||[];returns.indexOf(n)==-1&&s.push(n),this}},t.once=function(e,n){if(!(!e||!n)){this.on(e,n);varr=this._onceEvents=this._onceEvents||{},s=r[e]=r[e]||{};returns[n]=!0,this}},t.off=function(e,n){varr=this._events&&this._events[e];if(!(!r||!r.length)){vars=r.indexOf(n);returns!=-1&&r.splice(s,1),this}},t.emitEvent=function(e,n){varr=this._events&&this._events[e];if(!(!r||!r.length)){r=r.slice(0),n=n||[];for(vars=this._onceEvents&&this._onceEvents[e],o=0;o<r.length;o++){vara=r[o],u=s&&s[a];u&&(this.off(e,a),deletes[a]),a.apply(this,n)}returnthis}},t.allOff=function(){deletethis._events,deletethis._onceEvents},i})});varhi=q((vp,di)=>{(function(i,t){typeofdefine=="function"&&define.amd?define(t):typeofdi=="object"&&di.exports?di.exports=t():i.getSize=t()})(window,function(){"use strict";functiont(d){varv=parseFloat(d),E=d.indexOf("%")==-1&&!isNaN(v);returnE&&v}functione(){}varn=typeofconsole=="undefined"?e:function(d){console.error(d)},r=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],s=r.length;functiono(){for(vard={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},v=0;v<s;v++){varE=r[v];d[E]=0}returnd}functiona(d){varv=getComputedStyle(d);returnv||n("Style returned "+v+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),v}varu=!1,h;functionf(){if(!u){u=!0;vard=document.createElement("div");d.style.width="200px",d.style.padding="1px 2px 3px 4px",d.style.borderStyle="solid",d.style.borderWidth="1px 2px 3px 4px",d.style.boxSizing="border-box";varv=document.body||document.documentElement;v.appendChild(d);varE=a(d);h=Math.round(t(E.width))==200,_.isBoxSizeOuter=h,v.removeChild(d)}}function_(d){if(f(),typeofd=="string"&&(d=document.querySelector(d)),!(!d||typeofd!="object"||!d.nodeType)){varv=a(d);if(v.display=="none")returno();varE={};E.width=d.offsetWidth,E.height=d.offsetHeight;for(varp=E.isBorderBox=v.boxSizing=="border-box",l=0;l<s;l++){varc=r[l],m=v[c],b=parseFloat(m);E[c]=isNaN(b)?0:b}vary=E.paddingLeft+E.paddingRight,S=E.paddingTop+E.paddingBottom,A=E.marginLeft+E.marginRight,C=E.marginTop+E.marginBottom,w=E.borderLeftWidth+E.borderRightWidth,N=E.borderTopWidth+E.borderBottomWidth,L=p&&h,M=t(v.width);M!==!1&&(E.width=M+(L?0:y+w));varQ=t(v.height);returnQ!==!1&&(E.height=Q+(L?0:S+N)),E.innerWidth=E.width-(y+w),E.innerHeight=E.height-(S+N),E.
`)}:!a.ok&&"detail"in h?{error:h.detail}:h})}function Ro(i){return wi(this,null,function*(){return yield fu(i,"GET")})}function*fn(...i){for(let t of i)for(let e of document.querySelectorAll(t))e!==null&&(yield e)}function $o(i){i.startsWith("data-")||(i=`data-${i}`);for(let t of fn("body > div#netbox-data > *")){let e=t.getAttribute(i);if($e(e))return e}return null}function du(i,t){i!==null&&(typeof t=="undefined"?window.getComputedStyle(i).display==="none"?i.style.display="":i.style.display="none":t==="show"?i.style.display="":i.style.display="none")}function yi(i){for(let t of fn("div.card-overlay"))du(t,i)}window.Collapse=it;window.Modal=Ft;window.Popover=le;window.Toast=Yt;window.Tooltip=gt;function Mo(i,t,e,n){let r="mdi-alert";switch(i){case"warning":r="mdi-alert";break;case"success":r="mdi-check-circle";break;case"info":r="mdi-information";break;case"danger":r="mdi-alert";break}let s=document.createElement("div");s.setAttribute("class","toast-container position-fixed bottom-0 end-0 m-3");let o=document.createElement("div");o.setAttribute("class",`toastbg-${i}`),o.setAttribute("role","alert"),o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true");let a=document.createElement("div");a.setAttribute("class",`toast-headerbg-${i}text-body`);let u=document.createElement("i");u.setAttribute("class",`mdi${r}`);let h=document.createElement("strong");h.setAttribute("class","me-auto ms-1"),h.innerText=t;let f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("class","btn-close"),f.setAttribute("data-bs-dismiss","toast"),f.setAttribute("aria-label","Close");let _=document.createElement("div");if(_.setAttribute("class","toast-body"),a.appendChild(u),a.appendChild(h),typeof n!="undefined"){let v=document.createElement("small");v.setAttribute("class","text-muted"),a.appendChild(v)}return a.appendChild(f),_.innerText=e.trim(),o.appendChild(a),o.appendChild(_),s.appendChild(o),document.body.appendChild(s),new Yt(o)}function dn(i,t,e){var n,r;return(r=(n=i.querySelector(t))==null?void 0:n.getAttribute(e))!=null?r:null}function pu(i){var t,e;for(let[n,r]of Object.entries(i.get_lldp_neighbors_detail)){let[s]=n.split("."),o=document.getElementById(s);if(o!==null)for(let a of r){let u=o.querySelector("td.device"),h=o.querySelector("td.interface"),f=dn(o,"td.configured_device","data"),_=dn(o,"td.configured_chassis","data-chassis"),d=dn(o,"td.configured_interface","data"),v=null;$e(d)&&(v=d.replace(/^([A-Z][a-z])[^0-9]*([0-9/]+)$/,"$1$2"));let E=(t=a.remote_system_name)!=null?t:"",p=(e=a.remote_port)!=null?e:"",[l]=E.split("."),[c]=p.split(".");u!==null&&(u.innerText=l),h!==null&&(h.innerText=c),!$e(f)&&$e(l)?o.classList.add("info"):(f===l||_===l)&&v===c||f===l||_===l?o.classList.add("success"):o.classList.add("danger")}}}function jo(){yi("show");let i=$o("object-url");i!==null&&Ro(i).then(t=>{if(Po(t)){Mo("danger","Error Retrieving LLDP Neighbor Information",t.error).show(),yi("hide");return}else pu(t)}).finally(()=>{yi("hide")})}document.readyState!=="loading"?jo():document.addEventListener("DOMContentLoaded",jo);})();