@influxdata/influxdb-client-browser 1.30.0 → 1.31.0-nightly.2887

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- var We=Object.defineProperty,He=Object.defineProperties;var qe=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable;var ae=(r,e,t)=>e in r?We(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,p=(r,e)=>{for(var t in e||(e={}))le.call(e,t)&&ae(r,t,e[t]);if(P)for(var t of P(e))ue.call(e,t)&&ae(r,t,e[t]);return r},k=(r,e)=>He(r,qe(e));var fe=(r,e)=>{var t={};for(var n in r)le.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&P)for(var n of P(r))e.indexOf(n)<0&&ue.call(r,n)&&(t[n]=r[n]);return t};var E=(r,e,t)=>new Promise((n,i)=>{var o=l=>{try{a(t.next(l))}catch(u){i(u)}},s=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);a((t=t.apply(r,e)).next())});function ce(){let r=new TextDecoder("utf-8");return{concat(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n},copy(e,t,n){let i=new Uint8Array(n-t);return i.set(e.subarray(t,n)),i},toUtf8String(e,t,n){return r.decode(e.subarray(t,n))}}}function R(r,e){let t=e!=null?e:ce(),n,i=!1,o=!1;function s(a){let l,u=0;for(n?(a=t.concat(n,a),l=n.length):l=0;l<a.length;){let f=a[l];if(f===10){if(!o){let c=l>0&&a[l-1]===13?l-1:l;if(i)return;r.next(t.toUtf8String(a,u,c)),u=l+1}}else f===34&&(o=!o);l++}u<l?n=t.copy(a,u,l):n=void 0}return{next(a){if(!i)try{s(a)}catch(l){this.error(l)}},error(a){i||(i=!0,r.error(a))},complete(){i||(n&&r.next(t.toUtf8String(n,0,n.length)),i=!0,r.complete())},useCancellable(a){if(r.useCancellable){let l=this;r.useCancellable({cancel(){a.cancel(),n=void 0,l.complete()},isCancelled(){return a.isCancelled()}})}}}}var F=class{constructor(){this._reuse=!1}get reuse(){return this._reuse}set reuse(e){e&&!this.reusedValues&&(this.reusedValues=new Array(10)),this._reuse=e}withReuse(){return this.reuse=!0,this}splitLine(e){if(e==null)return this.lastSplitLength=0,[];let t=0,n=0,i=this._reuse?this.reusedValues:[],o=0;for(let a=0;a<e.length;a++){let l=e[a];if(l===","){if(t%2===0){let u=this.getValue(e,n,a,t);this._reuse?i[o++]=u:i.push(u),n=a+1,t=0}}else l==='"'&&t++}let s=this.getValue(e,n,e.length,t);return this._reuse?(i[o]=s,this.lastSplitLength=o+1):(i.push(s),this.lastSplitLength=i.length),i}getValue(e,t,n,i){return t===e.length?"":i===0?e.substring(t,n):i===2?e.substring(t+1,n-1):e.substring(t+1,n-1).replace(/""/gi,'"')}};var M=r=>r,S={boolean:r=>r===""?null:r==="true",unsignedLong:r=>r===""?null:+r,long:r=>r===""?null:+r,double(r){switch(r){case"":return null;case"+Inf":return Number.POSITIVE_INFINITY;case"-Inf":return Number.NEGATIVE_INFINITY;default:return+r}},string:M,base64Binary:M,duration:r=>r===""?null:r,"dateTime:RFC3339":r=>r===""?null:r},L=class{get(e){var n;let t=e[this.index];return(t===""||t===void 0)&&this.defaultValue&&(t=this.defaultValue),((n=S[this.dataType])!=null?n:M)(t)}},pe=Object.freeze({label:"",dataType:"",group:!1,defaultValue:"",index:Number.MAX_SAFE_INTEGER,get:()=>{}});function me(){return new L}function pt(r){var t,n;let e=new L;return e.label=String(r.label),e.dataType=r.dataType,e.group=Boolean(r.group),e.defaultValue=(t=r.defaultValue)!=null?t:"",e.index=(n=r.index)!=null?n:0,e}var je=[404,408,425,429,500,502,503,504];function Qe(r){return je.includes(r)}var y=class extends Error{constructor(e){super(e),this.name="IllegalArgumentError",Object.setPrototypeOf(this,y.prototype)}},h=class extends Error{constructor(t,n,i,o,s,a){super();this.statusCode=t;this.statusMessage=n;this.body=i;this.contentType=s;if(Object.setPrototypeOf(this,h.prototype),a)this.message=a;else if(i){if(s!=null&&s.startsWith("application/json"))try{this.json=JSON.parse(i),this.message=this.json.message,this.code=this.json.code}catch(l){}this.message||(this.message=`${t} ${n} : ${i}`)}else this.message=`${t} ${n}`;this.name="HttpError",this.setRetryAfter(o)}setRetryAfter(t){typeof t=="string"?/^[0-9]+$/.test(t)?this._retryAfter=parseInt(t):this._retryAfter=0:this._retryAfter=0}canRetry(){return Qe(this.statusCode)}retryAfter(){return this._retryAfter}},Je=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE"];function dt(r){if(r){if(typeof r.canRetry=="function")return!!r.canRetry();if(r.code&&Je.includes(r.code))return!0}else return!1;return!1}function de(r,e){if(r){let t;return typeof r.retryAfter=="function"?r.retryAfter():(t=0,e&&e>0?t+Math.round(Math.random()*e):t)}else return 0}var x=class extends Error{constructor(){super(),Object.setPrototypeOf(this,x.prototype),this.name="RequestTimedOutError",this.message="Request timed out"}canRetry(){return!0}retryAfter(){return 0}},T=class extends Error{constructor(){super(),this.name="AbortError",Object.setPrototypeOf(this,T.prototype),this.message="Response aborted"}canRetry(){return!0}retryAfter(){return 0}};function xt(){S["dateTime:RFC3339"]=r=>r===""?null:new Date(Date.parse(r))}function Tt(){S["dateTime:RFC3339"]=r=>r===""?null:Date.parse(r)}function wt(){S["dateTime:RFC3339"]=r=>r===""?null:r}var N=class{constructor(e){e.forEach((t,n)=>t.index=n),this.columns=e}column(e,t=!0){for(let n=0;n<this.columns.length;n++){let i=this.columns[n];if(i.label===e)return i}if(t)throw new y(`Column ${e} not found!`);return pe}toObject(e){let t={};for(let n=0;n<this.columns.length&&n<e.length;n++){let i=this.columns[n];t[i.label]=i.get(e)}return t}get(e,t){return this.column(t,!1).get(e)}};function he(r){return new N(r)}function W(r){let e=new F().withReuse(),t,n=!0,i=0,o;return{error(s){r.error(s)},next(s){if(s==="")n=!0,t=void 0;else{let a=e.splitLine(s),l=e.lastSplitLength;if(n){if(!t){t=new Array(l);for(let u=0;u<l;u++)t[u]=me()}if(a[0].startsWith("#")){if(a[0]==="#datatype")for(let u=1;u<l;u++)t[u].dataType=a[u];else if(a[0]==="#default")for(let u=1;u<l;u++)t[u].defaultValue=a[u];else if(a[0]==="#group")for(let u=1;u<l;u++)t[u].group=a[u][0]==="t"}else{a[0]===""?(i=1,t=t.slice(1)):i=0;for(let u=i;u<l;u++)t[u-i].label=a[u];o=he(t),n=!1}}else r.next(a.slice(i,l),o)}},complete(){r.complete()},useCancellable(s){r.useCancellable&&r.useCancellable(s)}}}function Et(r,e){let t=!1,n=0,i=0;for(;i<r.length;){let o=r.charCodeAt(i);if(o===10){if(!t){let s=i>0&&r.charCodeAt(i-1)===13?i-1:i;e.next(r.substring(n,s)),n=i+1}}else o===34&&(t=!t);i++}n<i&&e.next(r.substring(n,i)),e.complete()}var ge=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")();var q=class{constructor(e,t){this.isClosed=!1;try{t({next:n=>{e.next(n)},error:n=>{this.isClosed=!0,e.error(n)},complete:()=>{this.isClosed=!0,e.complete()},useCancellable:n=>{this.cancellable=n}})}catch(n){this.isClosed=!0,e.error(n)}}get closed(){return this.isClosed}unsubscribe(){var e;(e=this.cancellable)==null||e.cancel(),this.isClosed=!0}};function H(){}function Xe(r){let{next:e,error:t,complete:n}=r;return{next:e?e.bind(r):H,error:t?t.bind(r):H,complete:n?n.bind(r):H}}var w=class{constructor(e,t){this.executor=e;this.decorator=t}subscribe(e,t,n){let i=Xe(typeof e!="object"||e===null?{next:e,error:t,complete:n}:e);return new q(this.decorator(i),this.executor)}[ge](){return this}};Symbol.observable;var ye={timeout:1e4},be={retryJitter:200,minRetryDelay:5e3,maxRetryDelay:125e3,exponentialBase:5,randomRetry:!0},xe={batchSize:1e3,maxBatchBytes:5e7,flushInterval:6e4,writeFailed:function(){},writeSuccess:function(){},writeRetrySkipped:function(){},maxRetries:5,maxRetryTime:18e4,maxBufferLines:32e3,retryJitter:200,minRetryDelay:5e3,maxRetryDelay:125e3,exponentialBase:2,gzipThreshold:1e3,randomRetry:!0};function j(r,e){return function(t){let n="",i=0,o=0;for(;o<t.length;){let s=r.indexOf(t[o]);s>=0&&(n+=t.substring(i,o),n+=e[s],i=o+1),o++}return i==0?t:(i<t.length&&(n+=t.substring(i,t.length)),n)}}function Ye(r,e){let t=j(r,e);return n=>'"'+t(n)+'"'}var C={measurement:j(`,
2
- \r `,["\\,","\\ ","\\n","\\r","\\t"]),quoted:Ye('"\\',['\\"',"\\\\"]),tag:j(`, =
3
- \r `,["\\,","\\ ","\\=","\\n","\\r","\\t"])};var U="000000000",X=!1;function Ge(r){return X=r&&process&&typeof process.hrtime=="function"}Ge(!0);var Te,_,we=Date.now(),Q=0;function J(){if(X){let r=process.hrtime(),e=Date.now();_?(r[0]=r[0]-_[0],r[1]=r[1]-_[1],r[1]<0&&(r[0]-=1,r[1]+=1e9),e=Te+r[0]*1e3+Math.floor(r[1]/1e6)):(_=r,Te=e);let t=String(r[1]%1e6);return String(e)+U.substr(0,6-t.length)+t}else{let r=Date.now();r!==we?(we=r,Q=0):Q++;let e=String(Q);return String(r)+U.substr(0,6-e.length)+e}}function Ce(){if(X){let r=process.hrtime(),e=String(Math.trunc(r[1]/1e3)%1e3);return String(Date.now())+U.substr(0,3-e.length)+e}else return String(Date.now())+U.substr(0,3)}function Re(){return String(Date.now())}function Se(){return String(Math.floor(Date.now()/1e3))}var Oe={s:Se,ms:Re,us:Ce,ns:J,seconds:Se,millis:Re,micros:Ce,nanos:J},ve={s:r=>`${Math.floor(r.getTime()/1e3)}`,ms:r=>`${r.getTime()}`,us:r=>`${r.getTime()}000`,ns:r=>`${r.getTime()}000000`};function Ae(r){return r===void 0?J():typeof r=="string"?r.length>0?r:void 0:r instanceof Date?`${r.getTime()}000000`:String(typeof r=="number"?Math.floor(r):r)}var Ke={error(r,e){console.error("ERROR: "+r,e||"")},warn(r,e){console.warn("WARN: "+r,e||"")}},I=Ke,g={error(r,e){I.error(r,e)},warn(r,e){I.warn(r,e)}};function ar(r){let e=I;return I=r,e}var B=Symbol("FLUX_VALUE"),d=class{constructor(e){this.fluxValue=e}toString(){return this.fluxValue}[B](){return this.fluxValue}};function Ze(r){return typeof r=="object"&&typeof r[B]=="function"}function O(r){if(r==null)return"";r=r.toString();let e,t=0;function n(){e===void 0&&(e=r.substring(0,t))}for(;t<r.length;t++){let i=r.charAt(t);switch(i){case"\r":n(),e+="\\r";break;case`
4
- `:n(),e+="\\n";break;case" ":n(),e+="\\t";break;case'"':case"\\":n(),e=e+"\\"+i;break;case"$":if(t+1<r.length&&r.charAt(t+1)==="{"){n(),t++,e+="\\${";break}e!=null&&(e+=i);break;default:e!=null&&(e+=i)}}return e!==void 0?e:r}function ur(r){return new d(`"${O(r)}"`)}function Pe(r){let e=Number(r);if(!isFinite(e)){if(typeof r=="number")return`float(v: "${e}")`;throw new Error(`not a flux float: ${r}`)}let t=e.toString(),n=!1;for(let i of t)if(!(i>="0"&&i<="9"||i=="-")){if(i==="."){n=!0;continue}return`float(v: "${t}")`}return n?t:t+".0"}function fr(r){return new d(Pe(r))}function Ee(r){let e=String(r),t=e.startsWith("-"),n=t?e.substring(1):e;if(n.length===0||n.length>19)throw new Error(`not a flux integer: ${e}`);for(let i of n)if(i<"0"||i>"9")throw new Error(`not a flux integer: ${e}`);if(n.length===19){if(t&&n>"9223372036854775808")throw new Error(`flux integer out of bounds: ${e}`);if(!t&&n>"9223372036854775807")throw new Error(`flux integer out of bounds: ${e}`)}return e}function cr(r){return new d(Ee(r))}function et(r){return`time(v: "${O(r)}")`}function pr(r){return new d(et(r))}function mr(r){return new d(`duration(v: "${O(r)}")`)}function Fe(r){return r instanceof RegExp?r.toString():new RegExp(r).toString()}function dr(r){return new d(Fe(r))}function hr(r){return r==="true"||r==="false"?new d(r):new d((!!r).toString())}function De(r){return new d(String(r))}function Y(r){if(r===void 0)return"";if(r===null)return"null";if(typeof r=="boolean")return r.toString();if(typeof r=="string")return`"${O(r)}"`;if(typeof r=="number")return Number.isSafeInteger(r)?Ee(r):Pe(r);if(typeof r=="object"){if(typeof r[B]=="function")return r[B]();if(r instanceof Date)return r.toISOString();if(r instanceof RegExp)return Fe(r);if(Array.isArray(r))return`[${r.map(Y).join(",")}]`}else if(typeof r=="bigint")return`${r}.0`;return Y(r.toString())}function gr(r,...e){if(r.length==1&&e.length===0)return De(r[0]);let t=new Array(r.length+e.length),n=0;for(let i=0;i<r.length;i++){let o=r[i];if(t[n++]=o,i<e.length){let s=e[i],a;if(o.endsWith('"')&&i+1<r.length&&r[i+1].startsWith('"'))a=O(s);else if(a=Y(s),a===""&&!Ze(s))throw new Error(`Unsupported parameter literal '${s}' at index: ${i}, type: ${typeof s}`);t[n++]=a}else if(i<r.length-1)throw new Error("Too few parameters supplied!")}return De(t.join(""))}var Le=class{constructor(e){this.tags={};this.fields={};e&&(this.name=e)}measurement(e){return this.name=e,this}tag(e,t){return this.tags[e]=t,this}booleanField(e,t){return this.fields[e]=t?"T":"F",this}intField(e,t){let n;if(typeof t=="number"?n=t:n=parseInt(String(t)),isNaN(n)||n<=-9223372036854776e3||n>=9223372036854776e3)throw new Error(`invalid integer value for field '${e}': '${t}'!`);return this.fields[e]=`${Math.floor(n)}i`,this}uintField(e,t){if(typeof t=="number"){if(isNaN(t)||t<0||t>Number.MAX_SAFE_INTEGER)throw new Error(`uint value for field '${e}' out of range: ${t}`);this.fields[e]=`${Math.floor(t)}u`}else{let n=String(t);for(let i=0;i<n.length;i++){let o=n.charCodeAt(i);if(o<48||o>57)throw new Error(`uint value has an unsupported character at pos ${i}: ${t}`)}if(n.length>20||n.length===20&&n.localeCompare("18446744073709551615")>0)throw new Error(`uint value for field '${e}' out of range: ${n}`);this.fields[e]=`${n}u`}return this}floatField(e,t){let n;if(typeof t=="number"?n=t:n=parseFloat(t),!isFinite(n))throw new Error(`invalid float value for field '${e}': ${t}`);return this.fields[e]=String(n),this}stringField(e,t){return t!=null&&(typeof t!="string"&&(t=String(t)),this.fields[e]=C.quoted(t)),this}timestamp(e){return this.time=e,this}toLineProtocol(e){if(!this.name)return;let t="";if(Object.keys(this.fields).sort().forEach(s=>{if(s){let a=this.fields[s];t.length>0&&(t+=","),t+=`${C.tag(s)}=${a}`}}),t.length===0)return;let n="",i=e&&e.defaultTags?p(p({},e.defaultTags),this.tags):this.tags;Object.keys(i).sort().forEach(s=>{if(s){let a=i[s];a&&(n+=",",n+=`${C.tag(s)}=${C.tag(a)}`)}});let o=this.time;return e&&e.convertTime?o=e.convertTime(o):o=Ae(o),`${C.measurement(this.name)}${n} ${t}${o!==void 0?" "+o:""}`}toString(){let e=this.toLineProtocol(void 0);return e||`invalid point: ${JSON.stringify(this,void 0)}`}};var G=class{constructor(e){this.options=p(p({},be),e),this.success()}nextDelay(e,t){let n=de(e);if(n&&n>0)return n+Math.round(Math.random()*this.options.retryJitter);if(t&&t>0){if(this.options.randomRetry){let o=Math.max(this.options.minRetryDelay,1),s=o*this.options.exponentialBase;for(let a=1;a<t;a++)if(o=s,s=s*this.options.exponentialBase,s>=this.options.maxRetryDelay){s=this.options.maxRetryDelay;break}return o+Math.round(Math.random()*(s-o)+Math.random()*this.options.retryJitter)}let i=Math.max(this.options.minRetryDelay,1);for(let o=1;o<t;o++)if(i=i*this.options.exponentialBase,i>=this.options.maxRetryDelay){i=this.options.maxRetryDelay;break}return i+Math.round(Math.random()*this.options.retryJitter)}else this.currentDelay?this.currentDelay=Math.min(Math.max(this.currentDelay*this.options.exponentialBase,1)+Math.round(Math.random()*this.options.retryJitter),this.options.maxRetryDelay):this.currentDelay=this.options.minRetryDelay+Math.round(Math.random()*this.options.retryJitter);return this.currentDelay}success(){this.currentDelay=void 0}};function _e(r){return new G(r)}function tt(r){let e,t=r,n=r;for(;n.next;)n.next.expires<t.expires&&(e=n,t=n.next),n=n.next;return[t,e]}var v=class{constructor(e,t,n=()=>{}){this.maxLines=e;this.retryLines=t;this.onShrink=n;this.size=0;this.closed=!1;this._timeoutHandle=void 0}addLines(e,t,n,i){if(this.closed||!e.length)return;let o=Date.now()+n;if(i<o&&(o=i),this.first&&this.size+e.length>this.maxLines){let u=this.size,f=u*.7;do{let[c,m]=tt(this.first);this.size-=c.lines.length,m?m.next=c.next:(this.first=c.next,this.first&&this.scheduleRetry(this.first.retryTime-Date.now())),c.next=void 0,this.onShrink(c)}while(this.first&&this.size+e.length>f);g.error(`RetryBuffer: ${u-this.size} oldest lines removed to keep buffer size under the limit of ${this.maxLines} lines.`)}let s={lines:e,retryCount:t,retryTime:o,expires:i},a=this.first,l;for(;;){if(!a||a.retryTime>o){s.next=a,l?l.next=s:(this.first=s,this.scheduleRetry(o-Date.now()));break}l=a,a=a.next}this.size+=e.length}removeLines(){if(this.first){let e=this.first;return this.first=this.first.next,e.next=void 0,this.size-=e.lines.length,e}}scheduleRetry(e){this._timeoutHandle&&clearTimeout(this._timeoutHandle),this._timeoutHandle=setTimeout(()=>{let t=this.removeLines();t?this.retryLines(t.lines,t.retryCount,t.expires).finally(()=>{this.first&&this.scheduleRetry(this.first.retryTime-Date.now())}):this._timeoutHandle=void 0},Math.max(e,0))}flush(){return E(this,null,function*(){let e;for(;e=this.removeLines();)yield this.retryLines(e.lines,e.retryCount,e.expires)})}close(){return this._timeoutHandle&&(clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0),this.closed=!0,this.size}};function K(r){let e=r.length;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);n<128||(n>=128&&n<=2047?e++:n>=2048&&n<=65535?n>=55296&&n<=57343?e++:e+=2:e+=3)}return e}var Z=class{constructor(e,t,n,i){this.maxChunkRecords=e;this.maxBatchBytes=t;this.flushFn=n;this.scheduleSend=i;this.length=0;this.bytes=-1;this.lines=new Array(e)}add(e){let t=K(e);this.length===0?this.scheduleSend():this.bytes+t+1>=this.maxBatchBytes&&this.flush().catch(n=>{}),this.lines[this.length]=e,this.length++,this.bytes+=t+1,(this.length>=this.maxChunkRecords||this.bytes>=this.maxBatchBytes)&&this.flush().catch(n=>{})}flush(){let e=this.reset();return e.length>0?this.flushFn(e):Promise.resolve()}reset(){let e=this.lines.slice(0,this.length);return this.length=0,this.bytes=-1,e}},A=class{constructor(e,t,n,i,o){this.transport=e;this.closed=!1;this._timeoutHandle=void 0;this.path=`/api/v2/write?org=${encodeURIComponent(t)}&bucket=${encodeURIComponent(n)}&precision=${i}`,o!=null&&o.consistency&&(this.path+=`&consistency=${encodeURIComponent(o.consistency)}`),this.writeOptions=p(p({},xe),o),this.currentTime=Oe[i],this.dateToProtocolTimestamp=ve[i],this.writeOptions.defaultTags&&this.useDefaultTags(this.writeOptions.defaultTags),this.sendOptions={method:"POST",headers:p({"content-type":"text/plain; charset=utf-8"},o==null?void 0:o.headers),gzipThreshold:this.writeOptions.gzipThreshold};let s=()=>{this.writeOptions.flushInterval>0&&(this._clearFlushTimeout(),this.closed||(this._timeoutHandle=setTimeout(()=>this.sendBatch(this.writeBuffer.reset(),this.writeOptions.maxRetries).catch(a=>{}),this.writeOptions.flushInterval)))};this.writeBuffer=new Z(this.writeOptions.batchSize,this.writeOptions.maxBatchBytes,a=>(this._clearFlushTimeout(),this.sendBatch(a,this.writeOptions.maxRetries)),s),this.sendBatch=this.sendBatch.bind(this),this.retryStrategy=_e(this.writeOptions),this.retryBuffer=new v(this.writeOptions.maxBufferLines,this.sendBatch,this.writeOptions.writeRetrySkipped)}sendBatch(e,t,n=Date.now()+this.writeOptions.maxRetryTime){let i=this,o=i.writeOptions.maxRetries+1-t;if(!this.closed&&e.length>0){if(n<=Date.now()){let s=new Error("Max retry time exceeded."),a=i.writeOptions.writeFailed.call(i,s,e,o,n);return a||(g.error(`Write to InfluxDB failed (attempt: ${o}).`,s),Promise.reject(s))}return new Promise((s,a)=>{let l,u={responseStarted(f,c){l=c},error(f){let c=i.writeOptions.writeFailed.call(i,f,e,o,n);if(c){c.then(s,a);return}if(f instanceof h&&f.json&&typeof f.json.error=="string"&&f.json.error.includes("hinted handoff queue not empty")){g.warn("Write to InfluxDB returns: "+f.json.error),l=204,u.complete();return}if(!i.closed&&t>0&&(!(f instanceof h)||f.statusCode>=429)){g.warn(`Write to InfluxDB failed (attempt: ${o}).`,f),i.retryBuffer.addLines(e,t-1,i.retryStrategy.nextDelay(f,o),n),a(f);return}g.error("Write to InfluxDB failed.",f),a(f)},complete(){if(l==204||l==null)i.writeOptions.writeSuccess.call(i,e),i.retryStrategy.success(),s();else{let f=`204 HTTP response status code expected, but ${l} returned`,c=new h(l,f,void 0,"0");c.message=f,u.error(c)}}};this.transport.send(this.path,e.join(`
5
- `),this.sendOptions,u)})}else return Promise.resolve()}_clearFlushTimeout(){this._timeoutHandle!==void 0&&(clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0)}writeRecord(e){if(this.closed)throw new Error("writeApi: already closed!");this.writeBuffer.add(e)}writeRecords(e){if(this.closed)throw new Error("writeApi: already closed!");for(let t=0;t<e.length;t++)this.writeBuffer.add(e[t])}writePoint(e){if(this.closed)throw new Error("writeApi: already closed!");let t=e.toLineProtocol(this);t&&this.writeBuffer.add(t)}writePoints(e){if(this.closed)throw new Error("writeApi: already closed!");for(let t=0;t<e.length;t++){let n=e[t].toLineProtocol(this);n&&this.writeBuffer.add(n)}}flush(e){return E(this,null,function*(){if(yield this.writeBuffer.flush(),e)return yield this.retryBuffer.flush()})}close(){return this.writeBuffer.flush().finally(()=>{let t=this.retryBuffer.close();t&&g.error(`Retry buffer closed with ${t} items that were not written to InfluxDB!`,null),this.closed=!0})}dispose(){return this._clearFlushTimeout(),this.closed=!0,this.retryBuffer.close()+this.writeBuffer.length}useDefaultTags(e){return this.defaultTags=e,this}convertTime(e){return e===void 0?this.currentTime():typeof e=="string"?e.length>0?e:void 0:e instanceof Date?this.dateToProtocolTimestamp(e):String(typeof e=="number"?Math.floor(e):e)}};import{parse as $e}from"url";import*as ze from"http";import*as Ve from"https";import{Buffer as te}from"buffer";import{Buffer as Ue}from"buffer";var rt={concat(r,e){return Ue.concat([r,e])},toUtf8String(r,e,t){return r.toString("utf-8",e,t)},copy(r,e,t){let n=Ue.allocUnsafe(t-e);return r.copy(n,0,e,t),n}},Ie=rt;import $ from"zlib";function ee(r={}){let e=0;return{next:n=>{e===0&&r.next&&n!==null&&n!==void 0&&r.next(n)},error:n=>{e===0&&(e=1,r.error&&r.error(n))},complete:()=>{e===0&&(e=2,r.complete&&r.complete())},responseStarted:(n,i)=>{r.responseStarted&&r.responseStarted(n,i)}}}var Be="1.30.0";var nt={flush:$.constants.Z_SYNC_FLUSH,finishFlush:$.constants.Z_SYNC_FLUSH},it=te.allocUnsafe(0),re=class{constructor(){this.cancelled=!1}cancel(){this.cancelled=!0}isCancelled(){return this.cancelled}},ne=class{constructor(e){this.chunkCombiner=Ie;var u,f,c,m,b,ie,oe;let l=e,{url:t,proxyUrl:n,token:i,transportOptions:o}=l,s=fe(l,["url","proxyUrl","token","transportOptions"]),a=$e(n||t);if(this.token=i,this.defaultOptions=k(p(p(p({},ye),s),o),{port:a.port,protocol:a.protocol,hostname:a.hostname}),this.contextPath=n?t:(u=a.path)!=null?u:"",this.contextPath.endsWith("/")&&(this.contextPath=this.contextPath.substring(0,this.contextPath.length-1)),Object.keys(this.defaultOptions).forEach(se=>this.defaultOptions[se]===void 0&&delete this.defaultOptions[se]),this.contextPath.endsWith("/api/v2")&&(g.warn(`Please remove '/api/v2' context path from InfluxDB base url, using ${a.protocol}//${a.hostname}:${a.port} !`),this.contextPath=""),a.protocol==="http:")this.requestApi=(m=(c=(f=this.defaultOptions["follow-redirects"])==null?void 0:f.http)==null?void 0:c.request)!=null?m:ze.request;else if(a.protocol==="https:")this.requestApi=(oe=(ie=(b=this.defaultOptions["follow-redirects"])==null?void 0:b.https)==null?void 0:ie.request)!=null?oe:Ve.request;else throw new Error(`Unsupported protocol "${a.protocol} in URL: "${e.url}"`);this.headers=p({"User-Agent":`influxdb-client-js/${Be}`},e.headers),n&&(this.headers.Host=$e(t).host)}send(e,t,n,i){let o=new re;i&&i.useCancellable&&i.useCancellable(o),this.createRequestMessage(e,t,n).then(s=>{this._request(s,o,i)},s=>(i==null?void 0:i.error)&&i.error(s))}request(e,t,n,i){t?typeof t!="string"&&(t=JSON.stringify(t)):t="";let o=it,s,a;return new Promise((l,u)=>{this.send(e,t,n,{responseStarted(f,c){i&&i(f,c),s=String(f["content-type"]),a=c},next:f=>{o=te.concat([o,f])},complete:()=>{var c,m;let f=(m=(c=n.headers)==null?void 0:c.accept)!=null?m:s;try{a===204&&l(void 0),f.includes("json")?o.length?l(JSON.parse(o.toString("utf8"))):l(void 0):f.includes("text")||f.startsWith("application/csv")?l(o.toString("utf8")):l(o)}catch(b){u(b)}},error:f=>{u(f)}})})}createRequestMessage(e,t,n){let i=te.from(t,"utf-8"),o=p({"content-type":"application/json; charset=utf-8"},this.headers);this.token&&(o.authorization="Token "+this.token);let s=Promise.resolve(i),a=k(p({},this.defaultOptions),{path:this.contextPath+e,method:n.method,headers:p(p({},o),n.headers)});return n.gzipThreshold!==void 0&&n.gzipThreshold<i.length&&(s=s.then(l=>new Promise((u,f)=>{$.gzip(l,(c,m)=>c?f(c):(a.headers["content-encoding"]="gzip",u(m)))}))),s.then(l=>(a.body=l,a.headers["content-length"]=l.length,a))}_request(e,t,n){let i=ee(n);if(t.isCancelled()){i.complete();return}let o=this.requestApi(e,s=>{var f;if(t.isCancelled()){s.resume(),i.complete();return}s.on("aborted",()=>{i.error(new T)}),s.on("error",i.error),i.responseStarted(s.headers,s.statusCode);let a=(f=s.statusCode)!=null?f:600,l=s.headers["content-encoding"],u;if(l==="gzip"?(u=$.createGunzip(nt),u.on("error",i.error),s.pipe(u)):u=s,a>=300){let c="",m=String(s.headers["content-type"]).startsWith("application/json");u.on("data",b=>{c+=b.toString(),!m&&c.length>1e3&&(c=c.slice(0,1e3),s.resume())}),u.on("end",()=>{c===""&&!!s.headers["x-influxdb-error"]&&(c=s.headers["x-influxdb-error"].toString()),i.error(new h(a,s.statusMessage,c,s.headers["retry-after"],s.headers["content-type"]))})}else u.on("data",c=>{t.isCancelled()?s.resume():i.next(c)}),u.on("end",i.complete)});typeof o.setTimeout=="function"&&e.timeout&&o.setTimeout(e.timeout),o.on("timeout",()=>{i.error(new x)}),o.on("error",s=>{i.error(s)}),e.body&&o.write(e.body),o.end()}},ke=ne;var Me={header:!0,delimiter:",",quoteChar:'"',commentPrefix:"#",annotations:["datatype","group","default"]},D=class{constructor(e,t,n){this.transport=e;this.createCSVResponse=t;this.options=typeof n=="string"?{org:n}:n}with(e){return new D(this.transport,this.createCSVResponse,p(p({},this.options),e))}response(e){return this.createCSVResponse(this.createExecutor(e))}lines(e){return this.response(e).lines()}rows(e){return this.response(e).rows()}queryLines(e,t){return this.response(e).consumeLines(t)}queryRows(e,t){return this.response(e).consumeRows(t)}collectRows(e,t){return this.response(e).collectRows(t)}collectLines(e){return this.response(e).collectLines()}queryRaw(e){let{org:t,type:n,gzip:i,headers:o}=this.options;return this.transport.request(`/api/v2/query?org=${encodeURIComponent(t)}`,JSON.stringify(this.decorateRequest({query:e.toString(),dialect:Me,type:n})),{method:"POST",headers:p({accept:"text/csv","accept-encoding":i?"gzip":"identity","content-type":"application/json; encoding=utf-8"},o)})}createExecutor(e){let{org:t,type:n,gzip:i,headers:o}=this.options;return s=>{this.transport.send(`/api/v2/query?org=${encodeURIComponent(t)}`,JSON.stringify(this.decorateRequest({query:e.toString(),dialect:Me,type:n})),{method:"POST",headers:p({"content-type":"application/json; encoding=utf-8","accept-encoding":i?"gzip":"identity"},o)},s)}}decorateRequest(e){var t;return typeof this.options.now=="function"&&(e.now=this.options.now()),e.type=(t=this.options.type)!=null?t:"flux",e}},Ne=D;function ot(r,e){return e.toObject(r)}var z=class{constructor(e,t){this.executor=e;this.chunkCombiner=t}lines(){return new w(this.executor,e=>R(e,this.chunkCombiner))}rows(){return new w(this.executor,e=>R(W({next(t,n){e.next({values:t,tableMeta:n})},error(t){e.error(t)},complete(){e.complete()}}),this.chunkCombiner))}consumeLines(e){this.executor(R(e,this.chunkCombiner))}consumeRows(e){this.executor(R(W(e),this.chunkCombiner))}collectRows(e=ot){let t=[];return new Promise((n,i)=>{this.consumeRows({next(o,s){let a=e.call(this,o,s);a!==void 0&&t.push(a)},error(o){i(o)},complete(){n(t)}})})}collectLines(){let e=[];return new Promise((t,n)=>{this.consumeLines({next(i){e.push(i)},error(i){n(i)},complete(){t(e)}})})}};var V=class{constructor(e){var n;if(typeof e=="string")this._options={url:e};else if(e!==null&&typeof e=="object")this._options=e;else throw new y("No url or configuration specified!");let t=this._options.url;if(typeof t!="string")throw new y("No url specified!");t.endsWith("/")&&(this._options.url=t.substring(0,t.length-1)),this.transport=(n=this._options.transport)!=null?n:new ke(this._options),this.processCSVResponse=i=>new z(i,this.transport.chunkCombiner)}getWriteApi(e,t,n="ns",i){return new A(this.transport,e,t,n,i!=null?i:this._options.writeOptions)}getQueryApi(e){return new Ne(this.transport,this.processCSVResponse,e)}};export{T as AbortError,ye as DEFAULT_ConnectionOptions,be as DEFAULT_RetryDelayStrategyOptions,xe as DEFAULT_WriteOptions,B as FLUX_VALUE,h as HttpError,y as IllegalArgumentError,V as InfluxDB,F as LineSplitter,g as Log,Le as Point,x as RequestTimedOutError,pe as UNKNOWN_COLUMN,dt as canRetryHttpCall,R as chunksToLines,Ke as consoleLogger,Ae as convertTimeToNanos,pt as createFluxTableColumn,he as createFluxTableMetaData,ce as createTextDecoderCombiner,Oe as currentTime,ve as dateToProtocolTimestamp,C as escape,gr as flux,hr as fluxBool,pr as fluxDateTime,mr as fluxDuration,De as fluxExpression,fr as fluxFloat,cr as fluxInteger,dr as fluxRegExp,ur as fluxString,de as getRetryDelay,Qe as isStatusCodeRetriable,W as linesToTables,me as newFluxTableColumn,Pe as sanitizeFloat,Ee as sanitizeInteger,xt as serializeDateTimeAsDate,Tt as serializeDateTimeAsNumber,wt as serializeDateTimeAsString,ar as setLogger,Et as stringToLines,ge as symbolObservable,Y as toFluxValue,S as typeSerializers,Ge as useProcessHrtime};
1
+ var We=Object.defineProperty,He=Object.defineProperties;var qe=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var ue=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var ae=(t,e,r)=>e in t?We(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c=(t,e)=>{for(var r in e||(e={}))ue.call(e,r)&&ae(t,r,e[r]);if(E)for(var r of E(e))le.call(e,r)&&ae(t,r,e[r]);return t},k=(t,e)=>He(t,qe(e));var fe=(t,e)=>{var r={};for(var n in t)ue.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&E)for(var n of E(t))e.indexOf(n)<0&&le.call(t,n)&&(r[n]=t[n]);return r};var F=(t,e,r)=>new Promise((n,i)=>{var o=l=>{try{u(r.next(l))}catch(p){i(p)}},s=l=>{try{u(r.throw(l))}catch(p){i(p)}},u=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);u((r=r.apply(t,e)).next())});function pe(){let t=new TextDecoder("utf-8");return{concat(e,r){let n=new Uint8Array(e.length+r.length);return n.set(e),n.set(r,e.length),n},copy(e,r,n){let i=new Uint8Array(n-r);return i.set(e.subarray(r,n)),i},toUtf8String(e,r,n){return t.decode(e.subarray(r,n))}}}function w(t,e){let r=e!=null?e:pe(),n,i=!1,o=!1,s=!1,u;function l(a){let f,m=0;for(n?(f=a.length===0?0:n.length,a=r.concat(n,a)):f=0;f<a.length;){let y=a[f];if(y===10){if(!o){let P=f>0&&a[f-1]===13?f-1:f;if(i)return;if(s=t.next(r.toUtf8String(a,m,P))===!1,m=f+1,s)break}}else y===34&&(o=!o);f++}if(m<a.length?n=r.copy(a,m,a.length):n=void 0,s){if(t.useResume){t.useResume(()=>{s=!1,l(new Uint8Array(0))});return}p.error(new Error("Unable to pause, useResume is not configured!")),s=!1}u&&(u(),u=void 0)}let p={next(a){if(!i)try{return l(a),!s}catch(f){this.error(f)}return!0},error(a){i||(i=!0,t.error(a))},complete(){i||(n&&t.next(r.toUtf8String(n,0,n.length)),i=!0,t.complete())}};return t.useCancellable&&(p.useCancellable=a=>{t.useCancellable&&t.useCancellable({cancel(){a.cancel(),n=void 0,p.complete()},isCancelled(){return a.isCancelled()}})}),t.useResume&&(p.useResume=a=>{u=a}),p}var L=class{constructor(){this._reuse=!1}get reuse(){return this._reuse}set reuse(e){e&&!this.reusedValues&&(this.reusedValues=new Array(10)),this._reuse=e}withReuse(){return this.reuse=!0,this}splitLine(e){if(e==null)return this.lastSplitLength=0,[];let r=0,n=0,i=this._reuse?this.reusedValues:[],o=0;for(let u=0;u<e.length;u++){let l=e[u];if(l===","){if(r%2===0){let p=this.getValue(e,n,u,r);this._reuse?i[o++]=p:i.push(p),n=u+1,r=0}}else l==='"'&&r++}let s=this.getValue(e,n,e.length,r);return this._reuse?(i[o]=s,this.lastSplitLength=o+1):(i.push(s),this.lastSplitLength=i.length),i}getValue(e,r,n,i){return r===e.length?"":i===0?e.substring(r,n):i===2?e.substring(r+1,n-1):e.substring(r+1,n-1).replace(/""/gi,'"')}};var N=t=>t,S={boolean:t=>t===""?null:t==="true",unsignedLong:t=>t===""?null:+t,long:t=>t===""?null:+t,double(t){switch(t){case"":return null;case"+Inf":return Number.POSITIVE_INFINITY;case"-Inf":return Number.NEGATIVE_INFINITY;default:return+t}},string:N,base64Binary:N,duration:t=>t===""?null:t,"dateTime:RFC3339":t=>t===""?null:t},U=class{get(e){var n;let r=e[this.index];return(r===""||r===void 0)&&this.defaultValue&&(r=this.defaultValue),((n=S[this.dataType])!=null?n:N)(r)}},ce=Object.freeze({label:"",dataType:"",group:!1,defaultValue:"",index:Number.MAX_SAFE_INTEGER,get:()=>{}});function me(){return new U}function ct(t){var r,n;let e=new U;return e.label=String(t.label),e.dataType=t.dataType,e.group=Boolean(t.group),e.defaultValue=(r=t.defaultValue)!=null?r:"",e.index=(n=t.index)!=null?n:0,e}var je=[404,408,425,429,500,502,503,504];function Qe(t){return je.includes(t)}var b=class extends Error{constructor(e){super(e),this.name="IllegalArgumentError",Object.setPrototypeOf(this,b.prototype)}},h=class extends Error{constructor(r,n,i,o,s,u){super();this.statusCode=r;this.statusMessage=n;this.body=i;this.contentType=s;if(Object.setPrototypeOf(this,h.prototype),u)this.message=u;else if(i){if(s!=null&&s.startsWith("application/json"))try{this.json=JSON.parse(i),this.message=this.json.message,this.code=this.json.code}catch(l){}this.message||(this.message=`${r} ${n} : ${i}`)}else this.message=`${r} ${n}`;this.name="HttpError",this.setRetryAfter(o)}setRetryAfter(r){typeof r=="string"?/^[0-9]+$/.test(r)?this._retryAfter=parseInt(r):this._retryAfter=0:this._retryAfter=0}canRetry(){return Qe(this.statusCode)}retryAfter(){return this._retryAfter}},Je=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE"];function dt(t){if(t){if(typeof t.canRetry=="function")return!!t.canRetry();if(t.code&&Je.includes(t.code))return!0}else return!1;return!1}function de(t,e){if(t){let r;return typeof t.retryAfter=="function"?t.retryAfter():(r=0,e&&e>0?r+Math.round(Math.random()*e):r)}else return 0}var x=class extends Error{constructor(){super(),Object.setPrototypeOf(this,x.prototype),this.name="RequestTimedOutError",this.message="Request timed out"}canRetry(){return!0}retryAfter(){return 0}},T=class extends Error{constructor(){super(),this.name="AbortError",Object.setPrototypeOf(this,T.prototype),this.message="Response aborted"}canRetry(){return!0}retryAfter(){return 0}};function xt(){S["dateTime:RFC3339"]=t=>t===""?null:new Date(Date.parse(t))}function Tt(){S["dateTime:RFC3339"]=t=>t===""?null:Date.parse(t)}function Rt(){S["dateTime:RFC3339"]=t=>t===""?null:t}var W=class{constructor(e){e.forEach((r,n)=>r.index=n),this.columns=e}column(e,r=!0){for(let n=0;n<this.columns.length;n++){let i=this.columns[n];if(i.label===e)return i}if(r)throw new b(`Column ${e} not found!`);return ce}toObject(e){let r={};for(let n=0;n<this.columns.length&&n<e.length;n++){let i=this.columns[n];r[i.label]=i.get(e)}return r}get(e,r){return this.column(r,!1).get(e)}};function he(t){return new W(t)}function H(t){let e=new L().withReuse(),r,n=!0,i=0,o,s={error(u){t.error(u)},next(u){if(u==="")n=!0,r=void 0;else{let l=e.splitLine(u),p=e.lastSplitLength;if(n){if(!r){r=new Array(p);for(let a=0;a<p;a++)r[a]=me()}if(l[0].startsWith("#")){if(l[0]==="#datatype")for(let a=1;a<p;a++)r[a].dataType=l[a];else if(l[0]==="#default")for(let a=1;a<p;a++)r[a].defaultValue=l[a];else if(l[0]==="#group")for(let a=1;a<p;a++)r[a].group=l[a][0]==="t"}else{l[0]===""?(i=1,r=r.slice(1)):i=0;for(let a=i;a<p;a++)r[a-i].label=l[a];o=he(r),n=!1}}else return t.next(l.slice(i,p),o)}return!0},complete(){t.complete()}};return t.useCancellable&&(s.useCancellable=t.useCancellable.bind(t)),t.useResume&&(s.useResume=t.useResume.bind(t)),s}function Et(t,e){let r=!1,n=0,i=0;for(;i<t.length;){let o=t.charCodeAt(i);if(o===10){if(!r){let s=i>0&&t.charCodeAt(i-1)===13?i-1:i;e.next(t.substring(n,s)),n=i+1}}else o===34&&(r=!r);i++}n<i&&e.next(t.substring(n,i)),e.complete()}var ge=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")();var j=class{constructor(e,r){this.isClosed=!1;try{r({next:n=>{e.next(n)},error:n=>{this.isClosed=!0,e.error(n)},complete:()=>{this.isClosed=!0,e.complete()},useCancellable:n=>{this.cancellable=n}})}catch(n){this.isClosed=!0,e.error(n)}}get closed(){return this.isClosed}unsubscribe(){var e;(e=this.cancellable)==null||e.cancel(),this.isClosed=!0}};function q(){}function Xe(t){let{next:e,error:r,complete:n}=t;return{next:e?e.bind(t):q,error:r?r.bind(t):q,complete:n?n.bind(t):q}}var R=class{constructor(e,r){this.executor=e;this.decorator=r}subscribe(e,r,n){let i=Xe(typeof e!="object"||e===null?{next:e,error:r,complete:n}:e);return new j(this.decorator(i),this.executor)}[ge](){return this}};Symbol.observable;var ye={timeout:1e4},be={retryJitter:200,minRetryDelay:5e3,maxRetryDelay:125e3,exponentialBase:5,randomRetry:!0},xe={batchSize:1e3,maxBatchBytes:5e7,flushInterval:6e4,writeFailed:function(){},writeSuccess:function(){},writeRetrySkipped:function(){},maxRetries:5,maxRetryTime:18e4,maxBufferLines:32e3,retryJitter:200,minRetryDelay:5e3,maxRetryDelay:125e3,exponentialBase:2,gzipThreshold:1e3,randomRetry:!0};function Q(t,e){return function(r){let n="",i=0,o=0;for(;o<r.length;){let s=t.indexOf(r[o]);s>=0&&(n+=r.substring(i,o),n+=e[s],i=o+1),o++}return i==0?r:(i<r.length&&(n+=r.substring(i,r.length)),n)}}function Ye(t,e){let r=Q(t,e);return n=>'"'+r(n)+'"'}var C={measurement:Q(`,
2
+ \r `,["\\,","\\ ","\\n","\\r","\\t"]),quoted:Ye('"\\',['\\"',"\\\\"]),tag:Q(`, =
3
+ \r `,["\\,","\\ ","\\=","\\n","\\r","\\t"])};var I="000000000",Y=!1;function Ge(t){return Y=t&&process&&typeof process.hrtime=="function"}Ge(!0);var Te,_,Re=Date.now(),J=0;function X(){if(Y){let t=process.hrtime(),e=Date.now();_?(t[0]=t[0]-_[0],t[1]=t[1]-_[1],t[1]<0&&(t[0]-=1,t[1]+=1e9),e=Te+t[0]*1e3+Math.floor(t[1]/1e6)):(_=t,Te=e);let r=String(t[1]%1e6);return String(e)+I.substr(0,6-r.length)+r}else{let t=Date.now();t!==Re?(Re=t,J=0):J++;let e=String(J);return String(t)+I.substr(0,6-e.length)+e}}function Ce(){if(Y){let t=process.hrtime(),e=String(Math.trunc(t[1]/1e3)%1e3);return String(Date.now())+I.substr(0,3-e.length)+e}else return String(Date.now())+I.substr(0,3)}function we(){return String(Date.now())}function Se(){return String(Math.floor(Date.now()/1e3))}var Oe={s:Se,ms:we,us:Ce,ns:X,seconds:Se,millis:we,micros:Ce,nanos:X},ve={s:t=>`${Math.floor(t.getTime()/1e3)}`,ms:t=>`${t.getTime()}`,us:t=>`${t.getTime()}000`,ns:t=>`${t.getTime()}000000`};function Ae(t){return t===void 0?X():typeof t=="string"?t.length>0?t:void 0:t instanceof Date?`${t.getTime()}000000`:String(typeof t=="number"?Math.floor(t):t)}var Ke={error(t,e){console.error("ERROR: "+t,e||"")},warn(t,e){console.warn("WARN: "+t,e||"")}},$=Ke,g={error(t,e){$.error(t,e)},warn(t,e){$.warn(t,e)}};function ar(t){let e=$;return $=t,e}var B=Symbol("FLUX_VALUE"),d=class{constructor(e){this.fluxValue=e}toString(){return this.fluxValue}[B](){return this.fluxValue}};function Ze(t){return typeof t=="object"&&typeof t[B]=="function"}function O(t){if(t==null)return"";t=t.toString();let e,r=0;function n(){e===void 0&&(e=t.substring(0,r))}for(;r<t.length;r++){let i=t.charAt(r);switch(i){case"\r":n(),e+="\\r";break;case`
4
+ `:n(),e+="\\n";break;case" ":n(),e+="\\t";break;case'"':case"\\":n(),e=e+"\\"+i;break;case"$":if(r+1<t.length&&t.charAt(r+1)==="{"){n(),r++,e+="\\${";break}e!=null&&(e+=i);break;default:e!=null&&(e+=i)}}return e!==void 0?e:t}function lr(t){return new d(`"${O(t)}"`)}function Pe(t){let e=Number(t);if(!isFinite(e)){if(typeof t=="number")return`float(v: "${e}")`;throw new Error(`not a flux float: ${t}`)}let r=e.toString(),n=!1;for(let i of r)if(!(i>="0"&&i<="9"||i=="-")){if(i==="."){n=!0;continue}return`float(v: "${r}")`}return n?r:r+".0"}function fr(t){return new d(Pe(t))}function Ee(t){let e=String(t),r=e.startsWith("-"),n=r?e.substring(1):e;if(n.length===0||n.length>19)throw new Error(`not a flux integer: ${e}`);for(let i of n)if(i<"0"||i>"9")throw new Error(`not a flux integer: ${e}`);if(n.length===19){if(r&&n>"9223372036854775808")throw new Error(`flux integer out of bounds: ${e}`);if(!r&&n>"9223372036854775807")throw new Error(`flux integer out of bounds: ${e}`)}return e}function pr(t){return new d(Ee(t))}function et(t){return`time(v: "${O(t)}")`}function cr(t){return new d(et(t))}function mr(t){return new d(`duration(v: "${O(t)}")`)}function Fe(t){return t instanceof RegExp?t.toString():new RegExp(t).toString()}function dr(t){return new d(Fe(t))}function hr(t){return t==="true"||t==="false"?new d(t):new d((!!t).toString())}function De(t){return new d(String(t))}function G(t){if(t===void 0)return"";if(t===null)return"null";if(typeof t=="boolean")return t.toString();if(typeof t=="string")return`"${O(t)}"`;if(typeof t=="number")return Number.isSafeInteger(t)?Ee(t):Pe(t);if(typeof t=="object"){if(typeof t[B]=="function")return t[B]();if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return Fe(t);if(Array.isArray(t))return`[${t.map(G).join(",")}]`}else if(typeof t=="bigint")return`${t}.0`;return G(t.toString())}function gr(t,...e){if(t.length==1&&e.length===0)return De(t[0]);let r=new Array(t.length+e.length),n=0;for(let i=0;i<t.length;i++){let o=t[i];if(r[n++]=o,i<e.length){let s=e[i],u;if(o.endsWith('"')&&i+1<t.length&&t[i+1].startsWith('"'))u=O(s);else if(u=G(s),u===""&&!Ze(s))throw new Error(`Unsupported parameter literal '${s}' at index: ${i}, type: ${typeof s}`);r[n++]=u}else if(i<t.length-1)throw new Error("Too few parameters supplied!")}return De(r.join(""))}var Le=class{constructor(e){this.tags={};this.fields={};e&&(this.name=e)}measurement(e){return this.name=e,this}tag(e,r){return this.tags[e]=r,this}booleanField(e,r){return this.fields[e]=r?"T":"F",this}intField(e,r){let n;if(typeof r=="number"?n=r:n=parseInt(String(r)),isNaN(n)||n<=-9223372036854776e3||n>=9223372036854776e3)throw new Error(`invalid integer value for field '${e}': '${r}'!`);return this.fields[e]=`${Math.floor(n)}i`,this}uintField(e,r){if(typeof r=="number"){if(isNaN(r)||r<0||r>Number.MAX_SAFE_INTEGER)throw new Error(`uint value for field '${e}' out of range: ${r}`);this.fields[e]=`${Math.floor(r)}u`}else{let n=String(r);for(let i=0;i<n.length;i++){let o=n.charCodeAt(i);if(o<48||o>57)throw new Error(`uint value has an unsupported character at pos ${i}: ${r}`)}if(n.length>20||n.length===20&&n.localeCompare("18446744073709551615")>0)throw new Error(`uint value for field '${e}' out of range: ${n}`);this.fields[e]=`${n}u`}return this}floatField(e,r){let n;if(typeof r=="number"?n=r:n=parseFloat(r),!isFinite(n))throw new Error(`invalid float value for field '${e}': ${r}`);return this.fields[e]=String(n),this}stringField(e,r){return r!=null&&(typeof r!="string"&&(r=String(r)),this.fields[e]=C.quoted(r)),this}timestamp(e){return this.time=e,this}toLineProtocol(e){if(!this.name)return;let r="";if(Object.keys(this.fields).sort().forEach(s=>{if(s){let u=this.fields[s];r.length>0&&(r+=","),r+=`${C.tag(s)}=${u}`}}),r.length===0)return;let n="",i=e&&e.defaultTags?c(c({},e.defaultTags),this.tags):this.tags;Object.keys(i).sort().forEach(s=>{if(s){let u=i[s];u&&(n+=",",n+=`${C.tag(s)}=${C.tag(u)}`)}});let o=this.time;return e&&e.convertTime?o=e.convertTime(o):o=Ae(o),`${C.measurement(this.name)}${n} ${r}${o!==void 0?" "+o:""}`}toString(){let e=this.toLineProtocol(void 0);return e||`invalid point: ${JSON.stringify(this,void 0)}`}};var K=class{constructor(e){this.options=c(c({},be),e),this.success()}nextDelay(e,r){let n=de(e);if(n&&n>0)return n+Math.round(Math.random()*this.options.retryJitter);if(r&&r>0){if(this.options.randomRetry){let o=Math.max(this.options.minRetryDelay,1),s=o*this.options.exponentialBase;for(let u=1;u<r;u++)if(o=s,s=s*this.options.exponentialBase,s>=this.options.maxRetryDelay){s=this.options.maxRetryDelay;break}return o+Math.round(Math.random()*(s-o)+Math.random()*this.options.retryJitter)}let i=Math.max(this.options.minRetryDelay,1);for(let o=1;o<r;o++)if(i=i*this.options.exponentialBase,i>=this.options.maxRetryDelay){i=this.options.maxRetryDelay;break}return i+Math.round(Math.random()*this.options.retryJitter)}else this.currentDelay?this.currentDelay=Math.min(Math.max(this.currentDelay*this.options.exponentialBase,1)+Math.round(Math.random()*this.options.retryJitter),this.options.maxRetryDelay):this.currentDelay=this.options.minRetryDelay+Math.round(Math.random()*this.options.retryJitter);return this.currentDelay}success(){this.currentDelay=void 0}};function Ue(t){return new K(t)}function tt(t){let e,r=t,n=t;for(;n.next;)n.next.expires<r.expires&&(e=n,r=n.next),n=n.next;return[r,e]}var v=class{constructor(e,r,n=()=>{}){this.maxLines=e;this.retryLines=r;this.onShrink=n;this.size=0;this.closed=!1;this._timeoutHandle=void 0}addLines(e,r,n,i){if(this.closed||!e.length)return;let o=Date.now()+n;if(i<o&&(o=i),this.first&&this.size+e.length>this.maxLines){let p=this.size,a=p*.7;do{let[f,m]=tt(this.first);this.size-=f.lines.length,m?m.next=f.next:(this.first=f.next,this.first&&this.scheduleRetry(this.first.retryTime-Date.now())),f.next=void 0,this.onShrink(f)}while(this.first&&this.size+e.length>a);g.error(`RetryBuffer: ${p-this.size} oldest lines removed to keep buffer size under the limit of ${this.maxLines} lines.`)}let s={lines:e,retryCount:r,retryTime:o,expires:i},u=this.first,l;for(;;){if(!u||u.retryTime>o){s.next=u,l?l.next=s:(this.first=s,this.scheduleRetry(o-Date.now()));break}l=u,u=u.next}this.size+=e.length}removeLines(){if(this.first){let e=this.first;return this.first=this.first.next,e.next=void 0,this.size-=e.lines.length,e}}scheduleRetry(e){this._timeoutHandle&&clearTimeout(this._timeoutHandle),this._timeoutHandle=setTimeout(()=>{let r=this.removeLines();r?this.retryLines(r.lines,r.retryCount,r.expires).finally(()=>{this.first&&this.scheduleRetry(this.first.retryTime-Date.now())}):this._timeoutHandle=void 0},Math.max(e,0))}flush(){return F(this,null,function*(){let e;for(;e=this.removeLines();)yield this.retryLines(e.lines,e.retryCount,e.expires)})}close(){return this._timeoutHandle&&(clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0),this.closed=!0,this.size}};function Z(t){let e=t.length;for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);n<128||(n>=128&&n<=2047?e++:n>=2048&&n<=65535?n>=55296&&n<=57343?e++:e+=2:e+=3)}return e}var ee=class{constructor(e,r,n,i){this.maxChunkRecords=e;this.maxBatchBytes=r;this.flushFn=n;this.scheduleSend=i;this.length=0;this.bytes=-1;this.lines=new Array(e)}add(e){let r=Z(e);this.length===0?this.scheduleSend():this.bytes+r+1>=this.maxBatchBytes&&this.flush().catch(n=>{}),this.lines[this.length]=e,this.length++,this.bytes+=r+1,(this.length>=this.maxChunkRecords||this.bytes>=this.maxBatchBytes)&&this.flush().catch(n=>{})}flush(){let e=this.reset();return e.length>0?this.flushFn(e):Promise.resolve()}reset(){let e=this.lines.slice(0,this.length);return this.length=0,this.bytes=-1,e}},A=class{constructor(e,r,n,i,o){this.transport=e;this.closed=!1;this._timeoutHandle=void 0;this.path=`/api/v2/write?org=${encodeURIComponent(r)}&bucket=${encodeURIComponent(n)}&precision=${i}`,o!=null&&o.consistency&&(this.path+=`&consistency=${encodeURIComponent(o.consistency)}`),this.writeOptions=c(c({},xe),o),this.currentTime=Oe[i],this.dateToProtocolTimestamp=ve[i],this.writeOptions.defaultTags&&this.useDefaultTags(this.writeOptions.defaultTags),this.sendOptions={method:"POST",headers:c({"content-type":"text/plain; charset=utf-8"},o==null?void 0:o.headers),gzipThreshold:this.writeOptions.gzipThreshold};let s=()=>{this.writeOptions.flushInterval>0&&(this._clearFlushTimeout(),this.closed||(this._timeoutHandle=setTimeout(()=>this.sendBatch(this.writeBuffer.reset(),this.writeOptions.maxRetries).catch(u=>{}),this.writeOptions.flushInterval)))};this.writeBuffer=new ee(this.writeOptions.batchSize,this.writeOptions.maxBatchBytes,u=>(this._clearFlushTimeout(),this.sendBatch(u,this.writeOptions.maxRetries)),s),this.sendBatch=this.sendBatch.bind(this),this.retryStrategy=Ue(this.writeOptions),this.retryBuffer=new v(this.writeOptions.maxBufferLines,this.sendBatch,this.writeOptions.writeRetrySkipped)}sendBatch(e,r,n=Date.now()+this.writeOptions.maxRetryTime){let i=this,o=i.writeOptions.maxRetries+1-r;if(!this.closed&&e.length>0){if(n<=Date.now()){let s=new Error("Max retry time exceeded."),u=i.writeOptions.writeFailed.call(i,s,e,o,n);return u||(g.error(`Write to InfluxDB failed (attempt: ${o}).`,s),Promise.reject(s))}return new Promise((s,u)=>{let l,p={responseStarted(a,f){l=f},error(a){let f=i.writeOptions.writeFailed.call(i,a,e,o,n);if(f){f.then(s,u);return}if(a instanceof h&&a.json&&typeof a.json.error=="string"&&a.json.error.includes("hinted handoff queue not empty")){g.warn("Write to InfluxDB returns: "+a.json.error),l=204,p.complete();return}if(!i.closed&&r>0&&(!(a instanceof h)||a.statusCode>=429)){g.warn(`Write to InfluxDB failed (attempt: ${o}).`,a),i.retryBuffer.addLines(e,r-1,i.retryStrategy.nextDelay(a,o),n),u(a);return}g.error("Write to InfluxDB failed.",a),u(a)},complete(){if(l==204||l==null)i.writeOptions.writeSuccess.call(i,e),i.retryStrategy.success(),s();else{let a=`204 HTTP response status code expected, but ${l} returned`,f=new h(l,a,void 0,"0");f.message=a,p.error(f)}}};this.transport.send(this.path,e.join(`
5
+ `),this.sendOptions,p)})}else return Promise.resolve()}_clearFlushTimeout(){this._timeoutHandle!==void 0&&(clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0)}writeRecord(e){if(this.closed)throw new Error("writeApi: already closed!");this.writeBuffer.add(e)}writeRecords(e){if(this.closed)throw new Error("writeApi: already closed!");for(let r=0;r<e.length;r++)this.writeBuffer.add(e[r])}writePoint(e){if(this.closed)throw new Error("writeApi: already closed!");let r=e.toLineProtocol(this);r&&this.writeBuffer.add(r)}writePoints(e){if(this.closed)throw new Error("writeApi: already closed!");for(let r=0;r<e.length;r++){let n=e[r].toLineProtocol(this);n&&this.writeBuffer.add(n)}}flush(e){return F(this,null,function*(){if(yield this.writeBuffer.flush(),e)return yield this.retryBuffer.flush()})}close(){return this.writeBuffer.flush().finally(()=>{let r=this.retryBuffer.close();r&&g.error(`Retry buffer closed with ${r} items that were not written to InfluxDB!`,null),this.closed=!0})}dispose(){return this._clearFlushTimeout(),this.closed=!0,this.retryBuffer.close()+this.writeBuffer.length}useDefaultTags(e){return this.defaultTags=e,this}convertTime(e){return e===void 0?this.currentTime():typeof e=="string"?e.length>0?e:void 0:e instanceof Date?this.dateToProtocolTimestamp(e):String(typeof e=="number"?Math.floor(e):e)}};import{parse as Be}from"url";import*as ze from"http";import*as Ve from"https";import{Buffer as re}from"buffer";import{Buffer as _e}from"buffer";var rt={concat(t,e){return _e.concat([t,e])},toUtf8String(t,e,r){return t.toString("utf-8",e,r)},copy(t,e,r){let n=_e.allocUnsafe(r-e);return t.copy(n,0,e,r),n}},Ie=rt;import z from"zlib";function te(t={}){let e=0,r={next:n=>{if(e===0&&t.next&&n!==null&&n!==void 0)return t.next(n)},error:n=>{e===0&&(e=1,t.error&&t.error(n))},complete:()=>{e===0&&(e=2,t.complete&&t.complete())},responseStarted:(n,i)=>{t.responseStarted&&t.responseStarted(n,i)}};return t.useCancellable&&(r.useCancellable=t.useCancellable.bind(t)),t.useResume&&(r.useResume=t.useResume.bind(t)),r}var $e="1.31.0.nightly";var nt={flush:z.constants.Z_SYNC_FLUSH,finishFlush:z.constants.Z_SYNC_FLUSH},it=re.allocUnsafe(0),ne=class{constructor(){this.cancelled=!1}cancel(){this.cancelled=!0,this.resume&&(this.resume(),this.resume=void 0)}isCancelled(){return this.cancelled}},ie=class{constructor(e){this.chunkCombiner=Ie;var p,a,f,m,y,P,se;let l=e,{url:r,proxyUrl:n,token:i,transportOptions:o}=l,s=fe(l,["url","proxyUrl","token","transportOptions"]),u=Be(n||r);if(this.token=i,this.defaultOptions=k(c(c(c({},ye),s),o),{port:u.port,protocol:u.protocol,hostname:u.hostname}),this.contextPath=n?r:(p=u.path)!=null?p:"",this.contextPath.endsWith("/")&&(this.contextPath=this.contextPath.substring(0,this.contextPath.length-1)),Object.keys(this.defaultOptions).forEach(oe=>this.defaultOptions[oe]===void 0&&delete this.defaultOptions[oe]),this.contextPath.endsWith("/api/v2")&&(g.warn(`Please remove '/api/v2' context path from InfluxDB base url, using ${u.protocol}//${u.hostname}:${u.port} !`),this.contextPath=""),u.protocol==="http:")this.requestApi=(m=(f=(a=this.defaultOptions["follow-redirects"])==null?void 0:a.http)==null?void 0:f.request)!=null?m:ze.request;else if(u.protocol==="https:")this.requestApi=(se=(P=(y=this.defaultOptions["follow-redirects"])==null?void 0:y.https)==null?void 0:P.request)!=null?se:Ve.request;else throw new Error(`Unsupported protocol "${u.protocol} in URL: "${e.url}"`);this.headers=c({"User-Agent":`influxdb-client-js/${$e}`},e.headers),n&&(this.headers.Host=Be(r).host)}send(e,r,n,i){let o=new ne;i&&i.useCancellable&&i.useCancellable(o),this.createRequestMessage(e,r,n).then(s=>{this._request(s,o,i)},s=>(i==null?void 0:i.error)&&i.error(s))}request(e,r,n,i){r?typeof r!="string"&&(r=JSON.stringify(r)):r="";let o=it,s,u;return new Promise((l,p)=>{this.send(e,r,n,{responseStarted(a,f){i&&i(a,f),s=String(a["content-type"]),u=f},next:a=>{o=re.concat([o,a])},complete:()=>{var f,m;let a=(m=(f=n.headers)==null?void 0:f.accept)!=null?m:s;try{u===204&&l(void 0),a.includes("json")?o.length?l(JSON.parse(o.toString("utf8"))):l(void 0):a.includes("text")||a.startsWith("application/csv")?l(o.toString("utf8")):l(o)}catch(y){p(y)}},error:a=>{p(a)}})})}createRequestMessage(e,r,n){let i=re.from(r,"utf-8"),o=c({"content-type":"application/json; charset=utf-8"},this.headers);this.token&&(o.authorization="Token "+this.token);let s=Promise.resolve(i),u=k(c({},this.defaultOptions),{path:this.contextPath+e,method:n.method,headers:c(c({},o),n.headers)});return n.gzipThreshold!==void 0&&n.gzipThreshold<i.length&&(s=s.then(l=>new Promise((p,a)=>{z.gzip(l,(f,m)=>f?a(f):(u.headers["content-encoding"]="gzip",p(m)))}))),s.then(l=>(u.body=l,u.headers["content-length"]=l.length,u))}_request(e,r,n){let i=te(n);if(r.isCancelled()){i.complete();return}let o=this.requestApi(e,s=>{var a;if(r.isCancelled()){s.resume(),i.complete();return}s.on("aborted",()=>{i.error(new T)}),s.on("error",i.error),i.responseStarted(s.headers,s.statusCode);let u=(a=s.statusCode)!=null?a:600,l=s.headers["content-encoding"],p;if(l==="gzip"?(p=z.createGunzip(nt),p.on("error",i.error),s.pipe(p)):p=s,u>=300){let f="",m=String(s.headers["content-type"]).startsWith("application/json");p.on("data",y=>{f+=y.toString(),!m&&f.length>1e3&&(f=f.slice(0,1e3),s.resume())}),p.on("end",()=>{f===""&&!!s.headers["x-influxdb-error"]&&(f=s.headers["x-influxdb-error"].toString()),i.error(new h(u,s.statusMessage,f,s.headers["retry-after"],s.headers["content-type"]))})}else p.on("data",f=>{if(r.isCancelled())s.resume();else if(i.next(f)===!1){if(!i.useResume){i.error(new Error("Unable to pause, useResume is not configured!")),s.resume();return}s.pause();let m=()=>{s.resume()};r.resume=m,i.useResume(m)}}),p.on("end",i.complete)});typeof o.setTimeout=="function"&&e.timeout&&o.setTimeout(e.timeout),o.on("timeout",()=>{i.error(new x)}),o.on("error",s=>{i.error(s)}),e.body&&o.write(e.body),o.end()}},Me=ie;var ke={header:!0,delimiter:",",quoteChar:'"',commentPrefix:"#",annotations:["datatype","group","default"]},D=class{constructor(e,r,n){this.transport=e;this.createCSVResponse=r;this.options=typeof n=="string"?{org:n}:n}with(e){return new D(this.transport,this.createCSVResponse,c(c({},this.options),e))}response(e){return this.createCSVResponse(this.createExecutor(e))}lines(e){return this.response(e).lines()}rows(e){return this.response(e).rows()}queryLines(e,r){return this.response(e).consumeLines(r)}queryRows(e,r){return this.response(e).consumeRows(r)}collectRows(e,r){return this.response(e).collectRows(r)}collectLines(e){return this.response(e).collectLines()}queryRaw(e){let{org:r,type:n,gzip:i,headers:o}=this.options;return this.transport.request(`/api/v2/query?org=${encodeURIComponent(r)}`,JSON.stringify(this.decorateRequest({query:e.toString(),dialect:ke,type:n})),{method:"POST",headers:c({accept:"text/csv","accept-encoding":i?"gzip":"identity","content-type":"application/json; encoding=utf-8"},o)})}createExecutor(e){let{org:r,type:n,gzip:i,headers:o}=this.options;return s=>{this.transport.send(`/api/v2/query?org=${encodeURIComponent(r)}`,JSON.stringify(this.decorateRequest({query:e.toString(),dialect:ke,type:n})),{method:"POST",headers:c({"content-type":"application/json; encoding=utf-8","accept-encoding":i?"gzip":"identity"},o)},s)}}decorateRequest(e){var r;return typeof this.options.now=="function"&&(e.now=this.options.now()),e.type=(r=this.options.type)!=null?r:"flux",e}},Ne=D;function st(t,e){return e.toObject(t)}var V=class{constructor(e,r){this.executor=e;this.chunkCombiner=r}lines(){return new R(this.executor,e=>w(e,this.chunkCombiner))}rows(){return new R(this.executor,e=>w(H({next(r,n){e.next({values:r,tableMeta:n})},error(r){e.error(r)},complete(){e.complete()}}),this.chunkCombiner))}consumeLines(e){this.executor(w(e,this.chunkCombiner))}consumeRows(e){this.executor(w(H(e),this.chunkCombiner))}collectRows(e=st){let r=[];return new Promise((n,i)=>{this.consumeRows({next(o,s){let u=e.call(this,o,s);u!==void 0&&r.push(u)},error(o){i(o)},complete(){n(r)}})})}collectLines(){let e=[];return new Promise((r,n)=>{this.consumeLines({next(i){e.push(i)},error(i){n(i)},complete(){r(e)}})})}};var M=class{constructor(e){var n;if(typeof e=="string")this._options={url:e};else if(e!==null&&typeof e=="object")this._options=e;else throw new b("No url or configuration specified!");let r=this._options.url;if(typeof r!="string")throw new b("No url specified!");r.endsWith("/")&&(this._options.url=r.substring(0,r.length-1)),this.transport=(n=this._options.transport)!=null?n:new Me(this._options),this.processCSVResponse=i=>new V(i,this.transport.chunkCombiner)}getWriteApi(e,r,n="ns",i){return new A(this.transport,e,r,n,i!=null?i:this._options.writeOptions)}getQueryApi(e){return new Ne(this.transport,this.processCSVResponse,e)}};export{T as AbortError,ye as DEFAULT_ConnectionOptions,be as DEFAULT_RetryDelayStrategyOptions,xe as DEFAULT_WriteOptions,B as FLUX_VALUE,h as HttpError,b as IllegalArgumentError,M as InfluxDB,L as LineSplitter,g as Log,Le as Point,x as RequestTimedOutError,ce as UNKNOWN_COLUMN,dt as canRetryHttpCall,w as chunksToLines,Ke as consoleLogger,Ae as convertTimeToNanos,ct as createFluxTableColumn,he as createFluxTableMetaData,pe as createTextDecoderCombiner,Oe as currentTime,ve as dateToProtocolTimestamp,C as escape,gr as flux,hr as fluxBool,cr as fluxDateTime,mr as fluxDuration,De as fluxExpression,fr as fluxFloat,pr as fluxInteger,dr as fluxRegExp,lr as fluxString,de as getRetryDelay,Qe as isStatusCodeRetriable,H as linesToTables,me as newFluxTableColumn,Pe as sanitizeFloat,Ee as sanitizeInteger,xt as serializeDateTimeAsDate,Tt as serializeDateTimeAsNumber,Rt as serializeDateTimeAsString,ar as setLogger,Et as stringToLines,ge as symbolObservable,G as toFluxValue,S as typeSerializers,Ge as useProcessHrtime};
6
6
  //# sourceMappingURL=index.mjs.map
package/dist/index.mjs.gz CHANGED
Binary file