blockcore-notes/main.b0cba07e32d96ed4.js

1 line
2.5 MiB
JavaScript
Raw Normal View History

(self.webpackChunkblockcore_notes=self.webpackChunkblockcore_notes||[]).push([[179],{9543:(ce,k,T)=>{"use strict";function w(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(w(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{E(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)E(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 x(i){return i instanceof p||i&&"closed"in i&&w(i.remove)&&w(i.add)&&w(i.unsubscribe)}function E(i){w(i)?i():i.unsubscribe()}const C={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},L={setTimeout(i,t,...e){const{delegate:n}=L;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=L;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function j(i){L.setTimeout(()=>{const{onUnhandledError:t}=C;if(!t)throw i;t(i)})}function M(){}const S=U("C",void 0,void 0);function U(i,t,e){return{kind:i,value:t,error:e}}let H=null;function A(i){if(C.useDeprecatedSynchronousErrorHandling){const t=!H;if(t&&(H={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=H;if(H=null,e)throw n}}else i()}class Z extends p{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,x(t)&&t.add(this)):this.destination=le}static create(t,e,n){return new q(t,e,n)}next(t){this.isStopped?te(function O(i){return U("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?te(function G(i){return U("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?te(S,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 B(i,t){return X.call(i,t)}class ne{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){K(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){K(n)}else K(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){K(e)}}}class q extends Z{constructor(t,e,n){let r;if(super(),w(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let a;this&&C.useDeprecatedNextContext?(a=Object.create(t),a.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&B(t.next,a),error:t.error&&B(t.error,a),complete:t.complete&&B(t.complete,a)}):r=t}this.destination=new ne(r)}}function K(i){C.useDeprecatedSynchronousErrorHandling?function $(i){C.useDeprecatedSynchronousErrorHandling&&H