UNPKG

modern-error-overlay

Version:

Add a beautiful, modern error overlay to your dev library.

120 lines (119 loc) 40.3 kB
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#error-overlay .fixed{position:fixed}#error-overlay .absolute{position:absolute}#error-overlay .relative{position:relative}#error-overlay .inset-0{top:0px;right:0px;bottom:0px;left:0px}#error-overlay .top-2{top:8px}#error-overlay .right-2{right:8px}#error-overlay .bottom-4{bottom:16px}#error-overlay .left-4{left:16px}#error-overlay .z-\\[9000\\]{z-index:9000}#error-overlay .-z-10{z-index:-10}#error-overlay .mx-auto{margin-left:auto;margin-right:auto}#error-overlay .my-0{margin-top:0;margin-bottom:0}#error-overlay .mt-16{margin-top:64px}#error-overlay .ml-4{margin-left:16px}#error-overlay .box-border{box-sizing:border-box}#error-overlay .block{display:block}#error-overlay .inline-block{display:inline-block}#error-overlay .flex{display:flex}#error-overlay .hidden{display:none}#error-overlay .h-max{height:-webkit-max-content;height:-moz-max-content;height:max-content}#error-overlay .h-5{height:20px}#error-overlay .h-7{height:28px}#error-overlay .max-h-\\[75vh\\]{max-height:75vh}#error-overlay .w-5{width:20px}#error-overlay .w-7{width:28px}#error-overlay .max-w-4xl{max-width:896px}#error-overlay .cursor-not-allowed{cursor:not-allowed}#error-overlay .cursor-pointer{cursor:pointer}#error-overlay .flex-wrap{flex-wrap:wrap}#error-overlay .items-center{align-items:center}#error-overlay .justify-between{justify-content:space-between}#error-overlay .gap-2{gap:8px}#error-overlay .space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(12px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(12px * var(--tw-space-y-reverse))}#error-overlay .space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2px * var(--tw-space-x-reverse));margin-left:calc(2px * calc(1 - var(--tw-space-x-reverse)))}#error-overlay .space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}#error-overlay .space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}#error-overlay .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}#error-overlay .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}#error-overlay .overflow-hidden{overflow:hidden}#error-overlay .overflow-x-auto{overflow-x:auto}#error-overlay .overflow-y-auto{overflow-y:auto}#error-overlay .overflow-x-hidden{overflow-x:hidden}#error-overlay .break-words{overflow-wrap:break-word}#error-overlay .rounded-lg{border-radius:8px}#error-overlay .rounded-md{border-radius:6px}#error-overlay .border-0{border-width:0px}#error-overlay .border-t-4{border-top-width:4px}#error-overlay .border-solid{border-style:solid}#error-overlay .border-none{border-style:none}#error-overlay .border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}#error-overlay .bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}#error-overlay .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}#error-overlay .bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}#error-overlay .bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}#error-overlay .bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}#error-overlay .bg-opacity-10{--tw-bg-opacity: .1 }#error-overlay .bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}#error-overlay .from-purple-400{--tw-gradient-from: #c084fc;--tw-gradient-to: rgb(192 132 252 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) }#error-overlay .to-pink-600{--tw-gradient-to: #db2777 }#error-overlay .bg-clip-text{-webkit-background-clip:text;background-clip:text}#error-overlay .fill-white{fill:#fff}#error-overlay .p-1{padding:4px}#error-overlay .p-0{padding:0}#error-overlay .p-3{padding:12px}#error-overlay .px-4{padding-left:16px;padding-right:16px}#error-overlay .px-5{padding-left:20px;padding-right:20px}#error-overlay .py-3{padding-top:12px;padding-bottom:12px}#error-overlay .py-2{padding-top:8px;padding-bottom:8px}#error-overlay .pt-\\[10vh\\]{padding-top:10vh}#error-overlay .pl-4{padding-left:16px}#error-overlay .pr-5{padding-right:20px}#error-overlay .text-left{text-align:left}#error-overlay .text-center{text-align:center}#error-overlay .font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\"}#error-overlay .text-5xl{font-size:48px;line-height:1}#error-overlay .text-2xl{font-size:24px;line-height:32px}#error-overlay .text-sm{font-size:14px;line-height:20px}#error-overlay .text-base{font-size:16px;line-height:24px}#error-overlay .text-xs{font-size:12px;line-height:16px}#error-overlay .font-semibold{font-weight:600}#error-overlay .text-transparent{color:transparent}#error-overlay .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#error-overlay .text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}#error-overlay .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}#error-overlay .text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}#error-overlay .text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}#error-overlay .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}#error-overlay .text-stone-500{--tw-text-opacity: 1;color:rgb(120 113 108 / var(--tw-text-opacity))}#error-overlay .text-stone-400{--tw-text-opacity: 1;color:rgb(168 162 158 / var(--tw-text-opacity))}#error-overlay .underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}#error-overlay .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#error-overlay .shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#error-overlay .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#error-overlay .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#error-overlay .backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#error-overlay .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#error-overlay .transition-colors{transition-property:color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#error-overlay .hover\\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#error-overlay .hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}#error-overlay .hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}#error-overlay .hover\\:underline:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline}#error-overlay .active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#error-overlay .active\\:bg-red-500:active{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}@media (min-width: 640px){#error-overlay .sm\\:inline-block{display:inline-block}#error-overlay .sm\\:px-7{padding-left:28px;padding-right:28px}#error-overlay .sm\\:py-5{padding-top:20px;padding-bottom:20px}#error-overlay .sm\\:text-3xl{font-size:30px;line-height:36px}#error-overlay .sm\\:text-lg{font-size:18px;line-height:28px}#error-overlay .sm\\:text-2xl{font-size:24px;line-height:32px}#error-overlay .sm\\:text-base{font-size:16px;line-height:24px}#error-overlay .sm\\:text-sm{font-size:14px;line-height:20px}}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();(function(x,g){typeof exports=="object"&&typeof module!="undefined"?g(exports):typeof define=="function"&&define.amd?define(["exports"],g):(x=typeof globalThis!="undefined"?globalThis:x||self,g(x["modern-error-overlay"]={}))})(this,function(x){"use strict";var g=function(e,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},g(e,t)};function M(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");g(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Oe(e,t,r,n){function o(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function s(l){try{c(n.next(l))}catch(y){u(y)}}function a(l){try{c(n.throw(l))}catch(y){u(y)}}function c(l){l.done?i(l.value):o(l.value).then(s,a)}c((n=n.apply(e,t||[])).next())})}function ee(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(c){return function(l){return a([c,l])}}function a(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function I(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],u;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){u={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return i}function P(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function T(e){return this instanceof T?(this.v=e,this):new T(e)}function _e(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},u("next"),u("throw"),u("return"),o[Symbol.asyncIterator]=function(){return this},o;function u(d){n[d]&&(o[d]=function(v){return new Promise(function(b,h){i.push([d,v,b,h])>1||s(d,v)})})}function s(d,v){try{a(n[d](v))}catch(b){y(i[0][3],b)}}function a(d){d.value instanceof T?Promise.resolve(d.value.v).then(c,l):y(i[0][2],d)}function c(d){s("next",d)}function l(d){s("throw",d)}function y(d,v){d(v),i.shift(),i.length&&s(i[0][0],i[0][1])}}function Me(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof I=="function"?I(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(u){return new Promise(function(s,a){u=e[i](u),o(s,a,u.done,u.value)})}}function o(i,u,s,a){Promise.resolve(a).then(function(c){i({value:c,done:s})},u)}}function f(e){return typeof e=="function"}function re(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Y=re(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription: `+r.map(function(n,o){return o+1+") "+n.toString()}).join(` `):"",this.name="UnsubscriptionError",this.errors=r}});function J(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var $=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,o,i;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var s=I(u),a=s.next();!a.done;a=s.next()){var c=a.value;c.remove(this)}}catch(h){t={error:h}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else u.remove(this);var l=this.initialTeardown;if(f(l))try{l()}catch(h){i=h instanceof Y?h.errors:[h]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var d=I(y),v=d.next();!v.done;v=d.next()){var b=v.value;try{oe(b)}catch(h){i=i!=null?i:[],h instanceof Y?i=P(P([],k(i)),k(h.errors)):i.push(h)}}}catch(h){n={error:h}}finally{try{v&&!v.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}if(i)throw new Y(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)oe(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&J(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&J(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),te=$.EMPTY;function ne(e){return e instanceof $||e&&"closed"in e&&f(e.remove)&&f(e.add)&&f(e.unsubscribe)}function oe(e){f(e)?e():e.unsubscribe()}var B={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Q={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Q.delegate;return o!=null&&o.setTimeout?o.setTimeout.apply(o,P([e,t],k(r))):setTimeout.apply(void 0,P([e,t],k(r)))},clearTimeout:function(e){var t=Q.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ie(e){Q.setTimeout(function(){var t=B.onUnhandledError;if(t)t(e);else throw e})}function ue(){}var H=null;function R(e){if(B.useDeprecatedSynchronousErrorHandling){var t=!H;if(t&&(H={errorThrown:!1,error:null}),e(),t){var r=H,n=r.errorThrown,o=r.error;if(H=null,n)throw o}}else e()}var F=function(e){M(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,ne(r)&&r.add(n)):n.destination=Ce,n}return t.create=function(r,n,o){return new q(r,n,o)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}($),Pe=Function.prototype.bind;function W(e,t){return Pe.call(e,t)}var Le=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){z(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){z(n)}else z(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){z(r)}},e}(),q=function(e){M(t,e);function t(r,n,o){var i=e.call(this)||this,u;if(f(r)||!r)u={next:r!=null?r:void 0,error:n!=null?n:void 0,complete:o!=null?o:void 0};else{var s;i&&B.useDeprecatedNextContext?(s=Object.create(r),s.unsubscribe=function(){return i.unsubscribe()},u={next:r.next&&W(r.next,s),error:r.error&&W(r.error,s),complete:r.complete&&W(r.complete,s)}):u=r}return i.destination=new Le(u),i}return t}(F);function z(e){ie(e)}function je(e){throw e}var Ce={closed:!0,next:ue,error:je,complete:ue},V=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function se(e){return e}function Ue(e){return e.length===0?se:e.length===1?e[0]:function(r){return e.reduce(function(n,o){return o(n)},r)}}var p=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var o=this,i=$e(t)?t:new q(t,r,n);return R(function(){var u=o,s=u.operator,a=u.source;i.add(s?s.call(i,a):a?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=ce(r),new r(function(o,i){var u=new q({next:function(s){try{t(s)}catch(a){i(a),u.unsubscribe()}},error:i,complete:o});n.subscribe(u)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[V]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Ue(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=ce(t),new t(function(n,o){var i;r.subscribe(function(u){return i=u},function(u){return o(u)},function(){return n(i)})})},e.create=function(t){return new e(t)},e}();function ce(e){var t;return(t=e!=null?e:B.Promise)!==null&&t!==void 0?t:Promise}function De(e){return e&&f(e.next)&&f(e.error)&&f(e.complete)}function $e(e){return e&&e instanceof F||De(e)&&ne(e)}function Be(e){return f(e==null?void 0:e.lift)}function L(e){return function(t){if(Be(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function j(e,t,r,n,o){return new He(e,t,r,n,o)}var He=function(e){M(t,e);function t(r,n,o,i,u,s){var a=e.call(this,r)||this;return a.onFinalize=u,a.shouldUnsubscribe=s,a._next=n?function(c){try{n(c)}catch(l){r.error(l)}}:e.prototype._next,a._error=i?function(c){try{i(c)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=o?function(){try{o()}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,a}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(F),Re=re(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ae=function(e){M(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new le(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Re},t.prototype.next=function(r){var n=this;R(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var u=I(n.currentObservers),s=u.next();!s.done;s=u.next()){var a=s.value;a.next(r)}}catch(c){o={error:c}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}})},t.prototype.error=function(r){var n=this;R(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var o=n.observers;o.length;)o.shift().error(r)}})},t.prototype.complete=function(){var r=this;R(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,u=o.isStopped,s=o.observers;return i||u?te:(this.currentObservers=null,s.push(r),new $(function(){n.currentObservers=null,J(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,u=n.isStopped;o?r.error(i):u&&r.complete()},t.prototype.asObservable=function(){var r=new p;return r.source=this,r},t.create=function(r,n){return new le(r,n)},t}(p),le=function(e){M(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:te},t}(ae),ze=new p(function(e){return e.complete()});function Ge(e){return e&&f(e.schedule)}function fe(e){return e[e.length-1]}function Ye(e){return Ge(fe(e))?e.pop():void 0}function Je(e,t){return typeof fe(e)=="number"?e.pop():t}var X=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function de(e){return f(e==null?void 0:e.then)}function he(e){return f(e[V])}function ve(e){return Symbol.asyncIterator&&f(e==null?void 0:e[Symbol.asyncIterator])}function pe(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Qe(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ye=Qe();function be(e){return f(e==null?void 0:e[ye])}function me(e){return _e(this,arguments,function(){var r,n,o,i;return ee(this,function(u){switch(u.label){case 0:r=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,T(r.read())];case 3:return n=u.sent(),o=n.value,i=n.done,i?[4,T(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,T(o)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function we(e){return f(e==null?void 0:e.getReader)}function S(e){if(e instanceof p)return e;if(e!=null){if(he(e))return Fe(e);if(X(e))return We(e);if(de(e))return qe(e);if(ve(e))return xe(e);if(be(e))return Ve(e);if(we(e))return Xe(e)}throw pe(e)}function Fe(e){return new p(function(t){var r=e[V]();if(f(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function We(e){return new p(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function qe(e){return new p(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,ie)})}function Ve(e){return new p(function(t){var r,n;try{for(var o=I(e),i=o.next();!i.done;i=o.next()){var u=i.value;if(t.next(u),t.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}t.complete()})}function xe(e){return new p(function(t){Ze(e,t).catch(function(r){return t.error(r)})})}function Xe(e){return xe(me(e))}function Ze(e,t){var r,n,o,i;return Oe(this,void 0,void 0,function(){var u,s;return ee(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=Me(e),a.label=1;case 1:return[4,r.next()];case 2:if(n=a.sent(),!!n.done)return[3,4];if(u=n.value,t.next(u),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=a.sent(),o={error:s},[3,11];case 6:return a.trys.push([6,,9,10]),n&&!n.done&&(i=r.return)?[4,i.call(r)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function m(e,t,r,n,o){n===void 0&&(n=0),o===void 0&&(o=!1);var i=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i}function ge(e,t){return t===void 0&&(t=0),L(function(r,n){r.subscribe(j(n,function(o){return m(n,e,function(){return n.next(o)},t)},function(){return m(n,e,function(){return n.complete()},t)},function(o){return m(n,e,function(){return n.error(o)},t)}))})}function Se(e,t){return t===void 0&&(t=0),L(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function Ke(e,t){return S(e).pipe(Se(t),ge(t))}function Ne(e,t){return S(e).pipe(Se(t),ge(t))}function er(e,t){return new p(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}function rr(e,t){return new p(function(r){var n;return m(r,t,function(){n=e[ye](),m(r,t,function(){var o,i,u;try{o=n.next(),i=o.value,u=o.done}catch(s){r.error(s);return}u?r.complete():r.next(i)},0,!0)}),function(){return f(n==null?void 0:n.return)&&n.return()}})}function Ee(e,t){if(!e)throw new Error("Iterable cannot be null");return new p(function(r){m(r,t,function(){var n=e[Symbol.asyncIterator]();m(r,t,function(){n.next().then(function(o){o.done?r.complete():r.next(o.value)})},0,!0)})})}function tr(e,t){return Ee(me(e),t)}function nr(e,t){if(e!=null){if(he(e))return Ke(e,t);if(X(e))return er(e,t);if(de(e))return Ne(e,t);if(ve(e))return Ee(e,t);if(be(e))return rr(e,t);if(we(e))return tr(e,t)}throw pe(e)}function or(e,t){return t?nr(e,t):S(e)}function Ie(e,t){return L(function(r,n){var o=0;r.subscribe(j(n,function(i){n.next(e.call(t,i,o++))}))})}var ir=Array.isArray;function ur(e,t){return ir(t)?e.apply(void 0,P([],k(t))):e(t)}function sr(e){return Ie(function(t){return ur(e,t)})}function cr(e,t,r,n,o,i,u,s){var a=[],c=0,l=0,y=!1,d=function(){y&&!a.length&&!c&&t.complete()},v=function(h){return c<n?b(h):a.push(h)},b=function(h){i&&t.next(h),c++;var Ae=!1;S(r(h,l++)).subscribe(j(t,function(D){o==null||o(D),i?v(D):t.next(D)},function(){Ae=!0},void 0,function(){if(Ae)try{c--;for(var D=function(){var G=a.shift();u?m(t,u,function(){return b(G)}):b(G)};a.length&&c<n;)D();d()}catch(G){t.error(G)}}))};return e.subscribe(j(t,v,function(){y=!0,d()})),function(){s==null||s()}}function Z(e,t,r){return r===void 0&&(r=1/0),f(t)?Z(function(n,o){return Ie(function(i,u){return t(n,i,o,u)})(S(e(n,o)))},r):(typeof t=="number"&&(r=t),L(function(n,o){return cr(n,o,e,r)}))}function ar(e){return e===void 0&&(e=1/0),Z(se,e)}var lr=["addListener","removeListener"],fr=["addEventListener","removeEventListener"],dr=["on","off"];function E(e,t,r,n){if(f(r)&&(n=r,r=void 0),n)return E(e,t,r).pipe(sr(n));var o=k(pr(e)?fr.map(function(s){return function(a){return e[s](t,a,r)}}):hr(e)?lr.map(ke(e,t)):vr(e)?dr.map(ke(e,t)):[],2),i=o[0],u=o[1];if(!i&&X(e))return Z(function(s){return E(s,t,r)})(S(e));if(!i)throw new TypeError("Invalid event target");return new p(function(s){var a=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return i(a),function(){return u(a)}})}function ke(e,t){return function(r){return function(n){return e[r](t,n)}}}function hr(e){return f(e.addListener)&&f(e.removeListener)}function vr(e){return f(e.on)&&f(e.off)}function pr(e){return f(e.addEventListener)&&f(e.removeEventListener)}function yr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ye(e),n=Je(e,1/0),o=e;return o.length?o.length===1?S(o[0]):ar(n)(or(o,r)):ze}function Te(e,t){return L(function(r,n){var o=0;r.subscribe(j(n,function(i){return e.call(t,i,o++)&&n.next(i)}))})}var br="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJpb25pY29uIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPk9wZW48L3RpdGxlPjxwYXRoIGQ9Ik0zODQgMjI0djE4NGE0MCA0MCAwIDAxLTQwIDQwSDEwNGE0MCA0MCAwIDAxLTQwLTQwVjE2OGE0MCA0MCAwIDAxNDAtNDBoMTY3LjQ4TTMzNiA2NGgxMTJ2MTEyTTIyNCAyODhMNDQwIDcyIiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjMyIi8+PC9zdmc+";function K(e,...t){return e.reduce((r,n)=>{var o;return r+=n+((o=t.shift())!=null?o:"")},"")}function mr(e,t){const{title:r,message:n,path:o,codeFrame:i,stack:u=""}=e[t];return K` <div class="fixed inset-0 z-[9000] pt-[10vh] px-4 box-border"> <div id="error-overlay-background" class="bg-gray-600 bg-opacity-10 inset-0 fixed -z-10 backdrop-blur"></div> <div class="shadow-xl rounded-lg overflow-hidden border-solid border-0 bg-white border-t-4 border-red-400 max-w-4xl mx-auto " > <div class="relative px-5 py-3 sm:px-7 sm:py-5 space-y-3 overflow-y-auto overflow-x-hidden break-words max-h-[75vh] h-max" > <div class="flex items-center gap-2"> <div class="space-x-0.5"> <button id="error-overlay-back-button" class="${t===0?"bg-red-200 cursor-not-allowed":"bg-red-400 hover:bg-red-500 cursor-pointer"} border-none transition-all active:scale-95 p-1 rounded-md text-white shadow" > <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 block" viewBox="0 0 512 512"> <title>Arrow Back</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M244 400L100 256l144-144M120 256h292" /> </svg> </button> <button id="error-overlay-forward-button" class="${t===e.length-1?"bg-red-200 cursor-not-allowed":"bg-red-400 hover:bg-red-500 cursor-pointer"} border-none transition-all active:scale-95 p-1 rounded-md text-white shadow" > <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 block" viewBox="0 0 512 512"> <title>Arrow Forward</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M268 112l144 144-144 144M392 256H100" /> </svg> </button> </div> <div class="text-slate-400">${t+1} of ${e.length} unhandled error</div> </div> <button id="error-overlay-close-button" class="cursor-pointer absolute border-none bg-white top-2 right-2 text-gray-600 hover:text-gray-800 transition-colors" > <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 block sm:inline-block" viewBox="0 0 512 512"> <title>Close</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368" /> </svg> </button> <div> <h1 class="my-0 text-2xl sm:text-3xl font-semibold text-gray-700 text-left p-0">${r}</h1> <div class="text-red-400 font-semibold text-sm sm:text-lg">${n}</div> </div> <div class="space-y-1"> <h2 class="my-0 text-base sm:text-2xl text-gray-700">Source</h2> <a class="text-gray-500 text-sm sm:text-lg hover:underline flex flex-wrap justify-between items-center gap-2" href="vscode://file${o}" > ${o} <img class="h-5 w-5 hidden sm:inline-block" src="${br}" /> </a> <pre class="p-3 text-sm sm:text-base rounded-md bg-gray-900 text-white overflow-x-auto">${i}</pre> </div> ${u&&`<div class="space-y-1"> <h2 class="my-0 text-base sm:text-2xl text-gray-700">Call Stack</h2> <div class="space-y-2"> ${(u+` `).replace(/(.+)\n\s*(.+)\n/g,K`<div class="text-base sm:text-lg text-stone-500"> $1 <a class="text-xs sm:text-sm text-stone-400 ml-4 underline block" href="vscode://file$2">$2</a> </div>`)} </div> </div>`} </div> </div> </div> `}function wr(e){return e===0?"":K` <button id="error-overlay-open-button" class="cursor-pointer border-none fixed bottom-4 left-4 z-[9000] py-2 pl-4 pr-5 bg-red-400 active:bg-red-500 shadow-xl text-white rounded-lg hover:scale-110 transition-all flex items-center space-x-1 text-base" > <svg class="w-7 h-7 fill-white inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <title>Alert Circle</title> <path d="M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" /> <path d="M250.26 166.05L256 288l5.73-121.95a5.74 5.74 0 00-5.79-6h0a5.74 5.74 0 00-5.68 6z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" /> <path d="M256 367.91a20 20 0 1120-20 20 20 0 01-20 20z" /> </svg> <div>Error ${e}</div> </button> `}var Sr="";const C=document.createElement("div");C.id="error-overlay";const w=new ae;let A=[],U=!1,O=0;function N(){document.body.append(C)}window.onload=function(){N()};function xr(e){A.push(e),A.length===1&&(U=!0),U?w.next("open"):w.next("close")}function gr(){A=[],U=!1,O=0,C.innerHTML=""}let _=[];w.pipe(Te(e=>e==="open")).subscribe(()=>{N(),U=!0,C.innerHTML=mr(A,O);const e=document.querySelector("#error-overlay-background"),t=document.querySelector("#error-overlay-close-button"),r=document.querySelector("#error-overlay-back-button"),n=document.querySelector("#error-overlay-forward-button");_.forEach(o=>o.unsubscribe()),_=[],_.push(yr(E(e,"click"),E(t,"click")).subscribe(()=>{w.next("close")}),E(r,"click").subscribe(()=>{O>0&&(O--,w.next("open"))}),E(n,"click").subscribe(()=>{O<A.length-1&&(O++,w.next("open"))}))}),w.pipe(Te(e=>e==="close")).subscribe(()=>{N(),U=!1,C.innerHTML=wr(A.length);const e=document.querySelector("#error-overlay-open-button");_.forEach(t=>t.unsubscribe()),_=[],_.push(E(e,"click").subscribe(()=>{w.next("open")}))}),x.addErrorToOverlay=xr,x.resetErrorOverlay=gr,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});