amis-rpc-design/dist/css.worker.js

2 lines
986 KiB
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/*! For license information please see css.worker.js.LICENSE.txt */
(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Yo("return this")()}catch(e){if("object"==typeof window)return window}}();const t=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(s.isErrorNoTelemetry(e))throw new s(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function n(e){var n;(n=e)instanceof o||n instanceof Error&&n.name===r&&n.message===r||t.onUnexpectedError(e)}function i(e){if(e instanceof Error){const{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack,noTelemetry:s.isErrorNoTelemetry(e)}}return e}const r="Canceled";class o extends Error{constructor(){super(r),this.name=this.message}}class s extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof s)return e;const t=new s;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class a extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,a.prototype)}}function l(e){const t=this;let n,i=!1;return function(){return i||(i=!0,n=e.apply(t,arguments)),n}}var c;!function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function*i(e){yield e}e.empty=function(){return n},e.single=i,e.wrap=function(e){return t(e)?e:i(e)},e.from=function(e){return e||n},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const n of e)if(t(n))return!0;return!1},e.find=function(e,t){for(const n of e)if(t(n))return n},e.filter=function*(e,t){for(const n of e)t(n)&&(yield n)},e.map=function*(e,t){let n=0;for(const i of e)yield t(i,n++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,n){let i=n;for(const n of e)i=t(i,n);return i},e.slice=function*(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]},e.consume=function(t,n=Number.POSITIVE_INFINITY){const i=[];if(0===n)return[i,t];const r=t[Symbol.iterator]();for(let t=0;t<n;t++){const t=r.next();if(t.done)return[i,e.empty()];i.push(t.value)}return[i,{[Symbol.iterator]:()=>r}]}}(c||(c={}));let h=null;function d(e){return null==h||h.trackDisposable(e),e}function p(e){null==h||h.markAsDisposed(e)}function u(e,t){null==h||h.setParent(e,t)}function m(e){if(c.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function f(e){const t=d({dispose:l((()=>{p(t),e()}))});return t}class g{constructor(){this._toDispose=new Set,this._isDisposed=!1,d(this)}dispose(){this._isDisposed||(p(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{m(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return u(e,this),this._isDisposed?g.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}g.DISABLE_DISPOSED_WARNING=!1;class b{constructor(){this._store=new g,d(this),u(this._store,this)}dispose(){p(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}b.None=Object.freeze({dispose(){}}),Symbol.iterator;class v{constructor(e){this.element=e,this.next=v.Undefined,this.prev=v.Undefined}}v.Undefined=new v(void 0);class y{constructor(){this._f