(()=>{varhv=Object.create;varUn=Object.defineProperty,pv=Object.defineProperties,mv=Object.getOwnPropertyDescriptor,gv=Object.getOwnPropertyDescriptors,vv=Object.getOwnPropertyNames,kl=Object.getOwnPropertySymbols,bv=Object.getPrototypeOf,Nl=Object.prototype.hasOwnProperty,yv=Object.prototype.propertyIsEnumerable;varNo=(t,e,n)=>eint?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(varnine||(e={}))Nl.call(e,n)&&No(t,n,e[n]);if(kl)for(varnofkl(e))yv.call(e,n)&&No(t,n,e[n]);returnt},Yi=(t,e)=>pv(t,gv(e)),Pl=t=>Un(t,"__esModule",{value:!0});varC=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ev=(t,e)=>{Pl(t);for(varnine)Un(t,n,{get:e[n],enumerable:!0})},_v=(t,e,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofvv(e))!Nl.call(t,i)&&i!=="default"&&Un(t,i,{get:()=>e[i],enumerable:!(n=mv(e,i))||n.enumerable});returnt},Oe=t=>_v(Pl(Un(t!=null?hv(bv(t)):{},"default",t&&t.__esModule&&"default"int?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);varG=(t,e,n)=>(No(t,typeofe!="symbol"?e+"":e,n),n);varke=(t,e,n)=>newPromise((i,o)=>{vars=u=>{try{c(n.next(u))}catch(d){o(d)}},a=u=>{try{c(n.throw(u))}catch(d){o(d)}},c=u=>u.done?i(u.value):Promise.resolve(u.value).then(s,a);c((n=n.apply(t,e)).next())});varpe=C((vk,gu)=>{varbr=function(t){returnt&&t.Math==Math&&t};gu.exports=br(typeofglobalThis=="object"&&globalThis)||br(typeofwindow=="object"&&window)||br(typeofself=="object"&&self)||br(typeofglobal=="object"&&global)||function(){returnthis}()||Function("return this")()});varme=C((bk,vu)=>{vu.exports=function(t){try{return!!t()}catch(e){return!0}}});varIt=C((yk,bu)=>{vary_=me();bu.exports=!y_(function(){returnObject.defineProperty({},1,{get:function(){return7}})[1]!=7})});varms=C(_u=>{"use strict";varyu={}.propertyIsEnumerable,Eu=Object.getOwnPropertyDescriptor,E_=Eu&&!yu.call({1:2},1);_u.f=E_?function(e){varn=Eu(this,e);return!!n&&n.enumerable}:yu});varyr=C((_k,Su)=>{Su.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});varDn=C((Sk,wu)=>{var__={}.toString;wu.exports=function(t){return__.call(t).slice(8,-1)}});varvi=C((wk,Tu)=>{varS_=me(),w_=Dn(),T_="".split;Tu.exports=S_(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){returnw_(t)=="String"?T_.call(t,""):Object(t)}:Object});varrn=C((Tk,xu)=>{xu.exports=function(t){if(t==null)throwTypeError("Can't call method on "+t);returnt}});varbi=C((xk,Ou)=>{varx_=vi(),O_=rn();Ou.exports=function(t){returnx_(O_(t))}});varBe=C((Ok,Au)=>{Au.exports=function(t){returntypeoft=="object"?t!==null:typeoft=="function"}});vargs=C((Ak,Cu)=>{varEr=Be();Cu.exports=function(t,e){if(!Er(t))returnt;varn,i;if(e&&typeof(n=t.toString)=="function"&&!Er(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!Er(i=n.call(t))||!e&&typeof(n=t.toString)=="function"&&!Er(i=n.call(t)))returni;throwTypeError("Can't convert object to primitive value")}});varon=C((Ck,Lu)=>{varA_=rn();Lu.exports=function(t){returnObject(A_(t))}});varFe=C((Lk,Du)=>{varC_=on(),L_={}.hasOwnProperty;Du.exports=Object.hasOwn||function(e,n){returnL_.call(C_(e),n)}});varbs=C((Dk,Iu)=>{varD_=pe(),Mu=Be(),vs=D_.document,M_=Mu(vs)&&Mu(vs.createElement);Iu.exports=function(t){returnM_?vs.createElement(t):{}}});varys=C((Mk,ku)=>{varI_=It(),k_=me(),N_=bs();ku.exports=!I_&&!k_(function(){returnObject.defineProperty(N_("div"),"a",{get:function(){return7}}).a!=7})});varEs=C(Pu=>{varP_=It(),R_=ms(),j_=yr(),H_=bi(),q_=gs(),$_=Fe(),B_=ys(),Nu=Object.getOwnPropertyDescriptor;Pu.f=P_?Nu:function(e,n){if(e=H_(e),n=q_(n,!0),B_)try{returnNu(e,n)}catch(i){}if($_(e,n))returnj_(!R_.f.call(e,n),e[n])}});varze=C((kk,Ru)=>{varF_=Be();Ru.exports=function(t){if(!F_(t))throwTypeError(String(t)+" is not an object");returnt}});varkt=C(qu=>{varz_=It(),W_=ys(),ju=ze(),V_=gs(),Hu=Object.defineProperty;qu.f=z_?Hu:function(e,n,i){if(ju(e),n=V_(n,!0),ju(i),W_)try{returnHu(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)),Qa&&(a=new RegExp("^"+y+"$(?!\\s)",v)),Xa&&(c=n.lastIndex),u=oo.call(p?a:n,b),p?u?(u.input=u.input.slice(h),u[0]=u[0].slice(h),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:Xa&&u&&(n.lastIndex=n.global?u.index+u[0].length:c),Qa&&u&&u.length>1&&f0.call(u[0],a,function(){for(d=1;d<arguments.length-2;d++)arguments[d]===void 0&&(u[d]=void 0)}),u&&f)for(u.groups=l=l0(null),d=0;d<f.length;d++)m=f[d],l[m[0]]=u[m[1]];return u});em.exports=Ga});var Ja=C(()=>{"use strict";var p0=Et(),tm=so();p0({target:"RegExp",proto:!0,forced:/./.exec!==tm},{exec:tm})});var el=C((RR,om)=>{"use strict";Ja();var nm=ln(),m0=so(),im=me(),rm=Te(),g0=tt(),v0=rm("species"),Za=RegExp.prototype;om.exports=function(t,e,n,i){var o=rm(t),s=!im(function(){var d={};return d[o]=function(){return 7},""[t](d)!=7}),a=s&&!im(function(){var d=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[v0]=function(){return l},l.flags="",l[o]=/./[o]),l.exec=function(){return d=!0,null},l[o](""),!d});if(!s||!a||n){var c=/./[o],u=e(o,""[t],function(d,l,m,f,p){var v=l.exec;return v===m0||v===Za.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:d.call(m,l,f)}:{done:!1}});nm(String.prototype,t,u[0]),nm(Za,o,u[1])}i&&g0(Za[o],"sham",!0)}});var tl=C((jR,sm)=>{"use strict";var b0=da().charAt;sm.exports=function(t,e,n){return e+(n?b0(t,e).length:1)}});var nl=C((HR,am)=>{var y0=Dn(),E0=so();am.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(y0(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return E0.call(t,e)}});var um=C(($R,cm)=>{var O0=on(),A0=Math.floor,C0="".replace,L0=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,D0=/\$([$&'`]|\d{1,2})/g;cm.exports=function(t,e,n,i,o,s){vara=n+t.length,c=i.length,u=D0;returno!==void0&&(o=O0(o),u=L0),C0.call(s,u,function(d,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:varf=+l;if(f===0)returnd;if(f>c){varp=A0(f/10);returnp===0?d:p<=c?i[p-1]===void0?l.charAt(1):i[p-1]+l.charAt(1):d}m=i[f-1]}returnm===void0?"":m})}});varmm=C(sl=>{"use strict";sl.parse=G0;sl.serialize=X0;varY0=decodeURIComponent,U0=encodeURIComponent,K0=/; */,uo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;functionG0(t,e){if(typeoft!="string")thrownewTypeError("argument str must be a string");for(varn={},i=e||{},o=t.split(K0),s=i.decode||Y0,a=0;a<o.length;a++){varc=o[a],u=c.indexOf("=");if(!(u<0)){vard=c.substr(0,u).trim(),l=c.substr(++u,c.length).trim();l[0]=='"'&&(l=l.slice(1,-1)),n[d]==null&&(n[d]=Q0(l,s))}}returnn}functionX0(t,e,n){vari=n||{},o=i.encode||U0;if(typeofo!="function")thrownewTypeError("option encode is invalid");if(!uo.test(t))thrownewTypeError("argument name is invalid");vars=o(e);if(s&&!uo.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(!uo.test(i.domain))thrownewTypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!uo.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){varu=typeofi.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(u){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}functionQ0(t,e){try{returne(t)}catch(n){returnt}}});vardl=C((Am,ho)=>{(function(t,e){typeofdefine=="function"&&define.amd?define(e):typeofho=="object"&&ho.exports?ho.expo
`)}:!a.ok&&"detail"in u?{error:u.detail}:u})}function fo(t,e){return ke(this,null,function*(){return yield ym(t,"PATCH",e)})}function Z0(t){return ke(this,null,function*(){return yield ym(t,"GET")})}function Em(t){return ke(this,null,function*(){return yield Z0(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 _m(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 Sm(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*wm(t){for(let e of t.querySelectorAll("td"))e!==null&&se(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Le(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 cl(t,e,n,i=[]){let o=document.createElement(t);if(e!==null)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 Tm(t,e){let n=new Map;for(let i of t){let o=i[e];n.has(o)||n.set(o,i)}return Array.from(n.values())}function eC(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=Le(e,"form"),i=e.getAttribute("href");n!==null&&se(i)&&(n.setAttribute("action",i),n.submit())}}function tC(){for(let t of H("a.formaction"))t.addEventListener("click",eC)}function nC(){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 iC(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]);_m(i),t.preventDefault()}}function rC(){for(let t of H("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>iC(i,t))}}function oC(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 sC(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 aC(){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",()=>oC(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",()=>sC(n))}}var xm={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:{h
`,"").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=Le(this.base,"button[data-reset-select]");e!==null&&e.addEventListener("click",()=>{window.location.assign(window.location.origin+window.location.pathname)})}initRefreshButton(){if(this.allowRefresh){let e=cl("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[cl("i",null,["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),e.type="button",this.slim.slim.search.container.appendChild(e)}}};function dg(){for(let t of H(".netbox-api-select"))new ug(t)}function fg(t){return typeof t.value=="string"&&t.value!==""}function hg(t,e){if(t.slim.singleSelected!==null)if(fg(e)){let n=`#${e.value}`,i=Pi(n);t.slim.singleSelected.container.style.backgroundColor=n,t.slim.singleSelected.container.style.color=i}else t.slim.singleSelected.container.removeAttribute("style")}function pg(){for(let t of H("select.netbox-color-select")){for(let n of t.options)if(fg(n)){let i=`#${n.value}`,o=Pi(i);n.style.backgroundColor=i,n.style.color=o}let e=new $n({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle" style="color: currentColor;"></i>'});for(let n of e.data.data)if("selected"in n&&n.selected){hg(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>hg(e,n)}}function mg(){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 gg(){for(let t of[dg,pg,mg])t()}var Bn="netbox-color-mode",$C="Light Mode",BC="Dark Mode",vg="mdi-lightbulb-on",bg="mdi-lightbulb";function FC(t){return t==="dark"||t==="light"}function zC(t){return localStorage.setItem(Bn,t)}function WC(t){var e,n;document.documentElement.setAttribute(`data-${Bn}`,t);for(let i of H("span.color-mode-text"))t==="light"?i.innerText=BC:t==="dark"&&(i.innerText=$C);for(let i of H("i.color-mode-icon","span.color-mode-icon"))t==="light"?(i.classList.remove(vg),i.classList.add(bg)):t==="dark"&&(i.classList.remove(bg),i.classList.add(vg));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 Ue(t){for(let e of[zC,WC])e(t)}function VC(){let t=localStorage.getItem(Bn);t==="light"?Ue("dark"):t==="dark"?Ue("light"):console.warn("Unable to determine the current color mode")}function YC(){let t=localStorage.getItem(Bn),e=document.documentElement.getAttribute(`data-${Bn}`);if(se(e)&&se(t))return Ue(t);let n="none";for(let i of["dark","light"])if(window.matchMedia(`(prefers-color-scheme:${i})`).matches){n=i;break}if(se(t)&&!se(e)&&FC(t))return Ue(t);switch(n){case"dark":return Ue("dark");case"light":return Ue("light");case"none":return Ue("light");default:return Ue("light")}}function UC(){for(let t of H("button.color-mode-toggle"))t.addEventListener("click",VC)}function yg(){window.addEventListener("load",YC);for(let t of[UC])t()}var Eg=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},So=class{constructor(e,n){G(this,"handlers");G(this,"proxy");G(this,"options");G(this,"key","");if(this.options=n,typeof this.options.key=="string"?this.key=this.options.key:this.key=this.generateStateKey(e),this.options.persist){let i=this.retrieve();i!==null&&(e=V(V({},e),i))}this.handlers=new Eg,this.proxy=new Proxy(e,this.handlers),this.options.persist&&this.save()}generateStateKey(e){return`netbox-${window.btoa(Object.keys(e).join("---"))}`}get(e){return this.handlers.get(this.proxy,e)}set(e,n){this.handlers.set(this.proxy,e,n),this.options.persist&&this.save()}all(){return this.proxy}keys(){return Object.keys(this.proxy)}values(){return Object.values(this.proxy)}save(){let e=JSON.stringify(this.proxy);localStorage.setItem(this.key,e)}retrieve(){let e=loca