`)&&(h="(?: "+h+")",_=" "+_,y++),c=new RegExp("^(?:"+h+")",v)),al&&(c=new RegExp("^"+h+"$(?!\\s)",v)),sl&&(d=n.lastIndex),u=go.call(g?c:n,_),g?u?(u.input=u.input.slice(y),u[0]=u[0].slice(y),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:sl&&u&&(n.lastIndex=n.global?u.index+u[0].length:d),al&&u&&u.length>1&&CC.call(u[0],c,function(){for(l=1;l<arguments.length-2;l++)arguments[l]===void 0&&(u[l]=void 0)}),u&&p)for(u.groups=m=TC(null),l=0;l<p.length;l++)f=p[l],m[f[0]]=u[f[1]];return u});Dm.exports=ol});var ll=x(()=>{"use strict";var DC=it(),Mm=vo();DC({target:"RegExp",proto:!0,forced:/./.exec!==Mm},{exec:Mm})});var ul=x((t1,Nm)=>{"use strict";ll();var Im=pn(),MC=vo(),km=ye(),Pm=Se(),IC=St(),kC=Pm("species"),cl=RegExp.prototype;Nm.exports=function(t,e,n,i){var o=Pm(t),s=!km(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!km(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[kC]=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 g=l.exec;return g===MC||g===cl.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:u.call(m,l,f)}:{done:!1}});Im(String.prototype,t,d[0]),Im(cl,o,d[1])}i&&IC(cl[o],"sham",!0)}});var dl=x((n1,Rm)=>{"use strict";var PC=_a().charAt;Rm.exports=function(t,e,n){return e+(n?PC(t,e).length:1)}});var fl=x((i1,jm)=>{var NC=Pn(),RC=vo();jm.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(NC(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return RC.call(t,e)}});var $m=x((o1,qm)=>{var FC=dn(),zC=Math.floor,WC="".replace,VC=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,YC=/\$([$&'`]|\d{1,2})/g;qm.exports=function(t,e,n,i,o,s){vara=n+t.length,c=i.length,d=YC;returno!==void0&&(o=FC(o),d=VC),WC.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=zC(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})}});varVm=x(vl=>{"use strict";vl.parse=dL;vl.serialize=fL;varlL=decodeURIComponent,cL=encodeURIComponent,uL=/; */,_o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;functiondL(t,e){if(typeoft!="string")thrownewTypeError("argument str must be a string");for(varn={},i=e||{},o=t.split(uL),s=i.decode||lL,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]=hL(l,s))}}returnn}functionfL(t,e,n){vari=n||{},o=i.encode||cL;if(typeofo!="function")thrownewTypeError("option encode is invalid");if(!_o.test(t))thrownewTypeError("argument name is invalid");vars=o(e);if(s&&!_o.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(!_o.test(i.domain))thrownewTypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!_o.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}functionhL(t,e){try{returne(t)}catch(n){returnt}}});varUm=x((x1,Ym)=>{"use strict";Ym.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16
`)}:!c.ok&&"detail"in u?{error:u.detail}:u})}function So(t,e){return Ne(this,null,function*(){return yield pg(t,"PATCH",e)})}function AL(t){return Ne(this,null,function*(){return yield pg(t,"GET")})}function mg(t){return Ne(this,null,function*(){return yield AL(t)})}function*R(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function ae(t){return document.getElementById(t)}function gg(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 vg(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 zi(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*bg(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 ke(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 Wn(t,e,n=null,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)}n!==null&&n.length>0&&o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function yg(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 CL(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=ke(e,"form"),i=e.getAttribute("href");n!==null&&ie(i)&&(n.setAttribute("action",i),n.submit())}}function Eg(){for(let t of R("a.formaction"))t.addEventListener("click",CL)}function LL(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]);gg(i),t.preventDefault()}}function _g(){for(let t of R("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>LL(i,t))}}function Sg(){for(let t of R("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 _l={vlangroup_edit:{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 Sl(t,e){var n;for(let i of R(t)){let o=(n=i.parentElement)==null?void 0:n.parentElement;o!==null&&(e==="show"?zi(o,"show"):zi(o,"hide"))}}function wg(t,e){let n=e.options[e.selectedIndex].innerText.toLowerCase();for(let[i,o]of Object.entries(_l[t]))if(n.endsWith(i)){for(let s of o.hide)
`,"").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=ke(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=Wn("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[Wn("i",null,["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),e.type="button",this.slim.slim.search.container.appendChild(e)}}};function Gg(){for(let t of R(".netbox-api-select"))new Cl(t)}function Xg(t){return typeof t.value=="string"&&t.value!==""}function Qg(t,e){if(t.slim.singleSelected!==null)if(Xg(e)){let n=`#${e.value}`,i=Vi(n);t.slim.singleSelected.container.style.backgroundColor=n,t.slim.singleSelected.container.style.color=i}else t.slim.singleSelected.container.removeAttribute("style")}function Jg(){for(let t of R("select.netbox-color-select")){for(let n of t.options)if(Xg(n)){let i=`#${n.value}`,o=Vi(i);n.style.backgroundColor=i,n.style.color=o}let e=new Un({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){Qg(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>Qg(e,n)}}function Zg(){for(let t of R(".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 Un({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 ev(){for(let t of[Gg,Jg,Zg])t()}function nD(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ie(e)&&So(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(zn(o)){Vn("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 tv(){for(let t of R("button.cable-toggle"))t.addEventListener("click",()=>nD(t))}var nv=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},Io=class{constructor(e,n){X(this,"handlers");X(this,"proxy");X(this,"options");X(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=K(K({},e),i))}this.handlers=new nv,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 ko(t,e={}){return new Io(t,e)}var Ll=ko({hidden:!1},{persist:!0,key:"netbox-object-depth"});var Dl=ko({hidden:!1},{persist:!0});function iv(t,e){e.setAttribute("data-depth-indicators",t?"hidden":"shown"),e.innerText=t?"Show Depth Indicators":"Hide Depth Indicators"}function rv(){for(let t of R(".record-depth"))t.style.display=""}function ov(){for(let t of R(".record-depth"))t.style.display="none"}function iD(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?ov():rv(),iv(i,e)