(()=>{varMv=Object.create;varGn=Object.defineProperty,Iv=Object.defineProperties,kv=Object.getOwnPropertyDescriptor,Nv=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertyNames,Rl=Object.getOwnPropertySymbols,Rv=Object.getPrototypeOf,jl=Object.prototype.hasOwnProperty,jv=Object.prototype.propertyIsEnumerable;varHo=(t,e,n)=>eint?Gn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(varnine||(e={}))jl.call(e,n)&&Ho(t,n,e[n]);if(Rl)for(varnofRl(e))jv.call(e,n)&&Ho(t,n,e[n]);returnt},Xi=(t,e)=>Iv(t,Nv(e)),Hl=t=>Gn(t,"__esModule",{value:!0});varC=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Hv=(t,e)=>{Hl(t);for(varnine)Gn(t,n,{get:e[n],enumerable:!0})},qv=(t,e,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofPv(e))!jl.call(t,i)&&i!=="default"&&Gn(t,i,{get:()=>e[i],enumerable:!(n=kv(e,i))||n.enumerable});returnt},Ae=t=>qv(Hl(Gn(t!=null?Mv(Rv(t)):{},"default",t&&t.__esModule&&"default"int?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);varG=(t,e,n)=>(Ho(t,typeofe!="symbol"?e+"":e,n),n);varPe=(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())});varme=C((Ak,yu)=>{varSr=function(t){returnt&&t.Math==Math&&t};yu.exports=Sr(typeofglobalThis=="object"&&globalThis)||Sr(typeofwindow=="object"&&window)||Sr(typeofself=="object"&&self)||Sr(typeofglobal=="object"&&global)||function(){returnthis}()||Function("return this")()});varge=C((Ck,Eu)=>{Eu.exports=function(t){try{return!!t()}catch(e){return!0}}});varPt=C((Lk,_u)=>{varj_=ge();_u.exports=!j_(function(){returnObject.defineProperty({},1,{get:function(){return7}})[1]!=7})});varys=C(Tu=>{"use strict";varSu={}.propertyIsEnumerable,wu=Object.getOwnPropertyDescriptor,H_=wu&&!Su.call({1:2},1);Tu.f=H_?function(e){varn=wu(this,e);return!!n&&n.enumerable}:Su});varwr=C((Mk,xu)=>{xu.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});varIn=C((Ik,Ou)=>{varq_={}.toString;Ou.exports=function(t){returnq_.call(t).slice(8,-1)}});varyi=C((kk,Au)=>{var$_=ge(),B_=In(),F_="".split;Au.exports=$_(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){returnB_(t)=="String"?F_.call(t,""):Object(t)}:Object});varan=C((Nk,Cu)=>{Cu.exports=function(t){if(t==null)throwTypeError("Can't call method on "+t);returnt}});varEi=C((Pk,Lu)=>{varz_=yi(),W_=an();Lu.exports=function(t){returnz_(W_(t))}});varze=C((Rk,Du)=>{Du.exports=function(t){returntypeoft=="object"?t!==null:typeoft=="function"}});varEs=C((jk,Mu)=>{varTr=ze();Mu.exports=function(t,e){if(!Tr(t))returnt;varn,i;if(e&&typeof(n=t.toString)=="function"&&!Tr(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!Tr(i=n.call(t))||!e&&typeof(n=t.toString)=="function"&&!Tr(i=n.call(t)))returni;throwTypeError("Can't convert object to primitive value")}});varln=C((Hk,Iu)=>{varV_=an();Iu.exports=function(t){returnObject(V_(t))}});varWe=C((qk,ku)=>{varY_=ln(),U_={}.hasOwnProperty;ku.exports=Object.hasOwn||function(e,n){returnU_.call(Y_(e),n)}});varSs=C(($k,Pu)=>{varK_=me(),Nu=ze(),_s=K_.document,G_=Nu(_s)&&Nu(_s.createElement);Pu.exports=function(t){returnG_?_s.createElement(t):{}}});varws=C((Bk,Ru)=>{varX_=Pt(),Q_=ge(),J_=Ss();Ru.exports=!X_&&!Q_(function(){returnObject.defineProperty(J_("div"),"a",{get:function(){return7}}).a!=7})});varTs=C(Hu=>{varZ_=Pt(),eS=ys(),tS=wr(),nS=Ei(),iS=Es(),rS=We(),oS=ws(),ju=Object.getOwnPropertyDescriptor;Hu.f=Z_?ju:function(e,n){if(e=nS(e),n=iS(n,!0),oS)try{returnju(e,n)}catch(i){}if(rS(e,n))returntS(!eS.f.call(e,n),e[n])}});varVe=C((zk,qu)=>{varsS=ze();qu.exports=function(t){if(!sS(t))throwTypeError(String(t)+" is not an object");returnt}});varRt=C(Fu=>{varaS=Pt(),lS=ws(),$u=Ve(),cS=Es(),Bu=Object.defineProperty;Fu.f=aS?Bu:function(e,n,i){if($u(e),n=cS(n,!0),$u(i),lS)try{returnBu(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)),tl&&(a=new RegExp("^"+y+"$(?!\\s)",v)),el&&(c=n.lastIndex),u=co.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:el&&u&&(n.lastIndex=n.global?u.index+u[0].length:c),tl&&u&&u.length>1&&D0.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=O0(null),d=0;d<f.length;d++)m=f[d],l[m[0]]=u[m[1]];return u});im.exports=Za});var nl=C(()=>{"use strict";var I0=wt(),rm=uo();I0({target:"RegExp",proto:!0,forced:/./.exec!==rm},{exec:rm})});var rl=C((YR,lm)=>{"use strict";nl();var om=dn(),k0=uo(),sm=ge(),am=xe(),N0=it(),P0=am("species"),il=RegExp.prototype;lm.exports=function(t,e,n,i){var o=am(t),s=!sm(function(){var d={};return d[o]=function(){return 7},""[t](d)!=7}),a=s&&!sm(function(){var d=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[P0]=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===k0||v===il.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:d.call(m,l,f)}:{done:!1}});om(String.prototype,t,u[0]),om(il,o,u[1])}i&&N0(il[o],"sham",!0)}});var ol=C((UR,cm)=>{"use strict";var R0=ma().charAt;cm.exports=function(t,e,n){return e+(n?R0(t,e).length:1)}});var sl=C((KR,um)=>{var j0=In(),H0=uo();um.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(j0(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return H0.call(t,e)}});var hm=C((XR,fm)=>{var W0=ln(),V0=Math.floor,Y0="".replace,U0=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,K0=/\$([$&'`]|\d{1,2})/g;fm.exports=function(t,e,n,i,o,s){vara=n+t.length,c=i.length,u=K0;returno!==void0&&(o=W0(o),u=U0),Y0.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=V0(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})}});varbm=C(ul=>{"use strict";ul.parse=hC;ul.serialize=pC;varuC=decodeURIComponent,dC=encodeURIComponent,fC=/; */,mo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;functionhC(t,e){if(typeoft!="string")thrownewTypeError("argument str must be a string");for(varn={},i=e||{},o=t.split(fC),s=i.decode||uC,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]=mC(l,s))}}returnn}functionpC(t,e,n){vari=n||{},o=i.encode||dC;if(typeofo!="function")thrownewTypeError("option encode is invalid");if(!mo.test(t))thrownewTypeError("argument name is invalid");vars=o(e);if(s&&!mo.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(!mo.test(i.domain))thrownewTypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!mo.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}functionmC(t,e){try{returne(t)}catch(n){returnt}}});varpl=C((jm,vo)=>{(function(t,e){typeofdefine=="function"&&define.amd?define(e):typeofvo=="object"&&vo.exports?vo.expo
`)}:!a.ok&&"detail"in u?{error:u.detail}:u})}function go(t,e){return Pe(this,null,function*(){return yield Sm(t,"PATCH",e)})}function vC(t){return Pe(this,null,function*(){return yield Sm(t,"GET")})}function wm(t){return Pe(this,null,function*(){return yield vC(t)})}function*j(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function te(t){return document.getElementById(t)}function Tm(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 xm(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 De(t,e){t!==null&&(typeof e=="undefined"?window.getComputedStyle(t).display==="none"?t.style.display="":t.style.display="none":e==="show"?t.style.display="":t.style.display="none")}function*Om(t){for(let e of t.querySelectorAll("td"))e!==null&&ae(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Me(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 fl(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 Am(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 bC(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=Me(e,"form"),i=e.getAttribute("href");n!==null&&ae(i)&&(n.setAttribute("action",i),n.submit())}}function Cm(){for(let t of j("a.formaction"))t.addEventListener("click",bC)}function yC(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]);Tm(i),t.preventDefault()}}function Lm(){for(let t of j("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>yC(i,t))}}function Dm(){for(let t of j("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)}}var Mm={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 hl(t,e){var n;for(let i of j(t)){let o=(n=i.parentElement)==null?void 0:n.parentElement;o!==null&&(e==="show"?De(o,"show"):De(o,"hide"))}}function Im(t){let e=t.options[t.selectedIndex].innerText.toLowerCase();for(let[n,i]of Object.entries(Mm))if(e.endsWith(n)){for(let o of i.hide)hl(`#${o}`,"hide");for(let o of i.show)hl(`#${o}`
`,"").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=Me(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=fl("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[fl("i",null,["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),e.type="button",this.slim.slim.search.container.appendChild(e)}}};function _g(){for(let t of j(".netbox-api-select"))new Eg(t)}function Sg(t){return typeof t.value=="string"&&t.value!==""}function wg(t,e){if(t.slim.singleSelected!==null)if(Sg(e)){let n=`#${e.value}`,i=qi(n);t.slim.singleSelected.container.style.backgroundColor=n,t.slim.singleSelected.container.style.color=i}else t.slim.singleSelected.container.removeAttribute("style")}function Tg(){for(let t of j("select.netbox-color-select")){for(let n of t.options)if(Sg(n)){let i=`#${n.value}`,o=qi(i);n.style.backgroundColor=i,n.style.color=o}let e=new Fn({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){wg(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>wg(e,n)}}function xg(){for(let t of j(".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 Fn({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 Og(){for(let t of[_g,Tg,xg])t()}function eL(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ae(e)&&go(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(qn(o)){$n("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 Ag(){for(let t of j("button.cable-toggle"))t.addEventListener("click",()=>eL(t))}var Cg=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},Oo=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 Cg,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=localStorage.getItem(this.key);return e!==null?JSON.parse(e):null}};function Ao(t,e={}){return new Oo(t,e)}var yl=Ao({hidden:!1},{persist:!0,key:"netbox-object-depth"});var El=Ao({hidden:!1},{persist:!0});function Lg(t,e){e.setAttribute("data-depth-indicators",t?"hidden":"shown"),e.innerText=t?"Show Depth Indicators":"Hide Depth Indicators"}function Dg(){for(let t of j(".record-depth"))t.style.display=""}function Mg(){for(let t of j(".record-depth"))t.style.display="none"}function tL(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?Mg():Dg(),Lg(i,e)}f