UNPKG

@bull-board/ui

Version:

A Dashboard UI built on top of bull or bullmq.

1 lines 10.4 kB
(self.webpackChunk_bull_board_ui=self.webpackChunk_bull_board_ui||[]).push([["90409"],{10288(t,e,r){var o="u">typeof globalThis&&globalThis||"u">typeof self&&self||void 0!==r.g&&r.g,n=function(){function t(){this.fetch=!1,this.DOMException=o.DOMException}return t.prototype=o,new t}();(function(t){var e=void 0!==n&&n||"u">typeof self&&self||void 0!==r.g&&r.g||{},o={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(o.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function h(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o.iterable&&(e[Symbol.iterator]=function(){return e}),e}function u(t){this.map={},t instanceof u?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){if(2!=t.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function c(t){if(!t._noBody){if(t.bodyUsed)return Promise.reject(TypeError("Already read"));t.bodyUsed=!0}}function d(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function l(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this.bodyUsed=this.bodyUsed,this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(o.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(o.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else{var e;o.arrayBuffer&&o.blob&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=c(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(o.blob)return this.blob().then(l);throw Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,o,n,s=c(this);if(s)return s;if(this._bodyBlob)return t=this._bodyBlob,r=d(e=new FileReader),n=(o=/charset=([A-Za-z0-9_-]+)/.exec(t.type))?o[1]:"utf-8",e.readAsText(t,n),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},o.formData&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(t,e){t=a(t),e=h(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},u.prototype.delete=function(t){delete this.map[a(t)]},u.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},u.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},u.prototype.set=function(t,e){this.map[a(t)]=h(e)},u.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},u.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},u.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},u.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},o.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var b=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function m(t,r){if(!(this instanceof m))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var o,n,s=(r=r||{}).body;if(t instanceof m){if(t.bodyUsed)throw TypeError("Already read");this.url=t.url,this.credentials=t.credentials,r.headers||(this.headers=new u(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,s||null==t._bodyInit||(s=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=r.credentials||this.credentials||"same-origin",(r.headers||!this.headers)&&(this.headers=new u(r.headers)),this.method=(n=(o=r.method||this.method||"GET").toUpperCase(),b.indexOf(n)>-1?n:o),this.mode=r.mode||this.mode||null,this.signal=r.signal||this.signal||function(){if("AbortController"in e)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),("GET"===this.method||"HEAD"===this.method)&&("no-store"===r.cache||"no-cache"===r.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function w(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}}),e}function E(t,e){if(!(this instanceof E))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new u(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},p.call(m.prototype),p.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},E.error=function(){var t=new E(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var v=[301,302,303,307,308];E.redirect=function(t,e){if(-1===v.indexOf(e))throw RangeError("Invalid status code");return new E(null,{status:e,headers:{location:t}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(r,n){return new Promise(function(s,i){var f=new m(r,n);if(f.signal&&f.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function d(){c.abort()}if(c.onload=function(){var t,e,r={statusText:c.statusText,headers:(t=c.getAllResponseHeaders()||"",e=new u,t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();try{e.append(o,n)}catch(t){console.warn("Response "+t.message)}}}),e)};0===f.url.indexOf("file://")&&(c.status<200||c.status>599)?r.status=200:r.status=c.status,r.url="responseURL"in c?c.responseURL:r.headers.get("X-Request-URL");var o="response"in c?c.response:c.responseText;setTimeout(function(){s(new E(o,r))},0)},c.onerror=function(){setTimeout(function(){i(TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){i(TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){i(new t.DOMException("Aborted","AbortError"))},0)},c.open(f.method,function(t){try{return""===t&&e.location.href?e.location.href:t}catch(e){return t}}(f.url),!0),"include"===f.credentials?c.withCredentials=!0:"omit"===f.credentials&&(c.withCredentials=!1),"responseType"in c&&(o.blob?c.responseType="blob":o.arrayBuffer&&(c.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof u||e.Headers&&n.headers instanceof e.Headers)){var l=[];Object.getOwnPropertyNames(n.headers).forEach(function(t){l.push(a(t)),c.setRequestHeader(t,h(n.headers[t]))}),f.headers.forEach(function(t,e){-1===l.indexOf(e)&&c.setRequestHeader(e,t)})}else f.headers.forEach(function(t,e){c.setRequestHeader(e,t)});f.signal&&(f.signal.addEventListener("abort",d),c.onreadystatechange=function(){4===c.readyState&&f.signal.removeEventListener("abort",d)}),c.send(void 0===f._bodyInit?null:f._bodyInit)})}_.polyfill=!0,e.fetch||(e.fetch=_,e.Headers=u,e.Request=m,e.Response=E),t.Headers=u,t.Request=m,t.Response=E,t.fetch=_})({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=o.fetch?o:n;(e=s.fetch).default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e}}]);