(()=>{varov=Object.create;varUn=Object.defineProperty,sv=Object.defineProperties,av=Object.getOwnPropertyDescriptor,lv=Object.getOwnPropertyDescriptors,cv=Object.getOwnPropertyNames,Ll=Object.getOwnPropertySymbols,uv=Object.getPrototypeOf,Dl=Object.prototype.hasOwnProperty,fv=Object.prototype.propertyIsEnumerable;varko=(t,e,n)=>eint?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(varnine||(e={}))Dl.call(e,n)&&ko(t,n,e[n]);if(Ll)for(varnofLl(e))fv.call(e,n)&&ko(t,n,e[n]);returnt},Vi=(t,e)=>sv(t,lv(e)),Ml=t=>Un(t,"__esModule",{value:!0});varC=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),dv=(t,e)=>{Ml(t);for(varnine)Un(t,n,{get:e[n],enumerable:!0})},hv=(t,e,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofcv(e))!Dl.call(t,i)&&i!=="default"&&Un(t,i,{get:()=>e[i],enumerable:!(n=av(e,i))||n.enumerable});returnt},Me=t=>hv(Ml(Un(t!=null?ov(uv(t)):{},"default",t&&t.__esModule&&"default"int?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);varG=(t,e,n)=>(ko(t,typeofe!="symbol"?e+"":e,n),n);varUe=(t,e,n)=>newPromise((i,o)=>{vars=f=>{try{c(n.next(f))}catch(u){o(u)}},a=f=>{try{c(n.throw(f))}catch(u){o(u)}},c=f=>f.done?i(f.value):Promise.resolve(f.value).then(s,a);c((n=n.apply(t,e)).next())});varpe=C((sk,du)=>{varvr=function(t){returnt&&t.Math==Math&&t};du.exports=vr(typeofglobalThis=="object"&&globalThis)||vr(typeofwindow=="object"&&window)||vr(typeofself=="object"&&self)||vr(typeofglobal=="object"&&global)||function(){returnthis}()||Function("return this")()});varme=C((ak,hu)=>{hu.exports=function(t){try{return!!t()}catch(e){return!0}}});varMt=C((lk,pu)=>{varf_=me();pu.exports=!f_(function(){returnObject.defineProperty({},1,{get:function(){return7}})[1]!=7})});varps=C(vu=>{"use strict";varmu={}.propertyIsEnumerable,gu=Object.getOwnPropertyDescriptor,d_=gu&&!mu.call({1:2},1);vu.f=d_?function(e){varn=gu(this,e);return!!n&&n.enumerable}:mu});varbr=C((uk,bu)=>{bu.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});varDn=C((fk,yu)=>{varh_={}.toString;yu.exports=function(t){returnh_.call(t).slice(8,-1)}});varvi=C((dk,Eu)=>{varp_=me(),m_=Dn(),g_="".split;Eu.exports=p_(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){returnm_(t)=="String"?g_.call(t,""):Object(t)}:Object});varrn=C((hk,_u)=>{_u.exports=function(t){if(t==null)throwTypeError("Can't call method on "+t);returnt}});varbi=C((pk,Su)=>{varv_=vi(),b_=rn();Su.exports=function(t){returnv_(b_(t))}});varqe=C((mk,wu)=>{wu.exports=function(t){returntypeoft=="object"?t!==null:typeoft=="function"}});varms=C((gk,Tu)=>{varyr=qe();Tu.exports=function(t,e){if(!yr(t))returnt;varn,i;if(e&&typeof(n=t.toString)=="function"&&!yr(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!yr(i=n.call(t))||!e&&typeof(n=t.toString)=="function"&&!yr(i=n.call(t)))returni;throwTypeError("Can't convert object to primitive value")}});varon=C((vk,xu)=>{vary_=rn();xu.exports=function(t){returnObject(y_(t))}});var$e=C((bk,Ou)=>{varE_=on(),__={}.hasOwnProperty;Ou.exports=Object.hasOwn||function(e,n){return__.call(E_(e),n)}});varvs=C((yk,Cu)=>{varS_=pe(),Au=qe(),gs=S_.document,w_=Au(gs)&&Au(gs.createElement);Cu.exports=function(t){returnw_?gs.createElement(t):{}}});varbs=C((Ek,Lu)=>{varT_=Mt(),x_=me(),O_=vs();Lu.exports=!T_&&!x_(function(){returnObject.defineProperty(O_("div"),"a",{get:function(){return7}}).a!=7})});varys=C(Mu=>{varA_=Mt(),C_=ps(),L_=br(),D_=bi(),M_=ms(),I_=$e(),k_=bs(),Du=Object.getOwnPropertyDescriptor;Mu.f=A_?Du:function(e,n){if(e=D_(e),n=M_(n,!0),k_)try{returnDu(e,n)}catch(i){}if(I_(e,n))returnL_(!C_.f.call(e,n),e[n])}});varBe=C((Sk,Iu)=>{varN_=qe();Iu.exports=function(t){if(!N_(t))throwTypeError(String(t)+" is not an object");returnt}});varIt=C(Pu=>{varP_=Mt(),R_=bs(),ku=Be(),j_=ms(),Nu=Object.defineProperty;Pu.f=P_?Nu:function(e,n,i){if(ku(e),n=j_(n,!0),ku(i),R_)try{returnNu(e,n,i)}catch(o){}if("get"ini||"set"ini)throwTypeError("Accessors not supported");return"value"ini&&(e[n]=i.v
`)&&(y="(?: "+y+")",b=" "+b,h++),a=new RegExp("^(?:"+y+")",v)),Xa&&(a=new RegExp("^"+y+"$(?!\\s)",v)),Ga&&(c=n.lastIndex),f=ro.call(p?a:n,b),p?f?(f.input=f.input.slice(h),f[0]=f[0].slice(h),f.index=n.lastIndex,n.lastIndex+=f[0].length):n.lastIndex=0:Ga&&f&&(n.lastIndex=n.global?f.index+f[0].length:c),Xa&&f&&f.length>1&&rA.call(f[0],a,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(f[u]=void 0)}),f&&d)for(f.groups=l=eA(null),u=0;u<d.length;u++)m=d[u],l[m[0]]=f[m[1]];return f});Xp.exports=Ka});var Qa=C(()=>{"use strict";var sA=yt(),Qp=oo();sA({target:"RegExp",proto:!0,forced:/./.exec!==Qp},{exec:Qp})});var Za=C((xR,tm)=>{"use strict";Qa();var Jp=ln(),aA=oo(),Zp=me(),em=Te(),lA=et(),cA=em("species"),Ja=RegExp.prototype;tm.exports=function(t,e,n,i){var o=em(t),s=!Zp(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!Zp(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[cA]=function(){return l},l.flags="",l[o]=/./[o]),l.exec=function(){return u=!0,null},l[o](""),!u});if(!s||!a||n){var c=/./[o],f=e(o,""[t],function(u,l,m,d,p){var v=l.exec;return v===aA||v===Ja.exec?s&&!p?{done:!0,value:c.call(l,m,d)}:{done:!0,value:u.call(m,l,d)}:{done:!1}});Jp(String.prototype,t,f[0]),Jp(Ja,o,f[1])}i&&lA(Ja[o],"sham",!0)}});var el=C((OR,nm)=>{"use strict";var uA=ua().charAt;nm.exports=function(t,e,n){return e+(n?uA(t,e).length:1)}});var tl=C((AR,im)=>{var fA=Dn(),dA=oo();im.exports=function(t,e){var n=t.exec;if(typeof n=="function"){var i=n.call(t,e);if(typeof i!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return i}if(fA(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return dA.call(t,e)}});var sm=C((LR,om)=>{var bA=on(),yA=Math.floor,EA="".replace,_A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SA=/\$([$&'`]|\d{1,2})/g;om.exports=function(t,e,n,i,o,s){vara=n+t.length,c=i.length,f=SA;returno!==void0&&(o=bA(o),f=_A),EA.call(s,f,function(u,l){varm;switch(l.charAt(0)){case"$":return"$";case"&":returnt;case"`":returne.slice(0,n);case"'":returne.slice(a);case"<":m=o[l.slice(1,-1)];break;default:vard=+l;if(d===0)returnu;if(d>c){varp=yA(d/10);returnp===0?u:p<=c?i[p-1]===void0?l.charAt(1):i[p-1]+l.charAt(1):u}m=i[d-1]}returnm===void0?"":m})}});varfm=C(ol=>{"use strict";ol.parse=BA;ol.serialize=FA;varHA=decodeURIComponent,qA=encodeURIComponent,$A=/; */,co=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;functionBA(t,e){if(typeoft!="string")thrownewTypeError("argument str must be a string");for(varn={},i=e||{},o=t.split($A),s=i.decode||HA,a=0;a<o.length;a++){varc=o[a],f=c.indexOf("=");if(!(f<0)){varu=c.substr(0,f).trim(),l=c.substr(++f,c.length).trim();l[0]=='"'&&(l=l.slice(1,-1)),n[u]==null&&(n[u]=zA(l,s))}}returnn}functionFA(t,e,n){vari=n||{},o=i.encode||qA;if(typeofo!="function")thrownewTypeError("option encode is invalid");if(!co.test(t))thrownewTypeError("argument name is invalid");vars=o(e);if(s&&!co.test(s))thrownewTypeError("argument val is invalid");vara=t+"="+s;if(i.maxAge!=null){varc=i.maxAge-0;if(isNaN(c)||!isFinite(c))thrownewTypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(i.domain){if(!co.test(i.domain))thrownewTypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!co.test(i.path))thrownewTypeError("option path is invalid");a+="; Path="+i.path}if(i.expires){if(typeofi.expires.toUTCString!="function")thrownewTypeError("option expires is invalid");a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){varf=typeofi.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(f){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:thrownewTypeError("option sameSite is invalid")}}returna}functionzA(t,e){try{returne(t)}catch(n){returnt}}});varul=C((_m,fo)=>{(function(t,e){typeofdefine=="function"&&define.amd?define(e):typeoffo=="object"&&fo.exports?fo.expo
`)}:!a.ok&&"detail"in f?{error:f.detail}:f})}function uo(t,e){return Ue(this,null,function*(){return yield pm(t,"PATCH",e)})}function VA(t){return Ue(this,null,function*(){return yield pm(t,"GET")})}function mm(t){return Ue(this,null,function*(){return yield VA(t)})}function*H(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function vn(t){return document.getElementById(t)}function gm(t,e=0){let n=e,i=document.getElementById("content-title");i!==null&&(n+=i.getBoundingClientRect().bottom);let o=t.getBoundingClientRect().top+window.pageYOffset+n;window.scrollTo({top:o,behavior:"smooth"})}function vm(t){let e=[];for(let n of t.querySelectorAll("select"))if(n!==null){let i={name:n.name,options:[]};for(let o of n.options)o.selected&&i.options.push(o.value);e=[...e,i]}return e}function*bm(t){for(let e of t.querySelectorAll("td"))e!==null&&ie(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Ae(t,e,n){function i(s){return!!(typeof n=="string"&&s!==null&&s.matches(n))}function o(s){if(s!==null&&s.parentElement!==null&&!i(s)){for(let a of s.parentElement.querySelectorAll(e))if(a!==null)return a;return o(s.parentElement.parentElement)}return null}return o(t)}function ll(t,e,n,i=[]){let o=document.createElement(t);for(let s of Object.keys(e)){let a=s,c=e[a];a in o&&(o[a]=c)}o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function YA(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=Ae(e,"form"),i=e.getAttribute("href");n!==null&&ie(i)&&(n.setAttribute("action",i),n.submit())}}function UA(){for(let t of H("a.formaction"))t.addEventListener("click",YA)}function KA(){for(let t of H("a.set_speed"))if(t!==null){let e=function(n){n.preventDefault();let i=t.getAttribute("data"),o=document.getElementById(t.target);o!==null&&i!==null&&(o.value=i)};t.addEventListener("click",e)}}function GA(t,e){let n=new Set;for(let i of e.querySelectorAll("*[name]"))i.validity.valid?(i.classList.contains("is-invalid")&&i.classList.remove("is-invalid"),i.classList.contains("is-valid")||i.classList.add("is-valid")):(n.add(i.name),i.classList.contains("is-valid")&&i.classList.remove("is-valid"),i.classList.contains("is-invalid")||i.classList.add("is-invalid"));if(n.size!==0){let i=e.elements.namedItem(Array.from(n)[0]);gm(i),t.preventDefault()}}function XA(){for(let t of H("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>GA(i,t))}}function QA(t){let e=Array.from(t.options);for(let n=1;n<e.length;n++){let i=e[n];i.selected&&(t.removeChild(i),t.insertBefore(i,t.options[n-1]))}}function JA(t){let e=Array.from(t.options);for(let n=e.length-2;n>=0;n--){let i=e[n];if(i.selected){let o=t.options[n+1];i=t.removeChild(i),o=t.replaceChild(i,o),t.insertBefore(o,i)}}}function ZA(){for(let t of H("#move-option-up")){let e=t.getAttribute("data-target");if(e!==null)for(let n of H(`#${e}`))t.addEventListener("click",()=>QA(n))}for(let t of H("#move-option-down")){let e=t.getAttribute("data-target");if(e!==null)for(let n of H(`#${e}`))t.addEventListener("click",()=>JA(n))}}var ym={region:{hide:["id_sitegroup","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:["id_region"]},"site group":{hide:["id_region","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:["id_sitegroup"]},site:{hide:["id_location","id_rack","id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site"]},location:{hide:["id_rack","id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site","id_location"]},rack:{hide:["id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site","id_location","id_rack"]},"cluster group":{hide:["id_region","id_sitegroup","id_site","id_location","id_rack","id_cluster"],show:["id_clustergroup"]},cluster:{hide:["id_region","id_sitegroup","id_site","id_location","id_rack"],show:["id_clustergroup","id_cluster"]},default:{hide:["id_region","id_sitegroup","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:[]}};function cl(t
`,"").trim(),document.head.appendChild(o)}}resetClasses(){let e=this.slim.slim;if(e)for(let n of this.base.classList)e.container.classList.remove(n)}initResetButton(){let e=Ae(this.base,"button[data-reset-select]");e!==null&&e.addEventListener("click",()=>{window.location.assign(window.location.origin+window.location.pathname)})}initRefreshButton(){let e=ll("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[ll("i",{},["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),this.slim.slim.search.container.appendChild(e)}};function sg(){for(let t of H(".netbox-api-select"))new og(t)}function ag(t){return typeof t.value=="string"&&t.value!==""}function lg(){for(let t of H("select.netbox-color-select")){let n=function(i){if(e.slim.singleSelected!==null)if(ag(i)){let o=`#${i.value}`,s=Pi(o);e.slim.singleSelected.container.style.backgroundColor=o,e.slim.singleSelected.container.style.color=s}else e.slim.singleSelected.container.removeAttribute("style")};for(let i of t.options)if(ag(i)){let o=`#${i.value}`,s=Pi(o);i.style.backgroundColor=o,i.style.color=s}let e=new $n({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle" style="color: currentColor;"></i>'});for(let i of e.data.data)if("selected"in i&&i.selected){n(i);break}for(let i of t.classList)e.slim.container.classList.remove(i);e.onChange=n}}function cg(){for(let t of H(".netbox-static-select"))if(t!==null){let e=document.querySelector(`label[for=${t.id}]`),n;e!==null&&(n=`Select${e.innerText.trim()}`);let i=new $n({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle"></i>',placeholder:n});for(let o of t.classList)i.slim.container.classList.remove(o)}}function ug(){for(let t of[sg,lg,cg])t()}var Bn="netbox-color-mode",IC="Light Mode",kC="Dark Mode",fg="mdi-lightbulb-on",dg="mdi-lightbulb";function NC(t){return t==="dark"||t==="light"}function PC(t){return localStorage.setItem(Bn,t)}function RC(t){var e,n;document.documentElement.setAttribute(`data-${Bn}`,t);for(let i of H("span.color-mode-text"))t==="light"?i.innerText=kC:t==="dark"&&(i.innerText=IC);for(let i of H("i.color-mode-icon","span.color-mode-icon"))t==="light"?(i.classList.remove(fg),i.classList.add(dg)):t==="dark"&&(i.classList.remove(dg),i.classList.add(fg));for(let i of H(".rack_elevation")){let o=(n=(e=i.contentDocument)==null?void 0:e.querySelector("svg"))!=null?n:null;o!==null&&o.setAttribute(`data-${Bn}`,t)}}function Ve(t){for(let e of[PC,RC])e(t)}function jC(){let t=localStorage.getItem(Bn);t==="light"?Ve("dark"):t==="dark"?Ve("light"):console.warn("Unable to determine the current color mode")}function HC(){let t=localStorage.getItem(Bn),e=document.documentElement.getAttribute(`data-${Bn}`);if(ie(e)&&ie(t))return Ve(t);let n="none";for(let i of["dark","light"])if(window.matchMedia(`(prefers-color-scheme:${i})`).matches){n=i;break}if(ie(t)&&!ie(e)&&NC(t))return Ve(t);switch(n){case"dark":return Ve("dark");case"light":return Ve("light");case"none":return Ve("light");default:return Ve("light")}}function qC(){for(let t of H("button.color-mode-toggle"))t.addEventListener("click",jC)}function hg(){window.addEventListener("load",HC);for(let t of[qC])t()}function $C(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ie(e)&&uo(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(jn(o)){Hn("danger","Error",o.error).show();return}else{let a=(s=t.parentElement)==null?void 0:s.parentElement,c=t.querySelector("i.mdi, span.mdi");n?(a.classList.remove("success"),a.classList.add("info"),t.classList.remove("connected","btn-warning"),t.classList.add("btn-info"),t.title="Mark Installed",c.classList.remove("mdi-lan-disconnect"),c.classList.add("mdi-lan-connect")):(a.classList.remove("info"),a.classList.add("success"),t.classList.remove("btn-success"),t.classList.add("connected","btn-warning"),t.title="Mark Installed",c.classList.remove("mdi-lan-connect"),c.classList.add("mdi-lan-disconnect"))}})}function BC(){for(let t of H("button.cable-toggle"))t.addEventListener("click",()=>$C(t))}function FC(){let t=document.ge