1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 14:01:55 +00:00
musix-oss/node_modules/@firebase/firestore/dist/index.esm.min.js

3 lines
268 KiB
JavaScript
Raw Normal View History

2020-03-03 20:30:50 +00:00
import t from"@firebase/app";import{__spreadArrays as n,__extends as i,__awaiter as e,__generator as r,__assign as u}from"tslib";import{Logger as s,LogLevel as o}from"@firebase/logger";import{getUA as h,isReactNative as c,isElectron as a,isIE as f,isUWP as l,isBrowserExtension as d}from"@firebase/util";import{Component as v}from"@firebase/component";import{XhrIo as w,EventType as m,ErrorCode as p,createWebChannelTransport as g,WebChannel as b}from"@firebase/webchannel-wrapper";var y,_=t.SDK_VERSION,I=new s("@firebase/firestore");function T(){return I.logLevel===o.DEBUG?y.DEBUG:I.logLevel===o.SILENT?y.SILENT:y.ERROR}function E(t){switch(t){case y.DEBUG:I.logLevel=o.DEBUG;break;case y.ERROR:I.logLevel=o.ERROR;break;case y.SILENT:I.logLevel=o.SILENT;break;default:I.error("Firestore ("+_+"): Invalid value passed to `setLogLevel`")}}function R(t,i){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];if(I.logLevel<=o.DEBUG){var u=e.map(D);I.debug.apply(I,n(["Firestore ("+_+") ["+t+"]: "+i],u))}}function A(t){for(var i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];if(I.logLevel<=o.ERROR){var r=i.map(D);I.error.apply(I,n(["Firestore ("+_+"): "+t],r))}}function D(t){if("string"==typeof t)return t;var n=Ui.t();try{return n.i(t)}catch(n){return t}}function P(t){var n="FIRESTORE ("+_+") INTERNAL ASSERTION FAILED: "+t;throw A(n),new Error(n)}function S(t,n){t||P(n)}!function(t){t[t.DEBUG=0]="DEBUG",t[t.ERROR=1]="ERROR",t[t.SILENT=2]="SILENT"}(y||(y={}));var C=function(){function t(){}return t.u=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="",i=0;i<20;i++)n+=t.charAt(Math.floor(Math.random()*t.length));return S(20===n.length,"Invalid auto ID: "+n),n},t}();function V(t,n){return t<n?-1:t>n?1:0}function k(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(!t[i].isEqual(n[i]))return!1;return!0}function N(t){return t+"\0"}var O,F,x,j,U=function(t,n,i,e,r){this.s=t,this.persistenceKey=n,this.host=i,this.ssl=e,this.forceLongPolling=r},L="(default)",B=function(){function t(t,n){this.projectId=t,this.database=n||L}return Object.defineProperty(t.prototype,"o",{get:function(){return this.database===L},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(n){return n instanceof t&&n.projectId===this.projectId&&n.database===this.database},t.prototype.h=function(t){return V(this.projectId,t.projectId)||V(this.database,t.database)},t}();(F=O||(O={}))[F.l=0]="__PRIVATE_Unknown",F[F.v=1]="__PRIVATE_Online",F[F.m=2]="__PRIVATE_Offline",(j=x||(x={}))[j.p=0]="__PRIVATE_RemoteStore",j[j.g=1]="__PRIVATE_SharedClientState";var M=function(){function t(t){this.uid=t}return t.prototype._=function(){return null!=this.uid},t.prototype.I=function(){return this._()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t.UNAUTHENTICATED=new t(null),t.T=new t("google-credentials-uid"),t.R=new t("first-party-uid"),t}(),q={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Q=function(t){function n(n,i){var e=t.call(this,i)||this;return e.code=n,e.message=i,e.name="FirebaseError",e.toString=function(){return e.name+": [code="+e.code+"]: "+e.message},e}return i(n,t),n}(Error),G=function(t,n){this.user=n,this.type="OAuth",this.A={},this.A.Authorization="Bearer "+t},W=function(){function t(){this.D=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.P=function(){},t.prototype.S=function(t){S(!this.D,"Can only call setChangeListener() once."),this.D=t,t(M.UNAUTHENTICATED)},t.prototype.C=function(){S(null!==this.D,"removeChangeListener() when no listener registered"),this.D=null},t}(),z=function(){function t(t
//# sourceMappingURL=index.esm.min.js.map