(()=>{varNv=Object.create;varGn=Object.defineProperty,Pv=Object.defineProperties,Rv=Object.getOwnPropertyDescriptor,jv=Object.getOwnPropertyDescriptors,Hv=Object.getOwnPropertyNames,Hl=Object.getOwnPropertySymbols,qv=Object.getPrototypeOf,ql=Object.prototype.hasOwnProperty,$v=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={}))ql.call(e,n)&&Ho(t,n,e[n]);if(Hl)for(varnofHl(e))$v.call(e,n)&&Ho(t,n,e[n]);returnt},Xi=(t,e)=>Pv(t,jv(e)),$l=t=>Gn(t,"__esModule",{value:!0});varC=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bv=(t,e)=>{$l(t);for(varnine)Gn(t,n,{get:e[n],enumerable:!0})},Fv=(t,e,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofHv(e))!ql.call(t,i)&&i!=="default"&&Gn(t,i,{get:()=>e[i],enumerable:!(n=Rv(e,i))||n.enumerable});returnt},Ae=t=>Fv($l(Gn(t!=null?Nv(qv(t)):{},"default",t&&t.__esModule&&"default"int?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);varK=(t,e,n)=>(Ho(t,typeofe!="symbol"?e+"":e,n),n);varPe=(t,e,n)=>newPromise((i,o)=>{vars=d=>{try{c(n.next(d))}catch(u){o(u)}},a=d=>{try{c(n.throw(d))}catch(u){o(u)}},c=d=>d.done?i(d.value):Promise.resolve(d.value).then(s,a);c((n=n.apply(t,e)).next())});varme=C((Lk,_u)=>{varSr=function(t){returnt&&t.Math==Math&&t};_u.exports=Sr(typeofglobalThis=="object"&&globalThis)||Sr(typeofwindow=="object"&&window)||Sr(typeofself=="object"&&self)||Sr(typeofglobal=="object"&&global)||function(){returnthis}()||Function("return this")()});varge=C((Dk,Su)=>{Su.exports=function(t){try{return!!t()}catch(e){return!0}}});varPt=C((Mk,wu)=>{var$_=ge();wu.exports=!$_(function(){returnObject.defineProperty({},1,{get:function(){return7}})[1]!=7})});varys=C(Ou=>{"use strict";varTu={}.propertyIsEnumerable,xu=Object.getOwnPropertyDescriptor,B_=xu&&!Tu.call({1:2},1);Ou.f=B_?function(e){varn=xu(this,e);return!!n&&n.enumerable}:Tu});varwr=C((kk,Au)=>{Au.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});varIn=C((Nk,Cu)=>{varF_={}.toString;Cu.exports=function(t){returnF_.call(t).slice(8,-1)}});varyi=C((Pk,Lu)=>{varz_=ge(),W_=In(),V_="".split;Lu.exports=z_(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){returnW_(t)=="String"?V_.call(t,""):Object(t)}:Object});varan=C((Rk,Du)=>{Du.exports=function(t){if(t==null)throwTypeError("Can't call method on "+t);returnt}});varEi=C((jk,Mu)=>{varY_=yi(),U_=an();Mu.exports=function(t){returnY_(U_(t))}});varze=C((Hk,Iu)=>{Iu.exports=function(t){returntypeoft=="object"?t!==null:typeoft=="function"}});varEs=C((qk,ku)=>{varTr=ze();ku.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(($k,Nu)=>{varK_=an();Nu.exports=function(t){returnObject(K_(t))}});varWe=C((Bk,Pu)=>{varG_=ln(),X_={}.hasOwnProperty;Pu.exports=Object.hasOwn||function(e,n){returnX_.call(G_(e),n)}});varSs=C((Fk,ju)=>{varQ_=me(),Ru=ze(),_s=Q_.document,J_=Ru(_s)&&Ru(_s.createElement);ju.exports=function(t){returnJ_?_s.createElement(t):{}}});varws=C((zk,Hu)=>{varZ_=Pt(),eS=ge(),tS=Ss();Hu.exports=!Z_&&!eS(function(){returnObject.defineProperty(tS("div"),"a",{get:function(){return7}}).a!=7})});varTs=C($u=>{varnS=Pt(),iS=ys(),rS=wr(),oS=Ei(),sS=Es(),aS=We(),lS=ws(),qu=Object.getOwnPropertyDescriptor;$u.f=nS?qu:function(e,n){if(e=oS(e),n=sS(n,!0),lS)try{returnqu(e,n)}catch(i){}if(aS(e,n))returnrS(!iS.f.call(e,n),e[n])}});varVe=C((Vk,Bu)=>{varcS=ze();Bu.exports=function(t){if(!cS(t))throwTypeError(String(t)+" is not an object");returnt}});varRt=C(Wu=>{varuS=Pt(),dS=ws(),Fu=Ve(),fS=Es(),zu=Object.defineProperty;Wu.f=uS?zu:function(e,n,i){if(Fu(e),n=fS(n,!0),Fu(i),dS)try{returnzu(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),d=co.call(p?a:n,b),p?d?(d.input=d.input.slice(h),d[0]=d[0].slice(h),d.index=n.lastIndex,n.lastIndex+=d[0].length):n.lastIndex=0:el&&d&&(n.lastIndex=n.global?d.index+d[0].length:c),tl&&d&&d.length>1&&k0.call(d[0],a,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(d[u]=void 0)}),d&&f)for(d.groups=l=L0(null),u=0;u<f.length;u++)m=f[u],l[m[0]]=d[m[1]];return d});om.exports=Za});var nl=C(()=>{"use strict";var P0=wt(),sm=uo();P0({target:"RegExp",proto:!0,forced:/./.exec!==sm},{exec:sm})});var rl=C((KR,um)=>{"use strict";nl();var am=dn(),R0=uo(),lm=ge(),cm=xe(),j0=it(),H0=cm("species"),il=RegExp.prototype;um.exports=function(t,e,n,i){var o=cm(t),s=!lm(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!lm(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[H0]=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],d=e(o,""[t],function(u,l,m,f,p){var v=l.exec;return v===R0||v===il.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:u.call(m,l,f)}:{done:!1}});am(String.prototype,t,d[0]),am(il,o,d[1])}i&&j0(il[o],"sham",!0)}});var ol=C((GR,dm)=>{"use strict";var q0=ma().charAt;dm.exports=function(t,e,n){return e+(n?q0(t,e).length:1)}});var sl=C((XR,fm)=>{var $0=In(),B0=uo();fm.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($0(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return B0.call(t,e)}});var mm=C((JR,pm)=>{var U0=ln(),K0=Math.floor,G0="".replace,X0=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Q0=/\$([$&'`]|\d{1,2})/g;pm.exports=function(t,e,n,i,o,s){vara=n+t.length,c=i.length,d=Q0;returno!==void0&&(o=U0(o),d=X0),G0.call(s,d,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:varf=+l;if(f===0)returnu;if(f>c){varp=K0(f/10);returnp===0?u:p<=c?i[p-1]===void0?l.charAt(1):i[p-1]+l.charAt(1):u}m=i[f-1]}returnm===void0?"":m})}});varEm=C(ul=>{"use strict";ul.parse=gC;ul.serialize=vC;varhC=decodeURIComponent,pC=encodeURIComponent,mC=/; */,mo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;functiongC(t,e){if(typeoft!="string")thrownewTypeError("argument str must be a string");for(varn={},i=e||{},o=t.split(mC),s=i.decode||hC,a=0;a<o.length;a++){varc=o[a],d=c.indexOf("=");if(!(d<0)){varu=c.substr(0,d).trim(),l=c.substr(++d,c.length).trim();l[0]=='"'&&(l=l.slice(1,-1)),n[u]==null&&(n[u]=bC(l,s))}}returnn}functionvC(t,e,n){vari=n||{},o=i.encode||pC;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){vard=typeofi.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(d){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}functionbC(t,e){try{returne(t)}catch(n){returnt}}});varpl=C((qm,vo)=>{(function(t,e){typeofdefine=="function"&&define.amd?define(e):typeofvo=="object"&&vo.exports?vo.expo
`)}:!a.ok&&"detail"in d?{error:d.detail}:d})}function go(t,e){return Pe(this,null,function*(){return yield Tm(t,"PATCH",e)})}function EC(t){return Pe(this,null,function*(){return yield Tm(t,"GET")})}function xm(t){return Pe(this,null,function*(){return yield EC(t)})}function*j(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function re(t){return document.getElementById(t)}function Om(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 Am(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*Cm(t){for(let e of t.querySelectorAll("td"))e!==null&&ee(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 Lm(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 _C(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=Me(e,"form"),i=e.getAttribute("href");n!==null&&ee(i)&&(n.setAttribute("action",i),n.submit())}}function Dm(){for(let t of j("a.formaction"))t.addEventListener("click",_C)}function SC(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]);Om(i),t.preventDefault()}}function Mm(){for(let t of j("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>SC(i,t))}}function Im(){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 km={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 Nm(t){let e=t.options[t.selectedIndex].innerText.toLowerCase();for(let[n,i]of Object.entries(km))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 Tg(){for(let t of j(".netbox-api-select"))new El(t)}function xg(t){return typeof t.value=="string"&&t.value!==""}function Og(t,e){if(t.slim.singleSelected!==null)if(xg(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 Ag(){for(let t of j("select.netbox-color-select")){for(let n of t.options)if(xg(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){Og(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>Og(e,n)}}function Cg(){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 Lg(){for(let t of[Tg,Ag,Cg])t()}function nL(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ee(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 Dg(){for(let t of j("button.cable-toggle"))t.addEventListener("click",()=>nL(t))}var Mg=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){K(this,"handlers");K(this,"proxy");K(this,"options");K(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 Mg,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 _l=Ao({hidden:!1},{persist:!0,key:"netbox-object-depth"});var Sl=Ao({hidden:!1},{persist:!0});function Ig(t,e){e.setAttribute("data-depth-indicators",t?"hidden":"shown"),e.innerText=t?"Show Depth Indicators":"Hide Depth Indicators"}function kg(){for(let t of j(".record-depth"))t.style.display=""}function Ng(){for(let t of j(".record-depth"))t.style.display="none"}function iL(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?Ng():kg(),Ig(i,e)}f