blockcore-notes/main.ff7b1743847ed532.js

1 line
2.4 MiB
JavaScript
Raw Normal View History

(self.webpackChunkblockcore_notes=self.webpackChunkblockcore_notes||[]).push([[179],{4142:(le,w,S)=>{"use strict";function v(i){return"function"==typeof i}function u(i){const e=i(n=>{Error.call(n),n.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const f=u(i=>function(e){i(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function m(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class p{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const a of e)a.remove(this);else e.remove(this);const{initialTeardown:n}=this;if(v(n))try{n()}catch(a){t=a instanceof f?a.errors:[a]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const a of r)try{M(a)}catch(o){t=t??[],o instanceof f?t=[...t,...o.errors]:t.push(o)}}if(t)throw new f(t)}}add(t){var e;if(t&&t!==this)if(this.closed)M(t);else{if(t instanceof p){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&m(e,t)}remove(t){const{_finalizers:e}=this;e&&m(e,t),t instanceof p&&t._removeParent(this)}}p.EMPTY=(()=>{const i=new p;return i.closed=!0,i})();const _=p.EMPTY;function F(i){return i instanceof p||i&&"closed"in i&&v(i.remove)&&v(i.add)&&v(i.unsubscribe)}function M(i){v(i)?i():i.unsubscribe()}const x={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},I={setTimeout(i,t,...e){const{delegate:n}=I;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=I;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function H(i){I.setTimeout(()=>{const{onUnhandledError:t}=x;if(!t)throw i;t(i)})}function C(){}const E=z("C",void 0,void 0);function z(i,t,e){return{kind:i,value:t,error:e}}let P=null;function T(i){if(x.useDeprecatedSynchronousErrorHandling){const t=!P;if(t&&(P={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=P;if(P=null,e)throw n}}else i()}class K extends p{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,F(t)&&t.add(this)):this.destination=se}static create(t,e,n){return new $(t,e,n)}next(t){this.isStopped?te(function N(i){return z("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?te(function U(i){return z("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?te(E,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const X=Function.prototype.bind;function R(i,t){return X.call(i,t)}class ie{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){q(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){q(n)}else q(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){q(e)}}}class $ extends K{constructor(t,e,n){let r;if(super(),v(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let a;this&&x.useDeprecatedNextContext?(a=Object.create(t),a.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&R(t.next,a),error:t.error&&R(t.error,a),complete:t.complete&&R(t.complete,a)}):r=t}this.destination=new ie(r)}}function q(i){x.useDeprecatedSynchronousErrorHandling?function G(i){x.useDeprecatedSynchronousErrorHandling&&P