8 lines
2.9 KiB
JavaScript
8 lines
2.9 KiB
JavaScript
import{c as m,o as x,q as d}from"./chunk-QTLWQ5AJ.js";var O=m((A,w)=>{"use strict";x();d();var E=Object.prototype.hasOwnProperty,c="~";function _(){}Object.create&&(_.prototype=Object.create(null),new _().__proto__||(c=!1));function L(s,t,n){this.fn=s,this.context=t,this.once=n||!1}function g(s,t,n,r,l){if(typeof n!="function")throw new TypeError("The listener must be a function");var f=new L(n,r||s,l),o=c?c+t:t;return s._events[o]?s._events[o].fn?s._events[o]=[s._events[o],f]:s._events[o].push(f):(s._events[o]=f,s._eventsCount++),s}function y(s,t){--s._eventsCount===0?s._events=new _:delete s._events[t]}function u(){this._events=new _,this._eventsCount=0}u.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)E.call(n,r)&&t.push(c?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};u.prototype.listeners=function(t){var n=c?c+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var l=0,f=r.length,o=new Array(f);l<f;l++)o[l]=r[l].fn;return o};u.prototype.listenerCount=function(t){var n=c?c+t:t,r=this._events[n];return r?r.fn?1:r.length:0};u.prototype.emit=function(t,n,r,l,f,o){var a=c?c+t:t;if(!this._events[a])return!1;var e=this._events[a],h=arguments.length,p,i;if(e.fn){switch(e.once&&this.removeListener(t,e.fn,void 0,!0),h){case 1:return e.fn.call(e.context),!0;case 2:return e.fn.call(e.context,n),!0;case 3:return e.fn.call(e.context,n,r),!0;case 4:return e.fn.call(e.context,n,r,l),!0;case 5:return e.fn.call(e.context,n,r,l,f),!0;case 6:return e.fn.call(e.context,n,r,l,f,o),!0}for(i=1,p=new Array(h-1);i<h;i++)p[i-1]=arguments[i];e.fn.apply(e.context,p)}else{var b=e.length,v;for(i=0;i<b;i++)switch(e[i].once&&this.removeListener(t,e[i].fn,void 0,!0),h){case 1:e[i].fn.call(e[i].context);break;case 2:e[i].fn.call(e[i].context,n);break;case 3:e[i].fn.call(e[i].context,n,r);break;case 4:e[i].fn.call(e[i].context,n,r,l);break;default:if(!p)for(v=1,p=new Array(h-1);v<h;v++)p[v-1]=arguments[v];e[i].fn.apply(e[i].context,p)}}return!0};u.prototype.on=function(t,n,r){return g(this,t,n,r,!1)};u.prototype.once=function(t,n,r){return g(this,t,n,r,!0)};u.prototype.removeListener=function(t,n,r,l){var f=c?c+t:t;if(!this._events[f])return this;if(!n)return y(this,f),this;var o=this._events[f];if(o.fn)o.fn===n&&(!l||o.once)&&(!r||o.context===r)&&y(this,f);else{for(var a=0,e=[],h=o.length;a<h;a++)(o[a].fn!==n||l&&!o[a].once||r&&o[a].context!==r)&&e.push(o[a]);e.length?this._events[f]=e.length===1?e[0]:e:y(this,f)}return this};u.prototype.removeAllListeners=function(t){var n;return t?(n=c?c+t:t,this._events[n]&&y(this,n)):(this._events=new _,this._eventsCount=0),this};u.prototype.off=u.prototype.removeListener;u.prototype.addListener=u.prototype.on;u.prefixed=c;u.EventEmitter=u;typeof w<"u"&&(w.exports=u)});export{O as a};
|
|
|
|
window.inOKXExtension = true;
|
|
window.inMiniApp = false;
|
|
window.ASSETS_BUILD_TYPE = "publish";
|
|
|
|
//# sourceMappingURL=chunk-FVWN5TXY.js.map
|