1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/project-static/dist/netbox.js

68 lines
311 KiB
JavaScript
Raw Normal View History

(()=>{var Nv=Object.create;var Gn=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;var Ho=(t,e,n)=>e in t?Gn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(var n in e||(e={}))ql.call(e,n)&&Ho(t,n,e[n]);if(Hl)for(var n of Hl(e))$v.call(e,n)&&Ho(t,n,e[n]);return t},Xi=(t,e)=>Pv(t,jv(e)),$l=t=>Gn(t,"__esModule",{value:!0});var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bv=(t,e)=>{$l(t);for(var n in e)Gn(t,n,{get:e[n],enumerable:!0})},Fv=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Hv(e))!ql.call(t,i)&&i!=="default"&&Gn(t,i,{get:()=>e[i],enumerable:!(n=Rv(e,i))||n.enumerable});return t},Ae=t=>Fv($l(Gn(t!=null?Nv(qv(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var K=(t,e,n)=>(Ho(t,typeof e!="symbol"?e+"":e,n),n);var Pe=(t,e,n)=>new Promise((i,o)=>{var s=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())});var me=C((Lk,_u)=>{var Sr=function(t){return t&&t.Math==Math&&t};_u.exports=Sr(typeof globalThis=="object"&&globalThis)||Sr(typeof window=="object"&&window)||Sr(typeof self=="object"&&self)||Sr(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var ge=C((Dk,Su)=>{Su.exports=function(t){try{return!!t()}catch(e){return!0}}});var Pt=C((Mk,wu)=>{var $_=ge();wu.exports=!$_(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var ys=C(Ou=>{"use strict";var Tu={}.propertyIsEnumerable,xu=Object.getOwnPropertyDescriptor,B_=xu&&!Tu.call({1:2},1);Ou.f=B_?function(e){var n=xu(this,e);return!!n&&n.enumerable}:Tu});var wr=C((kk,Au)=>{Au.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var In=C((Nk,Cu)=>{var F_={}.toString;Cu.exports=function(t){return F_.call(t).slice(8,-1)}});var yi=C((Pk,Lu)=>{var z_=ge(),W_=In(),V_="".split;Lu.exports=z_(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return W_(t)=="String"?V_.call(t,""):Object(t)}:Object});var an=C((Rk,Du)=>{Du.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}});var Ei=C((jk,Mu)=>{var Y_=yi(),U_=an();Mu.exports=function(t){return Y_(U_(t))}});var ze=C((Hk,Iu)=>{Iu.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}});var Es=C((qk,ku)=>{var Tr=ze();ku.exports=function(t,e){if(!Tr(t))return t;var n,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)))return i;throw TypeError("Can't convert object to primitive value")}});var ln=C(($k,Nu)=>{var K_=an();Nu.exports=function(t){return Object(K_(t))}});var We=C((Bk,Pu)=>{var G_=ln(),X_={}.hasOwnProperty;Pu.exports=Object.hasOwn||function(e,n){return X_.call(G_(e),n)}});var Ss=C((Fk,ju)=>{var Q_=me(),Ru=ze(),_s=Q_.document,J_=Ru(_s)&&Ru(_s.createElement);ju.exports=function(t){return J_?_s.createElement(t):{}}});var ws=C((zk,Hu)=>{var Z_=Pt(),eS=ge(),tS=Ss();Hu.exports=!Z_&&!eS(function(){return Object.defineProperty(tS("div"),"a",{get:function(){return 7}}).a!=7})});var Ts=C($u=>{var nS=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{return qu(e,n)}catch(i){}if(aS(e,n))return rS(!iS.f.call(e,n),e[n])}});var Ve=C((Vk,Bu)=>{var cS=ze();Bu.exports=function(t){if(!cS(t))throw TypeError(String(t)+" is not an object");return t}});var Rt=C(Wu=>{var uS=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{return zu(e,n,i)}catch(o){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[n]=i.v
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var fh=C((oP,dh)=>{var xx=an(),Ox=ha(),Vr="["+Ox+"]",Ax=RegExp("^"+Vr+Vr+"*"),Cx=RegExp(Vr+Vr+"*$"),pa=function(t){return function(e){var n=String(xx(e));return t&1&&(n=n.replace(Ax,"")),t&2&&(n=n.replace(Cx,"")),n}};dh.exports={start:pa(1),end:pa(2),trim:pa(3)}});var mh=C((sP,ph)=>{var Lx=me(),Dx=fh().trim,hh=ha(),Yr=Lx.parseInt,Mx=/^[+-]?0[Xx]/,Ix=Yr(hh+"08")!==8||Yr(hh+"0x16")!==22;ph.exports=Ix?function(e,n){var i=Dx(String(e));return Yr(i,n>>>0||(Mx.test(i)?16:10))}:Yr});var ma=C((lP,bh)=>{var Nx=wi(),Px=an(),vh=function(t){return function(e,n){var i=String(Px(e)),o=Nx(n),s=i.length,a,c;return o<0||o>=s?t?"":void 0:(a=i.charCodeAt(o),a<55296||a>56319||o+1===s||(c=i.charCodeAt(o+1))<56320||c>57343?t?i.charAt(o):a:t?i.slice(o,o+2):(a-55296<<10)+(c-56320)+65536)}};bh.exports={codeAt:vh(!1),charAt:vh(!0)}});var ga=C((uP,_h)=>{var $x=dn();_h.exports=function(t,e,n){for(var i in e)$x(t,i,e[i],n);return t}});var wh=C((dP,Sh)=>{var Bx=ge();Sh.exports=!Bx(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Ur=C((fP,Th)=>{var Fx=_i(),zx=ze(),va=We(),Wx=Rt().f,Vx=Lr(),Yx=wh(),pn=Vx("meta"),Ux=0,ba=Object.isExtensible||function(){return!0},ya=function(t){Wx(t,pn,{value:{objectID:"O"+ ++Ux,weakData:{}}})},Kx=function(t,e){if(!zx(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!va(t,pn)){if(!ba(t))return"F";if(!e)return"E";ya(t)}return t[pn].objectID},Gx=function(t,e){if(!va(t,pn)){if(!ba(t))return!0;if(!e)return!1;ya(t)}return t[pn].weakData},Xx=function(t){return Yx&&Qx.REQUIRED&&ba(t)&&!va(t,pn)&&ya(t),t},Qx=Th.exports={REQUIRED:!1,fastKey:Kx,getWeakData:Gx,onFreeze:Xx};Fx[pn]=!0});var Oh=C((hP,xh)=>{var Jx=xe(),Zx=kn(),eO=Jx("iterator"),tO=Array.prototype;xh.exports=function(t){return t!==void 0&&(Zx.Array===t||tO[eO]===t)}});var Ch=C((pP,Ah)=>{var nO=fa(),iO=kn(),rO=xe(),oO=rO("iterator");Ah.exports=function(t){if(t!=null)return t[oO]||t["@@iterator"]||iO[nO(t)]}});var Dh=C((mP,Lh)=>{var sO=Ve();Lh.exports=function(t){var e=t.return;if(e!==void 0)return sO(e.call(t)).value}});var Ea=C((gP,Ih)=>{var aO=Ve(),lO=Oh(),cO=fn(),uO=qs(),dO=Ch(),Mh=Dh(),Li=function(t,e){this.stopped=t,this.result=e};Ih.exports=function(t,e,n){var i=n&&n.that,o=!!(n&&n.AS_ENTRIES),s=!!(n&&n.IS_ITERATOR),a=!!(n&&n.INTERRUPTED),c=uO(e,i,1+o+a),d,u,l,m,f,p,v,y=function(b){return d&&Mh(d),new Li(!0,b)},h=function(b){return o?(aO(b),a?c(b[0],b[1],y):c(b[0],b[1])):a?c(b,y):c(b)};if(s)d=t;else{if(u=dO(t),typeof u!="function")throw TypeError("Target is not iterable");if(lO(u)){for(l=0,m=cO(t.length);m>l;l++)if(f=h(t[l]),f&&f instanceof Li)return f;return new Li(!1)}d=u.call(t)}for(p=d.next;!(v=p.call(d)).done;){try{f=h(v.value)}catch(b){throw Mh(d),b}if(typeof f=="object"&&f&&f instanceof Li)return f}return new Li(!1)}});var _a=C((vP,kh)=>{kh.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}});var Hh=C((bP,jh)=>{var fO=xe(),Nh=fO("iterator"),Ph=!1;try{Rh=0,Sa={next:function(){return{done:!!Rh++}},return:function(){Ph=!0}},Sa[Nh]=function(){return this},Array.from(Sa,function(){throw 2})}catch(t){}var Rh,Sa;jh.exports=function(t,e){if(!e&&!Ph)return!1;var n=!1;try{var i={};i[Nh]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(o){}return n}});var Bh=C((yP,$h)=>{var hO=ze(),qh=oa();$h.exports=function(t,e,n){var i,o;return qh&&typeof(i=e.constructor)=="function"&&i!==n&&hO(o=i.prototype)&&o!==n.prototype&&qh(t,o),t}});var Wh=C((EP,zh)=>{"use strict";var pO=wt(),mO=me(),Fh=Rs(),gO=dn(),vO=Ur(),bO=Ea(),yO=_a(),wa=ze(),Ta=ge(),EO=Hh(),_O=$r(),SO=Bh();zh.exports=function(t,e,n){var i=t.indexOf("Map")!==-1,o=t.indexOf("Weak")!==-1,s=i?"set":"add",a=mO[t],c=a&&a.prototype,d=a,u={},l=function(b){var S=c[b];gO(c,b,b=="add"?function(O){return S.call(this,O===0?0:O),this}:b=="delete"?function(A){return o&&!wa(A)?!1:S.call(this,A===0?0:A)}:b=="get"?function(O){return o&&!wa(O)?void 0:S.call(this,O===0?0:O)}:b=="has"?function(O){retu
`)&&t.flags==="s")})});var nm=C((WR,tm)=>{var O0=ge();tm.exports=O0(function(){var t=RegExp("(?<a>b)","string".charAt(5));return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"})});var uo=C((VR,om)=>{"use strict";var A0=Gp(),im=Jp(),C0=Cr(),L0=qr(),D0=un().get,M0=em(),I0=nm(),co=RegExp.prototype.exec,k0=C0("native-string-replace",String.prototype.replace),Za=co,el=function(){var t=/a/,e=/b*/g;return co.call(t,"a"),co.call(e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),rm=im.UNSUPPORTED_Y||im.BROKEN_CARET,tl=/()??/.exec("")[1]!==void 0,N0=el||tl||rm||M0||I0;N0&&(Za=function(e){var n=this,i=D0(n),o=i.raw,s,a,c,d,u,l,m;if(o)return o.lastIndex=n.lastIndex,s=Za.call(o,e),n.lastIndex=o.lastIndex,s;var f=i.groups,p=rm&&n.sticky,v=A0.call(n),y=n.source,h=0,b=e;if(p&&(v=v.replace("y",""),v.indexOf("g")===-1&&(v+="g"),b=String(e).slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&e[n.lastIndex-1]!==`
`)&&(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){var a=n+t.length,c=i.length,d=Q0;return o!==void 0&&(o=U0(o),d=X0),G0.call(s,d,function(u,l){var m;switch(l.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(a);case"<":m=o[l.slice(1,-1)];break;default:var f=+l;if(f===0)return u;if(f>c){var p=K0(f/10);return p===0?u:p<=c?i[p-1]===void 0?l.charAt(1):i[p-1]+l.charAt(1):u}m=i[f-1]}return m===void 0?"":m})}});var Em=C(ul=>{"use strict";ul.parse=gC;ul.serialize=vC;var hC=decodeURIComponent,pC=encodeURIComponent,mC=/; */,mo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function gC(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var n={},i=e||{},o=t.split(mC),s=i.decode||hC,a=0;a<o.length;a++){var c=o[a],d=c.indexOf("=");if(!(d<0)){var u=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))}}return n}function vC(t,e,n){var i=n||{},o=i.encode||pC;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!mo.test(t))throw new TypeError("argument name is invalid");var s=o(e);if(s&&!mo.test(s))throw new TypeError("argument val is invalid");var a=t+"="+s;if(i.maxAge!=null){var c=i.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(i.domain){if(!mo.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!mo.test(i.path))throw new TypeError("option path is invalid");a+="; Path="+i.path}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var d=typeof i.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:throw new TypeError("option sameSite is invalid")}}return a}function bC(t,e){try{return e(t)}catch(n){return t}}});var pl=C((qm,vo)=>{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof vo=="object"&&vo.exports?vo.expo
<span class='flatpickr-weekday'>
`+E.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function pv(){r.calendarContainer.classList.add("hasWeeks");var g=u("div","flatpickr-weekwrapper");g.appendChild(u("span","flatpickr-weekday",r.l10n.weekAbbreviation));var E=u("div","flatpickr-weeks");return g.appendChild(E),{weekWrapper:g,weekNumbers:E}}function Do(g,E){E===void 0&&(E=!0);var w=E?g:g-r.currentMonth;w<0&&r._hidePrevMonthArrow===!0||w>0&&r._hideNextMonthArrow===!0||(r.currentMonth+=w,(r.currentMonth<0||r.currentMonth>11)&&(r.currentYear+=r.currentMonth>11?1:-1,r.currentMonth=(r.currentMonth+12)%12,Z("onYearChange"),Wn()),zi(),Z("onMonthChange"),Ui())}function mv(g,E){g===void 0&&(g=!0),E===void 0&&(E=!0),r.input.value="",r.altInput!==void 0&&(r.altInput.value=""),r.mobileInput!==void 0&&(r.mobileInput.value=""),r.selectedDates=[],r.latestSelectedDateObj=void 0,E===!0&&(r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth()),r.showTimeInput=!1,r.config.enableTime===!0&&Ee(),r.redraw(),g&&Z("onChange")}function gv(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),Z("onClose")}function vv(){r.config!==void 0&&Z("onDestroy");for(var g=r._handlers.length;g--;){var E=r._handlers[g];E.element.removeEventListener(E.event,E.handler,E.options)}if(r._handlers=[],r.mobileInput)r.mobileInput.parentNode&&r.mobileInput.parentNode.removeChild(r.mobileInput),r.mobileInput=void 0;else if(r.calendarContainer&&r.calendarContainer.parentNode)if(r.config.static&&r.calendarContainer.parentNode){var w=r.calendarContainer.parentNode;if(w.lastChild&&w.removeChild(w.lastChild),w.parentNode){for(;w.firstChild;)w.parentNode.insertBefore(w.firstChild,w);w.parentNode.removeChild(w)}}else r.calendarContainer.parentNode.removeChild(r.calendarContainer);r.altInput&&(r.input.type="text",r.altInput.parentNode&&r.altInput.parentNode.removeChild(r.altInput),delete r.altInput),r.input&&(r.input.type=r.input._type,r.input.classList.remove("flatpickr-input"),r.input.removeAttribute("readonly"),r.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(I){try{delete r[I]}catch(R){}})}function Vn(g){return r.config.appendTo&&r.config.appendTo.contains(g)?!0:r.calendarContainer.contains(g)}function Mo(g){if(r.isOpen&&!r.config.inline){var E=p(g),w=Vn(E),I=E===r.input||E===r.altInput||r.element.contains(E)||g.path&&g.path.indexOf&&(~g.path.indexOf(r.input)||~g.path.indexOf(r.altInput)),R=g.type==="blur"?I&&g.relatedTarget&&!Vn(g.relatedTarget):!I&&!w&&!Vn(g.relatedTarget),P=!r.config.ignoredFocusElements.some(function(q){return q.contains(E)});R&&P&&(r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&te(),r.close(),r.config.mode==="range"&&r.selectedDates.length===1&&(r.clear(!1),r.redraw()))}}function Wi(g){if(!(!g||r.config.minDate&&g<r.config.minDate.getFullYear()||r.config.maxDate&&g>r.config.maxDate.getFullYear())){var E=g,w=r.currentYear!==E;r.currentYear=E||r.currentYear,r.config.maxDate&&r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth=Math.min(r.config.maxDate.getMonth(),r.currentMonth):r.config.minDate&&r.currentYear===r.config.minDate.getFullYear()&&(r.currentMonth=Math.max(r.config.minDate.getMonth(),r.currentMonth)),w&&(r.redraw(),Z("onYearChange"),Wn())}}function Bt(g,E){E===void 0&&(E=!0);var w=r.parseDate(g,void 0,E);if(r.config.minDate&&w&&k(w,r.config.minDate,E!==void 0?E:!r.minDateHasTime)<0||r.config.maxDate&&w&&k(w,r.config.maxDate,E!==void 0?E:!r.maxDateHasTime)>0)return!1;if(r.config.enable.length===0&&r.config.disable.length===0)return!0;if(w===void 0)return!1;for(var I=r.
`)}:!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}`
div.ss-values div.ss-value[data-id="${n}"],
div.ss-list div.ss-option:not(.ss-disabled)[data-id="${n}"]
{
background-color: ${s} !important;
color: ${a} !important;
}
`.replaceAll(`
`,"").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
/* flatpickr v4.6.3, @license MIT */
/*!
* Bootstrap v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
/*!
* Masonry v4.2.2
* Cascading grid layout library
* https://masonry.desandro.com
* MIT License
* by David DeSandro
*/
/*!
* Outlayer v2.1.1
* the brains and guts of a layout library
* MIT license
*/
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/*!
* getSize v2.0.3
* measure size of elements
* MIT license
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
//# sourceMappingURL=netbox.js.map